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