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