1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package inspector
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/inspector/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	"io/ioutil"
20	"strings"
21)
22
23type awsAwsjson11_deserializeOpAddAttributesToFindings struct {
24}
25
26func (*awsAwsjson11_deserializeOpAddAttributesToFindings) ID() string {
27	return "OperationDeserializer"
28}
29
30func (m *awsAwsjson11_deserializeOpAddAttributesToFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
31	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
32) {
33	out, metadata, err = next.HandleDeserialize(ctx, in)
34	if err != nil {
35		return out, metadata, err
36	}
37
38	response, ok := out.RawResponse.(*smithyhttp.Response)
39	if !ok {
40		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
41	}
42
43	if response.StatusCode < 200 || response.StatusCode >= 300 {
44		return out, metadata, awsAwsjson11_deserializeOpErrorAddAttributesToFindings(response, &metadata)
45	}
46	output := &AddAttributesToFindingsOutput{}
47	out.Result = output
48
49	var buff [1024]byte
50	ringBuffer := smithyio.NewRingBuffer(buff[:])
51
52	body := io.TeeReader(response.Body, ringBuffer)
53	decoder := json.NewDecoder(body)
54	decoder.UseNumber()
55	var shape interface{}
56	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
57		var snapshot bytes.Buffer
58		io.Copy(&snapshot, ringBuffer)
59		err = &smithy.DeserializationError{
60			Err:      fmt.Errorf("failed to decode response body, %w", err),
61			Snapshot: snapshot.Bytes(),
62		}
63		return out, metadata, err
64	}
65
66	err = awsAwsjson11_deserializeOpDocumentAddAttributesToFindingsOutput(&output, shape)
67	if err != nil {
68		var snapshot bytes.Buffer
69		io.Copy(&snapshot, ringBuffer)
70		err = &smithy.DeserializationError{
71			Err:      fmt.Errorf("failed to decode response body, %w", err),
72			Snapshot: snapshot.Bytes(),
73		}
74		return out, metadata, err
75	}
76
77	return out, metadata, err
78}
79
80func awsAwsjson11_deserializeOpErrorAddAttributesToFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
81	var errorBuffer bytes.Buffer
82	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
83		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
84	}
85	errorBody := bytes.NewReader(errorBuffer.Bytes())
86
87	errorCode := "UnknownError"
88	errorMessage := errorCode
89
90	code := response.Header.Get("X-Amzn-ErrorType")
91	if len(code) != 0 {
92		errorCode = restjson.SanitizeErrorCode(code)
93	}
94
95	var buff [1024]byte
96	ringBuffer := smithyio.NewRingBuffer(buff[:])
97
98	body := io.TeeReader(errorBody, ringBuffer)
99	decoder := json.NewDecoder(body)
100	decoder.UseNumber()
101	code, message, err := restjson.GetErrorInfo(decoder)
102	if err != nil {
103		var snapshot bytes.Buffer
104		io.Copy(&snapshot, ringBuffer)
105		err = &smithy.DeserializationError{
106			Err:      fmt.Errorf("failed to decode response body, %w", err),
107			Snapshot: snapshot.Bytes(),
108		}
109		return err
110	}
111
112	errorBody.Seek(0, io.SeekStart)
113	if len(code) != 0 {
114		errorCode = restjson.SanitizeErrorCode(code)
115	}
116	if len(message) != 0 {
117		errorMessage = message
118	}
119
120	switch {
121	case strings.EqualFold("AccessDeniedException", errorCode):
122		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
123
124	case strings.EqualFold("InternalException", errorCode):
125		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
126
127	case strings.EqualFold("InvalidInputException", errorCode):
128		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
129
130	case strings.EqualFold("NoSuchEntityException", errorCode):
131		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
132
133	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
134		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
135
136	default:
137		genericError := &smithy.GenericAPIError{
138			Code:    errorCode,
139			Message: errorMessage,
140		}
141		return genericError
142
143	}
144}
145
146type awsAwsjson11_deserializeOpCreateAssessmentTarget struct {
147}
148
149func (*awsAwsjson11_deserializeOpCreateAssessmentTarget) ID() string {
150	return "OperationDeserializer"
151}
152
153func (m *awsAwsjson11_deserializeOpCreateAssessmentTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
154	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
155) {
156	out, metadata, err = next.HandleDeserialize(ctx, in)
157	if err != nil {
158		return out, metadata, err
159	}
160
161	response, ok := out.RawResponse.(*smithyhttp.Response)
162	if !ok {
163		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
164	}
165
166	if response.StatusCode < 200 || response.StatusCode >= 300 {
167		return out, metadata, awsAwsjson11_deserializeOpErrorCreateAssessmentTarget(response, &metadata)
168	}
169	output := &CreateAssessmentTargetOutput{}
170	out.Result = output
171
172	var buff [1024]byte
173	ringBuffer := smithyio.NewRingBuffer(buff[:])
174
175	body := io.TeeReader(response.Body, ringBuffer)
176	decoder := json.NewDecoder(body)
177	decoder.UseNumber()
178	var shape interface{}
179	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
180		var snapshot bytes.Buffer
181		io.Copy(&snapshot, ringBuffer)
182		err = &smithy.DeserializationError{
183			Err:      fmt.Errorf("failed to decode response body, %w", err),
184			Snapshot: snapshot.Bytes(),
185		}
186		return out, metadata, err
187	}
188
189	err = awsAwsjson11_deserializeOpDocumentCreateAssessmentTargetOutput(&output, shape)
190	if err != nil {
191		var snapshot bytes.Buffer
192		io.Copy(&snapshot, ringBuffer)
193		err = &smithy.DeserializationError{
194			Err:      fmt.Errorf("failed to decode response body, %w", err),
195			Snapshot: snapshot.Bytes(),
196		}
197		return out, metadata, err
198	}
199
200	return out, metadata, err
201}
202
203func awsAwsjson11_deserializeOpErrorCreateAssessmentTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error {
204	var errorBuffer bytes.Buffer
205	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
206		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
207	}
208	errorBody := bytes.NewReader(errorBuffer.Bytes())
209
210	errorCode := "UnknownError"
211	errorMessage := errorCode
212
213	code := response.Header.Get("X-Amzn-ErrorType")
214	if len(code) != 0 {
215		errorCode = restjson.SanitizeErrorCode(code)
216	}
217
218	var buff [1024]byte
219	ringBuffer := smithyio.NewRingBuffer(buff[:])
220
221	body := io.TeeReader(errorBody, ringBuffer)
222	decoder := json.NewDecoder(body)
223	decoder.UseNumber()
224	code, message, err := restjson.GetErrorInfo(decoder)
225	if err != nil {
226		var snapshot bytes.Buffer
227		io.Copy(&snapshot, ringBuffer)
228		err = &smithy.DeserializationError{
229			Err:      fmt.Errorf("failed to decode response body, %w", err),
230			Snapshot: snapshot.Bytes(),
231		}
232		return err
233	}
234
235	errorBody.Seek(0, io.SeekStart)
236	if len(code) != 0 {
237		errorCode = restjson.SanitizeErrorCode(code)
238	}
239	if len(message) != 0 {
240		errorMessage = message
241	}
242
243	switch {
244	case strings.EqualFold("AccessDeniedException", errorCode):
245		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
246
247	case strings.EqualFold("InternalException", errorCode):
248		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
249
250	case strings.EqualFold("InvalidCrossAccountRoleException", errorCode):
251		return awsAwsjson11_deserializeErrorInvalidCrossAccountRoleException(response, errorBody)
252
253	case strings.EqualFold("InvalidInputException", errorCode):
254		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
255
256	case strings.EqualFold("LimitExceededException", errorCode):
257		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
258
259	case strings.EqualFold("NoSuchEntityException", errorCode):
260		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
261
262	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
263		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
264
265	default:
266		genericError := &smithy.GenericAPIError{
267			Code:    errorCode,
268			Message: errorMessage,
269		}
270		return genericError
271
272	}
273}
274
275type awsAwsjson11_deserializeOpCreateAssessmentTemplate struct {
276}
277
278func (*awsAwsjson11_deserializeOpCreateAssessmentTemplate) ID() string {
279	return "OperationDeserializer"
280}
281
282func (m *awsAwsjson11_deserializeOpCreateAssessmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
283	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
284) {
285	out, metadata, err = next.HandleDeserialize(ctx, in)
286	if err != nil {
287		return out, metadata, err
288	}
289
290	response, ok := out.RawResponse.(*smithyhttp.Response)
291	if !ok {
292		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
293	}
294
295	if response.StatusCode < 200 || response.StatusCode >= 300 {
296		return out, metadata, awsAwsjson11_deserializeOpErrorCreateAssessmentTemplate(response, &metadata)
297	}
298	output := &CreateAssessmentTemplateOutput{}
299	out.Result = output
300
301	var buff [1024]byte
302	ringBuffer := smithyio.NewRingBuffer(buff[:])
303
304	body := io.TeeReader(response.Body, ringBuffer)
305	decoder := json.NewDecoder(body)
306	decoder.UseNumber()
307	var shape interface{}
308	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
309		var snapshot bytes.Buffer
310		io.Copy(&snapshot, ringBuffer)
311		err = &smithy.DeserializationError{
312			Err:      fmt.Errorf("failed to decode response body, %w", err),
313			Snapshot: snapshot.Bytes(),
314		}
315		return out, metadata, err
316	}
317
318	err = awsAwsjson11_deserializeOpDocumentCreateAssessmentTemplateOutput(&output, shape)
319	if err != nil {
320		var snapshot bytes.Buffer
321		io.Copy(&snapshot, ringBuffer)
322		err = &smithy.DeserializationError{
323			Err:      fmt.Errorf("failed to decode response body, %w", err),
324			Snapshot: snapshot.Bytes(),
325		}
326		return out, metadata, err
327	}
328
329	return out, metadata, err
330}
331
332func awsAwsjson11_deserializeOpErrorCreateAssessmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
333	var errorBuffer bytes.Buffer
334	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
335		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
336	}
337	errorBody := bytes.NewReader(errorBuffer.Bytes())
338
339	errorCode := "UnknownError"
340	errorMessage := errorCode
341
342	code := response.Header.Get("X-Amzn-ErrorType")
343	if len(code) != 0 {
344		errorCode = restjson.SanitizeErrorCode(code)
345	}
346
347	var buff [1024]byte
348	ringBuffer := smithyio.NewRingBuffer(buff[:])
349
350	body := io.TeeReader(errorBody, ringBuffer)
351	decoder := json.NewDecoder(body)
352	decoder.UseNumber()
353	code, message, err := restjson.GetErrorInfo(decoder)
354	if err != nil {
355		var snapshot bytes.Buffer
356		io.Copy(&snapshot, ringBuffer)
357		err = &smithy.DeserializationError{
358			Err:      fmt.Errorf("failed to decode response body, %w", err),
359			Snapshot: snapshot.Bytes(),
360		}
361		return err
362	}
363
364	errorBody.Seek(0, io.SeekStart)
365	if len(code) != 0 {
366		errorCode = restjson.SanitizeErrorCode(code)
367	}
368	if len(message) != 0 {
369		errorMessage = message
370	}
371
372	switch {
373	case strings.EqualFold("AccessDeniedException", errorCode):
374		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
375
376	case strings.EqualFold("InternalException", errorCode):
377		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
378
379	case strings.EqualFold("InvalidInputException", errorCode):
380		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
381
382	case strings.EqualFold("LimitExceededException", errorCode):
383		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
384
385	case strings.EqualFold("NoSuchEntityException", errorCode):
386		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
387
388	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
389		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
390
391	default:
392		genericError := &smithy.GenericAPIError{
393			Code:    errorCode,
394			Message: errorMessage,
395		}
396		return genericError
397
398	}
399}
400
401type awsAwsjson11_deserializeOpCreateExclusionsPreview struct {
402}
403
404func (*awsAwsjson11_deserializeOpCreateExclusionsPreview) ID() string {
405	return "OperationDeserializer"
406}
407
408func (m *awsAwsjson11_deserializeOpCreateExclusionsPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
409	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
410) {
411	out, metadata, err = next.HandleDeserialize(ctx, in)
412	if err != nil {
413		return out, metadata, err
414	}
415
416	response, ok := out.RawResponse.(*smithyhttp.Response)
417	if !ok {
418		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
419	}
420
421	if response.StatusCode < 200 || response.StatusCode >= 300 {
422		return out, metadata, awsAwsjson11_deserializeOpErrorCreateExclusionsPreview(response, &metadata)
423	}
424	output := &CreateExclusionsPreviewOutput{}
425	out.Result = output
426
427	var buff [1024]byte
428	ringBuffer := smithyio.NewRingBuffer(buff[:])
429
430	body := io.TeeReader(response.Body, ringBuffer)
431	decoder := json.NewDecoder(body)
432	decoder.UseNumber()
433	var shape interface{}
434	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
435		var snapshot bytes.Buffer
436		io.Copy(&snapshot, ringBuffer)
437		err = &smithy.DeserializationError{
438			Err:      fmt.Errorf("failed to decode response body, %w", err),
439			Snapshot: snapshot.Bytes(),
440		}
441		return out, metadata, err
442	}
443
444	err = awsAwsjson11_deserializeOpDocumentCreateExclusionsPreviewOutput(&output, shape)
445	if err != nil {
446		var snapshot bytes.Buffer
447		io.Copy(&snapshot, ringBuffer)
448		err = &smithy.DeserializationError{
449			Err:      fmt.Errorf("failed to decode response body, %w", err),
450			Snapshot: snapshot.Bytes(),
451		}
452		return out, metadata, err
453	}
454
455	return out, metadata, err
456}
457
458func awsAwsjson11_deserializeOpErrorCreateExclusionsPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error {
459	var errorBuffer bytes.Buffer
460	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
461		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
462	}
463	errorBody := bytes.NewReader(errorBuffer.Bytes())
464
465	errorCode := "UnknownError"
466	errorMessage := errorCode
467
468	code := response.Header.Get("X-Amzn-ErrorType")
469	if len(code) != 0 {
470		errorCode = restjson.SanitizeErrorCode(code)
471	}
472
473	var buff [1024]byte
474	ringBuffer := smithyio.NewRingBuffer(buff[:])
475
476	body := io.TeeReader(errorBody, ringBuffer)
477	decoder := json.NewDecoder(body)
478	decoder.UseNumber()
479	code, message, err := restjson.GetErrorInfo(decoder)
480	if err != nil {
481		var snapshot bytes.Buffer
482		io.Copy(&snapshot, ringBuffer)
483		err = &smithy.DeserializationError{
484			Err:      fmt.Errorf("failed to decode response body, %w", err),
485			Snapshot: snapshot.Bytes(),
486		}
487		return err
488	}
489
490	errorBody.Seek(0, io.SeekStart)
491	if len(code) != 0 {
492		errorCode = restjson.SanitizeErrorCode(code)
493	}
494	if len(message) != 0 {
495		errorMessage = message
496	}
497
498	switch {
499	case strings.EqualFold("AccessDeniedException", errorCode):
500		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
501
502	case strings.EqualFold("InternalException", errorCode):
503		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
504
505	case strings.EqualFold("InvalidInputException", errorCode):
506		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
507
508	case strings.EqualFold("NoSuchEntityException", errorCode):
509		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
510
511	case strings.EqualFold("PreviewGenerationInProgressException", errorCode):
512		return awsAwsjson11_deserializeErrorPreviewGenerationInProgressException(response, errorBody)
513
514	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
515		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
516
517	default:
518		genericError := &smithy.GenericAPIError{
519			Code:    errorCode,
520			Message: errorMessage,
521		}
522		return genericError
523
524	}
525}
526
527type awsAwsjson11_deserializeOpCreateResourceGroup struct {
528}
529
530func (*awsAwsjson11_deserializeOpCreateResourceGroup) ID() string {
531	return "OperationDeserializer"
532}
533
534func (m *awsAwsjson11_deserializeOpCreateResourceGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
535	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
536) {
537	out, metadata, err = next.HandleDeserialize(ctx, in)
538	if err != nil {
539		return out, metadata, err
540	}
541
542	response, ok := out.RawResponse.(*smithyhttp.Response)
543	if !ok {
544		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
545	}
546
547	if response.StatusCode < 200 || response.StatusCode >= 300 {
548		return out, metadata, awsAwsjson11_deserializeOpErrorCreateResourceGroup(response, &metadata)
549	}
550	output := &CreateResourceGroupOutput{}
551	out.Result = output
552
553	var buff [1024]byte
554	ringBuffer := smithyio.NewRingBuffer(buff[:])
555
556	body := io.TeeReader(response.Body, ringBuffer)
557	decoder := json.NewDecoder(body)
558	decoder.UseNumber()
559	var shape interface{}
560	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
561		var snapshot bytes.Buffer
562		io.Copy(&snapshot, ringBuffer)
563		err = &smithy.DeserializationError{
564			Err:      fmt.Errorf("failed to decode response body, %w", err),
565			Snapshot: snapshot.Bytes(),
566		}
567		return out, metadata, err
568	}
569
570	err = awsAwsjson11_deserializeOpDocumentCreateResourceGroupOutput(&output, shape)
571	if err != nil {
572		var snapshot bytes.Buffer
573		io.Copy(&snapshot, ringBuffer)
574		err = &smithy.DeserializationError{
575			Err:      fmt.Errorf("failed to decode response body, %w", err),
576			Snapshot: snapshot.Bytes(),
577		}
578		return out, metadata, err
579	}
580
581	return out, metadata, err
582}
583
584func awsAwsjson11_deserializeOpErrorCreateResourceGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
585	var errorBuffer bytes.Buffer
586	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
587		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
588	}
589	errorBody := bytes.NewReader(errorBuffer.Bytes())
590
591	errorCode := "UnknownError"
592	errorMessage := errorCode
593
594	code := response.Header.Get("X-Amzn-ErrorType")
595	if len(code) != 0 {
596		errorCode = restjson.SanitizeErrorCode(code)
597	}
598
599	var buff [1024]byte
600	ringBuffer := smithyio.NewRingBuffer(buff[:])
601
602	body := io.TeeReader(errorBody, ringBuffer)
603	decoder := json.NewDecoder(body)
604	decoder.UseNumber()
605	code, message, err := restjson.GetErrorInfo(decoder)
606	if err != nil {
607		var snapshot bytes.Buffer
608		io.Copy(&snapshot, ringBuffer)
609		err = &smithy.DeserializationError{
610			Err:      fmt.Errorf("failed to decode response body, %w", err),
611			Snapshot: snapshot.Bytes(),
612		}
613		return err
614	}
615
616	errorBody.Seek(0, io.SeekStart)
617	if len(code) != 0 {
618		errorCode = restjson.SanitizeErrorCode(code)
619	}
620	if len(message) != 0 {
621		errorMessage = message
622	}
623
624	switch {
625	case strings.EqualFold("AccessDeniedException", errorCode):
626		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
627
628	case strings.EqualFold("InternalException", errorCode):
629		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
630
631	case strings.EqualFold("InvalidInputException", errorCode):
632		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
633
634	case strings.EqualFold("LimitExceededException", errorCode):
635		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
636
637	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
638		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
639
640	default:
641		genericError := &smithy.GenericAPIError{
642			Code:    errorCode,
643			Message: errorMessage,
644		}
645		return genericError
646
647	}
648}
649
650type awsAwsjson11_deserializeOpDeleteAssessmentRun struct {
651}
652
653func (*awsAwsjson11_deserializeOpDeleteAssessmentRun) ID() string {
654	return "OperationDeserializer"
655}
656
657func (m *awsAwsjson11_deserializeOpDeleteAssessmentRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
658	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
659) {
660	out, metadata, err = next.HandleDeserialize(ctx, in)
661	if err != nil {
662		return out, metadata, err
663	}
664
665	response, ok := out.RawResponse.(*smithyhttp.Response)
666	if !ok {
667		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
668	}
669
670	if response.StatusCode < 200 || response.StatusCode >= 300 {
671		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAssessmentRun(response, &metadata)
672	}
673	output := &DeleteAssessmentRunOutput{}
674	out.Result = output
675
676	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
677		return out, metadata, &smithy.DeserializationError{
678			Err: fmt.Errorf("failed to discard response body, %w", err),
679		}
680	}
681
682	return out, metadata, err
683}
684
685func awsAwsjson11_deserializeOpErrorDeleteAssessmentRun(response *smithyhttp.Response, metadata *middleware.Metadata) error {
686	var errorBuffer bytes.Buffer
687	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
688		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
689	}
690	errorBody := bytes.NewReader(errorBuffer.Bytes())
691
692	errorCode := "UnknownError"
693	errorMessage := errorCode
694
695	code := response.Header.Get("X-Amzn-ErrorType")
696	if len(code) != 0 {
697		errorCode = restjson.SanitizeErrorCode(code)
698	}
699
700	var buff [1024]byte
701	ringBuffer := smithyio.NewRingBuffer(buff[:])
702
703	body := io.TeeReader(errorBody, ringBuffer)
704	decoder := json.NewDecoder(body)
705	decoder.UseNumber()
706	code, message, err := restjson.GetErrorInfo(decoder)
707	if err != nil {
708		var snapshot bytes.Buffer
709		io.Copy(&snapshot, ringBuffer)
710		err = &smithy.DeserializationError{
711			Err:      fmt.Errorf("failed to decode response body, %w", err),
712			Snapshot: snapshot.Bytes(),
713		}
714		return err
715	}
716
717	errorBody.Seek(0, io.SeekStart)
718	if len(code) != 0 {
719		errorCode = restjson.SanitizeErrorCode(code)
720	}
721	if len(message) != 0 {
722		errorMessage = message
723	}
724
725	switch {
726	case strings.EqualFold("AccessDeniedException", errorCode):
727		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
728
729	case strings.EqualFold("AssessmentRunInProgressException", errorCode):
730		return awsAwsjson11_deserializeErrorAssessmentRunInProgressException(response, errorBody)
731
732	case strings.EqualFold("InternalException", errorCode):
733		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
734
735	case strings.EqualFold("InvalidInputException", errorCode):
736		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
737
738	case strings.EqualFold("NoSuchEntityException", errorCode):
739		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
740
741	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
742		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
743
744	default:
745		genericError := &smithy.GenericAPIError{
746			Code:    errorCode,
747			Message: errorMessage,
748		}
749		return genericError
750
751	}
752}
753
754type awsAwsjson11_deserializeOpDeleteAssessmentTarget struct {
755}
756
757func (*awsAwsjson11_deserializeOpDeleteAssessmentTarget) ID() string {
758	return "OperationDeserializer"
759}
760
761func (m *awsAwsjson11_deserializeOpDeleteAssessmentTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
762	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
763) {
764	out, metadata, err = next.HandleDeserialize(ctx, in)
765	if err != nil {
766		return out, metadata, err
767	}
768
769	response, ok := out.RawResponse.(*smithyhttp.Response)
770	if !ok {
771		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
772	}
773
774	if response.StatusCode < 200 || response.StatusCode >= 300 {
775		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAssessmentTarget(response, &metadata)
776	}
777	output := &DeleteAssessmentTargetOutput{}
778	out.Result = output
779
780	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
781		return out, metadata, &smithy.DeserializationError{
782			Err: fmt.Errorf("failed to discard response body, %w", err),
783		}
784	}
785
786	return out, metadata, err
787}
788
789func awsAwsjson11_deserializeOpErrorDeleteAssessmentTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error {
790	var errorBuffer bytes.Buffer
791	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
792		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
793	}
794	errorBody := bytes.NewReader(errorBuffer.Bytes())
795
796	errorCode := "UnknownError"
797	errorMessage := errorCode
798
799	code := response.Header.Get("X-Amzn-ErrorType")
800	if len(code) != 0 {
801		errorCode = restjson.SanitizeErrorCode(code)
802	}
803
804	var buff [1024]byte
805	ringBuffer := smithyio.NewRingBuffer(buff[:])
806
807	body := io.TeeReader(errorBody, ringBuffer)
808	decoder := json.NewDecoder(body)
809	decoder.UseNumber()
810	code, message, err := restjson.GetErrorInfo(decoder)
811	if err != nil {
812		var snapshot bytes.Buffer
813		io.Copy(&snapshot, ringBuffer)
814		err = &smithy.DeserializationError{
815			Err:      fmt.Errorf("failed to decode response body, %w", err),
816			Snapshot: snapshot.Bytes(),
817		}
818		return err
819	}
820
821	errorBody.Seek(0, io.SeekStart)
822	if len(code) != 0 {
823		errorCode = restjson.SanitizeErrorCode(code)
824	}
825	if len(message) != 0 {
826		errorMessage = message
827	}
828
829	switch {
830	case strings.EqualFold("AccessDeniedException", errorCode):
831		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
832
833	case strings.EqualFold("AssessmentRunInProgressException", errorCode):
834		return awsAwsjson11_deserializeErrorAssessmentRunInProgressException(response, errorBody)
835
836	case strings.EqualFold("InternalException", errorCode):
837		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
838
839	case strings.EqualFold("InvalidInputException", errorCode):
840		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
841
842	case strings.EqualFold("NoSuchEntityException", errorCode):
843		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
844
845	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
846		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
847
848	default:
849		genericError := &smithy.GenericAPIError{
850			Code:    errorCode,
851			Message: errorMessage,
852		}
853		return genericError
854
855	}
856}
857
858type awsAwsjson11_deserializeOpDeleteAssessmentTemplate struct {
859}
860
861func (*awsAwsjson11_deserializeOpDeleteAssessmentTemplate) ID() string {
862	return "OperationDeserializer"
863}
864
865func (m *awsAwsjson11_deserializeOpDeleteAssessmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
866	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
867) {
868	out, metadata, err = next.HandleDeserialize(ctx, in)
869	if err != nil {
870		return out, metadata, err
871	}
872
873	response, ok := out.RawResponse.(*smithyhttp.Response)
874	if !ok {
875		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
876	}
877
878	if response.StatusCode < 200 || response.StatusCode >= 300 {
879		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAssessmentTemplate(response, &metadata)
880	}
881	output := &DeleteAssessmentTemplateOutput{}
882	out.Result = output
883
884	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
885		return out, metadata, &smithy.DeserializationError{
886			Err: fmt.Errorf("failed to discard response body, %w", err),
887		}
888	}
889
890	return out, metadata, err
891}
892
893func awsAwsjson11_deserializeOpErrorDeleteAssessmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
894	var errorBuffer bytes.Buffer
895	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
896		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
897	}
898	errorBody := bytes.NewReader(errorBuffer.Bytes())
899
900	errorCode := "UnknownError"
901	errorMessage := errorCode
902
903	code := response.Header.Get("X-Amzn-ErrorType")
904	if len(code) != 0 {
905		errorCode = restjson.SanitizeErrorCode(code)
906	}
907
908	var buff [1024]byte
909	ringBuffer := smithyio.NewRingBuffer(buff[:])
910
911	body := io.TeeReader(errorBody, ringBuffer)
912	decoder := json.NewDecoder(body)
913	decoder.UseNumber()
914	code, message, err := restjson.GetErrorInfo(decoder)
915	if err != nil {
916		var snapshot bytes.Buffer
917		io.Copy(&snapshot, ringBuffer)
918		err = &smithy.DeserializationError{
919			Err:      fmt.Errorf("failed to decode response body, %w", err),
920			Snapshot: snapshot.Bytes(),
921		}
922		return err
923	}
924
925	errorBody.Seek(0, io.SeekStart)
926	if len(code) != 0 {
927		errorCode = restjson.SanitizeErrorCode(code)
928	}
929	if len(message) != 0 {
930		errorMessage = message
931	}
932
933	switch {
934	case strings.EqualFold("AccessDeniedException", errorCode):
935		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
936
937	case strings.EqualFold("AssessmentRunInProgressException", errorCode):
938		return awsAwsjson11_deserializeErrorAssessmentRunInProgressException(response, errorBody)
939
940	case strings.EqualFold("InternalException", errorCode):
941		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
942
943	case strings.EqualFold("InvalidInputException", errorCode):
944		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
945
946	case strings.EqualFold("NoSuchEntityException", errorCode):
947		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
948
949	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
950		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
951
952	default:
953		genericError := &smithy.GenericAPIError{
954			Code:    errorCode,
955			Message: errorMessage,
956		}
957		return genericError
958
959	}
960}
961
962type awsAwsjson11_deserializeOpDescribeAssessmentRuns struct {
963}
964
965func (*awsAwsjson11_deserializeOpDescribeAssessmentRuns) ID() string {
966	return "OperationDeserializer"
967}
968
969func (m *awsAwsjson11_deserializeOpDescribeAssessmentRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
970	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
971) {
972	out, metadata, err = next.HandleDeserialize(ctx, in)
973	if err != nil {
974		return out, metadata, err
975	}
976
977	response, ok := out.RawResponse.(*smithyhttp.Response)
978	if !ok {
979		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
980	}
981
982	if response.StatusCode < 200 || response.StatusCode >= 300 {
983		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssessmentRuns(response, &metadata)
984	}
985	output := &DescribeAssessmentRunsOutput{}
986	out.Result = output
987
988	var buff [1024]byte
989	ringBuffer := smithyio.NewRingBuffer(buff[:])
990
991	body := io.TeeReader(response.Body, ringBuffer)
992	decoder := json.NewDecoder(body)
993	decoder.UseNumber()
994	var shape interface{}
995	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
996		var snapshot bytes.Buffer
997		io.Copy(&snapshot, ringBuffer)
998		err = &smithy.DeserializationError{
999			Err:      fmt.Errorf("failed to decode response body, %w", err),
1000			Snapshot: snapshot.Bytes(),
1001		}
1002		return out, metadata, err
1003	}
1004
1005	err = awsAwsjson11_deserializeOpDocumentDescribeAssessmentRunsOutput(&output, shape)
1006	if err != nil {
1007		var snapshot bytes.Buffer
1008		io.Copy(&snapshot, ringBuffer)
1009		err = &smithy.DeserializationError{
1010			Err:      fmt.Errorf("failed to decode response body, %w", err),
1011			Snapshot: snapshot.Bytes(),
1012		}
1013		return out, metadata, err
1014	}
1015
1016	return out, metadata, err
1017}
1018
1019func awsAwsjson11_deserializeOpErrorDescribeAssessmentRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1020	var errorBuffer bytes.Buffer
1021	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1022		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1023	}
1024	errorBody := bytes.NewReader(errorBuffer.Bytes())
1025
1026	errorCode := "UnknownError"
1027	errorMessage := errorCode
1028
1029	code := response.Header.Get("X-Amzn-ErrorType")
1030	if len(code) != 0 {
1031		errorCode = restjson.SanitizeErrorCode(code)
1032	}
1033
1034	var buff [1024]byte
1035	ringBuffer := smithyio.NewRingBuffer(buff[:])
1036
1037	body := io.TeeReader(errorBody, ringBuffer)
1038	decoder := json.NewDecoder(body)
1039	decoder.UseNumber()
1040	code, message, err := restjson.GetErrorInfo(decoder)
1041	if err != nil {
1042		var snapshot bytes.Buffer
1043		io.Copy(&snapshot, ringBuffer)
1044		err = &smithy.DeserializationError{
1045			Err:      fmt.Errorf("failed to decode response body, %w", err),
1046			Snapshot: snapshot.Bytes(),
1047		}
1048		return err
1049	}
1050
1051	errorBody.Seek(0, io.SeekStart)
1052	if len(code) != 0 {
1053		errorCode = restjson.SanitizeErrorCode(code)
1054	}
1055	if len(message) != 0 {
1056		errorMessage = message
1057	}
1058
1059	switch {
1060	case strings.EqualFold("InternalException", errorCode):
1061		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1062
1063	case strings.EqualFold("InvalidInputException", errorCode):
1064		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1065
1066	default:
1067		genericError := &smithy.GenericAPIError{
1068			Code:    errorCode,
1069			Message: errorMessage,
1070		}
1071		return genericError
1072
1073	}
1074}
1075
1076type awsAwsjson11_deserializeOpDescribeAssessmentTargets struct {
1077}
1078
1079func (*awsAwsjson11_deserializeOpDescribeAssessmentTargets) ID() string {
1080	return "OperationDeserializer"
1081}
1082
1083func (m *awsAwsjson11_deserializeOpDescribeAssessmentTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1084	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1085) {
1086	out, metadata, err = next.HandleDeserialize(ctx, in)
1087	if err != nil {
1088		return out, metadata, err
1089	}
1090
1091	response, ok := out.RawResponse.(*smithyhttp.Response)
1092	if !ok {
1093		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1094	}
1095
1096	if response.StatusCode < 200 || response.StatusCode >= 300 {
1097		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssessmentTargets(response, &metadata)
1098	}
1099	output := &DescribeAssessmentTargetsOutput{}
1100	out.Result = output
1101
1102	var buff [1024]byte
1103	ringBuffer := smithyio.NewRingBuffer(buff[:])
1104
1105	body := io.TeeReader(response.Body, ringBuffer)
1106	decoder := json.NewDecoder(body)
1107	decoder.UseNumber()
1108	var shape interface{}
1109	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1110		var snapshot bytes.Buffer
1111		io.Copy(&snapshot, ringBuffer)
1112		err = &smithy.DeserializationError{
1113			Err:      fmt.Errorf("failed to decode response body, %w", err),
1114			Snapshot: snapshot.Bytes(),
1115		}
1116		return out, metadata, err
1117	}
1118
1119	err = awsAwsjson11_deserializeOpDocumentDescribeAssessmentTargetsOutput(&output, shape)
1120	if err != nil {
1121		var snapshot bytes.Buffer
1122		io.Copy(&snapshot, ringBuffer)
1123		err = &smithy.DeserializationError{
1124			Err:      fmt.Errorf("failed to decode response body, %w", err),
1125			Snapshot: snapshot.Bytes(),
1126		}
1127		return out, metadata, err
1128	}
1129
1130	return out, metadata, err
1131}
1132
1133func awsAwsjson11_deserializeOpErrorDescribeAssessmentTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1134	var errorBuffer bytes.Buffer
1135	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1136		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1137	}
1138	errorBody := bytes.NewReader(errorBuffer.Bytes())
1139
1140	errorCode := "UnknownError"
1141	errorMessage := errorCode
1142
1143	code := response.Header.Get("X-Amzn-ErrorType")
1144	if len(code) != 0 {
1145		errorCode = restjson.SanitizeErrorCode(code)
1146	}
1147
1148	var buff [1024]byte
1149	ringBuffer := smithyio.NewRingBuffer(buff[:])
1150
1151	body := io.TeeReader(errorBody, ringBuffer)
1152	decoder := json.NewDecoder(body)
1153	decoder.UseNumber()
1154	code, message, err := restjson.GetErrorInfo(decoder)
1155	if err != nil {
1156		var snapshot bytes.Buffer
1157		io.Copy(&snapshot, ringBuffer)
1158		err = &smithy.DeserializationError{
1159			Err:      fmt.Errorf("failed to decode response body, %w", err),
1160			Snapshot: snapshot.Bytes(),
1161		}
1162		return err
1163	}
1164
1165	errorBody.Seek(0, io.SeekStart)
1166	if len(code) != 0 {
1167		errorCode = restjson.SanitizeErrorCode(code)
1168	}
1169	if len(message) != 0 {
1170		errorMessage = message
1171	}
1172
1173	switch {
1174	case strings.EqualFold("InternalException", errorCode):
1175		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1176
1177	case strings.EqualFold("InvalidInputException", errorCode):
1178		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1179
1180	default:
1181		genericError := &smithy.GenericAPIError{
1182			Code:    errorCode,
1183			Message: errorMessage,
1184		}
1185		return genericError
1186
1187	}
1188}
1189
1190type awsAwsjson11_deserializeOpDescribeAssessmentTemplates struct {
1191}
1192
1193func (*awsAwsjson11_deserializeOpDescribeAssessmentTemplates) ID() string {
1194	return "OperationDeserializer"
1195}
1196
1197func (m *awsAwsjson11_deserializeOpDescribeAssessmentTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1198	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1199) {
1200	out, metadata, err = next.HandleDeserialize(ctx, in)
1201	if err != nil {
1202		return out, metadata, err
1203	}
1204
1205	response, ok := out.RawResponse.(*smithyhttp.Response)
1206	if !ok {
1207		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1208	}
1209
1210	if response.StatusCode < 200 || response.StatusCode >= 300 {
1211		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAssessmentTemplates(response, &metadata)
1212	}
1213	output := &DescribeAssessmentTemplatesOutput{}
1214	out.Result = output
1215
1216	var buff [1024]byte
1217	ringBuffer := smithyio.NewRingBuffer(buff[:])
1218
1219	body := io.TeeReader(response.Body, ringBuffer)
1220	decoder := json.NewDecoder(body)
1221	decoder.UseNumber()
1222	var shape interface{}
1223	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
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 out, metadata, err
1231	}
1232
1233	err = awsAwsjson11_deserializeOpDocumentDescribeAssessmentTemplatesOutput(&output, shape)
1234	if err != nil {
1235		var snapshot bytes.Buffer
1236		io.Copy(&snapshot, ringBuffer)
1237		err = &smithy.DeserializationError{
1238			Err:      fmt.Errorf("failed to decode response body, %w", err),
1239			Snapshot: snapshot.Bytes(),
1240		}
1241		return out, metadata, err
1242	}
1243
1244	return out, metadata, err
1245}
1246
1247func awsAwsjson11_deserializeOpErrorDescribeAssessmentTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1248	var errorBuffer bytes.Buffer
1249	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1250		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1251	}
1252	errorBody := bytes.NewReader(errorBuffer.Bytes())
1253
1254	errorCode := "UnknownError"
1255	errorMessage := errorCode
1256
1257	code := response.Header.Get("X-Amzn-ErrorType")
1258	if len(code) != 0 {
1259		errorCode = restjson.SanitizeErrorCode(code)
1260	}
1261
1262	var buff [1024]byte
1263	ringBuffer := smithyio.NewRingBuffer(buff[:])
1264
1265	body := io.TeeReader(errorBody, ringBuffer)
1266	decoder := json.NewDecoder(body)
1267	decoder.UseNumber()
1268	code, message, err := restjson.GetErrorInfo(decoder)
1269	if err != nil {
1270		var snapshot bytes.Buffer
1271		io.Copy(&snapshot, ringBuffer)
1272		err = &smithy.DeserializationError{
1273			Err:      fmt.Errorf("failed to decode response body, %w", err),
1274			Snapshot: snapshot.Bytes(),
1275		}
1276		return err
1277	}
1278
1279	errorBody.Seek(0, io.SeekStart)
1280	if len(code) != 0 {
1281		errorCode = restjson.SanitizeErrorCode(code)
1282	}
1283	if len(message) != 0 {
1284		errorMessage = message
1285	}
1286
1287	switch {
1288	case strings.EqualFold("InternalException", errorCode):
1289		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1290
1291	case strings.EqualFold("InvalidInputException", errorCode):
1292		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1293
1294	default:
1295		genericError := &smithy.GenericAPIError{
1296			Code:    errorCode,
1297			Message: errorMessage,
1298		}
1299		return genericError
1300
1301	}
1302}
1303
1304type awsAwsjson11_deserializeOpDescribeCrossAccountAccessRole struct {
1305}
1306
1307func (*awsAwsjson11_deserializeOpDescribeCrossAccountAccessRole) ID() string {
1308	return "OperationDeserializer"
1309}
1310
1311func (m *awsAwsjson11_deserializeOpDescribeCrossAccountAccessRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1312	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1313) {
1314	out, metadata, err = next.HandleDeserialize(ctx, in)
1315	if err != nil {
1316		return out, metadata, err
1317	}
1318
1319	response, ok := out.RawResponse.(*smithyhttp.Response)
1320	if !ok {
1321		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1322	}
1323
1324	if response.StatusCode < 200 || response.StatusCode >= 300 {
1325		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCrossAccountAccessRole(response, &metadata)
1326	}
1327	output := &DescribeCrossAccountAccessRoleOutput{}
1328	out.Result = output
1329
1330	var buff [1024]byte
1331	ringBuffer := smithyio.NewRingBuffer(buff[:])
1332
1333	body := io.TeeReader(response.Body, ringBuffer)
1334	decoder := json.NewDecoder(body)
1335	decoder.UseNumber()
1336	var shape interface{}
1337	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1338		var snapshot bytes.Buffer
1339		io.Copy(&snapshot, ringBuffer)
1340		err = &smithy.DeserializationError{
1341			Err:      fmt.Errorf("failed to decode response body, %w", err),
1342			Snapshot: snapshot.Bytes(),
1343		}
1344		return out, metadata, err
1345	}
1346
1347	err = awsAwsjson11_deserializeOpDocumentDescribeCrossAccountAccessRoleOutput(&output, shape)
1348	if err != nil {
1349		var snapshot bytes.Buffer
1350		io.Copy(&snapshot, ringBuffer)
1351		err = &smithy.DeserializationError{
1352			Err:      fmt.Errorf("failed to decode response body, %w", err),
1353			Snapshot: snapshot.Bytes(),
1354		}
1355		return out, metadata, err
1356	}
1357
1358	return out, metadata, err
1359}
1360
1361func awsAwsjson11_deserializeOpErrorDescribeCrossAccountAccessRole(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1362	var errorBuffer bytes.Buffer
1363	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1364		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1365	}
1366	errorBody := bytes.NewReader(errorBuffer.Bytes())
1367
1368	errorCode := "UnknownError"
1369	errorMessage := errorCode
1370
1371	code := response.Header.Get("X-Amzn-ErrorType")
1372	if len(code) != 0 {
1373		errorCode = restjson.SanitizeErrorCode(code)
1374	}
1375
1376	var buff [1024]byte
1377	ringBuffer := smithyio.NewRingBuffer(buff[:])
1378
1379	body := io.TeeReader(errorBody, ringBuffer)
1380	decoder := json.NewDecoder(body)
1381	decoder.UseNumber()
1382	code, message, err := restjson.GetErrorInfo(decoder)
1383	if err != nil {
1384		var snapshot bytes.Buffer
1385		io.Copy(&snapshot, ringBuffer)
1386		err = &smithy.DeserializationError{
1387			Err:      fmt.Errorf("failed to decode response body, %w", err),
1388			Snapshot: snapshot.Bytes(),
1389		}
1390		return err
1391	}
1392
1393	errorBody.Seek(0, io.SeekStart)
1394	if len(code) != 0 {
1395		errorCode = restjson.SanitizeErrorCode(code)
1396	}
1397	if len(message) != 0 {
1398		errorMessage = message
1399	}
1400
1401	switch {
1402	case strings.EqualFold("InternalException", errorCode):
1403		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1404
1405	default:
1406		genericError := &smithy.GenericAPIError{
1407			Code:    errorCode,
1408			Message: errorMessage,
1409		}
1410		return genericError
1411
1412	}
1413}
1414
1415type awsAwsjson11_deserializeOpDescribeExclusions struct {
1416}
1417
1418func (*awsAwsjson11_deserializeOpDescribeExclusions) ID() string {
1419	return "OperationDeserializer"
1420}
1421
1422func (m *awsAwsjson11_deserializeOpDescribeExclusions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1423	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1424) {
1425	out, metadata, err = next.HandleDeserialize(ctx, in)
1426	if err != nil {
1427		return out, metadata, err
1428	}
1429
1430	response, ok := out.RawResponse.(*smithyhttp.Response)
1431	if !ok {
1432		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1433	}
1434
1435	if response.StatusCode < 200 || response.StatusCode >= 300 {
1436		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeExclusions(response, &metadata)
1437	}
1438	output := &DescribeExclusionsOutput{}
1439	out.Result = output
1440
1441	var buff [1024]byte
1442	ringBuffer := smithyio.NewRingBuffer(buff[:])
1443
1444	body := io.TeeReader(response.Body, ringBuffer)
1445	decoder := json.NewDecoder(body)
1446	decoder.UseNumber()
1447	var shape interface{}
1448	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1449		var snapshot bytes.Buffer
1450		io.Copy(&snapshot, ringBuffer)
1451		err = &smithy.DeserializationError{
1452			Err:      fmt.Errorf("failed to decode response body, %w", err),
1453			Snapshot: snapshot.Bytes(),
1454		}
1455		return out, metadata, err
1456	}
1457
1458	err = awsAwsjson11_deserializeOpDocumentDescribeExclusionsOutput(&output, shape)
1459	if err != nil {
1460		var snapshot bytes.Buffer
1461		io.Copy(&snapshot, ringBuffer)
1462		err = &smithy.DeserializationError{
1463			Err:      fmt.Errorf("failed to decode response body, %w", err),
1464			Snapshot: snapshot.Bytes(),
1465		}
1466		return out, metadata, err
1467	}
1468
1469	return out, metadata, err
1470}
1471
1472func awsAwsjson11_deserializeOpErrorDescribeExclusions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1473	var errorBuffer bytes.Buffer
1474	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1475		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1476	}
1477	errorBody := bytes.NewReader(errorBuffer.Bytes())
1478
1479	errorCode := "UnknownError"
1480	errorMessage := errorCode
1481
1482	code := response.Header.Get("X-Amzn-ErrorType")
1483	if len(code) != 0 {
1484		errorCode = restjson.SanitizeErrorCode(code)
1485	}
1486
1487	var buff [1024]byte
1488	ringBuffer := smithyio.NewRingBuffer(buff[:])
1489
1490	body := io.TeeReader(errorBody, ringBuffer)
1491	decoder := json.NewDecoder(body)
1492	decoder.UseNumber()
1493	code, message, err := restjson.GetErrorInfo(decoder)
1494	if err != nil {
1495		var snapshot bytes.Buffer
1496		io.Copy(&snapshot, ringBuffer)
1497		err = &smithy.DeserializationError{
1498			Err:      fmt.Errorf("failed to decode response body, %w", err),
1499			Snapshot: snapshot.Bytes(),
1500		}
1501		return err
1502	}
1503
1504	errorBody.Seek(0, io.SeekStart)
1505	if len(code) != 0 {
1506		errorCode = restjson.SanitizeErrorCode(code)
1507	}
1508	if len(message) != 0 {
1509		errorMessage = message
1510	}
1511
1512	switch {
1513	case strings.EqualFold("InternalException", errorCode):
1514		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1515
1516	case strings.EqualFold("InvalidInputException", errorCode):
1517		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1518
1519	default:
1520		genericError := &smithy.GenericAPIError{
1521			Code:    errorCode,
1522			Message: errorMessage,
1523		}
1524		return genericError
1525
1526	}
1527}
1528
1529type awsAwsjson11_deserializeOpDescribeFindings struct {
1530}
1531
1532func (*awsAwsjson11_deserializeOpDescribeFindings) ID() string {
1533	return "OperationDeserializer"
1534}
1535
1536func (m *awsAwsjson11_deserializeOpDescribeFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1537	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1538) {
1539	out, metadata, err = next.HandleDeserialize(ctx, in)
1540	if err != nil {
1541		return out, metadata, err
1542	}
1543
1544	response, ok := out.RawResponse.(*smithyhttp.Response)
1545	if !ok {
1546		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1547	}
1548
1549	if response.StatusCode < 200 || response.StatusCode >= 300 {
1550		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFindings(response, &metadata)
1551	}
1552	output := &DescribeFindingsOutput{}
1553	out.Result = output
1554
1555	var buff [1024]byte
1556	ringBuffer := smithyio.NewRingBuffer(buff[:])
1557
1558	body := io.TeeReader(response.Body, ringBuffer)
1559	decoder := json.NewDecoder(body)
1560	decoder.UseNumber()
1561	var shape interface{}
1562	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1563		var snapshot bytes.Buffer
1564		io.Copy(&snapshot, ringBuffer)
1565		err = &smithy.DeserializationError{
1566			Err:      fmt.Errorf("failed to decode response body, %w", err),
1567			Snapshot: snapshot.Bytes(),
1568		}
1569		return out, metadata, err
1570	}
1571
1572	err = awsAwsjson11_deserializeOpDocumentDescribeFindingsOutput(&output, shape)
1573	if err != nil {
1574		var snapshot bytes.Buffer
1575		io.Copy(&snapshot, ringBuffer)
1576		err = &smithy.DeserializationError{
1577			Err:      fmt.Errorf("failed to decode response body, %w", err),
1578			Snapshot: snapshot.Bytes(),
1579		}
1580		return out, metadata, err
1581	}
1582
1583	return out, metadata, err
1584}
1585
1586func awsAwsjson11_deserializeOpErrorDescribeFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1587	var errorBuffer bytes.Buffer
1588	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1589		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1590	}
1591	errorBody := bytes.NewReader(errorBuffer.Bytes())
1592
1593	errorCode := "UnknownError"
1594	errorMessage := errorCode
1595
1596	code := response.Header.Get("X-Amzn-ErrorType")
1597	if len(code) != 0 {
1598		errorCode = restjson.SanitizeErrorCode(code)
1599	}
1600
1601	var buff [1024]byte
1602	ringBuffer := smithyio.NewRingBuffer(buff[:])
1603
1604	body := io.TeeReader(errorBody, ringBuffer)
1605	decoder := json.NewDecoder(body)
1606	decoder.UseNumber()
1607	code, message, err := restjson.GetErrorInfo(decoder)
1608	if err != nil {
1609		var snapshot bytes.Buffer
1610		io.Copy(&snapshot, ringBuffer)
1611		err = &smithy.DeserializationError{
1612			Err:      fmt.Errorf("failed to decode response body, %w", err),
1613			Snapshot: snapshot.Bytes(),
1614		}
1615		return err
1616	}
1617
1618	errorBody.Seek(0, io.SeekStart)
1619	if len(code) != 0 {
1620		errorCode = restjson.SanitizeErrorCode(code)
1621	}
1622	if len(message) != 0 {
1623		errorMessage = message
1624	}
1625
1626	switch {
1627	case strings.EqualFold("InternalException", errorCode):
1628		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1629
1630	case strings.EqualFold("InvalidInputException", errorCode):
1631		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1632
1633	default:
1634		genericError := &smithy.GenericAPIError{
1635			Code:    errorCode,
1636			Message: errorMessage,
1637		}
1638		return genericError
1639
1640	}
1641}
1642
1643type awsAwsjson11_deserializeOpDescribeResourceGroups struct {
1644}
1645
1646func (*awsAwsjson11_deserializeOpDescribeResourceGroups) ID() string {
1647	return "OperationDeserializer"
1648}
1649
1650func (m *awsAwsjson11_deserializeOpDescribeResourceGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1651	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1652) {
1653	out, metadata, err = next.HandleDeserialize(ctx, in)
1654	if err != nil {
1655		return out, metadata, err
1656	}
1657
1658	response, ok := out.RawResponse.(*smithyhttp.Response)
1659	if !ok {
1660		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1661	}
1662
1663	if response.StatusCode < 200 || response.StatusCode >= 300 {
1664		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResourceGroups(response, &metadata)
1665	}
1666	output := &DescribeResourceGroupsOutput{}
1667	out.Result = output
1668
1669	var buff [1024]byte
1670	ringBuffer := smithyio.NewRingBuffer(buff[:])
1671
1672	body := io.TeeReader(response.Body, ringBuffer)
1673	decoder := json.NewDecoder(body)
1674	decoder.UseNumber()
1675	var shape interface{}
1676	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1677		var snapshot bytes.Buffer
1678		io.Copy(&snapshot, ringBuffer)
1679		err = &smithy.DeserializationError{
1680			Err:      fmt.Errorf("failed to decode response body, %w", err),
1681			Snapshot: snapshot.Bytes(),
1682		}
1683		return out, metadata, err
1684	}
1685
1686	err = awsAwsjson11_deserializeOpDocumentDescribeResourceGroupsOutput(&output, shape)
1687	if err != nil {
1688		var snapshot bytes.Buffer
1689		io.Copy(&snapshot, ringBuffer)
1690		err = &smithy.DeserializationError{
1691			Err:      fmt.Errorf("failed to decode response body, %w", err),
1692			Snapshot: snapshot.Bytes(),
1693		}
1694		return out, metadata, err
1695	}
1696
1697	return out, metadata, err
1698}
1699
1700func awsAwsjson11_deserializeOpErrorDescribeResourceGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1701	var errorBuffer bytes.Buffer
1702	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1703		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1704	}
1705	errorBody := bytes.NewReader(errorBuffer.Bytes())
1706
1707	errorCode := "UnknownError"
1708	errorMessage := errorCode
1709
1710	code := response.Header.Get("X-Amzn-ErrorType")
1711	if len(code) != 0 {
1712		errorCode = restjson.SanitizeErrorCode(code)
1713	}
1714
1715	var buff [1024]byte
1716	ringBuffer := smithyio.NewRingBuffer(buff[:])
1717
1718	body := io.TeeReader(errorBody, ringBuffer)
1719	decoder := json.NewDecoder(body)
1720	decoder.UseNumber()
1721	code, message, err := restjson.GetErrorInfo(decoder)
1722	if err != nil {
1723		var snapshot bytes.Buffer
1724		io.Copy(&snapshot, ringBuffer)
1725		err = &smithy.DeserializationError{
1726			Err:      fmt.Errorf("failed to decode response body, %w", err),
1727			Snapshot: snapshot.Bytes(),
1728		}
1729		return err
1730	}
1731
1732	errorBody.Seek(0, io.SeekStart)
1733	if len(code) != 0 {
1734		errorCode = restjson.SanitizeErrorCode(code)
1735	}
1736	if len(message) != 0 {
1737		errorMessage = message
1738	}
1739
1740	switch {
1741	case strings.EqualFold("InternalException", errorCode):
1742		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1743
1744	case strings.EqualFold("InvalidInputException", errorCode):
1745		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1746
1747	default:
1748		genericError := &smithy.GenericAPIError{
1749			Code:    errorCode,
1750			Message: errorMessage,
1751		}
1752		return genericError
1753
1754	}
1755}
1756
1757type awsAwsjson11_deserializeOpDescribeRulesPackages struct {
1758}
1759
1760func (*awsAwsjson11_deserializeOpDescribeRulesPackages) ID() string {
1761	return "OperationDeserializer"
1762}
1763
1764func (m *awsAwsjson11_deserializeOpDescribeRulesPackages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1765	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1766) {
1767	out, metadata, err = next.HandleDeserialize(ctx, in)
1768	if err != nil {
1769		return out, metadata, err
1770	}
1771
1772	response, ok := out.RawResponse.(*smithyhttp.Response)
1773	if !ok {
1774		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1775	}
1776
1777	if response.StatusCode < 200 || response.StatusCode >= 300 {
1778		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRulesPackages(response, &metadata)
1779	}
1780	output := &DescribeRulesPackagesOutput{}
1781	out.Result = output
1782
1783	var buff [1024]byte
1784	ringBuffer := smithyio.NewRingBuffer(buff[:])
1785
1786	body := io.TeeReader(response.Body, ringBuffer)
1787	decoder := json.NewDecoder(body)
1788	decoder.UseNumber()
1789	var shape interface{}
1790	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1791		var snapshot bytes.Buffer
1792		io.Copy(&snapshot, ringBuffer)
1793		err = &smithy.DeserializationError{
1794			Err:      fmt.Errorf("failed to decode response body, %w", err),
1795			Snapshot: snapshot.Bytes(),
1796		}
1797		return out, metadata, err
1798	}
1799
1800	err = awsAwsjson11_deserializeOpDocumentDescribeRulesPackagesOutput(&output, shape)
1801	if err != nil {
1802		var snapshot bytes.Buffer
1803		io.Copy(&snapshot, ringBuffer)
1804		err = &smithy.DeserializationError{
1805			Err:      fmt.Errorf("failed to decode response body, %w", err),
1806			Snapshot: snapshot.Bytes(),
1807		}
1808		return out, metadata, err
1809	}
1810
1811	return out, metadata, err
1812}
1813
1814func awsAwsjson11_deserializeOpErrorDescribeRulesPackages(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1815	var errorBuffer bytes.Buffer
1816	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1817		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1818	}
1819	errorBody := bytes.NewReader(errorBuffer.Bytes())
1820
1821	errorCode := "UnknownError"
1822	errorMessage := errorCode
1823
1824	code := response.Header.Get("X-Amzn-ErrorType")
1825	if len(code) != 0 {
1826		errorCode = restjson.SanitizeErrorCode(code)
1827	}
1828
1829	var buff [1024]byte
1830	ringBuffer := smithyio.NewRingBuffer(buff[:])
1831
1832	body := io.TeeReader(errorBody, ringBuffer)
1833	decoder := json.NewDecoder(body)
1834	decoder.UseNumber()
1835	code, message, err := restjson.GetErrorInfo(decoder)
1836	if err != nil {
1837		var snapshot bytes.Buffer
1838		io.Copy(&snapshot, ringBuffer)
1839		err = &smithy.DeserializationError{
1840			Err:      fmt.Errorf("failed to decode response body, %w", err),
1841			Snapshot: snapshot.Bytes(),
1842		}
1843		return err
1844	}
1845
1846	errorBody.Seek(0, io.SeekStart)
1847	if len(code) != 0 {
1848		errorCode = restjson.SanitizeErrorCode(code)
1849	}
1850	if len(message) != 0 {
1851		errorMessage = message
1852	}
1853
1854	switch {
1855	case strings.EqualFold("InternalException", errorCode):
1856		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1857
1858	case strings.EqualFold("InvalidInputException", errorCode):
1859		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1860
1861	default:
1862		genericError := &smithy.GenericAPIError{
1863			Code:    errorCode,
1864			Message: errorMessage,
1865		}
1866		return genericError
1867
1868	}
1869}
1870
1871type awsAwsjson11_deserializeOpGetAssessmentReport struct {
1872}
1873
1874func (*awsAwsjson11_deserializeOpGetAssessmentReport) ID() string {
1875	return "OperationDeserializer"
1876}
1877
1878func (m *awsAwsjson11_deserializeOpGetAssessmentReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1879	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1880) {
1881	out, metadata, err = next.HandleDeserialize(ctx, in)
1882	if err != nil {
1883		return out, metadata, err
1884	}
1885
1886	response, ok := out.RawResponse.(*smithyhttp.Response)
1887	if !ok {
1888		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1889	}
1890
1891	if response.StatusCode < 200 || response.StatusCode >= 300 {
1892		return out, metadata, awsAwsjson11_deserializeOpErrorGetAssessmentReport(response, &metadata)
1893	}
1894	output := &GetAssessmentReportOutput{}
1895	out.Result = output
1896
1897	var buff [1024]byte
1898	ringBuffer := smithyio.NewRingBuffer(buff[:])
1899
1900	body := io.TeeReader(response.Body, ringBuffer)
1901	decoder := json.NewDecoder(body)
1902	decoder.UseNumber()
1903	var shape interface{}
1904	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1905		var snapshot bytes.Buffer
1906		io.Copy(&snapshot, ringBuffer)
1907		err = &smithy.DeserializationError{
1908			Err:      fmt.Errorf("failed to decode response body, %w", err),
1909			Snapshot: snapshot.Bytes(),
1910		}
1911		return out, metadata, err
1912	}
1913
1914	err = awsAwsjson11_deserializeOpDocumentGetAssessmentReportOutput(&output, shape)
1915	if err != nil {
1916		var snapshot bytes.Buffer
1917		io.Copy(&snapshot, ringBuffer)
1918		err = &smithy.DeserializationError{
1919			Err:      fmt.Errorf("failed to decode response body, %w", err),
1920			Snapshot: snapshot.Bytes(),
1921		}
1922		return out, metadata, err
1923	}
1924
1925	return out, metadata, err
1926}
1927
1928func awsAwsjson11_deserializeOpErrorGetAssessmentReport(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1929	var errorBuffer bytes.Buffer
1930	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1931		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1932	}
1933	errorBody := bytes.NewReader(errorBuffer.Bytes())
1934
1935	errorCode := "UnknownError"
1936	errorMessage := errorCode
1937
1938	code := response.Header.Get("X-Amzn-ErrorType")
1939	if len(code) != 0 {
1940		errorCode = restjson.SanitizeErrorCode(code)
1941	}
1942
1943	var buff [1024]byte
1944	ringBuffer := smithyio.NewRingBuffer(buff[:])
1945
1946	body := io.TeeReader(errorBody, ringBuffer)
1947	decoder := json.NewDecoder(body)
1948	decoder.UseNumber()
1949	code, message, err := restjson.GetErrorInfo(decoder)
1950	if err != nil {
1951		var snapshot bytes.Buffer
1952		io.Copy(&snapshot, ringBuffer)
1953		err = &smithy.DeserializationError{
1954			Err:      fmt.Errorf("failed to decode response body, %w", err),
1955			Snapshot: snapshot.Bytes(),
1956		}
1957		return err
1958	}
1959
1960	errorBody.Seek(0, io.SeekStart)
1961	if len(code) != 0 {
1962		errorCode = restjson.SanitizeErrorCode(code)
1963	}
1964	if len(message) != 0 {
1965		errorMessage = message
1966	}
1967
1968	switch {
1969	case strings.EqualFold("AccessDeniedException", errorCode):
1970		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
1971
1972	case strings.EqualFold("AssessmentRunInProgressException", errorCode):
1973		return awsAwsjson11_deserializeErrorAssessmentRunInProgressException(response, errorBody)
1974
1975	case strings.EqualFold("InternalException", errorCode):
1976		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
1977
1978	case strings.EqualFold("InvalidInputException", errorCode):
1979		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
1980
1981	case strings.EqualFold("NoSuchEntityException", errorCode):
1982		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
1983
1984	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
1985		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
1986
1987	case strings.EqualFold("UnsupportedFeatureException", errorCode):
1988		return awsAwsjson11_deserializeErrorUnsupportedFeatureException(response, errorBody)
1989
1990	default:
1991		genericError := &smithy.GenericAPIError{
1992			Code:    errorCode,
1993			Message: errorMessage,
1994		}
1995		return genericError
1996
1997	}
1998}
1999
2000type awsAwsjson11_deserializeOpGetExclusionsPreview struct {
2001}
2002
2003func (*awsAwsjson11_deserializeOpGetExclusionsPreview) ID() string {
2004	return "OperationDeserializer"
2005}
2006
2007func (m *awsAwsjson11_deserializeOpGetExclusionsPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2008	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2009) {
2010	out, metadata, err = next.HandleDeserialize(ctx, in)
2011	if err != nil {
2012		return out, metadata, err
2013	}
2014
2015	response, ok := out.RawResponse.(*smithyhttp.Response)
2016	if !ok {
2017		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2018	}
2019
2020	if response.StatusCode < 200 || response.StatusCode >= 300 {
2021		return out, metadata, awsAwsjson11_deserializeOpErrorGetExclusionsPreview(response, &metadata)
2022	}
2023	output := &GetExclusionsPreviewOutput{}
2024	out.Result = output
2025
2026	var buff [1024]byte
2027	ringBuffer := smithyio.NewRingBuffer(buff[:])
2028
2029	body := io.TeeReader(response.Body, ringBuffer)
2030	decoder := json.NewDecoder(body)
2031	decoder.UseNumber()
2032	var shape interface{}
2033	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2034		var snapshot bytes.Buffer
2035		io.Copy(&snapshot, ringBuffer)
2036		err = &smithy.DeserializationError{
2037			Err:      fmt.Errorf("failed to decode response body, %w", err),
2038			Snapshot: snapshot.Bytes(),
2039		}
2040		return out, metadata, err
2041	}
2042
2043	err = awsAwsjson11_deserializeOpDocumentGetExclusionsPreviewOutput(&output, shape)
2044	if err != nil {
2045		var snapshot bytes.Buffer
2046		io.Copy(&snapshot, ringBuffer)
2047		err = &smithy.DeserializationError{
2048			Err:      fmt.Errorf("failed to decode response body, %w", err),
2049			Snapshot: snapshot.Bytes(),
2050		}
2051		return out, metadata, err
2052	}
2053
2054	return out, metadata, err
2055}
2056
2057func awsAwsjson11_deserializeOpErrorGetExclusionsPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2058	var errorBuffer bytes.Buffer
2059	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2060		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2061	}
2062	errorBody := bytes.NewReader(errorBuffer.Bytes())
2063
2064	errorCode := "UnknownError"
2065	errorMessage := errorCode
2066
2067	code := response.Header.Get("X-Amzn-ErrorType")
2068	if len(code) != 0 {
2069		errorCode = restjson.SanitizeErrorCode(code)
2070	}
2071
2072	var buff [1024]byte
2073	ringBuffer := smithyio.NewRingBuffer(buff[:])
2074
2075	body := io.TeeReader(errorBody, ringBuffer)
2076	decoder := json.NewDecoder(body)
2077	decoder.UseNumber()
2078	code, message, err := restjson.GetErrorInfo(decoder)
2079	if err != nil {
2080		var snapshot bytes.Buffer
2081		io.Copy(&snapshot, ringBuffer)
2082		err = &smithy.DeserializationError{
2083			Err:      fmt.Errorf("failed to decode response body, %w", err),
2084			Snapshot: snapshot.Bytes(),
2085		}
2086		return err
2087	}
2088
2089	errorBody.Seek(0, io.SeekStart)
2090	if len(code) != 0 {
2091		errorCode = restjson.SanitizeErrorCode(code)
2092	}
2093	if len(message) != 0 {
2094		errorMessage = message
2095	}
2096
2097	switch {
2098	case strings.EqualFold("AccessDeniedException", errorCode):
2099		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2100
2101	case strings.EqualFold("InternalException", errorCode):
2102		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2103
2104	case strings.EqualFold("InvalidInputException", errorCode):
2105		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2106
2107	case strings.EqualFold("NoSuchEntityException", errorCode):
2108		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2109
2110	default:
2111		genericError := &smithy.GenericAPIError{
2112			Code:    errorCode,
2113			Message: errorMessage,
2114		}
2115		return genericError
2116
2117	}
2118}
2119
2120type awsAwsjson11_deserializeOpGetTelemetryMetadata struct {
2121}
2122
2123func (*awsAwsjson11_deserializeOpGetTelemetryMetadata) ID() string {
2124	return "OperationDeserializer"
2125}
2126
2127func (m *awsAwsjson11_deserializeOpGetTelemetryMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2128	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2129) {
2130	out, metadata, err = next.HandleDeserialize(ctx, in)
2131	if err != nil {
2132		return out, metadata, err
2133	}
2134
2135	response, ok := out.RawResponse.(*smithyhttp.Response)
2136	if !ok {
2137		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2138	}
2139
2140	if response.StatusCode < 200 || response.StatusCode >= 300 {
2141		return out, metadata, awsAwsjson11_deserializeOpErrorGetTelemetryMetadata(response, &metadata)
2142	}
2143	output := &GetTelemetryMetadataOutput{}
2144	out.Result = output
2145
2146	var buff [1024]byte
2147	ringBuffer := smithyio.NewRingBuffer(buff[:])
2148
2149	body := io.TeeReader(response.Body, ringBuffer)
2150	decoder := json.NewDecoder(body)
2151	decoder.UseNumber()
2152	var shape interface{}
2153	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2154		var snapshot bytes.Buffer
2155		io.Copy(&snapshot, ringBuffer)
2156		err = &smithy.DeserializationError{
2157			Err:      fmt.Errorf("failed to decode response body, %w", err),
2158			Snapshot: snapshot.Bytes(),
2159		}
2160		return out, metadata, err
2161	}
2162
2163	err = awsAwsjson11_deserializeOpDocumentGetTelemetryMetadataOutput(&output, shape)
2164	if err != nil {
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	return out, metadata, err
2175}
2176
2177func awsAwsjson11_deserializeOpErrorGetTelemetryMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2178	var errorBuffer bytes.Buffer
2179	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2180		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2181	}
2182	errorBody := bytes.NewReader(errorBuffer.Bytes())
2183
2184	errorCode := "UnknownError"
2185	errorMessage := errorCode
2186
2187	code := response.Header.Get("X-Amzn-ErrorType")
2188	if len(code) != 0 {
2189		errorCode = restjson.SanitizeErrorCode(code)
2190	}
2191
2192	var buff [1024]byte
2193	ringBuffer := smithyio.NewRingBuffer(buff[:])
2194
2195	body := io.TeeReader(errorBody, ringBuffer)
2196	decoder := json.NewDecoder(body)
2197	decoder.UseNumber()
2198	code, message, err := restjson.GetErrorInfo(decoder)
2199	if err != nil {
2200		var snapshot bytes.Buffer
2201		io.Copy(&snapshot, ringBuffer)
2202		err = &smithy.DeserializationError{
2203			Err:      fmt.Errorf("failed to decode response body, %w", err),
2204			Snapshot: snapshot.Bytes(),
2205		}
2206		return err
2207	}
2208
2209	errorBody.Seek(0, io.SeekStart)
2210	if len(code) != 0 {
2211		errorCode = restjson.SanitizeErrorCode(code)
2212	}
2213	if len(message) != 0 {
2214		errorMessage = message
2215	}
2216
2217	switch {
2218	case strings.EqualFold("AccessDeniedException", errorCode):
2219		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2220
2221	case strings.EqualFold("InternalException", errorCode):
2222		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2223
2224	case strings.EqualFold("InvalidInputException", errorCode):
2225		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2226
2227	case strings.EqualFold("NoSuchEntityException", errorCode):
2228		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2229
2230	default:
2231		genericError := &smithy.GenericAPIError{
2232			Code:    errorCode,
2233			Message: errorMessage,
2234		}
2235		return genericError
2236
2237	}
2238}
2239
2240type awsAwsjson11_deserializeOpListAssessmentRunAgents struct {
2241}
2242
2243func (*awsAwsjson11_deserializeOpListAssessmentRunAgents) ID() string {
2244	return "OperationDeserializer"
2245}
2246
2247func (m *awsAwsjson11_deserializeOpListAssessmentRunAgents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2248	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2249) {
2250	out, metadata, err = next.HandleDeserialize(ctx, in)
2251	if err != nil {
2252		return out, metadata, err
2253	}
2254
2255	response, ok := out.RawResponse.(*smithyhttp.Response)
2256	if !ok {
2257		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2258	}
2259
2260	if response.StatusCode < 200 || response.StatusCode >= 300 {
2261		return out, metadata, awsAwsjson11_deserializeOpErrorListAssessmentRunAgents(response, &metadata)
2262	}
2263	output := &ListAssessmentRunAgentsOutput{}
2264	out.Result = output
2265
2266	var buff [1024]byte
2267	ringBuffer := smithyio.NewRingBuffer(buff[:])
2268
2269	body := io.TeeReader(response.Body, ringBuffer)
2270	decoder := json.NewDecoder(body)
2271	decoder.UseNumber()
2272	var shape interface{}
2273	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2274		var snapshot bytes.Buffer
2275		io.Copy(&snapshot, ringBuffer)
2276		err = &smithy.DeserializationError{
2277			Err:      fmt.Errorf("failed to decode response body, %w", err),
2278			Snapshot: snapshot.Bytes(),
2279		}
2280		return out, metadata, err
2281	}
2282
2283	err = awsAwsjson11_deserializeOpDocumentListAssessmentRunAgentsOutput(&output, shape)
2284	if err != nil {
2285		var snapshot bytes.Buffer
2286		io.Copy(&snapshot, ringBuffer)
2287		err = &smithy.DeserializationError{
2288			Err:      fmt.Errorf("failed to decode response body, %w", err),
2289			Snapshot: snapshot.Bytes(),
2290		}
2291		return out, metadata, err
2292	}
2293
2294	return out, metadata, err
2295}
2296
2297func awsAwsjson11_deserializeOpErrorListAssessmentRunAgents(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2298	var errorBuffer bytes.Buffer
2299	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2300		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2301	}
2302	errorBody := bytes.NewReader(errorBuffer.Bytes())
2303
2304	errorCode := "UnknownError"
2305	errorMessage := errorCode
2306
2307	code := response.Header.Get("X-Amzn-ErrorType")
2308	if len(code) != 0 {
2309		errorCode = restjson.SanitizeErrorCode(code)
2310	}
2311
2312	var buff [1024]byte
2313	ringBuffer := smithyio.NewRingBuffer(buff[:])
2314
2315	body := io.TeeReader(errorBody, ringBuffer)
2316	decoder := json.NewDecoder(body)
2317	decoder.UseNumber()
2318	code, message, err := restjson.GetErrorInfo(decoder)
2319	if err != nil {
2320		var snapshot bytes.Buffer
2321		io.Copy(&snapshot, ringBuffer)
2322		err = &smithy.DeserializationError{
2323			Err:      fmt.Errorf("failed to decode response body, %w", err),
2324			Snapshot: snapshot.Bytes(),
2325		}
2326		return err
2327	}
2328
2329	errorBody.Seek(0, io.SeekStart)
2330	if len(code) != 0 {
2331		errorCode = restjson.SanitizeErrorCode(code)
2332	}
2333	if len(message) != 0 {
2334		errorMessage = message
2335	}
2336
2337	switch {
2338	case strings.EqualFold("AccessDeniedException", errorCode):
2339		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2340
2341	case strings.EqualFold("InternalException", errorCode):
2342		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2343
2344	case strings.EqualFold("InvalidInputException", errorCode):
2345		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2346
2347	case strings.EqualFold("NoSuchEntityException", errorCode):
2348		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2349
2350	default:
2351		genericError := &smithy.GenericAPIError{
2352			Code:    errorCode,
2353			Message: errorMessage,
2354		}
2355		return genericError
2356
2357	}
2358}
2359
2360type awsAwsjson11_deserializeOpListAssessmentRuns struct {
2361}
2362
2363func (*awsAwsjson11_deserializeOpListAssessmentRuns) ID() string {
2364	return "OperationDeserializer"
2365}
2366
2367func (m *awsAwsjson11_deserializeOpListAssessmentRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2368	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2369) {
2370	out, metadata, err = next.HandleDeserialize(ctx, in)
2371	if err != nil {
2372		return out, metadata, err
2373	}
2374
2375	response, ok := out.RawResponse.(*smithyhttp.Response)
2376	if !ok {
2377		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2378	}
2379
2380	if response.StatusCode < 200 || response.StatusCode >= 300 {
2381		return out, metadata, awsAwsjson11_deserializeOpErrorListAssessmentRuns(response, &metadata)
2382	}
2383	output := &ListAssessmentRunsOutput{}
2384	out.Result = output
2385
2386	var buff [1024]byte
2387	ringBuffer := smithyio.NewRingBuffer(buff[:])
2388
2389	body := io.TeeReader(response.Body, ringBuffer)
2390	decoder := json.NewDecoder(body)
2391	decoder.UseNumber()
2392	var shape interface{}
2393	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2394		var snapshot bytes.Buffer
2395		io.Copy(&snapshot, ringBuffer)
2396		err = &smithy.DeserializationError{
2397			Err:      fmt.Errorf("failed to decode response body, %w", err),
2398			Snapshot: snapshot.Bytes(),
2399		}
2400		return out, metadata, err
2401	}
2402
2403	err = awsAwsjson11_deserializeOpDocumentListAssessmentRunsOutput(&output, shape)
2404	if err != nil {
2405		var snapshot bytes.Buffer
2406		io.Copy(&snapshot, ringBuffer)
2407		err = &smithy.DeserializationError{
2408			Err:      fmt.Errorf("failed to decode response body, %w", err),
2409			Snapshot: snapshot.Bytes(),
2410		}
2411		return out, metadata, err
2412	}
2413
2414	return out, metadata, err
2415}
2416
2417func awsAwsjson11_deserializeOpErrorListAssessmentRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2418	var errorBuffer bytes.Buffer
2419	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2420		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2421	}
2422	errorBody := bytes.NewReader(errorBuffer.Bytes())
2423
2424	errorCode := "UnknownError"
2425	errorMessage := errorCode
2426
2427	code := response.Header.Get("X-Amzn-ErrorType")
2428	if len(code) != 0 {
2429		errorCode = restjson.SanitizeErrorCode(code)
2430	}
2431
2432	var buff [1024]byte
2433	ringBuffer := smithyio.NewRingBuffer(buff[:])
2434
2435	body := io.TeeReader(errorBody, ringBuffer)
2436	decoder := json.NewDecoder(body)
2437	decoder.UseNumber()
2438	code, message, err := restjson.GetErrorInfo(decoder)
2439	if err != nil {
2440		var snapshot bytes.Buffer
2441		io.Copy(&snapshot, ringBuffer)
2442		err = &smithy.DeserializationError{
2443			Err:      fmt.Errorf("failed to decode response body, %w", err),
2444			Snapshot: snapshot.Bytes(),
2445		}
2446		return err
2447	}
2448
2449	errorBody.Seek(0, io.SeekStart)
2450	if len(code) != 0 {
2451		errorCode = restjson.SanitizeErrorCode(code)
2452	}
2453	if len(message) != 0 {
2454		errorMessage = message
2455	}
2456
2457	switch {
2458	case strings.EqualFold("AccessDeniedException", errorCode):
2459		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2460
2461	case strings.EqualFold("InternalException", errorCode):
2462		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2463
2464	case strings.EqualFold("InvalidInputException", errorCode):
2465		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2466
2467	case strings.EqualFold("NoSuchEntityException", errorCode):
2468		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2469
2470	default:
2471		genericError := &smithy.GenericAPIError{
2472			Code:    errorCode,
2473			Message: errorMessage,
2474		}
2475		return genericError
2476
2477	}
2478}
2479
2480type awsAwsjson11_deserializeOpListAssessmentTargets struct {
2481}
2482
2483func (*awsAwsjson11_deserializeOpListAssessmentTargets) ID() string {
2484	return "OperationDeserializer"
2485}
2486
2487func (m *awsAwsjson11_deserializeOpListAssessmentTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2488	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2489) {
2490	out, metadata, err = next.HandleDeserialize(ctx, in)
2491	if err != nil {
2492		return out, metadata, err
2493	}
2494
2495	response, ok := out.RawResponse.(*smithyhttp.Response)
2496	if !ok {
2497		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2498	}
2499
2500	if response.StatusCode < 200 || response.StatusCode >= 300 {
2501		return out, metadata, awsAwsjson11_deserializeOpErrorListAssessmentTargets(response, &metadata)
2502	}
2503	output := &ListAssessmentTargetsOutput{}
2504	out.Result = output
2505
2506	var buff [1024]byte
2507	ringBuffer := smithyio.NewRingBuffer(buff[:])
2508
2509	body := io.TeeReader(response.Body, ringBuffer)
2510	decoder := json.NewDecoder(body)
2511	decoder.UseNumber()
2512	var shape interface{}
2513	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2514		var snapshot bytes.Buffer
2515		io.Copy(&snapshot, ringBuffer)
2516		err = &smithy.DeserializationError{
2517			Err:      fmt.Errorf("failed to decode response body, %w", err),
2518			Snapshot: snapshot.Bytes(),
2519		}
2520		return out, metadata, err
2521	}
2522
2523	err = awsAwsjson11_deserializeOpDocumentListAssessmentTargetsOutput(&output, shape)
2524	if err != nil {
2525		var snapshot bytes.Buffer
2526		io.Copy(&snapshot, ringBuffer)
2527		err = &smithy.DeserializationError{
2528			Err:      fmt.Errorf("failed to decode response body, %w", err),
2529			Snapshot: snapshot.Bytes(),
2530		}
2531		return out, metadata, err
2532	}
2533
2534	return out, metadata, err
2535}
2536
2537func awsAwsjson11_deserializeOpErrorListAssessmentTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2538	var errorBuffer bytes.Buffer
2539	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2540		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2541	}
2542	errorBody := bytes.NewReader(errorBuffer.Bytes())
2543
2544	errorCode := "UnknownError"
2545	errorMessage := errorCode
2546
2547	code := response.Header.Get("X-Amzn-ErrorType")
2548	if len(code) != 0 {
2549		errorCode = restjson.SanitizeErrorCode(code)
2550	}
2551
2552	var buff [1024]byte
2553	ringBuffer := smithyio.NewRingBuffer(buff[:])
2554
2555	body := io.TeeReader(errorBody, ringBuffer)
2556	decoder := json.NewDecoder(body)
2557	decoder.UseNumber()
2558	code, message, err := restjson.GetErrorInfo(decoder)
2559	if err != nil {
2560		var snapshot bytes.Buffer
2561		io.Copy(&snapshot, ringBuffer)
2562		err = &smithy.DeserializationError{
2563			Err:      fmt.Errorf("failed to decode response body, %w", err),
2564			Snapshot: snapshot.Bytes(),
2565		}
2566		return err
2567	}
2568
2569	errorBody.Seek(0, io.SeekStart)
2570	if len(code) != 0 {
2571		errorCode = restjson.SanitizeErrorCode(code)
2572	}
2573	if len(message) != 0 {
2574		errorMessage = message
2575	}
2576
2577	switch {
2578	case strings.EqualFold("AccessDeniedException", errorCode):
2579		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2580
2581	case strings.EqualFold("InternalException", errorCode):
2582		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2583
2584	case strings.EqualFold("InvalidInputException", errorCode):
2585		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2586
2587	default:
2588		genericError := &smithy.GenericAPIError{
2589			Code:    errorCode,
2590			Message: errorMessage,
2591		}
2592		return genericError
2593
2594	}
2595}
2596
2597type awsAwsjson11_deserializeOpListAssessmentTemplates struct {
2598}
2599
2600func (*awsAwsjson11_deserializeOpListAssessmentTemplates) ID() string {
2601	return "OperationDeserializer"
2602}
2603
2604func (m *awsAwsjson11_deserializeOpListAssessmentTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2605	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2606) {
2607	out, metadata, err = next.HandleDeserialize(ctx, in)
2608	if err != nil {
2609		return out, metadata, err
2610	}
2611
2612	response, ok := out.RawResponse.(*smithyhttp.Response)
2613	if !ok {
2614		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2615	}
2616
2617	if response.StatusCode < 200 || response.StatusCode >= 300 {
2618		return out, metadata, awsAwsjson11_deserializeOpErrorListAssessmentTemplates(response, &metadata)
2619	}
2620	output := &ListAssessmentTemplatesOutput{}
2621	out.Result = output
2622
2623	var buff [1024]byte
2624	ringBuffer := smithyio.NewRingBuffer(buff[:])
2625
2626	body := io.TeeReader(response.Body, ringBuffer)
2627	decoder := json.NewDecoder(body)
2628	decoder.UseNumber()
2629	var shape interface{}
2630	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2631		var snapshot bytes.Buffer
2632		io.Copy(&snapshot, ringBuffer)
2633		err = &smithy.DeserializationError{
2634			Err:      fmt.Errorf("failed to decode response body, %w", err),
2635			Snapshot: snapshot.Bytes(),
2636		}
2637		return out, metadata, err
2638	}
2639
2640	err = awsAwsjson11_deserializeOpDocumentListAssessmentTemplatesOutput(&output, shape)
2641	if err != nil {
2642		var snapshot bytes.Buffer
2643		io.Copy(&snapshot, ringBuffer)
2644		err = &smithy.DeserializationError{
2645			Err:      fmt.Errorf("failed to decode response body, %w", err),
2646			Snapshot: snapshot.Bytes(),
2647		}
2648		return out, metadata, err
2649	}
2650
2651	return out, metadata, err
2652}
2653
2654func awsAwsjson11_deserializeOpErrorListAssessmentTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2655	var errorBuffer bytes.Buffer
2656	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2657		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2658	}
2659	errorBody := bytes.NewReader(errorBuffer.Bytes())
2660
2661	errorCode := "UnknownError"
2662	errorMessage := errorCode
2663
2664	code := response.Header.Get("X-Amzn-ErrorType")
2665	if len(code) != 0 {
2666		errorCode = restjson.SanitizeErrorCode(code)
2667	}
2668
2669	var buff [1024]byte
2670	ringBuffer := smithyio.NewRingBuffer(buff[:])
2671
2672	body := io.TeeReader(errorBody, ringBuffer)
2673	decoder := json.NewDecoder(body)
2674	decoder.UseNumber()
2675	code, message, err := restjson.GetErrorInfo(decoder)
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 err
2684	}
2685
2686	errorBody.Seek(0, io.SeekStart)
2687	if len(code) != 0 {
2688		errorCode = restjson.SanitizeErrorCode(code)
2689	}
2690	if len(message) != 0 {
2691		errorMessage = message
2692	}
2693
2694	switch {
2695	case strings.EqualFold("AccessDeniedException", errorCode):
2696		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2697
2698	case strings.EqualFold("InternalException", errorCode):
2699		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2700
2701	case strings.EqualFold("InvalidInputException", errorCode):
2702		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2703
2704	case strings.EqualFold("NoSuchEntityException", errorCode):
2705		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2706
2707	default:
2708		genericError := &smithy.GenericAPIError{
2709			Code:    errorCode,
2710			Message: errorMessage,
2711		}
2712		return genericError
2713
2714	}
2715}
2716
2717type awsAwsjson11_deserializeOpListEventSubscriptions struct {
2718}
2719
2720func (*awsAwsjson11_deserializeOpListEventSubscriptions) ID() string {
2721	return "OperationDeserializer"
2722}
2723
2724func (m *awsAwsjson11_deserializeOpListEventSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2725	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2726) {
2727	out, metadata, err = next.HandleDeserialize(ctx, in)
2728	if err != nil {
2729		return out, metadata, err
2730	}
2731
2732	response, ok := out.RawResponse.(*smithyhttp.Response)
2733	if !ok {
2734		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2735	}
2736
2737	if response.StatusCode < 200 || response.StatusCode >= 300 {
2738		return out, metadata, awsAwsjson11_deserializeOpErrorListEventSubscriptions(response, &metadata)
2739	}
2740	output := &ListEventSubscriptionsOutput{}
2741	out.Result = output
2742
2743	var buff [1024]byte
2744	ringBuffer := smithyio.NewRingBuffer(buff[:])
2745
2746	body := io.TeeReader(response.Body, ringBuffer)
2747	decoder := json.NewDecoder(body)
2748	decoder.UseNumber()
2749	var shape interface{}
2750	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2751		var snapshot bytes.Buffer
2752		io.Copy(&snapshot, ringBuffer)
2753		err = &smithy.DeserializationError{
2754			Err:      fmt.Errorf("failed to decode response body, %w", err),
2755			Snapshot: snapshot.Bytes(),
2756		}
2757		return out, metadata, err
2758	}
2759
2760	err = awsAwsjson11_deserializeOpDocumentListEventSubscriptionsOutput(&output, shape)
2761	if err != nil {
2762		var snapshot bytes.Buffer
2763		io.Copy(&snapshot, ringBuffer)
2764		err = &smithy.DeserializationError{
2765			Err:      fmt.Errorf("failed to decode response body, %w", err),
2766			Snapshot: snapshot.Bytes(),
2767		}
2768		return out, metadata, err
2769	}
2770
2771	return out, metadata, err
2772}
2773
2774func awsAwsjson11_deserializeOpErrorListEventSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2775	var errorBuffer bytes.Buffer
2776	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2777		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2778	}
2779	errorBody := bytes.NewReader(errorBuffer.Bytes())
2780
2781	errorCode := "UnknownError"
2782	errorMessage := errorCode
2783
2784	code := response.Header.Get("X-Amzn-ErrorType")
2785	if len(code) != 0 {
2786		errorCode = restjson.SanitizeErrorCode(code)
2787	}
2788
2789	var buff [1024]byte
2790	ringBuffer := smithyio.NewRingBuffer(buff[:])
2791
2792	body := io.TeeReader(errorBody, ringBuffer)
2793	decoder := json.NewDecoder(body)
2794	decoder.UseNumber()
2795	code, message, err := restjson.GetErrorInfo(decoder)
2796	if err != nil {
2797		var snapshot bytes.Buffer
2798		io.Copy(&snapshot, ringBuffer)
2799		err = &smithy.DeserializationError{
2800			Err:      fmt.Errorf("failed to decode response body, %w", err),
2801			Snapshot: snapshot.Bytes(),
2802		}
2803		return err
2804	}
2805
2806	errorBody.Seek(0, io.SeekStart)
2807	if len(code) != 0 {
2808		errorCode = restjson.SanitizeErrorCode(code)
2809	}
2810	if len(message) != 0 {
2811		errorMessage = message
2812	}
2813
2814	switch {
2815	case strings.EqualFold("AccessDeniedException", errorCode):
2816		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2817
2818	case strings.EqualFold("InternalException", errorCode):
2819		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2820
2821	case strings.EqualFold("InvalidInputException", errorCode):
2822		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2823
2824	case strings.EqualFold("NoSuchEntityException", errorCode):
2825		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2826
2827	default:
2828		genericError := &smithy.GenericAPIError{
2829			Code:    errorCode,
2830			Message: errorMessage,
2831		}
2832		return genericError
2833
2834	}
2835}
2836
2837type awsAwsjson11_deserializeOpListExclusions struct {
2838}
2839
2840func (*awsAwsjson11_deserializeOpListExclusions) ID() string {
2841	return "OperationDeserializer"
2842}
2843
2844func (m *awsAwsjson11_deserializeOpListExclusions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2845	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2846) {
2847	out, metadata, err = next.HandleDeserialize(ctx, in)
2848	if err != nil {
2849		return out, metadata, err
2850	}
2851
2852	response, ok := out.RawResponse.(*smithyhttp.Response)
2853	if !ok {
2854		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2855	}
2856
2857	if response.StatusCode < 200 || response.StatusCode >= 300 {
2858		return out, metadata, awsAwsjson11_deserializeOpErrorListExclusions(response, &metadata)
2859	}
2860	output := &ListExclusionsOutput{}
2861	out.Result = output
2862
2863	var buff [1024]byte
2864	ringBuffer := smithyio.NewRingBuffer(buff[:])
2865
2866	body := io.TeeReader(response.Body, ringBuffer)
2867	decoder := json.NewDecoder(body)
2868	decoder.UseNumber()
2869	var shape interface{}
2870	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2871		var snapshot bytes.Buffer
2872		io.Copy(&snapshot, ringBuffer)
2873		err = &smithy.DeserializationError{
2874			Err:      fmt.Errorf("failed to decode response body, %w", err),
2875			Snapshot: snapshot.Bytes(),
2876		}
2877		return out, metadata, err
2878	}
2879
2880	err = awsAwsjson11_deserializeOpDocumentListExclusionsOutput(&output, shape)
2881	if err != nil {
2882		var snapshot bytes.Buffer
2883		io.Copy(&snapshot, ringBuffer)
2884		err = &smithy.DeserializationError{
2885			Err:      fmt.Errorf("failed to decode response body, %w", err),
2886			Snapshot: snapshot.Bytes(),
2887		}
2888		return out, metadata, err
2889	}
2890
2891	return out, metadata, err
2892}
2893
2894func awsAwsjson11_deserializeOpErrorListExclusions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2895	var errorBuffer bytes.Buffer
2896	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2897		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2898	}
2899	errorBody := bytes.NewReader(errorBuffer.Bytes())
2900
2901	errorCode := "UnknownError"
2902	errorMessage := errorCode
2903
2904	code := response.Header.Get("X-Amzn-ErrorType")
2905	if len(code) != 0 {
2906		errorCode = restjson.SanitizeErrorCode(code)
2907	}
2908
2909	var buff [1024]byte
2910	ringBuffer := smithyio.NewRingBuffer(buff[:])
2911
2912	body := io.TeeReader(errorBody, ringBuffer)
2913	decoder := json.NewDecoder(body)
2914	decoder.UseNumber()
2915	code, message, err := restjson.GetErrorInfo(decoder)
2916	if err != nil {
2917		var snapshot bytes.Buffer
2918		io.Copy(&snapshot, ringBuffer)
2919		err = &smithy.DeserializationError{
2920			Err:      fmt.Errorf("failed to decode response body, %w", err),
2921			Snapshot: snapshot.Bytes(),
2922		}
2923		return err
2924	}
2925
2926	errorBody.Seek(0, io.SeekStart)
2927	if len(code) != 0 {
2928		errorCode = restjson.SanitizeErrorCode(code)
2929	}
2930	if len(message) != 0 {
2931		errorMessage = message
2932	}
2933
2934	switch {
2935	case strings.EqualFold("AccessDeniedException", errorCode):
2936		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
2937
2938	case strings.EqualFold("InternalException", errorCode):
2939		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
2940
2941	case strings.EqualFold("InvalidInputException", errorCode):
2942		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
2943
2944	case strings.EqualFold("NoSuchEntityException", errorCode):
2945		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
2946
2947	default:
2948		genericError := &smithy.GenericAPIError{
2949			Code:    errorCode,
2950			Message: errorMessage,
2951		}
2952		return genericError
2953
2954	}
2955}
2956
2957type awsAwsjson11_deserializeOpListFindings struct {
2958}
2959
2960func (*awsAwsjson11_deserializeOpListFindings) ID() string {
2961	return "OperationDeserializer"
2962}
2963
2964func (m *awsAwsjson11_deserializeOpListFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2965	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2966) {
2967	out, metadata, err = next.HandleDeserialize(ctx, in)
2968	if err != nil {
2969		return out, metadata, err
2970	}
2971
2972	response, ok := out.RawResponse.(*smithyhttp.Response)
2973	if !ok {
2974		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2975	}
2976
2977	if response.StatusCode < 200 || response.StatusCode >= 300 {
2978		return out, metadata, awsAwsjson11_deserializeOpErrorListFindings(response, &metadata)
2979	}
2980	output := &ListFindingsOutput{}
2981	out.Result = output
2982
2983	var buff [1024]byte
2984	ringBuffer := smithyio.NewRingBuffer(buff[:])
2985
2986	body := io.TeeReader(response.Body, ringBuffer)
2987	decoder := json.NewDecoder(body)
2988	decoder.UseNumber()
2989	var shape interface{}
2990	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2991		var snapshot bytes.Buffer
2992		io.Copy(&snapshot, ringBuffer)
2993		err = &smithy.DeserializationError{
2994			Err:      fmt.Errorf("failed to decode response body, %w", err),
2995			Snapshot: snapshot.Bytes(),
2996		}
2997		return out, metadata, err
2998	}
2999
3000	err = awsAwsjson11_deserializeOpDocumentListFindingsOutput(&output, shape)
3001	if err != nil {
3002		var snapshot bytes.Buffer
3003		io.Copy(&snapshot, ringBuffer)
3004		err = &smithy.DeserializationError{
3005			Err:      fmt.Errorf("failed to decode response body, %w", err),
3006			Snapshot: snapshot.Bytes(),
3007		}
3008		return out, metadata, err
3009	}
3010
3011	return out, metadata, err
3012}
3013
3014func awsAwsjson11_deserializeOpErrorListFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3015	var errorBuffer bytes.Buffer
3016	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3017		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3018	}
3019	errorBody := bytes.NewReader(errorBuffer.Bytes())
3020
3021	errorCode := "UnknownError"
3022	errorMessage := errorCode
3023
3024	code := response.Header.Get("X-Amzn-ErrorType")
3025	if len(code) != 0 {
3026		errorCode = restjson.SanitizeErrorCode(code)
3027	}
3028
3029	var buff [1024]byte
3030	ringBuffer := smithyio.NewRingBuffer(buff[:])
3031
3032	body := io.TeeReader(errorBody, ringBuffer)
3033	decoder := json.NewDecoder(body)
3034	decoder.UseNumber()
3035	code, message, err := restjson.GetErrorInfo(decoder)
3036	if err != nil {
3037		var snapshot bytes.Buffer
3038		io.Copy(&snapshot, ringBuffer)
3039		err = &smithy.DeserializationError{
3040			Err:      fmt.Errorf("failed to decode response body, %w", err),
3041			Snapshot: snapshot.Bytes(),
3042		}
3043		return err
3044	}
3045
3046	errorBody.Seek(0, io.SeekStart)
3047	if len(code) != 0 {
3048		errorCode = restjson.SanitizeErrorCode(code)
3049	}
3050	if len(message) != 0 {
3051		errorMessage = message
3052	}
3053
3054	switch {
3055	case strings.EqualFold("AccessDeniedException", errorCode):
3056		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3057
3058	case strings.EqualFold("InternalException", errorCode):
3059		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3060
3061	case strings.EqualFold("InvalidInputException", errorCode):
3062		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3063
3064	case strings.EqualFold("NoSuchEntityException", errorCode):
3065		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3066
3067	default:
3068		genericError := &smithy.GenericAPIError{
3069			Code:    errorCode,
3070			Message: errorMessage,
3071		}
3072		return genericError
3073
3074	}
3075}
3076
3077type awsAwsjson11_deserializeOpListRulesPackages struct {
3078}
3079
3080func (*awsAwsjson11_deserializeOpListRulesPackages) ID() string {
3081	return "OperationDeserializer"
3082}
3083
3084func (m *awsAwsjson11_deserializeOpListRulesPackages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3085	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3086) {
3087	out, metadata, err = next.HandleDeserialize(ctx, in)
3088	if err != nil {
3089		return out, metadata, err
3090	}
3091
3092	response, ok := out.RawResponse.(*smithyhttp.Response)
3093	if !ok {
3094		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3095	}
3096
3097	if response.StatusCode < 200 || response.StatusCode >= 300 {
3098		return out, metadata, awsAwsjson11_deserializeOpErrorListRulesPackages(response, &metadata)
3099	}
3100	output := &ListRulesPackagesOutput{}
3101	out.Result = output
3102
3103	var buff [1024]byte
3104	ringBuffer := smithyio.NewRingBuffer(buff[:])
3105
3106	body := io.TeeReader(response.Body, ringBuffer)
3107	decoder := json.NewDecoder(body)
3108	decoder.UseNumber()
3109	var shape interface{}
3110	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3111		var snapshot bytes.Buffer
3112		io.Copy(&snapshot, ringBuffer)
3113		err = &smithy.DeserializationError{
3114			Err:      fmt.Errorf("failed to decode response body, %w", err),
3115			Snapshot: snapshot.Bytes(),
3116		}
3117		return out, metadata, err
3118	}
3119
3120	err = awsAwsjson11_deserializeOpDocumentListRulesPackagesOutput(&output, shape)
3121	if err != nil {
3122		var snapshot bytes.Buffer
3123		io.Copy(&snapshot, ringBuffer)
3124		err = &smithy.DeserializationError{
3125			Err:      fmt.Errorf("failed to decode response body, %w", err),
3126			Snapshot: snapshot.Bytes(),
3127		}
3128		return out, metadata, err
3129	}
3130
3131	return out, metadata, err
3132}
3133
3134func awsAwsjson11_deserializeOpErrorListRulesPackages(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3135	var errorBuffer bytes.Buffer
3136	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3137		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3138	}
3139	errorBody := bytes.NewReader(errorBuffer.Bytes())
3140
3141	errorCode := "UnknownError"
3142	errorMessage := errorCode
3143
3144	code := response.Header.Get("X-Amzn-ErrorType")
3145	if len(code) != 0 {
3146		errorCode = restjson.SanitizeErrorCode(code)
3147	}
3148
3149	var buff [1024]byte
3150	ringBuffer := smithyio.NewRingBuffer(buff[:])
3151
3152	body := io.TeeReader(errorBody, ringBuffer)
3153	decoder := json.NewDecoder(body)
3154	decoder.UseNumber()
3155	code, message, err := restjson.GetErrorInfo(decoder)
3156	if err != nil {
3157		var snapshot bytes.Buffer
3158		io.Copy(&snapshot, ringBuffer)
3159		err = &smithy.DeserializationError{
3160			Err:      fmt.Errorf("failed to decode response body, %w", err),
3161			Snapshot: snapshot.Bytes(),
3162		}
3163		return err
3164	}
3165
3166	errorBody.Seek(0, io.SeekStart)
3167	if len(code) != 0 {
3168		errorCode = restjson.SanitizeErrorCode(code)
3169	}
3170	if len(message) != 0 {
3171		errorMessage = message
3172	}
3173
3174	switch {
3175	case strings.EqualFold("AccessDeniedException", errorCode):
3176		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3177
3178	case strings.EqualFold("InternalException", errorCode):
3179		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3180
3181	case strings.EqualFold("InvalidInputException", errorCode):
3182		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3183
3184	default:
3185		genericError := &smithy.GenericAPIError{
3186			Code:    errorCode,
3187			Message: errorMessage,
3188		}
3189		return genericError
3190
3191	}
3192}
3193
3194type awsAwsjson11_deserializeOpListTagsForResource struct {
3195}
3196
3197func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string {
3198	return "OperationDeserializer"
3199}
3200
3201func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3202	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3203) {
3204	out, metadata, err = next.HandleDeserialize(ctx, in)
3205	if err != nil {
3206		return out, metadata, err
3207	}
3208
3209	response, ok := out.RawResponse.(*smithyhttp.Response)
3210	if !ok {
3211		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3212	}
3213
3214	if response.StatusCode < 200 || response.StatusCode >= 300 {
3215		return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata)
3216	}
3217	output := &ListTagsForResourceOutput{}
3218	out.Result = output
3219
3220	var buff [1024]byte
3221	ringBuffer := smithyio.NewRingBuffer(buff[:])
3222
3223	body := io.TeeReader(response.Body, ringBuffer)
3224	decoder := json.NewDecoder(body)
3225	decoder.UseNumber()
3226	var shape interface{}
3227	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3228		var snapshot bytes.Buffer
3229		io.Copy(&snapshot, ringBuffer)
3230		err = &smithy.DeserializationError{
3231			Err:      fmt.Errorf("failed to decode response body, %w", err),
3232			Snapshot: snapshot.Bytes(),
3233		}
3234		return out, metadata, err
3235	}
3236
3237	err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape)
3238	if err != nil {
3239		var snapshot bytes.Buffer
3240		io.Copy(&snapshot, ringBuffer)
3241		err = &smithy.DeserializationError{
3242			Err:      fmt.Errorf("failed to decode response body, %w", err),
3243			Snapshot: snapshot.Bytes(),
3244		}
3245		return out, metadata, err
3246	}
3247
3248	return out, metadata, err
3249}
3250
3251func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3252	var errorBuffer bytes.Buffer
3253	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3254		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3255	}
3256	errorBody := bytes.NewReader(errorBuffer.Bytes())
3257
3258	errorCode := "UnknownError"
3259	errorMessage := errorCode
3260
3261	code := response.Header.Get("X-Amzn-ErrorType")
3262	if len(code) != 0 {
3263		errorCode = restjson.SanitizeErrorCode(code)
3264	}
3265
3266	var buff [1024]byte
3267	ringBuffer := smithyio.NewRingBuffer(buff[:])
3268
3269	body := io.TeeReader(errorBody, ringBuffer)
3270	decoder := json.NewDecoder(body)
3271	decoder.UseNumber()
3272	code, message, err := restjson.GetErrorInfo(decoder)
3273	if err != nil {
3274		var snapshot bytes.Buffer
3275		io.Copy(&snapshot, ringBuffer)
3276		err = &smithy.DeserializationError{
3277			Err:      fmt.Errorf("failed to decode response body, %w", err),
3278			Snapshot: snapshot.Bytes(),
3279		}
3280		return err
3281	}
3282
3283	errorBody.Seek(0, io.SeekStart)
3284	if len(code) != 0 {
3285		errorCode = restjson.SanitizeErrorCode(code)
3286	}
3287	if len(message) != 0 {
3288		errorMessage = message
3289	}
3290
3291	switch {
3292	case strings.EqualFold("AccessDeniedException", errorCode):
3293		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3294
3295	case strings.EqualFold("InternalException", errorCode):
3296		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3297
3298	case strings.EqualFold("InvalidInputException", errorCode):
3299		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3300
3301	case strings.EqualFold("NoSuchEntityException", errorCode):
3302		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3303
3304	default:
3305		genericError := &smithy.GenericAPIError{
3306			Code:    errorCode,
3307			Message: errorMessage,
3308		}
3309		return genericError
3310
3311	}
3312}
3313
3314type awsAwsjson11_deserializeOpPreviewAgents struct {
3315}
3316
3317func (*awsAwsjson11_deserializeOpPreviewAgents) ID() string {
3318	return "OperationDeserializer"
3319}
3320
3321func (m *awsAwsjson11_deserializeOpPreviewAgents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3322	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3323) {
3324	out, metadata, err = next.HandleDeserialize(ctx, in)
3325	if err != nil {
3326		return out, metadata, err
3327	}
3328
3329	response, ok := out.RawResponse.(*smithyhttp.Response)
3330	if !ok {
3331		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3332	}
3333
3334	if response.StatusCode < 200 || response.StatusCode >= 300 {
3335		return out, metadata, awsAwsjson11_deserializeOpErrorPreviewAgents(response, &metadata)
3336	}
3337	output := &PreviewAgentsOutput{}
3338	out.Result = output
3339
3340	var buff [1024]byte
3341	ringBuffer := smithyio.NewRingBuffer(buff[:])
3342
3343	body := io.TeeReader(response.Body, ringBuffer)
3344	decoder := json.NewDecoder(body)
3345	decoder.UseNumber()
3346	var shape interface{}
3347	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3348		var snapshot bytes.Buffer
3349		io.Copy(&snapshot, ringBuffer)
3350		err = &smithy.DeserializationError{
3351			Err:      fmt.Errorf("failed to decode response body, %w", err),
3352			Snapshot: snapshot.Bytes(),
3353		}
3354		return out, metadata, err
3355	}
3356
3357	err = awsAwsjson11_deserializeOpDocumentPreviewAgentsOutput(&output, shape)
3358	if err != nil {
3359		var snapshot bytes.Buffer
3360		io.Copy(&snapshot, ringBuffer)
3361		err = &smithy.DeserializationError{
3362			Err:      fmt.Errorf("failed to decode response body, %w", err),
3363			Snapshot: snapshot.Bytes(),
3364		}
3365		return out, metadata, err
3366	}
3367
3368	return out, metadata, err
3369}
3370
3371func awsAwsjson11_deserializeOpErrorPreviewAgents(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3372	var errorBuffer bytes.Buffer
3373	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3374		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3375	}
3376	errorBody := bytes.NewReader(errorBuffer.Bytes())
3377
3378	errorCode := "UnknownError"
3379	errorMessage := errorCode
3380
3381	code := response.Header.Get("X-Amzn-ErrorType")
3382	if len(code) != 0 {
3383		errorCode = restjson.SanitizeErrorCode(code)
3384	}
3385
3386	var buff [1024]byte
3387	ringBuffer := smithyio.NewRingBuffer(buff[:])
3388
3389	body := io.TeeReader(errorBody, ringBuffer)
3390	decoder := json.NewDecoder(body)
3391	decoder.UseNumber()
3392	code, message, err := restjson.GetErrorInfo(decoder)
3393	if err != nil {
3394		var snapshot bytes.Buffer
3395		io.Copy(&snapshot, ringBuffer)
3396		err = &smithy.DeserializationError{
3397			Err:      fmt.Errorf("failed to decode response body, %w", err),
3398			Snapshot: snapshot.Bytes(),
3399		}
3400		return err
3401	}
3402
3403	errorBody.Seek(0, io.SeekStart)
3404	if len(code) != 0 {
3405		errorCode = restjson.SanitizeErrorCode(code)
3406	}
3407	if len(message) != 0 {
3408		errorMessage = message
3409	}
3410
3411	switch {
3412	case strings.EqualFold("AccessDeniedException", errorCode):
3413		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3414
3415	case strings.EqualFold("InternalException", errorCode):
3416		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3417
3418	case strings.EqualFold("InvalidCrossAccountRoleException", errorCode):
3419		return awsAwsjson11_deserializeErrorInvalidCrossAccountRoleException(response, errorBody)
3420
3421	case strings.EqualFold("InvalidInputException", errorCode):
3422		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3423
3424	case strings.EqualFold("NoSuchEntityException", errorCode):
3425		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3426
3427	default:
3428		genericError := &smithy.GenericAPIError{
3429			Code:    errorCode,
3430			Message: errorMessage,
3431		}
3432		return genericError
3433
3434	}
3435}
3436
3437type awsAwsjson11_deserializeOpRegisterCrossAccountAccessRole struct {
3438}
3439
3440func (*awsAwsjson11_deserializeOpRegisterCrossAccountAccessRole) ID() string {
3441	return "OperationDeserializer"
3442}
3443
3444func (m *awsAwsjson11_deserializeOpRegisterCrossAccountAccessRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3445	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3446) {
3447	out, metadata, err = next.HandleDeserialize(ctx, in)
3448	if err != nil {
3449		return out, metadata, err
3450	}
3451
3452	response, ok := out.RawResponse.(*smithyhttp.Response)
3453	if !ok {
3454		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3455	}
3456
3457	if response.StatusCode < 200 || response.StatusCode >= 300 {
3458		return out, metadata, awsAwsjson11_deserializeOpErrorRegisterCrossAccountAccessRole(response, &metadata)
3459	}
3460	output := &RegisterCrossAccountAccessRoleOutput{}
3461	out.Result = output
3462
3463	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
3464		return out, metadata, &smithy.DeserializationError{
3465			Err: fmt.Errorf("failed to discard response body, %w", err),
3466		}
3467	}
3468
3469	return out, metadata, err
3470}
3471
3472func awsAwsjson11_deserializeOpErrorRegisterCrossAccountAccessRole(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3473	var errorBuffer bytes.Buffer
3474	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3475		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3476	}
3477	errorBody := bytes.NewReader(errorBuffer.Bytes())
3478
3479	errorCode := "UnknownError"
3480	errorMessage := errorCode
3481
3482	code := response.Header.Get("X-Amzn-ErrorType")
3483	if len(code) != 0 {
3484		errorCode = restjson.SanitizeErrorCode(code)
3485	}
3486
3487	var buff [1024]byte
3488	ringBuffer := smithyio.NewRingBuffer(buff[:])
3489
3490	body := io.TeeReader(errorBody, ringBuffer)
3491	decoder := json.NewDecoder(body)
3492	decoder.UseNumber()
3493	code, message, err := restjson.GetErrorInfo(decoder)
3494	if err != nil {
3495		var snapshot bytes.Buffer
3496		io.Copy(&snapshot, ringBuffer)
3497		err = &smithy.DeserializationError{
3498			Err:      fmt.Errorf("failed to decode response body, %w", err),
3499			Snapshot: snapshot.Bytes(),
3500		}
3501		return err
3502	}
3503
3504	errorBody.Seek(0, io.SeekStart)
3505	if len(code) != 0 {
3506		errorCode = restjson.SanitizeErrorCode(code)
3507	}
3508	if len(message) != 0 {
3509		errorMessage = message
3510	}
3511
3512	switch {
3513	case strings.EqualFold("AccessDeniedException", errorCode):
3514		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3515
3516	case strings.EqualFold("InternalException", errorCode):
3517		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3518
3519	case strings.EqualFold("InvalidCrossAccountRoleException", errorCode):
3520		return awsAwsjson11_deserializeErrorInvalidCrossAccountRoleException(response, errorBody)
3521
3522	case strings.EqualFold("InvalidInputException", errorCode):
3523		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3524
3525	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
3526		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
3527
3528	default:
3529		genericError := &smithy.GenericAPIError{
3530			Code:    errorCode,
3531			Message: errorMessage,
3532		}
3533		return genericError
3534
3535	}
3536}
3537
3538type awsAwsjson11_deserializeOpRemoveAttributesFromFindings struct {
3539}
3540
3541func (*awsAwsjson11_deserializeOpRemoveAttributesFromFindings) ID() string {
3542	return "OperationDeserializer"
3543}
3544
3545func (m *awsAwsjson11_deserializeOpRemoveAttributesFromFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3546	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3547) {
3548	out, metadata, err = next.HandleDeserialize(ctx, in)
3549	if err != nil {
3550		return out, metadata, err
3551	}
3552
3553	response, ok := out.RawResponse.(*smithyhttp.Response)
3554	if !ok {
3555		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3556	}
3557
3558	if response.StatusCode < 200 || response.StatusCode >= 300 {
3559		return out, metadata, awsAwsjson11_deserializeOpErrorRemoveAttributesFromFindings(response, &metadata)
3560	}
3561	output := &RemoveAttributesFromFindingsOutput{}
3562	out.Result = output
3563
3564	var buff [1024]byte
3565	ringBuffer := smithyio.NewRingBuffer(buff[:])
3566
3567	body := io.TeeReader(response.Body, 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 out, metadata, err
3579	}
3580
3581	err = awsAwsjson11_deserializeOpDocumentRemoveAttributesFromFindingsOutput(&output, shape)
3582	if err != nil {
3583		var snapshot bytes.Buffer
3584		io.Copy(&snapshot, ringBuffer)
3585		err = &smithy.DeserializationError{
3586			Err:      fmt.Errorf("failed to decode response body, %w", err),
3587			Snapshot: snapshot.Bytes(),
3588		}
3589		return out, metadata, err
3590	}
3591
3592	return out, metadata, err
3593}
3594
3595func awsAwsjson11_deserializeOpErrorRemoveAttributesFromFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3596	var errorBuffer bytes.Buffer
3597	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3598		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3599	}
3600	errorBody := bytes.NewReader(errorBuffer.Bytes())
3601
3602	errorCode := "UnknownError"
3603	errorMessage := errorCode
3604
3605	code := response.Header.Get("X-Amzn-ErrorType")
3606	if len(code) != 0 {
3607		errorCode = restjson.SanitizeErrorCode(code)
3608	}
3609
3610	var buff [1024]byte
3611	ringBuffer := smithyio.NewRingBuffer(buff[:])
3612
3613	body := io.TeeReader(errorBody, ringBuffer)
3614	decoder := json.NewDecoder(body)
3615	decoder.UseNumber()
3616	code, message, err := restjson.GetErrorInfo(decoder)
3617	if err != nil {
3618		var snapshot bytes.Buffer
3619		io.Copy(&snapshot, ringBuffer)
3620		err = &smithy.DeserializationError{
3621			Err:      fmt.Errorf("failed to decode response body, %w", err),
3622			Snapshot: snapshot.Bytes(),
3623		}
3624		return err
3625	}
3626
3627	errorBody.Seek(0, io.SeekStart)
3628	if len(code) != 0 {
3629		errorCode = restjson.SanitizeErrorCode(code)
3630	}
3631	if len(message) != 0 {
3632		errorMessage = message
3633	}
3634
3635	switch {
3636	case strings.EqualFold("AccessDeniedException", errorCode):
3637		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3638
3639	case strings.EqualFold("InternalException", errorCode):
3640		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3641
3642	case strings.EqualFold("InvalidInputException", errorCode):
3643		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3644
3645	case strings.EqualFold("NoSuchEntityException", errorCode):
3646		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3647
3648	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
3649		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
3650
3651	default:
3652		genericError := &smithy.GenericAPIError{
3653			Code:    errorCode,
3654			Message: errorMessage,
3655		}
3656		return genericError
3657
3658	}
3659}
3660
3661type awsAwsjson11_deserializeOpSetTagsForResource struct {
3662}
3663
3664func (*awsAwsjson11_deserializeOpSetTagsForResource) ID() string {
3665	return "OperationDeserializer"
3666}
3667
3668func (m *awsAwsjson11_deserializeOpSetTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3669	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3670) {
3671	out, metadata, err = next.HandleDeserialize(ctx, in)
3672	if err != nil {
3673		return out, metadata, err
3674	}
3675
3676	response, ok := out.RawResponse.(*smithyhttp.Response)
3677	if !ok {
3678		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3679	}
3680
3681	if response.StatusCode < 200 || response.StatusCode >= 300 {
3682		return out, metadata, awsAwsjson11_deserializeOpErrorSetTagsForResource(response, &metadata)
3683	}
3684	output := &SetTagsForResourceOutput{}
3685	out.Result = output
3686
3687	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
3688		return out, metadata, &smithy.DeserializationError{
3689			Err: fmt.Errorf("failed to discard response body, %w", err),
3690		}
3691	}
3692
3693	return out, metadata, err
3694}
3695
3696func awsAwsjson11_deserializeOpErrorSetTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3697	var errorBuffer bytes.Buffer
3698	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3699		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3700	}
3701	errorBody := bytes.NewReader(errorBuffer.Bytes())
3702
3703	errorCode := "UnknownError"
3704	errorMessage := errorCode
3705
3706	code := response.Header.Get("X-Amzn-ErrorType")
3707	if len(code) != 0 {
3708		errorCode = restjson.SanitizeErrorCode(code)
3709	}
3710
3711	var buff [1024]byte
3712	ringBuffer := smithyio.NewRingBuffer(buff[:])
3713
3714	body := io.TeeReader(errorBody, ringBuffer)
3715	decoder := json.NewDecoder(body)
3716	decoder.UseNumber()
3717	code, message, err := restjson.GetErrorInfo(decoder)
3718	if err != nil {
3719		var snapshot bytes.Buffer
3720		io.Copy(&snapshot, ringBuffer)
3721		err = &smithy.DeserializationError{
3722			Err:      fmt.Errorf("failed to decode response body, %w", err),
3723			Snapshot: snapshot.Bytes(),
3724		}
3725		return err
3726	}
3727
3728	errorBody.Seek(0, io.SeekStart)
3729	if len(code) != 0 {
3730		errorCode = restjson.SanitizeErrorCode(code)
3731	}
3732	if len(message) != 0 {
3733		errorMessage = message
3734	}
3735
3736	switch {
3737	case strings.EqualFold("AccessDeniedException", errorCode):
3738		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3739
3740	case strings.EqualFold("InternalException", errorCode):
3741		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3742
3743	case strings.EqualFold("InvalidInputException", errorCode):
3744		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3745
3746	case strings.EqualFold("NoSuchEntityException", errorCode):
3747		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3748
3749	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
3750		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
3751
3752	default:
3753		genericError := &smithy.GenericAPIError{
3754			Code:    errorCode,
3755			Message: errorMessage,
3756		}
3757		return genericError
3758
3759	}
3760}
3761
3762type awsAwsjson11_deserializeOpStartAssessmentRun struct {
3763}
3764
3765func (*awsAwsjson11_deserializeOpStartAssessmentRun) ID() string {
3766	return "OperationDeserializer"
3767}
3768
3769func (m *awsAwsjson11_deserializeOpStartAssessmentRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3770	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3771) {
3772	out, metadata, err = next.HandleDeserialize(ctx, in)
3773	if err != nil {
3774		return out, metadata, err
3775	}
3776
3777	response, ok := out.RawResponse.(*smithyhttp.Response)
3778	if !ok {
3779		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3780	}
3781
3782	if response.StatusCode < 200 || response.StatusCode >= 300 {
3783		return out, metadata, awsAwsjson11_deserializeOpErrorStartAssessmentRun(response, &metadata)
3784	}
3785	output := &StartAssessmentRunOutput{}
3786	out.Result = output
3787
3788	var buff [1024]byte
3789	ringBuffer := smithyio.NewRingBuffer(buff[:])
3790
3791	body := io.TeeReader(response.Body, ringBuffer)
3792	decoder := json.NewDecoder(body)
3793	decoder.UseNumber()
3794	var shape interface{}
3795	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3796		var snapshot bytes.Buffer
3797		io.Copy(&snapshot, ringBuffer)
3798		err = &smithy.DeserializationError{
3799			Err:      fmt.Errorf("failed to decode response body, %w", err),
3800			Snapshot: snapshot.Bytes(),
3801		}
3802		return out, metadata, err
3803	}
3804
3805	err = awsAwsjson11_deserializeOpDocumentStartAssessmentRunOutput(&output, shape)
3806	if err != nil {
3807		var snapshot bytes.Buffer
3808		io.Copy(&snapshot, ringBuffer)
3809		err = &smithy.DeserializationError{
3810			Err:      fmt.Errorf("failed to decode response body, %w", err),
3811			Snapshot: snapshot.Bytes(),
3812		}
3813		return out, metadata, err
3814	}
3815
3816	return out, metadata, err
3817}
3818
3819func awsAwsjson11_deserializeOpErrorStartAssessmentRun(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3820	var errorBuffer bytes.Buffer
3821	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3822		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3823	}
3824	errorBody := bytes.NewReader(errorBuffer.Bytes())
3825
3826	errorCode := "UnknownError"
3827	errorMessage := errorCode
3828
3829	code := response.Header.Get("X-Amzn-ErrorType")
3830	if len(code) != 0 {
3831		errorCode = restjson.SanitizeErrorCode(code)
3832	}
3833
3834	var buff [1024]byte
3835	ringBuffer := smithyio.NewRingBuffer(buff[:])
3836
3837	body := io.TeeReader(errorBody, ringBuffer)
3838	decoder := json.NewDecoder(body)
3839	decoder.UseNumber()
3840	code, message, err := restjson.GetErrorInfo(decoder)
3841	if err != nil {
3842		var snapshot bytes.Buffer
3843		io.Copy(&snapshot, ringBuffer)
3844		err = &smithy.DeserializationError{
3845			Err:      fmt.Errorf("failed to decode response body, %w", err),
3846			Snapshot: snapshot.Bytes(),
3847		}
3848		return err
3849	}
3850
3851	errorBody.Seek(0, io.SeekStart)
3852	if len(code) != 0 {
3853		errorCode = restjson.SanitizeErrorCode(code)
3854	}
3855	if len(message) != 0 {
3856		errorMessage = message
3857	}
3858
3859	switch {
3860	case strings.EqualFold("AccessDeniedException", errorCode):
3861		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3862
3863	case strings.EqualFold("AgentsAlreadyRunningAssessmentException", errorCode):
3864		return awsAwsjson11_deserializeErrorAgentsAlreadyRunningAssessmentException(response, errorBody)
3865
3866	case strings.EqualFold("InternalException", errorCode):
3867		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3868
3869	case strings.EqualFold("InvalidCrossAccountRoleException", errorCode):
3870		return awsAwsjson11_deserializeErrorInvalidCrossAccountRoleException(response, errorBody)
3871
3872	case strings.EqualFold("InvalidInputException", errorCode):
3873		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3874
3875	case strings.EqualFold("LimitExceededException", errorCode):
3876		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
3877
3878	case strings.EqualFold("NoSuchEntityException", errorCode):
3879		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3880
3881	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
3882		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
3883
3884	default:
3885		genericError := &smithy.GenericAPIError{
3886			Code:    errorCode,
3887			Message: errorMessage,
3888		}
3889		return genericError
3890
3891	}
3892}
3893
3894type awsAwsjson11_deserializeOpStopAssessmentRun struct {
3895}
3896
3897func (*awsAwsjson11_deserializeOpStopAssessmentRun) ID() string {
3898	return "OperationDeserializer"
3899}
3900
3901func (m *awsAwsjson11_deserializeOpStopAssessmentRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3902	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3903) {
3904	out, metadata, err = next.HandleDeserialize(ctx, in)
3905	if err != nil {
3906		return out, metadata, err
3907	}
3908
3909	response, ok := out.RawResponse.(*smithyhttp.Response)
3910	if !ok {
3911		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3912	}
3913
3914	if response.StatusCode < 200 || response.StatusCode >= 300 {
3915		return out, metadata, awsAwsjson11_deserializeOpErrorStopAssessmentRun(response, &metadata)
3916	}
3917	output := &StopAssessmentRunOutput{}
3918	out.Result = output
3919
3920	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
3921		return out, metadata, &smithy.DeserializationError{
3922			Err: fmt.Errorf("failed to discard response body, %w", err),
3923		}
3924	}
3925
3926	return out, metadata, err
3927}
3928
3929func awsAwsjson11_deserializeOpErrorStopAssessmentRun(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3930	var errorBuffer bytes.Buffer
3931	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3932		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3933	}
3934	errorBody := bytes.NewReader(errorBuffer.Bytes())
3935
3936	errorCode := "UnknownError"
3937	errorMessage := errorCode
3938
3939	code := response.Header.Get("X-Amzn-ErrorType")
3940	if len(code) != 0 {
3941		errorCode = restjson.SanitizeErrorCode(code)
3942	}
3943
3944	var buff [1024]byte
3945	ringBuffer := smithyio.NewRingBuffer(buff[:])
3946
3947	body := io.TeeReader(errorBody, ringBuffer)
3948	decoder := json.NewDecoder(body)
3949	decoder.UseNumber()
3950	code, message, err := restjson.GetErrorInfo(decoder)
3951	if err != nil {
3952		var snapshot bytes.Buffer
3953		io.Copy(&snapshot, ringBuffer)
3954		err = &smithy.DeserializationError{
3955			Err:      fmt.Errorf("failed to decode response body, %w", err),
3956			Snapshot: snapshot.Bytes(),
3957		}
3958		return err
3959	}
3960
3961	errorBody.Seek(0, io.SeekStart)
3962	if len(code) != 0 {
3963		errorCode = restjson.SanitizeErrorCode(code)
3964	}
3965	if len(message) != 0 {
3966		errorMessage = message
3967	}
3968
3969	switch {
3970	case strings.EqualFold("AccessDeniedException", errorCode):
3971		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
3972
3973	case strings.EqualFold("InternalException", errorCode):
3974		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
3975
3976	case strings.EqualFold("InvalidInputException", errorCode):
3977		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
3978
3979	case strings.EqualFold("NoSuchEntityException", errorCode):
3980		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
3981
3982	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
3983		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
3984
3985	default:
3986		genericError := &smithy.GenericAPIError{
3987			Code:    errorCode,
3988			Message: errorMessage,
3989		}
3990		return genericError
3991
3992	}
3993}
3994
3995type awsAwsjson11_deserializeOpSubscribeToEvent struct {
3996}
3997
3998func (*awsAwsjson11_deserializeOpSubscribeToEvent) ID() string {
3999	return "OperationDeserializer"
4000}
4001
4002func (m *awsAwsjson11_deserializeOpSubscribeToEvent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4003	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4004) {
4005	out, metadata, err = next.HandleDeserialize(ctx, in)
4006	if err != nil {
4007		return out, metadata, err
4008	}
4009
4010	response, ok := out.RawResponse.(*smithyhttp.Response)
4011	if !ok {
4012		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4013	}
4014
4015	if response.StatusCode < 200 || response.StatusCode >= 300 {
4016		return out, metadata, awsAwsjson11_deserializeOpErrorSubscribeToEvent(response, &metadata)
4017	}
4018	output := &SubscribeToEventOutput{}
4019	out.Result = output
4020
4021	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
4022		return out, metadata, &smithy.DeserializationError{
4023			Err: fmt.Errorf("failed to discard response body, %w", err),
4024		}
4025	}
4026
4027	return out, metadata, err
4028}
4029
4030func awsAwsjson11_deserializeOpErrorSubscribeToEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4031	var errorBuffer bytes.Buffer
4032	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4033		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4034	}
4035	errorBody := bytes.NewReader(errorBuffer.Bytes())
4036
4037	errorCode := "UnknownError"
4038	errorMessage := errorCode
4039
4040	code := response.Header.Get("X-Amzn-ErrorType")
4041	if len(code) != 0 {
4042		errorCode = restjson.SanitizeErrorCode(code)
4043	}
4044
4045	var buff [1024]byte
4046	ringBuffer := smithyio.NewRingBuffer(buff[:])
4047
4048	body := io.TeeReader(errorBody, ringBuffer)
4049	decoder := json.NewDecoder(body)
4050	decoder.UseNumber()
4051	code, message, err := restjson.GetErrorInfo(decoder)
4052	if err != nil {
4053		var snapshot bytes.Buffer
4054		io.Copy(&snapshot, ringBuffer)
4055		err = &smithy.DeserializationError{
4056			Err:      fmt.Errorf("failed to decode response body, %w", err),
4057			Snapshot: snapshot.Bytes(),
4058		}
4059		return err
4060	}
4061
4062	errorBody.Seek(0, io.SeekStart)
4063	if len(code) != 0 {
4064		errorCode = restjson.SanitizeErrorCode(code)
4065	}
4066	if len(message) != 0 {
4067		errorMessage = message
4068	}
4069
4070	switch {
4071	case strings.EqualFold("AccessDeniedException", errorCode):
4072		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
4073
4074	case strings.EqualFold("InternalException", errorCode):
4075		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
4076
4077	case strings.EqualFold("InvalidInputException", errorCode):
4078		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
4079
4080	case strings.EqualFold("LimitExceededException", errorCode):
4081		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
4082
4083	case strings.EqualFold("NoSuchEntityException", errorCode):
4084		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
4085
4086	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
4087		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
4088
4089	default:
4090		genericError := &smithy.GenericAPIError{
4091			Code:    errorCode,
4092			Message: errorMessage,
4093		}
4094		return genericError
4095
4096	}
4097}
4098
4099type awsAwsjson11_deserializeOpUnsubscribeFromEvent struct {
4100}
4101
4102func (*awsAwsjson11_deserializeOpUnsubscribeFromEvent) ID() string {
4103	return "OperationDeserializer"
4104}
4105
4106func (m *awsAwsjson11_deserializeOpUnsubscribeFromEvent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4107	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4108) {
4109	out, metadata, err = next.HandleDeserialize(ctx, in)
4110	if err != nil {
4111		return out, metadata, err
4112	}
4113
4114	response, ok := out.RawResponse.(*smithyhttp.Response)
4115	if !ok {
4116		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4117	}
4118
4119	if response.StatusCode < 200 || response.StatusCode >= 300 {
4120		return out, metadata, awsAwsjson11_deserializeOpErrorUnsubscribeFromEvent(response, &metadata)
4121	}
4122	output := &UnsubscribeFromEventOutput{}
4123	out.Result = output
4124
4125	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
4126		return out, metadata, &smithy.DeserializationError{
4127			Err: fmt.Errorf("failed to discard response body, %w", err),
4128		}
4129	}
4130
4131	return out, metadata, err
4132}
4133
4134func awsAwsjson11_deserializeOpErrorUnsubscribeFromEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4135	var errorBuffer bytes.Buffer
4136	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4137		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4138	}
4139	errorBody := bytes.NewReader(errorBuffer.Bytes())
4140
4141	errorCode := "UnknownError"
4142	errorMessage := errorCode
4143
4144	code := response.Header.Get("X-Amzn-ErrorType")
4145	if len(code) != 0 {
4146		errorCode = restjson.SanitizeErrorCode(code)
4147	}
4148
4149	var buff [1024]byte
4150	ringBuffer := smithyio.NewRingBuffer(buff[:])
4151
4152	body := io.TeeReader(errorBody, ringBuffer)
4153	decoder := json.NewDecoder(body)
4154	decoder.UseNumber()
4155	code, message, err := restjson.GetErrorInfo(decoder)
4156	if err != nil {
4157		var snapshot bytes.Buffer
4158		io.Copy(&snapshot, ringBuffer)
4159		err = &smithy.DeserializationError{
4160			Err:      fmt.Errorf("failed to decode response body, %w", err),
4161			Snapshot: snapshot.Bytes(),
4162		}
4163		return err
4164	}
4165
4166	errorBody.Seek(0, io.SeekStart)
4167	if len(code) != 0 {
4168		errorCode = restjson.SanitizeErrorCode(code)
4169	}
4170	if len(message) != 0 {
4171		errorMessage = message
4172	}
4173
4174	switch {
4175	case strings.EqualFold("AccessDeniedException", errorCode):
4176		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
4177
4178	case strings.EqualFold("InternalException", errorCode):
4179		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
4180
4181	case strings.EqualFold("InvalidInputException", errorCode):
4182		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
4183
4184	case strings.EqualFold("NoSuchEntityException", errorCode):
4185		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
4186
4187	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
4188		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
4189
4190	default:
4191		genericError := &smithy.GenericAPIError{
4192			Code:    errorCode,
4193			Message: errorMessage,
4194		}
4195		return genericError
4196
4197	}
4198}
4199
4200type awsAwsjson11_deserializeOpUpdateAssessmentTarget struct {
4201}
4202
4203func (*awsAwsjson11_deserializeOpUpdateAssessmentTarget) ID() string {
4204	return "OperationDeserializer"
4205}
4206
4207func (m *awsAwsjson11_deserializeOpUpdateAssessmentTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4208	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4209) {
4210	out, metadata, err = next.HandleDeserialize(ctx, in)
4211	if err != nil {
4212		return out, metadata, err
4213	}
4214
4215	response, ok := out.RawResponse.(*smithyhttp.Response)
4216	if !ok {
4217		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4218	}
4219
4220	if response.StatusCode < 200 || response.StatusCode >= 300 {
4221		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssessmentTarget(response, &metadata)
4222	}
4223	output := &UpdateAssessmentTargetOutput{}
4224	out.Result = output
4225
4226	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
4227		return out, metadata, &smithy.DeserializationError{
4228			Err: fmt.Errorf("failed to discard response body, %w", err),
4229		}
4230	}
4231
4232	return out, metadata, err
4233}
4234
4235func awsAwsjson11_deserializeOpErrorUpdateAssessmentTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4236	var errorBuffer bytes.Buffer
4237	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4238		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4239	}
4240	errorBody := bytes.NewReader(errorBuffer.Bytes())
4241
4242	errorCode := "UnknownError"
4243	errorMessage := errorCode
4244
4245	code := response.Header.Get("X-Amzn-ErrorType")
4246	if len(code) != 0 {
4247		errorCode = restjson.SanitizeErrorCode(code)
4248	}
4249
4250	var buff [1024]byte
4251	ringBuffer := smithyio.NewRingBuffer(buff[:])
4252
4253	body := io.TeeReader(errorBody, ringBuffer)
4254	decoder := json.NewDecoder(body)
4255	decoder.UseNumber()
4256	code, message, err := restjson.GetErrorInfo(decoder)
4257	if err != nil {
4258		var snapshot bytes.Buffer
4259		io.Copy(&snapshot, ringBuffer)
4260		err = &smithy.DeserializationError{
4261			Err:      fmt.Errorf("failed to decode response body, %w", err),
4262			Snapshot: snapshot.Bytes(),
4263		}
4264		return err
4265	}
4266
4267	errorBody.Seek(0, io.SeekStart)
4268	if len(code) != 0 {
4269		errorCode = restjson.SanitizeErrorCode(code)
4270	}
4271	if len(message) != 0 {
4272		errorMessage = message
4273	}
4274
4275	switch {
4276	case strings.EqualFold("AccessDeniedException", errorCode):
4277		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
4278
4279	case strings.EqualFold("InternalException", errorCode):
4280		return awsAwsjson11_deserializeErrorInternalException(response, errorBody)
4281
4282	case strings.EqualFold("InvalidInputException", errorCode):
4283		return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
4284
4285	case strings.EqualFold("NoSuchEntityException", errorCode):
4286		return awsAwsjson11_deserializeErrorNoSuchEntityException(response, errorBody)
4287
4288	case strings.EqualFold("ServiceTemporarilyUnavailableException", errorCode):
4289		return awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response, errorBody)
4290
4291	default:
4292		genericError := &smithy.GenericAPIError{
4293			Code:    errorCode,
4294			Message: errorMessage,
4295		}
4296		return genericError
4297
4298	}
4299}
4300
4301func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4302	var buff [1024]byte
4303	ringBuffer := smithyio.NewRingBuffer(buff[:])
4304
4305	body := io.TeeReader(errorBody, ringBuffer)
4306	decoder := json.NewDecoder(body)
4307	decoder.UseNumber()
4308	var shape interface{}
4309	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4310		var snapshot bytes.Buffer
4311		io.Copy(&snapshot, ringBuffer)
4312		err = &smithy.DeserializationError{
4313			Err:      fmt.Errorf("failed to decode response body, %w", err),
4314			Snapshot: snapshot.Bytes(),
4315		}
4316		return err
4317	}
4318
4319	output := &types.AccessDeniedException{}
4320	err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape)
4321
4322	if err != nil {
4323		var snapshot bytes.Buffer
4324		io.Copy(&snapshot, ringBuffer)
4325		err = &smithy.DeserializationError{
4326			Err:      fmt.Errorf("failed to decode response body, %w", err),
4327			Snapshot: snapshot.Bytes(),
4328		}
4329		return err
4330	}
4331
4332	errorBody.Seek(0, io.SeekStart)
4333	return output
4334}
4335
4336func awsAwsjson11_deserializeErrorAgentsAlreadyRunningAssessmentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4337	var buff [1024]byte
4338	ringBuffer := smithyio.NewRingBuffer(buff[:])
4339
4340	body := io.TeeReader(errorBody, ringBuffer)
4341	decoder := json.NewDecoder(body)
4342	decoder.UseNumber()
4343	var shape interface{}
4344	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4345		var snapshot bytes.Buffer
4346		io.Copy(&snapshot, ringBuffer)
4347		err = &smithy.DeserializationError{
4348			Err:      fmt.Errorf("failed to decode response body, %w", err),
4349			Snapshot: snapshot.Bytes(),
4350		}
4351		return err
4352	}
4353
4354	output := &types.AgentsAlreadyRunningAssessmentException{}
4355	err := awsAwsjson11_deserializeDocumentAgentsAlreadyRunningAssessmentException(&output, shape)
4356
4357	if err != nil {
4358		var snapshot bytes.Buffer
4359		io.Copy(&snapshot, ringBuffer)
4360		err = &smithy.DeserializationError{
4361			Err:      fmt.Errorf("failed to decode response body, %w", err),
4362			Snapshot: snapshot.Bytes(),
4363		}
4364		return err
4365	}
4366
4367	errorBody.Seek(0, io.SeekStart)
4368	return output
4369}
4370
4371func awsAwsjson11_deserializeErrorAssessmentRunInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4372	var buff [1024]byte
4373	ringBuffer := smithyio.NewRingBuffer(buff[:])
4374
4375	body := io.TeeReader(errorBody, ringBuffer)
4376	decoder := json.NewDecoder(body)
4377	decoder.UseNumber()
4378	var shape interface{}
4379	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4380		var snapshot bytes.Buffer
4381		io.Copy(&snapshot, ringBuffer)
4382		err = &smithy.DeserializationError{
4383			Err:      fmt.Errorf("failed to decode response body, %w", err),
4384			Snapshot: snapshot.Bytes(),
4385		}
4386		return err
4387	}
4388
4389	output := &types.AssessmentRunInProgressException{}
4390	err := awsAwsjson11_deserializeDocumentAssessmentRunInProgressException(&output, shape)
4391
4392	if err != nil {
4393		var snapshot bytes.Buffer
4394		io.Copy(&snapshot, ringBuffer)
4395		err = &smithy.DeserializationError{
4396			Err:      fmt.Errorf("failed to decode response body, %w", err),
4397			Snapshot: snapshot.Bytes(),
4398		}
4399		return err
4400	}
4401
4402	errorBody.Seek(0, io.SeekStart)
4403	return output
4404}
4405
4406func awsAwsjson11_deserializeErrorInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4407	var buff [1024]byte
4408	ringBuffer := smithyio.NewRingBuffer(buff[:])
4409
4410	body := io.TeeReader(errorBody, ringBuffer)
4411	decoder := json.NewDecoder(body)
4412	decoder.UseNumber()
4413	var shape interface{}
4414	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4415		var snapshot bytes.Buffer
4416		io.Copy(&snapshot, ringBuffer)
4417		err = &smithy.DeserializationError{
4418			Err:      fmt.Errorf("failed to decode response body, %w", err),
4419			Snapshot: snapshot.Bytes(),
4420		}
4421		return err
4422	}
4423
4424	output := &types.InternalException{}
4425	err := awsAwsjson11_deserializeDocumentInternalException(&output, shape)
4426
4427	if err != nil {
4428		var snapshot bytes.Buffer
4429		io.Copy(&snapshot, ringBuffer)
4430		err = &smithy.DeserializationError{
4431			Err:      fmt.Errorf("failed to decode response body, %w", err),
4432			Snapshot: snapshot.Bytes(),
4433		}
4434		return err
4435	}
4436
4437	errorBody.Seek(0, io.SeekStart)
4438	return output
4439}
4440
4441func awsAwsjson11_deserializeErrorInvalidCrossAccountRoleException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4442	var buff [1024]byte
4443	ringBuffer := smithyio.NewRingBuffer(buff[:])
4444
4445	body := io.TeeReader(errorBody, ringBuffer)
4446	decoder := json.NewDecoder(body)
4447	decoder.UseNumber()
4448	var shape interface{}
4449	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4450		var snapshot bytes.Buffer
4451		io.Copy(&snapshot, ringBuffer)
4452		err = &smithy.DeserializationError{
4453			Err:      fmt.Errorf("failed to decode response body, %w", err),
4454			Snapshot: snapshot.Bytes(),
4455		}
4456		return err
4457	}
4458
4459	output := &types.InvalidCrossAccountRoleException{}
4460	err := awsAwsjson11_deserializeDocumentInvalidCrossAccountRoleException(&output, shape)
4461
4462	if err != nil {
4463		var snapshot bytes.Buffer
4464		io.Copy(&snapshot, ringBuffer)
4465		err = &smithy.DeserializationError{
4466			Err:      fmt.Errorf("failed to decode response body, %w", err),
4467			Snapshot: snapshot.Bytes(),
4468		}
4469		return err
4470	}
4471
4472	errorBody.Seek(0, io.SeekStart)
4473	return output
4474}
4475
4476func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4477	var buff [1024]byte
4478	ringBuffer := smithyio.NewRingBuffer(buff[:])
4479
4480	body := io.TeeReader(errorBody, ringBuffer)
4481	decoder := json.NewDecoder(body)
4482	decoder.UseNumber()
4483	var shape interface{}
4484	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4485		var snapshot bytes.Buffer
4486		io.Copy(&snapshot, ringBuffer)
4487		err = &smithy.DeserializationError{
4488			Err:      fmt.Errorf("failed to decode response body, %w", err),
4489			Snapshot: snapshot.Bytes(),
4490		}
4491		return err
4492	}
4493
4494	output := &types.InvalidInputException{}
4495	err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape)
4496
4497	if err != nil {
4498		var snapshot bytes.Buffer
4499		io.Copy(&snapshot, ringBuffer)
4500		err = &smithy.DeserializationError{
4501			Err:      fmt.Errorf("failed to decode response body, %w", err),
4502			Snapshot: snapshot.Bytes(),
4503		}
4504		return err
4505	}
4506
4507	errorBody.Seek(0, io.SeekStart)
4508	return output
4509}
4510
4511func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4512	var buff [1024]byte
4513	ringBuffer := smithyio.NewRingBuffer(buff[:])
4514
4515	body := io.TeeReader(errorBody, ringBuffer)
4516	decoder := json.NewDecoder(body)
4517	decoder.UseNumber()
4518	var shape interface{}
4519	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4520		var snapshot bytes.Buffer
4521		io.Copy(&snapshot, ringBuffer)
4522		err = &smithy.DeserializationError{
4523			Err:      fmt.Errorf("failed to decode response body, %w", err),
4524			Snapshot: snapshot.Bytes(),
4525		}
4526		return err
4527	}
4528
4529	output := &types.LimitExceededException{}
4530	err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape)
4531
4532	if err != nil {
4533		var snapshot bytes.Buffer
4534		io.Copy(&snapshot, ringBuffer)
4535		err = &smithy.DeserializationError{
4536			Err:      fmt.Errorf("failed to decode response body, %w", err),
4537			Snapshot: snapshot.Bytes(),
4538		}
4539		return err
4540	}
4541
4542	errorBody.Seek(0, io.SeekStart)
4543	return output
4544}
4545
4546func awsAwsjson11_deserializeErrorNoSuchEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4547	var buff [1024]byte
4548	ringBuffer := smithyio.NewRingBuffer(buff[:])
4549
4550	body := io.TeeReader(errorBody, ringBuffer)
4551	decoder := json.NewDecoder(body)
4552	decoder.UseNumber()
4553	var shape interface{}
4554	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4555		var snapshot bytes.Buffer
4556		io.Copy(&snapshot, ringBuffer)
4557		err = &smithy.DeserializationError{
4558			Err:      fmt.Errorf("failed to decode response body, %w", err),
4559			Snapshot: snapshot.Bytes(),
4560		}
4561		return err
4562	}
4563
4564	output := &types.NoSuchEntityException{}
4565	err := awsAwsjson11_deserializeDocumentNoSuchEntityException(&output, shape)
4566
4567	if err != nil {
4568		var snapshot bytes.Buffer
4569		io.Copy(&snapshot, ringBuffer)
4570		err = &smithy.DeserializationError{
4571			Err:      fmt.Errorf("failed to decode response body, %w", err),
4572			Snapshot: snapshot.Bytes(),
4573		}
4574		return err
4575	}
4576
4577	errorBody.Seek(0, io.SeekStart)
4578	return output
4579}
4580
4581func awsAwsjson11_deserializeErrorPreviewGenerationInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4582	var buff [1024]byte
4583	ringBuffer := smithyio.NewRingBuffer(buff[:])
4584
4585	body := io.TeeReader(errorBody, ringBuffer)
4586	decoder := json.NewDecoder(body)
4587	decoder.UseNumber()
4588	var shape interface{}
4589	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4590		var snapshot bytes.Buffer
4591		io.Copy(&snapshot, ringBuffer)
4592		err = &smithy.DeserializationError{
4593			Err:      fmt.Errorf("failed to decode response body, %w", err),
4594			Snapshot: snapshot.Bytes(),
4595		}
4596		return err
4597	}
4598
4599	output := &types.PreviewGenerationInProgressException{}
4600	err := awsAwsjson11_deserializeDocumentPreviewGenerationInProgressException(&output, shape)
4601
4602	if err != nil {
4603		var snapshot bytes.Buffer
4604		io.Copy(&snapshot, ringBuffer)
4605		err = &smithy.DeserializationError{
4606			Err:      fmt.Errorf("failed to decode response body, %w", err),
4607			Snapshot: snapshot.Bytes(),
4608		}
4609		return err
4610	}
4611
4612	errorBody.Seek(0, io.SeekStart)
4613	return output
4614}
4615
4616func awsAwsjson11_deserializeErrorServiceTemporarilyUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4617	var buff [1024]byte
4618	ringBuffer := smithyio.NewRingBuffer(buff[:])
4619
4620	body := io.TeeReader(errorBody, ringBuffer)
4621	decoder := json.NewDecoder(body)
4622	decoder.UseNumber()
4623	var shape interface{}
4624	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4625		var snapshot bytes.Buffer
4626		io.Copy(&snapshot, ringBuffer)
4627		err = &smithy.DeserializationError{
4628			Err:      fmt.Errorf("failed to decode response body, %w", err),
4629			Snapshot: snapshot.Bytes(),
4630		}
4631		return err
4632	}
4633
4634	output := &types.ServiceTemporarilyUnavailableException{}
4635	err := awsAwsjson11_deserializeDocumentServiceTemporarilyUnavailableException(&output, shape)
4636
4637	if err != nil {
4638		var snapshot bytes.Buffer
4639		io.Copy(&snapshot, ringBuffer)
4640		err = &smithy.DeserializationError{
4641			Err:      fmt.Errorf("failed to decode response body, %w", err),
4642			Snapshot: snapshot.Bytes(),
4643		}
4644		return err
4645	}
4646
4647	errorBody.Seek(0, io.SeekStart)
4648	return output
4649}
4650
4651func awsAwsjson11_deserializeErrorUnsupportedFeatureException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
4652	var buff [1024]byte
4653	ringBuffer := smithyio.NewRingBuffer(buff[:])
4654
4655	body := io.TeeReader(errorBody, ringBuffer)
4656	decoder := json.NewDecoder(body)
4657	decoder.UseNumber()
4658	var shape interface{}
4659	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4660		var snapshot bytes.Buffer
4661		io.Copy(&snapshot, ringBuffer)
4662		err = &smithy.DeserializationError{
4663			Err:      fmt.Errorf("failed to decode response body, %w", err),
4664			Snapshot: snapshot.Bytes(),
4665		}
4666		return err
4667	}
4668
4669	output := &types.UnsupportedFeatureException{}
4670	err := awsAwsjson11_deserializeDocumentUnsupportedFeatureException(&output, shape)
4671
4672	if err != nil {
4673		var snapshot bytes.Buffer
4674		io.Copy(&snapshot, ringBuffer)
4675		err = &smithy.DeserializationError{
4676			Err:      fmt.Errorf("failed to decode response body, %w", err),
4677			Snapshot: snapshot.Bytes(),
4678		}
4679		return err
4680	}
4681
4682	errorBody.Seek(0, io.SeekStart)
4683	return output
4684}
4685
4686func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
4687	if v == nil {
4688		return fmt.Errorf("unexpected nil of type %T", v)
4689	}
4690	if value == nil {
4691		return nil
4692	}
4693
4694	shape, ok := value.(map[string]interface{})
4695	if !ok {
4696		return fmt.Errorf("unexpected JSON type %v", value)
4697	}
4698
4699	var sv *types.AccessDeniedException
4700	if *v == nil {
4701		sv = &types.AccessDeniedException{}
4702	} else {
4703		sv = *v
4704	}
4705
4706	for key, value := range shape {
4707		switch key {
4708		case "canRetry":
4709			if value != nil {
4710				jtv, ok := value.(bool)
4711				if !ok {
4712					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
4713				}
4714				sv.CanRetry = ptr.Bool(jtv)
4715			}
4716
4717		case "errorCode":
4718			if value != nil {
4719				jtv, ok := value.(string)
4720				if !ok {
4721					return fmt.Errorf("expected AccessDeniedErrorCode to be of type string, got %T instead", value)
4722				}
4723				sv.ErrorCode_ = types.AccessDeniedErrorCode(jtv)
4724			}
4725
4726		case "message":
4727			if value != nil {
4728				jtv, ok := value.(string)
4729				if !ok {
4730					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
4731				}
4732				sv.Message = ptr.String(jtv)
4733			}
4734
4735		default:
4736			_, _ = key, value
4737
4738		}
4739	}
4740	*v = sv
4741	return nil
4742}
4743
4744func awsAwsjson11_deserializeDocumentAgentAlreadyRunningAssessment(v **types.AgentAlreadyRunningAssessment, value interface{}) error {
4745	if v == nil {
4746		return fmt.Errorf("unexpected nil of type %T", v)
4747	}
4748	if value == nil {
4749		return nil
4750	}
4751
4752	shape, ok := value.(map[string]interface{})
4753	if !ok {
4754		return fmt.Errorf("unexpected JSON type %v", value)
4755	}
4756
4757	var sv *types.AgentAlreadyRunningAssessment
4758	if *v == nil {
4759		sv = &types.AgentAlreadyRunningAssessment{}
4760	} else {
4761		sv = *v
4762	}
4763
4764	for key, value := range shape {
4765		switch key {
4766		case "agentId":
4767			if value != nil {
4768				jtv, ok := value.(string)
4769				if !ok {
4770					return fmt.Errorf("expected AgentId to be of type string, got %T instead", value)
4771				}
4772				sv.AgentId = ptr.String(jtv)
4773			}
4774
4775		case "assessmentRunArn":
4776			if value != nil {
4777				jtv, ok := value.(string)
4778				if !ok {
4779					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
4780				}
4781				sv.AssessmentRunArn = ptr.String(jtv)
4782			}
4783
4784		default:
4785			_, _ = key, value
4786
4787		}
4788	}
4789	*v = sv
4790	return nil
4791}
4792
4793func awsAwsjson11_deserializeDocumentAgentAlreadyRunningAssessmentList(v *[]types.AgentAlreadyRunningAssessment, value interface{}) error {
4794	if v == nil {
4795		return fmt.Errorf("unexpected nil of type %T", v)
4796	}
4797	if value == nil {
4798		return nil
4799	}
4800
4801	shape, ok := value.([]interface{})
4802	if !ok {
4803		return fmt.Errorf("unexpected JSON type %v", value)
4804	}
4805
4806	var cv []types.AgentAlreadyRunningAssessment
4807	if *v == nil {
4808		cv = []types.AgentAlreadyRunningAssessment{}
4809	} else {
4810		cv = *v
4811	}
4812
4813	for _, value := range shape {
4814		var col types.AgentAlreadyRunningAssessment
4815		destAddr := &col
4816		if err := awsAwsjson11_deserializeDocumentAgentAlreadyRunningAssessment(&destAddr, value); err != nil {
4817			return err
4818		}
4819		col = *destAddr
4820		cv = append(cv, col)
4821
4822	}
4823	*v = cv
4824	return nil
4825}
4826
4827func awsAwsjson11_deserializeDocumentAgentPreview(v **types.AgentPreview, value interface{}) error {
4828	if v == nil {
4829		return fmt.Errorf("unexpected nil of type %T", v)
4830	}
4831	if value == nil {
4832		return nil
4833	}
4834
4835	shape, ok := value.(map[string]interface{})
4836	if !ok {
4837		return fmt.Errorf("unexpected JSON type %v", value)
4838	}
4839
4840	var sv *types.AgentPreview
4841	if *v == nil {
4842		sv = &types.AgentPreview{}
4843	} else {
4844		sv = *v
4845	}
4846
4847	for key, value := range shape {
4848		switch key {
4849		case "agentHealth":
4850			if value != nil {
4851				jtv, ok := value.(string)
4852				if !ok {
4853					return fmt.Errorf("expected AgentHealth to be of type string, got %T instead", value)
4854				}
4855				sv.AgentHealth = types.AgentHealth(jtv)
4856			}
4857
4858		case "agentId":
4859			if value != nil {
4860				jtv, ok := value.(string)
4861				if !ok {
4862					return fmt.Errorf("expected AgentId to be of type string, got %T instead", value)
4863				}
4864				sv.AgentId = ptr.String(jtv)
4865			}
4866
4867		case "agentVersion":
4868			if value != nil {
4869				jtv, ok := value.(string)
4870				if !ok {
4871					return fmt.Errorf("expected AgentVersion to be of type string, got %T instead", value)
4872				}
4873				sv.AgentVersion = ptr.String(jtv)
4874			}
4875
4876		case "autoScalingGroup":
4877			if value != nil {
4878				jtv, ok := value.(string)
4879				if !ok {
4880					return fmt.Errorf("expected AutoScalingGroup to be of type string, got %T instead", value)
4881				}
4882				sv.AutoScalingGroup = ptr.String(jtv)
4883			}
4884
4885		case "hostname":
4886			if value != nil {
4887				jtv, ok := value.(string)
4888				if !ok {
4889					return fmt.Errorf("expected Hostname to be of type string, got %T instead", value)
4890				}
4891				sv.Hostname = ptr.String(jtv)
4892			}
4893
4894		case "ipv4Address":
4895			if value != nil {
4896				jtv, ok := value.(string)
4897				if !ok {
4898					return fmt.Errorf("expected Ipv4Address to be of type string, got %T instead", value)
4899				}
4900				sv.Ipv4Address = ptr.String(jtv)
4901			}
4902
4903		case "kernelVersion":
4904			if value != nil {
4905				jtv, ok := value.(string)
4906				if !ok {
4907					return fmt.Errorf("expected KernelVersion to be of type string, got %T instead", value)
4908				}
4909				sv.KernelVersion = ptr.String(jtv)
4910			}
4911
4912		case "operatingSystem":
4913			if value != nil {
4914				jtv, ok := value.(string)
4915				if !ok {
4916					return fmt.Errorf("expected OperatingSystem to be of type string, got %T instead", value)
4917				}
4918				sv.OperatingSystem = ptr.String(jtv)
4919			}
4920
4921		default:
4922			_, _ = key, value
4923
4924		}
4925	}
4926	*v = sv
4927	return nil
4928}
4929
4930func awsAwsjson11_deserializeDocumentAgentPreviewList(v *[]types.AgentPreview, value interface{}) error {
4931	if v == nil {
4932		return fmt.Errorf("unexpected nil of type %T", v)
4933	}
4934	if value == nil {
4935		return nil
4936	}
4937
4938	shape, ok := value.([]interface{})
4939	if !ok {
4940		return fmt.Errorf("unexpected JSON type %v", value)
4941	}
4942
4943	var cv []types.AgentPreview
4944	if *v == nil {
4945		cv = []types.AgentPreview{}
4946	} else {
4947		cv = *v
4948	}
4949
4950	for _, value := range shape {
4951		var col types.AgentPreview
4952		destAddr := &col
4953		if err := awsAwsjson11_deserializeDocumentAgentPreview(&destAddr, value); err != nil {
4954			return err
4955		}
4956		col = *destAddr
4957		cv = append(cv, col)
4958
4959	}
4960	*v = cv
4961	return nil
4962}
4963
4964func awsAwsjson11_deserializeDocumentAgentsAlreadyRunningAssessmentException(v **types.AgentsAlreadyRunningAssessmentException, value interface{}) error {
4965	if v == nil {
4966		return fmt.Errorf("unexpected nil of type %T", v)
4967	}
4968	if value == nil {
4969		return nil
4970	}
4971
4972	shape, ok := value.(map[string]interface{})
4973	if !ok {
4974		return fmt.Errorf("unexpected JSON type %v", value)
4975	}
4976
4977	var sv *types.AgentsAlreadyRunningAssessmentException
4978	if *v == nil {
4979		sv = &types.AgentsAlreadyRunningAssessmentException{}
4980	} else {
4981		sv = *v
4982	}
4983
4984	for key, value := range shape {
4985		switch key {
4986		case "agents":
4987			if err := awsAwsjson11_deserializeDocumentAgentAlreadyRunningAssessmentList(&sv.Agents, value); err != nil {
4988				return err
4989			}
4990
4991		case "agentsTruncated":
4992			if value != nil {
4993				jtv, ok := value.(bool)
4994				if !ok {
4995					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
4996				}
4997				sv.AgentsTruncated = ptr.Bool(jtv)
4998			}
4999
5000		case "canRetry":
5001			if value != nil {
5002				jtv, ok := value.(bool)
5003				if !ok {
5004					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
5005				}
5006				sv.CanRetry = ptr.Bool(jtv)
5007			}
5008
5009		case "message":
5010			if value != nil {
5011				jtv, ok := value.(string)
5012				if !ok {
5013					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
5014				}
5015				sv.Message = ptr.String(jtv)
5016			}
5017
5018		default:
5019			_, _ = key, value
5020
5021		}
5022	}
5023	*v = sv
5024	return nil
5025}
5026
5027func awsAwsjson11_deserializeDocumentAssessmentRulesPackageArnList(v *[]string, 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.([]interface{})
5036	if !ok {
5037		return fmt.Errorf("unexpected JSON type %v", value)
5038	}
5039
5040	var cv []string
5041	if *v == nil {
5042		cv = []string{}
5043	} else {
5044		cv = *v
5045	}
5046
5047	for _, value := range shape {
5048		var col string
5049		if value != nil {
5050			jtv, ok := value.(string)
5051			if !ok {
5052				return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5053			}
5054			col = jtv
5055		}
5056		cv = append(cv, col)
5057
5058	}
5059	*v = cv
5060	return nil
5061}
5062
5063func awsAwsjson11_deserializeDocumentAssessmentRun(v **types.AssessmentRun, value interface{}) error {
5064	if v == nil {
5065		return fmt.Errorf("unexpected nil of type %T", v)
5066	}
5067	if value == nil {
5068		return nil
5069	}
5070
5071	shape, ok := value.(map[string]interface{})
5072	if !ok {
5073		return fmt.Errorf("unexpected JSON type %v", value)
5074	}
5075
5076	var sv *types.AssessmentRun
5077	if *v == nil {
5078		sv = &types.AssessmentRun{}
5079	} else {
5080		sv = *v
5081	}
5082
5083	for key, value := range shape {
5084		switch key {
5085		case "arn":
5086			if value != nil {
5087				jtv, ok := value.(string)
5088				if !ok {
5089					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5090				}
5091				sv.Arn = ptr.String(jtv)
5092			}
5093
5094		case "assessmentTemplateArn":
5095			if value != nil {
5096				jtv, ok := value.(string)
5097				if !ok {
5098					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5099				}
5100				sv.AssessmentTemplateArn = ptr.String(jtv)
5101			}
5102
5103		case "completedAt":
5104			if value != nil {
5105				jtv, ok := value.(json.Number)
5106				if !ok {
5107					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5108				}
5109				f64, err := jtv.Float64()
5110				if err != nil {
5111					return err
5112				}
5113				sv.CompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5114			}
5115
5116		case "createdAt":
5117			if value != nil {
5118				jtv, ok := value.(json.Number)
5119				if !ok {
5120					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5121				}
5122				f64, err := jtv.Float64()
5123				if err != nil {
5124					return err
5125				}
5126				sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5127			}
5128
5129		case "dataCollected":
5130			if value != nil {
5131				jtv, ok := value.(bool)
5132				if !ok {
5133					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
5134				}
5135				sv.DataCollected = ptr.Bool(jtv)
5136			}
5137
5138		case "durationInSeconds":
5139			if value != nil {
5140				jtv, ok := value.(json.Number)
5141				if !ok {
5142					return fmt.Errorf("expected AssessmentRunDuration to be json.Number, got %T instead", value)
5143				}
5144				i64, err := jtv.Int64()
5145				if err != nil {
5146					return err
5147				}
5148				sv.DurationInSeconds = int32(i64)
5149			}
5150
5151		case "findingCounts":
5152			if err := awsAwsjson11_deserializeDocumentAssessmentRunFindingCounts(&sv.FindingCounts, value); err != nil {
5153				return err
5154			}
5155
5156		case "name":
5157			if value != nil {
5158				jtv, ok := value.(string)
5159				if !ok {
5160					return fmt.Errorf("expected AssessmentRunName to be of type string, got %T instead", value)
5161				}
5162				sv.Name = ptr.String(jtv)
5163			}
5164
5165		case "notifications":
5166			if err := awsAwsjson11_deserializeDocumentAssessmentRunNotificationList(&sv.Notifications, value); err != nil {
5167				return err
5168			}
5169
5170		case "rulesPackageArns":
5171			if err := awsAwsjson11_deserializeDocumentAssessmentRulesPackageArnList(&sv.RulesPackageArns, value); err != nil {
5172				return err
5173			}
5174
5175		case "startedAt":
5176			if value != nil {
5177				jtv, ok := value.(json.Number)
5178				if !ok {
5179					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5180				}
5181				f64, err := jtv.Float64()
5182				if err != nil {
5183					return err
5184				}
5185				sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5186			}
5187
5188		case "state":
5189			if value != nil {
5190				jtv, ok := value.(string)
5191				if !ok {
5192					return fmt.Errorf("expected AssessmentRunState to be of type string, got %T instead", value)
5193				}
5194				sv.State = types.AssessmentRunState(jtv)
5195			}
5196
5197		case "stateChangedAt":
5198			if value != nil {
5199				jtv, ok := value.(json.Number)
5200				if !ok {
5201					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5202				}
5203				f64, err := jtv.Float64()
5204				if err != nil {
5205					return err
5206				}
5207				sv.StateChangedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5208			}
5209
5210		case "stateChanges":
5211			if err := awsAwsjson11_deserializeDocumentAssessmentRunStateChangeList(&sv.StateChanges, value); err != nil {
5212				return err
5213			}
5214
5215		case "userAttributesForFindings":
5216			if err := awsAwsjson11_deserializeDocumentUserAttributeList(&sv.UserAttributesForFindings, value); err != nil {
5217				return err
5218			}
5219
5220		default:
5221			_, _ = key, value
5222
5223		}
5224	}
5225	*v = sv
5226	return nil
5227}
5228
5229func awsAwsjson11_deserializeDocumentAssessmentRunAgent(v **types.AssessmentRunAgent, value interface{}) error {
5230	if v == nil {
5231		return fmt.Errorf("unexpected nil of type %T", v)
5232	}
5233	if value == nil {
5234		return nil
5235	}
5236
5237	shape, ok := value.(map[string]interface{})
5238	if !ok {
5239		return fmt.Errorf("unexpected JSON type %v", value)
5240	}
5241
5242	var sv *types.AssessmentRunAgent
5243	if *v == nil {
5244		sv = &types.AssessmentRunAgent{}
5245	} else {
5246		sv = *v
5247	}
5248
5249	for key, value := range shape {
5250		switch key {
5251		case "agentHealth":
5252			if value != nil {
5253				jtv, ok := value.(string)
5254				if !ok {
5255					return fmt.Errorf("expected AgentHealth to be of type string, got %T instead", value)
5256				}
5257				sv.AgentHealth = types.AgentHealth(jtv)
5258			}
5259
5260		case "agentHealthCode":
5261			if value != nil {
5262				jtv, ok := value.(string)
5263				if !ok {
5264					return fmt.Errorf("expected AgentHealthCode to be of type string, got %T instead", value)
5265				}
5266				sv.AgentHealthCode = types.AgentHealthCode(jtv)
5267			}
5268
5269		case "agentHealthDetails":
5270			if value != nil {
5271				jtv, ok := value.(string)
5272				if !ok {
5273					return fmt.Errorf("expected Message to be of type string, got %T instead", value)
5274				}
5275				sv.AgentHealthDetails = ptr.String(jtv)
5276			}
5277
5278		case "agentId":
5279			if value != nil {
5280				jtv, ok := value.(string)
5281				if !ok {
5282					return fmt.Errorf("expected AgentId to be of type string, got %T instead", value)
5283				}
5284				sv.AgentId = ptr.String(jtv)
5285			}
5286
5287		case "assessmentRunArn":
5288			if value != nil {
5289				jtv, ok := value.(string)
5290				if !ok {
5291					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5292				}
5293				sv.AssessmentRunArn = ptr.String(jtv)
5294			}
5295
5296		case "autoScalingGroup":
5297			if value != nil {
5298				jtv, ok := value.(string)
5299				if !ok {
5300					return fmt.Errorf("expected AutoScalingGroup to be of type string, got %T instead", value)
5301				}
5302				sv.AutoScalingGroup = ptr.String(jtv)
5303			}
5304
5305		case "telemetryMetadata":
5306			if err := awsAwsjson11_deserializeDocumentTelemetryMetadataList(&sv.TelemetryMetadata, value); err != nil {
5307				return err
5308			}
5309
5310		default:
5311			_, _ = key, value
5312
5313		}
5314	}
5315	*v = sv
5316	return nil
5317}
5318
5319func awsAwsjson11_deserializeDocumentAssessmentRunAgentList(v *[]types.AssessmentRunAgent, value interface{}) error {
5320	if v == nil {
5321		return fmt.Errorf("unexpected nil of type %T", v)
5322	}
5323	if value == nil {
5324		return nil
5325	}
5326
5327	shape, ok := value.([]interface{})
5328	if !ok {
5329		return fmt.Errorf("unexpected JSON type %v", value)
5330	}
5331
5332	var cv []types.AssessmentRunAgent
5333	if *v == nil {
5334		cv = []types.AssessmentRunAgent{}
5335	} else {
5336		cv = *v
5337	}
5338
5339	for _, value := range shape {
5340		var col types.AssessmentRunAgent
5341		destAddr := &col
5342		if err := awsAwsjson11_deserializeDocumentAssessmentRunAgent(&destAddr, value); err != nil {
5343			return err
5344		}
5345		col = *destAddr
5346		cv = append(cv, col)
5347
5348	}
5349	*v = cv
5350	return nil
5351}
5352
5353func awsAwsjson11_deserializeDocumentAssessmentRunFindingCounts(v *map[string]int32, value interface{}) error {
5354	if v == nil {
5355		return fmt.Errorf("unexpected nil of type %T", v)
5356	}
5357	if value == nil {
5358		return nil
5359	}
5360
5361	shape, ok := value.(map[string]interface{})
5362	if !ok {
5363		return fmt.Errorf("unexpected JSON type %v", value)
5364	}
5365
5366	var mv map[string]int32
5367	if *v == nil {
5368		mv = map[string]int32{}
5369	} else {
5370		mv = *v
5371	}
5372
5373	for key, value := range shape {
5374		var parsedVal int32
5375		if value != nil {
5376			jtv, ok := value.(json.Number)
5377			if !ok {
5378				return fmt.Errorf("expected FindingCount to be json.Number, got %T instead", value)
5379			}
5380			i64, err := jtv.Int64()
5381			if err != nil {
5382				return err
5383			}
5384			parsedVal = int32(i64)
5385		}
5386		mv[key] = parsedVal
5387
5388	}
5389	*v = mv
5390	return nil
5391}
5392
5393func awsAwsjson11_deserializeDocumentAssessmentRunInProgressArnList(v *[]string, value interface{}) error {
5394	if v == nil {
5395		return fmt.Errorf("unexpected nil of type %T", v)
5396	}
5397	if value == nil {
5398		return nil
5399	}
5400
5401	shape, ok := value.([]interface{})
5402	if !ok {
5403		return fmt.Errorf("unexpected JSON type %v", value)
5404	}
5405
5406	var cv []string
5407	if *v == nil {
5408		cv = []string{}
5409	} else {
5410		cv = *v
5411	}
5412
5413	for _, value := range shape {
5414		var col string
5415		if value != nil {
5416			jtv, ok := value.(string)
5417			if !ok {
5418				return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5419			}
5420			col = jtv
5421		}
5422		cv = append(cv, col)
5423
5424	}
5425	*v = cv
5426	return nil
5427}
5428
5429func awsAwsjson11_deserializeDocumentAssessmentRunInProgressException(v **types.AssessmentRunInProgressException, value interface{}) error {
5430	if v == nil {
5431		return fmt.Errorf("unexpected nil of type %T", v)
5432	}
5433	if value == nil {
5434		return nil
5435	}
5436
5437	shape, ok := value.(map[string]interface{})
5438	if !ok {
5439		return fmt.Errorf("unexpected JSON type %v", value)
5440	}
5441
5442	var sv *types.AssessmentRunInProgressException
5443	if *v == nil {
5444		sv = &types.AssessmentRunInProgressException{}
5445	} else {
5446		sv = *v
5447	}
5448
5449	for key, value := range shape {
5450		switch key {
5451		case "assessmentRunArns":
5452			if err := awsAwsjson11_deserializeDocumentAssessmentRunInProgressArnList(&sv.AssessmentRunArns, value); err != nil {
5453				return err
5454			}
5455
5456		case "assessmentRunArnsTruncated":
5457			if value != nil {
5458				jtv, ok := value.(bool)
5459				if !ok {
5460					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
5461				}
5462				sv.AssessmentRunArnsTruncated = ptr.Bool(jtv)
5463			}
5464
5465		case "canRetry":
5466			if value != nil {
5467				jtv, ok := value.(bool)
5468				if !ok {
5469					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
5470				}
5471				sv.CanRetry = ptr.Bool(jtv)
5472			}
5473
5474		case "message":
5475			if value != nil {
5476				jtv, ok := value.(string)
5477				if !ok {
5478					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
5479				}
5480				sv.Message = ptr.String(jtv)
5481			}
5482
5483		default:
5484			_, _ = key, value
5485
5486		}
5487	}
5488	*v = sv
5489	return nil
5490}
5491
5492func awsAwsjson11_deserializeDocumentAssessmentRunList(v *[]types.AssessmentRun, value interface{}) error {
5493	if v == nil {
5494		return fmt.Errorf("unexpected nil of type %T", v)
5495	}
5496	if value == nil {
5497		return nil
5498	}
5499
5500	shape, ok := value.([]interface{})
5501	if !ok {
5502		return fmt.Errorf("unexpected JSON type %v", value)
5503	}
5504
5505	var cv []types.AssessmentRun
5506	if *v == nil {
5507		cv = []types.AssessmentRun{}
5508	} else {
5509		cv = *v
5510	}
5511
5512	for _, value := range shape {
5513		var col types.AssessmentRun
5514		destAddr := &col
5515		if err := awsAwsjson11_deserializeDocumentAssessmentRun(&destAddr, value); err != nil {
5516			return err
5517		}
5518		col = *destAddr
5519		cv = append(cv, col)
5520
5521	}
5522	*v = cv
5523	return nil
5524}
5525
5526func awsAwsjson11_deserializeDocumentAssessmentRunNotification(v **types.AssessmentRunNotification, value interface{}) error {
5527	if v == nil {
5528		return fmt.Errorf("unexpected nil of type %T", v)
5529	}
5530	if value == nil {
5531		return nil
5532	}
5533
5534	shape, ok := value.(map[string]interface{})
5535	if !ok {
5536		return fmt.Errorf("unexpected JSON type %v", value)
5537	}
5538
5539	var sv *types.AssessmentRunNotification
5540	if *v == nil {
5541		sv = &types.AssessmentRunNotification{}
5542	} else {
5543		sv = *v
5544	}
5545
5546	for key, value := range shape {
5547		switch key {
5548		case "date":
5549			if value != nil {
5550				jtv, ok := value.(json.Number)
5551				if !ok {
5552					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5553				}
5554				f64, err := jtv.Float64()
5555				if err != nil {
5556					return err
5557				}
5558				sv.Date = ptr.Time(smithytime.ParseEpochSeconds(f64))
5559			}
5560
5561		case "error":
5562			if value != nil {
5563				jtv, ok := value.(bool)
5564				if !ok {
5565					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
5566				}
5567				sv.Error = ptr.Bool(jtv)
5568			}
5569
5570		case "event":
5571			if value != nil {
5572				jtv, ok := value.(string)
5573				if !ok {
5574					return fmt.Errorf("expected InspectorEvent to be of type string, got %T instead", value)
5575				}
5576				sv.Event = types.InspectorEvent(jtv)
5577			}
5578
5579		case "message":
5580			if value != nil {
5581				jtv, ok := value.(string)
5582				if !ok {
5583					return fmt.Errorf("expected Message to be of type string, got %T instead", value)
5584				}
5585				sv.Message = ptr.String(jtv)
5586			}
5587
5588		case "snsPublishStatusCode":
5589			if value != nil {
5590				jtv, ok := value.(string)
5591				if !ok {
5592					return fmt.Errorf("expected AssessmentRunNotificationSnsStatusCode to be of type string, got %T instead", value)
5593				}
5594				sv.SnsPublishStatusCode = types.AssessmentRunNotificationSnsStatusCode(jtv)
5595			}
5596
5597		case "snsTopicArn":
5598			if value != nil {
5599				jtv, ok := value.(string)
5600				if !ok {
5601					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5602				}
5603				sv.SnsTopicArn = ptr.String(jtv)
5604			}
5605
5606		default:
5607			_, _ = key, value
5608
5609		}
5610	}
5611	*v = sv
5612	return nil
5613}
5614
5615func awsAwsjson11_deserializeDocumentAssessmentRunNotificationList(v *[]types.AssessmentRunNotification, value interface{}) error {
5616	if v == nil {
5617		return fmt.Errorf("unexpected nil of type %T", v)
5618	}
5619	if value == nil {
5620		return nil
5621	}
5622
5623	shape, ok := value.([]interface{})
5624	if !ok {
5625		return fmt.Errorf("unexpected JSON type %v", value)
5626	}
5627
5628	var cv []types.AssessmentRunNotification
5629	if *v == nil {
5630		cv = []types.AssessmentRunNotification{}
5631	} else {
5632		cv = *v
5633	}
5634
5635	for _, value := range shape {
5636		var col types.AssessmentRunNotification
5637		destAddr := &col
5638		if err := awsAwsjson11_deserializeDocumentAssessmentRunNotification(&destAddr, value); err != nil {
5639			return err
5640		}
5641		col = *destAddr
5642		cv = append(cv, col)
5643
5644	}
5645	*v = cv
5646	return nil
5647}
5648
5649func awsAwsjson11_deserializeDocumentAssessmentRunStateChange(v **types.AssessmentRunStateChange, value interface{}) error {
5650	if v == nil {
5651		return fmt.Errorf("unexpected nil of type %T", v)
5652	}
5653	if value == nil {
5654		return nil
5655	}
5656
5657	shape, ok := value.(map[string]interface{})
5658	if !ok {
5659		return fmt.Errorf("unexpected JSON type %v", value)
5660	}
5661
5662	var sv *types.AssessmentRunStateChange
5663	if *v == nil {
5664		sv = &types.AssessmentRunStateChange{}
5665	} else {
5666		sv = *v
5667	}
5668
5669	for key, value := range shape {
5670		switch key {
5671		case "state":
5672			if value != nil {
5673				jtv, ok := value.(string)
5674				if !ok {
5675					return fmt.Errorf("expected AssessmentRunState to be of type string, got %T instead", value)
5676				}
5677				sv.State = types.AssessmentRunState(jtv)
5678			}
5679
5680		case "stateChangedAt":
5681			if value != nil {
5682				jtv, ok := value.(json.Number)
5683				if !ok {
5684					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5685				}
5686				f64, err := jtv.Float64()
5687				if err != nil {
5688					return err
5689				}
5690				sv.StateChangedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5691			}
5692
5693		default:
5694			_, _ = key, value
5695
5696		}
5697	}
5698	*v = sv
5699	return nil
5700}
5701
5702func awsAwsjson11_deserializeDocumentAssessmentRunStateChangeList(v *[]types.AssessmentRunStateChange, value interface{}) error {
5703	if v == nil {
5704		return fmt.Errorf("unexpected nil of type %T", v)
5705	}
5706	if value == nil {
5707		return nil
5708	}
5709
5710	shape, ok := value.([]interface{})
5711	if !ok {
5712		return fmt.Errorf("unexpected JSON type %v", value)
5713	}
5714
5715	var cv []types.AssessmentRunStateChange
5716	if *v == nil {
5717		cv = []types.AssessmentRunStateChange{}
5718	} else {
5719		cv = *v
5720	}
5721
5722	for _, value := range shape {
5723		var col types.AssessmentRunStateChange
5724		destAddr := &col
5725		if err := awsAwsjson11_deserializeDocumentAssessmentRunStateChange(&destAddr, value); err != nil {
5726			return err
5727		}
5728		col = *destAddr
5729		cv = append(cv, col)
5730
5731	}
5732	*v = cv
5733	return nil
5734}
5735
5736func awsAwsjson11_deserializeDocumentAssessmentTarget(v **types.AssessmentTarget, value interface{}) error {
5737	if v == nil {
5738		return fmt.Errorf("unexpected nil of type %T", v)
5739	}
5740	if value == nil {
5741		return nil
5742	}
5743
5744	shape, ok := value.(map[string]interface{})
5745	if !ok {
5746		return fmt.Errorf("unexpected JSON type %v", value)
5747	}
5748
5749	var sv *types.AssessmentTarget
5750	if *v == nil {
5751		sv = &types.AssessmentTarget{}
5752	} else {
5753		sv = *v
5754	}
5755
5756	for key, value := range shape {
5757		switch key {
5758		case "arn":
5759			if value != nil {
5760				jtv, ok := value.(string)
5761				if !ok {
5762					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5763				}
5764				sv.Arn = ptr.String(jtv)
5765			}
5766
5767		case "createdAt":
5768			if value != nil {
5769				jtv, ok := value.(json.Number)
5770				if !ok {
5771					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5772				}
5773				f64, err := jtv.Float64()
5774				if err != nil {
5775					return err
5776				}
5777				sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5778			}
5779
5780		case "name":
5781			if value != nil {
5782				jtv, ok := value.(string)
5783				if !ok {
5784					return fmt.Errorf("expected AssessmentTargetName to be of type string, got %T instead", value)
5785				}
5786				sv.Name = ptr.String(jtv)
5787			}
5788
5789		case "resourceGroupArn":
5790			if value != nil {
5791				jtv, ok := value.(string)
5792				if !ok {
5793					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5794				}
5795				sv.ResourceGroupArn = ptr.String(jtv)
5796			}
5797
5798		case "updatedAt":
5799			if value != nil {
5800				jtv, ok := value.(json.Number)
5801				if !ok {
5802					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5803				}
5804				f64, err := jtv.Float64()
5805				if err != nil {
5806					return err
5807				}
5808				sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5809			}
5810
5811		default:
5812			_, _ = key, value
5813
5814		}
5815	}
5816	*v = sv
5817	return nil
5818}
5819
5820func awsAwsjson11_deserializeDocumentAssessmentTargetList(v *[]types.AssessmentTarget, value interface{}) error {
5821	if v == nil {
5822		return fmt.Errorf("unexpected nil of type %T", v)
5823	}
5824	if value == nil {
5825		return nil
5826	}
5827
5828	shape, ok := value.([]interface{})
5829	if !ok {
5830		return fmt.Errorf("unexpected JSON type %v", value)
5831	}
5832
5833	var cv []types.AssessmentTarget
5834	if *v == nil {
5835		cv = []types.AssessmentTarget{}
5836	} else {
5837		cv = *v
5838	}
5839
5840	for _, value := range shape {
5841		var col types.AssessmentTarget
5842		destAddr := &col
5843		if err := awsAwsjson11_deserializeDocumentAssessmentTarget(&destAddr, value); err != nil {
5844			return err
5845		}
5846		col = *destAddr
5847		cv = append(cv, col)
5848
5849	}
5850	*v = cv
5851	return nil
5852}
5853
5854func awsAwsjson11_deserializeDocumentAssessmentTemplate(v **types.AssessmentTemplate, value interface{}) error {
5855	if v == nil {
5856		return fmt.Errorf("unexpected nil of type %T", v)
5857	}
5858	if value == nil {
5859		return nil
5860	}
5861
5862	shape, ok := value.(map[string]interface{})
5863	if !ok {
5864		return fmt.Errorf("unexpected JSON type %v", value)
5865	}
5866
5867	var sv *types.AssessmentTemplate
5868	if *v == nil {
5869		sv = &types.AssessmentTemplate{}
5870	} else {
5871		sv = *v
5872	}
5873
5874	for key, value := range shape {
5875		switch key {
5876		case "arn":
5877			if value != nil {
5878				jtv, ok := value.(string)
5879				if !ok {
5880					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5881				}
5882				sv.Arn = ptr.String(jtv)
5883			}
5884
5885		case "assessmentRunCount":
5886			if value != nil {
5887				jtv, ok := value.(json.Number)
5888				if !ok {
5889					return fmt.Errorf("expected ArnCount to be json.Number, got %T instead", value)
5890				}
5891				i64, err := jtv.Int64()
5892				if err != nil {
5893					return err
5894				}
5895				sv.AssessmentRunCount = ptr.Int32(int32(i64))
5896			}
5897
5898		case "assessmentTargetArn":
5899			if value != nil {
5900				jtv, ok := value.(string)
5901				if !ok {
5902					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5903				}
5904				sv.AssessmentTargetArn = ptr.String(jtv)
5905			}
5906
5907		case "createdAt":
5908			if value != nil {
5909				jtv, ok := value.(json.Number)
5910				if !ok {
5911					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
5912				}
5913				f64, err := jtv.Float64()
5914				if err != nil {
5915					return err
5916				}
5917				sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
5918			}
5919
5920		case "durationInSeconds":
5921			if value != nil {
5922				jtv, ok := value.(json.Number)
5923				if !ok {
5924					return fmt.Errorf("expected AssessmentRunDuration to be json.Number, got %T instead", value)
5925				}
5926				i64, err := jtv.Int64()
5927				if err != nil {
5928					return err
5929				}
5930				sv.DurationInSeconds = int32(i64)
5931			}
5932
5933		case "lastAssessmentRunArn":
5934			if value != nil {
5935				jtv, ok := value.(string)
5936				if !ok {
5937					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
5938				}
5939				sv.LastAssessmentRunArn = ptr.String(jtv)
5940			}
5941
5942		case "name":
5943			if value != nil {
5944				jtv, ok := value.(string)
5945				if !ok {
5946					return fmt.Errorf("expected AssessmentTemplateName to be of type string, got %T instead", value)
5947				}
5948				sv.Name = ptr.String(jtv)
5949			}
5950
5951		case "rulesPackageArns":
5952			if err := awsAwsjson11_deserializeDocumentAssessmentTemplateRulesPackageArnList(&sv.RulesPackageArns, value); err != nil {
5953				return err
5954			}
5955
5956		case "userAttributesForFindings":
5957			if err := awsAwsjson11_deserializeDocumentUserAttributeList(&sv.UserAttributesForFindings, value); err != nil {
5958				return err
5959			}
5960
5961		default:
5962			_, _ = key, value
5963
5964		}
5965	}
5966	*v = sv
5967	return nil
5968}
5969
5970func awsAwsjson11_deserializeDocumentAssessmentTemplateList(v *[]types.AssessmentTemplate, value interface{}) error {
5971	if v == nil {
5972		return fmt.Errorf("unexpected nil of type %T", v)
5973	}
5974	if value == nil {
5975		return nil
5976	}
5977
5978	shape, ok := value.([]interface{})
5979	if !ok {
5980		return fmt.Errorf("unexpected JSON type %v", value)
5981	}
5982
5983	var cv []types.AssessmentTemplate
5984	if *v == nil {
5985		cv = []types.AssessmentTemplate{}
5986	} else {
5987		cv = *v
5988	}
5989
5990	for _, value := range shape {
5991		var col types.AssessmentTemplate
5992		destAddr := &col
5993		if err := awsAwsjson11_deserializeDocumentAssessmentTemplate(&destAddr, value); err != nil {
5994			return err
5995		}
5996		col = *destAddr
5997		cv = append(cv, col)
5998
5999	}
6000	*v = cv
6001	return nil
6002}
6003
6004func awsAwsjson11_deserializeDocumentAssessmentTemplateRulesPackageArnList(v *[]string, value interface{}) error {
6005	if v == nil {
6006		return fmt.Errorf("unexpected nil of type %T", v)
6007	}
6008	if value == nil {
6009		return nil
6010	}
6011
6012	shape, ok := value.([]interface{})
6013	if !ok {
6014		return fmt.Errorf("unexpected JSON type %v", value)
6015	}
6016
6017	var cv []string
6018	if *v == nil {
6019		cv = []string{}
6020	} else {
6021		cv = *v
6022	}
6023
6024	for _, value := range shape {
6025		var col string
6026		if value != nil {
6027			jtv, ok := value.(string)
6028			if !ok {
6029				return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
6030			}
6031			col = jtv
6032		}
6033		cv = append(cv, col)
6034
6035	}
6036	*v = cv
6037	return nil
6038}
6039
6040func awsAwsjson11_deserializeDocumentAssetAttributes(v **types.AssetAttributes, value interface{}) error {
6041	if v == nil {
6042		return fmt.Errorf("unexpected nil of type %T", v)
6043	}
6044	if value == nil {
6045		return nil
6046	}
6047
6048	shape, ok := value.(map[string]interface{})
6049	if !ok {
6050		return fmt.Errorf("unexpected JSON type %v", value)
6051	}
6052
6053	var sv *types.AssetAttributes
6054	if *v == nil {
6055		sv = &types.AssetAttributes{}
6056	} else {
6057		sv = *v
6058	}
6059
6060	for key, value := range shape {
6061		switch key {
6062		case "agentId":
6063			if value != nil {
6064				jtv, ok := value.(string)
6065				if !ok {
6066					return fmt.Errorf("expected AgentId to be of type string, got %T instead", value)
6067				}
6068				sv.AgentId = ptr.String(jtv)
6069			}
6070
6071		case "amiId":
6072			if value != nil {
6073				jtv, ok := value.(string)
6074				if !ok {
6075					return fmt.Errorf("expected AmiId to be of type string, got %T instead", value)
6076				}
6077				sv.AmiId = ptr.String(jtv)
6078			}
6079
6080		case "autoScalingGroup":
6081			if value != nil {
6082				jtv, ok := value.(string)
6083				if !ok {
6084					return fmt.Errorf("expected AutoScalingGroup to be of type string, got %T instead", value)
6085				}
6086				sv.AutoScalingGroup = ptr.String(jtv)
6087			}
6088
6089		case "hostname":
6090			if value != nil {
6091				jtv, ok := value.(string)
6092				if !ok {
6093					return fmt.Errorf("expected Hostname to be of type string, got %T instead", value)
6094				}
6095				sv.Hostname = ptr.String(jtv)
6096			}
6097
6098		case "ipv4Addresses":
6099			if err := awsAwsjson11_deserializeDocumentIpv4AddressList(&sv.Ipv4Addresses, value); err != nil {
6100				return err
6101			}
6102
6103		case "networkInterfaces":
6104			if err := awsAwsjson11_deserializeDocumentNetworkInterfaces(&sv.NetworkInterfaces, value); err != nil {
6105				return err
6106			}
6107
6108		case "schemaVersion":
6109			if value != nil {
6110				jtv, ok := value.(json.Number)
6111				if !ok {
6112					return fmt.Errorf("expected NumericVersion to be json.Number, got %T instead", value)
6113				}
6114				i64, err := jtv.Int64()
6115				if err != nil {
6116					return err
6117				}
6118				sv.SchemaVersion = int32(i64)
6119			}
6120
6121		case "tags":
6122			if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil {
6123				return err
6124			}
6125
6126		default:
6127			_, _ = key, value
6128
6129		}
6130	}
6131	*v = sv
6132	return nil
6133}
6134
6135func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error {
6136	if v == nil {
6137		return fmt.Errorf("unexpected nil of type %T", v)
6138	}
6139	if value == nil {
6140		return nil
6141	}
6142
6143	shape, ok := value.(map[string]interface{})
6144	if !ok {
6145		return fmt.Errorf("unexpected JSON type %v", value)
6146	}
6147
6148	var sv *types.Attribute
6149	if *v == nil {
6150		sv = &types.Attribute{}
6151	} else {
6152		sv = *v
6153	}
6154
6155	for key, value := range shape {
6156		switch key {
6157		case "key":
6158			if value != nil {
6159				jtv, ok := value.(string)
6160				if !ok {
6161					return fmt.Errorf("expected AttributeKey to be of type string, got %T instead", value)
6162				}
6163				sv.Key = ptr.String(jtv)
6164			}
6165
6166		case "value":
6167			if value != nil {
6168				jtv, ok := value.(string)
6169				if !ok {
6170					return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value)
6171				}
6172				sv.Value = ptr.String(jtv)
6173			}
6174
6175		default:
6176			_, _ = key, value
6177
6178		}
6179	}
6180	*v = sv
6181	return nil
6182}
6183
6184func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value interface{}) error {
6185	if v == nil {
6186		return fmt.Errorf("unexpected nil of type %T", v)
6187	}
6188	if value == nil {
6189		return nil
6190	}
6191
6192	shape, ok := value.([]interface{})
6193	if !ok {
6194		return fmt.Errorf("unexpected JSON type %v", value)
6195	}
6196
6197	var cv []types.Attribute
6198	if *v == nil {
6199		cv = []types.Attribute{}
6200	} else {
6201		cv = *v
6202	}
6203
6204	for _, value := range shape {
6205		var col types.Attribute
6206		destAddr := &col
6207		if err := awsAwsjson11_deserializeDocumentAttribute(&destAddr, value); err != nil {
6208			return err
6209		}
6210		col = *destAddr
6211		cv = append(cv, col)
6212
6213	}
6214	*v = cv
6215	return nil
6216}
6217
6218func awsAwsjson11_deserializeDocumentEventSubscription(v **types.EventSubscription, value interface{}) error {
6219	if v == nil {
6220		return fmt.Errorf("unexpected nil of type %T", v)
6221	}
6222	if value == nil {
6223		return nil
6224	}
6225
6226	shape, ok := value.(map[string]interface{})
6227	if !ok {
6228		return fmt.Errorf("unexpected JSON type %v", value)
6229	}
6230
6231	var sv *types.EventSubscription
6232	if *v == nil {
6233		sv = &types.EventSubscription{}
6234	} else {
6235		sv = *v
6236	}
6237
6238	for key, value := range shape {
6239		switch key {
6240		case "event":
6241			if value != nil {
6242				jtv, ok := value.(string)
6243				if !ok {
6244					return fmt.Errorf("expected InspectorEvent to be of type string, got %T instead", value)
6245				}
6246				sv.Event = types.InspectorEvent(jtv)
6247			}
6248
6249		case "subscribedAt":
6250			if value != nil {
6251				jtv, ok := value.(json.Number)
6252				if !ok {
6253					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
6254				}
6255				f64, err := jtv.Float64()
6256				if err != nil {
6257					return err
6258				}
6259				sv.SubscribedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
6260			}
6261
6262		default:
6263			_, _ = key, value
6264
6265		}
6266	}
6267	*v = sv
6268	return nil
6269}
6270
6271func awsAwsjson11_deserializeDocumentEventSubscriptionList(v *[]types.EventSubscription, value interface{}) error {
6272	if v == nil {
6273		return fmt.Errorf("unexpected nil of type %T", v)
6274	}
6275	if value == nil {
6276		return nil
6277	}
6278
6279	shape, ok := value.([]interface{})
6280	if !ok {
6281		return fmt.Errorf("unexpected JSON type %v", value)
6282	}
6283
6284	var cv []types.EventSubscription
6285	if *v == nil {
6286		cv = []types.EventSubscription{}
6287	} else {
6288		cv = *v
6289	}
6290
6291	for _, value := range shape {
6292		var col types.EventSubscription
6293		destAddr := &col
6294		if err := awsAwsjson11_deserializeDocumentEventSubscription(&destAddr, value); err != nil {
6295			return err
6296		}
6297		col = *destAddr
6298		cv = append(cv, col)
6299
6300	}
6301	*v = cv
6302	return nil
6303}
6304
6305func awsAwsjson11_deserializeDocumentExclusion(v **types.Exclusion, value interface{}) error {
6306	if v == nil {
6307		return fmt.Errorf("unexpected nil of type %T", v)
6308	}
6309	if value == nil {
6310		return nil
6311	}
6312
6313	shape, ok := value.(map[string]interface{})
6314	if !ok {
6315		return fmt.Errorf("unexpected JSON type %v", value)
6316	}
6317
6318	var sv *types.Exclusion
6319	if *v == nil {
6320		sv = &types.Exclusion{}
6321	} else {
6322		sv = *v
6323	}
6324
6325	for key, value := range shape {
6326		switch key {
6327		case "arn":
6328			if value != nil {
6329				jtv, ok := value.(string)
6330				if !ok {
6331					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
6332				}
6333				sv.Arn = ptr.String(jtv)
6334			}
6335
6336		case "attributes":
6337			if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil {
6338				return err
6339			}
6340
6341		case "description":
6342			if value != nil {
6343				jtv, ok := value.(string)
6344				if !ok {
6345					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6346				}
6347				sv.Description = ptr.String(jtv)
6348			}
6349
6350		case "recommendation":
6351			if value != nil {
6352				jtv, ok := value.(string)
6353				if !ok {
6354					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6355				}
6356				sv.Recommendation = ptr.String(jtv)
6357			}
6358
6359		case "scopes":
6360			if err := awsAwsjson11_deserializeDocumentScopeList(&sv.Scopes, value); err != nil {
6361				return err
6362			}
6363
6364		case "title":
6365			if value != nil {
6366				jtv, ok := value.(string)
6367				if !ok {
6368					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6369				}
6370				sv.Title = ptr.String(jtv)
6371			}
6372
6373		default:
6374			_, _ = key, value
6375
6376		}
6377	}
6378	*v = sv
6379	return nil
6380}
6381
6382func awsAwsjson11_deserializeDocumentExclusionMap(v *map[string]types.Exclusion, value interface{}) error {
6383	if v == nil {
6384		return fmt.Errorf("unexpected nil of type %T", v)
6385	}
6386	if value == nil {
6387		return nil
6388	}
6389
6390	shape, ok := value.(map[string]interface{})
6391	if !ok {
6392		return fmt.Errorf("unexpected JSON type %v", value)
6393	}
6394
6395	var mv map[string]types.Exclusion
6396	if *v == nil {
6397		mv = map[string]types.Exclusion{}
6398	} else {
6399		mv = *v
6400	}
6401
6402	for key, value := range shape {
6403		var parsedVal types.Exclusion
6404		mapVar := parsedVal
6405		destAddr := &mapVar
6406		if err := awsAwsjson11_deserializeDocumentExclusion(&destAddr, value); err != nil {
6407			return err
6408		}
6409		parsedVal = *destAddr
6410		mv[key] = parsedVal
6411
6412	}
6413	*v = mv
6414	return nil
6415}
6416
6417func awsAwsjson11_deserializeDocumentExclusionPreview(v **types.ExclusionPreview, value interface{}) error {
6418	if v == nil {
6419		return fmt.Errorf("unexpected nil of type %T", v)
6420	}
6421	if value == nil {
6422		return nil
6423	}
6424
6425	shape, ok := value.(map[string]interface{})
6426	if !ok {
6427		return fmt.Errorf("unexpected JSON type %v", value)
6428	}
6429
6430	var sv *types.ExclusionPreview
6431	if *v == nil {
6432		sv = &types.ExclusionPreview{}
6433	} else {
6434		sv = *v
6435	}
6436
6437	for key, value := range shape {
6438		switch key {
6439		case "attributes":
6440			if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil {
6441				return err
6442			}
6443
6444		case "description":
6445			if value != nil {
6446				jtv, ok := value.(string)
6447				if !ok {
6448					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6449				}
6450				sv.Description = ptr.String(jtv)
6451			}
6452
6453		case "recommendation":
6454			if value != nil {
6455				jtv, ok := value.(string)
6456				if !ok {
6457					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6458				}
6459				sv.Recommendation = ptr.String(jtv)
6460			}
6461
6462		case "scopes":
6463			if err := awsAwsjson11_deserializeDocumentScopeList(&sv.Scopes, value); err != nil {
6464				return err
6465			}
6466
6467		case "title":
6468			if value != nil {
6469				jtv, ok := value.(string)
6470				if !ok {
6471					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6472				}
6473				sv.Title = ptr.String(jtv)
6474			}
6475
6476		default:
6477			_, _ = key, value
6478
6479		}
6480	}
6481	*v = sv
6482	return nil
6483}
6484
6485func awsAwsjson11_deserializeDocumentExclusionPreviewList(v *[]types.ExclusionPreview, value interface{}) error {
6486	if v == nil {
6487		return fmt.Errorf("unexpected nil of type %T", v)
6488	}
6489	if value == nil {
6490		return nil
6491	}
6492
6493	shape, ok := value.([]interface{})
6494	if !ok {
6495		return fmt.Errorf("unexpected JSON type %v", value)
6496	}
6497
6498	var cv []types.ExclusionPreview
6499	if *v == nil {
6500		cv = []types.ExclusionPreview{}
6501	} else {
6502		cv = *v
6503	}
6504
6505	for _, value := range shape {
6506		var col types.ExclusionPreview
6507		destAddr := &col
6508		if err := awsAwsjson11_deserializeDocumentExclusionPreview(&destAddr, value); err != nil {
6509			return err
6510		}
6511		col = *destAddr
6512		cv = append(cv, col)
6513
6514	}
6515	*v = cv
6516	return nil
6517}
6518
6519func awsAwsjson11_deserializeDocumentFailedItemDetails(v **types.FailedItemDetails, value interface{}) error {
6520	if v == nil {
6521		return fmt.Errorf("unexpected nil of type %T", v)
6522	}
6523	if value == nil {
6524		return nil
6525	}
6526
6527	shape, ok := value.(map[string]interface{})
6528	if !ok {
6529		return fmt.Errorf("unexpected JSON type %v", value)
6530	}
6531
6532	var sv *types.FailedItemDetails
6533	if *v == nil {
6534		sv = &types.FailedItemDetails{}
6535	} else {
6536		sv = *v
6537	}
6538
6539	for key, value := range shape {
6540		switch key {
6541		case "failureCode":
6542			if value != nil {
6543				jtv, ok := value.(string)
6544				if !ok {
6545					return fmt.Errorf("expected FailedItemErrorCode to be of type string, got %T instead", value)
6546				}
6547				sv.FailureCode = types.FailedItemErrorCode(jtv)
6548			}
6549
6550		case "retryable":
6551			if value != nil {
6552				jtv, ok := value.(bool)
6553				if !ok {
6554					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
6555				}
6556				sv.Retryable = ptr.Bool(jtv)
6557			}
6558
6559		default:
6560			_, _ = key, value
6561
6562		}
6563	}
6564	*v = sv
6565	return nil
6566}
6567
6568func awsAwsjson11_deserializeDocumentFailedItems(v *map[string]types.FailedItemDetails, value interface{}) error {
6569	if v == nil {
6570		return fmt.Errorf("unexpected nil of type %T", v)
6571	}
6572	if value == nil {
6573		return nil
6574	}
6575
6576	shape, ok := value.(map[string]interface{})
6577	if !ok {
6578		return fmt.Errorf("unexpected JSON type %v", value)
6579	}
6580
6581	var mv map[string]types.FailedItemDetails
6582	if *v == nil {
6583		mv = map[string]types.FailedItemDetails{}
6584	} else {
6585		mv = *v
6586	}
6587
6588	for key, value := range shape {
6589		var parsedVal types.FailedItemDetails
6590		mapVar := parsedVal
6591		destAddr := &mapVar
6592		if err := awsAwsjson11_deserializeDocumentFailedItemDetails(&destAddr, value); err != nil {
6593			return err
6594		}
6595		parsedVal = *destAddr
6596		mv[key] = parsedVal
6597
6598	}
6599	*v = mv
6600	return nil
6601}
6602
6603func awsAwsjson11_deserializeDocumentFinding(v **types.Finding, value interface{}) error {
6604	if v == nil {
6605		return fmt.Errorf("unexpected nil of type %T", v)
6606	}
6607	if value == nil {
6608		return nil
6609	}
6610
6611	shape, ok := value.(map[string]interface{})
6612	if !ok {
6613		return fmt.Errorf("unexpected JSON type %v", value)
6614	}
6615
6616	var sv *types.Finding
6617	if *v == nil {
6618		sv = &types.Finding{}
6619	} else {
6620		sv = *v
6621	}
6622
6623	for key, value := range shape {
6624		switch key {
6625		case "arn":
6626			if value != nil {
6627				jtv, ok := value.(string)
6628				if !ok {
6629					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
6630				}
6631				sv.Arn = ptr.String(jtv)
6632			}
6633
6634		case "assetAttributes":
6635			if err := awsAwsjson11_deserializeDocumentAssetAttributes(&sv.AssetAttributes, value); err != nil {
6636				return err
6637			}
6638
6639		case "assetType":
6640			if value != nil {
6641				jtv, ok := value.(string)
6642				if !ok {
6643					return fmt.Errorf("expected AssetType to be of type string, got %T instead", value)
6644				}
6645				sv.AssetType = types.AssetType(jtv)
6646			}
6647
6648		case "attributes":
6649			if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil {
6650				return err
6651			}
6652
6653		case "confidence":
6654			if value != nil {
6655				jtv, ok := value.(json.Number)
6656				if !ok {
6657					return fmt.Errorf("expected IocConfidence to be json.Number, got %T instead", value)
6658				}
6659				i64, err := jtv.Int64()
6660				if err != nil {
6661					return err
6662				}
6663				sv.Confidence = int32(i64)
6664			}
6665
6666		case "createdAt":
6667			if value != nil {
6668				jtv, ok := value.(json.Number)
6669				if !ok {
6670					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
6671				}
6672				f64, err := jtv.Float64()
6673				if err != nil {
6674					return err
6675				}
6676				sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
6677			}
6678
6679		case "description":
6680			if value != nil {
6681				jtv, ok := value.(string)
6682				if !ok {
6683					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6684				}
6685				sv.Description = ptr.String(jtv)
6686			}
6687
6688		case "id":
6689			if value != nil {
6690				jtv, ok := value.(string)
6691				if !ok {
6692					return fmt.Errorf("expected FindingId to be of type string, got %T instead", value)
6693				}
6694				sv.Id = ptr.String(jtv)
6695			}
6696
6697		case "indicatorOfCompromise":
6698			if value != nil {
6699				jtv, ok := value.(bool)
6700				if !ok {
6701					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
6702				}
6703				sv.IndicatorOfCompromise = ptr.Bool(jtv)
6704			}
6705
6706		case "numericSeverity":
6707			if value != nil {
6708				jtv, ok := value.(json.Number)
6709				if !ok {
6710					return fmt.Errorf("expected NumericSeverity to be json.Number, got %T instead", value)
6711				}
6712				f64, err := jtv.Float64()
6713				if err != nil {
6714					return err
6715				}
6716				sv.NumericSeverity = f64
6717			}
6718
6719		case "recommendation":
6720			if value != nil {
6721				jtv, ok := value.(string)
6722				if !ok {
6723					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6724				}
6725				sv.Recommendation = ptr.String(jtv)
6726			}
6727
6728		case "schemaVersion":
6729			if value != nil {
6730				jtv, ok := value.(json.Number)
6731				if !ok {
6732					return fmt.Errorf("expected NumericVersion to be json.Number, got %T instead", value)
6733				}
6734				i64, err := jtv.Int64()
6735				if err != nil {
6736					return err
6737				}
6738				sv.SchemaVersion = int32(i64)
6739			}
6740
6741		case "service":
6742			if value != nil {
6743				jtv, ok := value.(string)
6744				if !ok {
6745					return fmt.Errorf("expected ServiceName to be of type string, got %T instead", value)
6746				}
6747				sv.Service = ptr.String(jtv)
6748			}
6749
6750		case "serviceAttributes":
6751			if err := awsAwsjson11_deserializeDocumentInspectorServiceAttributes(&sv.ServiceAttributes, value); err != nil {
6752				return err
6753			}
6754
6755		case "severity":
6756			if value != nil {
6757				jtv, ok := value.(string)
6758				if !ok {
6759					return fmt.Errorf("expected Severity to be of type string, got %T instead", value)
6760				}
6761				sv.Severity = types.Severity(jtv)
6762			}
6763
6764		case "title":
6765			if value != nil {
6766				jtv, ok := value.(string)
6767				if !ok {
6768					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
6769				}
6770				sv.Title = ptr.String(jtv)
6771			}
6772
6773		case "updatedAt":
6774			if value != nil {
6775				jtv, ok := value.(json.Number)
6776				if !ok {
6777					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
6778				}
6779				f64, err := jtv.Float64()
6780				if err != nil {
6781					return err
6782				}
6783				sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
6784			}
6785
6786		case "userAttributes":
6787			if err := awsAwsjson11_deserializeDocumentUserAttributeList(&sv.UserAttributes, value); err != nil {
6788				return err
6789			}
6790
6791		default:
6792			_, _ = key, value
6793
6794		}
6795	}
6796	*v = sv
6797	return nil
6798}
6799
6800func awsAwsjson11_deserializeDocumentFindingList(v *[]types.Finding, value interface{}) error {
6801	if v == nil {
6802		return fmt.Errorf("unexpected nil of type %T", v)
6803	}
6804	if value == nil {
6805		return nil
6806	}
6807
6808	shape, ok := value.([]interface{})
6809	if !ok {
6810		return fmt.Errorf("unexpected JSON type %v", value)
6811	}
6812
6813	var cv []types.Finding
6814	if *v == nil {
6815		cv = []types.Finding{}
6816	} else {
6817		cv = *v
6818	}
6819
6820	for _, value := range shape {
6821		var col types.Finding
6822		destAddr := &col
6823		if err := awsAwsjson11_deserializeDocumentFinding(&destAddr, value); err != nil {
6824			return err
6825		}
6826		col = *destAddr
6827		cv = append(cv, col)
6828
6829	}
6830	*v = cv
6831	return nil
6832}
6833
6834func awsAwsjson11_deserializeDocumentInspectorServiceAttributes(v **types.InspectorServiceAttributes, value interface{}) error {
6835	if v == nil {
6836		return fmt.Errorf("unexpected nil of type %T", v)
6837	}
6838	if value == nil {
6839		return nil
6840	}
6841
6842	shape, ok := value.(map[string]interface{})
6843	if !ok {
6844		return fmt.Errorf("unexpected JSON type %v", value)
6845	}
6846
6847	var sv *types.InspectorServiceAttributes
6848	if *v == nil {
6849		sv = &types.InspectorServiceAttributes{}
6850	} else {
6851		sv = *v
6852	}
6853
6854	for key, value := range shape {
6855		switch key {
6856		case "assessmentRunArn":
6857			if value != nil {
6858				jtv, ok := value.(string)
6859				if !ok {
6860					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
6861				}
6862				sv.AssessmentRunArn = ptr.String(jtv)
6863			}
6864
6865		case "rulesPackageArn":
6866			if value != nil {
6867				jtv, ok := value.(string)
6868				if !ok {
6869					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
6870				}
6871				sv.RulesPackageArn = ptr.String(jtv)
6872			}
6873
6874		case "schemaVersion":
6875			if value != nil {
6876				jtv, ok := value.(json.Number)
6877				if !ok {
6878					return fmt.Errorf("expected NumericVersion to be json.Number, got %T instead", value)
6879				}
6880				i64, err := jtv.Int64()
6881				if err != nil {
6882					return err
6883				}
6884				sv.SchemaVersion = int32(i64)
6885			}
6886
6887		default:
6888			_, _ = key, value
6889
6890		}
6891	}
6892	*v = sv
6893	return nil
6894}
6895
6896func awsAwsjson11_deserializeDocumentInternalException(v **types.InternalException, value interface{}) error {
6897	if v == nil {
6898		return fmt.Errorf("unexpected nil of type %T", v)
6899	}
6900	if value == nil {
6901		return nil
6902	}
6903
6904	shape, ok := value.(map[string]interface{})
6905	if !ok {
6906		return fmt.Errorf("unexpected JSON type %v", value)
6907	}
6908
6909	var sv *types.InternalException
6910	if *v == nil {
6911		sv = &types.InternalException{}
6912	} else {
6913		sv = *v
6914	}
6915
6916	for key, value := range shape {
6917		switch key {
6918		case "canRetry":
6919			if value != nil {
6920				jtv, ok := value.(bool)
6921				if !ok {
6922					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
6923				}
6924				sv.CanRetry = ptr.Bool(jtv)
6925			}
6926
6927		case "message":
6928			if value != nil {
6929				jtv, ok := value.(string)
6930				if !ok {
6931					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
6932				}
6933				sv.Message = ptr.String(jtv)
6934			}
6935
6936		default:
6937			_, _ = key, value
6938
6939		}
6940	}
6941	*v = sv
6942	return nil
6943}
6944
6945func awsAwsjson11_deserializeDocumentInvalidCrossAccountRoleException(v **types.InvalidCrossAccountRoleException, value interface{}) error {
6946	if v == nil {
6947		return fmt.Errorf("unexpected nil of type %T", v)
6948	}
6949	if value == nil {
6950		return nil
6951	}
6952
6953	shape, ok := value.(map[string]interface{})
6954	if !ok {
6955		return fmt.Errorf("unexpected JSON type %v", value)
6956	}
6957
6958	var sv *types.InvalidCrossAccountRoleException
6959	if *v == nil {
6960		sv = &types.InvalidCrossAccountRoleException{}
6961	} else {
6962		sv = *v
6963	}
6964
6965	for key, value := range shape {
6966		switch key {
6967		case "canRetry":
6968			if value != nil {
6969				jtv, ok := value.(bool)
6970				if !ok {
6971					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
6972				}
6973				sv.CanRetry = ptr.Bool(jtv)
6974			}
6975
6976		case "errorCode":
6977			if value != nil {
6978				jtv, ok := value.(string)
6979				if !ok {
6980					return fmt.Errorf("expected InvalidCrossAccountRoleErrorCode to be of type string, got %T instead", value)
6981				}
6982				sv.ErrorCode_ = types.InvalidCrossAccountRoleErrorCode(jtv)
6983			}
6984
6985		case "message":
6986			if value != nil {
6987				jtv, ok := value.(string)
6988				if !ok {
6989					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
6990				}
6991				sv.Message = ptr.String(jtv)
6992			}
6993
6994		default:
6995			_, _ = key, value
6996
6997		}
6998	}
6999	*v = sv
7000	return nil
7001}
7002
7003func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error {
7004	if v == nil {
7005		return fmt.Errorf("unexpected nil of type %T", v)
7006	}
7007	if value == nil {
7008		return nil
7009	}
7010
7011	shape, ok := value.(map[string]interface{})
7012	if !ok {
7013		return fmt.Errorf("unexpected JSON type %v", value)
7014	}
7015
7016	var sv *types.InvalidInputException
7017	if *v == nil {
7018		sv = &types.InvalidInputException{}
7019	} else {
7020		sv = *v
7021	}
7022
7023	for key, value := range shape {
7024		switch key {
7025		case "canRetry":
7026			if value != nil {
7027				jtv, ok := value.(bool)
7028				if !ok {
7029					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
7030				}
7031				sv.CanRetry = ptr.Bool(jtv)
7032			}
7033
7034		case "errorCode":
7035			if value != nil {
7036				jtv, ok := value.(string)
7037				if !ok {
7038					return fmt.Errorf("expected InvalidInputErrorCode to be of type string, got %T instead", value)
7039				}
7040				sv.ErrorCode_ = types.InvalidInputErrorCode(jtv)
7041			}
7042
7043		case "message":
7044			if value != nil {
7045				jtv, ok := value.(string)
7046				if !ok {
7047					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7048				}
7049				sv.Message = ptr.String(jtv)
7050			}
7051
7052		default:
7053			_, _ = key, value
7054
7055		}
7056	}
7057	*v = sv
7058	return nil
7059}
7060
7061func awsAwsjson11_deserializeDocumentIpv4AddressList(v *[]string, value interface{}) error {
7062	if v == nil {
7063		return fmt.Errorf("unexpected nil of type %T", v)
7064	}
7065	if value == nil {
7066		return nil
7067	}
7068
7069	shape, ok := value.([]interface{})
7070	if !ok {
7071		return fmt.Errorf("unexpected JSON type %v", value)
7072	}
7073
7074	var cv []string
7075	if *v == nil {
7076		cv = []string{}
7077	} else {
7078		cv = *v
7079	}
7080
7081	for _, value := range shape {
7082		var col string
7083		if value != nil {
7084			jtv, ok := value.(string)
7085			if !ok {
7086				return fmt.Errorf("expected Ipv4Address to be of type string, got %T instead", value)
7087			}
7088			col = jtv
7089		}
7090		cv = append(cv, col)
7091
7092	}
7093	*v = cv
7094	return nil
7095}
7096
7097func awsAwsjson11_deserializeDocumentIpv6Addresses(v *[]string, value interface{}) error {
7098	if v == nil {
7099		return fmt.Errorf("unexpected nil of type %T", v)
7100	}
7101	if value == nil {
7102		return nil
7103	}
7104
7105	shape, ok := value.([]interface{})
7106	if !ok {
7107		return fmt.Errorf("unexpected JSON type %v", value)
7108	}
7109
7110	var cv []string
7111	if *v == nil {
7112		cv = []string{}
7113	} else {
7114		cv = *v
7115	}
7116
7117	for _, value := range shape {
7118		var col string
7119		if value != nil {
7120			jtv, ok := value.(string)
7121			if !ok {
7122				return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7123			}
7124			col = jtv
7125		}
7126		cv = append(cv, col)
7127
7128	}
7129	*v = cv
7130	return nil
7131}
7132
7133func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error {
7134	if v == nil {
7135		return fmt.Errorf("unexpected nil of type %T", v)
7136	}
7137	if value == nil {
7138		return nil
7139	}
7140
7141	shape, ok := value.(map[string]interface{})
7142	if !ok {
7143		return fmt.Errorf("unexpected JSON type %v", value)
7144	}
7145
7146	var sv *types.LimitExceededException
7147	if *v == nil {
7148		sv = &types.LimitExceededException{}
7149	} else {
7150		sv = *v
7151	}
7152
7153	for key, value := range shape {
7154		switch key {
7155		case "canRetry":
7156			if value != nil {
7157				jtv, ok := value.(bool)
7158				if !ok {
7159					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
7160				}
7161				sv.CanRetry = ptr.Bool(jtv)
7162			}
7163
7164		case "errorCode":
7165			if value != nil {
7166				jtv, ok := value.(string)
7167				if !ok {
7168					return fmt.Errorf("expected LimitExceededErrorCode to be of type string, got %T instead", value)
7169				}
7170				sv.ErrorCode_ = types.LimitExceededErrorCode(jtv)
7171			}
7172
7173		case "message":
7174			if value != nil {
7175				jtv, ok := value.(string)
7176				if !ok {
7177					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7178				}
7179				sv.Message = ptr.String(jtv)
7180			}
7181
7182		default:
7183			_, _ = key, value
7184
7185		}
7186	}
7187	*v = sv
7188	return nil
7189}
7190
7191func awsAwsjson11_deserializeDocumentListReturnedArnList(v *[]string, value interface{}) error {
7192	if v == nil {
7193		return fmt.Errorf("unexpected nil of type %T", v)
7194	}
7195	if value == nil {
7196		return nil
7197	}
7198
7199	shape, ok := value.([]interface{})
7200	if !ok {
7201		return fmt.Errorf("unexpected JSON type %v", value)
7202	}
7203
7204	var cv []string
7205	if *v == nil {
7206		cv = []string{}
7207	} else {
7208		cv = *v
7209	}
7210
7211	for _, value := range shape {
7212		var col string
7213		if value != nil {
7214			jtv, ok := value.(string)
7215			if !ok {
7216				return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
7217			}
7218			col = jtv
7219		}
7220		cv = append(cv, col)
7221
7222	}
7223	*v = cv
7224	return nil
7225}
7226
7227func awsAwsjson11_deserializeDocumentNetworkInterface(v **types.NetworkInterface, value interface{}) error {
7228	if v == nil {
7229		return fmt.Errorf("unexpected nil of type %T", v)
7230	}
7231	if value == nil {
7232		return nil
7233	}
7234
7235	shape, ok := value.(map[string]interface{})
7236	if !ok {
7237		return fmt.Errorf("unexpected JSON type %v", value)
7238	}
7239
7240	var sv *types.NetworkInterface
7241	if *v == nil {
7242		sv = &types.NetworkInterface{}
7243	} else {
7244		sv = *v
7245	}
7246
7247	for key, value := range shape {
7248		switch key {
7249		case "ipv6Addresses":
7250			if err := awsAwsjson11_deserializeDocumentIpv6Addresses(&sv.Ipv6Addresses, value); err != nil {
7251				return err
7252			}
7253
7254		case "networkInterfaceId":
7255			if value != nil {
7256				jtv, ok := value.(string)
7257				if !ok {
7258					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7259				}
7260				sv.NetworkInterfaceId = ptr.String(jtv)
7261			}
7262
7263		case "privateDnsName":
7264			if value != nil {
7265				jtv, ok := value.(string)
7266				if !ok {
7267					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7268				}
7269				sv.PrivateDnsName = ptr.String(jtv)
7270			}
7271
7272		case "privateIpAddress":
7273			if value != nil {
7274				jtv, ok := value.(string)
7275				if !ok {
7276					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7277				}
7278				sv.PrivateIpAddress = ptr.String(jtv)
7279			}
7280
7281		case "privateIpAddresses":
7282			if err := awsAwsjson11_deserializeDocumentPrivateIpAddresses(&sv.PrivateIpAddresses, value); err != nil {
7283				return err
7284			}
7285
7286		case "publicDnsName":
7287			if value != nil {
7288				jtv, ok := value.(string)
7289				if !ok {
7290					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7291				}
7292				sv.PublicDnsName = ptr.String(jtv)
7293			}
7294
7295		case "publicIp":
7296			if value != nil {
7297				jtv, ok := value.(string)
7298				if !ok {
7299					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7300				}
7301				sv.PublicIp = ptr.String(jtv)
7302			}
7303
7304		case "securityGroups":
7305			if err := awsAwsjson11_deserializeDocumentSecurityGroups(&sv.SecurityGroups, value); err != nil {
7306				return err
7307			}
7308
7309		case "subnetId":
7310			if value != nil {
7311				jtv, ok := value.(string)
7312				if !ok {
7313					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7314				}
7315				sv.SubnetId = ptr.String(jtv)
7316			}
7317
7318		case "vpcId":
7319			if value != nil {
7320				jtv, ok := value.(string)
7321				if !ok {
7322					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7323				}
7324				sv.VpcId = ptr.String(jtv)
7325			}
7326
7327		default:
7328			_, _ = key, value
7329
7330		}
7331	}
7332	*v = sv
7333	return nil
7334}
7335
7336func awsAwsjson11_deserializeDocumentNetworkInterfaces(v *[]types.NetworkInterface, value interface{}) error {
7337	if v == nil {
7338		return fmt.Errorf("unexpected nil of type %T", v)
7339	}
7340	if value == nil {
7341		return nil
7342	}
7343
7344	shape, ok := value.([]interface{})
7345	if !ok {
7346		return fmt.Errorf("unexpected JSON type %v", value)
7347	}
7348
7349	var cv []types.NetworkInterface
7350	if *v == nil {
7351		cv = []types.NetworkInterface{}
7352	} else {
7353		cv = *v
7354	}
7355
7356	for _, value := range shape {
7357		var col types.NetworkInterface
7358		destAddr := &col
7359		if err := awsAwsjson11_deserializeDocumentNetworkInterface(&destAddr, value); err != nil {
7360			return err
7361		}
7362		col = *destAddr
7363		cv = append(cv, col)
7364
7365	}
7366	*v = cv
7367	return nil
7368}
7369
7370func awsAwsjson11_deserializeDocumentNoSuchEntityException(v **types.NoSuchEntityException, value interface{}) error {
7371	if v == nil {
7372		return fmt.Errorf("unexpected nil of type %T", v)
7373	}
7374	if value == nil {
7375		return nil
7376	}
7377
7378	shape, ok := value.(map[string]interface{})
7379	if !ok {
7380		return fmt.Errorf("unexpected JSON type %v", value)
7381	}
7382
7383	var sv *types.NoSuchEntityException
7384	if *v == nil {
7385		sv = &types.NoSuchEntityException{}
7386	} else {
7387		sv = *v
7388	}
7389
7390	for key, value := range shape {
7391		switch key {
7392		case "canRetry":
7393			if value != nil {
7394				jtv, ok := value.(bool)
7395				if !ok {
7396					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
7397				}
7398				sv.CanRetry = ptr.Bool(jtv)
7399			}
7400
7401		case "errorCode":
7402			if value != nil {
7403				jtv, ok := value.(string)
7404				if !ok {
7405					return fmt.Errorf("expected NoSuchEntityErrorCode to be of type string, got %T instead", value)
7406				}
7407				sv.ErrorCode_ = types.NoSuchEntityErrorCode(jtv)
7408			}
7409
7410		case "message":
7411			if value != nil {
7412				jtv, ok := value.(string)
7413				if !ok {
7414					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7415				}
7416				sv.Message = ptr.String(jtv)
7417			}
7418
7419		default:
7420			_, _ = key, value
7421
7422		}
7423	}
7424	*v = sv
7425	return nil
7426}
7427
7428func awsAwsjson11_deserializeDocumentPreviewGenerationInProgressException(v **types.PreviewGenerationInProgressException, value interface{}) error {
7429	if v == nil {
7430		return fmt.Errorf("unexpected nil of type %T", v)
7431	}
7432	if value == nil {
7433		return nil
7434	}
7435
7436	shape, ok := value.(map[string]interface{})
7437	if !ok {
7438		return fmt.Errorf("unexpected JSON type %v", value)
7439	}
7440
7441	var sv *types.PreviewGenerationInProgressException
7442	if *v == nil {
7443		sv = &types.PreviewGenerationInProgressException{}
7444	} else {
7445		sv = *v
7446	}
7447
7448	for key, value := range shape {
7449		switch key {
7450		case "message":
7451			if value != nil {
7452				jtv, ok := value.(string)
7453				if !ok {
7454					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7455				}
7456				sv.Message = ptr.String(jtv)
7457			}
7458
7459		default:
7460			_, _ = key, value
7461
7462		}
7463	}
7464	*v = sv
7465	return nil
7466}
7467
7468func awsAwsjson11_deserializeDocumentPrivateIp(v **types.PrivateIp, value interface{}) error {
7469	if v == nil {
7470		return fmt.Errorf("unexpected nil of type %T", v)
7471	}
7472	if value == nil {
7473		return nil
7474	}
7475
7476	shape, ok := value.(map[string]interface{})
7477	if !ok {
7478		return fmt.Errorf("unexpected JSON type %v", value)
7479	}
7480
7481	var sv *types.PrivateIp
7482	if *v == nil {
7483		sv = &types.PrivateIp{}
7484	} else {
7485		sv = *v
7486	}
7487
7488	for key, value := range shape {
7489		switch key {
7490		case "privateDnsName":
7491			if value != nil {
7492				jtv, ok := value.(string)
7493				if !ok {
7494					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7495				}
7496				sv.PrivateDnsName = ptr.String(jtv)
7497			}
7498
7499		case "privateIpAddress":
7500			if value != nil {
7501				jtv, ok := value.(string)
7502				if !ok {
7503					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7504				}
7505				sv.PrivateIpAddress = ptr.String(jtv)
7506			}
7507
7508		default:
7509			_, _ = key, value
7510
7511		}
7512	}
7513	*v = sv
7514	return nil
7515}
7516
7517func awsAwsjson11_deserializeDocumentPrivateIpAddresses(v *[]types.PrivateIp, value interface{}) error {
7518	if v == nil {
7519		return fmt.Errorf("unexpected nil of type %T", v)
7520	}
7521	if value == nil {
7522		return nil
7523	}
7524
7525	shape, ok := value.([]interface{})
7526	if !ok {
7527		return fmt.Errorf("unexpected JSON type %v", value)
7528	}
7529
7530	var cv []types.PrivateIp
7531	if *v == nil {
7532		cv = []types.PrivateIp{}
7533	} else {
7534		cv = *v
7535	}
7536
7537	for _, value := range shape {
7538		var col types.PrivateIp
7539		destAddr := &col
7540		if err := awsAwsjson11_deserializeDocumentPrivateIp(&destAddr, value); err != nil {
7541			return err
7542		}
7543		col = *destAddr
7544		cv = append(cv, col)
7545
7546	}
7547	*v = cv
7548	return nil
7549}
7550
7551func awsAwsjson11_deserializeDocumentResourceGroup(v **types.ResourceGroup, value interface{}) error {
7552	if v == nil {
7553		return fmt.Errorf("unexpected nil of type %T", v)
7554	}
7555	if value == nil {
7556		return nil
7557	}
7558
7559	shape, ok := value.(map[string]interface{})
7560	if !ok {
7561		return fmt.Errorf("unexpected JSON type %v", value)
7562	}
7563
7564	var sv *types.ResourceGroup
7565	if *v == nil {
7566		sv = &types.ResourceGroup{}
7567	} else {
7568		sv = *v
7569	}
7570
7571	for key, value := range shape {
7572		switch key {
7573		case "arn":
7574			if value != nil {
7575				jtv, ok := value.(string)
7576				if !ok {
7577					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
7578				}
7579				sv.Arn = ptr.String(jtv)
7580			}
7581
7582		case "createdAt":
7583			if value != nil {
7584				jtv, ok := value.(json.Number)
7585				if !ok {
7586					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
7587				}
7588				f64, err := jtv.Float64()
7589				if err != nil {
7590					return err
7591				}
7592				sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
7593			}
7594
7595		case "tags":
7596			if err := awsAwsjson11_deserializeDocumentResourceGroupTags(&sv.Tags, value); err != nil {
7597				return err
7598			}
7599
7600		default:
7601			_, _ = key, value
7602
7603		}
7604	}
7605	*v = sv
7606	return nil
7607}
7608
7609func awsAwsjson11_deserializeDocumentResourceGroupList(v *[]types.ResourceGroup, value interface{}) error {
7610	if v == nil {
7611		return fmt.Errorf("unexpected nil of type %T", v)
7612	}
7613	if value == nil {
7614		return nil
7615	}
7616
7617	shape, ok := value.([]interface{})
7618	if !ok {
7619		return fmt.Errorf("unexpected JSON type %v", value)
7620	}
7621
7622	var cv []types.ResourceGroup
7623	if *v == nil {
7624		cv = []types.ResourceGroup{}
7625	} else {
7626		cv = *v
7627	}
7628
7629	for _, value := range shape {
7630		var col types.ResourceGroup
7631		destAddr := &col
7632		if err := awsAwsjson11_deserializeDocumentResourceGroup(&destAddr, value); err != nil {
7633			return err
7634		}
7635		col = *destAddr
7636		cv = append(cv, col)
7637
7638	}
7639	*v = cv
7640	return nil
7641}
7642
7643func awsAwsjson11_deserializeDocumentResourceGroupTag(v **types.ResourceGroupTag, value interface{}) error {
7644	if v == nil {
7645		return fmt.Errorf("unexpected nil of type %T", v)
7646	}
7647	if value == nil {
7648		return nil
7649	}
7650
7651	shape, ok := value.(map[string]interface{})
7652	if !ok {
7653		return fmt.Errorf("unexpected JSON type %v", value)
7654	}
7655
7656	var sv *types.ResourceGroupTag
7657	if *v == nil {
7658		sv = &types.ResourceGroupTag{}
7659	} else {
7660		sv = *v
7661	}
7662
7663	for key, value := range shape {
7664		switch key {
7665		case "key":
7666			if value != nil {
7667				jtv, ok := value.(string)
7668				if !ok {
7669					return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
7670				}
7671				sv.Key = ptr.String(jtv)
7672			}
7673
7674		case "value":
7675			if value != nil {
7676				jtv, ok := value.(string)
7677				if !ok {
7678					return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
7679				}
7680				sv.Value = ptr.String(jtv)
7681			}
7682
7683		default:
7684			_, _ = key, value
7685
7686		}
7687	}
7688	*v = sv
7689	return nil
7690}
7691
7692func awsAwsjson11_deserializeDocumentResourceGroupTags(v *[]types.ResourceGroupTag, value interface{}) error {
7693	if v == nil {
7694		return fmt.Errorf("unexpected nil of type %T", v)
7695	}
7696	if value == nil {
7697		return nil
7698	}
7699
7700	shape, ok := value.([]interface{})
7701	if !ok {
7702		return fmt.Errorf("unexpected JSON type %v", value)
7703	}
7704
7705	var cv []types.ResourceGroupTag
7706	if *v == nil {
7707		cv = []types.ResourceGroupTag{}
7708	} else {
7709		cv = *v
7710	}
7711
7712	for _, value := range shape {
7713		var col types.ResourceGroupTag
7714		destAddr := &col
7715		if err := awsAwsjson11_deserializeDocumentResourceGroupTag(&destAddr, value); err != nil {
7716			return err
7717		}
7718		col = *destAddr
7719		cv = append(cv, col)
7720
7721	}
7722	*v = cv
7723	return nil
7724}
7725
7726func awsAwsjson11_deserializeDocumentRulesPackage(v **types.RulesPackage, value interface{}) error {
7727	if v == nil {
7728		return fmt.Errorf("unexpected nil of type %T", v)
7729	}
7730	if value == nil {
7731		return nil
7732	}
7733
7734	shape, ok := value.(map[string]interface{})
7735	if !ok {
7736		return fmt.Errorf("unexpected JSON type %v", value)
7737	}
7738
7739	var sv *types.RulesPackage
7740	if *v == nil {
7741		sv = &types.RulesPackage{}
7742	} else {
7743		sv = *v
7744	}
7745
7746	for key, value := range shape {
7747		switch key {
7748		case "arn":
7749			if value != nil {
7750				jtv, ok := value.(string)
7751				if !ok {
7752					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
7753				}
7754				sv.Arn = ptr.String(jtv)
7755			}
7756
7757		case "description":
7758			if value != nil {
7759				jtv, ok := value.(string)
7760				if !ok {
7761					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7762				}
7763				sv.Description = ptr.String(jtv)
7764			}
7765
7766		case "name":
7767			if value != nil {
7768				jtv, ok := value.(string)
7769				if !ok {
7770					return fmt.Errorf("expected RulesPackageName to be of type string, got %T instead", value)
7771				}
7772				sv.Name = ptr.String(jtv)
7773			}
7774
7775		case "provider":
7776			if value != nil {
7777				jtv, ok := value.(string)
7778				if !ok {
7779					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
7780				}
7781				sv.Provider = ptr.String(jtv)
7782			}
7783
7784		case "version":
7785			if value != nil {
7786				jtv, ok := value.(string)
7787				if !ok {
7788					return fmt.Errorf("expected Version to be of type string, got %T instead", value)
7789				}
7790				sv.Version = ptr.String(jtv)
7791			}
7792
7793		default:
7794			_, _ = key, value
7795
7796		}
7797	}
7798	*v = sv
7799	return nil
7800}
7801
7802func awsAwsjson11_deserializeDocumentRulesPackageList(v *[]types.RulesPackage, value interface{}) error {
7803	if v == nil {
7804		return fmt.Errorf("unexpected nil of type %T", v)
7805	}
7806	if value == nil {
7807		return nil
7808	}
7809
7810	shape, ok := value.([]interface{})
7811	if !ok {
7812		return fmt.Errorf("unexpected JSON type %v", value)
7813	}
7814
7815	var cv []types.RulesPackage
7816	if *v == nil {
7817		cv = []types.RulesPackage{}
7818	} else {
7819		cv = *v
7820	}
7821
7822	for _, value := range shape {
7823		var col types.RulesPackage
7824		destAddr := &col
7825		if err := awsAwsjson11_deserializeDocumentRulesPackage(&destAddr, value); err != nil {
7826			return err
7827		}
7828		col = *destAddr
7829		cv = append(cv, col)
7830
7831	}
7832	*v = cv
7833	return nil
7834}
7835
7836func awsAwsjson11_deserializeDocumentScope(v **types.Scope, value interface{}) error {
7837	if v == nil {
7838		return fmt.Errorf("unexpected nil of type %T", v)
7839	}
7840	if value == nil {
7841		return nil
7842	}
7843
7844	shape, ok := value.(map[string]interface{})
7845	if !ok {
7846		return fmt.Errorf("unexpected JSON type %v", value)
7847	}
7848
7849	var sv *types.Scope
7850	if *v == nil {
7851		sv = &types.Scope{}
7852	} else {
7853		sv = *v
7854	}
7855
7856	for key, value := range shape {
7857		switch key {
7858		case "key":
7859			if value != nil {
7860				jtv, ok := value.(string)
7861				if !ok {
7862					return fmt.Errorf("expected ScopeType to be of type string, got %T instead", value)
7863				}
7864				sv.Key = types.ScopeType(jtv)
7865			}
7866
7867		case "value":
7868			if value != nil {
7869				jtv, ok := value.(string)
7870				if !ok {
7871					return fmt.Errorf("expected ScopeValue to be of type string, got %T instead", value)
7872				}
7873				sv.Value = ptr.String(jtv)
7874			}
7875
7876		default:
7877			_, _ = key, value
7878
7879		}
7880	}
7881	*v = sv
7882	return nil
7883}
7884
7885func awsAwsjson11_deserializeDocumentScopeList(v *[]types.Scope, value interface{}) error {
7886	if v == nil {
7887		return fmt.Errorf("unexpected nil of type %T", v)
7888	}
7889	if value == nil {
7890		return nil
7891	}
7892
7893	shape, ok := value.([]interface{})
7894	if !ok {
7895		return fmt.Errorf("unexpected JSON type %v", value)
7896	}
7897
7898	var cv []types.Scope
7899	if *v == nil {
7900		cv = []types.Scope{}
7901	} else {
7902		cv = *v
7903	}
7904
7905	for _, value := range shape {
7906		var col types.Scope
7907		destAddr := &col
7908		if err := awsAwsjson11_deserializeDocumentScope(&destAddr, value); err != nil {
7909			return err
7910		}
7911		col = *destAddr
7912		cv = append(cv, col)
7913
7914	}
7915	*v = cv
7916	return nil
7917}
7918
7919func awsAwsjson11_deserializeDocumentSecurityGroup(v **types.SecurityGroup, value interface{}) error {
7920	if v == nil {
7921		return fmt.Errorf("unexpected nil of type %T", v)
7922	}
7923	if value == nil {
7924		return nil
7925	}
7926
7927	shape, ok := value.(map[string]interface{})
7928	if !ok {
7929		return fmt.Errorf("unexpected JSON type %v", value)
7930	}
7931
7932	var sv *types.SecurityGroup
7933	if *v == nil {
7934		sv = &types.SecurityGroup{}
7935	} else {
7936		sv = *v
7937	}
7938
7939	for key, value := range shape {
7940		switch key {
7941		case "groupId":
7942			if value != nil {
7943				jtv, ok := value.(string)
7944				if !ok {
7945					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7946				}
7947				sv.GroupId = ptr.String(jtv)
7948			}
7949
7950		case "groupName":
7951			if value != nil {
7952				jtv, ok := value.(string)
7953				if !ok {
7954					return fmt.Errorf("expected Text to be of type string, got %T instead", value)
7955				}
7956				sv.GroupName = ptr.String(jtv)
7957			}
7958
7959		default:
7960			_, _ = key, value
7961
7962		}
7963	}
7964	*v = sv
7965	return nil
7966}
7967
7968func awsAwsjson11_deserializeDocumentSecurityGroups(v *[]types.SecurityGroup, value interface{}) error {
7969	if v == nil {
7970		return fmt.Errorf("unexpected nil of type %T", v)
7971	}
7972	if value == nil {
7973		return nil
7974	}
7975
7976	shape, ok := value.([]interface{})
7977	if !ok {
7978		return fmt.Errorf("unexpected JSON type %v", value)
7979	}
7980
7981	var cv []types.SecurityGroup
7982	if *v == nil {
7983		cv = []types.SecurityGroup{}
7984	} else {
7985		cv = *v
7986	}
7987
7988	for _, value := range shape {
7989		var col types.SecurityGroup
7990		destAddr := &col
7991		if err := awsAwsjson11_deserializeDocumentSecurityGroup(&destAddr, value); err != nil {
7992			return err
7993		}
7994		col = *destAddr
7995		cv = append(cv, col)
7996
7997	}
7998	*v = cv
7999	return nil
8000}
8001
8002func awsAwsjson11_deserializeDocumentServiceTemporarilyUnavailableException(v **types.ServiceTemporarilyUnavailableException, value interface{}) error {
8003	if v == nil {
8004		return fmt.Errorf("unexpected nil of type %T", v)
8005	}
8006	if value == nil {
8007		return nil
8008	}
8009
8010	shape, ok := value.(map[string]interface{})
8011	if !ok {
8012		return fmt.Errorf("unexpected JSON type %v", value)
8013	}
8014
8015	var sv *types.ServiceTemporarilyUnavailableException
8016	if *v == nil {
8017		sv = &types.ServiceTemporarilyUnavailableException{}
8018	} else {
8019		sv = *v
8020	}
8021
8022	for key, value := range shape {
8023		switch key {
8024		case "canRetry":
8025			if value != nil {
8026				jtv, ok := value.(bool)
8027				if !ok {
8028					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
8029				}
8030				sv.CanRetry = ptr.Bool(jtv)
8031			}
8032
8033		case "message":
8034			if value != nil {
8035				jtv, ok := value.(string)
8036				if !ok {
8037					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
8038				}
8039				sv.Message = ptr.String(jtv)
8040			}
8041
8042		default:
8043			_, _ = key, value
8044
8045		}
8046	}
8047	*v = sv
8048	return nil
8049}
8050
8051func awsAwsjson11_deserializeDocumentSubscription(v **types.Subscription, value interface{}) error {
8052	if v == nil {
8053		return fmt.Errorf("unexpected nil of type %T", v)
8054	}
8055	if value == nil {
8056		return nil
8057	}
8058
8059	shape, ok := value.(map[string]interface{})
8060	if !ok {
8061		return fmt.Errorf("unexpected JSON type %v", value)
8062	}
8063
8064	var sv *types.Subscription
8065	if *v == nil {
8066		sv = &types.Subscription{}
8067	} else {
8068		sv = *v
8069	}
8070
8071	for key, value := range shape {
8072		switch key {
8073		case "eventSubscriptions":
8074			if err := awsAwsjson11_deserializeDocumentEventSubscriptionList(&sv.EventSubscriptions, value); err != nil {
8075				return err
8076			}
8077
8078		case "resourceArn":
8079			if value != nil {
8080				jtv, ok := value.(string)
8081				if !ok {
8082					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8083				}
8084				sv.ResourceArn = ptr.String(jtv)
8085			}
8086
8087		case "topicArn":
8088			if value != nil {
8089				jtv, ok := value.(string)
8090				if !ok {
8091					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8092				}
8093				sv.TopicArn = ptr.String(jtv)
8094			}
8095
8096		default:
8097			_, _ = key, value
8098
8099		}
8100	}
8101	*v = sv
8102	return nil
8103}
8104
8105func awsAwsjson11_deserializeDocumentSubscriptionList(v *[]types.Subscription, value interface{}) error {
8106	if v == nil {
8107		return fmt.Errorf("unexpected nil of type %T", v)
8108	}
8109	if value == nil {
8110		return nil
8111	}
8112
8113	shape, ok := value.([]interface{})
8114	if !ok {
8115		return fmt.Errorf("unexpected JSON type %v", value)
8116	}
8117
8118	var cv []types.Subscription
8119	if *v == nil {
8120		cv = []types.Subscription{}
8121	} else {
8122		cv = *v
8123	}
8124
8125	for _, value := range shape {
8126		var col types.Subscription
8127		destAddr := &col
8128		if err := awsAwsjson11_deserializeDocumentSubscription(&destAddr, value); err != nil {
8129			return err
8130		}
8131		col = *destAddr
8132		cv = append(cv, col)
8133
8134	}
8135	*v = cv
8136	return nil
8137}
8138
8139func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
8140	if v == nil {
8141		return fmt.Errorf("unexpected nil of type %T", v)
8142	}
8143	if value == nil {
8144		return nil
8145	}
8146
8147	shape, ok := value.(map[string]interface{})
8148	if !ok {
8149		return fmt.Errorf("unexpected JSON type %v", value)
8150	}
8151
8152	var sv *types.Tag
8153	if *v == nil {
8154		sv = &types.Tag{}
8155	} else {
8156		sv = *v
8157	}
8158
8159	for key, value := range shape {
8160		switch key {
8161		case "key":
8162			if value != nil {
8163				jtv, ok := value.(string)
8164				if !ok {
8165					return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
8166				}
8167				sv.Key = ptr.String(jtv)
8168			}
8169
8170		case "value":
8171			if value != nil {
8172				jtv, ok := value.(string)
8173				if !ok {
8174					return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
8175				}
8176				sv.Value = ptr.String(jtv)
8177			}
8178
8179		default:
8180			_, _ = key, value
8181
8182		}
8183	}
8184	*v = sv
8185	return nil
8186}
8187
8188func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error {
8189	if v == nil {
8190		return fmt.Errorf("unexpected nil of type %T", v)
8191	}
8192	if value == nil {
8193		return nil
8194	}
8195
8196	shape, ok := value.([]interface{})
8197	if !ok {
8198		return fmt.Errorf("unexpected JSON type %v", value)
8199	}
8200
8201	var cv []types.Tag
8202	if *v == nil {
8203		cv = []types.Tag{}
8204	} else {
8205		cv = *v
8206	}
8207
8208	for _, value := range shape {
8209		var col types.Tag
8210		destAddr := &col
8211		if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
8212			return err
8213		}
8214		col = *destAddr
8215		cv = append(cv, col)
8216
8217	}
8218	*v = cv
8219	return nil
8220}
8221
8222func awsAwsjson11_deserializeDocumentTags(v *[]types.Tag, value interface{}) error {
8223	if v == nil {
8224		return fmt.Errorf("unexpected nil of type %T", v)
8225	}
8226	if value == nil {
8227		return nil
8228	}
8229
8230	shape, ok := value.([]interface{})
8231	if !ok {
8232		return fmt.Errorf("unexpected JSON type %v", value)
8233	}
8234
8235	var cv []types.Tag
8236	if *v == nil {
8237		cv = []types.Tag{}
8238	} else {
8239		cv = *v
8240	}
8241
8242	for _, value := range shape {
8243		var col types.Tag
8244		destAddr := &col
8245		if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
8246			return err
8247		}
8248		col = *destAddr
8249		cv = append(cv, col)
8250
8251	}
8252	*v = cv
8253	return nil
8254}
8255
8256func awsAwsjson11_deserializeDocumentTelemetryMetadata(v **types.TelemetryMetadata, value interface{}) error {
8257	if v == nil {
8258		return fmt.Errorf("unexpected nil of type %T", v)
8259	}
8260	if value == nil {
8261		return nil
8262	}
8263
8264	shape, ok := value.(map[string]interface{})
8265	if !ok {
8266		return fmt.Errorf("unexpected JSON type %v", value)
8267	}
8268
8269	var sv *types.TelemetryMetadata
8270	if *v == nil {
8271		sv = &types.TelemetryMetadata{}
8272	} else {
8273		sv = *v
8274	}
8275
8276	for key, value := range shape {
8277		switch key {
8278		case "count":
8279			if value != nil {
8280				jtv, ok := value.(json.Number)
8281				if !ok {
8282					return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
8283				}
8284				i64, err := jtv.Int64()
8285				if err != nil {
8286					return err
8287				}
8288				sv.Count = ptr.Int64(i64)
8289			}
8290
8291		case "dataSize":
8292			if value != nil {
8293				jtv, ok := value.(json.Number)
8294				if !ok {
8295					return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
8296				}
8297				i64, err := jtv.Int64()
8298				if err != nil {
8299					return err
8300				}
8301				sv.DataSize = ptr.Int64(i64)
8302			}
8303
8304		case "messageType":
8305			if value != nil {
8306				jtv, ok := value.(string)
8307				if !ok {
8308					return fmt.Errorf("expected MessageType to be of type string, got %T instead", value)
8309				}
8310				sv.MessageType = ptr.String(jtv)
8311			}
8312
8313		default:
8314			_, _ = key, value
8315
8316		}
8317	}
8318	*v = sv
8319	return nil
8320}
8321
8322func awsAwsjson11_deserializeDocumentTelemetryMetadataList(v *[]types.TelemetryMetadata, value interface{}) error {
8323	if v == nil {
8324		return fmt.Errorf("unexpected nil of type %T", v)
8325	}
8326	if value == nil {
8327		return nil
8328	}
8329
8330	shape, ok := value.([]interface{})
8331	if !ok {
8332		return fmt.Errorf("unexpected JSON type %v", value)
8333	}
8334
8335	var cv []types.TelemetryMetadata
8336	if *v == nil {
8337		cv = []types.TelemetryMetadata{}
8338	} else {
8339		cv = *v
8340	}
8341
8342	for _, value := range shape {
8343		var col types.TelemetryMetadata
8344		destAddr := &col
8345		if err := awsAwsjson11_deserializeDocumentTelemetryMetadata(&destAddr, value); err != nil {
8346			return err
8347		}
8348		col = *destAddr
8349		cv = append(cv, col)
8350
8351	}
8352	*v = cv
8353	return nil
8354}
8355
8356func awsAwsjson11_deserializeDocumentUnsupportedFeatureException(v **types.UnsupportedFeatureException, value interface{}) error {
8357	if v == nil {
8358		return fmt.Errorf("unexpected nil of type %T", v)
8359	}
8360	if value == nil {
8361		return nil
8362	}
8363
8364	shape, ok := value.(map[string]interface{})
8365	if !ok {
8366		return fmt.Errorf("unexpected JSON type %v", value)
8367	}
8368
8369	var sv *types.UnsupportedFeatureException
8370	if *v == nil {
8371		sv = &types.UnsupportedFeatureException{}
8372	} else {
8373		sv = *v
8374	}
8375
8376	for key, value := range shape {
8377		switch key {
8378		case "canRetry":
8379			if value != nil {
8380				jtv, ok := value.(bool)
8381				if !ok {
8382					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
8383				}
8384				sv.CanRetry = ptr.Bool(jtv)
8385			}
8386
8387		case "message":
8388			if value != nil {
8389				jtv, ok := value.(string)
8390				if !ok {
8391					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
8392				}
8393				sv.Message = ptr.String(jtv)
8394			}
8395
8396		default:
8397			_, _ = key, value
8398
8399		}
8400	}
8401	*v = sv
8402	return nil
8403}
8404
8405func awsAwsjson11_deserializeDocumentUserAttributeList(v *[]types.Attribute, value interface{}) error {
8406	if v == nil {
8407		return fmt.Errorf("unexpected nil of type %T", v)
8408	}
8409	if value == nil {
8410		return nil
8411	}
8412
8413	shape, ok := value.([]interface{})
8414	if !ok {
8415		return fmt.Errorf("unexpected JSON type %v", value)
8416	}
8417
8418	var cv []types.Attribute
8419	if *v == nil {
8420		cv = []types.Attribute{}
8421	} else {
8422		cv = *v
8423	}
8424
8425	for _, value := range shape {
8426		var col types.Attribute
8427		destAddr := &col
8428		if err := awsAwsjson11_deserializeDocumentAttribute(&destAddr, value); err != nil {
8429			return err
8430		}
8431		col = *destAddr
8432		cv = append(cv, col)
8433
8434	}
8435	*v = cv
8436	return nil
8437}
8438
8439func awsAwsjson11_deserializeOpDocumentAddAttributesToFindingsOutput(v **AddAttributesToFindingsOutput, value interface{}) error {
8440	if v == nil {
8441		return fmt.Errorf("unexpected nil of type %T", v)
8442	}
8443	if value == nil {
8444		return nil
8445	}
8446
8447	shape, ok := value.(map[string]interface{})
8448	if !ok {
8449		return fmt.Errorf("unexpected JSON type %v", value)
8450	}
8451
8452	var sv *AddAttributesToFindingsOutput
8453	if *v == nil {
8454		sv = &AddAttributesToFindingsOutput{}
8455	} else {
8456		sv = *v
8457	}
8458
8459	for key, value := range shape {
8460		switch key {
8461		case "failedItems":
8462			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8463				return err
8464			}
8465
8466		default:
8467			_, _ = key, value
8468
8469		}
8470	}
8471	*v = sv
8472	return nil
8473}
8474
8475func awsAwsjson11_deserializeOpDocumentCreateAssessmentTargetOutput(v **CreateAssessmentTargetOutput, value interface{}) error {
8476	if v == nil {
8477		return fmt.Errorf("unexpected nil of type %T", v)
8478	}
8479	if value == nil {
8480		return nil
8481	}
8482
8483	shape, ok := value.(map[string]interface{})
8484	if !ok {
8485		return fmt.Errorf("unexpected JSON type %v", value)
8486	}
8487
8488	var sv *CreateAssessmentTargetOutput
8489	if *v == nil {
8490		sv = &CreateAssessmentTargetOutput{}
8491	} else {
8492		sv = *v
8493	}
8494
8495	for key, value := range shape {
8496		switch key {
8497		case "assessmentTargetArn":
8498			if value != nil {
8499				jtv, ok := value.(string)
8500				if !ok {
8501					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8502				}
8503				sv.AssessmentTargetArn = ptr.String(jtv)
8504			}
8505
8506		default:
8507			_, _ = key, value
8508
8509		}
8510	}
8511	*v = sv
8512	return nil
8513}
8514
8515func awsAwsjson11_deserializeOpDocumentCreateAssessmentTemplateOutput(v **CreateAssessmentTemplateOutput, value interface{}) error {
8516	if v == nil {
8517		return fmt.Errorf("unexpected nil of type %T", v)
8518	}
8519	if value == nil {
8520		return nil
8521	}
8522
8523	shape, ok := value.(map[string]interface{})
8524	if !ok {
8525		return fmt.Errorf("unexpected JSON type %v", value)
8526	}
8527
8528	var sv *CreateAssessmentTemplateOutput
8529	if *v == nil {
8530		sv = &CreateAssessmentTemplateOutput{}
8531	} else {
8532		sv = *v
8533	}
8534
8535	for key, value := range shape {
8536		switch key {
8537		case "assessmentTemplateArn":
8538			if value != nil {
8539				jtv, ok := value.(string)
8540				if !ok {
8541					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8542				}
8543				sv.AssessmentTemplateArn = ptr.String(jtv)
8544			}
8545
8546		default:
8547			_, _ = key, value
8548
8549		}
8550	}
8551	*v = sv
8552	return nil
8553}
8554
8555func awsAwsjson11_deserializeOpDocumentCreateExclusionsPreviewOutput(v **CreateExclusionsPreviewOutput, value interface{}) error {
8556	if v == nil {
8557		return fmt.Errorf("unexpected nil of type %T", v)
8558	}
8559	if value == nil {
8560		return nil
8561	}
8562
8563	shape, ok := value.(map[string]interface{})
8564	if !ok {
8565		return fmt.Errorf("unexpected JSON type %v", value)
8566	}
8567
8568	var sv *CreateExclusionsPreviewOutput
8569	if *v == nil {
8570		sv = &CreateExclusionsPreviewOutput{}
8571	} else {
8572		sv = *v
8573	}
8574
8575	for key, value := range shape {
8576		switch key {
8577		case "previewToken":
8578			if value != nil {
8579				jtv, ok := value.(string)
8580				if !ok {
8581					return fmt.Errorf("expected UUID to be of type string, got %T instead", value)
8582				}
8583				sv.PreviewToken = ptr.String(jtv)
8584			}
8585
8586		default:
8587			_, _ = key, value
8588
8589		}
8590	}
8591	*v = sv
8592	return nil
8593}
8594
8595func awsAwsjson11_deserializeOpDocumentCreateResourceGroupOutput(v **CreateResourceGroupOutput, value interface{}) error {
8596	if v == nil {
8597		return fmt.Errorf("unexpected nil of type %T", v)
8598	}
8599	if value == nil {
8600		return nil
8601	}
8602
8603	shape, ok := value.(map[string]interface{})
8604	if !ok {
8605		return fmt.Errorf("unexpected JSON type %v", value)
8606	}
8607
8608	var sv *CreateResourceGroupOutput
8609	if *v == nil {
8610		sv = &CreateResourceGroupOutput{}
8611	} else {
8612		sv = *v
8613	}
8614
8615	for key, value := range shape {
8616		switch key {
8617		case "resourceGroupArn":
8618			if value != nil {
8619				jtv, ok := value.(string)
8620				if !ok {
8621					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8622				}
8623				sv.ResourceGroupArn = ptr.String(jtv)
8624			}
8625
8626		default:
8627			_, _ = key, value
8628
8629		}
8630	}
8631	*v = sv
8632	return nil
8633}
8634
8635func awsAwsjson11_deserializeOpDocumentDescribeAssessmentRunsOutput(v **DescribeAssessmentRunsOutput, value interface{}) error {
8636	if v == nil {
8637		return fmt.Errorf("unexpected nil of type %T", v)
8638	}
8639	if value == nil {
8640		return nil
8641	}
8642
8643	shape, ok := value.(map[string]interface{})
8644	if !ok {
8645		return fmt.Errorf("unexpected JSON type %v", value)
8646	}
8647
8648	var sv *DescribeAssessmentRunsOutput
8649	if *v == nil {
8650		sv = &DescribeAssessmentRunsOutput{}
8651	} else {
8652		sv = *v
8653	}
8654
8655	for key, value := range shape {
8656		switch key {
8657		case "assessmentRuns":
8658			if err := awsAwsjson11_deserializeDocumentAssessmentRunList(&sv.AssessmentRuns, value); err != nil {
8659				return err
8660			}
8661
8662		case "failedItems":
8663			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8664				return err
8665			}
8666
8667		default:
8668			_, _ = key, value
8669
8670		}
8671	}
8672	*v = sv
8673	return nil
8674}
8675
8676func awsAwsjson11_deserializeOpDocumentDescribeAssessmentTargetsOutput(v **DescribeAssessmentTargetsOutput, value interface{}) error {
8677	if v == nil {
8678		return fmt.Errorf("unexpected nil of type %T", v)
8679	}
8680	if value == nil {
8681		return nil
8682	}
8683
8684	shape, ok := value.(map[string]interface{})
8685	if !ok {
8686		return fmt.Errorf("unexpected JSON type %v", value)
8687	}
8688
8689	var sv *DescribeAssessmentTargetsOutput
8690	if *v == nil {
8691		sv = &DescribeAssessmentTargetsOutput{}
8692	} else {
8693		sv = *v
8694	}
8695
8696	for key, value := range shape {
8697		switch key {
8698		case "assessmentTargets":
8699			if err := awsAwsjson11_deserializeDocumentAssessmentTargetList(&sv.AssessmentTargets, value); err != nil {
8700				return err
8701			}
8702
8703		case "failedItems":
8704			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8705				return err
8706			}
8707
8708		default:
8709			_, _ = key, value
8710
8711		}
8712	}
8713	*v = sv
8714	return nil
8715}
8716
8717func awsAwsjson11_deserializeOpDocumentDescribeAssessmentTemplatesOutput(v **DescribeAssessmentTemplatesOutput, value interface{}) error {
8718	if v == nil {
8719		return fmt.Errorf("unexpected nil of type %T", v)
8720	}
8721	if value == nil {
8722		return nil
8723	}
8724
8725	shape, ok := value.(map[string]interface{})
8726	if !ok {
8727		return fmt.Errorf("unexpected JSON type %v", value)
8728	}
8729
8730	var sv *DescribeAssessmentTemplatesOutput
8731	if *v == nil {
8732		sv = &DescribeAssessmentTemplatesOutput{}
8733	} else {
8734		sv = *v
8735	}
8736
8737	for key, value := range shape {
8738		switch key {
8739		case "assessmentTemplates":
8740			if err := awsAwsjson11_deserializeDocumentAssessmentTemplateList(&sv.AssessmentTemplates, value); err != nil {
8741				return err
8742			}
8743
8744		case "failedItems":
8745			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8746				return err
8747			}
8748
8749		default:
8750			_, _ = key, value
8751
8752		}
8753	}
8754	*v = sv
8755	return nil
8756}
8757
8758func awsAwsjson11_deserializeOpDocumentDescribeCrossAccountAccessRoleOutput(v **DescribeCrossAccountAccessRoleOutput, value interface{}) error {
8759	if v == nil {
8760		return fmt.Errorf("unexpected nil of type %T", v)
8761	}
8762	if value == nil {
8763		return nil
8764	}
8765
8766	shape, ok := value.(map[string]interface{})
8767	if !ok {
8768		return fmt.Errorf("unexpected JSON type %v", value)
8769	}
8770
8771	var sv *DescribeCrossAccountAccessRoleOutput
8772	if *v == nil {
8773		sv = &DescribeCrossAccountAccessRoleOutput{}
8774	} else {
8775		sv = *v
8776	}
8777
8778	for key, value := range shape {
8779		switch key {
8780		case "registeredAt":
8781			if value != nil {
8782				jtv, ok := value.(json.Number)
8783				if !ok {
8784					return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value)
8785				}
8786				f64, err := jtv.Float64()
8787				if err != nil {
8788					return err
8789				}
8790				sv.RegisteredAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
8791			}
8792
8793		case "roleArn":
8794			if value != nil {
8795				jtv, ok := value.(string)
8796				if !ok {
8797					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
8798				}
8799				sv.RoleArn = ptr.String(jtv)
8800			}
8801
8802		case "valid":
8803			if value != nil {
8804				jtv, ok := value.(bool)
8805				if !ok {
8806					return fmt.Errorf("expected Bool to be of type *bool, got %T instead", value)
8807				}
8808				sv.Valid = ptr.Bool(jtv)
8809			}
8810
8811		default:
8812			_, _ = key, value
8813
8814		}
8815	}
8816	*v = sv
8817	return nil
8818}
8819
8820func awsAwsjson11_deserializeOpDocumentDescribeExclusionsOutput(v **DescribeExclusionsOutput, value interface{}) error {
8821	if v == nil {
8822		return fmt.Errorf("unexpected nil of type %T", v)
8823	}
8824	if value == nil {
8825		return nil
8826	}
8827
8828	shape, ok := value.(map[string]interface{})
8829	if !ok {
8830		return fmt.Errorf("unexpected JSON type %v", value)
8831	}
8832
8833	var sv *DescribeExclusionsOutput
8834	if *v == nil {
8835		sv = &DescribeExclusionsOutput{}
8836	} else {
8837		sv = *v
8838	}
8839
8840	for key, value := range shape {
8841		switch key {
8842		case "exclusions":
8843			if err := awsAwsjson11_deserializeDocumentExclusionMap(&sv.Exclusions, value); err != nil {
8844				return err
8845			}
8846
8847		case "failedItems":
8848			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8849				return err
8850			}
8851
8852		default:
8853			_, _ = key, value
8854
8855		}
8856	}
8857	*v = sv
8858	return nil
8859}
8860
8861func awsAwsjson11_deserializeOpDocumentDescribeFindingsOutput(v **DescribeFindingsOutput, value interface{}) error {
8862	if v == nil {
8863		return fmt.Errorf("unexpected nil of type %T", v)
8864	}
8865	if value == nil {
8866		return nil
8867	}
8868
8869	shape, ok := value.(map[string]interface{})
8870	if !ok {
8871		return fmt.Errorf("unexpected JSON type %v", value)
8872	}
8873
8874	var sv *DescribeFindingsOutput
8875	if *v == nil {
8876		sv = &DescribeFindingsOutput{}
8877	} else {
8878		sv = *v
8879	}
8880
8881	for key, value := range shape {
8882		switch key {
8883		case "failedItems":
8884			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8885				return err
8886			}
8887
8888		case "findings":
8889			if err := awsAwsjson11_deserializeDocumentFindingList(&sv.Findings, value); err != nil {
8890				return err
8891			}
8892
8893		default:
8894			_, _ = key, value
8895
8896		}
8897	}
8898	*v = sv
8899	return nil
8900}
8901
8902func awsAwsjson11_deserializeOpDocumentDescribeResourceGroupsOutput(v **DescribeResourceGroupsOutput, value interface{}) error {
8903	if v == nil {
8904		return fmt.Errorf("unexpected nil of type %T", v)
8905	}
8906	if value == nil {
8907		return nil
8908	}
8909
8910	shape, ok := value.(map[string]interface{})
8911	if !ok {
8912		return fmt.Errorf("unexpected JSON type %v", value)
8913	}
8914
8915	var sv *DescribeResourceGroupsOutput
8916	if *v == nil {
8917		sv = &DescribeResourceGroupsOutput{}
8918	} else {
8919		sv = *v
8920	}
8921
8922	for key, value := range shape {
8923		switch key {
8924		case "failedItems":
8925			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8926				return err
8927			}
8928
8929		case "resourceGroups":
8930			if err := awsAwsjson11_deserializeDocumentResourceGroupList(&sv.ResourceGroups, value); err != nil {
8931				return err
8932			}
8933
8934		default:
8935			_, _ = key, value
8936
8937		}
8938	}
8939	*v = sv
8940	return nil
8941}
8942
8943func awsAwsjson11_deserializeOpDocumentDescribeRulesPackagesOutput(v **DescribeRulesPackagesOutput, value interface{}) error {
8944	if v == nil {
8945		return fmt.Errorf("unexpected nil of type %T", v)
8946	}
8947	if value == nil {
8948		return nil
8949	}
8950
8951	shape, ok := value.(map[string]interface{})
8952	if !ok {
8953		return fmt.Errorf("unexpected JSON type %v", value)
8954	}
8955
8956	var sv *DescribeRulesPackagesOutput
8957	if *v == nil {
8958		sv = &DescribeRulesPackagesOutput{}
8959	} else {
8960		sv = *v
8961	}
8962
8963	for key, value := range shape {
8964		switch key {
8965		case "failedItems":
8966			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
8967				return err
8968			}
8969
8970		case "rulesPackages":
8971			if err := awsAwsjson11_deserializeDocumentRulesPackageList(&sv.RulesPackages, value); err != nil {
8972				return err
8973			}
8974
8975		default:
8976			_, _ = key, value
8977
8978		}
8979	}
8980	*v = sv
8981	return nil
8982}
8983
8984func awsAwsjson11_deserializeOpDocumentGetAssessmentReportOutput(v **GetAssessmentReportOutput, value interface{}) error {
8985	if v == nil {
8986		return fmt.Errorf("unexpected nil of type %T", v)
8987	}
8988	if value == nil {
8989		return nil
8990	}
8991
8992	shape, ok := value.(map[string]interface{})
8993	if !ok {
8994		return fmt.Errorf("unexpected JSON type %v", value)
8995	}
8996
8997	var sv *GetAssessmentReportOutput
8998	if *v == nil {
8999		sv = &GetAssessmentReportOutput{}
9000	} else {
9001		sv = *v
9002	}
9003
9004	for key, value := range shape {
9005		switch key {
9006		case "status":
9007			if value != nil {
9008				jtv, ok := value.(string)
9009				if !ok {
9010					return fmt.Errorf("expected ReportStatus to be of type string, got %T instead", value)
9011				}
9012				sv.Status = types.ReportStatus(jtv)
9013			}
9014
9015		case "url":
9016			if value != nil {
9017				jtv, ok := value.(string)
9018				if !ok {
9019					return fmt.Errorf("expected Url to be of type string, got %T instead", value)
9020				}
9021				sv.Url = ptr.String(jtv)
9022			}
9023
9024		default:
9025			_, _ = key, value
9026
9027		}
9028	}
9029	*v = sv
9030	return nil
9031}
9032
9033func awsAwsjson11_deserializeOpDocumentGetExclusionsPreviewOutput(v **GetExclusionsPreviewOutput, value interface{}) error {
9034	if v == nil {
9035		return fmt.Errorf("unexpected nil of type %T", v)
9036	}
9037	if value == nil {
9038		return nil
9039	}
9040
9041	shape, ok := value.(map[string]interface{})
9042	if !ok {
9043		return fmt.Errorf("unexpected JSON type %v", value)
9044	}
9045
9046	var sv *GetExclusionsPreviewOutput
9047	if *v == nil {
9048		sv = &GetExclusionsPreviewOutput{}
9049	} else {
9050		sv = *v
9051	}
9052
9053	for key, value := range shape {
9054		switch key {
9055		case "exclusionPreviews":
9056			if err := awsAwsjson11_deserializeDocumentExclusionPreviewList(&sv.ExclusionPreviews, value); err != nil {
9057				return err
9058			}
9059
9060		case "nextToken":
9061			if value != nil {
9062				jtv, ok := value.(string)
9063				if !ok {
9064					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9065				}
9066				sv.NextToken = ptr.String(jtv)
9067			}
9068
9069		case "previewStatus":
9070			if value != nil {
9071				jtv, ok := value.(string)
9072				if !ok {
9073					return fmt.Errorf("expected PreviewStatus to be of type string, got %T instead", value)
9074				}
9075				sv.PreviewStatus = types.PreviewStatus(jtv)
9076			}
9077
9078		default:
9079			_, _ = key, value
9080
9081		}
9082	}
9083	*v = sv
9084	return nil
9085}
9086
9087func awsAwsjson11_deserializeOpDocumentGetTelemetryMetadataOutput(v **GetTelemetryMetadataOutput, value interface{}) error {
9088	if v == nil {
9089		return fmt.Errorf("unexpected nil of type %T", v)
9090	}
9091	if value == nil {
9092		return nil
9093	}
9094
9095	shape, ok := value.(map[string]interface{})
9096	if !ok {
9097		return fmt.Errorf("unexpected JSON type %v", value)
9098	}
9099
9100	var sv *GetTelemetryMetadataOutput
9101	if *v == nil {
9102		sv = &GetTelemetryMetadataOutput{}
9103	} else {
9104		sv = *v
9105	}
9106
9107	for key, value := range shape {
9108		switch key {
9109		case "telemetryMetadata":
9110			if err := awsAwsjson11_deserializeDocumentTelemetryMetadataList(&sv.TelemetryMetadata, value); err != nil {
9111				return err
9112			}
9113
9114		default:
9115			_, _ = key, value
9116
9117		}
9118	}
9119	*v = sv
9120	return nil
9121}
9122
9123func awsAwsjson11_deserializeOpDocumentListAssessmentRunAgentsOutput(v **ListAssessmentRunAgentsOutput, value interface{}) error {
9124	if v == nil {
9125		return fmt.Errorf("unexpected nil of type %T", v)
9126	}
9127	if value == nil {
9128		return nil
9129	}
9130
9131	shape, ok := value.(map[string]interface{})
9132	if !ok {
9133		return fmt.Errorf("unexpected JSON type %v", value)
9134	}
9135
9136	var sv *ListAssessmentRunAgentsOutput
9137	if *v == nil {
9138		sv = &ListAssessmentRunAgentsOutput{}
9139	} else {
9140		sv = *v
9141	}
9142
9143	for key, value := range shape {
9144		switch key {
9145		case "assessmentRunAgents":
9146			if err := awsAwsjson11_deserializeDocumentAssessmentRunAgentList(&sv.AssessmentRunAgents, value); err != nil {
9147				return err
9148			}
9149
9150		case "nextToken":
9151			if value != nil {
9152				jtv, ok := value.(string)
9153				if !ok {
9154					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9155				}
9156				sv.NextToken = ptr.String(jtv)
9157			}
9158
9159		default:
9160			_, _ = key, value
9161
9162		}
9163	}
9164	*v = sv
9165	return nil
9166}
9167
9168func awsAwsjson11_deserializeOpDocumentListAssessmentRunsOutput(v **ListAssessmentRunsOutput, value interface{}) error {
9169	if v == nil {
9170		return fmt.Errorf("unexpected nil of type %T", v)
9171	}
9172	if value == nil {
9173		return nil
9174	}
9175
9176	shape, ok := value.(map[string]interface{})
9177	if !ok {
9178		return fmt.Errorf("unexpected JSON type %v", value)
9179	}
9180
9181	var sv *ListAssessmentRunsOutput
9182	if *v == nil {
9183		sv = &ListAssessmentRunsOutput{}
9184	} else {
9185		sv = *v
9186	}
9187
9188	for key, value := range shape {
9189		switch key {
9190		case "assessmentRunArns":
9191			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.AssessmentRunArns, value); err != nil {
9192				return err
9193			}
9194
9195		case "nextToken":
9196			if value != nil {
9197				jtv, ok := value.(string)
9198				if !ok {
9199					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9200				}
9201				sv.NextToken = ptr.String(jtv)
9202			}
9203
9204		default:
9205			_, _ = key, value
9206
9207		}
9208	}
9209	*v = sv
9210	return nil
9211}
9212
9213func awsAwsjson11_deserializeOpDocumentListAssessmentTargetsOutput(v **ListAssessmentTargetsOutput, value interface{}) error {
9214	if v == nil {
9215		return fmt.Errorf("unexpected nil of type %T", v)
9216	}
9217	if value == nil {
9218		return nil
9219	}
9220
9221	shape, ok := value.(map[string]interface{})
9222	if !ok {
9223		return fmt.Errorf("unexpected JSON type %v", value)
9224	}
9225
9226	var sv *ListAssessmentTargetsOutput
9227	if *v == nil {
9228		sv = &ListAssessmentTargetsOutput{}
9229	} else {
9230		sv = *v
9231	}
9232
9233	for key, value := range shape {
9234		switch key {
9235		case "assessmentTargetArns":
9236			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.AssessmentTargetArns, value); err != nil {
9237				return err
9238			}
9239
9240		case "nextToken":
9241			if value != nil {
9242				jtv, ok := value.(string)
9243				if !ok {
9244					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9245				}
9246				sv.NextToken = ptr.String(jtv)
9247			}
9248
9249		default:
9250			_, _ = key, value
9251
9252		}
9253	}
9254	*v = sv
9255	return nil
9256}
9257
9258func awsAwsjson11_deserializeOpDocumentListAssessmentTemplatesOutput(v **ListAssessmentTemplatesOutput, value interface{}) error {
9259	if v == nil {
9260		return fmt.Errorf("unexpected nil of type %T", v)
9261	}
9262	if value == nil {
9263		return nil
9264	}
9265
9266	shape, ok := value.(map[string]interface{})
9267	if !ok {
9268		return fmt.Errorf("unexpected JSON type %v", value)
9269	}
9270
9271	var sv *ListAssessmentTemplatesOutput
9272	if *v == nil {
9273		sv = &ListAssessmentTemplatesOutput{}
9274	} else {
9275		sv = *v
9276	}
9277
9278	for key, value := range shape {
9279		switch key {
9280		case "assessmentTemplateArns":
9281			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.AssessmentTemplateArns, value); err != nil {
9282				return err
9283			}
9284
9285		case "nextToken":
9286			if value != nil {
9287				jtv, ok := value.(string)
9288				if !ok {
9289					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9290				}
9291				sv.NextToken = ptr.String(jtv)
9292			}
9293
9294		default:
9295			_, _ = key, value
9296
9297		}
9298	}
9299	*v = sv
9300	return nil
9301}
9302
9303func awsAwsjson11_deserializeOpDocumentListEventSubscriptionsOutput(v **ListEventSubscriptionsOutput, value interface{}) error {
9304	if v == nil {
9305		return fmt.Errorf("unexpected nil of type %T", v)
9306	}
9307	if value == nil {
9308		return nil
9309	}
9310
9311	shape, ok := value.(map[string]interface{})
9312	if !ok {
9313		return fmt.Errorf("unexpected JSON type %v", value)
9314	}
9315
9316	var sv *ListEventSubscriptionsOutput
9317	if *v == nil {
9318		sv = &ListEventSubscriptionsOutput{}
9319	} else {
9320		sv = *v
9321	}
9322
9323	for key, value := range shape {
9324		switch key {
9325		case "nextToken":
9326			if value != nil {
9327				jtv, ok := value.(string)
9328				if !ok {
9329					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9330				}
9331				sv.NextToken = ptr.String(jtv)
9332			}
9333
9334		case "subscriptions":
9335			if err := awsAwsjson11_deserializeDocumentSubscriptionList(&sv.Subscriptions, value); err != nil {
9336				return err
9337			}
9338
9339		default:
9340			_, _ = key, value
9341
9342		}
9343	}
9344	*v = sv
9345	return nil
9346}
9347
9348func awsAwsjson11_deserializeOpDocumentListExclusionsOutput(v **ListExclusionsOutput, value interface{}) error {
9349	if v == nil {
9350		return fmt.Errorf("unexpected nil of type %T", v)
9351	}
9352	if value == nil {
9353		return nil
9354	}
9355
9356	shape, ok := value.(map[string]interface{})
9357	if !ok {
9358		return fmt.Errorf("unexpected JSON type %v", value)
9359	}
9360
9361	var sv *ListExclusionsOutput
9362	if *v == nil {
9363		sv = &ListExclusionsOutput{}
9364	} else {
9365		sv = *v
9366	}
9367
9368	for key, value := range shape {
9369		switch key {
9370		case "exclusionArns":
9371			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.ExclusionArns, value); err != nil {
9372				return err
9373			}
9374
9375		case "nextToken":
9376			if value != nil {
9377				jtv, ok := value.(string)
9378				if !ok {
9379					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9380				}
9381				sv.NextToken = ptr.String(jtv)
9382			}
9383
9384		default:
9385			_, _ = key, value
9386
9387		}
9388	}
9389	*v = sv
9390	return nil
9391}
9392
9393func awsAwsjson11_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput, value interface{}) error {
9394	if v == nil {
9395		return fmt.Errorf("unexpected nil of type %T", v)
9396	}
9397	if value == nil {
9398		return nil
9399	}
9400
9401	shape, ok := value.(map[string]interface{})
9402	if !ok {
9403		return fmt.Errorf("unexpected JSON type %v", value)
9404	}
9405
9406	var sv *ListFindingsOutput
9407	if *v == nil {
9408		sv = &ListFindingsOutput{}
9409	} else {
9410		sv = *v
9411	}
9412
9413	for key, value := range shape {
9414		switch key {
9415		case "findingArns":
9416			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.FindingArns, value); err != nil {
9417				return err
9418			}
9419
9420		case "nextToken":
9421			if value != nil {
9422				jtv, ok := value.(string)
9423				if !ok {
9424					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9425				}
9426				sv.NextToken = ptr.String(jtv)
9427			}
9428
9429		default:
9430			_, _ = key, value
9431
9432		}
9433	}
9434	*v = sv
9435	return nil
9436}
9437
9438func awsAwsjson11_deserializeOpDocumentListRulesPackagesOutput(v **ListRulesPackagesOutput, value interface{}) error {
9439	if v == nil {
9440		return fmt.Errorf("unexpected nil of type %T", v)
9441	}
9442	if value == nil {
9443		return nil
9444	}
9445
9446	shape, ok := value.(map[string]interface{})
9447	if !ok {
9448		return fmt.Errorf("unexpected JSON type %v", value)
9449	}
9450
9451	var sv *ListRulesPackagesOutput
9452	if *v == nil {
9453		sv = &ListRulesPackagesOutput{}
9454	} else {
9455		sv = *v
9456	}
9457
9458	for key, value := range shape {
9459		switch key {
9460		case "nextToken":
9461			if value != nil {
9462				jtv, ok := value.(string)
9463				if !ok {
9464					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9465				}
9466				sv.NextToken = ptr.String(jtv)
9467			}
9468
9469		case "rulesPackageArns":
9470			if err := awsAwsjson11_deserializeDocumentListReturnedArnList(&sv.RulesPackageArns, value); err != nil {
9471				return err
9472			}
9473
9474		default:
9475			_, _ = key, value
9476
9477		}
9478	}
9479	*v = sv
9480	return nil
9481}
9482
9483func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error {
9484	if v == nil {
9485		return fmt.Errorf("unexpected nil of type %T", v)
9486	}
9487	if value == nil {
9488		return nil
9489	}
9490
9491	shape, ok := value.(map[string]interface{})
9492	if !ok {
9493		return fmt.Errorf("unexpected JSON type %v", value)
9494	}
9495
9496	var sv *ListTagsForResourceOutput
9497	if *v == nil {
9498		sv = &ListTagsForResourceOutput{}
9499	} else {
9500		sv = *v
9501	}
9502
9503	for key, value := range shape {
9504		switch key {
9505		case "tags":
9506			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
9507				return err
9508			}
9509
9510		default:
9511			_, _ = key, value
9512
9513		}
9514	}
9515	*v = sv
9516	return nil
9517}
9518
9519func awsAwsjson11_deserializeOpDocumentPreviewAgentsOutput(v **PreviewAgentsOutput, value interface{}) error {
9520	if v == nil {
9521		return fmt.Errorf("unexpected nil of type %T", v)
9522	}
9523	if value == nil {
9524		return nil
9525	}
9526
9527	shape, ok := value.(map[string]interface{})
9528	if !ok {
9529		return fmt.Errorf("unexpected JSON type %v", value)
9530	}
9531
9532	var sv *PreviewAgentsOutput
9533	if *v == nil {
9534		sv = &PreviewAgentsOutput{}
9535	} else {
9536		sv = *v
9537	}
9538
9539	for key, value := range shape {
9540		switch key {
9541		case "agentPreviews":
9542			if err := awsAwsjson11_deserializeDocumentAgentPreviewList(&sv.AgentPreviews, value); err != nil {
9543				return err
9544			}
9545
9546		case "nextToken":
9547			if value != nil {
9548				jtv, ok := value.(string)
9549				if !ok {
9550					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
9551				}
9552				sv.NextToken = ptr.String(jtv)
9553			}
9554
9555		default:
9556			_, _ = key, value
9557
9558		}
9559	}
9560	*v = sv
9561	return nil
9562}
9563
9564func awsAwsjson11_deserializeOpDocumentRemoveAttributesFromFindingsOutput(v **RemoveAttributesFromFindingsOutput, value interface{}) error {
9565	if v == nil {
9566		return fmt.Errorf("unexpected nil of type %T", v)
9567	}
9568	if value == nil {
9569		return nil
9570	}
9571
9572	shape, ok := value.(map[string]interface{})
9573	if !ok {
9574		return fmt.Errorf("unexpected JSON type %v", value)
9575	}
9576
9577	var sv *RemoveAttributesFromFindingsOutput
9578	if *v == nil {
9579		sv = &RemoveAttributesFromFindingsOutput{}
9580	} else {
9581		sv = *v
9582	}
9583
9584	for key, value := range shape {
9585		switch key {
9586		case "failedItems":
9587			if err := awsAwsjson11_deserializeDocumentFailedItems(&sv.FailedItems, value); err != nil {
9588				return err
9589			}
9590
9591		default:
9592			_, _ = key, value
9593
9594		}
9595	}
9596	*v = sv
9597	return nil
9598}
9599
9600func awsAwsjson11_deserializeOpDocumentStartAssessmentRunOutput(v **StartAssessmentRunOutput, value interface{}) error {
9601	if v == nil {
9602		return fmt.Errorf("unexpected nil of type %T", v)
9603	}
9604	if value == nil {
9605		return nil
9606	}
9607
9608	shape, ok := value.(map[string]interface{})
9609	if !ok {
9610		return fmt.Errorf("unexpected JSON type %v", value)
9611	}
9612
9613	var sv *StartAssessmentRunOutput
9614	if *v == nil {
9615		sv = &StartAssessmentRunOutput{}
9616	} else {
9617		sv = *v
9618	}
9619
9620	for key, value := range shape {
9621		switch key {
9622		case "assessmentRunArn":
9623			if value != nil {
9624				jtv, ok := value.(string)
9625				if !ok {
9626					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
9627				}
9628				sv.AssessmentRunArn = ptr.String(jtv)
9629			}
9630
9631		default:
9632			_, _ = key, value
9633
9634		}
9635	}
9636	*v = sv
9637	return nil
9638}
9639