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