1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package acm
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/acm/types"
12	smithy "github.com/aws/smithy-go"
13	smithyio "github.com/aws/smithy-go/io"
14	"github.com/aws/smithy-go/middleware"
15	"github.com/aws/smithy-go/ptr"
16	smithytime "github.com/aws/smithy-go/time"
17	smithyhttp "github.com/aws/smithy-go/transport/http"
18	"io"
19	"io/ioutil"
20	"strings"
21)
22
23type awsAwsjson11_deserializeOpAddTagsToCertificate struct {
24}
25
26func (*awsAwsjson11_deserializeOpAddTagsToCertificate) ID() string {
27	return "OperationDeserializer"
28}
29
30func (m *awsAwsjson11_deserializeOpAddTagsToCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
31	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
32) {
33	out, metadata, err = next.HandleDeserialize(ctx, in)
34	if err != nil {
35		return out, metadata, err
36	}
37
38	response, ok := out.RawResponse.(*smithyhttp.Response)
39	if !ok {
40		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
41	}
42
43	if response.StatusCode < 200 || response.StatusCode >= 300 {
44		return out, metadata, awsAwsjson11_deserializeOpErrorAddTagsToCertificate(response, &metadata)
45	}
46	output := &AddTagsToCertificateOutput{}
47	out.Result = output
48
49	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
50		return out, metadata, &smithy.DeserializationError{
51			Err: fmt.Errorf("failed to discard response body, %w", err),
52		}
53	}
54
55	return out, metadata, err
56}
57
58func awsAwsjson11_deserializeOpErrorAddTagsToCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
59	var errorBuffer bytes.Buffer
60	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
61		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
62	}
63	errorBody := bytes.NewReader(errorBuffer.Bytes())
64
65	errorCode := "UnknownError"
66	errorMessage := errorCode
67
68	code := response.Header.Get("X-Amzn-ErrorType")
69	if len(code) != 0 {
70		errorCode = restjson.SanitizeErrorCode(code)
71	}
72
73	var buff [1024]byte
74	ringBuffer := smithyio.NewRingBuffer(buff[:])
75
76	body := io.TeeReader(errorBody, ringBuffer)
77	decoder := json.NewDecoder(body)
78	decoder.UseNumber()
79	code, message, err := restjson.GetErrorInfo(decoder)
80	if err != nil {
81		var snapshot bytes.Buffer
82		io.Copy(&snapshot, ringBuffer)
83		err = &smithy.DeserializationError{
84			Err:      fmt.Errorf("failed to decode response body, %w", err),
85			Snapshot: snapshot.Bytes(),
86		}
87		return err
88	}
89
90	errorBody.Seek(0, io.SeekStart)
91	if len(code) != 0 {
92		errorCode = restjson.SanitizeErrorCode(code)
93	}
94	if len(message) != 0 {
95		errorMessage = message
96	}
97
98	switch {
99	case strings.EqualFold("InvalidArnException", errorCode):
100		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
101
102	case strings.EqualFold("InvalidParameterException", errorCode):
103		return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
104
105	case strings.EqualFold("InvalidTagException", errorCode):
106		return awsAwsjson11_deserializeErrorInvalidTagException(response, errorBody)
107
108	case strings.EqualFold("ResourceNotFoundException", errorCode):
109		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
110
111	case strings.EqualFold("TagPolicyException", errorCode):
112		return awsAwsjson11_deserializeErrorTagPolicyException(response, errorBody)
113
114	case strings.EqualFold("ThrottlingException", errorCode):
115		return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody)
116
117	case strings.EqualFold("TooManyTagsException", errorCode):
118		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
119
120	default:
121		genericError := &smithy.GenericAPIError{
122			Code:    errorCode,
123			Message: errorMessage,
124		}
125		return genericError
126
127	}
128}
129
130type awsAwsjson11_deserializeOpDeleteCertificate struct {
131}
132
133func (*awsAwsjson11_deserializeOpDeleteCertificate) ID() string {
134	return "OperationDeserializer"
135}
136
137func (m *awsAwsjson11_deserializeOpDeleteCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
138	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
139) {
140	out, metadata, err = next.HandleDeserialize(ctx, in)
141	if err != nil {
142		return out, metadata, err
143	}
144
145	response, ok := out.RawResponse.(*smithyhttp.Response)
146	if !ok {
147		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
148	}
149
150	if response.StatusCode < 200 || response.StatusCode >= 300 {
151		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCertificate(response, &metadata)
152	}
153	output := &DeleteCertificateOutput{}
154	out.Result = output
155
156	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
157		return out, metadata, &smithy.DeserializationError{
158			Err: fmt.Errorf("failed to discard response body, %w", err),
159		}
160	}
161
162	return out, metadata, err
163}
164
165func awsAwsjson11_deserializeOpErrorDeleteCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
166	var errorBuffer bytes.Buffer
167	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
168		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
169	}
170	errorBody := bytes.NewReader(errorBuffer.Bytes())
171
172	errorCode := "UnknownError"
173	errorMessage := errorCode
174
175	code := response.Header.Get("X-Amzn-ErrorType")
176	if len(code) != 0 {
177		errorCode = restjson.SanitizeErrorCode(code)
178	}
179
180	var buff [1024]byte
181	ringBuffer := smithyio.NewRingBuffer(buff[:])
182
183	body := io.TeeReader(errorBody, ringBuffer)
184	decoder := json.NewDecoder(body)
185	decoder.UseNumber()
186	code, message, err := restjson.GetErrorInfo(decoder)
187	if err != nil {
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 err
195	}
196
197	errorBody.Seek(0, io.SeekStart)
198	if len(code) != 0 {
199		errorCode = restjson.SanitizeErrorCode(code)
200	}
201	if len(message) != 0 {
202		errorMessage = message
203	}
204
205	switch {
206	case strings.EqualFold("InvalidArnException", errorCode):
207		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
208
209	case strings.EqualFold("ResourceInUseException", errorCode):
210		return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody)
211
212	case strings.EqualFold("ResourceNotFoundException", errorCode):
213		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
214
215	default:
216		genericError := &smithy.GenericAPIError{
217			Code:    errorCode,
218			Message: errorMessage,
219		}
220		return genericError
221
222	}
223}
224
225type awsAwsjson11_deserializeOpDescribeCertificate struct {
226}
227
228func (*awsAwsjson11_deserializeOpDescribeCertificate) ID() string {
229	return "OperationDeserializer"
230}
231
232func (m *awsAwsjson11_deserializeOpDescribeCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
233	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
234) {
235	out, metadata, err = next.HandleDeserialize(ctx, in)
236	if err != nil {
237		return out, metadata, err
238	}
239
240	response, ok := out.RawResponse.(*smithyhttp.Response)
241	if !ok {
242		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
243	}
244
245	if response.StatusCode < 200 || response.StatusCode >= 300 {
246		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCertificate(response, &metadata)
247	}
248	output := &DescribeCertificateOutput{}
249	out.Result = output
250
251	var buff [1024]byte
252	ringBuffer := smithyio.NewRingBuffer(buff[:])
253
254	body := io.TeeReader(response.Body, ringBuffer)
255	decoder := json.NewDecoder(body)
256	decoder.UseNumber()
257	var shape interface{}
258	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
259		var snapshot bytes.Buffer
260		io.Copy(&snapshot, ringBuffer)
261		err = &smithy.DeserializationError{
262			Err:      fmt.Errorf("failed to decode response body, %w", err),
263			Snapshot: snapshot.Bytes(),
264		}
265		return out, metadata, err
266	}
267
268	err = awsAwsjson11_deserializeOpDocumentDescribeCertificateOutput(&output, shape)
269	if err != nil {
270		var snapshot bytes.Buffer
271		io.Copy(&snapshot, ringBuffer)
272		err = &smithy.DeserializationError{
273			Err:      fmt.Errorf("failed to decode response body, %w", err),
274			Snapshot: snapshot.Bytes(),
275		}
276		return out, metadata, err
277	}
278
279	return out, metadata, err
280}
281
282func awsAwsjson11_deserializeOpErrorDescribeCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
283	var errorBuffer bytes.Buffer
284	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
285		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
286	}
287	errorBody := bytes.NewReader(errorBuffer.Bytes())
288
289	errorCode := "UnknownError"
290	errorMessage := errorCode
291
292	code := response.Header.Get("X-Amzn-ErrorType")
293	if len(code) != 0 {
294		errorCode = restjson.SanitizeErrorCode(code)
295	}
296
297	var buff [1024]byte
298	ringBuffer := smithyio.NewRingBuffer(buff[:])
299
300	body := io.TeeReader(errorBody, ringBuffer)
301	decoder := json.NewDecoder(body)
302	decoder.UseNumber()
303	code, message, err := restjson.GetErrorInfo(decoder)
304	if err != nil {
305		var snapshot bytes.Buffer
306		io.Copy(&snapshot, ringBuffer)
307		err = &smithy.DeserializationError{
308			Err:      fmt.Errorf("failed to decode response body, %w", err),
309			Snapshot: snapshot.Bytes(),
310		}
311		return err
312	}
313
314	errorBody.Seek(0, io.SeekStart)
315	if len(code) != 0 {
316		errorCode = restjson.SanitizeErrorCode(code)
317	}
318	if len(message) != 0 {
319		errorMessage = message
320	}
321
322	switch {
323	case strings.EqualFold("InvalidArnException", errorCode):
324		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
325
326	case strings.EqualFold("ResourceNotFoundException", errorCode):
327		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
328
329	default:
330		genericError := &smithy.GenericAPIError{
331			Code:    errorCode,
332			Message: errorMessage,
333		}
334		return genericError
335
336	}
337}
338
339type awsAwsjson11_deserializeOpExportCertificate struct {
340}
341
342func (*awsAwsjson11_deserializeOpExportCertificate) ID() string {
343	return "OperationDeserializer"
344}
345
346func (m *awsAwsjson11_deserializeOpExportCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
347	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
348) {
349	out, metadata, err = next.HandleDeserialize(ctx, in)
350	if err != nil {
351		return out, metadata, err
352	}
353
354	response, ok := out.RawResponse.(*smithyhttp.Response)
355	if !ok {
356		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
357	}
358
359	if response.StatusCode < 200 || response.StatusCode >= 300 {
360		return out, metadata, awsAwsjson11_deserializeOpErrorExportCertificate(response, &metadata)
361	}
362	output := &ExportCertificateOutput{}
363	out.Result = output
364
365	var buff [1024]byte
366	ringBuffer := smithyio.NewRingBuffer(buff[:])
367
368	body := io.TeeReader(response.Body, ringBuffer)
369	decoder := json.NewDecoder(body)
370	decoder.UseNumber()
371	var shape interface{}
372	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
373		var snapshot bytes.Buffer
374		io.Copy(&snapshot, ringBuffer)
375		err = &smithy.DeserializationError{
376			Err:      fmt.Errorf("failed to decode response body, %w", err),
377			Snapshot: snapshot.Bytes(),
378		}
379		return out, metadata, err
380	}
381
382	err = awsAwsjson11_deserializeOpDocumentExportCertificateOutput(&output, shape)
383	if err != nil {
384		var snapshot bytes.Buffer
385		io.Copy(&snapshot, ringBuffer)
386		err = &smithy.DeserializationError{
387			Err:      fmt.Errorf("failed to decode response body, %w", err),
388			Snapshot: snapshot.Bytes(),
389		}
390		return out, metadata, err
391	}
392
393	return out, metadata, err
394}
395
396func awsAwsjson11_deserializeOpErrorExportCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
397	var errorBuffer bytes.Buffer
398	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
399		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
400	}
401	errorBody := bytes.NewReader(errorBuffer.Bytes())
402
403	errorCode := "UnknownError"
404	errorMessage := errorCode
405
406	code := response.Header.Get("X-Amzn-ErrorType")
407	if len(code) != 0 {
408		errorCode = restjson.SanitizeErrorCode(code)
409	}
410
411	var buff [1024]byte
412	ringBuffer := smithyio.NewRingBuffer(buff[:])
413
414	body := io.TeeReader(errorBody, ringBuffer)
415	decoder := json.NewDecoder(body)
416	decoder.UseNumber()
417	code, message, err := restjson.GetErrorInfo(decoder)
418	if err != nil {
419		var snapshot bytes.Buffer
420		io.Copy(&snapshot, ringBuffer)
421		err = &smithy.DeserializationError{
422			Err:      fmt.Errorf("failed to decode response body, %w", err),
423			Snapshot: snapshot.Bytes(),
424		}
425		return err
426	}
427
428	errorBody.Seek(0, io.SeekStart)
429	if len(code) != 0 {
430		errorCode = restjson.SanitizeErrorCode(code)
431	}
432	if len(message) != 0 {
433		errorMessage = message
434	}
435
436	switch {
437	case strings.EqualFold("InvalidArnException", errorCode):
438		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
439
440	case strings.EqualFold("RequestInProgressException", errorCode):
441		return awsAwsjson11_deserializeErrorRequestInProgressException(response, errorBody)
442
443	case strings.EqualFold("ResourceNotFoundException", errorCode):
444		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
445
446	default:
447		genericError := &smithy.GenericAPIError{
448			Code:    errorCode,
449			Message: errorMessage,
450		}
451		return genericError
452
453	}
454}
455
456type awsAwsjson11_deserializeOpGetAccountConfiguration struct {
457}
458
459func (*awsAwsjson11_deserializeOpGetAccountConfiguration) ID() string {
460	return "OperationDeserializer"
461}
462
463func (m *awsAwsjson11_deserializeOpGetAccountConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
464	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
465) {
466	out, metadata, err = next.HandleDeserialize(ctx, in)
467	if err != nil {
468		return out, metadata, err
469	}
470
471	response, ok := out.RawResponse.(*smithyhttp.Response)
472	if !ok {
473		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
474	}
475
476	if response.StatusCode < 200 || response.StatusCode >= 300 {
477		return out, metadata, awsAwsjson11_deserializeOpErrorGetAccountConfiguration(response, &metadata)
478	}
479	output := &GetAccountConfigurationOutput{}
480	out.Result = output
481
482	var buff [1024]byte
483	ringBuffer := smithyio.NewRingBuffer(buff[:])
484
485	body := io.TeeReader(response.Body, ringBuffer)
486	decoder := json.NewDecoder(body)
487	decoder.UseNumber()
488	var shape interface{}
489	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
490		var snapshot bytes.Buffer
491		io.Copy(&snapshot, ringBuffer)
492		err = &smithy.DeserializationError{
493			Err:      fmt.Errorf("failed to decode response body, %w", err),
494			Snapshot: snapshot.Bytes(),
495		}
496		return out, metadata, err
497	}
498
499	err = awsAwsjson11_deserializeOpDocumentGetAccountConfigurationOutput(&output, shape)
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 out, metadata, err
508	}
509
510	return out, metadata, err
511}
512
513func awsAwsjson11_deserializeOpErrorGetAccountConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
514	var errorBuffer bytes.Buffer
515	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
516		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
517	}
518	errorBody := bytes.NewReader(errorBuffer.Bytes())
519
520	errorCode := "UnknownError"
521	errorMessage := errorCode
522
523	code := response.Header.Get("X-Amzn-ErrorType")
524	if len(code) != 0 {
525		errorCode = restjson.SanitizeErrorCode(code)
526	}
527
528	var buff [1024]byte
529	ringBuffer := smithyio.NewRingBuffer(buff[:])
530
531	body := io.TeeReader(errorBody, ringBuffer)
532	decoder := json.NewDecoder(body)
533	decoder.UseNumber()
534	code, message, err := restjson.GetErrorInfo(decoder)
535	if err != nil {
536		var snapshot bytes.Buffer
537		io.Copy(&snapshot, ringBuffer)
538		err = &smithy.DeserializationError{
539			Err:      fmt.Errorf("failed to decode response body, %w", err),
540			Snapshot: snapshot.Bytes(),
541		}
542		return err
543	}
544
545	errorBody.Seek(0, io.SeekStart)
546	if len(code) != 0 {
547		errorCode = restjson.SanitizeErrorCode(code)
548	}
549	if len(message) != 0 {
550		errorMessage = message
551	}
552
553	switch {
554	case strings.EqualFold("AccessDeniedException", errorCode):
555		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
556
557	case strings.EqualFold("ThrottlingException", errorCode):
558		return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody)
559
560	default:
561		genericError := &smithy.GenericAPIError{
562			Code:    errorCode,
563			Message: errorMessage,
564		}
565		return genericError
566
567	}
568}
569
570type awsAwsjson11_deserializeOpGetCertificate struct {
571}
572
573func (*awsAwsjson11_deserializeOpGetCertificate) ID() string {
574	return "OperationDeserializer"
575}
576
577func (m *awsAwsjson11_deserializeOpGetCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
578	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
579) {
580	out, metadata, err = next.HandleDeserialize(ctx, in)
581	if err != nil {
582		return out, metadata, err
583	}
584
585	response, ok := out.RawResponse.(*smithyhttp.Response)
586	if !ok {
587		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
588	}
589
590	if response.StatusCode < 200 || response.StatusCode >= 300 {
591		return out, metadata, awsAwsjson11_deserializeOpErrorGetCertificate(response, &metadata)
592	}
593	output := &GetCertificateOutput{}
594	out.Result = output
595
596	var buff [1024]byte
597	ringBuffer := smithyio.NewRingBuffer(buff[:])
598
599	body := io.TeeReader(response.Body, ringBuffer)
600	decoder := json.NewDecoder(body)
601	decoder.UseNumber()
602	var shape interface{}
603	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
604		var snapshot bytes.Buffer
605		io.Copy(&snapshot, ringBuffer)
606		err = &smithy.DeserializationError{
607			Err:      fmt.Errorf("failed to decode response body, %w", err),
608			Snapshot: snapshot.Bytes(),
609		}
610		return out, metadata, err
611	}
612
613	err = awsAwsjson11_deserializeOpDocumentGetCertificateOutput(&output, shape)
614	if err != nil {
615		var snapshot bytes.Buffer
616		io.Copy(&snapshot, ringBuffer)
617		err = &smithy.DeserializationError{
618			Err:      fmt.Errorf("failed to decode response body, %w", err),
619			Snapshot: snapshot.Bytes(),
620		}
621		return out, metadata, err
622	}
623
624	return out, metadata, err
625}
626
627func awsAwsjson11_deserializeOpErrorGetCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
628	var errorBuffer bytes.Buffer
629	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
630		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
631	}
632	errorBody := bytes.NewReader(errorBuffer.Bytes())
633
634	errorCode := "UnknownError"
635	errorMessage := errorCode
636
637	code := response.Header.Get("X-Amzn-ErrorType")
638	if len(code) != 0 {
639		errorCode = restjson.SanitizeErrorCode(code)
640	}
641
642	var buff [1024]byte
643	ringBuffer := smithyio.NewRingBuffer(buff[:])
644
645	body := io.TeeReader(errorBody, ringBuffer)
646	decoder := json.NewDecoder(body)
647	decoder.UseNumber()
648	code, message, err := restjson.GetErrorInfo(decoder)
649	if err != nil {
650		var snapshot bytes.Buffer
651		io.Copy(&snapshot, ringBuffer)
652		err = &smithy.DeserializationError{
653			Err:      fmt.Errorf("failed to decode response body, %w", err),
654			Snapshot: snapshot.Bytes(),
655		}
656		return err
657	}
658
659	errorBody.Seek(0, io.SeekStart)
660	if len(code) != 0 {
661		errorCode = restjson.SanitizeErrorCode(code)
662	}
663	if len(message) != 0 {
664		errorMessage = message
665	}
666
667	switch {
668	case strings.EqualFold("InvalidArnException", errorCode):
669		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
670
671	case strings.EqualFold("RequestInProgressException", errorCode):
672		return awsAwsjson11_deserializeErrorRequestInProgressException(response, errorBody)
673
674	case strings.EqualFold("ResourceNotFoundException", errorCode):
675		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
676
677	default:
678		genericError := &smithy.GenericAPIError{
679			Code:    errorCode,
680			Message: errorMessage,
681		}
682		return genericError
683
684	}
685}
686
687type awsAwsjson11_deserializeOpImportCertificate struct {
688}
689
690func (*awsAwsjson11_deserializeOpImportCertificate) ID() string {
691	return "OperationDeserializer"
692}
693
694func (m *awsAwsjson11_deserializeOpImportCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
695	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
696) {
697	out, metadata, err = next.HandleDeserialize(ctx, in)
698	if err != nil {
699		return out, metadata, err
700	}
701
702	response, ok := out.RawResponse.(*smithyhttp.Response)
703	if !ok {
704		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
705	}
706
707	if response.StatusCode < 200 || response.StatusCode >= 300 {
708		return out, metadata, awsAwsjson11_deserializeOpErrorImportCertificate(response, &metadata)
709	}
710	output := &ImportCertificateOutput{}
711	out.Result = output
712
713	var buff [1024]byte
714	ringBuffer := smithyio.NewRingBuffer(buff[:])
715
716	body := io.TeeReader(response.Body, ringBuffer)
717	decoder := json.NewDecoder(body)
718	decoder.UseNumber()
719	var shape interface{}
720	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
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	err = awsAwsjson11_deserializeOpDocumentImportCertificateOutput(&output, shape)
731	if err != nil {
732		var snapshot bytes.Buffer
733		io.Copy(&snapshot, ringBuffer)
734		err = &smithy.DeserializationError{
735			Err:      fmt.Errorf("failed to decode response body, %w", err),
736			Snapshot: snapshot.Bytes(),
737		}
738		return out, metadata, err
739	}
740
741	return out, metadata, err
742}
743
744func awsAwsjson11_deserializeOpErrorImportCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
745	var errorBuffer bytes.Buffer
746	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
747		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
748	}
749	errorBody := bytes.NewReader(errorBuffer.Bytes())
750
751	errorCode := "UnknownError"
752	errorMessage := errorCode
753
754	code := response.Header.Get("X-Amzn-ErrorType")
755	if len(code) != 0 {
756		errorCode = restjson.SanitizeErrorCode(code)
757	}
758
759	var buff [1024]byte
760	ringBuffer := smithyio.NewRingBuffer(buff[:])
761
762	body := io.TeeReader(errorBody, ringBuffer)
763	decoder := json.NewDecoder(body)
764	decoder.UseNumber()
765	code, message, err := restjson.GetErrorInfo(decoder)
766	if err != nil {
767		var snapshot bytes.Buffer
768		io.Copy(&snapshot, ringBuffer)
769		err = &smithy.DeserializationError{
770			Err:      fmt.Errorf("failed to decode response body, %w", err),
771			Snapshot: snapshot.Bytes(),
772		}
773		return err
774	}
775
776	errorBody.Seek(0, io.SeekStart)
777	if len(code) != 0 {
778		errorCode = restjson.SanitizeErrorCode(code)
779	}
780	if len(message) != 0 {
781		errorMessage = message
782	}
783
784	switch {
785	case strings.EqualFold("InvalidArnException", errorCode):
786		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
787
788	case strings.EqualFold("InvalidParameterException", errorCode):
789		return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
790
791	case strings.EqualFold("InvalidTagException", errorCode):
792		return awsAwsjson11_deserializeErrorInvalidTagException(response, errorBody)
793
794	case strings.EqualFold("LimitExceededException", errorCode):
795		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
796
797	case strings.EqualFold("ResourceNotFoundException", errorCode):
798		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
799
800	case strings.EqualFold("TagPolicyException", errorCode):
801		return awsAwsjson11_deserializeErrorTagPolicyException(response, errorBody)
802
803	case strings.EqualFold("TooManyTagsException", errorCode):
804		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
805
806	default:
807		genericError := &smithy.GenericAPIError{
808			Code:    errorCode,
809			Message: errorMessage,
810		}
811		return genericError
812
813	}
814}
815
816type awsAwsjson11_deserializeOpListCertificates struct {
817}
818
819func (*awsAwsjson11_deserializeOpListCertificates) ID() string {
820	return "OperationDeserializer"
821}
822
823func (m *awsAwsjson11_deserializeOpListCertificates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
824	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
825) {
826	out, metadata, err = next.HandleDeserialize(ctx, in)
827	if err != nil {
828		return out, metadata, err
829	}
830
831	response, ok := out.RawResponse.(*smithyhttp.Response)
832	if !ok {
833		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
834	}
835
836	if response.StatusCode < 200 || response.StatusCode >= 300 {
837		return out, metadata, awsAwsjson11_deserializeOpErrorListCertificates(response, &metadata)
838	}
839	output := &ListCertificatesOutput{}
840	out.Result = output
841
842	var buff [1024]byte
843	ringBuffer := smithyio.NewRingBuffer(buff[:])
844
845	body := io.TeeReader(response.Body, ringBuffer)
846	decoder := json.NewDecoder(body)
847	decoder.UseNumber()
848	var shape interface{}
849	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
850		var snapshot bytes.Buffer
851		io.Copy(&snapshot, ringBuffer)
852		err = &smithy.DeserializationError{
853			Err:      fmt.Errorf("failed to decode response body, %w", err),
854			Snapshot: snapshot.Bytes(),
855		}
856		return out, metadata, err
857	}
858
859	err = awsAwsjson11_deserializeOpDocumentListCertificatesOutput(&output, shape)
860	if err != nil {
861		var snapshot bytes.Buffer
862		io.Copy(&snapshot, ringBuffer)
863		err = &smithy.DeserializationError{
864			Err:      fmt.Errorf("failed to decode response body, %w", err),
865			Snapshot: snapshot.Bytes(),
866		}
867		return out, metadata, err
868	}
869
870	return out, metadata, err
871}
872
873func awsAwsjson11_deserializeOpErrorListCertificates(response *smithyhttp.Response, metadata *middleware.Metadata) error {
874	var errorBuffer bytes.Buffer
875	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
876		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
877	}
878	errorBody := bytes.NewReader(errorBuffer.Bytes())
879
880	errorCode := "UnknownError"
881	errorMessage := errorCode
882
883	code := response.Header.Get("X-Amzn-ErrorType")
884	if len(code) != 0 {
885		errorCode = restjson.SanitizeErrorCode(code)
886	}
887
888	var buff [1024]byte
889	ringBuffer := smithyio.NewRingBuffer(buff[:])
890
891	body := io.TeeReader(errorBody, ringBuffer)
892	decoder := json.NewDecoder(body)
893	decoder.UseNumber()
894	code, message, err := restjson.GetErrorInfo(decoder)
895	if err != nil {
896		var snapshot bytes.Buffer
897		io.Copy(&snapshot, ringBuffer)
898		err = &smithy.DeserializationError{
899			Err:      fmt.Errorf("failed to decode response body, %w", err),
900			Snapshot: snapshot.Bytes(),
901		}
902		return err
903	}
904
905	errorBody.Seek(0, io.SeekStart)
906	if len(code) != 0 {
907		errorCode = restjson.SanitizeErrorCode(code)
908	}
909	if len(message) != 0 {
910		errorMessage = message
911	}
912
913	switch {
914	case strings.EqualFold("InvalidArgsException", errorCode):
915		return awsAwsjson11_deserializeErrorInvalidArgsException(response, errorBody)
916
917	default:
918		genericError := &smithy.GenericAPIError{
919			Code:    errorCode,
920			Message: errorMessage,
921		}
922		return genericError
923
924	}
925}
926
927type awsAwsjson11_deserializeOpListTagsForCertificate struct {
928}
929
930func (*awsAwsjson11_deserializeOpListTagsForCertificate) ID() string {
931	return "OperationDeserializer"
932}
933
934func (m *awsAwsjson11_deserializeOpListTagsForCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
935	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
936) {
937	out, metadata, err = next.HandleDeserialize(ctx, in)
938	if err != nil {
939		return out, metadata, err
940	}
941
942	response, ok := out.RawResponse.(*smithyhttp.Response)
943	if !ok {
944		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
945	}
946
947	if response.StatusCode < 200 || response.StatusCode >= 300 {
948		return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForCertificate(response, &metadata)
949	}
950	output := &ListTagsForCertificateOutput{}
951	out.Result = output
952
953	var buff [1024]byte
954	ringBuffer := smithyio.NewRingBuffer(buff[:])
955
956	body := io.TeeReader(response.Body, ringBuffer)
957	decoder := json.NewDecoder(body)
958	decoder.UseNumber()
959	var shape interface{}
960	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
961		var snapshot bytes.Buffer
962		io.Copy(&snapshot, ringBuffer)
963		err = &smithy.DeserializationError{
964			Err:      fmt.Errorf("failed to decode response body, %w", err),
965			Snapshot: snapshot.Bytes(),
966		}
967		return out, metadata, err
968	}
969
970	err = awsAwsjson11_deserializeOpDocumentListTagsForCertificateOutput(&output, shape)
971	if err != nil {
972		var snapshot bytes.Buffer
973		io.Copy(&snapshot, ringBuffer)
974		err = &smithy.DeserializationError{
975			Err:      fmt.Errorf("failed to decode response body, %w", err),
976			Snapshot: snapshot.Bytes(),
977		}
978		return out, metadata, err
979	}
980
981	return out, metadata, err
982}
983
984func awsAwsjson11_deserializeOpErrorListTagsForCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
985	var errorBuffer bytes.Buffer
986	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
987		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
988	}
989	errorBody := bytes.NewReader(errorBuffer.Bytes())
990
991	errorCode := "UnknownError"
992	errorMessage := errorCode
993
994	code := response.Header.Get("X-Amzn-ErrorType")
995	if len(code) != 0 {
996		errorCode = restjson.SanitizeErrorCode(code)
997	}
998
999	var buff [1024]byte
1000	ringBuffer := smithyio.NewRingBuffer(buff[:])
1001
1002	body := io.TeeReader(errorBody, ringBuffer)
1003	decoder := json.NewDecoder(body)
1004	decoder.UseNumber()
1005	code, message, err := restjson.GetErrorInfo(decoder)
1006	if err != nil {
1007		var snapshot bytes.Buffer
1008		io.Copy(&snapshot, ringBuffer)
1009		err = &smithy.DeserializationError{
1010			Err:      fmt.Errorf("failed to decode response body, %w", err),
1011			Snapshot: snapshot.Bytes(),
1012		}
1013		return err
1014	}
1015
1016	errorBody.Seek(0, io.SeekStart)
1017	if len(code) != 0 {
1018		errorCode = restjson.SanitizeErrorCode(code)
1019	}
1020	if len(message) != 0 {
1021		errorMessage = message
1022	}
1023
1024	switch {
1025	case strings.EqualFold("InvalidArnException", errorCode):
1026		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1027
1028	case strings.EqualFold("ResourceNotFoundException", errorCode):
1029		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1030
1031	default:
1032		genericError := &smithy.GenericAPIError{
1033			Code:    errorCode,
1034			Message: errorMessage,
1035		}
1036		return genericError
1037
1038	}
1039}
1040
1041type awsAwsjson11_deserializeOpPutAccountConfiguration struct {
1042}
1043
1044func (*awsAwsjson11_deserializeOpPutAccountConfiguration) ID() string {
1045	return "OperationDeserializer"
1046}
1047
1048func (m *awsAwsjson11_deserializeOpPutAccountConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1049	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1050) {
1051	out, metadata, err = next.HandleDeserialize(ctx, in)
1052	if err != nil {
1053		return out, metadata, err
1054	}
1055
1056	response, ok := out.RawResponse.(*smithyhttp.Response)
1057	if !ok {
1058		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1059	}
1060
1061	if response.StatusCode < 200 || response.StatusCode >= 300 {
1062		return out, metadata, awsAwsjson11_deserializeOpErrorPutAccountConfiguration(response, &metadata)
1063	}
1064	output := &PutAccountConfigurationOutput{}
1065	out.Result = output
1066
1067	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
1068		return out, metadata, &smithy.DeserializationError{
1069			Err: fmt.Errorf("failed to discard response body, %w", err),
1070		}
1071	}
1072
1073	return out, metadata, err
1074}
1075
1076func awsAwsjson11_deserializeOpErrorPutAccountConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1077	var errorBuffer bytes.Buffer
1078	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1079		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1080	}
1081	errorBody := bytes.NewReader(errorBuffer.Bytes())
1082
1083	errorCode := "UnknownError"
1084	errorMessage := errorCode
1085
1086	code := response.Header.Get("X-Amzn-ErrorType")
1087	if len(code) != 0 {
1088		errorCode = restjson.SanitizeErrorCode(code)
1089	}
1090
1091	var buff [1024]byte
1092	ringBuffer := smithyio.NewRingBuffer(buff[:])
1093
1094	body := io.TeeReader(errorBody, ringBuffer)
1095	decoder := json.NewDecoder(body)
1096	decoder.UseNumber()
1097	code, message, err := restjson.GetErrorInfo(decoder)
1098	if err != nil {
1099		var snapshot bytes.Buffer
1100		io.Copy(&snapshot, ringBuffer)
1101		err = &smithy.DeserializationError{
1102			Err:      fmt.Errorf("failed to decode response body, %w", err),
1103			Snapshot: snapshot.Bytes(),
1104		}
1105		return err
1106	}
1107
1108	errorBody.Seek(0, io.SeekStart)
1109	if len(code) != 0 {
1110		errorCode = restjson.SanitizeErrorCode(code)
1111	}
1112	if len(message) != 0 {
1113		errorMessage = message
1114	}
1115
1116	switch {
1117	case strings.EqualFold("AccessDeniedException", errorCode):
1118		return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
1119
1120	case strings.EqualFold("ConflictException", errorCode):
1121		return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
1122
1123	case strings.EqualFold("ThrottlingException", errorCode):
1124		return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody)
1125
1126	case strings.EqualFold("ValidationException", errorCode):
1127		return awsAwsjson11_deserializeErrorValidationException(response, errorBody)
1128
1129	default:
1130		genericError := &smithy.GenericAPIError{
1131			Code:    errorCode,
1132			Message: errorMessage,
1133		}
1134		return genericError
1135
1136	}
1137}
1138
1139type awsAwsjson11_deserializeOpRemoveTagsFromCertificate struct {
1140}
1141
1142func (*awsAwsjson11_deserializeOpRemoveTagsFromCertificate) ID() string {
1143	return "OperationDeserializer"
1144}
1145
1146func (m *awsAwsjson11_deserializeOpRemoveTagsFromCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1147	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1148) {
1149	out, metadata, err = next.HandleDeserialize(ctx, in)
1150	if err != nil {
1151		return out, metadata, err
1152	}
1153
1154	response, ok := out.RawResponse.(*smithyhttp.Response)
1155	if !ok {
1156		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1157	}
1158
1159	if response.StatusCode < 200 || response.StatusCode >= 300 {
1160		return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromCertificate(response, &metadata)
1161	}
1162	output := &RemoveTagsFromCertificateOutput{}
1163	out.Result = output
1164
1165	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
1166		return out, metadata, &smithy.DeserializationError{
1167			Err: fmt.Errorf("failed to discard response body, %w", err),
1168		}
1169	}
1170
1171	return out, metadata, err
1172}
1173
1174func awsAwsjson11_deserializeOpErrorRemoveTagsFromCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1175	var errorBuffer bytes.Buffer
1176	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1177		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1178	}
1179	errorBody := bytes.NewReader(errorBuffer.Bytes())
1180
1181	errorCode := "UnknownError"
1182	errorMessage := errorCode
1183
1184	code := response.Header.Get("X-Amzn-ErrorType")
1185	if len(code) != 0 {
1186		errorCode = restjson.SanitizeErrorCode(code)
1187	}
1188
1189	var buff [1024]byte
1190	ringBuffer := smithyio.NewRingBuffer(buff[:])
1191
1192	body := io.TeeReader(errorBody, ringBuffer)
1193	decoder := json.NewDecoder(body)
1194	decoder.UseNumber()
1195	code, message, err := restjson.GetErrorInfo(decoder)
1196	if err != nil {
1197		var snapshot bytes.Buffer
1198		io.Copy(&snapshot, ringBuffer)
1199		err = &smithy.DeserializationError{
1200			Err:      fmt.Errorf("failed to decode response body, %w", err),
1201			Snapshot: snapshot.Bytes(),
1202		}
1203		return err
1204	}
1205
1206	errorBody.Seek(0, io.SeekStart)
1207	if len(code) != 0 {
1208		errorCode = restjson.SanitizeErrorCode(code)
1209	}
1210	if len(message) != 0 {
1211		errorMessage = message
1212	}
1213
1214	switch {
1215	case strings.EqualFold("InvalidArnException", errorCode):
1216		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1217
1218	case strings.EqualFold("InvalidParameterException", errorCode):
1219		return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
1220
1221	case strings.EqualFold("InvalidTagException", errorCode):
1222		return awsAwsjson11_deserializeErrorInvalidTagException(response, errorBody)
1223
1224	case strings.EqualFold("ResourceNotFoundException", errorCode):
1225		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1226
1227	case strings.EqualFold("TagPolicyException", errorCode):
1228		return awsAwsjson11_deserializeErrorTagPolicyException(response, errorBody)
1229
1230	case strings.EqualFold("ThrottlingException", errorCode):
1231		return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody)
1232
1233	default:
1234		genericError := &smithy.GenericAPIError{
1235			Code:    errorCode,
1236			Message: errorMessage,
1237		}
1238		return genericError
1239
1240	}
1241}
1242
1243type awsAwsjson11_deserializeOpRenewCertificate struct {
1244}
1245
1246func (*awsAwsjson11_deserializeOpRenewCertificate) ID() string {
1247	return "OperationDeserializer"
1248}
1249
1250func (m *awsAwsjson11_deserializeOpRenewCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1251	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1252) {
1253	out, metadata, err = next.HandleDeserialize(ctx, in)
1254	if err != nil {
1255		return out, metadata, err
1256	}
1257
1258	response, ok := out.RawResponse.(*smithyhttp.Response)
1259	if !ok {
1260		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1261	}
1262
1263	if response.StatusCode < 200 || response.StatusCode >= 300 {
1264		return out, metadata, awsAwsjson11_deserializeOpErrorRenewCertificate(response, &metadata)
1265	}
1266	output := &RenewCertificateOutput{}
1267	out.Result = output
1268
1269	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
1270		return out, metadata, &smithy.DeserializationError{
1271			Err: fmt.Errorf("failed to discard response body, %w", err),
1272		}
1273	}
1274
1275	return out, metadata, err
1276}
1277
1278func awsAwsjson11_deserializeOpErrorRenewCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1279	var errorBuffer bytes.Buffer
1280	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1281		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1282	}
1283	errorBody := bytes.NewReader(errorBuffer.Bytes())
1284
1285	errorCode := "UnknownError"
1286	errorMessage := errorCode
1287
1288	code := response.Header.Get("X-Amzn-ErrorType")
1289	if len(code) != 0 {
1290		errorCode = restjson.SanitizeErrorCode(code)
1291	}
1292
1293	var buff [1024]byte
1294	ringBuffer := smithyio.NewRingBuffer(buff[:])
1295
1296	body := io.TeeReader(errorBody, ringBuffer)
1297	decoder := json.NewDecoder(body)
1298	decoder.UseNumber()
1299	code, message, err := restjson.GetErrorInfo(decoder)
1300	if err != nil {
1301		var snapshot bytes.Buffer
1302		io.Copy(&snapshot, ringBuffer)
1303		err = &smithy.DeserializationError{
1304			Err:      fmt.Errorf("failed to decode response body, %w", err),
1305			Snapshot: snapshot.Bytes(),
1306		}
1307		return err
1308	}
1309
1310	errorBody.Seek(0, io.SeekStart)
1311	if len(code) != 0 {
1312		errorCode = restjson.SanitizeErrorCode(code)
1313	}
1314	if len(message) != 0 {
1315		errorMessage = message
1316	}
1317
1318	switch {
1319	case strings.EqualFold("InvalidArnException", errorCode):
1320		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1321
1322	case strings.EqualFold("ResourceNotFoundException", errorCode):
1323		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1324
1325	default:
1326		genericError := &smithy.GenericAPIError{
1327			Code:    errorCode,
1328			Message: errorMessage,
1329		}
1330		return genericError
1331
1332	}
1333}
1334
1335type awsAwsjson11_deserializeOpRequestCertificate struct {
1336}
1337
1338func (*awsAwsjson11_deserializeOpRequestCertificate) ID() string {
1339	return "OperationDeserializer"
1340}
1341
1342func (m *awsAwsjson11_deserializeOpRequestCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1343	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1344) {
1345	out, metadata, err = next.HandleDeserialize(ctx, in)
1346	if err != nil {
1347		return out, metadata, err
1348	}
1349
1350	response, ok := out.RawResponse.(*smithyhttp.Response)
1351	if !ok {
1352		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1353	}
1354
1355	if response.StatusCode < 200 || response.StatusCode >= 300 {
1356		return out, metadata, awsAwsjson11_deserializeOpErrorRequestCertificate(response, &metadata)
1357	}
1358	output := &RequestCertificateOutput{}
1359	out.Result = output
1360
1361	var buff [1024]byte
1362	ringBuffer := smithyio.NewRingBuffer(buff[:])
1363
1364	body := io.TeeReader(response.Body, ringBuffer)
1365	decoder := json.NewDecoder(body)
1366	decoder.UseNumber()
1367	var shape interface{}
1368	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1369		var snapshot bytes.Buffer
1370		io.Copy(&snapshot, ringBuffer)
1371		err = &smithy.DeserializationError{
1372			Err:      fmt.Errorf("failed to decode response body, %w", err),
1373			Snapshot: snapshot.Bytes(),
1374		}
1375		return out, metadata, err
1376	}
1377
1378	err = awsAwsjson11_deserializeOpDocumentRequestCertificateOutput(&output, shape)
1379	if err != nil {
1380		var snapshot bytes.Buffer
1381		io.Copy(&snapshot, ringBuffer)
1382		err = &smithy.DeserializationError{
1383			Err:      fmt.Errorf("failed to decode response body, %w", err),
1384			Snapshot: snapshot.Bytes(),
1385		}
1386		return out, metadata, err
1387	}
1388
1389	return out, metadata, err
1390}
1391
1392func awsAwsjson11_deserializeOpErrorRequestCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1393	var errorBuffer bytes.Buffer
1394	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1395		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1396	}
1397	errorBody := bytes.NewReader(errorBuffer.Bytes())
1398
1399	errorCode := "UnknownError"
1400	errorMessage := errorCode
1401
1402	code := response.Header.Get("X-Amzn-ErrorType")
1403	if len(code) != 0 {
1404		errorCode = restjson.SanitizeErrorCode(code)
1405	}
1406
1407	var buff [1024]byte
1408	ringBuffer := smithyio.NewRingBuffer(buff[:])
1409
1410	body := io.TeeReader(errorBody, ringBuffer)
1411	decoder := json.NewDecoder(body)
1412	decoder.UseNumber()
1413	code, message, err := restjson.GetErrorInfo(decoder)
1414	if err != nil {
1415		var snapshot bytes.Buffer
1416		io.Copy(&snapshot, ringBuffer)
1417		err = &smithy.DeserializationError{
1418			Err:      fmt.Errorf("failed to decode response body, %w", err),
1419			Snapshot: snapshot.Bytes(),
1420		}
1421		return err
1422	}
1423
1424	errorBody.Seek(0, io.SeekStart)
1425	if len(code) != 0 {
1426		errorCode = restjson.SanitizeErrorCode(code)
1427	}
1428	if len(message) != 0 {
1429		errorMessage = message
1430	}
1431
1432	switch {
1433	case strings.EqualFold("InvalidArnException", errorCode):
1434		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1435
1436	case strings.EqualFold("InvalidDomainValidationOptionsException", errorCode):
1437		return awsAwsjson11_deserializeErrorInvalidDomainValidationOptionsException(response, errorBody)
1438
1439	case strings.EqualFold("InvalidParameterException", errorCode):
1440		return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
1441
1442	case strings.EqualFold("InvalidTagException", errorCode):
1443		return awsAwsjson11_deserializeErrorInvalidTagException(response, errorBody)
1444
1445	case strings.EqualFold("LimitExceededException", errorCode):
1446		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
1447
1448	case strings.EqualFold("TagPolicyException", errorCode):
1449		return awsAwsjson11_deserializeErrorTagPolicyException(response, errorBody)
1450
1451	case strings.EqualFold("TooManyTagsException", errorCode):
1452		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
1453
1454	default:
1455		genericError := &smithy.GenericAPIError{
1456			Code:    errorCode,
1457			Message: errorMessage,
1458		}
1459		return genericError
1460
1461	}
1462}
1463
1464type awsAwsjson11_deserializeOpResendValidationEmail struct {
1465}
1466
1467func (*awsAwsjson11_deserializeOpResendValidationEmail) ID() string {
1468	return "OperationDeserializer"
1469}
1470
1471func (m *awsAwsjson11_deserializeOpResendValidationEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1472	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1473) {
1474	out, metadata, err = next.HandleDeserialize(ctx, in)
1475	if err != nil {
1476		return out, metadata, err
1477	}
1478
1479	response, ok := out.RawResponse.(*smithyhttp.Response)
1480	if !ok {
1481		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1482	}
1483
1484	if response.StatusCode < 200 || response.StatusCode >= 300 {
1485		return out, metadata, awsAwsjson11_deserializeOpErrorResendValidationEmail(response, &metadata)
1486	}
1487	output := &ResendValidationEmailOutput{}
1488	out.Result = output
1489
1490	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
1491		return out, metadata, &smithy.DeserializationError{
1492			Err: fmt.Errorf("failed to discard response body, %w", err),
1493		}
1494	}
1495
1496	return out, metadata, err
1497}
1498
1499func awsAwsjson11_deserializeOpErrorResendValidationEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1500	var errorBuffer bytes.Buffer
1501	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1502		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1503	}
1504	errorBody := bytes.NewReader(errorBuffer.Bytes())
1505
1506	errorCode := "UnknownError"
1507	errorMessage := errorCode
1508
1509	code := response.Header.Get("X-Amzn-ErrorType")
1510	if len(code) != 0 {
1511		errorCode = restjson.SanitizeErrorCode(code)
1512	}
1513
1514	var buff [1024]byte
1515	ringBuffer := smithyio.NewRingBuffer(buff[:])
1516
1517	body := io.TeeReader(errorBody, ringBuffer)
1518	decoder := json.NewDecoder(body)
1519	decoder.UseNumber()
1520	code, message, err := restjson.GetErrorInfo(decoder)
1521	if err != nil {
1522		var snapshot bytes.Buffer
1523		io.Copy(&snapshot, ringBuffer)
1524		err = &smithy.DeserializationError{
1525			Err:      fmt.Errorf("failed to decode response body, %w", err),
1526			Snapshot: snapshot.Bytes(),
1527		}
1528		return err
1529	}
1530
1531	errorBody.Seek(0, io.SeekStart)
1532	if len(code) != 0 {
1533		errorCode = restjson.SanitizeErrorCode(code)
1534	}
1535	if len(message) != 0 {
1536		errorMessage = message
1537	}
1538
1539	switch {
1540	case strings.EqualFold("InvalidArnException", errorCode):
1541		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1542
1543	case strings.EqualFold("InvalidDomainValidationOptionsException", errorCode):
1544		return awsAwsjson11_deserializeErrorInvalidDomainValidationOptionsException(response, errorBody)
1545
1546	case strings.EqualFold("InvalidStateException", errorCode):
1547		return awsAwsjson11_deserializeErrorInvalidStateException(response, errorBody)
1548
1549	case strings.EqualFold("ResourceNotFoundException", errorCode):
1550		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1551
1552	default:
1553		genericError := &smithy.GenericAPIError{
1554			Code:    errorCode,
1555			Message: errorMessage,
1556		}
1557		return genericError
1558
1559	}
1560}
1561
1562type awsAwsjson11_deserializeOpUpdateCertificateOptions struct {
1563}
1564
1565func (*awsAwsjson11_deserializeOpUpdateCertificateOptions) ID() string {
1566	return "OperationDeserializer"
1567}
1568
1569func (m *awsAwsjson11_deserializeOpUpdateCertificateOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1570	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1571) {
1572	out, metadata, err = next.HandleDeserialize(ctx, in)
1573	if err != nil {
1574		return out, metadata, err
1575	}
1576
1577	response, ok := out.RawResponse.(*smithyhttp.Response)
1578	if !ok {
1579		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1580	}
1581
1582	if response.StatusCode < 200 || response.StatusCode >= 300 {
1583		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCertificateOptions(response, &metadata)
1584	}
1585	output := &UpdateCertificateOptionsOutput{}
1586	out.Result = output
1587
1588	if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
1589		return out, metadata, &smithy.DeserializationError{
1590			Err: fmt.Errorf("failed to discard response body, %w", err),
1591		}
1592	}
1593
1594	return out, metadata, err
1595}
1596
1597func awsAwsjson11_deserializeOpErrorUpdateCertificateOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1598	var errorBuffer bytes.Buffer
1599	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1600		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1601	}
1602	errorBody := bytes.NewReader(errorBuffer.Bytes())
1603
1604	errorCode := "UnknownError"
1605	errorMessage := errorCode
1606
1607	code := response.Header.Get("X-Amzn-ErrorType")
1608	if len(code) != 0 {
1609		errorCode = restjson.SanitizeErrorCode(code)
1610	}
1611
1612	var buff [1024]byte
1613	ringBuffer := smithyio.NewRingBuffer(buff[:])
1614
1615	body := io.TeeReader(errorBody, ringBuffer)
1616	decoder := json.NewDecoder(body)
1617	decoder.UseNumber()
1618	code, message, err := restjson.GetErrorInfo(decoder)
1619	if err != nil {
1620		var snapshot bytes.Buffer
1621		io.Copy(&snapshot, ringBuffer)
1622		err = &smithy.DeserializationError{
1623			Err:      fmt.Errorf("failed to decode response body, %w", err),
1624			Snapshot: snapshot.Bytes(),
1625		}
1626		return err
1627	}
1628
1629	errorBody.Seek(0, io.SeekStart)
1630	if len(code) != 0 {
1631		errorCode = restjson.SanitizeErrorCode(code)
1632	}
1633	if len(message) != 0 {
1634		errorMessage = message
1635	}
1636
1637	switch {
1638	case strings.EqualFold("InvalidArnException", errorCode):
1639		return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
1640
1641	case strings.EqualFold("InvalidStateException", errorCode):
1642		return awsAwsjson11_deserializeErrorInvalidStateException(response, errorBody)
1643
1644	case strings.EqualFold("LimitExceededException", errorCode):
1645		return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
1646
1647	case strings.EqualFold("ResourceNotFoundException", errorCode):
1648		return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody)
1649
1650	default:
1651		genericError := &smithy.GenericAPIError{
1652			Code:    errorCode,
1653			Message: errorMessage,
1654		}
1655		return genericError
1656
1657	}
1658}
1659
1660func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1661	var buff [1024]byte
1662	ringBuffer := smithyio.NewRingBuffer(buff[:])
1663
1664	body := io.TeeReader(errorBody, ringBuffer)
1665	decoder := json.NewDecoder(body)
1666	decoder.UseNumber()
1667	var shape interface{}
1668	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1669		var snapshot bytes.Buffer
1670		io.Copy(&snapshot, ringBuffer)
1671		err = &smithy.DeserializationError{
1672			Err:      fmt.Errorf("failed to decode response body, %w", err),
1673			Snapshot: snapshot.Bytes(),
1674		}
1675		return err
1676	}
1677
1678	output := &types.AccessDeniedException{}
1679	err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape)
1680
1681	if err != nil {
1682		var snapshot bytes.Buffer
1683		io.Copy(&snapshot, ringBuffer)
1684		err = &smithy.DeserializationError{
1685			Err:      fmt.Errorf("failed to decode response body, %w", err),
1686			Snapshot: snapshot.Bytes(),
1687		}
1688		return err
1689	}
1690
1691	errorBody.Seek(0, io.SeekStart)
1692	return output
1693}
1694
1695func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1696	var buff [1024]byte
1697	ringBuffer := smithyio.NewRingBuffer(buff[:])
1698
1699	body := io.TeeReader(errorBody, ringBuffer)
1700	decoder := json.NewDecoder(body)
1701	decoder.UseNumber()
1702	var shape interface{}
1703	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1704		var snapshot bytes.Buffer
1705		io.Copy(&snapshot, ringBuffer)
1706		err = &smithy.DeserializationError{
1707			Err:      fmt.Errorf("failed to decode response body, %w", err),
1708			Snapshot: snapshot.Bytes(),
1709		}
1710		return err
1711	}
1712
1713	output := &types.ConflictException{}
1714	err := awsAwsjson11_deserializeDocumentConflictException(&output, shape)
1715
1716	if err != nil {
1717		var snapshot bytes.Buffer
1718		io.Copy(&snapshot, ringBuffer)
1719		err = &smithy.DeserializationError{
1720			Err:      fmt.Errorf("failed to decode response body, %w", err),
1721			Snapshot: snapshot.Bytes(),
1722		}
1723		return err
1724	}
1725
1726	errorBody.Seek(0, io.SeekStart)
1727	return output
1728}
1729
1730func awsAwsjson11_deserializeErrorInvalidArgsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1731	var buff [1024]byte
1732	ringBuffer := smithyio.NewRingBuffer(buff[:])
1733
1734	body := io.TeeReader(errorBody, ringBuffer)
1735	decoder := json.NewDecoder(body)
1736	decoder.UseNumber()
1737	var shape interface{}
1738	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1739		var snapshot bytes.Buffer
1740		io.Copy(&snapshot, ringBuffer)
1741		err = &smithy.DeserializationError{
1742			Err:      fmt.Errorf("failed to decode response body, %w", err),
1743			Snapshot: snapshot.Bytes(),
1744		}
1745		return err
1746	}
1747
1748	output := &types.InvalidArgsException{}
1749	err := awsAwsjson11_deserializeDocumentInvalidArgsException(&output, shape)
1750
1751	if err != nil {
1752		var snapshot bytes.Buffer
1753		io.Copy(&snapshot, ringBuffer)
1754		err = &smithy.DeserializationError{
1755			Err:      fmt.Errorf("failed to decode response body, %w", err),
1756			Snapshot: snapshot.Bytes(),
1757		}
1758		return err
1759	}
1760
1761	errorBody.Seek(0, io.SeekStart)
1762	return output
1763}
1764
1765func awsAwsjson11_deserializeErrorInvalidArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1766	var buff [1024]byte
1767	ringBuffer := smithyio.NewRingBuffer(buff[:])
1768
1769	body := io.TeeReader(errorBody, ringBuffer)
1770	decoder := json.NewDecoder(body)
1771	decoder.UseNumber()
1772	var shape interface{}
1773	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1774		var snapshot bytes.Buffer
1775		io.Copy(&snapshot, ringBuffer)
1776		err = &smithy.DeserializationError{
1777			Err:      fmt.Errorf("failed to decode response body, %w", err),
1778			Snapshot: snapshot.Bytes(),
1779		}
1780		return err
1781	}
1782
1783	output := &types.InvalidArnException{}
1784	err := awsAwsjson11_deserializeDocumentInvalidArnException(&output, shape)
1785
1786	if err != nil {
1787		var snapshot bytes.Buffer
1788		io.Copy(&snapshot, ringBuffer)
1789		err = &smithy.DeserializationError{
1790			Err:      fmt.Errorf("failed to decode response body, %w", err),
1791			Snapshot: snapshot.Bytes(),
1792		}
1793		return err
1794	}
1795
1796	errorBody.Seek(0, io.SeekStart)
1797	return output
1798}
1799
1800func awsAwsjson11_deserializeErrorInvalidDomainValidationOptionsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1801	var buff [1024]byte
1802	ringBuffer := smithyio.NewRingBuffer(buff[:])
1803
1804	body := io.TeeReader(errorBody, ringBuffer)
1805	decoder := json.NewDecoder(body)
1806	decoder.UseNumber()
1807	var shape interface{}
1808	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1809		var snapshot bytes.Buffer
1810		io.Copy(&snapshot, ringBuffer)
1811		err = &smithy.DeserializationError{
1812			Err:      fmt.Errorf("failed to decode response body, %w", err),
1813			Snapshot: snapshot.Bytes(),
1814		}
1815		return err
1816	}
1817
1818	output := &types.InvalidDomainValidationOptionsException{}
1819	err := awsAwsjson11_deserializeDocumentInvalidDomainValidationOptionsException(&output, shape)
1820
1821	if err != nil {
1822		var snapshot bytes.Buffer
1823		io.Copy(&snapshot, ringBuffer)
1824		err = &smithy.DeserializationError{
1825			Err:      fmt.Errorf("failed to decode response body, %w", err),
1826			Snapshot: snapshot.Bytes(),
1827		}
1828		return err
1829	}
1830
1831	errorBody.Seek(0, io.SeekStart)
1832	return output
1833}
1834
1835func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1836	var buff [1024]byte
1837	ringBuffer := smithyio.NewRingBuffer(buff[:])
1838
1839	body := io.TeeReader(errorBody, ringBuffer)
1840	decoder := json.NewDecoder(body)
1841	decoder.UseNumber()
1842	var shape interface{}
1843	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1844		var snapshot bytes.Buffer
1845		io.Copy(&snapshot, ringBuffer)
1846		err = &smithy.DeserializationError{
1847			Err:      fmt.Errorf("failed to decode response body, %w", err),
1848			Snapshot: snapshot.Bytes(),
1849		}
1850		return err
1851	}
1852
1853	output := &types.InvalidParameterException{}
1854	err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape)
1855
1856	if err != nil {
1857		var snapshot bytes.Buffer
1858		io.Copy(&snapshot, ringBuffer)
1859		err = &smithy.DeserializationError{
1860			Err:      fmt.Errorf("failed to decode response body, %w", err),
1861			Snapshot: snapshot.Bytes(),
1862		}
1863		return err
1864	}
1865
1866	errorBody.Seek(0, io.SeekStart)
1867	return output
1868}
1869
1870func awsAwsjson11_deserializeErrorInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1871	var buff [1024]byte
1872	ringBuffer := smithyio.NewRingBuffer(buff[:])
1873
1874	body := io.TeeReader(errorBody, ringBuffer)
1875	decoder := json.NewDecoder(body)
1876	decoder.UseNumber()
1877	var shape interface{}
1878	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1879		var snapshot bytes.Buffer
1880		io.Copy(&snapshot, ringBuffer)
1881		err = &smithy.DeserializationError{
1882			Err:      fmt.Errorf("failed to decode response body, %w", err),
1883			Snapshot: snapshot.Bytes(),
1884		}
1885		return err
1886	}
1887
1888	output := &types.InvalidStateException{}
1889	err := awsAwsjson11_deserializeDocumentInvalidStateException(&output, shape)
1890
1891	if err != nil {
1892		var snapshot bytes.Buffer
1893		io.Copy(&snapshot, ringBuffer)
1894		err = &smithy.DeserializationError{
1895			Err:      fmt.Errorf("failed to decode response body, %w", err),
1896			Snapshot: snapshot.Bytes(),
1897		}
1898		return err
1899	}
1900
1901	errorBody.Seek(0, io.SeekStart)
1902	return output
1903}
1904
1905func awsAwsjson11_deserializeErrorInvalidTagException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1906	var buff [1024]byte
1907	ringBuffer := smithyio.NewRingBuffer(buff[:])
1908
1909	body := io.TeeReader(errorBody, ringBuffer)
1910	decoder := json.NewDecoder(body)
1911	decoder.UseNumber()
1912	var shape interface{}
1913	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1914		var snapshot bytes.Buffer
1915		io.Copy(&snapshot, ringBuffer)
1916		err = &smithy.DeserializationError{
1917			Err:      fmt.Errorf("failed to decode response body, %w", err),
1918			Snapshot: snapshot.Bytes(),
1919		}
1920		return err
1921	}
1922
1923	output := &types.InvalidTagException{}
1924	err := awsAwsjson11_deserializeDocumentInvalidTagException(&output, shape)
1925
1926	if err != nil {
1927		var snapshot bytes.Buffer
1928		io.Copy(&snapshot, ringBuffer)
1929		err = &smithy.DeserializationError{
1930			Err:      fmt.Errorf("failed to decode response body, %w", err),
1931			Snapshot: snapshot.Bytes(),
1932		}
1933		return err
1934	}
1935
1936	errorBody.Seek(0, io.SeekStart)
1937	return output
1938}
1939
1940func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1941	var buff [1024]byte
1942	ringBuffer := smithyio.NewRingBuffer(buff[:])
1943
1944	body := io.TeeReader(errorBody, ringBuffer)
1945	decoder := json.NewDecoder(body)
1946	decoder.UseNumber()
1947	var shape interface{}
1948	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1949		var snapshot bytes.Buffer
1950		io.Copy(&snapshot, ringBuffer)
1951		err = &smithy.DeserializationError{
1952			Err:      fmt.Errorf("failed to decode response body, %w", err),
1953			Snapshot: snapshot.Bytes(),
1954		}
1955		return err
1956	}
1957
1958	output := &types.LimitExceededException{}
1959	err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape)
1960
1961	if err != nil {
1962		var snapshot bytes.Buffer
1963		io.Copy(&snapshot, ringBuffer)
1964		err = &smithy.DeserializationError{
1965			Err:      fmt.Errorf("failed to decode response body, %w", err),
1966			Snapshot: snapshot.Bytes(),
1967		}
1968		return err
1969	}
1970
1971	errorBody.Seek(0, io.SeekStart)
1972	return output
1973}
1974
1975func awsAwsjson11_deserializeErrorRequestInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
1976	var buff [1024]byte
1977	ringBuffer := smithyio.NewRingBuffer(buff[:])
1978
1979	body := io.TeeReader(errorBody, ringBuffer)
1980	decoder := json.NewDecoder(body)
1981	decoder.UseNumber()
1982	var shape interface{}
1983	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
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 err
1991	}
1992
1993	output := &types.RequestInProgressException{}
1994	err := awsAwsjson11_deserializeDocumentRequestInProgressException(&output, shape)
1995
1996	if err != nil {
1997		var snapshot bytes.Buffer
1998		io.Copy(&snapshot, ringBuffer)
1999		err = &smithy.DeserializationError{
2000			Err:      fmt.Errorf("failed to decode response body, %w", err),
2001			Snapshot: snapshot.Bytes(),
2002		}
2003		return err
2004	}
2005
2006	errorBody.Seek(0, io.SeekStart)
2007	return output
2008}
2009
2010func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
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	var shape interface{}
2018	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
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	output := &types.ResourceInUseException{}
2029	err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape)
2030
2031	if err != nil {
2032		var snapshot bytes.Buffer
2033		io.Copy(&snapshot, ringBuffer)
2034		err = &smithy.DeserializationError{
2035			Err:      fmt.Errorf("failed to decode response body, %w", err),
2036			Snapshot: snapshot.Bytes(),
2037		}
2038		return err
2039	}
2040
2041	errorBody.Seek(0, io.SeekStart)
2042	return output
2043}
2044
2045func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2046	var buff [1024]byte
2047	ringBuffer := smithyio.NewRingBuffer(buff[:])
2048
2049	body := io.TeeReader(errorBody, ringBuffer)
2050	decoder := json.NewDecoder(body)
2051	decoder.UseNumber()
2052	var shape interface{}
2053	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2054		var snapshot bytes.Buffer
2055		io.Copy(&snapshot, ringBuffer)
2056		err = &smithy.DeserializationError{
2057			Err:      fmt.Errorf("failed to decode response body, %w", err),
2058			Snapshot: snapshot.Bytes(),
2059		}
2060		return err
2061	}
2062
2063	output := &types.ResourceNotFoundException{}
2064	err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape)
2065
2066	if err != nil {
2067		var snapshot bytes.Buffer
2068		io.Copy(&snapshot, ringBuffer)
2069		err = &smithy.DeserializationError{
2070			Err:      fmt.Errorf("failed to decode response body, %w", err),
2071			Snapshot: snapshot.Bytes(),
2072		}
2073		return err
2074	}
2075
2076	errorBody.Seek(0, io.SeekStart)
2077	return output
2078}
2079
2080func awsAwsjson11_deserializeErrorTagPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2081	var buff [1024]byte
2082	ringBuffer := smithyio.NewRingBuffer(buff[:])
2083
2084	body := io.TeeReader(errorBody, ringBuffer)
2085	decoder := json.NewDecoder(body)
2086	decoder.UseNumber()
2087	var shape interface{}
2088	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2089		var snapshot bytes.Buffer
2090		io.Copy(&snapshot, ringBuffer)
2091		err = &smithy.DeserializationError{
2092			Err:      fmt.Errorf("failed to decode response body, %w", err),
2093			Snapshot: snapshot.Bytes(),
2094		}
2095		return err
2096	}
2097
2098	output := &types.TagPolicyException{}
2099	err := awsAwsjson11_deserializeDocumentTagPolicyException(&output, shape)
2100
2101	if err != nil {
2102		var snapshot bytes.Buffer
2103		io.Copy(&snapshot, ringBuffer)
2104		err = &smithy.DeserializationError{
2105			Err:      fmt.Errorf("failed to decode response body, %w", err),
2106			Snapshot: snapshot.Bytes(),
2107		}
2108		return err
2109	}
2110
2111	errorBody.Seek(0, io.SeekStart)
2112	return output
2113}
2114
2115func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2116	var buff [1024]byte
2117	ringBuffer := smithyio.NewRingBuffer(buff[:])
2118
2119	body := io.TeeReader(errorBody, ringBuffer)
2120	decoder := json.NewDecoder(body)
2121	decoder.UseNumber()
2122	var shape interface{}
2123	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2124		var snapshot bytes.Buffer
2125		io.Copy(&snapshot, ringBuffer)
2126		err = &smithy.DeserializationError{
2127			Err:      fmt.Errorf("failed to decode response body, %w", err),
2128			Snapshot: snapshot.Bytes(),
2129		}
2130		return err
2131	}
2132
2133	output := &types.ThrottlingException{}
2134	err := awsAwsjson11_deserializeDocumentThrottlingException(&output, shape)
2135
2136	if err != nil {
2137		var snapshot bytes.Buffer
2138		io.Copy(&snapshot, ringBuffer)
2139		err = &smithy.DeserializationError{
2140			Err:      fmt.Errorf("failed to decode response body, %w", err),
2141			Snapshot: snapshot.Bytes(),
2142		}
2143		return err
2144	}
2145
2146	errorBody.Seek(0, io.SeekStart)
2147	return output
2148}
2149
2150func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2151	var buff [1024]byte
2152	ringBuffer := smithyio.NewRingBuffer(buff[:])
2153
2154	body := io.TeeReader(errorBody, ringBuffer)
2155	decoder := json.NewDecoder(body)
2156	decoder.UseNumber()
2157	var shape interface{}
2158	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2159		var snapshot bytes.Buffer
2160		io.Copy(&snapshot, ringBuffer)
2161		err = &smithy.DeserializationError{
2162			Err:      fmt.Errorf("failed to decode response body, %w", err),
2163			Snapshot: snapshot.Bytes(),
2164		}
2165		return err
2166	}
2167
2168	output := &types.TooManyTagsException{}
2169	err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape)
2170
2171	if err != nil {
2172		var snapshot bytes.Buffer
2173		io.Copy(&snapshot, ringBuffer)
2174		err = &smithy.DeserializationError{
2175			Err:      fmt.Errorf("failed to decode response body, %w", err),
2176			Snapshot: snapshot.Bytes(),
2177		}
2178		return err
2179	}
2180
2181	errorBody.Seek(0, io.SeekStart)
2182	return output
2183}
2184
2185func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
2186	var buff [1024]byte
2187	ringBuffer := smithyio.NewRingBuffer(buff[:])
2188
2189	body := io.TeeReader(errorBody, ringBuffer)
2190	decoder := json.NewDecoder(body)
2191	decoder.UseNumber()
2192	var shape interface{}
2193	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2194		var snapshot bytes.Buffer
2195		io.Copy(&snapshot, ringBuffer)
2196		err = &smithy.DeserializationError{
2197			Err:      fmt.Errorf("failed to decode response body, %w", err),
2198			Snapshot: snapshot.Bytes(),
2199		}
2200		return err
2201	}
2202
2203	output := &types.ValidationException{}
2204	err := awsAwsjson11_deserializeDocumentValidationException(&output, shape)
2205
2206	if err != nil {
2207		var snapshot bytes.Buffer
2208		io.Copy(&snapshot, ringBuffer)
2209		err = &smithy.DeserializationError{
2210			Err:      fmt.Errorf("failed to decode response body, %w", err),
2211			Snapshot: snapshot.Bytes(),
2212		}
2213		return err
2214	}
2215
2216	errorBody.Seek(0, io.SeekStart)
2217	return output
2218}
2219
2220func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
2221	if v == nil {
2222		return fmt.Errorf("unexpected nil of type %T", v)
2223	}
2224	if value == nil {
2225		return nil
2226	}
2227
2228	shape, ok := value.(map[string]interface{})
2229	if !ok {
2230		return fmt.Errorf("unexpected JSON type %v", value)
2231	}
2232
2233	var sv *types.AccessDeniedException
2234	if *v == nil {
2235		sv = &types.AccessDeniedException{}
2236	} else {
2237		sv = *v
2238	}
2239
2240	for key, value := range shape {
2241		switch key {
2242		case "Message":
2243			if value != nil {
2244				jtv, ok := value.(string)
2245				if !ok {
2246					return fmt.Errorf("expected ServiceErrorMessage to be of type string, got %T instead", value)
2247				}
2248				sv.Message = ptr.String(jtv)
2249			}
2250
2251		default:
2252			_, _ = key, value
2253
2254		}
2255	}
2256	*v = sv
2257	return nil
2258}
2259
2260func awsAwsjson11_deserializeDocumentCertificateDetail(v **types.CertificateDetail, value interface{}) error {
2261	if v == nil {
2262		return fmt.Errorf("unexpected nil of type %T", v)
2263	}
2264	if value == nil {
2265		return nil
2266	}
2267
2268	shape, ok := value.(map[string]interface{})
2269	if !ok {
2270		return fmt.Errorf("unexpected JSON type %v", value)
2271	}
2272
2273	var sv *types.CertificateDetail
2274	if *v == nil {
2275		sv = &types.CertificateDetail{}
2276	} else {
2277		sv = *v
2278	}
2279
2280	for key, value := range shape {
2281		switch key {
2282		case "CertificateArn":
2283			if value != nil {
2284				jtv, ok := value.(string)
2285				if !ok {
2286					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
2287				}
2288				sv.CertificateArn = ptr.String(jtv)
2289			}
2290
2291		case "CertificateAuthorityArn":
2292			if value != nil {
2293				jtv, ok := value.(string)
2294				if !ok {
2295					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
2296				}
2297				sv.CertificateAuthorityArn = ptr.String(jtv)
2298			}
2299
2300		case "CreatedAt":
2301			if value != nil {
2302				switch jtv := value.(type) {
2303				case json.Number:
2304					f64, err := jtv.Float64()
2305					if err != nil {
2306						return err
2307					}
2308					sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
2309
2310				default:
2311					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2312
2313				}
2314			}
2315
2316		case "DomainName":
2317			if value != nil {
2318				jtv, ok := value.(string)
2319				if !ok {
2320					return fmt.Errorf("expected DomainNameString to be of type string, got %T instead", value)
2321				}
2322				sv.DomainName = ptr.String(jtv)
2323			}
2324
2325		case "DomainValidationOptions":
2326			if err := awsAwsjson11_deserializeDocumentDomainValidationList(&sv.DomainValidationOptions, value); err != nil {
2327				return err
2328			}
2329
2330		case "ExtendedKeyUsages":
2331			if err := awsAwsjson11_deserializeDocumentExtendedKeyUsageList(&sv.ExtendedKeyUsages, value); err != nil {
2332				return err
2333			}
2334
2335		case "FailureReason":
2336			if value != nil {
2337				jtv, ok := value.(string)
2338				if !ok {
2339					return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
2340				}
2341				sv.FailureReason = types.FailureReason(jtv)
2342			}
2343
2344		case "ImportedAt":
2345			if value != nil {
2346				switch jtv := value.(type) {
2347				case json.Number:
2348					f64, err := jtv.Float64()
2349					if err != nil {
2350						return err
2351					}
2352					sv.ImportedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
2353
2354				default:
2355					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2356
2357				}
2358			}
2359
2360		case "InUseBy":
2361			if err := awsAwsjson11_deserializeDocumentInUseList(&sv.InUseBy, value); err != nil {
2362				return err
2363			}
2364
2365		case "IssuedAt":
2366			if value != nil {
2367				switch jtv := value.(type) {
2368				case json.Number:
2369					f64, err := jtv.Float64()
2370					if err != nil {
2371						return err
2372					}
2373					sv.IssuedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
2374
2375				default:
2376					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2377
2378				}
2379			}
2380
2381		case "Issuer":
2382			if value != nil {
2383				jtv, ok := value.(string)
2384				if !ok {
2385					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2386				}
2387				sv.Issuer = ptr.String(jtv)
2388			}
2389
2390		case "KeyAlgorithm":
2391			if value != nil {
2392				jtv, ok := value.(string)
2393				if !ok {
2394					return fmt.Errorf("expected KeyAlgorithm to be of type string, got %T instead", value)
2395				}
2396				sv.KeyAlgorithm = types.KeyAlgorithm(jtv)
2397			}
2398
2399		case "KeyUsages":
2400			if err := awsAwsjson11_deserializeDocumentKeyUsageList(&sv.KeyUsages, value); err != nil {
2401				return err
2402			}
2403
2404		case "NotAfter":
2405			if value != nil {
2406				switch jtv := value.(type) {
2407				case json.Number:
2408					f64, err := jtv.Float64()
2409					if err != nil {
2410						return err
2411					}
2412					sv.NotAfter = ptr.Time(smithytime.ParseEpochSeconds(f64))
2413
2414				default:
2415					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2416
2417				}
2418			}
2419
2420		case "NotBefore":
2421			if value != nil {
2422				switch jtv := value.(type) {
2423				case json.Number:
2424					f64, err := jtv.Float64()
2425					if err != nil {
2426						return err
2427					}
2428					sv.NotBefore = ptr.Time(smithytime.ParseEpochSeconds(f64))
2429
2430				default:
2431					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2432
2433				}
2434			}
2435
2436		case "Options":
2437			if err := awsAwsjson11_deserializeDocumentCertificateOptions(&sv.Options, value); err != nil {
2438				return err
2439			}
2440
2441		case "RenewalEligibility":
2442			if value != nil {
2443				jtv, ok := value.(string)
2444				if !ok {
2445					return fmt.Errorf("expected RenewalEligibility to be of type string, got %T instead", value)
2446				}
2447				sv.RenewalEligibility = types.RenewalEligibility(jtv)
2448			}
2449
2450		case "RenewalSummary":
2451			if err := awsAwsjson11_deserializeDocumentRenewalSummary(&sv.RenewalSummary, value); err != nil {
2452				return err
2453			}
2454
2455		case "RevocationReason":
2456			if value != nil {
2457				jtv, ok := value.(string)
2458				if !ok {
2459					return fmt.Errorf("expected RevocationReason to be of type string, got %T instead", value)
2460				}
2461				sv.RevocationReason = types.RevocationReason(jtv)
2462			}
2463
2464		case "RevokedAt":
2465			if value != nil {
2466				switch jtv := value.(type) {
2467				case json.Number:
2468					f64, err := jtv.Float64()
2469					if err != nil {
2470						return err
2471					}
2472					sv.RevokedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
2473
2474				default:
2475					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
2476
2477				}
2478			}
2479
2480		case "Serial":
2481			if value != nil {
2482				jtv, ok := value.(string)
2483				if !ok {
2484					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2485				}
2486				sv.Serial = ptr.String(jtv)
2487			}
2488
2489		case "SignatureAlgorithm":
2490			if value != nil {
2491				jtv, ok := value.(string)
2492				if !ok {
2493					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2494				}
2495				sv.SignatureAlgorithm = ptr.String(jtv)
2496			}
2497
2498		case "Status":
2499			if value != nil {
2500				jtv, ok := value.(string)
2501				if !ok {
2502					return fmt.Errorf("expected CertificateStatus to be of type string, got %T instead", value)
2503				}
2504				sv.Status = types.CertificateStatus(jtv)
2505			}
2506
2507		case "Subject":
2508			if value != nil {
2509				jtv, ok := value.(string)
2510				if !ok {
2511					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2512				}
2513				sv.Subject = ptr.String(jtv)
2514			}
2515
2516		case "SubjectAlternativeNames":
2517			if err := awsAwsjson11_deserializeDocumentDomainList(&sv.SubjectAlternativeNames, value); err != nil {
2518				return err
2519			}
2520
2521		case "Type":
2522			if value != nil {
2523				jtv, ok := value.(string)
2524				if !ok {
2525					return fmt.Errorf("expected CertificateType to be of type string, got %T instead", value)
2526				}
2527				sv.Type = types.CertificateType(jtv)
2528			}
2529
2530		default:
2531			_, _ = key, value
2532
2533		}
2534	}
2535	*v = sv
2536	return nil
2537}
2538
2539func awsAwsjson11_deserializeDocumentCertificateOptions(v **types.CertificateOptions, value interface{}) error {
2540	if v == nil {
2541		return fmt.Errorf("unexpected nil of type %T", v)
2542	}
2543	if value == nil {
2544		return nil
2545	}
2546
2547	shape, ok := value.(map[string]interface{})
2548	if !ok {
2549		return fmt.Errorf("unexpected JSON type %v", value)
2550	}
2551
2552	var sv *types.CertificateOptions
2553	if *v == nil {
2554		sv = &types.CertificateOptions{}
2555	} else {
2556		sv = *v
2557	}
2558
2559	for key, value := range shape {
2560		switch key {
2561		case "CertificateTransparencyLoggingPreference":
2562			if value != nil {
2563				jtv, ok := value.(string)
2564				if !ok {
2565					return fmt.Errorf("expected CertificateTransparencyLoggingPreference to be of type string, got %T instead", value)
2566				}
2567				sv.CertificateTransparencyLoggingPreference = types.CertificateTransparencyLoggingPreference(jtv)
2568			}
2569
2570		default:
2571			_, _ = key, value
2572
2573		}
2574	}
2575	*v = sv
2576	return nil
2577}
2578
2579func awsAwsjson11_deserializeDocumentCertificateSummary(v **types.CertificateSummary, value interface{}) error {
2580	if v == nil {
2581		return fmt.Errorf("unexpected nil of type %T", v)
2582	}
2583	if value == nil {
2584		return nil
2585	}
2586
2587	shape, ok := value.(map[string]interface{})
2588	if !ok {
2589		return fmt.Errorf("unexpected JSON type %v", value)
2590	}
2591
2592	var sv *types.CertificateSummary
2593	if *v == nil {
2594		sv = &types.CertificateSummary{}
2595	} else {
2596		sv = *v
2597	}
2598
2599	for key, value := range shape {
2600		switch key {
2601		case "CertificateArn":
2602			if value != nil {
2603				jtv, ok := value.(string)
2604				if !ok {
2605					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
2606				}
2607				sv.CertificateArn = ptr.String(jtv)
2608			}
2609
2610		case "DomainName":
2611			if value != nil {
2612				jtv, ok := value.(string)
2613				if !ok {
2614					return fmt.Errorf("expected DomainNameString to be of type string, got %T instead", value)
2615				}
2616				sv.DomainName = ptr.String(jtv)
2617			}
2618
2619		default:
2620			_, _ = key, value
2621
2622		}
2623	}
2624	*v = sv
2625	return nil
2626}
2627
2628func awsAwsjson11_deserializeDocumentCertificateSummaryList(v *[]types.CertificateSummary, value interface{}) error {
2629	if v == nil {
2630		return fmt.Errorf("unexpected nil of type %T", v)
2631	}
2632	if value == nil {
2633		return nil
2634	}
2635
2636	shape, ok := value.([]interface{})
2637	if !ok {
2638		return fmt.Errorf("unexpected JSON type %v", value)
2639	}
2640
2641	var cv []types.CertificateSummary
2642	if *v == nil {
2643		cv = []types.CertificateSummary{}
2644	} else {
2645		cv = *v
2646	}
2647
2648	for _, value := range shape {
2649		var col types.CertificateSummary
2650		destAddr := &col
2651		if err := awsAwsjson11_deserializeDocumentCertificateSummary(&destAddr, value); err != nil {
2652			return err
2653		}
2654		col = *destAddr
2655		cv = append(cv, col)
2656
2657	}
2658	*v = cv
2659	return nil
2660}
2661
2662func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error {
2663	if v == nil {
2664		return fmt.Errorf("unexpected nil of type %T", v)
2665	}
2666	if value == nil {
2667		return nil
2668	}
2669
2670	shape, ok := value.(map[string]interface{})
2671	if !ok {
2672		return fmt.Errorf("unexpected JSON type %v", value)
2673	}
2674
2675	var sv *types.ConflictException
2676	if *v == nil {
2677		sv = &types.ConflictException{}
2678	} else {
2679		sv = *v
2680	}
2681
2682	for key, value := range shape {
2683		switch key {
2684		case "message":
2685			if value != nil {
2686				jtv, ok := value.(string)
2687				if !ok {
2688					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2689				}
2690				sv.Message = ptr.String(jtv)
2691			}
2692
2693		default:
2694			_, _ = key, value
2695
2696		}
2697	}
2698	*v = sv
2699	return nil
2700}
2701
2702func awsAwsjson11_deserializeDocumentDomainList(v *[]string, value interface{}) error {
2703	if v == nil {
2704		return fmt.Errorf("unexpected nil of type %T", v)
2705	}
2706	if value == nil {
2707		return nil
2708	}
2709
2710	shape, ok := value.([]interface{})
2711	if !ok {
2712		return fmt.Errorf("unexpected JSON type %v", value)
2713	}
2714
2715	var cv []string
2716	if *v == nil {
2717		cv = []string{}
2718	} else {
2719		cv = *v
2720	}
2721
2722	for _, value := range shape {
2723		var col string
2724		if value != nil {
2725			jtv, ok := value.(string)
2726			if !ok {
2727				return fmt.Errorf("expected DomainNameString to be of type string, got %T instead", value)
2728			}
2729			col = jtv
2730		}
2731		cv = append(cv, col)
2732
2733	}
2734	*v = cv
2735	return nil
2736}
2737
2738func awsAwsjson11_deserializeDocumentDomainValidation(v **types.DomainValidation, value interface{}) error {
2739	if v == nil {
2740		return fmt.Errorf("unexpected nil of type %T", v)
2741	}
2742	if value == nil {
2743		return nil
2744	}
2745
2746	shape, ok := value.(map[string]interface{})
2747	if !ok {
2748		return fmt.Errorf("unexpected JSON type %v", value)
2749	}
2750
2751	var sv *types.DomainValidation
2752	if *v == nil {
2753		sv = &types.DomainValidation{}
2754	} else {
2755		sv = *v
2756	}
2757
2758	for key, value := range shape {
2759		switch key {
2760		case "DomainName":
2761			if value != nil {
2762				jtv, ok := value.(string)
2763				if !ok {
2764					return fmt.Errorf("expected DomainNameString to be of type string, got %T instead", value)
2765				}
2766				sv.DomainName = ptr.String(jtv)
2767			}
2768
2769		case "ResourceRecord":
2770			if err := awsAwsjson11_deserializeDocumentResourceRecord(&sv.ResourceRecord, value); err != nil {
2771				return err
2772			}
2773
2774		case "ValidationDomain":
2775			if value != nil {
2776				jtv, ok := value.(string)
2777				if !ok {
2778					return fmt.Errorf("expected DomainNameString to be of type string, got %T instead", value)
2779				}
2780				sv.ValidationDomain = ptr.String(jtv)
2781			}
2782
2783		case "ValidationEmails":
2784			if err := awsAwsjson11_deserializeDocumentValidationEmailList(&sv.ValidationEmails, value); err != nil {
2785				return err
2786			}
2787
2788		case "ValidationMethod":
2789			if value != nil {
2790				jtv, ok := value.(string)
2791				if !ok {
2792					return fmt.Errorf("expected ValidationMethod to be of type string, got %T instead", value)
2793				}
2794				sv.ValidationMethod = types.ValidationMethod(jtv)
2795			}
2796
2797		case "ValidationStatus":
2798			if value != nil {
2799				jtv, ok := value.(string)
2800				if !ok {
2801					return fmt.Errorf("expected DomainStatus to be of type string, got %T instead", value)
2802				}
2803				sv.ValidationStatus = types.DomainStatus(jtv)
2804			}
2805
2806		default:
2807			_, _ = key, value
2808
2809		}
2810	}
2811	*v = sv
2812	return nil
2813}
2814
2815func awsAwsjson11_deserializeDocumentDomainValidationList(v *[]types.DomainValidation, value interface{}) error {
2816	if v == nil {
2817		return fmt.Errorf("unexpected nil of type %T", v)
2818	}
2819	if value == nil {
2820		return nil
2821	}
2822
2823	shape, ok := value.([]interface{})
2824	if !ok {
2825		return fmt.Errorf("unexpected JSON type %v", value)
2826	}
2827
2828	var cv []types.DomainValidation
2829	if *v == nil {
2830		cv = []types.DomainValidation{}
2831	} else {
2832		cv = *v
2833	}
2834
2835	for _, value := range shape {
2836		var col types.DomainValidation
2837		destAddr := &col
2838		if err := awsAwsjson11_deserializeDocumentDomainValidation(&destAddr, value); err != nil {
2839			return err
2840		}
2841		col = *destAddr
2842		cv = append(cv, col)
2843
2844	}
2845	*v = cv
2846	return nil
2847}
2848
2849func awsAwsjson11_deserializeDocumentExpiryEventsConfiguration(v **types.ExpiryEventsConfiguration, value interface{}) error {
2850	if v == nil {
2851		return fmt.Errorf("unexpected nil of type %T", v)
2852	}
2853	if value == nil {
2854		return nil
2855	}
2856
2857	shape, ok := value.(map[string]interface{})
2858	if !ok {
2859		return fmt.Errorf("unexpected JSON type %v", value)
2860	}
2861
2862	var sv *types.ExpiryEventsConfiguration
2863	if *v == nil {
2864		sv = &types.ExpiryEventsConfiguration{}
2865	} else {
2866		sv = *v
2867	}
2868
2869	for key, value := range shape {
2870		switch key {
2871		case "DaysBeforeExpiry":
2872			if value != nil {
2873				jtv, ok := value.(json.Number)
2874				if !ok {
2875					return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value)
2876				}
2877				i64, err := jtv.Int64()
2878				if err != nil {
2879					return err
2880				}
2881				sv.DaysBeforeExpiry = ptr.Int32(int32(i64))
2882			}
2883
2884		default:
2885			_, _ = key, value
2886
2887		}
2888	}
2889	*v = sv
2890	return nil
2891}
2892
2893func awsAwsjson11_deserializeDocumentExtendedKeyUsage(v **types.ExtendedKeyUsage, value interface{}) error {
2894	if v == nil {
2895		return fmt.Errorf("unexpected nil of type %T", v)
2896	}
2897	if value == nil {
2898		return nil
2899	}
2900
2901	shape, ok := value.(map[string]interface{})
2902	if !ok {
2903		return fmt.Errorf("unexpected JSON type %v", value)
2904	}
2905
2906	var sv *types.ExtendedKeyUsage
2907	if *v == nil {
2908		sv = &types.ExtendedKeyUsage{}
2909	} else {
2910		sv = *v
2911	}
2912
2913	for key, value := range shape {
2914		switch key {
2915		case "Name":
2916			if value != nil {
2917				jtv, ok := value.(string)
2918				if !ok {
2919					return fmt.Errorf("expected ExtendedKeyUsageName to be of type string, got %T instead", value)
2920				}
2921				sv.Name = types.ExtendedKeyUsageName(jtv)
2922			}
2923
2924		case "OID":
2925			if value != nil {
2926				jtv, ok := value.(string)
2927				if !ok {
2928					return fmt.Errorf("expected String to be of type string, got %T instead", value)
2929				}
2930				sv.OID = ptr.String(jtv)
2931			}
2932
2933		default:
2934			_, _ = key, value
2935
2936		}
2937	}
2938	*v = sv
2939	return nil
2940}
2941
2942func awsAwsjson11_deserializeDocumentExtendedKeyUsageList(v *[]types.ExtendedKeyUsage, value interface{}) error {
2943	if v == nil {
2944		return fmt.Errorf("unexpected nil of type %T", v)
2945	}
2946	if value == nil {
2947		return nil
2948	}
2949
2950	shape, ok := value.([]interface{})
2951	if !ok {
2952		return fmt.Errorf("unexpected JSON type %v", value)
2953	}
2954
2955	var cv []types.ExtendedKeyUsage
2956	if *v == nil {
2957		cv = []types.ExtendedKeyUsage{}
2958	} else {
2959		cv = *v
2960	}
2961
2962	for _, value := range shape {
2963		var col types.ExtendedKeyUsage
2964		destAddr := &col
2965		if err := awsAwsjson11_deserializeDocumentExtendedKeyUsage(&destAddr, value); err != nil {
2966			return err
2967		}
2968		col = *destAddr
2969		cv = append(cv, col)
2970
2971	}
2972	*v = cv
2973	return nil
2974}
2975
2976func awsAwsjson11_deserializeDocumentInUseList(v *[]string, value interface{}) error {
2977	if v == nil {
2978		return fmt.Errorf("unexpected nil of type %T", v)
2979	}
2980	if value == nil {
2981		return nil
2982	}
2983
2984	shape, ok := value.([]interface{})
2985	if !ok {
2986		return fmt.Errorf("unexpected JSON type %v", value)
2987	}
2988
2989	var cv []string
2990	if *v == nil {
2991		cv = []string{}
2992	} else {
2993		cv = *v
2994	}
2995
2996	for _, value := range shape {
2997		var col string
2998		if value != nil {
2999			jtv, ok := value.(string)
3000			if !ok {
3001				return fmt.Errorf("expected String to be of type string, got %T instead", value)
3002			}
3003			col = jtv
3004		}
3005		cv = append(cv, col)
3006
3007	}
3008	*v = cv
3009	return nil
3010}
3011
3012func awsAwsjson11_deserializeDocumentInvalidArgsException(v **types.InvalidArgsException, value interface{}) error {
3013	if v == nil {
3014		return fmt.Errorf("unexpected nil of type %T", v)
3015	}
3016	if value == nil {
3017		return nil
3018	}
3019
3020	shape, ok := value.(map[string]interface{})
3021	if !ok {
3022		return fmt.Errorf("unexpected JSON type %v", value)
3023	}
3024
3025	var sv *types.InvalidArgsException
3026	if *v == nil {
3027		sv = &types.InvalidArgsException{}
3028	} else {
3029		sv = *v
3030	}
3031
3032	for key, value := range shape {
3033		switch key {
3034		case "message":
3035			if value != nil {
3036				jtv, ok := value.(string)
3037				if !ok {
3038					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3039				}
3040				sv.Message = ptr.String(jtv)
3041			}
3042
3043		default:
3044			_, _ = key, value
3045
3046		}
3047	}
3048	*v = sv
3049	return nil
3050}
3051
3052func awsAwsjson11_deserializeDocumentInvalidArnException(v **types.InvalidArnException, value interface{}) error {
3053	if v == nil {
3054		return fmt.Errorf("unexpected nil of type %T", v)
3055	}
3056	if value == nil {
3057		return nil
3058	}
3059
3060	shape, ok := value.(map[string]interface{})
3061	if !ok {
3062		return fmt.Errorf("unexpected JSON type %v", value)
3063	}
3064
3065	var sv *types.InvalidArnException
3066	if *v == nil {
3067		sv = &types.InvalidArnException{}
3068	} else {
3069		sv = *v
3070	}
3071
3072	for key, value := range shape {
3073		switch key {
3074		case "message":
3075			if value != nil {
3076				jtv, ok := value.(string)
3077				if !ok {
3078					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3079				}
3080				sv.Message = ptr.String(jtv)
3081			}
3082
3083		default:
3084			_, _ = key, value
3085
3086		}
3087	}
3088	*v = sv
3089	return nil
3090}
3091
3092func awsAwsjson11_deserializeDocumentInvalidDomainValidationOptionsException(v **types.InvalidDomainValidationOptionsException, value interface{}) error {
3093	if v == nil {
3094		return fmt.Errorf("unexpected nil of type %T", v)
3095	}
3096	if value == nil {
3097		return nil
3098	}
3099
3100	shape, ok := value.(map[string]interface{})
3101	if !ok {
3102		return fmt.Errorf("unexpected JSON type %v", value)
3103	}
3104
3105	var sv *types.InvalidDomainValidationOptionsException
3106	if *v == nil {
3107		sv = &types.InvalidDomainValidationOptionsException{}
3108	} else {
3109		sv = *v
3110	}
3111
3112	for key, value := range shape {
3113		switch key {
3114		case "message":
3115			if value != nil {
3116				jtv, ok := value.(string)
3117				if !ok {
3118					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3119				}
3120				sv.Message = ptr.String(jtv)
3121			}
3122
3123		default:
3124			_, _ = key, value
3125
3126		}
3127	}
3128	*v = sv
3129	return nil
3130}
3131
3132func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error {
3133	if v == nil {
3134		return fmt.Errorf("unexpected nil of type %T", v)
3135	}
3136	if value == nil {
3137		return nil
3138	}
3139
3140	shape, ok := value.(map[string]interface{})
3141	if !ok {
3142		return fmt.Errorf("unexpected JSON type %v", value)
3143	}
3144
3145	var sv *types.InvalidParameterException
3146	if *v == nil {
3147		sv = &types.InvalidParameterException{}
3148	} else {
3149		sv = *v
3150	}
3151
3152	for key, value := range shape {
3153		switch key {
3154		case "message":
3155			if value != nil {
3156				jtv, ok := value.(string)
3157				if !ok {
3158					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3159				}
3160				sv.Message = ptr.String(jtv)
3161			}
3162
3163		default:
3164			_, _ = key, value
3165
3166		}
3167	}
3168	*v = sv
3169	return nil
3170}
3171
3172func awsAwsjson11_deserializeDocumentInvalidStateException(v **types.InvalidStateException, value interface{}) error {
3173	if v == nil {
3174		return fmt.Errorf("unexpected nil of type %T", v)
3175	}
3176	if value == nil {
3177		return nil
3178	}
3179
3180	shape, ok := value.(map[string]interface{})
3181	if !ok {
3182		return fmt.Errorf("unexpected JSON type %v", value)
3183	}
3184
3185	var sv *types.InvalidStateException
3186	if *v == nil {
3187		sv = &types.InvalidStateException{}
3188	} else {
3189		sv = *v
3190	}
3191
3192	for key, value := range shape {
3193		switch key {
3194		case "message":
3195			if value != nil {
3196				jtv, ok := value.(string)
3197				if !ok {
3198					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3199				}
3200				sv.Message = ptr.String(jtv)
3201			}
3202
3203		default:
3204			_, _ = key, value
3205
3206		}
3207	}
3208	*v = sv
3209	return nil
3210}
3211
3212func awsAwsjson11_deserializeDocumentInvalidTagException(v **types.InvalidTagException, value interface{}) error {
3213	if v == nil {
3214		return fmt.Errorf("unexpected nil of type %T", v)
3215	}
3216	if value == nil {
3217		return nil
3218	}
3219
3220	shape, ok := value.(map[string]interface{})
3221	if !ok {
3222		return fmt.Errorf("unexpected JSON type %v", value)
3223	}
3224
3225	var sv *types.InvalidTagException
3226	if *v == nil {
3227		sv = &types.InvalidTagException{}
3228	} else {
3229		sv = *v
3230	}
3231
3232	for key, value := range shape {
3233		switch key {
3234		case "message":
3235			if value != nil {
3236				jtv, ok := value.(string)
3237				if !ok {
3238					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3239				}
3240				sv.Message = ptr.String(jtv)
3241			}
3242
3243		default:
3244			_, _ = key, value
3245
3246		}
3247	}
3248	*v = sv
3249	return nil
3250}
3251
3252func awsAwsjson11_deserializeDocumentKeyUsage(v **types.KeyUsage, value interface{}) error {
3253	if v == nil {
3254		return fmt.Errorf("unexpected nil of type %T", v)
3255	}
3256	if value == nil {
3257		return nil
3258	}
3259
3260	shape, ok := value.(map[string]interface{})
3261	if !ok {
3262		return fmt.Errorf("unexpected JSON type %v", value)
3263	}
3264
3265	var sv *types.KeyUsage
3266	if *v == nil {
3267		sv = &types.KeyUsage{}
3268	} else {
3269		sv = *v
3270	}
3271
3272	for key, value := range shape {
3273		switch key {
3274		case "Name":
3275			if value != nil {
3276				jtv, ok := value.(string)
3277				if !ok {
3278					return fmt.Errorf("expected KeyUsageName to be of type string, got %T instead", value)
3279				}
3280				sv.Name = types.KeyUsageName(jtv)
3281			}
3282
3283		default:
3284			_, _ = key, value
3285
3286		}
3287	}
3288	*v = sv
3289	return nil
3290}
3291
3292func awsAwsjson11_deserializeDocumentKeyUsageList(v *[]types.KeyUsage, value interface{}) error {
3293	if v == nil {
3294		return fmt.Errorf("unexpected nil of type %T", v)
3295	}
3296	if value == nil {
3297		return nil
3298	}
3299
3300	shape, ok := value.([]interface{})
3301	if !ok {
3302		return fmt.Errorf("unexpected JSON type %v", value)
3303	}
3304
3305	var cv []types.KeyUsage
3306	if *v == nil {
3307		cv = []types.KeyUsage{}
3308	} else {
3309		cv = *v
3310	}
3311
3312	for _, value := range shape {
3313		var col types.KeyUsage
3314		destAddr := &col
3315		if err := awsAwsjson11_deserializeDocumentKeyUsage(&destAddr, value); err != nil {
3316			return err
3317		}
3318		col = *destAddr
3319		cv = append(cv, col)
3320
3321	}
3322	*v = cv
3323	return nil
3324}
3325
3326func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error {
3327	if v == nil {
3328		return fmt.Errorf("unexpected nil of type %T", v)
3329	}
3330	if value == nil {
3331		return nil
3332	}
3333
3334	shape, ok := value.(map[string]interface{})
3335	if !ok {
3336		return fmt.Errorf("unexpected JSON type %v", value)
3337	}
3338
3339	var sv *types.LimitExceededException
3340	if *v == nil {
3341		sv = &types.LimitExceededException{}
3342	} else {
3343		sv = *v
3344	}
3345
3346	for key, value := range shape {
3347		switch key {
3348		case "message":
3349			if value != nil {
3350				jtv, ok := value.(string)
3351				if !ok {
3352					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3353				}
3354				sv.Message = ptr.String(jtv)
3355			}
3356
3357		default:
3358			_, _ = key, value
3359
3360		}
3361	}
3362	*v = sv
3363	return nil
3364}
3365
3366func awsAwsjson11_deserializeDocumentRenewalSummary(v **types.RenewalSummary, value interface{}) error {
3367	if v == nil {
3368		return fmt.Errorf("unexpected nil of type %T", v)
3369	}
3370	if value == nil {
3371		return nil
3372	}
3373
3374	shape, ok := value.(map[string]interface{})
3375	if !ok {
3376		return fmt.Errorf("unexpected JSON type %v", value)
3377	}
3378
3379	var sv *types.RenewalSummary
3380	if *v == nil {
3381		sv = &types.RenewalSummary{}
3382	} else {
3383		sv = *v
3384	}
3385
3386	for key, value := range shape {
3387		switch key {
3388		case "DomainValidationOptions":
3389			if err := awsAwsjson11_deserializeDocumentDomainValidationList(&sv.DomainValidationOptions, value); err != nil {
3390				return err
3391			}
3392
3393		case "RenewalStatus":
3394			if value != nil {
3395				jtv, ok := value.(string)
3396				if !ok {
3397					return fmt.Errorf("expected RenewalStatus to be of type string, got %T instead", value)
3398				}
3399				sv.RenewalStatus = types.RenewalStatus(jtv)
3400			}
3401
3402		case "RenewalStatusReason":
3403			if value != nil {
3404				jtv, ok := value.(string)
3405				if !ok {
3406					return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
3407				}
3408				sv.RenewalStatusReason = types.FailureReason(jtv)
3409			}
3410
3411		case "UpdatedAt":
3412			if value != nil {
3413				switch jtv := value.(type) {
3414				case json.Number:
3415					f64, err := jtv.Float64()
3416					if err != nil {
3417						return err
3418					}
3419					sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64))
3420
3421				default:
3422					return fmt.Errorf("expected TStamp to be a JSON Number, got %T instead", value)
3423
3424				}
3425			}
3426
3427		default:
3428			_, _ = key, value
3429
3430		}
3431	}
3432	*v = sv
3433	return nil
3434}
3435
3436func awsAwsjson11_deserializeDocumentRequestInProgressException(v **types.RequestInProgressException, value interface{}) error {
3437	if v == nil {
3438		return fmt.Errorf("unexpected nil of type %T", v)
3439	}
3440	if value == nil {
3441		return nil
3442	}
3443
3444	shape, ok := value.(map[string]interface{})
3445	if !ok {
3446		return fmt.Errorf("unexpected JSON type %v", value)
3447	}
3448
3449	var sv *types.RequestInProgressException
3450	if *v == nil {
3451		sv = &types.RequestInProgressException{}
3452	} else {
3453		sv = *v
3454	}
3455
3456	for key, value := range shape {
3457		switch key {
3458		case "message":
3459			if value != nil {
3460				jtv, ok := value.(string)
3461				if !ok {
3462					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3463				}
3464				sv.Message = ptr.String(jtv)
3465			}
3466
3467		default:
3468			_, _ = key, value
3469
3470		}
3471	}
3472	*v = sv
3473	return nil
3474}
3475
3476func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error {
3477	if v == nil {
3478		return fmt.Errorf("unexpected nil of type %T", v)
3479	}
3480	if value == nil {
3481		return nil
3482	}
3483
3484	shape, ok := value.(map[string]interface{})
3485	if !ok {
3486		return fmt.Errorf("unexpected JSON type %v", value)
3487	}
3488
3489	var sv *types.ResourceInUseException
3490	if *v == nil {
3491		sv = &types.ResourceInUseException{}
3492	} else {
3493		sv = *v
3494	}
3495
3496	for key, value := range shape {
3497		switch key {
3498		case "message":
3499			if value != nil {
3500				jtv, ok := value.(string)
3501				if !ok {
3502					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3503				}
3504				sv.Message = ptr.String(jtv)
3505			}
3506
3507		default:
3508			_, _ = key, value
3509
3510		}
3511	}
3512	*v = sv
3513	return nil
3514}
3515
3516func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
3517	if v == nil {
3518		return fmt.Errorf("unexpected nil of type %T", v)
3519	}
3520	if value == nil {
3521		return nil
3522	}
3523
3524	shape, ok := value.(map[string]interface{})
3525	if !ok {
3526		return fmt.Errorf("unexpected JSON type %v", value)
3527	}
3528
3529	var sv *types.ResourceNotFoundException
3530	if *v == nil {
3531		sv = &types.ResourceNotFoundException{}
3532	} else {
3533		sv = *v
3534	}
3535
3536	for key, value := range shape {
3537		switch key {
3538		case "message":
3539			if value != nil {
3540				jtv, ok := value.(string)
3541				if !ok {
3542					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3543				}
3544				sv.Message = ptr.String(jtv)
3545			}
3546
3547		default:
3548			_, _ = key, value
3549
3550		}
3551	}
3552	*v = sv
3553	return nil
3554}
3555
3556func awsAwsjson11_deserializeDocumentResourceRecord(v **types.ResourceRecord, value interface{}) error {
3557	if v == nil {
3558		return fmt.Errorf("unexpected nil of type %T", v)
3559	}
3560	if value == nil {
3561		return nil
3562	}
3563
3564	shape, ok := value.(map[string]interface{})
3565	if !ok {
3566		return fmt.Errorf("unexpected JSON type %v", value)
3567	}
3568
3569	var sv *types.ResourceRecord
3570	if *v == nil {
3571		sv = &types.ResourceRecord{}
3572	} else {
3573		sv = *v
3574	}
3575
3576	for key, value := range shape {
3577		switch key {
3578		case "Name":
3579			if value != nil {
3580				jtv, ok := value.(string)
3581				if !ok {
3582					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3583				}
3584				sv.Name = ptr.String(jtv)
3585			}
3586
3587		case "Type":
3588			if value != nil {
3589				jtv, ok := value.(string)
3590				if !ok {
3591					return fmt.Errorf("expected RecordType to be of type string, got %T instead", value)
3592				}
3593				sv.Type = types.RecordType(jtv)
3594			}
3595
3596		case "Value":
3597			if value != nil {
3598				jtv, ok := value.(string)
3599				if !ok {
3600					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3601				}
3602				sv.Value = ptr.String(jtv)
3603			}
3604
3605		default:
3606			_, _ = key, value
3607
3608		}
3609	}
3610	*v = sv
3611	return nil
3612}
3613
3614func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
3615	if v == nil {
3616		return fmt.Errorf("unexpected nil of type %T", v)
3617	}
3618	if value == nil {
3619		return nil
3620	}
3621
3622	shape, ok := value.(map[string]interface{})
3623	if !ok {
3624		return fmt.Errorf("unexpected JSON type %v", value)
3625	}
3626
3627	var sv *types.Tag
3628	if *v == nil {
3629		sv = &types.Tag{}
3630	} else {
3631		sv = *v
3632	}
3633
3634	for key, value := range shape {
3635		switch key {
3636		case "Key":
3637			if value != nil {
3638				jtv, ok := value.(string)
3639				if !ok {
3640					return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
3641				}
3642				sv.Key = ptr.String(jtv)
3643			}
3644
3645		case "Value":
3646			if value != nil {
3647				jtv, ok := value.(string)
3648				if !ok {
3649					return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
3650				}
3651				sv.Value = ptr.String(jtv)
3652			}
3653
3654		default:
3655			_, _ = key, value
3656
3657		}
3658	}
3659	*v = sv
3660	return nil
3661}
3662
3663func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error {
3664	if v == nil {
3665		return fmt.Errorf("unexpected nil of type %T", v)
3666	}
3667	if value == nil {
3668		return nil
3669	}
3670
3671	shape, ok := value.([]interface{})
3672	if !ok {
3673		return fmt.Errorf("unexpected JSON type %v", value)
3674	}
3675
3676	var cv []types.Tag
3677	if *v == nil {
3678		cv = []types.Tag{}
3679	} else {
3680		cv = *v
3681	}
3682
3683	for _, value := range shape {
3684		var col types.Tag
3685		destAddr := &col
3686		if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
3687			return err
3688		}
3689		col = *destAddr
3690		cv = append(cv, col)
3691
3692	}
3693	*v = cv
3694	return nil
3695}
3696
3697func awsAwsjson11_deserializeDocumentTagPolicyException(v **types.TagPolicyException, value interface{}) error {
3698	if v == nil {
3699		return fmt.Errorf("unexpected nil of type %T", v)
3700	}
3701	if value == nil {
3702		return nil
3703	}
3704
3705	shape, ok := value.(map[string]interface{})
3706	if !ok {
3707		return fmt.Errorf("unexpected JSON type %v", value)
3708	}
3709
3710	var sv *types.TagPolicyException
3711	if *v == nil {
3712		sv = &types.TagPolicyException{}
3713	} else {
3714		sv = *v
3715	}
3716
3717	for key, value := range shape {
3718		switch key {
3719		case "message":
3720			if value != nil {
3721				jtv, ok := value.(string)
3722				if !ok {
3723					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3724				}
3725				sv.Message = ptr.String(jtv)
3726			}
3727
3728		default:
3729			_, _ = key, value
3730
3731		}
3732	}
3733	*v = sv
3734	return nil
3735}
3736
3737func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error {
3738	if v == nil {
3739		return fmt.Errorf("unexpected nil of type %T", v)
3740	}
3741	if value == nil {
3742		return nil
3743	}
3744
3745	shape, ok := value.(map[string]interface{})
3746	if !ok {
3747		return fmt.Errorf("unexpected JSON type %v", value)
3748	}
3749
3750	var sv *types.ThrottlingException
3751	if *v == nil {
3752		sv = &types.ThrottlingException{}
3753	} else {
3754		sv = *v
3755	}
3756
3757	for key, value := range shape {
3758		switch key {
3759		case "message":
3760			if value != nil {
3761				jtv, ok := value.(string)
3762				if !ok {
3763					return fmt.Errorf("expected AvailabilityErrorMessage to be of type string, got %T instead", value)
3764				}
3765				sv.Message = ptr.String(jtv)
3766			}
3767
3768		default:
3769			_, _ = key, value
3770
3771		}
3772	}
3773	*v = sv
3774	return nil
3775}
3776
3777func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error {
3778	if v == nil {
3779		return fmt.Errorf("unexpected nil of type %T", v)
3780	}
3781	if value == nil {
3782		return nil
3783	}
3784
3785	shape, ok := value.(map[string]interface{})
3786	if !ok {
3787		return fmt.Errorf("unexpected JSON type %v", value)
3788	}
3789
3790	var sv *types.TooManyTagsException
3791	if *v == nil {
3792		sv = &types.TooManyTagsException{}
3793	} else {
3794		sv = *v
3795	}
3796
3797	for key, value := range shape {
3798		switch key {
3799		case "message":
3800			if value != nil {
3801				jtv, ok := value.(string)
3802				if !ok {
3803					return fmt.Errorf("expected String to be of type string, got %T instead", value)
3804				}
3805				sv.Message = ptr.String(jtv)
3806			}
3807
3808		default:
3809			_, _ = key, value
3810
3811		}
3812	}
3813	*v = sv
3814	return nil
3815}
3816
3817func awsAwsjson11_deserializeDocumentValidationEmailList(v *[]string, value interface{}) error {
3818	if v == nil {
3819		return fmt.Errorf("unexpected nil of type %T", v)
3820	}
3821	if value == nil {
3822		return nil
3823	}
3824
3825	shape, ok := value.([]interface{})
3826	if !ok {
3827		return fmt.Errorf("unexpected JSON type %v", value)
3828	}
3829
3830	var cv []string
3831	if *v == nil {
3832		cv = []string{}
3833	} else {
3834		cv = *v
3835	}
3836
3837	for _, value := range shape {
3838		var col string
3839		if value != nil {
3840			jtv, ok := value.(string)
3841			if !ok {
3842				return fmt.Errorf("expected String to be of type string, got %T instead", value)
3843			}
3844			col = jtv
3845		}
3846		cv = append(cv, col)
3847
3848	}
3849	*v = cv
3850	return nil
3851}
3852
3853func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error {
3854	if v == nil {
3855		return fmt.Errorf("unexpected nil of type %T", v)
3856	}
3857	if value == nil {
3858		return nil
3859	}
3860
3861	shape, ok := value.(map[string]interface{})
3862	if !ok {
3863		return fmt.Errorf("unexpected JSON type %v", value)
3864	}
3865
3866	var sv *types.ValidationException
3867	if *v == nil {
3868		sv = &types.ValidationException{}
3869	} else {
3870		sv = *v
3871	}
3872
3873	for key, value := range shape {
3874		switch key {
3875		case "message":
3876			if value != nil {
3877				jtv, ok := value.(string)
3878				if !ok {
3879					return fmt.Errorf("expected ValidationExceptionMessage to be of type string, got %T instead", value)
3880				}
3881				sv.Message = ptr.String(jtv)
3882			}
3883
3884		default:
3885			_, _ = key, value
3886
3887		}
3888	}
3889	*v = sv
3890	return nil
3891}
3892
3893func awsAwsjson11_deserializeOpDocumentDescribeCertificateOutput(v **DescribeCertificateOutput, value interface{}) error {
3894	if v == nil {
3895		return fmt.Errorf("unexpected nil of type %T", v)
3896	}
3897	if value == nil {
3898		return nil
3899	}
3900
3901	shape, ok := value.(map[string]interface{})
3902	if !ok {
3903		return fmt.Errorf("unexpected JSON type %v", value)
3904	}
3905
3906	var sv *DescribeCertificateOutput
3907	if *v == nil {
3908		sv = &DescribeCertificateOutput{}
3909	} else {
3910		sv = *v
3911	}
3912
3913	for key, value := range shape {
3914		switch key {
3915		case "Certificate":
3916			if err := awsAwsjson11_deserializeDocumentCertificateDetail(&sv.Certificate, value); err != nil {
3917				return err
3918			}
3919
3920		default:
3921			_, _ = key, value
3922
3923		}
3924	}
3925	*v = sv
3926	return nil
3927}
3928
3929func awsAwsjson11_deserializeOpDocumentExportCertificateOutput(v **ExportCertificateOutput, value interface{}) error {
3930	if v == nil {
3931		return fmt.Errorf("unexpected nil of type %T", v)
3932	}
3933	if value == nil {
3934		return nil
3935	}
3936
3937	shape, ok := value.(map[string]interface{})
3938	if !ok {
3939		return fmt.Errorf("unexpected JSON type %v", value)
3940	}
3941
3942	var sv *ExportCertificateOutput
3943	if *v == nil {
3944		sv = &ExportCertificateOutput{}
3945	} else {
3946		sv = *v
3947	}
3948
3949	for key, value := range shape {
3950		switch key {
3951		case "Certificate":
3952			if value != nil {
3953				jtv, ok := value.(string)
3954				if !ok {
3955					return fmt.Errorf("expected CertificateBody to be of type string, got %T instead", value)
3956				}
3957				sv.Certificate = ptr.String(jtv)
3958			}
3959
3960		case "CertificateChain":
3961			if value != nil {
3962				jtv, ok := value.(string)
3963				if !ok {
3964					return fmt.Errorf("expected CertificateChain to be of type string, got %T instead", value)
3965				}
3966				sv.CertificateChain = ptr.String(jtv)
3967			}
3968
3969		case "PrivateKey":
3970			if value != nil {
3971				jtv, ok := value.(string)
3972				if !ok {
3973					return fmt.Errorf("expected PrivateKey to be of type string, got %T instead", value)
3974				}
3975				sv.PrivateKey = ptr.String(jtv)
3976			}
3977
3978		default:
3979			_, _ = key, value
3980
3981		}
3982	}
3983	*v = sv
3984	return nil
3985}
3986
3987func awsAwsjson11_deserializeOpDocumentGetAccountConfigurationOutput(v **GetAccountConfigurationOutput, value interface{}) error {
3988	if v == nil {
3989		return fmt.Errorf("unexpected nil of type %T", v)
3990	}
3991	if value == nil {
3992		return nil
3993	}
3994
3995	shape, ok := value.(map[string]interface{})
3996	if !ok {
3997		return fmt.Errorf("unexpected JSON type %v", value)
3998	}
3999
4000	var sv *GetAccountConfigurationOutput
4001	if *v == nil {
4002		sv = &GetAccountConfigurationOutput{}
4003	} else {
4004		sv = *v
4005	}
4006
4007	for key, value := range shape {
4008		switch key {
4009		case "ExpiryEvents":
4010			if err := awsAwsjson11_deserializeDocumentExpiryEventsConfiguration(&sv.ExpiryEvents, value); err != nil {
4011				return err
4012			}
4013
4014		default:
4015			_, _ = key, value
4016
4017		}
4018	}
4019	*v = sv
4020	return nil
4021}
4022
4023func awsAwsjson11_deserializeOpDocumentGetCertificateOutput(v **GetCertificateOutput, value interface{}) error {
4024	if v == nil {
4025		return fmt.Errorf("unexpected nil of type %T", v)
4026	}
4027	if value == nil {
4028		return nil
4029	}
4030
4031	shape, ok := value.(map[string]interface{})
4032	if !ok {
4033		return fmt.Errorf("unexpected JSON type %v", value)
4034	}
4035
4036	var sv *GetCertificateOutput
4037	if *v == nil {
4038		sv = &GetCertificateOutput{}
4039	} else {
4040		sv = *v
4041	}
4042
4043	for key, value := range shape {
4044		switch key {
4045		case "Certificate":
4046			if value != nil {
4047				jtv, ok := value.(string)
4048				if !ok {
4049					return fmt.Errorf("expected CertificateBody to be of type string, got %T instead", value)
4050				}
4051				sv.Certificate = ptr.String(jtv)
4052			}
4053
4054		case "CertificateChain":
4055			if value != nil {
4056				jtv, ok := value.(string)
4057				if !ok {
4058					return fmt.Errorf("expected CertificateChain to be of type string, got %T instead", value)
4059				}
4060				sv.CertificateChain = ptr.String(jtv)
4061			}
4062
4063		default:
4064			_, _ = key, value
4065
4066		}
4067	}
4068	*v = sv
4069	return nil
4070}
4071
4072func awsAwsjson11_deserializeOpDocumentImportCertificateOutput(v **ImportCertificateOutput, value interface{}) error {
4073	if v == nil {
4074		return fmt.Errorf("unexpected nil of type %T", v)
4075	}
4076	if value == nil {
4077		return nil
4078	}
4079
4080	shape, ok := value.(map[string]interface{})
4081	if !ok {
4082		return fmt.Errorf("unexpected JSON type %v", value)
4083	}
4084
4085	var sv *ImportCertificateOutput
4086	if *v == nil {
4087		sv = &ImportCertificateOutput{}
4088	} else {
4089		sv = *v
4090	}
4091
4092	for key, value := range shape {
4093		switch key {
4094		case "CertificateArn":
4095			if value != nil {
4096				jtv, ok := value.(string)
4097				if !ok {
4098					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
4099				}
4100				sv.CertificateArn = ptr.String(jtv)
4101			}
4102
4103		default:
4104			_, _ = key, value
4105
4106		}
4107	}
4108	*v = sv
4109	return nil
4110}
4111
4112func awsAwsjson11_deserializeOpDocumentListCertificatesOutput(v **ListCertificatesOutput, value interface{}) error {
4113	if v == nil {
4114		return fmt.Errorf("unexpected nil of type %T", v)
4115	}
4116	if value == nil {
4117		return nil
4118	}
4119
4120	shape, ok := value.(map[string]interface{})
4121	if !ok {
4122		return fmt.Errorf("unexpected JSON type %v", value)
4123	}
4124
4125	var sv *ListCertificatesOutput
4126	if *v == nil {
4127		sv = &ListCertificatesOutput{}
4128	} else {
4129		sv = *v
4130	}
4131
4132	for key, value := range shape {
4133		switch key {
4134		case "CertificateSummaryList":
4135			if err := awsAwsjson11_deserializeDocumentCertificateSummaryList(&sv.CertificateSummaryList, value); err != nil {
4136				return err
4137			}
4138
4139		case "NextToken":
4140			if value != nil {
4141				jtv, ok := value.(string)
4142				if !ok {
4143					return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
4144				}
4145				sv.NextToken = ptr.String(jtv)
4146			}
4147
4148		default:
4149			_, _ = key, value
4150
4151		}
4152	}
4153	*v = sv
4154	return nil
4155}
4156
4157func awsAwsjson11_deserializeOpDocumentListTagsForCertificateOutput(v **ListTagsForCertificateOutput, value interface{}) error {
4158	if v == nil {
4159		return fmt.Errorf("unexpected nil of type %T", v)
4160	}
4161	if value == nil {
4162		return nil
4163	}
4164
4165	shape, ok := value.(map[string]interface{})
4166	if !ok {
4167		return fmt.Errorf("unexpected JSON type %v", value)
4168	}
4169
4170	var sv *ListTagsForCertificateOutput
4171	if *v == nil {
4172		sv = &ListTagsForCertificateOutput{}
4173	} else {
4174		sv = *v
4175	}
4176
4177	for key, value := range shape {
4178		switch key {
4179		case "Tags":
4180			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
4181				return err
4182			}
4183
4184		default:
4185			_, _ = key, value
4186
4187		}
4188	}
4189	*v = sv
4190	return nil
4191}
4192
4193func awsAwsjson11_deserializeOpDocumentRequestCertificateOutput(v **RequestCertificateOutput, value interface{}) error {
4194	if v == nil {
4195		return fmt.Errorf("unexpected nil of type %T", v)
4196	}
4197	if value == nil {
4198		return nil
4199	}
4200
4201	shape, ok := value.(map[string]interface{})
4202	if !ok {
4203		return fmt.Errorf("unexpected JSON type %v", value)
4204	}
4205
4206	var sv *RequestCertificateOutput
4207	if *v == nil {
4208		sv = &RequestCertificateOutput{}
4209	} else {
4210		sv = *v
4211	}
4212
4213	for key, value := range shape {
4214		switch key {
4215		case "CertificateArn":
4216			if value != nil {
4217				jtv, ok := value.(string)
4218				if !ok {
4219					return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
4220				}
4221				sv.CertificateArn = ptr.String(jtv)
4222			}
4223
4224		default:
4225			_, _ = key, value
4226
4227		}
4228	}
4229	*v = sv
4230	return nil
4231}
4232