1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package waf
4
5import (
6	"bytes"
7	"context"
8	"encoding/base64"
9	"encoding/json"
10	"fmt"
11	"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
12	"github.com/aws/aws-sdk-go-v2/service/waf/types"
13	smithy "github.com/aws/smithy-go"
14	smithyio "github.com/aws/smithy-go/io"
15	"github.com/aws/smithy-go/middleware"
16	"github.com/aws/smithy-go/ptr"
17	smithytime "github.com/aws/smithy-go/time"
18	smithyhttp "github.com/aws/smithy-go/transport/http"
19	"io"
20	"strings"
21)
22
23type awsAwsjson11_deserializeOpCreateByteMatchSet struct {
24}
25
26func (*awsAwsjson11_deserializeOpCreateByteMatchSet) ID() string {
27	return "OperationDeserializer"
28}
29
30func (m *awsAwsjson11_deserializeOpCreateByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
31	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
32) {
33	out, metadata, err = next.HandleDeserialize(ctx, in)
34	if err != nil {
35		return out, metadata, err
36	}
37
38	response, ok := out.RawResponse.(*smithyhttp.Response)
39	if !ok {
40		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
41	}
42
43	if response.StatusCode < 200 || response.StatusCode >= 300 {
44		return out, metadata, awsAwsjson11_deserializeOpErrorCreateByteMatchSet(response, &metadata)
45	}
46	output := &CreateByteMatchSetOutput{}
47	out.Result = output
48
49	var buff [1024]byte
50	ringBuffer := smithyio.NewRingBuffer(buff[:])
51
52	body := io.TeeReader(response.Body, ringBuffer)
53	decoder := json.NewDecoder(body)
54	decoder.UseNumber()
55	var shape interface{}
56	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
57		var snapshot bytes.Buffer
58		io.Copy(&snapshot, ringBuffer)
59		err = &smithy.DeserializationError{
60			Err:      fmt.Errorf("failed to decode response body, %w", err),
61			Snapshot: snapshot.Bytes(),
62		}
63		return out, metadata, err
64	}
65
66	err = awsAwsjson11_deserializeOpDocumentCreateByteMatchSetOutput(&output, shape)
67	if err != nil {
68		var snapshot bytes.Buffer
69		io.Copy(&snapshot, ringBuffer)
70		err = &smithy.DeserializationError{
71			Err:      fmt.Errorf("failed to decode response body, %w", err),
72			Snapshot: snapshot.Bytes(),
73		}
74		return out, metadata, err
75	}
76
77	return out, metadata, err
78}
79
80func awsAwsjson11_deserializeOpErrorCreateByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
81	var errorBuffer bytes.Buffer
82	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
83		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
84	}
85	errorBody := bytes.NewReader(errorBuffer.Bytes())
86
87	errorCode := "UnknownError"
88	errorMessage := errorCode
89
90	code := response.Header.Get("X-Amzn-ErrorType")
91	if len(code) != 0 {
92		errorCode = restjson.SanitizeErrorCode(code)
93	}
94
95	var buff [1024]byte
96	ringBuffer := smithyio.NewRingBuffer(buff[:])
97
98	body := io.TeeReader(errorBody, ringBuffer)
99	decoder := json.NewDecoder(body)
100	decoder.UseNumber()
101	code, message, err := restjson.GetErrorInfo(decoder)
102	if err != nil {
103		var snapshot bytes.Buffer
104		io.Copy(&snapshot, ringBuffer)
105		err = &smithy.DeserializationError{
106			Err:      fmt.Errorf("failed to decode response body, %w", err),
107			Snapshot: snapshot.Bytes(),
108		}
109		return err
110	}
111
112	errorBody.Seek(0, io.SeekStart)
113	if len(code) != 0 {
114		errorCode = restjson.SanitizeErrorCode(code)
115	}
116	if len(message) != 0 {
117		errorMessage = message
118	}
119
120	switch {
121	case strings.EqualFold("WAFDisallowedNameException", errorCode):
122		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
123
124	case strings.EqualFold("WAFInternalErrorException", errorCode):
125		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
126
127	case strings.EqualFold("WAFInvalidAccountException", errorCode):
128		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
129
130	case strings.EqualFold("WAFInvalidParameterException", errorCode):
131		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
132
133	case strings.EqualFold("WAFLimitsExceededException", errorCode):
134		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
135
136	case strings.EqualFold("WAFStaleDataException", errorCode):
137		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
138
139	default:
140		genericError := &smithy.GenericAPIError{
141			Code:    errorCode,
142			Message: errorMessage,
143		}
144		return genericError
145
146	}
147}
148
149type awsAwsjson11_deserializeOpCreateGeoMatchSet struct {
150}
151
152func (*awsAwsjson11_deserializeOpCreateGeoMatchSet) ID() string {
153	return "OperationDeserializer"
154}
155
156func (m *awsAwsjson11_deserializeOpCreateGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
157	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
158) {
159	out, metadata, err = next.HandleDeserialize(ctx, in)
160	if err != nil {
161		return out, metadata, err
162	}
163
164	response, ok := out.RawResponse.(*smithyhttp.Response)
165	if !ok {
166		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
167	}
168
169	if response.StatusCode < 200 || response.StatusCode >= 300 {
170		return out, metadata, awsAwsjson11_deserializeOpErrorCreateGeoMatchSet(response, &metadata)
171	}
172	output := &CreateGeoMatchSetOutput{}
173	out.Result = output
174
175	var buff [1024]byte
176	ringBuffer := smithyio.NewRingBuffer(buff[:])
177
178	body := io.TeeReader(response.Body, ringBuffer)
179	decoder := json.NewDecoder(body)
180	decoder.UseNumber()
181	var shape interface{}
182	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
183		var snapshot bytes.Buffer
184		io.Copy(&snapshot, ringBuffer)
185		err = &smithy.DeserializationError{
186			Err:      fmt.Errorf("failed to decode response body, %w", err),
187			Snapshot: snapshot.Bytes(),
188		}
189		return out, metadata, err
190	}
191
192	err = awsAwsjson11_deserializeOpDocumentCreateGeoMatchSetOutput(&output, shape)
193	if err != nil {
194		var snapshot bytes.Buffer
195		io.Copy(&snapshot, ringBuffer)
196		err = &smithy.DeserializationError{
197			Err:      fmt.Errorf("failed to decode response body, %w", err),
198			Snapshot: snapshot.Bytes(),
199		}
200		return out, metadata, err
201	}
202
203	return out, metadata, err
204}
205
206func awsAwsjson11_deserializeOpErrorCreateGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
207	var errorBuffer bytes.Buffer
208	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
209		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
210	}
211	errorBody := bytes.NewReader(errorBuffer.Bytes())
212
213	errorCode := "UnknownError"
214	errorMessage := errorCode
215
216	code := response.Header.Get("X-Amzn-ErrorType")
217	if len(code) != 0 {
218		errorCode = restjson.SanitizeErrorCode(code)
219	}
220
221	var buff [1024]byte
222	ringBuffer := smithyio.NewRingBuffer(buff[:])
223
224	body := io.TeeReader(errorBody, ringBuffer)
225	decoder := json.NewDecoder(body)
226	decoder.UseNumber()
227	code, message, err := restjson.GetErrorInfo(decoder)
228	if err != nil {
229		var snapshot bytes.Buffer
230		io.Copy(&snapshot, ringBuffer)
231		err = &smithy.DeserializationError{
232			Err:      fmt.Errorf("failed to decode response body, %w", err),
233			Snapshot: snapshot.Bytes(),
234		}
235		return err
236	}
237
238	errorBody.Seek(0, io.SeekStart)
239	if len(code) != 0 {
240		errorCode = restjson.SanitizeErrorCode(code)
241	}
242	if len(message) != 0 {
243		errorMessage = message
244	}
245
246	switch {
247	case strings.EqualFold("WAFDisallowedNameException", errorCode):
248		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
249
250	case strings.EqualFold("WAFInternalErrorException", errorCode):
251		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
252
253	case strings.EqualFold("WAFInvalidAccountException", errorCode):
254		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
255
256	case strings.EqualFold("WAFInvalidParameterException", errorCode):
257		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
258
259	case strings.EqualFold("WAFLimitsExceededException", errorCode):
260		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
261
262	case strings.EqualFold("WAFStaleDataException", errorCode):
263		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
264
265	default:
266		genericError := &smithy.GenericAPIError{
267			Code:    errorCode,
268			Message: errorMessage,
269		}
270		return genericError
271
272	}
273}
274
275type awsAwsjson11_deserializeOpCreateIPSet struct {
276}
277
278func (*awsAwsjson11_deserializeOpCreateIPSet) ID() string {
279	return "OperationDeserializer"
280}
281
282func (m *awsAwsjson11_deserializeOpCreateIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
283	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
284) {
285	out, metadata, err = next.HandleDeserialize(ctx, in)
286	if err != nil {
287		return out, metadata, err
288	}
289
290	response, ok := out.RawResponse.(*smithyhttp.Response)
291	if !ok {
292		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
293	}
294
295	if response.StatusCode < 200 || response.StatusCode >= 300 {
296		return out, metadata, awsAwsjson11_deserializeOpErrorCreateIPSet(response, &metadata)
297	}
298	output := &CreateIPSetOutput{}
299	out.Result = output
300
301	var buff [1024]byte
302	ringBuffer := smithyio.NewRingBuffer(buff[:])
303
304	body := io.TeeReader(response.Body, ringBuffer)
305	decoder := json.NewDecoder(body)
306	decoder.UseNumber()
307	var shape interface{}
308	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
309		var snapshot bytes.Buffer
310		io.Copy(&snapshot, ringBuffer)
311		err = &smithy.DeserializationError{
312			Err:      fmt.Errorf("failed to decode response body, %w", err),
313			Snapshot: snapshot.Bytes(),
314		}
315		return out, metadata, err
316	}
317
318	err = awsAwsjson11_deserializeOpDocumentCreateIPSetOutput(&output, shape)
319	if err != nil {
320		var snapshot bytes.Buffer
321		io.Copy(&snapshot, ringBuffer)
322		err = &smithy.DeserializationError{
323			Err:      fmt.Errorf("failed to decode response body, %w", err),
324			Snapshot: snapshot.Bytes(),
325		}
326		return out, metadata, err
327	}
328
329	return out, metadata, err
330}
331
332func awsAwsjson11_deserializeOpErrorCreateIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
333	var errorBuffer bytes.Buffer
334	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
335		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
336	}
337	errorBody := bytes.NewReader(errorBuffer.Bytes())
338
339	errorCode := "UnknownError"
340	errorMessage := errorCode
341
342	code := response.Header.Get("X-Amzn-ErrorType")
343	if len(code) != 0 {
344		errorCode = restjson.SanitizeErrorCode(code)
345	}
346
347	var buff [1024]byte
348	ringBuffer := smithyio.NewRingBuffer(buff[:])
349
350	body := io.TeeReader(errorBody, ringBuffer)
351	decoder := json.NewDecoder(body)
352	decoder.UseNumber()
353	code, message, err := restjson.GetErrorInfo(decoder)
354	if err != nil {
355		var snapshot bytes.Buffer
356		io.Copy(&snapshot, ringBuffer)
357		err = &smithy.DeserializationError{
358			Err:      fmt.Errorf("failed to decode response body, %w", err),
359			Snapshot: snapshot.Bytes(),
360		}
361		return err
362	}
363
364	errorBody.Seek(0, io.SeekStart)
365	if len(code) != 0 {
366		errorCode = restjson.SanitizeErrorCode(code)
367	}
368	if len(message) != 0 {
369		errorMessage = message
370	}
371
372	switch {
373	case strings.EqualFold("WAFDisallowedNameException", errorCode):
374		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
375
376	case strings.EqualFold("WAFInternalErrorException", errorCode):
377		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
378
379	case strings.EqualFold("WAFInvalidAccountException", errorCode):
380		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
381
382	case strings.EqualFold("WAFInvalidParameterException", errorCode):
383		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
384
385	case strings.EqualFold("WAFLimitsExceededException", errorCode):
386		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
387
388	case strings.EqualFold("WAFStaleDataException", errorCode):
389		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
390
391	default:
392		genericError := &smithy.GenericAPIError{
393			Code:    errorCode,
394			Message: errorMessage,
395		}
396		return genericError
397
398	}
399}
400
401type awsAwsjson11_deserializeOpCreateRateBasedRule struct {
402}
403
404func (*awsAwsjson11_deserializeOpCreateRateBasedRule) ID() string {
405	return "OperationDeserializer"
406}
407
408func (m *awsAwsjson11_deserializeOpCreateRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
409	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
410) {
411	out, metadata, err = next.HandleDeserialize(ctx, in)
412	if err != nil {
413		return out, metadata, err
414	}
415
416	response, ok := out.RawResponse.(*smithyhttp.Response)
417	if !ok {
418		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
419	}
420
421	if response.StatusCode < 200 || response.StatusCode >= 300 {
422		return out, metadata, awsAwsjson11_deserializeOpErrorCreateRateBasedRule(response, &metadata)
423	}
424	output := &CreateRateBasedRuleOutput{}
425	out.Result = output
426
427	var buff [1024]byte
428	ringBuffer := smithyio.NewRingBuffer(buff[:])
429
430	body := io.TeeReader(response.Body, ringBuffer)
431	decoder := json.NewDecoder(body)
432	decoder.UseNumber()
433	var shape interface{}
434	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
435		var snapshot bytes.Buffer
436		io.Copy(&snapshot, ringBuffer)
437		err = &smithy.DeserializationError{
438			Err:      fmt.Errorf("failed to decode response body, %w", err),
439			Snapshot: snapshot.Bytes(),
440		}
441		return out, metadata, err
442	}
443
444	err = awsAwsjson11_deserializeOpDocumentCreateRateBasedRuleOutput(&output, shape)
445	if err != nil {
446		var snapshot bytes.Buffer
447		io.Copy(&snapshot, ringBuffer)
448		err = &smithy.DeserializationError{
449			Err:      fmt.Errorf("failed to decode response body, %w", err),
450			Snapshot: snapshot.Bytes(),
451		}
452		return out, metadata, err
453	}
454
455	return out, metadata, err
456}
457
458func awsAwsjson11_deserializeOpErrorCreateRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
459	var errorBuffer bytes.Buffer
460	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
461		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
462	}
463	errorBody := bytes.NewReader(errorBuffer.Bytes())
464
465	errorCode := "UnknownError"
466	errorMessage := errorCode
467
468	code := response.Header.Get("X-Amzn-ErrorType")
469	if len(code) != 0 {
470		errorCode = restjson.SanitizeErrorCode(code)
471	}
472
473	var buff [1024]byte
474	ringBuffer := smithyio.NewRingBuffer(buff[:])
475
476	body := io.TeeReader(errorBody, ringBuffer)
477	decoder := json.NewDecoder(body)
478	decoder.UseNumber()
479	code, message, err := restjson.GetErrorInfo(decoder)
480	if err != nil {
481		var snapshot bytes.Buffer
482		io.Copy(&snapshot, ringBuffer)
483		err = &smithy.DeserializationError{
484			Err:      fmt.Errorf("failed to decode response body, %w", err),
485			Snapshot: snapshot.Bytes(),
486		}
487		return err
488	}
489
490	errorBody.Seek(0, io.SeekStart)
491	if len(code) != 0 {
492		errorCode = restjson.SanitizeErrorCode(code)
493	}
494	if len(message) != 0 {
495		errorMessage = message
496	}
497
498	switch {
499	case strings.EqualFold("WAFBadRequestException", errorCode):
500		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
501
502	case strings.EqualFold("WAFDisallowedNameException", errorCode):
503		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
504
505	case strings.EqualFold("WAFInternalErrorException", errorCode):
506		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
507
508	case strings.EqualFold("WAFInvalidParameterException", errorCode):
509		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
510
511	case strings.EqualFold("WAFLimitsExceededException", errorCode):
512		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
513
514	case strings.EqualFold("WAFStaleDataException", errorCode):
515		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
516
517	case strings.EqualFold("WAFTagOperationException", errorCode):
518		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
519
520	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
521		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
522
523	default:
524		genericError := &smithy.GenericAPIError{
525			Code:    errorCode,
526			Message: errorMessage,
527		}
528		return genericError
529
530	}
531}
532
533type awsAwsjson11_deserializeOpCreateRegexMatchSet struct {
534}
535
536func (*awsAwsjson11_deserializeOpCreateRegexMatchSet) ID() string {
537	return "OperationDeserializer"
538}
539
540func (m *awsAwsjson11_deserializeOpCreateRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
541	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
542) {
543	out, metadata, err = next.HandleDeserialize(ctx, in)
544	if err != nil {
545		return out, metadata, err
546	}
547
548	response, ok := out.RawResponse.(*smithyhttp.Response)
549	if !ok {
550		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
551	}
552
553	if response.StatusCode < 200 || response.StatusCode >= 300 {
554		return out, metadata, awsAwsjson11_deserializeOpErrorCreateRegexMatchSet(response, &metadata)
555	}
556	output := &CreateRegexMatchSetOutput{}
557	out.Result = output
558
559	var buff [1024]byte
560	ringBuffer := smithyio.NewRingBuffer(buff[:])
561
562	body := io.TeeReader(response.Body, ringBuffer)
563	decoder := json.NewDecoder(body)
564	decoder.UseNumber()
565	var shape interface{}
566	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
567		var snapshot bytes.Buffer
568		io.Copy(&snapshot, ringBuffer)
569		err = &smithy.DeserializationError{
570			Err:      fmt.Errorf("failed to decode response body, %w", err),
571			Snapshot: snapshot.Bytes(),
572		}
573		return out, metadata, err
574	}
575
576	err = awsAwsjson11_deserializeOpDocumentCreateRegexMatchSetOutput(&output, shape)
577	if err != nil {
578		var snapshot bytes.Buffer
579		io.Copy(&snapshot, ringBuffer)
580		err = &smithy.DeserializationError{
581			Err:      fmt.Errorf("failed to decode response body, %w", err),
582			Snapshot: snapshot.Bytes(),
583		}
584		return out, metadata, err
585	}
586
587	return out, metadata, err
588}
589
590func awsAwsjson11_deserializeOpErrorCreateRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
591	var errorBuffer bytes.Buffer
592	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
593		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
594	}
595	errorBody := bytes.NewReader(errorBuffer.Bytes())
596
597	errorCode := "UnknownError"
598	errorMessage := errorCode
599
600	code := response.Header.Get("X-Amzn-ErrorType")
601	if len(code) != 0 {
602		errorCode = restjson.SanitizeErrorCode(code)
603	}
604
605	var buff [1024]byte
606	ringBuffer := smithyio.NewRingBuffer(buff[:])
607
608	body := io.TeeReader(errorBody, ringBuffer)
609	decoder := json.NewDecoder(body)
610	decoder.UseNumber()
611	code, message, err := restjson.GetErrorInfo(decoder)
612	if err != nil {
613		var snapshot bytes.Buffer
614		io.Copy(&snapshot, ringBuffer)
615		err = &smithy.DeserializationError{
616			Err:      fmt.Errorf("failed to decode response body, %w", err),
617			Snapshot: snapshot.Bytes(),
618		}
619		return err
620	}
621
622	errorBody.Seek(0, io.SeekStart)
623	if len(code) != 0 {
624		errorCode = restjson.SanitizeErrorCode(code)
625	}
626	if len(message) != 0 {
627		errorMessage = message
628	}
629
630	switch {
631	case strings.EqualFold("WAFDisallowedNameException", errorCode):
632		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
633
634	case strings.EqualFold("WAFInternalErrorException", errorCode):
635		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
636
637	case strings.EqualFold("WAFLimitsExceededException", errorCode):
638		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
639
640	case strings.EqualFold("WAFStaleDataException", errorCode):
641		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
642
643	default:
644		genericError := &smithy.GenericAPIError{
645			Code:    errorCode,
646			Message: errorMessage,
647		}
648		return genericError
649
650	}
651}
652
653type awsAwsjson11_deserializeOpCreateRegexPatternSet struct {
654}
655
656func (*awsAwsjson11_deserializeOpCreateRegexPatternSet) ID() string {
657	return "OperationDeserializer"
658}
659
660func (m *awsAwsjson11_deserializeOpCreateRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
661	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
662) {
663	out, metadata, err = next.HandleDeserialize(ctx, in)
664	if err != nil {
665		return out, metadata, err
666	}
667
668	response, ok := out.RawResponse.(*smithyhttp.Response)
669	if !ok {
670		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
671	}
672
673	if response.StatusCode < 200 || response.StatusCode >= 300 {
674		return out, metadata, awsAwsjson11_deserializeOpErrorCreateRegexPatternSet(response, &metadata)
675	}
676	output := &CreateRegexPatternSetOutput{}
677	out.Result = output
678
679	var buff [1024]byte
680	ringBuffer := smithyio.NewRingBuffer(buff[:])
681
682	body := io.TeeReader(response.Body, ringBuffer)
683	decoder := json.NewDecoder(body)
684	decoder.UseNumber()
685	var shape interface{}
686	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
687		var snapshot bytes.Buffer
688		io.Copy(&snapshot, ringBuffer)
689		err = &smithy.DeserializationError{
690			Err:      fmt.Errorf("failed to decode response body, %w", err),
691			Snapshot: snapshot.Bytes(),
692		}
693		return out, metadata, err
694	}
695
696	err = awsAwsjson11_deserializeOpDocumentCreateRegexPatternSetOutput(&output, shape)
697	if err != nil {
698		var snapshot bytes.Buffer
699		io.Copy(&snapshot, ringBuffer)
700		err = &smithy.DeserializationError{
701			Err:      fmt.Errorf("failed to decode response body, %w", err),
702			Snapshot: snapshot.Bytes(),
703		}
704		return out, metadata, err
705	}
706
707	return out, metadata, err
708}
709
710func awsAwsjson11_deserializeOpErrorCreateRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
711	var errorBuffer bytes.Buffer
712	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
713		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
714	}
715	errorBody := bytes.NewReader(errorBuffer.Bytes())
716
717	errorCode := "UnknownError"
718	errorMessage := errorCode
719
720	code := response.Header.Get("X-Amzn-ErrorType")
721	if len(code) != 0 {
722		errorCode = restjson.SanitizeErrorCode(code)
723	}
724
725	var buff [1024]byte
726	ringBuffer := smithyio.NewRingBuffer(buff[:])
727
728	body := io.TeeReader(errorBody, ringBuffer)
729	decoder := json.NewDecoder(body)
730	decoder.UseNumber()
731	code, message, err := restjson.GetErrorInfo(decoder)
732	if err != nil {
733		var snapshot bytes.Buffer
734		io.Copy(&snapshot, ringBuffer)
735		err = &smithy.DeserializationError{
736			Err:      fmt.Errorf("failed to decode response body, %w", err),
737			Snapshot: snapshot.Bytes(),
738		}
739		return err
740	}
741
742	errorBody.Seek(0, io.SeekStart)
743	if len(code) != 0 {
744		errorCode = restjson.SanitizeErrorCode(code)
745	}
746	if len(message) != 0 {
747		errorMessage = message
748	}
749
750	switch {
751	case strings.EqualFold("WAFDisallowedNameException", errorCode):
752		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
753
754	case strings.EqualFold("WAFInternalErrorException", errorCode):
755		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
756
757	case strings.EqualFold("WAFLimitsExceededException", errorCode):
758		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
759
760	case strings.EqualFold("WAFStaleDataException", errorCode):
761		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
762
763	default:
764		genericError := &smithy.GenericAPIError{
765			Code:    errorCode,
766			Message: errorMessage,
767		}
768		return genericError
769
770	}
771}
772
773type awsAwsjson11_deserializeOpCreateRule struct {
774}
775
776func (*awsAwsjson11_deserializeOpCreateRule) ID() string {
777	return "OperationDeserializer"
778}
779
780func (m *awsAwsjson11_deserializeOpCreateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
781	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
782) {
783	out, metadata, err = next.HandleDeserialize(ctx, in)
784	if err != nil {
785		return out, metadata, err
786	}
787
788	response, ok := out.RawResponse.(*smithyhttp.Response)
789	if !ok {
790		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
791	}
792
793	if response.StatusCode < 200 || response.StatusCode >= 300 {
794		return out, metadata, awsAwsjson11_deserializeOpErrorCreateRule(response, &metadata)
795	}
796	output := &CreateRuleOutput{}
797	out.Result = output
798
799	var buff [1024]byte
800	ringBuffer := smithyio.NewRingBuffer(buff[:])
801
802	body := io.TeeReader(response.Body, ringBuffer)
803	decoder := json.NewDecoder(body)
804	decoder.UseNumber()
805	var shape interface{}
806	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
807		var snapshot bytes.Buffer
808		io.Copy(&snapshot, ringBuffer)
809		err = &smithy.DeserializationError{
810			Err:      fmt.Errorf("failed to decode response body, %w", err),
811			Snapshot: snapshot.Bytes(),
812		}
813		return out, metadata, err
814	}
815
816	err = awsAwsjson11_deserializeOpDocumentCreateRuleOutput(&output, shape)
817	if err != nil {
818		var snapshot bytes.Buffer
819		io.Copy(&snapshot, ringBuffer)
820		err = &smithy.DeserializationError{
821			Err:      fmt.Errorf("failed to decode response body, %w", err),
822			Snapshot: snapshot.Bytes(),
823		}
824		return out, metadata, err
825	}
826
827	return out, metadata, err
828}
829
830func awsAwsjson11_deserializeOpErrorCreateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
831	var errorBuffer bytes.Buffer
832	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
833		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
834	}
835	errorBody := bytes.NewReader(errorBuffer.Bytes())
836
837	errorCode := "UnknownError"
838	errorMessage := errorCode
839
840	code := response.Header.Get("X-Amzn-ErrorType")
841	if len(code) != 0 {
842		errorCode = restjson.SanitizeErrorCode(code)
843	}
844
845	var buff [1024]byte
846	ringBuffer := smithyio.NewRingBuffer(buff[:])
847
848	body := io.TeeReader(errorBody, ringBuffer)
849	decoder := json.NewDecoder(body)
850	decoder.UseNumber()
851	code, message, err := restjson.GetErrorInfo(decoder)
852	if err != nil {
853		var snapshot bytes.Buffer
854		io.Copy(&snapshot, ringBuffer)
855		err = &smithy.DeserializationError{
856			Err:      fmt.Errorf("failed to decode response body, %w", err),
857			Snapshot: snapshot.Bytes(),
858		}
859		return err
860	}
861
862	errorBody.Seek(0, io.SeekStart)
863	if len(code) != 0 {
864		errorCode = restjson.SanitizeErrorCode(code)
865	}
866	if len(message) != 0 {
867		errorMessage = message
868	}
869
870	switch {
871	case strings.EqualFold("WAFBadRequestException", errorCode):
872		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
873
874	case strings.EqualFold("WAFDisallowedNameException", errorCode):
875		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
876
877	case strings.EqualFold("WAFInternalErrorException", errorCode):
878		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
879
880	case strings.EqualFold("WAFInvalidParameterException", errorCode):
881		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
882
883	case strings.EqualFold("WAFLimitsExceededException", errorCode):
884		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
885
886	case strings.EqualFold("WAFStaleDataException", errorCode):
887		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
888
889	case strings.EqualFold("WAFTagOperationException", errorCode):
890		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
891
892	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
893		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
894
895	default:
896		genericError := &smithy.GenericAPIError{
897			Code:    errorCode,
898			Message: errorMessage,
899		}
900		return genericError
901
902	}
903}
904
905type awsAwsjson11_deserializeOpCreateRuleGroup struct {
906}
907
908func (*awsAwsjson11_deserializeOpCreateRuleGroup) ID() string {
909	return "OperationDeserializer"
910}
911
912func (m *awsAwsjson11_deserializeOpCreateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
913	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
914) {
915	out, metadata, err = next.HandleDeserialize(ctx, in)
916	if err != nil {
917		return out, metadata, err
918	}
919
920	response, ok := out.RawResponse.(*smithyhttp.Response)
921	if !ok {
922		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
923	}
924
925	if response.StatusCode < 200 || response.StatusCode >= 300 {
926		return out, metadata, awsAwsjson11_deserializeOpErrorCreateRuleGroup(response, &metadata)
927	}
928	output := &CreateRuleGroupOutput{}
929	out.Result = output
930
931	var buff [1024]byte
932	ringBuffer := smithyio.NewRingBuffer(buff[:])
933
934	body := io.TeeReader(response.Body, ringBuffer)
935	decoder := json.NewDecoder(body)
936	decoder.UseNumber()
937	var shape interface{}
938	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
939		var snapshot bytes.Buffer
940		io.Copy(&snapshot, ringBuffer)
941		err = &smithy.DeserializationError{
942			Err:      fmt.Errorf("failed to decode response body, %w", err),
943			Snapshot: snapshot.Bytes(),
944		}
945		return out, metadata, err
946	}
947
948	err = awsAwsjson11_deserializeOpDocumentCreateRuleGroupOutput(&output, shape)
949	if err != nil {
950		var snapshot bytes.Buffer
951		io.Copy(&snapshot, ringBuffer)
952		err = &smithy.DeserializationError{
953			Err:      fmt.Errorf("failed to decode response body, %w", err),
954			Snapshot: snapshot.Bytes(),
955		}
956		return out, metadata, err
957	}
958
959	return out, metadata, err
960}
961
962func awsAwsjson11_deserializeOpErrorCreateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
963	var errorBuffer bytes.Buffer
964	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
965		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
966	}
967	errorBody := bytes.NewReader(errorBuffer.Bytes())
968
969	errorCode := "UnknownError"
970	errorMessage := errorCode
971
972	code := response.Header.Get("X-Amzn-ErrorType")
973	if len(code) != 0 {
974		errorCode = restjson.SanitizeErrorCode(code)
975	}
976
977	var buff [1024]byte
978	ringBuffer := smithyio.NewRingBuffer(buff[:])
979
980	body := io.TeeReader(errorBody, ringBuffer)
981	decoder := json.NewDecoder(body)
982	decoder.UseNumber()
983	code, message, err := restjson.GetErrorInfo(decoder)
984	if err != nil {
985		var snapshot bytes.Buffer
986		io.Copy(&snapshot, ringBuffer)
987		err = &smithy.DeserializationError{
988			Err:      fmt.Errorf("failed to decode response body, %w", err),
989			Snapshot: snapshot.Bytes(),
990		}
991		return err
992	}
993
994	errorBody.Seek(0, io.SeekStart)
995	if len(code) != 0 {
996		errorCode = restjson.SanitizeErrorCode(code)
997	}
998	if len(message) != 0 {
999		errorMessage = message
1000	}
1001
1002	switch {
1003	case strings.EqualFold("WAFBadRequestException", errorCode):
1004		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
1005
1006	case strings.EqualFold("WAFDisallowedNameException", errorCode):
1007		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
1008
1009	case strings.EqualFold("WAFInternalErrorException", errorCode):
1010		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1011
1012	case strings.EqualFold("WAFLimitsExceededException", errorCode):
1013		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
1014
1015	case strings.EqualFold("WAFStaleDataException", errorCode):
1016		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1017
1018	case strings.EqualFold("WAFTagOperationException", errorCode):
1019		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
1020
1021	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
1022		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
1023
1024	default:
1025		genericError := &smithy.GenericAPIError{
1026			Code:    errorCode,
1027			Message: errorMessage,
1028		}
1029		return genericError
1030
1031	}
1032}
1033
1034type awsAwsjson11_deserializeOpCreateSizeConstraintSet struct {
1035}
1036
1037func (*awsAwsjson11_deserializeOpCreateSizeConstraintSet) ID() string {
1038	return "OperationDeserializer"
1039}
1040
1041func (m *awsAwsjson11_deserializeOpCreateSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1042	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1043) {
1044	out, metadata, err = next.HandleDeserialize(ctx, in)
1045	if err != nil {
1046		return out, metadata, err
1047	}
1048
1049	response, ok := out.RawResponse.(*smithyhttp.Response)
1050	if !ok {
1051		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1052	}
1053
1054	if response.StatusCode < 200 || response.StatusCode >= 300 {
1055		return out, metadata, awsAwsjson11_deserializeOpErrorCreateSizeConstraintSet(response, &metadata)
1056	}
1057	output := &CreateSizeConstraintSetOutput{}
1058	out.Result = output
1059
1060	var buff [1024]byte
1061	ringBuffer := smithyio.NewRingBuffer(buff[:])
1062
1063	body := io.TeeReader(response.Body, ringBuffer)
1064	decoder := json.NewDecoder(body)
1065	decoder.UseNumber()
1066	var shape interface{}
1067	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1068		var snapshot bytes.Buffer
1069		io.Copy(&snapshot, ringBuffer)
1070		err = &smithy.DeserializationError{
1071			Err:      fmt.Errorf("failed to decode response body, %w", err),
1072			Snapshot: snapshot.Bytes(),
1073		}
1074		return out, metadata, err
1075	}
1076
1077	err = awsAwsjson11_deserializeOpDocumentCreateSizeConstraintSetOutput(&output, shape)
1078	if err != nil {
1079		var snapshot bytes.Buffer
1080		io.Copy(&snapshot, ringBuffer)
1081		err = &smithy.DeserializationError{
1082			Err:      fmt.Errorf("failed to decode response body, %w", err),
1083			Snapshot: snapshot.Bytes(),
1084		}
1085		return out, metadata, err
1086	}
1087
1088	return out, metadata, err
1089}
1090
1091func awsAwsjson11_deserializeOpErrorCreateSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1092	var errorBuffer bytes.Buffer
1093	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1094		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1095	}
1096	errorBody := bytes.NewReader(errorBuffer.Bytes())
1097
1098	errorCode := "UnknownError"
1099	errorMessage := errorCode
1100
1101	code := response.Header.Get("X-Amzn-ErrorType")
1102	if len(code) != 0 {
1103		errorCode = restjson.SanitizeErrorCode(code)
1104	}
1105
1106	var buff [1024]byte
1107	ringBuffer := smithyio.NewRingBuffer(buff[:])
1108
1109	body := io.TeeReader(errorBody, ringBuffer)
1110	decoder := json.NewDecoder(body)
1111	decoder.UseNumber()
1112	code, message, err := restjson.GetErrorInfo(decoder)
1113	if err != nil {
1114		var snapshot bytes.Buffer
1115		io.Copy(&snapshot, ringBuffer)
1116		err = &smithy.DeserializationError{
1117			Err:      fmt.Errorf("failed to decode response body, %w", err),
1118			Snapshot: snapshot.Bytes(),
1119		}
1120		return err
1121	}
1122
1123	errorBody.Seek(0, io.SeekStart)
1124	if len(code) != 0 {
1125		errorCode = restjson.SanitizeErrorCode(code)
1126	}
1127	if len(message) != 0 {
1128		errorMessage = message
1129	}
1130
1131	switch {
1132	case strings.EqualFold("WAFDisallowedNameException", errorCode):
1133		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
1134
1135	case strings.EqualFold("WAFInternalErrorException", errorCode):
1136		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1137
1138	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1139		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1140
1141	case strings.EqualFold("WAFInvalidParameterException", errorCode):
1142		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
1143
1144	case strings.EqualFold("WAFLimitsExceededException", errorCode):
1145		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
1146
1147	case strings.EqualFold("WAFStaleDataException", errorCode):
1148		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1149
1150	default:
1151		genericError := &smithy.GenericAPIError{
1152			Code:    errorCode,
1153			Message: errorMessage,
1154		}
1155		return genericError
1156
1157	}
1158}
1159
1160type awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet struct {
1161}
1162
1163func (*awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet) ID() string {
1164	return "OperationDeserializer"
1165}
1166
1167func (m *awsAwsjson11_deserializeOpCreateSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1168	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1169) {
1170	out, metadata, err = next.HandleDeserialize(ctx, in)
1171	if err != nil {
1172		return out, metadata, err
1173	}
1174
1175	response, ok := out.RawResponse.(*smithyhttp.Response)
1176	if !ok {
1177		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1178	}
1179
1180	if response.StatusCode < 200 || response.StatusCode >= 300 {
1181		return out, metadata, awsAwsjson11_deserializeOpErrorCreateSqlInjectionMatchSet(response, &metadata)
1182	}
1183	output := &CreateSqlInjectionMatchSetOutput{}
1184	out.Result = output
1185
1186	var buff [1024]byte
1187	ringBuffer := smithyio.NewRingBuffer(buff[:])
1188
1189	body := io.TeeReader(response.Body, ringBuffer)
1190	decoder := json.NewDecoder(body)
1191	decoder.UseNumber()
1192	var shape interface{}
1193	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1194		var snapshot bytes.Buffer
1195		io.Copy(&snapshot, ringBuffer)
1196		err = &smithy.DeserializationError{
1197			Err:      fmt.Errorf("failed to decode response body, %w", err),
1198			Snapshot: snapshot.Bytes(),
1199		}
1200		return out, metadata, err
1201	}
1202
1203	err = awsAwsjson11_deserializeOpDocumentCreateSqlInjectionMatchSetOutput(&output, shape)
1204	if err != nil {
1205		var snapshot bytes.Buffer
1206		io.Copy(&snapshot, ringBuffer)
1207		err = &smithy.DeserializationError{
1208			Err:      fmt.Errorf("failed to decode response body, %w", err),
1209			Snapshot: snapshot.Bytes(),
1210		}
1211		return out, metadata, err
1212	}
1213
1214	return out, metadata, err
1215}
1216
1217func awsAwsjson11_deserializeOpErrorCreateSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1218	var errorBuffer bytes.Buffer
1219	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1220		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1221	}
1222	errorBody := bytes.NewReader(errorBuffer.Bytes())
1223
1224	errorCode := "UnknownError"
1225	errorMessage := errorCode
1226
1227	code := response.Header.Get("X-Amzn-ErrorType")
1228	if len(code) != 0 {
1229		errorCode = restjson.SanitizeErrorCode(code)
1230	}
1231
1232	var buff [1024]byte
1233	ringBuffer := smithyio.NewRingBuffer(buff[:])
1234
1235	body := io.TeeReader(errorBody, ringBuffer)
1236	decoder := json.NewDecoder(body)
1237	decoder.UseNumber()
1238	code, message, err := restjson.GetErrorInfo(decoder)
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 err
1247	}
1248
1249	errorBody.Seek(0, io.SeekStart)
1250	if len(code) != 0 {
1251		errorCode = restjson.SanitizeErrorCode(code)
1252	}
1253	if len(message) != 0 {
1254		errorMessage = message
1255	}
1256
1257	switch {
1258	case strings.EqualFold("WAFDisallowedNameException", errorCode):
1259		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
1260
1261	case strings.EqualFold("WAFInternalErrorException", errorCode):
1262		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1263
1264	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1265		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1266
1267	case strings.EqualFold("WAFInvalidParameterException", errorCode):
1268		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
1269
1270	case strings.EqualFold("WAFLimitsExceededException", errorCode):
1271		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
1272
1273	case strings.EqualFold("WAFStaleDataException", errorCode):
1274		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1275
1276	default:
1277		genericError := &smithy.GenericAPIError{
1278			Code:    errorCode,
1279			Message: errorMessage,
1280		}
1281		return genericError
1282
1283	}
1284}
1285
1286type awsAwsjson11_deserializeOpCreateWebACL struct {
1287}
1288
1289func (*awsAwsjson11_deserializeOpCreateWebACL) ID() string {
1290	return "OperationDeserializer"
1291}
1292
1293func (m *awsAwsjson11_deserializeOpCreateWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1294	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1295) {
1296	out, metadata, err = next.HandleDeserialize(ctx, in)
1297	if err != nil {
1298		return out, metadata, err
1299	}
1300
1301	response, ok := out.RawResponse.(*smithyhttp.Response)
1302	if !ok {
1303		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1304	}
1305
1306	if response.StatusCode < 200 || response.StatusCode >= 300 {
1307		return out, metadata, awsAwsjson11_deserializeOpErrorCreateWebACL(response, &metadata)
1308	}
1309	output := &CreateWebACLOutput{}
1310	out.Result = output
1311
1312	var buff [1024]byte
1313	ringBuffer := smithyio.NewRingBuffer(buff[:])
1314
1315	body := io.TeeReader(response.Body, ringBuffer)
1316	decoder := json.NewDecoder(body)
1317	decoder.UseNumber()
1318	var shape interface{}
1319	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1320		var snapshot bytes.Buffer
1321		io.Copy(&snapshot, ringBuffer)
1322		err = &smithy.DeserializationError{
1323			Err:      fmt.Errorf("failed to decode response body, %w", err),
1324			Snapshot: snapshot.Bytes(),
1325		}
1326		return out, metadata, err
1327	}
1328
1329	err = awsAwsjson11_deserializeOpDocumentCreateWebACLOutput(&output, shape)
1330	if err != nil {
1331		var snapshot bytes.Buffer
1332		io.Copy(&snapshot, ringBuffer)
1333		err = &smithy.DeserializationError{
1334			Err:      fmt.Errorf("failed to decode response body, %w", err),
1335			Snapshot: snapshot.Bytes(),
1336		}
1337		return out, metadata, err
1338	}
1339
1340	return out, metadata, err
1341}
1342
1343func awsAwsjson11_deserializeOpErrorCreateWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1344	var errorBuffer bytes.Buffer
1345	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1346		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1347	}
1348	errorBody := bytes.NewReader(errorBuffer.Bytes())
1349
1350	errorCode := "UnknownError"
1351	errorMessage := errorCode
1352
1353	code := response.Header.Get("X-Amzn-ErrorType")
1354	if len(code) != 0 {
1355		errorCode = restjson.SanitizeErrorCode(code)
1356	}
1357
1358	var buff [1024]byte
1359	ringBuffer := smithyio.NewRingBuffer(buff[:])
1360
1361	body := io.TeeReader(errorBody, ringBuffer)
1362	decoder := json.NewDecoder(body)
1363	decoder.UseNumber()
1364	code, message, err := restjson.GetErrorInfo(decoder)
1365	if err != nil {
1366		var snapshot bytes.Buffer
1367		io.Copy(&snapshot, ringBuffer)
1368		err = &smithy.DeserializationError{
1369			Err:      fmt.Errorf("failed to decode response body, %w", err),
1370			Snapshot: snapshot.Bytes(),
1371		}
1372		return err
1373	}
1374
1375	errorBody.Seek(0, io.SeekStart)
1376	if len(code) != 0 {
1377		errorCode = restjson.SanitizeErrorCode(code)
1378	}
1379	if len(message) != 0 {
1380		errorMessage = message
1381	}
1382
1383	switch {
1384	case strings.EqualFold("WAFBadRequestException", errorCode):
1385		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
1386
1387	case strings.EqualFold("WAFDisallowedNameException", errorCode):
1388		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
1389
1390	case strings.EqualFold("WAFInternalErrorException", errorCode):
1391		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1392
1393	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1394		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1395
1396	case strings.EqualFold("WAFInvalidParameterException", errorCode):
1397		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
1398
1399	case strings.EqualFold("WAFLimitsExceededException", errorCode):
1400		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
1401
1402	case strings.EqualFold("WAFStaleDataException", errorCode):
1403		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1404
1405	case strings.EqualFold("WAFTagOperationException", errorCode):
1406		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
1407
1408	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
1409		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
1410
1411	default:
1412		genericError := &smithy.GenericAPIError{
1413			Code:    errorCode,
1414			Message: errorMessage,
1415		}
1416		return genericError
1417
1418	}
1419}
1420
1421type awsAwsjson11_deserializeOpCreateWebACLMigrationStack struct {
1422}
1423
1424func (*awsAwsjson11_deserializeOpCreateWebACLMigrationStack) ID() string {
1425	return "OperationDeserializer"
1426}
1427
1428func (m *awsAwsjson11_deserializeOpCreateWebACLMigrationStack) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1429	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1430) {
1431	out, metadata, err = next.HandleDeserialize(ctx, in)
1432	if err != nil {
1433		return out, metadata, err
1434	}
1435
1436	response, ok := out.RawResponse.(*smithyhttp.Response)
1437	if !ok {
1438		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1439	}
1440
1441	if response.StatusCode < 200 || response.StatusCode >= 300 {
1442		return out, metadata, awsAwsjson11_deserializeOpErrorCreateWebACLMigrationStack(response, &metadata)
1443	}
1444	output := &CreateWebACLMigrationStackOutput{}
1445	out.Result = output
1446
1447	var buff [1024]byte
1448	ringBuffer := smithyio.NewRingBuffer(buff[:])
1449
1450	body := io.TeeReader(response.Body, ringBuffer)
1451	decoder := json.NewDecoder(body)
1452	decoder.UseNumber()
1453	var shape interface{}
1454	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1455		var snapshot bytes.Buffer
1456		io.Copy(&snapshot, ringBuffer)
1457		err = &smithy.DeserializationError{
1458			Err:      fmt.Errorf("failed to decode response body, %w", err),
1459			Snapshot: snapshot.Bytes(),
1460		}
1461		return out, metadata, err
1462	}
1463
1464	err = awsAwsjson11_deserializeOpDocumentCreateWebACLMigrationStackOutput(&output, shape)
1465	if err != nil {
1466		var snapshot bytes.Buffer
1467		io.Copy(&snapshot, ringBuffer)
1468		err = &smithy.DeserializationError{
1469			Err:      fmt.Errorf("failed to decode response body, %w", err),
1470			Snapshot: snapshot.Bytes(),
1471		}
1472		return out, metadata, err
1473	}
1474
1475	return out, metadata, err
1476}
1477
1478func awsAwsjson11_deserializeOpErrorCreateWebACLMigrationStack(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1479	var errorBuffer bytes.Buffer
1480	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1481		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1482	}
1483	errorBody := bytes.NewReader(errorBuffer.Bytes())
1484
1485	errorCode := "UnknownError"
1486	errorMessage := errorCode
1487
1488	code := response.Header.Get("X-Amzn-ErrorType")
1489	if len(code) != 0 {
1490		errorCode = restjson.SanitizeErrorCode(code)
1491	}
1492
1493	var buff [1024]byte
1494	ringBuffer := smithyio.NewRingBuffer(buff[:])
1495
1496	body := io.TeeReader(errorBody, ringBuffer)
1497	decoder := json.NewDecoder(body)
1498	decoder.UseNumber()
1499	code, message, err := restjson.GetErrorInfo(decoder)
1500	if err != nil {
1501		var snapshot bytes.Buffer
1502		io.Copy(&snapshot, ringBuffer)
1503		err = &smithy.DeserializationError{
1504			Err:      fmt.Errorf("failed to decode response body, %w", err),
1505			Snapshot: snapshot.Bytes(),
1506		}
1507		return err
1508	}
1509
1510	errorBody.Seek(0, io.SeekStart)
1511	if len(code) != 0 {
1512		errorCode = restjson.SanitizeErrorCode(code)
1513	}
1514	if len(message) != 0 {
1515		errorMessage = message
1516	}
1517
1518	switch {
1519	case strings.EqualFold("WAFEntityMigrationException", errorCode):
1520		return awsAwsjson11_deserializeErrorWAFEntityMigrationException(response, errorBody)
1521
1522	case strings.EqualFold("WAFInternalErrorException", errorCode):
1523		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1524
1525	case strings.EqualFold("WAFInvalidOperationException", errorCode):
1526		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
1527
1528	case strings.EqualFold("WAFInvalidParameterException", errorCode):
1529		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
1530
1531	case strings.EqualFold("WAFNonexistentItemException", errorCode):
1532		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
1533
1534	default:
1535		genericError := &smithy.GenericAPIError{
1536			Code:    errorCode,
1537			Message: errorMessage,
1538		}
1539		return genericError
1540
1541	}
1542}
1543
1544type awsAwsjson11_deserializeOpCreateXssMatchSet struct {
1545}
1546
1547func (*awsAwsjson11_deserializeOpCreateXssMatchSet) ID() string {
1548	return "OperationDeserializer"
1549}
1550
1551func (m *awsAwsjson11_deserializeOpCreateXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1552	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1553) {
1554	out, metadata, err = next.HandleDeserialize(ctx, in)
1555	if err != nil {
1556		return out, metadata, err
1557	}
1558
1559	response, ok := out.RawResponse.(*smithyhttp.Response)
1560	if !ok {
1561		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1562	}
1563
1564	if response.StatusCode < 200 || response.StatusCode >= 300 {
1565		return out, metadata, awsAwsjson11_deserializeOpErrorCreateXssMatchSet(response, &metadata)
1566	}
1567	output := &CreateXssMatchSetOutput{}
1568	out.Result = output
1569
1570	var buff [1024]byte
1571	ringBuffer := smithyio.NewRingBuffer(buff[:])
1572
1573	body := io.TeeReader(response.Body, ringBuffer)
1574	decoder := json.NewDecoder(body)
1575	decoder.UseNumber()
1576	var shape interface{}
1577	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1578		var snapshot bytes.Buffer
1579		io.Copy(&snapshot, ringBuffer)
1580		err = &smithy.DeserializationError{
1581			Err:      fmt.Errorf("failed to decode response body, %w", err),
1582			Snapshot: snapshot.Bytes(),
1583		}
1584		return out, metadata, err
1585	}
1586
1587	err = awsAwsjson11_deserializeOpDocumentCreateXssMatchSetOutput(&output, shape)
1588	if err != nil {
1589		var snapshot bytes.Buffer
1590		io.Copy(&snapshot, ringBuffer)
1591		err = &smithy.DeserializationError{
1592			Err:      fmt.Errorf("failed to decode response body, %w", err),
1593			Snapshot: snapshot.Bytes(),
1594		}
1595		return out, metadata, err
1596	}
1597
1598	return out, metadata, err
1599}
1600
1601func awsAwsjson11_deserializeOpErrorCreateXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1602	var errorBuffer bytes.Buffer
1603	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1604		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1605	}
1606	errorBody := bytes.NewReader(errorBuffer.Bytes())
1607
1608	errorCode := "UnknownError"
1609	errorMessage := errorCode
1610
1611	code := response.Header.Get("X-Amzn-ErrorType")
1612	if len(code) != 0 {
1613		errorCode = restjson.SanitizeErrorCode(code)
1614	}
1615
1616	var buff [1024]byte
1617	ringBuffer := smithyio.NewRingBuffer(buff[:])
1618
1619	body := io.TeeReader(errorBody, ringBuffer)
1620	decoder := json.NewDecoder(body)
1621	decoder.UseNumber()
1622	code, message, err := restjson.GetErrorInfo(decoder)
1623	if err != nil {
1624		var snapshot bytes.Buffer
1625		io.Copy(&snapshot, ringBuffer)
1626		err = &smithy.DeserializationError{
1627			Err:      fmt.Errorf("failed to decode response body, %w", err),
1628			Snapshot: snapshot.Bytes(),
1629		}
1630		return err
1631	}
1632
1633	errorBody.Seek(0, io.SeekStart)
1634	if len(code) != 0 {
1635		errorCode = restjson.SanitizeErrorCode(code)
1636	}
1637	if len(message) != 0 {
1638		errorMessage = message
1639	}
1640
1641	switch {
1642	case strings.EqualFold("WAFDisallowedNameException", errorCode):
1643		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
1644
1645	case strings.EqualFold("WAFInternalErrorException", errorCode):
1646		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1647
1648	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1649		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1650
1651	case strings.EqualFold("WAFInvalidParameterException", errorCode):
1652		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
1653
1654	case strings.EqualFold("WAFLimitsExceededException", errorCode):
1655		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
1656
1657	case strings.EqualFold("WAFStaleDataException", errorCode):
1658		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1659
1660	default:
1661		genericError := &smithy.GenericAPIError{
1662			Code:    errorCode,
1663			Message: errorMessage,
1664		}
1665		return genericError
1666
1667	}
1668}
1669
1670type awsAwsjson11_deserializeOpDeleteByteMatchSet struct {
1671}
1672
1673func (*awsAwsjson11_deserializeOpDeleteByteMatchSet) ID() string {
1674	return "OperationDeserializer"
1675}
1676
1677func (m *awsAwsjson11_deserializeOpDeleteByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1678	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1679) {
1680	out, metadata, err = next.HandleDeserialize(ctx, in)
1681	if err != nil {
1682		return out, metadata, err
1683	}
1684
1685	response, ok := out.RawResponse.(*smithyhttp.Response)
1686	if !ok {
1687		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1688	}
1689
1690	if response.StatusCode < 200 || response.StatusCode >= 300 {
1691		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteByteMatchSet(response, &metadata)
1692	}
1693	output := &DeleteByteMatchSetOutput{}
1694	out.Result = output
1695
1696	var buff [1024]byte
1697	ringBuffer := smithyio.NewRingBuffer(buff[:])
1698
1699	body := io.TeeReader(response.Body, ringBuffer)
1700	decoder := json.NewDecoder(body)
1701	decoder.UseNumber()
1702	var shape interface{}
1703	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1704		var snapshot bytes.Buffer
1705		io.Copy(&snapshot, ringBuffer)
1706		err = &smithy.DeserializationError{
1707			Err:      fmt.Errorf("failed to decode response body, %w", err),
1708			Snapshot: snapshot.Bytes(),
1709		}
1710		return out, metadata, err
1711	}
1712
1713	err = awsAwsjson11_deserializeOpDocumentDeleteByteMatchSetOutput(&output, shape)
1714	if err != nil {
1715		var snapshot bytes.Buffer
1716		io.Copy(&snapshot, ringBuffer)
1717		err = &smithy.DeserializationError{
1718			Err:      fmt.Errorf("failed to decode response body, %w", err),
1719			Snapshot: snapshot.Bytes(),
1720		}
1721		return out, metadata, err
1722	}
1723
1724	return out, metadata, err
1725}
1726
1727func awsAwsjson11_deserializeOpErrorDeleteByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1728	var errorBuffer bytes.Buffer
1729	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1730		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1731	}
1732	errorBody := bytes.NewReader(errorBuffer.Bytes())
1733
1734	errorCode := "UnknownError"
1735	errorMessage := errorCode
1736
1737	code := response.Header.Get("X-Amzn-ErrorType")
1738	if len(code) != 0 {
1739		errorCode = restjson.SanitizeErrorCode(code)
1740	}
1741
1742	var buff [1024]byte
1743	ringBuffer := smithyio.NewRingBuffer(buff[:])
1744
1745	body := io.TeeReader(errorBody, ringBuffer)
1746	decoder := json.NewDecoder(body)
1747	decoder.UseNumber()
1748	code, message, err := restjson.GetErrorInfo(decoder)
1749	if err != nil {
1750		var snapshot bytes.Buffer
1751		io.Copy(&snapshot, ringBuffer)
1752		err = &smithy.DeserializationError{
1753			Err:      fmt.Errorf("failed to decode response body, %w", err),
1754			Snapshot: snapshot.Bytes(),
1755		}
1756		return err
1757	}
1758
1759	errorBody.Seek(0, io.SeekStart)
1760	if len(code) != 0 {
1761		errorCode = restjson.SanitizeErrorCode(code)
1762	}
1763	if len(message) != 0 {
1764		errorMessage = message
1765	}
1766
1767	switch {
1768	case strings.EqualFold("WAFInternalErrorException", errorCode):
1769		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1770
1771	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1772		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1773
1774	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
1775		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
1776
1777	case strings.EqualFold("WAFNonexistentItemException", errorCode):
1778		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
1779
1780	case strings.EqualFold("WAFReferencedItemException", errorCode):
1781		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
1782
1783	case strings.EqualFold("WAFStaleDataException", errorCode):
1784		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1785
1786	default:
1787		genericError := &smithy.GenericAPIError{
1788			Code:    errorCode,
1789			Message: errorMessage,
1790		}
1791		return genericError
1792
1793	}
1794}
1795
1796type awsAwsjson11_deserializeOpDeleteGeoMatchSet struct {
1797}
1798
1799func (*awsAwsjson11_deserializeOpDeleteGeoMatchSet) ID() string {
1800	return "OperationDeserializer"
1801}
1802
1803func (m *awsAwsjson11_deserializeOpDeleteGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1804	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1805) {
1806	out, metadata, err = next.HandleDeserialize(ctx, in)
1807	if err != nil {
1808		return out, metadata, err
1809	}
1810
1811	response, ok := out.RawResponse.(*smithyhttp.Response)
1812	if !ok {
1813		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1814	}
1815
1816	if response.StatusCode < 200 || response.StatusCode >= 300 {
1817		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteGeoMatchSet(response, &metadata)
1818	}
1819	output := &DeleteGeoMatchSetOutput{}
1820	out.Result = output
1821
1822	var buff [1024]byte
1823	ringBuffer := smithyio.NewRingBuffer(buff[:])
1824
1825	body := io.TeeReader(response.Body, ringBuffer)
1826	decoder := json.NewDecoder(body)
1827	decoder.UseNumber()
1828	var shape interface{}
1829	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1830		var snapshot bytes.Buffer
1831		io.Copy(&snapshot, ringBuffer)
1832		err = &smithy.DeserializationError{
1833			Err:      fmt.Errorf("failed to decode response body, %w", err),
1834			Snapshot: snapshot.Bytes(),
1835		}
1836		return out, metadata, err
1837	}
1838
1839	err = awsAwsjson11_deserializeOpDocumentDeleteGeoMatchSetOutput(&output, shape)
1840	if err != nil {
1841		var snapshot bytes.Buffer
1842		io.Copy(&snapshot, ringBuffer)
1843		err = &smithy.DeserializationError{
1844			Err:      fmt.Errorf("failed to decode response body, %w", err),
1845			Snapshot: snapshot.Bytes(),
1846		}
1847		return out, metadata, err
1848	}
1849
1850	return out, metadata, err
1851}
1852
1853func awsAwsjson11_deserializeOpErrorDeleteGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1854	var errorBuffer bytes.Buffer
1855	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1856		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1857	}
1858	errorBody := bytes.NewReader(errorBuffer.Bytes())
1859
1860	errorCode := "UnknownError"
1861	errorMessage := errorCode
1862
1863	code := response.Header.Get("X-Amzn-ErrorType")
1864	if len(code) != 0 {
1865		errorCode = restjson.SanitizeErrorCode(code)
1866	}
1867
1868	var buff [1024]byte
1869	ringBuffer := smithyio.NewRingBuffer(buff[:])
1870
1871	body := io.TeeReader(errorBody, ringBuffer)
1872	decoder := json.NewDecoder(body)
1873	decoder.UseNumber()
1874	code, message, err := restjson.GetErrorInfo(decoder)
1875	if err != nil {
1876		var snapshot bytes.Buffer
1877		io.Copy(&snapshot, ringBuffer)
1878		err = &smithy.DeserializationError{
1879			Err:      fmt.Errorf("failed to decode response body, %w", err),
1880			Snapshot: snapshot.Bytes(),
1881		}
1882		return err
1883	}
1884
1885	errorBody.Seek(0, io.SeekStart)
1886	if len(code) != 0 {
1887		errorCode = restjson.SanitizeErrorCode(code)
1888	}
1889	if len(message) != 0 {
1890		errorMessage = message
1891	}
1892
1893	switch {
1894	case strings.EqualFold("WAFInternalErrorException", errorCode):
1895		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
1896
1897	case strings.EqualFold("WAFInvalidAccountException", errorCode):
1898		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
1899
1900	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
1901		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
1902
1903	case strings.EqualFold("WAFNonexistentItemException", errorCode):
1904		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
1905
1906	case strings.EqualFold("WAFReferencedItemException", errorCode):
1907		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
1908
1909	case strings.EqualFold("WAFStaleDataException", errorCode):
1910		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
1911
1912	default:
1913		genericError := &smithy.GenericAPIError{
1914			Code:    errorCode,
1915			Message: errorMessage,
1916		}
1917		return genericError
1918
1919	}
1920}
1921
1922type awsAwsjson11_deserializeOpDeleteIPSet struct {
1923}
1924
1925func (*awsAwsjson11_deserializeOpDeleteIPSet) ID() string {
1926	return "OperationDeserializer"
1927}
1928
1929func (m *awsAwsjson11_deserializeOpDeleteIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1930	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1931) {
1932	out, metadata, err = next.HandleDeserialize(ctx, in)
1933	if err != nil {
1934		return out, metadata, err
1935	}
1936
1937	response, ok := out.RawResponse.(*smithyhttp.Response)
1938	if !ok {
1939		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1940	}
1941
1942	if response.StatusCode < 200 || response.StatusCode >= 300 {
1943		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIPSet(response, &metadata)
1944	}
1945	output := &DeleteIPSetOutput{}
1946	out.Result = output
1947
1948	var buff [1024]byte
1949	ringBuffer := smithyio.NewRingBuffer(buff[:])
1950
1951	body := io.TeeReader(response.Body, ringBuffer)
1952	decoder := json.NewDecoder(body)
1953	decoder.UseNumber()
1954	var shape interface{}
1955	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1956		var snapshot bytes.Buffer
1957		io.Copy(&snapshot, ringBuffer)
1958		err = &smithy.DeserializationError{
1959			Err:      fmt.Errorf("failed to decode response body, %w", err),
1960			Snapshot: snapshot.Bytes(),
1961		}
1962		return out, metadata, err
1963	}
1964
1965	err = awsAwsjson11_deserializeOpDocumentDeleteIPSetOutput(&output, shape)
1966	if err != nil {
1967		var snapshot bytes.Buffer
1968		io.Copy(&snapshot, ringBuffer)
1969		err = &smithy.DeserializationError{
1970			Err:      fmt.Errorf("failed to decode response body, %w", err),
1971			Snapshot: snapshot.Bytes(),
1972		}
1973		return out, metadata, err
1974	}
1975
1976	return out, metadata, err
1977}
1978
1979func awsAwsjson11_deserializeOpErrorDeleteIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1980	var errorBuffer bytes.Buffer
1981	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1982		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1983	}
1984	errorBody := bytes.NewReader(errorBuffer.Bytes())
1985
1986	errorCode := "UnknownError"
1987	errorMessage := errorCode
1988
1989	code := response.Header.Get("X-Amzn-ErrorType")
1990	if len(code) != 0 {
1991		errorCode = restjson.SanitizeErrorCode(code)
1992	}
1993
1994	var buff [1024]byte
1995	ringBuffer := smithyio.NewRingBuffer(buff[:])
1996
1997	body := io.TeeReader(errorBody, ringBuffer)
1998	decoder := json.NewDecoder(body)
1999	decoder.UseNumber()
2000	code, message, err := restjson.GetErrorInfo(decoder)
2001	if err != nil {
2002		var snapshot bytes.Buffer
2003		io.Copy(&snapshot, ringBuffer)
2004		err = &smithy.DeserializationError{
2005			Err:      fmt.Errorf("failed to decode response body, %w", err),
2006			Snapshot: snapshot.Bytes(),
2007		}
2008		return err
2009	}
2010
2011	errorBody.Seek(0, io.SeekStart)
2012	if len(code) != 0 {
2013		errorCode = restjson.SanitizeErrorCode(code)
2014	}
2015	if len(message) != 0 {
2016		errorMessage = message
2017	}
2018
2019	switch {
2020	case strings.EqualFold("WAFInternalErrorException", errorCode):
2021		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2022
2023	case strings.EqualFold("WAFInvalidAccountException", errorCode):
2024		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
2025
2026	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2027		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2028
2029	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2030		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2031
2032	case strings.EqualFold("WAFReferencedItemException", errorCode):
2033		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2034
2035	case strings.EqualFold("WAFStaleDataException", errorCode):
2036		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2037
2038	default:
2039		genericError := &smithy.GenericAPIError{
2040			Code:    errorCode,
2041			Message: errorMessage,
2042		}
2043		return genericError
2044
2045	}
2046}
2047
2048type awsAwsjson11_deserializeOpDeleteLoggingConfiguration struct {
2049}
2050
2051func (*awsAwsjson11_deserializeOpDeleteLoggingConfiguration) ID() string {
2052	return "OperationDeserializer"
2053}
2054
2055func (m *awsAwsjson11_deserializeOpDeleteLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2056	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2057) {
2058	out, metadata, err = next.HandleDeserialize(ctx, in)
2059	if err != nil {
2060		return out, metadata, err
2061	}
2062
2063	response, ok := out.RawResponse.(*smithyhttp.Response)
2064	if !ok {
2065		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2066	}
2067
2068	if response.StatusCode < 200 || response.StatusCode >= 300 {
2069		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLoggingConfiguration(response, &metadata)
2070	}
2071	output := &DeleteLoggingConfigurationOutput{}
2072	out.Result = output
2073
2074	var buff [1024]byte
2075	ringBuffer := smithyio.NewRingBuffer(buff[:])
2076
2077	body := io.TeeReader(response.Body, ringBuffer)
2078	decoder := json.NewDecoder(body)
2079	decoder.UseNumber()
2080	var shape interface{}
2081	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2082		var snapshot bytes.Buffer
2083		io.Copy(&snapshot, ringBuffer)
2084		err = &smithy.DeserializationError{
2085			Err:      fmt.Errorf("failed to decode response body, %w", err),
2086			Snapshot: snapshot.Bytes(),
2087		}
2088		return out, metadata, err
2089	}
2090
2091	err = awsAwsjson11_deserializeOpDocumentDeleteLoggingConfigurationOutput(&output, shape)
2092	if err != nil {
2093		var snapshot bytes.Buffer
2094		io.Copy(&snapshot, ringBuffer)
2095		err = &smithy.DeserializationError{
2096			Err:      fmt.Errorf("failed to decode response body, %w", err),
2097			Snapshot: snapshot.Bytes(),
2098		}
2099		return out, metadata, err
2100	}
2101
2102	return out, metadata, err
2103}
2104
2105func awsAwsjson11_deserializeOpErrorDeleteLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2106	var errorBuffer bytes.Buffer
2107	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2108		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2109	}
2110	errorBody := bytes.NewReader(errorBuffer.Bytes())
2111
2112	errorCode := "UnknownError"
2113	errorMessage := errorCode
2114
2115	code := response.Header.Get("X-Amzn-ErrorType")
2116	if len(code) != 0 {
2117		errorCode = restjson.SanitizeErrorCode(code)
2118	}
2119
2120	var buff [1024]byte
2121	ringBuffer := smithyio.NewRingBuffer(buff[:])
2122
2123	body := io.TeeReader(errorBody, ringBuffer)
2124	decoder := json.NewDecoder(body)
2125	decoder.UseNumber()
2126	code, message, err := restjson.GetErrorInfo(decoder)
2127	if err != nil {
2128		var snapshot bytes.Buffer
2129		io.Copy(&snapshot, ringBuffer)
2130		err = &smithy.DeserializationError{
2131			Err:      fmt.Errorf("failed to decode response body, %w", err),
2132			Snapshot: snapshot.Bytes(),
2133		}
2134		return err
2135	}
2136
2137	errorBody.Seek(0, io.SeekStart)
2138	if len(code) != 0 {
2139		errorCode = restjson.SanitizeErrorCode(code)
2140	}
2141	if len(message) != 0 {
2142		errorMessage = message
2143	}
2144
2145	switch {
2146	case strings.EqualFold("WAFInternalErrorException", errorCode):
2147		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2148
2149	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2150		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2151
2152	case strings.EqualFold("WAFStaleDataException", errorCode):
2153		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2154
2155	default:
2156		genericError := &smithy.GenericAPIError{
2157			Code:    errorCode,
2158			Message: errorMessage,
2159		}
2160		return genericError
2161
2162	}
2163}
2164
2165type awsAwsjson11_deserializeOpDeletePermissionPolicy struct {
2166}
2167
2168func (*awsAwsjson11_deserializeOpDeletePermissionPolicy) ID() string {
2169	return "OperationDeserializer"
2170}
2171
2172func (m *awsAwsjson11_deserializeOpDeletePermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2173	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2174) {
2175	out, metadata, err = next.HandleDeserialize(ctx, in)
2176	if err != nil {
2177		return out, metadata, err
2178	}
2179
2180	response, ok := out.RawResponse.(*smithyhttp.Response)
2181	if !ok {
2182		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2183	}
2184
2185	if response.StatusCode < 200 || response.StatusCode >= 300 {
2186		return out, metadata, awsAwsjson11_deserializeOpErrorDeletePermissionPolicy(response, &metadata)
2187	}
2188	output := &DeletePermissionPolicyOutput{}
2189	out.Result = output
2190
2191	var buff [1024]byte
2192	ringBuffer := smithyio.NewRingBuffer(buff[:])
2193
2194	body := io.TeeReader(response.Body, ringBuffer)
2195	decoder := json.NewDecoder(body)
2196	decoder.UseNumber()
2197	var shape interface{}
2198	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2199		var snapshot bytes.Buffer
2200		io.Copy(&snapshot, ringBuffer)
2201		err = &smithy.DeserializationError{
2202			Err:      fmt.Errorf("failed to decode response body, %w", err),
2203			Snapshot: snapshot.Bytes(),
2204		}
2205		return out, metadata, err
2206	}
2207
2208	err = awsAwsjson11_deserializeOpDocumentDeletePermissionPolicyOutput(&output, shape)
2209	if err != nil {
2210		var snapshot bytes.Buffer
2211		io.Copy(&snapshot, ringBuffer)
2212		err = &smithy.DeserializationError{
2213			Err:      fmt.Errorf("failed to decode response body, %w", err),
2214			Snapshot: snapshot.Bytes(),
2215		}
2216		return out, metadata, err
2217	}
2218
2219	return out, metadata, err
2220}
2221
2222func awsAwsjson11_deserializeOpErrorDeletePermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2223	var errorBuffer bytes.Buffer
2224	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2225		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2226	}
2227	errorBody := bytes.NewReader(errorBuffer.Bytes())
2228
2229	errorCode := "UnknownError"
2230	errorMessage := errorCode
2231
2232	code := response.Header.Get("X-Amzn-ErrorType")
2233	if len(code) != 0 {
2234		errorCode = restjson.SanitizeErrorCode(code)
2235	}
2236
2237	var buff [1024]byte
2238	ringBuffer := smithyio.NewRingBuffer(buff[:])
2239
2240	body := io.TeeReader(errorBody, ringBuffer)
2241	decoder := json.NewDecoder(body)
2242	decoder.UseNumber()
2243	code, message, err := restjson.GetErrorInfo(decoder)
2244	if err != nil {
2245		var snapshot bytes.Buffer
2246		io.Copy(&snapshot, ringBuffer)
2247		err = &smithy.DeserializationError{
2248			Err:      fmt.Errorf("failed to decode response body, %w", err),
2249			Snapshot: snapshot.Bytes(),
2250		}
2251		return err
2252	}
2253
2254	errorBody.Seek(0, io.SeekStart)
2255	if len(code) != 0 {
2256		errorCode = restjson.SanitizeErrorCode(code)
2257	}
2258	if len(message) != 0 {
2259		errorMessage = message
2260	}
2261
2262	switch {
2263	case strings.EqualFold("WAFInternalErrorException", errorCode):
2264		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2265
2266	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2267		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2268
2269	case strings.EqualFold("WAFStaleDataException", errorCode):
2270		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2271
2272	default:
2273		genericError := &smithy.GenericAPIError{
2274			Code:    errorCode,
2275			Message: errorMessage,
2276		}
2277		return genericError
2278
2279	}
2280}
2281
2282type awsAwsjson11_deserializeOpDeleteRateBasedRule struct {
2283}
2284
2285func (*awsAwsjson11_deserializeOpDeleteRateBasedRule) ID() string {
2286	return "OperationDeserializer"
2287}
2288
2289func (m *awsAwsjson11_deserializeOpDeleteRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2290	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2291) {
2292	out, metadata, err = next.HandleDeserialize(ctx, in)
2293	if err != nil {
2294		return out, metadata, err
2295	}
2296
2297	response, ok := out.RawResponse.(*smithyhttp.Response)
2298	if !ok {
2299		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2300	}
2301
2302	if response.StatusCode < 200 || response.StatusCode >= 300 {
2303		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRateBasedRule(response, &metadata)
2304	}
2305	output := &DeleteRateBasedRuleOutput{}
2306	out.Result = output
2307
2308	var buff [1024]byte
2309	ringBuffer := smithyio.NewRingBuffer(buff[:])
2310
2311	body := io.TeeReader(response.Body, ringBuffer)
2312	decoder := json.NewDecoder(body)
2313	decoder.UseNumber()
2314	var shape interface{}
2315	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2316		var snapshot bytes.Buffer
2317		io.Copy(&snapshot, ringBuffer)
2318		err = &smithy.DeserializationError{
2319			Err:      fmt.Errorf("failed to decode response body, %w", err),
2320			Snapshot: snapshot.Bytes(),
2321		}
2322		return out, metadata, err
2323	}
2324
2325	err = awsAwsjson11_deserializeOpDocumentDeleteRateBasedRuleOutput(&output, shape)
2326	if err != nil {
2327		var snapshot bytes.Buffer
2328		io.Copy(&snapshot, ringBuffer)
2329		err = &smithy.DeserializationError{
2330			Err:      fmt.Errorf("failed to decode response body, %w", err),
2331			Snapshot: snapshot.Bytes(),
2332		}
2333		return out, metadata, err
2334	}
2335
2336	return out, metadata, err
2337}
2338
2339func awsAwsjson11_deserializeOpErrorDeleteRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2340	var errorBuffer bytes.Buffer
2341	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2342		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2343	}
2344	errorBody := bytes.NewReader(errorBuffer.Bytes())
2345
2346	errorCode := "UnknownError"
2347	errorMessage := errorCode
2348
2349	code := response.Header.Get("X-Amzn-ErrorType")
2350	if len(code) != 0 {
2351		errorCode = restjson.SanitizeErrorCode(code)
2352	}
2353
2354	var buff [1024]byte
2355	ringBuffer := smithyio.NewRingBuffer(buff[:])
2356
2357	body := io.TeeReader(errorBody, ringBuffer)
2358	decoder := json.NewDecoder(body)
2359	decoder.UseNumber()
2360	code, message, err := restjson.GetErrorInfo(decoder)
2361	if err != nil {
2362		var snapshot bytes.Buffer
2363		io.Copy(&snapshot, ringBuffer)
2364		err = &smithy.DeserializationError{
2365			Err:      fmt.Errorf("failed to decode response body, %w", err),
2366			Snapshot: snapshot.Bytes(),
2367		}
2368		return err
2369	}
2370
2371	errorBody.Seek(0, io.SeekStart)
2372	if len(code) != 0 {
2373		errorCode = restjson.SanitizeErrorCode(code)
2374	}
2375	if len(message) != 0 {
2376		errorMessage = message
2377	}
2378
2379	switch {
2380	case strings.EqualFold("WAFInternalErrorException", errorCode):
2381		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2382
2383	case strings.EqualFold("WAFInvalidAccountException", errorCode):
2384		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
2385
2386	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2387		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2388
2389	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2390		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2391
2392	case strings.EqualFold("WAFReferencedItemException", errorCode):
2393		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2394
2395	case strings.EqualFold("WAFStaleDataException", errorCode):
2396		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2397
2398	case strings.EqualFold("WAFTagOperationException", errorCode):
2399		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
2400
2401	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
2402		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
2403
2404	default:
2405		genericError := &smithy.GenericAPIError{
2406			Code:    errorCode,
2407			Message: errorMessage,
2408		}
2409		return genericError
2410
2411	}
2412}
2413
2414type awsAwsjson11_deserializeOpDeleteRegexMatchSet struct {
2415}
2416
2417func (*awsAwsjson11_deserializeOpDeleteRegexMatchSet) ID() string {
2418	return "OperationDeserializer"
2419}
2420
2421func (m *awsAwsjson11_deserializeOpDeleteRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2422	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2423) {
2424	out, metadata, err = next.HandleDeserialize(ctx, in)
2425	if err != nil {
2426		return out, metadata, err
2427	}
2428
2429	response, ok := out.RawResponse.(*smithyhttp.Response)
2430	if !ok {
2431		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2432	}
2433
2434	if response.StatusCode < 200 || response.StatusCode >= 300 {
2435		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegexMatchSet(response, &metadata)
2436	}
2437	output := &DeleteRegexMatchSetOutput{}
2438	out.Result = output
2439
2440	var buff [1024]byte
2441	ringBuffer := smithyio.NewRingBuffer(buff[:])
2442
2443	body := io.TeeReader(response.Body, ringBuffer)
2444	decoder := json.NewDecoder(body)
2445	decoder.UseNumber()
2446	var shape interface{}
2447	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2448		var snapshot bytes.Buffer
2449		io.Copy(&snapshot, ringBuffer)
2450		err = &smithy.DeserializationError{
2451			Err:      fmt.Errorf("failed to decode response body, %w", err),
2452			Snapshot: snapshot.Bytes(),
2453		}
2454		return out, metadata, err
2455	}
2456
2457	err = awsAwsjson11_deserializeOpDocumentDeleteRegexMatchSetOutput(&output, shape)
2458	if err != nil {
2459		var snapshot bytes.Buffer
2460		io.Copy(&snapshot, ringBuffer)
2461		err = &smithy.DeserializationError{
2462			Err:      fmt.Errorf("failed to decode response body, %w", err),
2463			Snapshot: snapshot.Bytes(),
2464		}
2465		return out, metadata, err
2466	}
2467
2468	return out, metadata, err
2469}
2470
2471func awsAwsjson11_deserializeOpErrorDeleteRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2472	var errorBuffer bytes.Buffer
2473	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2474		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2475	}
2476	errorBody := bytes.NewReader(errorBuffer.Bytes())
2477
2478	errorCode := "UnknownError"
2479	errorMessage := errorCode
2480
2481	code := response.Header.Get("X-Amzn-ErrorType")
2482	if len(code) != 0 {
2483		errorCode = restjson.SanitizeErrorCode(code)
2484	}
2485
2486	var buff [1024]byte
2487	ringBuffer := smithyio.NewRingBuffer(buff[:])
2488
2489	body := io.TeeReader(errorBody, ringBuffer)
2490	decoder := json.NewDecoder(body)
2491	decoder.UseNumber()
2492	code, message, err := restjson.GetErrorInfo(decoder)
2493	if err != nil {
2494		var snapshot bytes.Buffer
2495		io.Copy(&snapshot, ringBuffer)
2496		err = &smithy.DeserializationError{
2497			Err:      fmt.Errorf("failed to decode response body, %w", err),
2498			Snapshot: snapshot.Bytes(),
2499		}
2500		return err
2501	}
2502
2503	errorBody.Seek(0, io.SeekStart)
2504	if len(code) != 0 {
2505		errorCode = restjson.SanitizeErrorCode(code)
2506	}
2507	if len(message) != 0 {
2508		errorMessage = message
2509	}
2510
2511	switch {
2512	case strings.EqualFold("WAFInternalErrorException", errorCode):
2513		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2514
2515	case strings.EqualFold("WAFInvalidAccountException", errorCode):
2516		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
2517
2518	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2519		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2520
2521	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2522		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2523
2524	case strings.EqualFold("WAFReferencedItemException", errorCode):
2525		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2526
2527	case strings.EqualFold("WAFStaleDataException", errorCode):
2528		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2529
2530	default:
2531		genericError := &smithy.GenericAPIError{
2532			Code:    errorCode,
2533			Message: errorMessage,
2534		}
2535		return genericError
2536
2537	}
2538}
2539
2540type awsAwsjson11_deserializeOpDeleteRegexPatternSet struct {
2541}
2542
2543func (*awsAwsjson11_deserializeOpDeleteRegexPatternSet) ID() string {
2544	return "OperationDeserializer"
2545}
2546
2547func (m *awsAwsjson11_deserializeOpDeleteRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2548	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2549) {
2550	out, metadata, err = next.HandleDeserialize(ctx, in)
2551	if err != nil {
2552		return out, metadata, err
2553	}
2554
2555	response, ok := out.RawResponse.(*smithyhttp.Response)
2556	if !ok {
2557		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2558	}
2559
2560	if response.StatusCode < 200 || response.StatusCode >= 300 {
2561		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegexPatternSet(response, &metadata)
2562	}
2563	output := &DeleteRegexPatternSetOutput{}
2564	out.Result = output
2565
2566	var buff [1024]byte
2567	ringBuffer := smithyio.NewRingBuffer(buff[:])
2568
2569	body := io.TeeReader(response.Body, ringBuffer)
2570	decoder := json.NewDecoder(body)
2571	decoder.UseNumber()
2572	var shape interface{}
2573	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2574		var snapshot bytes.Buffer
2575		io.Copy(&snapshot, ringBuffer)
2576		err = &smithy.DeserializationError{
2577			Err:      fmt.Errorf("failed to decode response body, %w", err),
2578			Snapshot: snapshot.Bytes(),
2579		}
2580		return out, metadata, err
2581	}
2582
2583	err = awsAwsjson11_deserializeOpDocumentDeleteRegexPatternSetOutput(&output, shape)
2584	if err != nil {
2585		var snapshot bytes.Buffer
2586		io.Copy(&snapshot, ringBuffer)
2587		err = &smithy.DeserializationError{
2588			Err:      fmt.Errorf("failed to decode response body, %w", err),
2589			Snapshot: snapshot.Bytes(),
2590		}
2591		return out, metadata, err
2592	}
2593
2594	return out, metadata, err
2595}
2596
2597func awsAwsjson11_deserializeOpErrorDeleteRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2598	var errorBuffer bytes.Buffer
2599	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2600		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2601	}
2602	errorBody := bytes.NewReader(errorBuffer.Bytes())
2603
2604	errorCode := "UnknownError"
2605	errorMessage := errorCode
2606
2607	code := response.Header.Get("X-Amzn-ErrorType")
2608	if len(code) != 0 {
2609		errorCode = restjson.SanitizeErrorCode(code)
2610	}
2611
2612	var buff [1024]byte
2613	ringBuffer := smithyio.NewRingBuffer(buff[:])
2614
2615	body := io.TeeReader(errorBody, ringBuffer)
2616	decoder := json.NewDecoder(body)
2617	decoder.UseNumber()
2618	code, message, err := restjson.GetErrorInfo(decoder)
2619	if err != nil {
2620		var snapshot bytes.Buffer
2621		io.Copy(&snapshot, ringBuffer)
2622		err = &smithy.DeserializationError{
2623			Err:      fmt.Errorf("failed to decode response body, %w", err),
2624			Snapshot: snapshot.Bytes(),
2625		}
2626		return err
2627	}
2628
2629	errorBody.Seek(0, io.SeekStart)
2630	if len(code) != 0 {
2631		errorCode = restjson.SanitizeErrorCode(code)
2632	}
2633	if len(message) != 0 {
2634		errorMessage = message
2635	}
2636
2637	switch {
2638	case strings.EqualFold("WAFInternalErrorException", errorCode):
2639		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2640
2641	case strings.EqualFold("WAFInvalidAccountException", errorCode):
2642		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
2643
2644	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2645		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2646
2647	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2648		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2649
2650	case strings.EqualFold("WAFReferencedItemException", errorCode):
2651		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2652
2653	case strings.EqualFold("WAFStaleDataException", errorCode):
2654		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2655
2656	default:
2657		genericError := &smithy.GenericAPIError{
2658			Code:    errorCode,
2659			Message: errorMessage,
2660		}
2661		return genericError
2662
2663	}
2664}
2665
2666type awsAwsjson11_deserializeOpDeleteRule struct {
2667}
2668
2669func (*awsAwsjson11_deserializeOpDeleteRule) ID() string {
2670	return "OperationDeserializer"
2671}
2672
2673func (m *awsAwsjson11_deserializeOpDeleteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2674	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2675) {
2676	out, metadata, err = next.HandleDeserialize(ctx, in)
2677	if err != nil {
2678		return out, metadata, err
2679	}
2680
2681	response, ok := out.RawResponse.(*smithyhttp.Response)
2682	if !ok {
2683		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2684	}
2685
2686	if response.StatusCode < 200 || response.StatusCode >= 300 {
2687		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRule(response, &metadata)
2688	}
2689	output := &DeleteRuleOutput{}
2690	out.Result = output
2691
2692	var buff [1024]byte
2693	ringBuffer := smithyio.NewRingBuffer(buff[:])
2694
2695	body := io.TeeReader(response.Body, ringBuffer)
2696	decoder := json.NewDecoder(body)
2697	decoder.UseNumber()
2698	var shape interface{}
2699	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2700		var snapshot bytes.Buffer
2701		io.Copy(&snapshot, ringBuffer)
2702		err = &smithy.DeserializationError{
2703			Err:      fmt.Errorf("failed to decode response body, %w", err),
2704			Snapshot: snapshot.Bytes(),
2705		}
2706		return out, metadata, err
2707	}
2708
2709	err = awsAwsjson11_deserializeOpDocumentDeleteRuleOutput(&output, shape)
2710	if err != nil {
2711		var snapshot bytes.Buffer
2712		io.Copy(&snapshot, ringBuffer)
2713		err = &smithy.DeserializationError{
2714			Err:      fmt.Errorf("failed to decode response body, %w", err),
2715			Snapshot: snapshot.Bytes(),
2716		}
2717		return out, metadata, err
2718	}
2719
2720	return out, metadata, err
2721}
2722
2723func awsAwsjson11_deserializeOpErrorDeleteRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2724	var errorBuffer bytes.Buffer
2725	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2726		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2727	}
2728	errorBody := bytes.NewReader(errorBuffer.Bytes())
2729
2730	errorCode := "UnknownError"
2731	errorMessage := errorCode
2732
2733	code := response.Header.Get("X-Amzn-ErrorType")
2734	if len(code) != 0 {
2735		errorCode = restjson.SanitizeErrorCode(code)
2736	}
2737
2738	var buff [1024]byte
2739	ringBuffer := smithyio.NewRingBuffer(buff[:])
2740
2741	body := io.TeeReader(errorBody, ringBuffer)
2742	decoder := json.NewDecoder(body)
2743	decoder.UseNumber()
2744	code, message, err := restjson.GetErrorInfo(decoder)
2745	if err != nil {
2746		var snapshot bytes.Buffer
2747		io.Copy(&snapshot, ringBuffer)
2748		err = &smithy.DeserializationError{
2749			Err:      fmt.Errorf("failed to decode response body, %w", err),
2750			Snapshot: snapshot.Bytes(),
2751		}
2752		return err
2753	}
2754
2755	errorBody.Seek(0, io.SeekStart)
2756	if len(code) != 0 {
2757		errorCode = restjson.SanitizeErrorCode(code)
2758	}
2759	if len(message) != 0 {
2760		errorMessage = message
2761	}
2762
2763	switch {
2764	case strings.EqualFold("WAFInternalErrorException", errorCode):
2765		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2766
2767	case strings.EqualFold("WAFInvalidAccountException", errorCode):
2768		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
2769
2770	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2771		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2772
2773	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2774		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2775
2776	case strings.EqualFold("WAFReferencedItemException", errorCode):
2777		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2778
2779	case strings.EqualFold("WAFStaleDataException", errorCode):
2780		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2781
2782	case strings.EqualFold("WAFTagOperationException", errorCode):
2783		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
2784
2785	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
2786		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
2787
2788	default:
2789		genericError := &smithy.GenericAPIError{
2790			Code:    errorCode,
2791			Message: errorMessage,
2792		}
2793		return genericError
2794
2795	}
2796}
2797
2798type awsAwsjson11_deserializeOpDeleteRuleGroup struct {
2799}
2800
2801func (*awsAwsjson11_deserializeOpDeleteRuleGroup) ID() string {
2802	return "OperationDeserializer"
2803}
2804
2805func (m *awsAwsjson11_deserializeOpDeleteRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2806	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2807) {
2808	out, metadata, err = next.HandleDeserialize(ctx, in)
2809	if err != nil {
2810		return out, metadata, err
2811	}
2812
2813	response, ok := out.RawResponse.(*smithyhttp.Response)
2814	if !ok {
2815		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2816	}
2817
2818	if response.StatusCode < 200 || response.StatusCode >= 300 {
2819		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRuleGroup(response, &metadata)
2820	}
2821	output := &DeleteRuleGroupOutput{}
2822	out.Result = output
2823
2824	var buff [1024]byte
2825	ringBuffer := smithyio.NewRingBuffer(buff[:])
2826
2827	body := io.TeeReader(response.Body, ringBuffer)
2828	decoder := json.NewDecoder(body)
2829	decoder.UseNumber()
2830	var shape interface{}
2831	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2832		var snapshot bytes.Buffer
2833		io.Copy(&snapshot, ringBuffer)
2834		err = &smithy.DeserializationError{
2835			Err:      fmt.Errorf("failed to decode response body, %w", err),
2836			Snapshot: snapshot.Bytes(),
2837		}
2838		return out, metadata, err
2839	}
2840
2841	err = awsAwsjson11_deserializeOpDocumentDeleteRuleGroupOutput(&output, shape)
2842	if err != nil {
2843		var snapshot bytes.Buffer
2844		io.Copy(&snapshot, ringBuffer)
2845		err = &smithy.DeserializationError{
2846			Err:      fmt.Errorf("failed to decode response body, %w", err),
2847			Snapshot: snapshot.Bytes(),
2848		}
2849		return out, metadata, err
2850	}
2851
2852	return out, metadata, err
2853}
2854
2855func awsAwsjson11_deserializeOpErrorDeleteRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2856	var errorBuffer bytes.Buffer
2857	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2858		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2859	}
2860	errorBody := bytes.NewReader(errorBuffer.Bytes())
2861
2862	errorCode := "UnknownError"
2863	errorMessage := errorCode
2864
2865	code := response.Header.Get("X-Amzn-ErrorType")
2866	if len(code) != 0 {
2867		errorCode = restjson.SanitizeErrorCode(code)
2868	}
2869
2870	var buff [1024]byte
2871	ringBuffer := smithyio.NewRingBuffer(buff[:])
2872
2873	body := io.TeeReader(errorBody, ringBuffer)
2874	decoder := json.NewDecoder(body)
2875	decoder.UseNumber()
2876	code, message, err := restjson.GetErrorInfo(decoder)
2877	if err != nil {
2878		var snapshot bytes.Buffer
2879		io.Copy(&snapshot, ringBuffer)
2880		err = &smithy.DeserializationError{
2881			Err:      fmt.Errorf("failed to decode response body, %w", err),
2882			Snapshot: snapshot.Bytes(),
2883		}
2884		return err
2885	}
2886
2887	errorBody.Seek(0, io.SeekStart)
2888	if len(code) != 0 {
2889		errorCode = restjson.SanitizeErrorCode(code)
2890	}
2891	if len(message) != 0 {
2892		errorMessage = message
2893	}
2894
2895	switch {
2896	case strings.EqualFold("WAFInternalErrorException", errorCode):
2897		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
2898
2899	case strings.EqualFold("WAFInvalidOperationException", errorCode):
2900		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
2901
2902	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
2903		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
2904
2905	case strings.EqualFold("WAFNonexistentItemException", errorCode):
2906		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
2907
2908	case strings.EqualFold("WAFReferencedItemException", errorCode):
2909		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
2910
2911	case strings.EqualFold("WAFStaleDataException", errorCode):
2912		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
2913
2914	case strings.EqualFold("WAFTagOperationException", errorCode):
2915		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
2916
2917	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
2918		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
2919
2920	default:
2921		genericError := &smithy.GenericAPIError{
2922			Code:    errorCode,
2923			Message: errorMessage,
2924		}
2925		return genericError
2926
2927	}
2928}
2929
2930type awsAwsjson11_deserializeOpDeleteSizeConstraintSet struct {
2931}
2932
2933func (*awsAwsjson11_deserializeOpDeleteSizeConstraintSet) ID() string {
2934	return "OperationDeserializer"
2935}
2936
2937func (m *awsAwsjson11_deserializeOpDeleteSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2938	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2939) {
2940	out, metadata, err = next.HandleDeserialize(ctx, in)
2941	if err != nil {
2942		return out, metadata, err
2943	}
2944
2945	response, ok := out.RawResponse.(*smithyhttp.Response)
2946	if !ok {
2947		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2948	}
2949
2950	if response.StatusCode < 200 || response.StatusCode >= 300 {
2951		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSizeConstraintSet(response, &metadata)
2952	}
2953	output := &DeleteSizeConstraintSetOutput{}
2954	out.Result = output
2955
2956	var buff [1024]byte
2957	ringBuffer := smithyio.NewRingBuffer(buff[:])
2958
2959	body := io.TeeReader(response.Body, ringBuffer)
2960	decoder := json.NewDecoder(body)
2961	decoder.UseNumber()
2962	var shape interface{}
2963	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2964		var snapshot bytes.Buffer
2965		io.Copy(&snapshot, ringBuffer)
2966		err = &smithy.DeserializationError{
2967			Err:      fmt.Errorf("failed to decode response body, %w", err),
2968			Snapshot: snapshot.Bytes(),
2969		}
2970		return out, metadata, err
2971	}
2972
2973	err = awsAwsjson11_deserializeOpDocumentDeleteSizeConstraintSetOutput(&output, shape)
2974	if err != nil {
2975		var snapshot bytes.Buffer
2976		io.Copy(&snapshot, ringBuffer)
2977		err = &smithy.DeserializationError{
2978			Err:      fmt.Errorf("failed to decode response body, %w", err),
2979			Snapshot: snapshot.Bytes(),
2980		}
2981		return out, metadata, err
2982	}
2983
2984	return out, metadata, err
2985}
2986
2987func awsAwsjson11_deserializeOpErrorDeleteSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2988	var errorBuffer bytes.Buffer
2989	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2990		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2991	}
2992	errorBody := bytes.NewReader(errorBuffer.Bytes())
2993
2994	errorCode := "UnknownError"
2995	errorMessage := errorCode
2996
2997	code := response.Header.Get("X-Amzn-ErrorType")
2998	if len(code) != 0 {
2999		errorCode = restjson.SanitizeErrorCode(code)
3000	}
3001
3002	var buff [1024]byte
3003	ringBuffer := smithyio.NewRingBuffer(buff[:])
3004
3005	body := io.TeeReader(errorBody, ringBuffer)
3006	decoder := json.NewDecoder(body)
3007	decoder.UseNumber()
3008	code, message, err := restjson.GetErrorInfo(decoder)
3009	if err != nil {
3010		var snapshot bytes.Buffer
3011		io.Copy(&snapshot, ringBuffer)
3012		err = &smithy.DeserializationError{
3013			Err:      fmt.Errorf("failed to decode response body, %w", err),
3014			Snapshot: snapshot.Bytes(),
3015		}
3016		return err
3017	}
3018
3019	errorBody.Seek(0, io.SeekStart)
3020	if len(code) != 0 {
3021		errorCode = restjson.SanitizeErrorCode(code)
3022	}
3023	if len(message) != 0 {
3024		errorMessage = message
3025	}
3026
3027	switch {
3028	case strings.EqualFold("WAFInternalErrorException", errorCode):
3029		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3030
3031	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3032		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3033
3034	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
3035		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
3036
3037	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3038		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3039
3040	case strings.EqualFold("WAFReferencedItemException", errorCode):
3041		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
3042
3043	case strings.EqualFold("WAFStaleDataException", errorCode):
3044		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
3045
3046	default:
3047		genericError := &smithy.GenericAPIError{
3048			Code:    errorCode,
3049			Message: errorMessage,
3050		}
3051		return genericError
3052
3053	}
3054}
3055
3056type awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet struct {
3057}
3058
3059func (*awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet) ID() string {
3060	return "OperationDeserializer"
3061}
3062
3063func (m *awsAwsjson11_deserializeOpDeleteSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3064	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3065) {
3066	out, metadata, err = next.HandleDeserialize(ctx, in)
3067	if err != nil {
3068		return out, metadata, err
3069	}
3070
3071	response, ok := out.RawResponse.(*smithyhttp.Response)
3072	if !ok {
3073		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3074	}
3075
3076	if response.StatusCode < 200 || response.StatusCode >= 300 {
3077		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSqlInjectionMatchSet(response, &metadata)
3078	}
3079	output := &DeleteSqlInjectionMatchSetOutput{}
3080	out.Result = output
3081
3082	var buff [1024]byte
3083	ringBuffer := smithyio.NewRingBuffer(buff[:])
3084
3085	body := io.TeeReader(response.Body, ringBuffer)
3086	decoder := json.NewDecoder(body)
3087	decoder.UseNumber()
3088	var shape interface{}
3089	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3090		var snapshot bytes.Buffer
3091		io.Copy(&snapshot, ringBuffer)
3092		err = &smithy.DeserializationError{
3093			Err:      fmt.Errorf("failed to decode response body, %w", err),
3094			Snapshot: snapshot.Bytes(),
3095		}
3096		return out, metadata, err
3097	}
3098
3099	err = awsAwsjson11_deserializeOpDocumentDeleteSqlInjectionMatchSetOutput(&output, shape)
3100	if err != nil {
3101		var snapshot bytes.Buffer
3102		io.Copy(&snapshot, ringBuffer)
3103		err = &smithy.DeserializationError{
3104			Err:      fmt.Errorf("failed to decode response body, %w", err),
3105			Snapshot: snapshot.Bytes(),
3106		}
3107		return out, metadata, err
3108	}
3109
3110	return out, metadata, err
3111}
3112
3113func awsAwsjson11_deserializeOpErrorDeleteSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3114	var errorBuffer bytes.Buffer
3115	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3116		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3117	}
3118	errorBody := bytes.NewReader(errorBuffer.Bytes())
3119
3120	errorCode := "UnknownError"
3121	errorMessage := errorCode
3122
3123	code := response.Header.Get("X-Amzn-ErrorType")
3124	if len(code) != 0 {
3125		errorCode = restjson.SanitizeErrorCode(code)
3126	}
3127
3128	var buff [1024]byte
3129	ringBuffer := smithyio.NewRingBuffer(buff[:])
3130
3131	body := io.TeeReader(errorBody, ringBuffer)
3132	decoder := json.NewDecoder(body)
3133	decoder.UseNumber()
3134	code, message, err := restjson.GetErrorInfo(decoder)
3135	if err != nil {
3136		var snapshot bytes.Buffer
3137		io.Copy(&snapshot, ringBuffer)
3138		err = &smithy.DeserializationError{
3139			Err:      fmt.Errorf("failed to decode response body, %w", err),
3140			Snapshot: snapshot.Bytes(),
3141		}
3142		return err
3143	}
3144
3145	errorBody.Seek(0, io.SeekStart)
3146	if len(code) != 0 {
3147		errorCode = restjson.SanitizeErrorCode(code)
3148	}
3149	if len(message) != 0 {
3150		errorMessage = message
3151	}
3152
3153	switch {
3154	case strings.EqualFold("WAFInternalErrorException", errorCode):
3155		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3156
3157	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3158		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3159
3160	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
3161		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
3162
3163	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3164		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3165
3166	case strings.EqualFold("WAFReferencedItemException", errorCode):
3167		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
3168
3169	case strings.EqualFold("WAFStaleDataException", errorCode):
3170		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
3171
3172	default:
3173		genericError := &smithy.GenericAPIError{
3174			Code:    errorCode,
3175			Message: errorMessage,
3176		}
3177		return genericError
3178
3179	}
3180}
3181
3182type awsAwsjson11_deserializeOpDeleteWebACL struct {
3183}
3184
3185func (*awsAwsjson11_deserializeOpDeleteWebACL) ID() string {
3186	return "OperationDeserializer"
3187}
3188
3189func (m *awsAwsjson11_deserializeOpDeleteWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3190	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3191) {
3192	out, metadata, err = next.HandleDeserialize(ctx, in)
3193	if err != nil {
3194		return out, metadata, err
3195	}
3196
3197	response, ok := out.RawResponse.(*smithyhttp.Response)
3198	if !ok {
3199		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3200	}
3201
3202	if response.StatusCode < 200 || response.StatusCode >= 300 {
3203		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWebACL(response, &metadata)
3204	}
3205	output := &DeleteWebACLOutput{}
3206	out.Result = output
3207
3208	var buff [1024]byte
3209	ringBuffer := smithyio.NewRingBuffer(buff[:])
3210
3211	body := io.TeeReader(response.Body, ringBuffer)
3212	decoder := json.NewDecoder(body)
3213	decoder.UseNumber()
3214	var shape interface{}
3215	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3216		var snapshot bytes.Buffer
3217		io.Copy(&snapshot, ringBuffer)
3218		err = &smithy.DeserializationError{
3219			Err:      fmt.Errorf("failed to decode response body, %w", err),
3220			Snapshot: snapshot.Bytes(),
3221		}
3222		return out, metadata, err
3223	}
3224
3225	err = awsAwsjson11_deserializeOpDocumentDeleteWebACLOutput(&output, shape)
3226	if err != nil {
3227		var snapshot bytes.Buffer
3228		io.Copy(&snapshot, ringBuffer)
3229		err = &smithy.DeserializationError{
3230			Err:      fmt.Errorf("failed to decode response body, %w", err),
3231			Snapshot: snapshot.Bytes(),
3232		}
3233		return out, metadata, err
3234	}
3235
3236	return out, metadata, err
3237}
3238
3239func awsAwsjson11_deserializeOpErrorDeleteWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3240	var errorBuffer bytes.Buffer
3241	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3242		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3243	}
3244	errorBody := bytes.NewReader(errorBuffer.Bytes())
3245
3246	errorCode := "UnknownError"
3247	errorMessage := errorCode
3248
3249	code := response.Header.Get("X-Amzn-ErrorType")
3250	if len(code) != 0 {
3251		errorCode = restjson.SanitizeErrorCode(code)
3252	}
3253
3254	var buff [1024]byte
3255	ringBuffer := smithyio.NewRingBuffer(buff[:])
3256
3257	body := io.TeeReader(errorBody, ringBuffer)
3258	decoder := json.NewDecoder(body)
3259	decoder.UseNumber()
3260	code, message, err := restjson.GetErrorInfo(decoder)
3261	if err != nil {
3262		var snapshot bytes.Buffer
3263		io.Copy(&snapshot, ringBuffer)
3264		err = &smithy.DeserializationError{
3265			Err:      fmt.Errorf("failed to decode response body, %w", err),
3266			Snapshot: snapshot.Bytes(),
3267		}
3268		return err
3269	}
3270
3271	errorBody.Seek(0, io.SeekStart)
3272	if len(code) != 0 {
3273		errorCode = restjson.SanitizeErrorCode(code)
3274	}
3275	if len(message) != 0 {
3276		errorMessage = message
3277	}
3278
3279	switch {
3280	case strings.EqualFold("WAFInternalErrorException", errorCode):
3281		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3282
3283	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3284		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3285
3286	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
3287		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
3288
3289	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3290		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3291
3292	case strings.EqualFold("WAFReferencedItemException", errorCode):
3293		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
3294
3295	case strings.EqualFold("WAFStaleDataException", errorCode):
3296		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
3297
3298	case strings.EqualFold("WAFTagOperationException", errorCode):
3299		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
3300
3301	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
3302		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
3303
3304	default:
3305		genericError := &smithy.GenericAPIError{
3306			Code:    errorCode,
3307			Message: errorMessage,
3308		}
3309		return genericError
3310
3311	}
3312}
3313
3314type awsAwsjson11_deserializeOpDeleteXssMatchSet struct {
3315}
3316
3317func (*awsAwsjson11_deserializeOpDeleteXssMatchSet) ID() string {
3318	return "OperationDeserializer"
3319}
3320
3321func (m *awsAwsjson11_deserializeOpDeleteXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3322	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3323) {
3324	out, metadata, err = next.HandleDeserialize(ctx, in)
3325	if err != nil {
3326		return out, metadata, err
3327	}
3328
3329	response, ok := out.RawResponse.(*smithyhttp.Response)
3330	if !ok {
3331		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3332	}
3333
3334	if response.StatusCode < 200 || response.StatusCode >= 300 {
3335		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteXssMatchSet(response, &metadata)
3336	}
3337	output := &DeleteXssMatchSetOutput{}
3338	out.Result = output
3339
3340	var buff [1024]byte
3341	ringBuffer := smithyio.NewRingBuffer(buff[:])
3342
3343	body := io.TeeReader(response.Body, ringBuffer)
3344	decoder := json.NewDecoder(body)
3345	decoder.UseNumber()
3346	var shape interface{}
3347	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3348		var snapshot bytes.Buffer
3349		io.Copy(&snapshot, ringBuffer)
3350		err = &smithy.DeserializationError{
3351			Err:      fmt.Errorf("failed to decode response body, %w", err),
3352			Snapshot: snapshot.Bytes(),
3353		}
3354		return out, metadata, err
3355	}
3356
3357	err = awsAwsjson11_deserializeOpDocumentDeleteXssMatchSetOutput(&output, shape)
3358	if err != nil {
3359		var snapshot bytes.Buffer
3360		io.Copy(&snapshot, ringBuffer)
3361		err = &smithy.DeserializationError{
3362			Err:      fmt.Errorf("failed to decode response body, %w", err),
3363			Snapshot: snapshot.Bytes(),
3364		}
3365		return out, metadata, err
3366	}
3367
3368	return out, metadata, err
3369}
3370
3371func awsAwsjson11_deserializeOpErrorDeleteXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3372	var errorBuffer bytes.Buffer
3373	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3374		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3375	}
3376	errorBody := bytes.NewReader(errorBuffer.Bytes())
3377
3378	errorCode := "UnknownError"
3379	errorMessage := errorCode
3380
3381	code := response.Header.Get("X-Amzn-ErrorType")
3382	if len(code) != 0 {
3383		errorCode = restjson.SanitizeErrorCode(code)
3384	}
3385
3386	var buff [1024]byte
3387	ringBuffer := smithyio.NewRingBuffer(buff[:])
3388
3389	body := io.TeeReader(errorBody, ringBuffer)
3390	decoder := json.NewDecoder(body)
3391	decoder.UseNumber()
3392	code, message, err := restjson.GetErrorInfo(decoder)
3393	if err != nil {
3394		var snapshot bytes.Buffer
3395		io.Copy(&snapshot, ringBuffer)
3396		err = &smithy.DeserializationError{
3397			Err:      fmt.Errorf("failed to decode response body, %w", err),
3398			Snapshot: snapshot.Bytes(),
3399		}
3400		return err
3401	}
3402
3403	errorBody.Seek(0, io.SeekStart)
3404	if len(code) != 0 {
3405		errorCode = restjson.SanitizeErrorCode(code)
3406	}
3407	if len(message) != 0 {
3408		errorMessage = message
3409	}
3410
3411	switch {
3412	case strings.EqualFold("WAFInternalErrorException", errorCode):
3413		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3414
3415	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3416		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3417
3418	case strings.EqualFold("WAFNonEmptyEntityException", errorCode):
3419		return awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response, errorBody)
3420
3421	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3422		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3423
3424	case strings.EqualFold("WAFReferencedItemException", errorCode):
3425		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
3426
3427	case strings.EqualFold("WAFStaleDataException", errorCode):
3428		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
3429
3430	default:
3431		genericError := &smithy.GenericAPIError{
3432			Code:    errorCode,
3433			Message: errorMessage,
3434		}
3435		return genericError
3436
3437	}
3438}
3439
3440type awsAwsjson11_deserializeOpGetByteMatchSet struct {
3441}
3442
3443func (*awsAwsjson11_deserializeOpGetByteMatchSet) ID() string {
3444	return "OperationDeserializer"
3445}
3446
3447func (m *awsAwsjson11_deserializeOpGetByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3448	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3449) {
3450	out, metadata, err = next.HandleDeserialize(ctx, in)
3451	if err != nil {
3452		return out, metadata, err
3453	}
3454
3455	response, ok := out.RawResponse.(*smithyhttp.Response)
3456	if !ok {
3457		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3458	}
3459
3460	if response.StatusCode < 200 || response.StatusCode >= 300 {
3461		return out, metadata, awsAwsjson11_deserializeOpErrorGetByteMatchSet(response, &metadata)
3462	}
3463	output := &GetByteMatchSetOutput{}
3464	out.Result = output
3465
3466	var buff [1024]byte
3467	ringBuffer := smithyio.NewRingBuffer(buff[:])
3468
3469	body := io.TeeReader(response.Body, ringBuffer)
3470	decoder := json.NewDecoder(body)
3471	decoder.UseNumber()
3472	var shape interface{}
3473	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3474		var snapshot bytes.Buffer
3475		io.Copy(&snapshot, ringBuffer)
3476		err = &smithy.DeserializationError{
3477			Err:      fmt.Errorf("failed to decode response body, %w", err),
3478			Snapshot: snapshot.Bytes(),
3479		}
3480		return out, metadata, err
3481	}
3482
3483	err = awsAwsjson11_deserializeOpDocumentGetByteMatchSetOutput(&output, shape)
3484	if err != nil {
3485		var snapshot bytes.Buffer
3486		io.Copy(&snapshot, ringBuffer)
3487		err = &smithy.DeserializationError{
3488			Err:      fmt.Errorf("failed to decode response body, %w", err),
3489			Snapshot: snapshot.Bytes(),
3490		}
3491		return out, metadata, err
3492	}
3493
3494	return out, metadata, err
3495}
3496
3497func awsAwsjson11_deserializeOpErrorGetByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3498	var errorBuffer bytes.Buffer
3499	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3500		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3501	}
3502	errorBody := bytes.NewReader(errorBuffer.Bytes())
3503
3504	errorCode := "UnknownError"
3505	errorMessage := errorCode
3506
3507	code := response.Header.Get("X-Amzn-ErrorType")
3508	if len(code) != 0 {
3509		errorCode = restjson.SanitizeErrorCode(code)
3510	}
3511
3512	var buff [1024]byte
3513	ringBuffer := smithyio.NewRingBuffer(buff[:])
3514
3515	body := io.TeeReader(errorBody, ringBuffer)
3516	decoder := json.NewDecoder(body)
3517	decoder.UseNumber()
3518	code, message, err := restjson.GetErrorInfo(decoder)
3519	if err != nil {
3520		var snapshot bytes.Buffer
3521		io.Copy(&snapshot, ringBuffer)
3522		err = &smithy.DeserializationError{
3523			Err:      fmt.Errorf("failed to decode response body, %w", err),
3524			Snapshot: snapshot.Bytes(),
3525		}
3526		return err
3527	}
3528
3529	errorBody.Seek(0, io.SeekStart)
3530	if len(code) != 0 {
3531		errorCode = restjson.SanitizeErrorCode(code)
3532	}
3533	if len(message) != 0 {
3534		errorMessage = message
3535	}
3536
3537	switch {
3538	case strings.EqualFold("WAFInternalErrorException", errorCode):
3539		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3540
3541	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3542		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3543
3544	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3545		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3546
3547	default:
3548		genericError := &smithy.GenericAPIError{
3549			Code:    errorCode,
3550			Message: errorMessage,
3551		}
3552		return genericError
3553
3554	}
3555}
3556
3557type awsAwsjson11_deserializeOpGetChangeToken struct {
3558}
3559
3560func (*awsAwsjson11_deserializeOpGetChangeToken) ID() string {
3561	return "OperationDeserializer"
3562}
3563
3564func (m *awsAwsjson11_deserializeOpGetChangeToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3565	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3566) {
3567	out, metadata, err = next.HandleDeserialize(ctx, in)
3568	if err != nil {
3569		return out, metadata, err
3570	}
3571
3572	response, ok := out.RawResponse.(*smithyhttp.Response)
3573	if !ok {
3574		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3575	}
3576
3577	if response.StatusCode < 200 || response.StatusCode >= 300 {
3578		return out, metadata, awsAwsjson11_deserializeOpErrorGetChangeToken(response, &metadata)
3579	}
3580	output := &GetChangeTokenOutput{}
3581	out.Result = output
3582
3583	var buff [1024]byte
3584	ringBuffer := smithyio.NewRingBuffer(buff[:])
3585
3586	body := io.TeeReader(response.Body, ringBuffer)
3587	decoder := json.NewDecoder(body)
3588	decoder.UseNumber()
3589	var shape interface{}
3590	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3591		var snapshot bytes.Buffer
3592		io.Copy(&snapshot, ringBuffer)
3593		err = &smithy.DeserializationError{
3594			Err:      fmt.Errorf("failed to decode response body, %w", err),
3595			Snapshot: snapshot.Bytes(),
3596		}
3597		return out, metadata, err
3598	}
3599
3600	err = awsAwsjson11_deserializeOpDocumentGetChangeTokenOutput(&output, shape)
3601	if err != nil {
3602		var snapshot bytes.Buffer
3603		io.Copy(&snapshot, ringBuffer)
3604		err = &smithy.DeserializationError{
3605			Err:      fmt.Errorf("failed to decode response body, %w", err),
3606			Snapshot: snapshot.Bytes(),
3607		}
3608		return out, metadata, err
3609	}
3610
3611	return out, metadata, err
3612}
3613
3614func awsAwsjson11_deserializeOpErrorGetChangeToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3615	var errorBuffer bytes.Buffer
3616	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3617		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3618	}
3619	errorBody := bytes.NewReader(errorBuffer.Bytes())
3620
3621	errorCode := "UnknownError"
3622	errorMessage := errorCode
3623
3624	code := response.Header.Get("X-Amzn-ErrorType")
3625	if len(code) != 0 {
3626		errorCode = restjson.SanitizeErrorCode(code)
3627	}
3628
3629	var buff [1024]byte
3630	ringBuffer := smithyio.NewRingBuffer(buff[:])
3631
3632	body := io.TeeReader(errorBody, ringBuffer)
3633	decoder := json.NewDecoder(body)
3634	decoder.UseNumber()
3635	code, message, err := restjson.GetErrorInfo(decoder)
3636	if err != nil {
3637		var snapshot bytes.Buffer
3638		io.Copy(&snapshot, ringBuffer)
3639		err = &smithy.DeserializationError{
3640			Err:      fmt.Errorf("failed to decode response body, %w", err),
3641			Snapshot: snapshot.Bytes(),
3642		}
3643		return err
3644	}
3645
3646	errorBody.Seek(0, io.SeekStart)
3647	if len(code) != 0 {
3648		errorCode = restjson.SanitizeErrorCode(code)
3649	}
3650	if len(message) != 0 {
3651		errorMessage = message
3652	}
3653
3654	switch {
3655	case strings.EqualFold("WAFInternalErrorException", errorCode):
3656		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3657
3658	default:
3659		genericError := &smithy.GenericAPIError{
3660			Code:    errorCode,
3661			Message: errorMessage,
3662		}
3663		return genericError
3664
3665	}
3666}
3667
3668type awsAwsjson11_deserializeOpGetChangeTokenStatus struct {
3669}
3670
3671func (*awsAwsjson11_deserializeOpGetChangeTokenStatus) ID() string {
3672	return "OperationDeserializer"
3673}
3674
3675func (m *awsAwsjson11_deserializeOpGetChangeTokenStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3676	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3677) {
3678	out, metadata, err = next.HandleDeserialize(ctx, in)
3679	if err != nil {
3680		return out, metadata, err
3681	}
3682
3683	response, ok := out.RawResponse.(*smithyhttp.Response)
3684	if !ok {
3685		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3686	}
3687
3688	if response.StatusCode < 200 || response.StatusCode >= 300 {
3689		return out, metadata, awsAwsjson11_deserializeOpErrorGetChangeTokenStatus(response, &metadata)
3690	}
3691	output := &GetChangeTokenStatusOutput{}
3692	out.Result = output
3693
3694	var buff [1024]byte
3695	ringBuffer := smithyio.NewRingBuffer(buff[:])
3696
3697	body := io.TeeReader(response.Body, ringBuffer)
3698	decoder := json.NewDecoder(body)
3699	decoder.UseNumber()
3700	var shape interface{}
3701	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3702		var snapshot bytes.Buffer
3703		io.Copy(&snapshot, ringBuffer)
3704		err = &smithy.DeserializationError{
3705			Err:      fmt.Errorf("failed to decode response body, %w", err),
3706			Snapshot: snapshot.Bytes(),
3707		}
3708		return out, metadata, err
3709	}
3710
3711	err = awsAwsjson11_deserializeOpDocumentGetChangeTokenStatusOutput(&output, shape)
3712	if err != nil {
3713		var snapshot bytes.Buffer
3714		io.Copy(&snapshot, ringBuffer)
3715		err = &smithy.DeserializationError{
3716			Err:      fmt.Errorf("failed to decode response body, %w", err),
3717			Snapshot: snapshot.Bytes(),
3718		}
3719		return out, metadata, err
3720	}
3721
3722	return out, metadata, err
3723}
3724
3725func awsAwsjson11_deserializeOpErrorGetChangeTokenStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3726	var errorBuffer bytes.Buffer
3727	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3728		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3729	}
3730	errorBody := bytes.NewReader(errorBuffer.Bytes())
3731
3732	errorCode := "UnknownError"
3733	errorMessage := errorCode
3734
3735	code := response.Header.Get("X-Amzn-ErrorType")
3736	if len(code) != 0 {
3737		errorCode = restjson.SanitizeErrorCode(code)
3738	}
3739
3740	var buff [1024]byte
3741	ringBuffer := smithyio.NewRingBuffer(buff[:])
3742
3743	body := io.TeeReader(errorBody, ringBuffer)
3744	decoder := json.NewDecoder(body)
3745	decoder.UseNumber()
3746	code, message, err := restjson.GetErrorInfo(decoder)
3747	if err != nil {
3748		var snapshot bytes.Buffer
3749		io.Copy(&snapshot, ringBuffer)
3750		err = &smithy.DeserializationError{
3751			Err:      fmt.Errorf("failed to decode response body, %w", err),
3752			Snapshot: snapshot.Bytes(),
3753		}
3754		return err
3755	}
3756
3757	errorBody.Seek(0, io.SeekStart)
3758	if len(code) != 0 {
3759		errorCode = restjson.SanitizeErrorCode(code)
3760	}
3761	if len(message) != 0 {
3762		errorMessage = message
3763	}
3764
3765	switch {
3766	case strings.EqualFold("WAFInternalErrorException", errorCode):
3767		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3768
3769	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3770		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3771
3772	default:
3773		genericError := &smithy.GenericAPIError{
3774			Code:    errorCode,
3775			Message: errorMessage,
3776		}
3777		return genericError
3778
3779	}
3780}
3781
3782type awsAwsjson11_deserializeOpGetGeoMatchSet struct {
3783}
3784
3785func (*awsAwsjson11_deserializeOpGetGeoMatchSet) ID() string {
3786	return "OperationDeserializer"
3787}
3788
3789func (m *awsAwsjson11_deserializeOpGetGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3790	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3791) {
3792	out, metadata, err = next.HandleDeserialize(ctx, in)
3793	if err != nil {
3794		return out, metadata, err
3795	}
3796
3797	response, ok := out.RawResponse.(*smithyhttp.Response)
3798	if !ok {
3799		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3800	}
3801
3802	if response.StatusCode < 200 || response.StatusCode >= 300 {
3803		return out, metadata, awsAwsjson11_deserializeOpErrorGetGeoMatchSet(response, &metadata)
3804	}
3805	output := &GetGeoMatchSetOutput{}
3806	out.Result = output
3807
3808	var buff [1024]byte
3809	ringBuffer := smithyio.NewRingBuffer(buff[:])
3810
3811	body := io.TeeReader(response.Body, ringBuffer)
3812	decoder := json.NewDecoder(body)
3813	decoder.UseNumber()
3814	var shape interface{}
3815	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3816		var snapshot bytes.Buffer
3817		io.Copy(&snapshot, ringBuffer)
3818		err = &smithy.DeserializationError{
3819			Err:      fmt.Errorf("failed to decode response body, %w", err),
3820			Snapshot: snapshot.Bytes(),
3821		}
3822		return out, metadata, err
3823	}
3824
3825	err = awsAwsjson11_deserializeOpDocumentGetGeoMatchSetOutput(&output, shape)
3826	if err != nil {
3827		var snapshot bytes.Buffer
3828		io.Copy(&snapshot, ringBuffer)
3829		err = &smithy.DeserializationError{
3830			Err:      fmt.Errorf("failed to decode response body, %w", err),
3831			Snapshot: snapshot.Bytes(),
3832		}
3833		return out, metadata, err
3834	}
3835
3836	return out, metadata, err
3837}
3838
3839func awsAwsjson11_deserializeOpErrorGetGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3840	var errorBuffer bytes.Buffer
3841	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3842		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3843	}
3844	errorBody := bytes.NewReader(errorBuffer.Bytes())
3845
3846	errorCode := "UnknownError"
3847	errorMessage := errorCode
3848
3849	code := response.Header.Get("X-Amzn-ErrorType")
3850	if len(code) != 0 {
3851		errorCode = restjson.SanitizeErrorCode(code)
3852	}
3853
3854	var buff [1024]byte
3855	ringBuffer := smithyio.NewRingBuffer(buff[:])
3856
3857	body := io.TeeReader(errorBody, ringBuffer)
3858	decoder := json.NewDecoder(body)
3859	decoder.UseNumber()
3860	code, message, err := restjson.GetErrorInfo(decoder)
3861	if err != nil {
3862		var snapshot bytes.Buffer
3863		io.Copy(&snapshot, ringBuffer)
3864		err = &smithy.DeserializationError{
3865			Err:      fmt.Errorf("failed to decode response body, %w", err),
3866			Snapshot: snapshot.Bytes(),
3867		}
3868		return err
3869	}
3870
3871	errorBody.Seek(0, io.SeekStart)
3872	if len(code) != 0 {
3873		errorCode = restjson.SanitizeErrorCode(code)
3874	}
3875	if len(message) != 0 {
3876		errorMessage = message
3877	}
3878
3879	switch {
3880	case strings.EqualFold("WAFInternalErrorException", errorCode):
3881		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3882
3883	case strings.EqualFold("WAFInvalidAccountException", errorCode):
3884		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
3885
3886	case strings.EqualFold("WAFNonexistentItemException", errorCode):
3887		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
3888
3889	default:
3890		genericError := &smithy.GenericAPIError{
3891			Code:    errorCode,
3892			Message: errorMessage,
3893		}
3894		return genericError
3895
3896	}
3897}
3898
3899type awsAwsjson11_deserializeOpGetIPSet struct {
3900}
3901
3902func (*awsAwsjson11_deserializeOpGetIPSet) ID() string {
3903	return "OperationDeserializer"
3904}
3905
3906func (m *awsAwsjson11_deserializeOpGetIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3907	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3908) {
3909	out, metadata, err = next.HandleDeserialize(ctx, in)
3910	if err != nil {
3911		return out, metadata, err
3912	}
3913
3914	response, ok := out.RawResponse.(*smithyhttp.Response)
3915	if !ok {
3916		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3917	}
3918
3919	if response.StatusCode < 200 || response.StatusCode >= 300 {
3920		return out, metadata, awsAwsjson11_deserializeOpErrorGetIPSet(response, &metadata)
3921	}
3922	output := &GetIPSetOutput{}
3923	out.Result = output
3924
3925	var buff [1024]byte
3926	ringBuffer := smithyio.NewRingBuffer(buff[:])
3927
3928	body := io.TeeReader(response.Body, ringBuffer)
3929	decoder := json.NewDecoder(body)
3930	decoder.UseNumber()
3931	var shape interface{}
3932	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3933		var snapshot bytes.Buffer
3934		io.Copy(&snapshot, ringBuffer)
3935		err = &smithy.DeserializationError{
3936			Err:      fmt.Errorf("failed to decode response body, %w", err),
3937			Snapshot: snapshot.Bytes(),
3938		}
3939		return out, metadata, err
3940	}
3941
3942	err = awsAwsjson11_deserializeOpDocumentGetIPSetOutput(&output, shape)
3943	if err != nil {
3944		var snapshot bytes.Buffer
3945		io.Copy(&snapshot, ringBuffer)
3946		err = &smithy.DeserializationError{
3947			Err:      fmt.Errorf("failed to decode response body, %w", err),
3948			Snapshot: snapshot.Bytes(),
3949		}
3950		return out, metadata, err
3951	}
3952
3953	return out, metadata, err
3954}
3955
3956func awsAwsjson11_deserializeOpErrorGetIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3957	var errorBuffer bytes.Buffer
3958	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3959		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3960	}
3961	errorBody := bytes.NewReader(errorBuffer.Bytes())
3962
3963	errorCode := "UnknownError"
3964	errorMessage := errorCode
3965
3966	code := response.Header.Get("X-Amzn-ErrorType")
3967	if len(code) != 0 {
3968		errorCode = restjson.SanitizeErrorCode(code)
3969	}
3970
3971	var buff [1024]byte
3972	ringBuffer := smithyio.NewRingBuffer(buff[:])
3973
3974	body := io.TeeReader(errorBody, ringBuffer)
3975	decoder := json.NewDecoder(body)
3976	decoder.UseNumber()
3977	code, message, err := restjson.GetErrorInfo(decoder)
3978	if err != nil {
3979		var snapshot bytes.Buffer
3980		io.Copy(&snapshot, ringBuffer)
3981		err = &smithy.DeserializationError{
3982			Err:      fmt.Errorf("failed to decode response body, %w", err),
3983			Snapshot: snapshot.Bytes(),
3984		}
3985		return err
3986	}
3987
3988	errorBody.Seek(0, io.SeekStart)
3989	if len(code) != 0 {
3990		errorCode = restjson.SanitizeErrorCode(code)
3991	}
3992	if len(message) != 0 {
3993		errorMessage = message
3994	}
3995
3996	switch {
3997	case strings.EqualFold("WAFInternalErrorException", errorCode):
3998		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
3999
4000	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4001		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4002
4003	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4004		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4005
4006	default:
4007		genericError := &smithy.GenericAPIError{
4008			Code:    errorCode,
4009			Message: errorMessage,
4010		}
4011		return genericError
4012
4013	}
4014}
4015
4016type awsAwsjson11_deserializeOpGetLoggingConfiguration struct {
4017}
4018
4019func (*awsAwsjson11_deserializeOpGetLoggingConfiguration) ID() string {
4020	return "OperationDeserializer"
4021}
4022
4023func (m *awsAwsjson11_deserializeOpGetLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4024	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4025) {
4026	out, metadata, err = next.HandleDeserialize(ctx, in)
4027	if err != nil {
4028		return out, metadata, err
4029	}
4030
4031	response, ok := out.RawResponse.(*smithyhttp.Response)
4032	if !ok {
4033		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4034	}
4035
4036	if response.StatusCode < 200 || response.StatusCode >= 300 {
4037		return out, metadata, awsAwsjson11_deserializeOpErrorGetLoggingConfiguration(response, &metadata)
4038	}
4039	output := &GetLoggingConfigurationOutput{}
4040	out.Result = output
4041
4042	var buff [1024]byte
4043	ringBuffer := smithyio.NewRingBuffer(buff[:])
4044
4045	body := io.TeeReader(response.Body, ringBuffer)
4046	decoder := json.NewDecoder(body)
4047	decoder.UseNumber()
4048	var shape interface{}
4049	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4050		var snapshot bytes.Buffer
4051		io.Copy(&snapshot, ringBuffer)
4052		err = &smithy.DeserializationError{
4053			Err:      fmt.Errorf("failed to decode response body, %w", err),
4054			Snapshot: snapshot.Bytes(),
4055		}
4056		return out, metadata, err
4057	}
4058
4059	err = awsAwsjson11_deserializeOpDocumentGetLoggingConfigurationOutput(&output, shape)
4060	if err != nil {
4061		var snapshot bytes.Buffer
4062		io.Copy(&snapshot, ringBuffer)
4063		err = &smithy.DeserializationError{
4064			Err:      fmt.Errorf("failed to decode response body, %w", err),
4065			Snapshot: snapshot.Bytes(),
4066		}
4067		return out, metadata, err
4068	}
4069
4070	return out, metadata, err
4071}
4072
4073func awsAwsjson11_deserializeOpErrorGetLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4074	var errorBuffer bytes.Buffer
4075	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4076		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4077	}
4078	errorBody := bytes.NewReader(errorBuffer.Bytes())
4079
4080	errorCode := "UnknownError"
4081	errorMessage := errorCode
4082
4083	code := response.Header.Get("X-Amzn-ErrorType")
4084	if len(code) != 0 {
4085		errorCode = restjson.SanitizeErrorCode(code)
4086	}
4087
4088	var buff [1024]byte
4089	ringBuffer := smithyio.NewRingBuffer(buff[:])
4090
4091	body := io.TeeReader(errorBody, ringBuffer)
4092	decoder := json.NewDecoder(body)
4093	decoder.UseNumber()
4094	code, message, err := restjson.GetErrorInfo(decoder)
4095	if err != nil {
4096		var snapshot bytes.Buffer
4097		io.Copy(&snapshot, ringBuffer)
4098		err = &smithy.DeserializationError{
4099			Err:      fmt.Errorf("failed to decode response body, %w", err),
4100			Snapshot: snapshot.Bytes(),
4101		}
4102		return err
4103	}
4104
4105	errorBody.Seek(0, io.SeekStart)
4106	if len(code) != 0 {
4107		errorCode = restjson.SanitizeErrorCode(code)
4108	}
4109	if len(message) != 0 {
4110		errorMessage = message
4111	}
4112
4113	switch {
4114	case strings.EqualFold("WAFInternalErrorException", errorCode):
4115		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4116
4117	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4118		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4119
4120	default:
4121		genericError := &smithy.GenericAPIError{
4122			Code:    errorCode,
4123			Message: errorMessage,
4124		}
4125		return genericError
4126
4127	}
4128}
4129
4130type awsAwsjson11_deserializeOpGetPermissionPolicy struct {
4131}
4132
4133func (*awsAwsjson11_deserializeOpGetPermissionPolicy) ID() string {
4134	return "OperationDeserializer"
4135}
4136
4137func (m *awsAwsjson11_deserializeOpGetPermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4138	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4139) {
4140	out, metadata, err = next.HandleDeserialize(ctx, in)
4141	if err != nil {
4142		return out, metadata, err
4143	}
4144
4145	response, ok := out.RawResponse.(*smithyhttp.Response)
4146	if !ok {
4147		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4148	}
4149
4150	if response.StatusCode < 200 || response.StatusCode >= 300 {
4151		return out, metadata, awsAwsjson11_deserializeOpErrorGetPermissionPolicy(response, &metadata)
4152	}
4153	output := &GetPermissionPolicyOutput{}
4154	out.Result = output
4155
4156	var buff [1024]byte
4157	ringBuffer := smithyio.NewRingBuffer(buff[:])
4158
4159	body := io.TeeReader(response.Body, ringBuffer)
4160	decoder := json.NewDecoder(body)
4161	decoder.UseNumber()
4162	var shape interface{}
4163	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4164		var snapshot bytes.Buffer
4165		io.Copy(&snapshot, ringBuffer)
4166		err = &smithy.DeserializationError{
4167			Err:      fmt.Errorf("failed to decode response body, %w", err),
4168			Snapshot: snapshot.Bytes(),
4169		}
4170		return out, metadata, err
4171	}
4172
4173	err = awsAwsjson11_deserializeOpDocumentGetPermissionPolicyOutput(&output, shape)
4174	if err != nil {
4175		var snapshot bytes.Buffer
4176		io.Copy(&snapshot, ringBuffer)
4177		err = &smithy.DeserializationError{
4178			Err:      fmt.Errorf("failed to decode response body, %w", err),
4179			Snapshot: snapshot.Bytes(),
4180		}
4181		return out, metadata, err
4182	}
4183
4184	return out, metadata, err
4185}
4186
4187func awsAwsjson11_deserializeOpErrorGetPermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4188	var errorBuffer bytes.Buffer
4189	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4190		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4191	}
4192	errorBody := bytes.NewReader(errorBuffer.Bytes())
4193
4194	errorCode := "UnknownError"
4195	errorMessage := errorCode
4196
4197	code := response.Header.Get("X-Amzn-ErrorType")
4198	if len(code) != 0 {
4199		errorCode = restjson.SanitizeErrorCode(code)
4200	}
4201
4202	var buff [1024]byte
4203	ringBuffer := smithyio.NewRingBuffer(buff[:])
4204
4205	body := io.TeeReader(errorBody, ringBuffer)
4206	decoder := json.NewDecoder(body)
4207	decoder.UseNumber()
4208	code, message, err := restjson.GetErrorInfo(decoder)
4209	if err != nil {
4210		var snapshot bytes.Buffer
4211		io.Copy(&snapshot, ringBuffer)
4212		err = &smithy.DeserializationError{
4213			Err:      fmt.Errorf("failed to decode response body, %w", err),
4214			Snapshot: snapshot.Bytes(),
4215		}
4216		return err
4217	}
4218
4219	errorBody.Seek(0, io.SeekStart)
4220	if len(code) != 0 {
4221		errorCode = restjson.SanitizeErrorCode(code)
4222	}
4223	if len(message) != 0 {
4224		errorMessage = message
4225	}
4226
4227	switch {
4228	case strings.EqualFold("WAFInternalErrorException", errorCode):
4229		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4230
4231	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4232		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4233
4234	default:
4235		genericError := &smithy.GenericAPIError{
4236			Code:    errorCode,
4237			Message: errorMessage,
4238		}
4239		return genericError
4240
4241	}
4242}
4243
4244type awsAwsjson11_deserializeOpGetRateBasedRule struct {
4245}
4246
4247func (*awsAwsjson11_deserializeOpGetRateBasedRule) ID() string {
4248	return "OperationDeserializer"
4249}
4250
4251func (m *awsAwsjson11_deserializeOpGetRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4252	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4253) {
4254	out, metadata, err = next.HandleDeserialize(ctx, in)
4255	if err != nil {
4256		return out, metadata, err
4257	}
4258
4259	response, ok := out.RawResponse.(*smithyhttp.Response)
4260	if !ok {
4261		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4262	}
4263
4264	if response.StatusCode < 200 || response.StatusCode >= 300 {
4265		return out, metadata, awsAwsjson11_deserializeOpErrorGetRateBasedRule(response, &metadata)
4266	}
4267	output := &GetRateBasedRuleOutput{}
4268	out.Result = output
4269
4270	var buff [1024]byte
4271	ringBuffer := smithyio.NewRingBuffer(buff[:])
4272
4273	body := io.TeeReader(response.Body, ringBuffer)
4274	decoder := json.NewDecoder(body)
4275	decoder.UseNumber()
4276	var shape interface{}
4277	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4278		var snapshot bytes.Buffer
4279		io.Copy(&snapshot, ringBuffer)
4280		err = &smithy.DeserializationError{
4281			Err:      fmt.Errorf("failed to decode response body, %w", err),
4282			Snapshot: snapshot.Bytes(),
4283		}
4284		return out, metadata, err
4285	}
4286
4287	err = awsAwsjson11_deserializeOpDocumentGetRateBasedRuleOutput(&output, shape)
4288	if err != nil {
4289		var snapshot bytes.Buffer
4290		io.Copy(&snapshot, ringBuffer)
4291		err = &smithy.DeserializationError{
4292			Err:      fmt.Errorf("failed to decode response body, %w", err),
4293			Snapshot: snapshot.Bytes(),
4294		}
4295		return out, metadata, err
4296	}
4297
4298	return out, metadata, err
4299}
4300
4301func awsAwsjson11_deserializeOpErrorGetRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4302	var errorBuffer bytes.Buffer
4303	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4304		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4305	}
4306	errorBody := bytes.NewReader(errorBuffer.Bytes())
4307
4308	errorCode := "UnknownError"
4309	errorMessage := errorCode
4310
4311	code := response.Header.Get("X-Amzn-ErrorType")
4312	if len(code) != 0 {
4313		errorCode = restjson.SanitizeErrorCode(code)
4314	}
4315
4316	var buff [1024]byte
4317	ringBuffer := smithyio.NewRingBuffer(buff[:])
4318
4319	body := io.TeeReader(errorBody, ringBuffer)
4320	decoder := json.NewDecoder(body)
4321	decoder.UseNumber()
4322	code, message, err := restjson.GetErrorInfo(decoder)
4323	if err != nil {
4324		var snapshot bytes.Buffer
4325		io.Copy(&snapshot, ringBuffer)
4326		err = &smithy.DeserializationError{
4327			Err:      fmt.Errorf("failed to decode response body, %w", err),
4328			Snapshot: snapshot.Bytes(),
4329		}
4330		return err
4331	}
4332
4333	errorBody.Seek(0, io.SeekStart)
4334	if len(code) != 0 {
4335		errorCode = restjson.SanitizeErrorCode(code)
4336	}
4337	if len(message) != 0 {
4338		errorMessage = message
4339	}
4340
4341	switch {
4342	case strings.EqualFold("WAFInternalErrorException", errorCode):
4343		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4344
4345	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4346		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4347
4348	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4349		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4350
4351	default:
4352		genericError := &smithy.GenericAPIError{
4353			Code:    errorCode,
4354			Message: errorMessage,
4355		}
4356		return genericError
4357
4358	}
4359}
4360
4361type awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys struct {
4362}
4363
4364func (*awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys) ID() string {
4365	return "OperationDeserializer"
4366}
4367
4368func (m *awsAwsjson11_deserializeOpGetRateBasedRuleManagedKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4369	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4370) {
4371	out, metadata, err = next.HandleDeserialize(ctx, in)
4372	if err != nil {
4373		return out, metadata, err
4374	}
4375
4376	response, ok := out.RawResponse.(*smithyhttp.Response)
4377	if !ok {
4378		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4379	}
4380
4381	if response.StatusCode < 200 || response.StatusCode >= 300 {
4382		return out, metadata, awsAwsjson11_deserializeOpErrorGetRateBasedRuleManagedKeys(response, &metadata)
4383	}
4384	output := &GetRateBasedRuleManagedKeysOutput{}
4385	out.Result = output
4386
4387	var buff [1024]byte
4388	ringBuffer := smithyio.NewRingBuffer(buff[:])
4389
4390	body := io.TeeReader(response.Body, ringBuffer)
4391	decoder := json.NewDecoder(body)
4392	decoder.UseNumber()
4393	var shape interface{}
4394	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4395		var snapshot bytes.Buffer
4396		io.Copy(&snapshot, ringBuffer)
4397		err = &smithy.DeserializationError{
4398			Err:      fmt.Errorf("failed to decode response body, %w", err),
4399			Snapshot: snapshot.Bytes(),
4400		}
4401		return out, metadata, err
4402	}
4403
4404	err = awsAwsjson11_deserializeOpDocumentGetRateBasedRuleManagedKeysOutput(&output, shape)
4405	if err != nil {
4406		var snapshot bytes.Buffer
4407		io.Copy(&snapshot, ringBuffer)
4408		err = &smithy.DeserializationError{
4409			Err:      fmt.Errorf("failed to decode response body, %w", err),
4410			Snapshot: snapshot.Bytes(),
4411		}
4412		return out, metadata, err
4413	}
4414
4415	return out, metadata, err
4416}
4417
4418func awsAwsjson11_deserializeOpErrorGetRateBasedRuleManagedKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4419	var errorBuffer bytes.Buffer
4420	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4421		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4422	}
4423	errorBody := bytes.NewReader(errorBuffer.Bytes())
4424
4425	errorCode := "UnknownError"
4426	errorMessage := errorCode
4427
4428	code := response.Header.Get("X-Amzn-ErrorType")
4429	if len(code) != 0 {
4430		errorCode = restjson.SanitizeErrorCode(code)
4431	}
4432
4433	var buff [1024]byte
4434	ringBuffer := smithyio.NewRingBuffer(buff[:])
4435
4436	body := io.TeeReader(errorBody, ringBuffer)
4437	decoder := json.NewDecoder(body)
4438	decoder.UseNumber()
4439	code, message, err := restjson.GetErrorInfo(decoder)
4440	if err != nil {
4441		var snapshot bytes.Buffer
4442		io.Copy(&snapshot, ringBuffer)
4443		err = &smithy.DeserializationError{
4444			Err:      fmt.Errorf("failed to decode response body, %w", err),
4445			Snapshot: snapshot.Bytes(),
4446		}
4447		return err
4448	}
4449
4450	errorBody.Seek(0, io.SeekStart)
4451	if len(code) != 0 {
4452		errorCode = restjson.SanitizeErrorCode(code)
4453	}
4454	if len(message) != 0 {
4455		errorMessage = message
4456	}
4457
4458	switch {
4459	case strings.EqualFold("WAFInternalErrorException", errorCode):
4460		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4461
4462	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4463		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4464
4465	case strings.EqualFold("WAFInvalidParameterException", errorCode):
4466		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
4467
4468	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4469		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4470
4471	default:
4472		genericError := &smithy.GenericAPIError{
4473			Code:    errorCode,
4474			Message: errorMessage,
4475		}
4476		return genericError
4477
4478	}
4479}
4480
4481type awsAwsjson11_deserializeOpGetRegexMatchSet struct {
4482}
4483
4484func (*awsAwsjson11_deserializeOpGetRegexMatchSet) ID() string {
4485	return "OperationDeserializer"
4486}
4487
4488func (m *awsAwsjson11_deserializeOpGetRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4489	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4490) {
4491	out, metadata, err = next.HandleDeserialize(ctx, in)
4492	if err != nil {
4493		return out, metadata, err
4494	}
4495
4496	response, ok := out.RawResponse.(*smithyhttp.Response)
4497	if !ok {
4498		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4499	}
4500
4501	if response.StatusCode < 200 || response.StatusCode >= 300 {
4502		return out, metadata, awsAwsjson11_deserializeOpErrorGetRegexMatchSet(response, &metadata)
4503	}
4504	output := &GetRegexMatchSetOutput{}
4505	out.Result = output
4506
4507	var buff [1024]byte
4508	ringBuffer := smithyio.NewRingBuffer(buff[:])
4509
4510	body := io.TeeReader(response.Body, ringBuffer)
4511	decoder := json.NewDecoder(body)
4512	decoder.UseNumber()
4513	var shape interface{}
4514	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4515		var snapshot bytes.Buffer
4516		io.Copy(&snapshot, ringBuffer)
4517		err = &smithy.DeserializationError{
4518			Err:      fmt.Errorf("failed to decode response body, %w", err),
4519			Snapshot: snapshot.Bytes(),
4520		}
4521		return out, metadata, err
4522	}
4523
4524	err = awsAwsjson11_deserializeOpDocumentGetRegexMatchSetOutput(&output, shape)
4525	if err != nil {
4526		var snapshot bytes.Buffer
4527		io.Copy(&snapshot, ringBuffer)
4528		err = &smithy.DeserializationError{
4529			Err:      fmt.Errorf("failed to decode response body, %w", err),
4530			Snapshot: snapshot.Bytes(),
4531		}
4532		return out, metadata, err
4533	}
4534
4535	return out, metadata, err
4536}
4537
4538func awsAwsjson11_deserializeOpErrorGetRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4539	var errorBuffer bytes.Buffer
4540	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4541		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4542	}
4543	errorBody := bytes.NewReader(errorBuffer.Bytes())
4544
4545	errorCode := "UnknownError"
4546	errorMessage := errorCode
4547
4548	code := response.Header.Get("X-Amzn-ErrorType")
4549	if len(code) != 0 {
4550		errorCode = restjson.SanitizeErrorCode(code)
4551	}
4552
4553	var buff [1024]byte
4554	ringBuffer := smithyio.NewRingBuffer(buff[:])
4555
4556	body := io.TeeReader(errorBody, ringBuffer)
4557	decoder := json.NewDecoder(body)
4558	decoder.UseNumber()
4559	code, message, err := restjson.GetErrorInfo(decoder)
4560	if err != nil {
4561		var snapshot bytes.Buffer
4562		io.Copy(&snapshot, ringBuffer)
4563		err = &smithy.DeserializationError{
4564			Err:      fmt.Errorf("failed to decode response body, %w", err),
4565			Snapshot: snapshot.Bytes(),
4566		}
4567		return err
4568	}
4569
4570	errorBody.Seek(0, io.SeekStart)
4571	if len(code) != 0 {
4572		errorCode = restjson.SanitizeErrorCode(code)
4573	}
4574	if len(message) != 0 {
4575		errorMessage = message
4576	}
4577
4578	switch {
4579	case strings.EqualFold("WAFInternalErrorException", errorCode):
4580		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4581
4582	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4583		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4584
4585	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4586		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4587
4588	default:
4589		genericError := &smithy.GenericAPIError{
4590			Code:    errorCode,
4591			Message: errorMessage,
4592		}
4593		return genericError
4594
4595	}
4596}
4597
4598type awsAwsjson11_deserializeOpGetRegexPatternSet struct {
4599}
4600
4601func (*awsAwsjson11_deserializeOpGetRegexPatternSet) ID() string {
4602	return "OperationDeserializer"
4603}
4604
4605func (m *awsAwsjson11_deserializeOpGetRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4606	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4607) {
4608	out, metadata, err = next.HandleDeserialize(ctx, in)
4609	if err != nil {
4610		return out, metadata, err
4611	}
4612
4613	response, ok := out.RawResponse.(*smithyhttp.Response)
4614	if !ok {
4615		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4616	}
4617
4618	if response.StatusCode < 200 || response.StatusCode >= 300 {
4619		return out, metadata, awsAwsjson11_deserializeOpErrorGetRegexPatternSet(response, &metadata)
4620	}
4621	output := &GetRegexPatternSetOutput{}
4622	out.Result = output
4623
4624	var buff [1024]byte
4625	ringBuffer := smithyio.NewRingBuffer(buff[:])
4626
4627	body := io.TeeReader(response.Body, ringBuffer)
4628	decoder := json.NewDecoder(body)
4629	decoder.UseNumber()
4630	var shape interface{}
4631	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4632		var snapshot bytes.Buffer
4633		io.Copy(&snapshot, ringBuffer)
4634		err = &smithy.DeserializationError{
4635			Err:      fmt.Errorf("failed to decode response body, %w", err),
4636			Snapshot: snapshot.Bytes(),
4637		}
4638		return out, metadata, err
4639	}
4640
4641	err = awsAwsjson11_deserializeOpDocumentGetRegexPatternSetOutput(&output, shape)
4642	if err != nil {
4643		var snapshot bytes.Buffer
4644		io.Copy(&snapshot, ringBuffer)
4645		err = &smithy.DeserializationError{
4646			Err:      fmt.Errorf("failed to decode response body, %w", err),
4647			Snapshot: snapshot.Bytes(),
4648		}
4649		return out, metadata, err
4650	}
4651
4652	return out, metadata, err
4653}
4654
4655func awsAwsjson11_deserializeOpErrorGetRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4656	var errorBuffer bytes.Buffer
4657	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4658		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4659	}
4660	errorBody := bytes.NewReader(errorBuffer.Bytes())
4661
4662	errorCode := "UnknownError"
4663	errorMessage := errorCode
4664
4665	code := response.Header.Get("X-Amzn-ErrorType")
4666	if len(code) != 0 {
4667		errorCode = restjson.SanitizeErrorCode(code)
4668	}
4669
4670	var buff [1024]byte
4671	ringBuffer := smithyio.NewRingBuffer(buff[:])
4672
4673	body := io.TeeReader(errorBody, ringBuffer)
4674	decoder := json.NewDecoder(body)
4675	decoder.UseNumber()
4676	code, message, err := restjson.GetErrorInfo(decoder)
4677	if err != nil {
4678		var snapshot bytes.Buffer
4679		io.Copy(&snapshot, ringBuffer)
4680		err = &smithy.DeserializationError{
4681			Err:      fmt.Errorf("failed to decode response body, %w", err),
4682			Snapshot: snapshot.Bytes(),
4683		}
4684		return err
4685	}
4686
4687	errorBody.Seek(0, io.SeekStart)
4688	if len(code) != 0 {
4689		errorCode = restjson.SanitizeErrorCode(code)
4690	}
4691	if len(message) != 0 {
4692		errorMessage = message
4693	}
4694
4695	switch {
4696	case strings.EqualFold("WAFInternalErrorException", errorCode):
4697		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4698
4699	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4700		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4701
4702	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4703		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4704
4705	default:
4706		genericError := &smithy.GenericAPIError{
4707			Code:    errorCode,
4708			Message: errorMessage,
4709		}
4710		return genericError
4711
4712	}
4713}
4714
4715type awsAwsjson11_deserializeOpGetRule struct {
4716}
4717
4718func (*awsAwsjson11_deserializeOpGetRule) ID() string {
4719	return "OperationDeserializer"
4720}
4721
4722func (m *awsAwsjson11_deserializeOpGetRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4723	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4724) {
4725	out, metadata, err = next.HandleDeserialize(ctx, in)
4726	if err != nil {
4727		return out, metadata, err
4728	}
4729
4730	response, ok := out.RawResponse.(*smithyhttp.Response)
4731	if !ok {
4732		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4733	}
4734
4735	if response.StatusCode < 200 || response.StatusCode >= 300 {
4736		return out, metadata, awsAwsjson11_deserializeOpErrorGetRule(response, &metadata)
4737	}
4738	output := &GetRuleOutput{}
4739	out.Result = output
4740
4741	var buff [1024]byte
4742	ringBuffer := smithyio.NewRingBuffer(buff[:])
4743
4744	body := io.TeeReader(response.Body, ringBuffer)
4745	decoder := json.NewDecoder(body)
4746	decoder.UseNumber()
4747	var shape interface{}
4748	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4749		var snapshot bytes.Buffer
4750		io.Copy(&snapshot, ringBuffer)
4751		err = &smithy.DeserializationError{
4752			Err:      fmt.Errorf("failed to decode response body, %w", err),
4753			Snapshot: snapshot.Bytes(),
4754		}
4755		return out, metadata, err
4756	}
4757
4758	err = awsAwsjson11_deserializeOpDocumentGetRuleOutput(&output, shape)
4759	if err != nil {
4760		var snapshot bytes.Buffer
4761		io.Copy(&snapshot, ringBuffer)
4762		err = &smithy.DeserializationError{
4763			Err:      fmt.Errorf("failed to decode response body, %w", err),
4764			Snapshot: snapshot.Bytes(),
4765		}
4766		return out, metadata, err
4767	}
4768
4769	return out, metadata, err
4770}
4771
4772func awsAwsjson11_deserializeOpErrorGetRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4773	var errorBuffer bytes.Buffer
4774	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4775		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4776	}
4777	errorBody := bytes.NewReader(errorBuffer.Bytes())
4778
4779	errorCode := "UnknownError"
4780	errorMessage := errorCode
4781
4782	code := response.Header.Get("X-Amzn-ErrorType")
4783	if len(code) != 0 {
4784		errorCode = restjson.SanitizeErrorCode(code)
4785	}
4786
4787	var buff [1024]byte
4788	ringBuffer := smithyio.NewRingBuffer(buff[:])
4789
4790	body := io.TeeReader(errorBody, ringBuffer)
4791	decoder := json.NewDecoder(body)
4792	decoder.UseNumber()
4793	code, message, err := restjson.GetErrorInfo(decoder)
4794	if err != nil {
4795		var snapshot bytes.Buffer
4796		io.Copy(&snapshot, ringBuffer)
4797		err = &smithy.DeserializationError{
4798			Err:      fmt.Errorf("failed to decode response body, %w", err),
4799			Snapshot: snapshot.Bytes(),
4800		}
4801		return err
4802	}
4803
4804	errorBody.Seek(0, io.SeekStart)
4805	if len(code) != 0 {
4806		errorCode = restjson.SanitizeErrorCode(code)
4807	}
4808	if len(message) != 0 {
4809		errorMessage = message
4810	}
4811
4812	switch {
4813	case strings.EqualFold("WAFInternalErrorException", errorCode):
4814		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4815
4816	case strings.EqualFold("WAFInvalidAccountException", errorCode):
4817		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
4818
4819	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4820		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4821
4822	default:
4823		genericError := &smithy.GenericAPIError{
4824			Code:    errorCode,
4825			Message: errorMessage,
4826		}
4827		return genericError
4828
4829	}
4830}
4831
4832type awsAwsjson11_deserializeOpGetRuleGroup struct {
4833}
4834
4835func (*awsAwsjson11_deserializeOpGetRuleGroup) ID() string {
4836	return "OperationDeserializer"
4837}
4838
4839func (m *awsAwsjson11_deserializeOpGetRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4840	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4841) {
4842	out, metadata, err = next.HandleDeserialize(ctx, in)
4843	if err != nil {
4844		return out, metadata, err
4845	}
4846
4847	response, ok := out.RawResponse.(*smithyhttp.Response)
4848	if !ok {
4849		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4850	}
4851
4852	if response.StatusCode < 200 || response.StatusCode >= 300 {
4853		return out, metadata, awsAwsjson11_deserializeOpErrorGetRuleGroup(response, &metadata)
4854	}
4855	output := &GetRuleGroupOutput{}
4856	out.Result = output
4857
4858	var buff [1024]byte
4859	ringBuffer := smithyio.NewRingBuffer(buff[:])
4860
4861	body := io.TeeReader(response.Body, ringBuffer)
4862	decoder := json.NewDecoder(body)
4863	decoder.UseNumber()
4864	var shape interface{}
4865	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4866		var snapshot bytes.Buffer
4867		io.Copy(&snapshot, ringBuffer)
4868		err = &smithy.DeserializationError{
4869			Err:      fmt.Errorf("failed to decode response body, %w", err),
4870			Snapshot: snapshot.Bytes(),
4871		}
4872		return out, metadata, err
4873	}
4874
4875	err = awsAwsjson11_deserializeOpDocumentGetRuleGroupOutput(&output, shape)
4876	if err != nil {
4877		var snapshot bytes.Buffer
4878		io.Copy(&snapshot, ringBuffer)
4879		err = &smithy.DeserializationError{
4880			Err:      fmt.Errorf("failed to decode response body, %w", err),
4881			Snapshot: snapshot.Bytes(),
4882		}
4883		return out, metadata, err
4884	}
4885
4886	return out, metadata, err
4887}
4888
4889func awsAwsjson11_deserializeOpErrorGetRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4890	var errorBuffer bytes.Buffer
4891	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4892		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4893	}
4894	errorBody := bytes.NewReader(errorBuffer.Bytes())
4895
4896	errorCode := "UnknownError"
4897	errorMessage := errorCode
4898
4899	code := response.Header.Get("X-Amzn-ErrorType")
4900	if len(code) != 0 {
4901		errorCode = restjson.SanitizeErrorCode(code)
4902	}
4903
4904	var buff [1024]byte
4905	ringBuffer := smithyio.NewRingBuffer(buff[:])
4906
4907	body := io.TeeReader(errorBody, ringBuffer)
4908	decoder := json.NewDecoder(body)
4909	decoder.UseNumber()
4910	code, message, err := restjson.GetErrorInfo(decoder)
4911	if err != nil {
4912		var snapshot bytes.Buffer
4913		io.Copy(&snapshot, ringBuffer)
4914		err = &smithy.DeserializationError{
4915			Err:      fmt.Errorf("failed to decode response body, %w", err),
4916			Snapshot: snapshot.Bytes(),
4917		}
4918		return err
4919	}
4920
4921	errorBody.Seek(0, io.SeekStart)
4922	if len(code) != 0 {
4923		errorCode = restjson.SanitizeErrorCode(code)
4924	}
4925	if len(message) != 0 {
4926		errorMessage = message
4927	}
4928
4929	switch {
4930	case strings.EqualFold("WAFInternalErrorException", errorCode):
4931		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
4932
4933	case strings.EqualFold("WAFNonexistentItemException", errorCode):
4934		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
4935
4936	default:
4937		genericError := &smithy.GenericAPIError{
4938			Code:    errorCode,
4939			Message: errorMessage,
4940		}
4941		return genericError
4942
4943	}
4944}
4945
4946type awsAwsjson11_deserializeOpGetSampledRequests struct {
4947}
4948
4949func (*awsAwsjson11_deserializeOpGetSampledRequests) ID() string {
4950	return "OperationDeserializer"
4951}
4952
4953func (m *awsAwsjson11_deserializeOpGetSampledRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4954	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4955) {
4956	out, metadata, err = next.HandleDeserialize(ctx, in)
4957	if err != nil {
4958		return out, metadata, err
4959	}
4960
4961	response, ok := out.RawResponse.(*smithyhttp.Response)
4962	if !ok {
4963		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4964	}
4965
4966	if response.StatusCode < 200 || response.StatusCode >= 300 {
4967		return out, metadata, awsAwsjson11_deserializeOpErrorGetSampledRequests(response, &metadata)
4968	}
4969	output := &GetSampledRequestsOutput{}
4970	out.Result = output
4971
4972	var buff [1024]byte
4973	ringBuffer := smithyio.NewRingBuffer(buff[:])
4974
4975	body := io.TeeReader(response.Body, ringBuffer)
4976	decoder := json.NewDecoder(body)
4977	decoder.UseNumber()
4978	var shape interface{}
4979	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4980		var snapshot bytes.Buffer
4981		io.Copy(&snapshot, ringBuffer)
4982		err = &smithy.DeserializationError{
4983			Err:      fmt.Errorf("failed to decode response body, %w", err),
4984			Snapshot: snapshot.Bytes(),
4985		}
4986		return out, metadata, err
4987	}
4988
4989	err = awsAwsjson11_deserializeOpDocumentGetSampledRequestsOutput(&output, shape)
4990	if err != nil {
4991		var snapshot bytes.Buffer
4992		io.Copy(&snapshot, ringBuffer)
4993		err = &smithy.DeserializationError{
4994			Err:      fmt.Errorf("failed to decode response body, %w", err),
4995			Snapshot: snapshot.Bytes(),
4996		}
4997		return out, metadata, err
4998	}
4999
5000	return out, metadata, err
5001}
5002
5003func awsAwsjson11_deserializeOpErrorGetSampledRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5004	var errorBuffer bytes.Buffer
5005	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5006		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5007	}
5008	errorBody := bytes.NewReader(errorBuffer.Bytes())
5009
5010	errorCode := "UnknownError"
5011	errorMessage := errorCode
5012
5013	code := response.Header.Get("X-Amzn-ErrorType")
5014	if len(code) != 0 {
5015		errorCode = restjson.SanitizeErrorCode(code)
5016	}
5017
5018	var buff [1024]byte
5019	ringBuffer := smithyio.NewRingBuffer(buff[:])
5020
5021	body := io.TeeReader(errorBody, ringBuffer)
5022	decoder := json.NewDecoder(body)
5023	decoder.UseNumber()
5024	code, message, err := restjson.GetErrorInfo(decoder)
5025	if err != nil {
5026		var snapshot bytes.Buffer
5027		io.Copy(&snapshot, ringBuffer)
5028		err = &smithy.DeserializationError{
5029			Err:      fmt.Errorf("failed to decode response body, %w", err),
5030			Snapshot: snapshot.Bytes(),
5031		}
5032		return err
5033	}
5034
5035	errorBody.Seek(0, io.SeekStart)
5036	if len(code) != 0 {
5037		errorCode = restjson.SanitizeErrorCode(code)
5038	}
5039	if len(message) != 0 {
5040		errorMessage = message
5041	}
5042
5043	switch {
5044	case strings.EqualFold("WAFInternalErrorException", errorCode):
5045		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5046
5047	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5048		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5049
5050	default:
5051		genericError := &smithy.GenericAPIError{
5052			Code:    errorCode,
5053			Message: errorMessage,
5054		}
5055		return genericError
5056
5057	}
5058}
5059
5060type awsAwsjson11_deserializeOpGetSizeConstraintSet struct {
5061}
5062
5063func (*awsAwsjson11_deserializeOpGetSizeConstraintSet) ID() string {
5064	return "OperationDeserializer"
5065}
5066
5067func (m *awsAwsjson11_deserializeOpGetSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5068	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5069) {
5070	out, metadata, err = next.HandleDeserialize(ctx, in)
5071	if err != nil {
5072		return out, metadata, err
5073	}
5074
5075	response, ok := out.RawResponse.(*smithyhttp.Response)
5076	if !ok {
5077		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5078	}
5079
5080	if response.StatusCode < 200 || response.StatusCode >= 300 {
5081		return out, metadata, awsAwsjson11_deserializeOpErrorGetSizeConstraintSet(response, &metadata)
5082	}
5083	output := &GetSizeConstraintSetOutput{}
5084	out.Result = output
5085
5086	var buff [1024]byte
5087	ringBuffer := smithyio.NewRingBuffer(buff[:])
5088
5089	body := io.TeeReader(response.Body, ringBuffer)
5090	decoder := json.NewDecoder(body)
5091	decoder.UseNumber()
5092	var shape interface{}
5093	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5094		var snapshot bytes.Buffer
5095		io.Copy(&snapshot, ringBuffer)
5096		err = &smithy.DeserializationError{
5097			Err:      fmt.Errorf("failed to decode response body, %w", err),
5098			Snapshot: snapshot.Bytes(),
5099		}
5100		return out, metadata, err
5101	}
5102
5103	err = awsAwsjson11_deserializeOpDocumentGetSizeConstraintSetOutput(&output, shape)
5104	if err != nil {
5105		var snapshot bytes.Buffer
5106		io.Copy(&snapshot, ringBuffer)
5107		err = &smithy.DeserializationError{
5108			Err:      fmt.Errorf("failed to decode response body, %w", err),
5109			Snapshot: snapshot.Bytes(),
5110		}
5111		return out, metadata, err
5112	}
5113
5114	return out, metadata, err
5115}
5116
5117func awsAwsjson11_deserializeOpErrorGetSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5118	var errorBuffer bytes.Buffer
5119	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5120		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5121	}
5122	errorBody := bytes.NewReader(errorBuffer.Bytes())
5123
5124	errorCode := "UnknownError"
5125	errorMessage := errorCode
5126
5127	code := response.Header.Get("X-Amzn-ErrorType")
5128	if len(code) != 0 {
5129		errorCode = restjson.SanitizeErrorCode(code)
5130	}
5131
5132	var buff [1024]byte
5133	ringBuffer := smithyio.NewRingBuffer(buff[:])
5134
5135	body := io.TeeReader(errorBody, ringBuffer)
5136	decoder := json.NewDecoder(body)
5137	decoder.UseNumber()
5138	code, message, err := restjson.GetErrorInfo(decoder)
5139	if err != nil {
5140		var snapshot bytes.Buffer
5141		io.Copy(&snapshot, ringBuffer)
5142		err = &smithy.DeserializationError{
5143			Err:      fmt.Errorf("failed to decode response body, %w", err),
5144			Snapshot: snapshot.Bytes(),
5145		}
5146		return err
5147	}
5148
5149	errorBody.Seek(0, io.SeekStart)
5150	if len(code) != 0 {
5151		errorCode = restjson.SanitizeErrorCode(code)
5152	}
5153	if len(message) != 0 {
5154		errorMessage = message
5155	}
5156
5157	switch {
5158	case strings.EqualFold("WAFInternalErrorException", errorCode):
5159		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5160
5161	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5162		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5163
5164	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5165		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5166
5167	default:
5168		genericError := &smithy.GenericAPIError{
5169			Code:    errorCode,
5170			Message: errorMessage,
5171		}
5172		return genericError
5173
5174	}
5175}
5176
5177type awsAwsjson11_deserializeOpGetSqlInjectionMatchSet struct {
5178}
5179
5180func (*awsAwsjson11_deserializeOpGetSqlInjectionMatchSet) ID() string {
5181	return "OperationDeserializer"
5182}
5183
5184func (m *awsAwsjson11_deserializeOpGetSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5185	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5186) {
5187	out, metadata, err = next.HandleDeserialize(ctx, in)
5188	if err != nil {
5189		return out, metadata, err
5190	}
5191
5192	response, ok := out.RawResponse.(*smithyhttp.Response)
5193	if !ok {
5194		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5195	}
5196
5197	if response.StatusCode < 200 || response.StatusCode >= 300 {
5198		return out, metadata, awsAwsjson11_deserializeOpErrorGetSqlInjectionMatchSet(response, &metadata)
5199	}
5200	output := &GetSqlInjectionMatchSetOutput{}
5201	out.Result = output
5202
5203	var buff [1024]byte
5204	ringBuffer := smithyio.NewRingBuffer(buff[:])
5205
5206	body := io.TeeReader(response.Body, ringBuffer)
5207	decoder := json.NewDecoder(body)
5208	decoder.UseNumber()
5209	var shape interface{}
5210	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5211		var snapshot bytes.Buffer
5212		io.Copy(&snapshot, ringBuffer)
5213		err = &smithy.DeserializationError{
5214			Err:      fmt.Errorf("failed to decode response body, %w", err),
5215			Snapshot: snapshot.Bytes(),
5216		}
5217		return out, metadata, err
5218	}
5219
5220	err = awsAwsjson11_deserializeOpDocumentGetSqlInjectionMatchSetOutput(&output, shape)
5221	if err != nil {
5222		var snapshot bytes.Buffer
5223		io.Copy(&snapshot, ringBuffer)
5224		err = &smithy.DeserializationError{
5225			Err:      fmt.Errorf("failed to decode response body, %w", err),
5226			Snapshot: snapshot.Bytes(),
5227		}
5228		return out, metadata, err
5229	}
5230
5231	return out, metadata, err
5232}
5233
5234func awsAwsjson11_deserializeOpErrorGetSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5235	var errorBuffer bytes.Buffer
5236	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5237		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5238	}
5239	errorBody := bytes.NewReader(errorBuffer.Bytes())
5240
5241	errorCode := "UnknownError"
5242	errorMessage := errorCode
5243
5244	code := response.Header.Get("X-Amzn-ErrorType")
5245	if len(code) != 0 {
5246		errorCode = restjson.SanitizeErrorCode(code)
5247	}
5248
5249	var buff [1024]byte
5250	ringBuffer := smithyio.NewRingBuffer(buff[:])
5251
5252	body := io.TeeReader(errorBody, ringBuffer)
5253	decoder := json.NewDecoder(body)
5254	decoder.UseNumber()
5255	code, message, err := restjson.GetErrorInfo(decoder)
5256	if err != nil {
5257		var snapshot bytes.Buffer
5258		io.Copy(&snapshot, ringBuffer)
5259		err = &smithy.DeserializationError{
5260			Err:      fmt.Errorf("failed to decode response body, %w", err),
5261			Snapshot: snapshot.Bytes(),
5262		}
5263		return err
5264	}
5265
5266	errorBody.Seek(0, io.SeekStart)
5267	if len(code) != 0 {
5268		errorCode = restjson.SanitizeErrorCode(code)
5269	}
5270	if len(message) != 0 {
5271		errorMessage = message
5272	}
5273
5274	switch {
5275	case strings.EqualFold("WAFInternalErrorException", errorCode):
5276		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5277
5278	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5279		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5280
5281	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5282		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5283
5284	default:
5285		genericError := &smithy.GenericAPIError{
5286			Code:    errorCode,
5287			Message: errorMessage,
5288		}
5289		return genericError
5290
5291	}
5292}
5293
5294type awsAwsjson11_deserializeOpGetWebACL struct {
5295}
5296
5297func (*awsAwsjson11_deserializeOpGetWebACL) ID() string {
5298	return "OperationDeserializer"
5299}
5300
5301func (m *awsAwsjson11_deserializeOpGetWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5302	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5303) {
5304	out, metadata, err = next.HandleDeserialize(ctx, in)
5305	if err != nil {
5306		return out, metadata, err
5307	}
5308
5309	response, ok := out.RawResponse.(*smithyhttp.Response)
5310	if !ok {
5311		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5312	}
5313
5314	if response.StatusCode < 200 || response.StatusCode >= 300 {
5315		return out, metadata, awsAwsjson11_deserializeOpErrorGetWebACL(response, &metadata)
5316	}
5317	output := &GetWebACLOutput{}
5318	out.Result = output
5319
5320	var buff [1024]byte
5321	ringBuffer := smithyio.NewRingBuffer(buff[:])
5322
5323	body := io.TeeReader(response.Body, ringBuffer)
5324	decoder := json.NewDecoder(body)
5325	decoder.UseNumber()
5326	var shape interface{}
5327	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5328		var snapshot bytes.Buffer
5329		io.Copy(&snapshot, ringBuffer)
5330		err = &smithy.DeserializationError{
5331			Err:      fmt.Errorf("failed to decode response body, %w", err),
5332			Snapshot: snapshot.Bytes(),
5333		}
5334		return out, metadata, err
5335	}
5336
5337	err = awsAwsjson11_deserializeOpDocumentGetWebACLOutput(&output, shape)
5338	if err != nil {
5339		var snapshot bytes.Buffer
5340		io.Copy(&snapshot, ringBuffer)
5341		err = &smithy.DeserializationError{
5342			Err:      fmt.Errorf("failed to decode response body, %w", err),
5343			Snapshot: snapshot.Bytes(),
5344		}
5345		return out, metadata, err
5346	}
5347
5348	return out, metadata, err
5349}
5350
5351func awsAwsjson11_deserializeOpErrorGetWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5352	var errorBuffer bytes.Buffer
5353	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5354		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5355	}
5356	errorBody := bytes.NewReader(errorBuffer.Bytes())
5357
5358	errorCode := "UnknownError"
5359	errorMessage := errorCode
5360
5361	code := response.Header.Get("X-Amzn-ErrorType")
5362	if len(code) != 0 {
5363		errorCode = restjson.SanitizeErrorCode(code)
5364	}
5365
5366	var buff [1024]byte
5367	ringBuffer := smithyio.NewRingBuffer(buff[:])
5368
5369	body := io.TeeReader(errorBody, ringBuffer)
5370	decoder := json.NewDecoder(body)
5371	decoder.UseNumber()
5372	code, message, err := restjson.GetErrorInfo(decoder)
5373	if err != nil {
5374		var snapshot bytes.Buffer
5375		io.Copy(&snapshot, ringBuffer)
5376		err = &smithy.DeserializationError{
5377			Err:      fmt.Errorf("failed to decode response body, %w", err),
5378			Snapshot: snapshot.Bytes(),
5379		}
5380		return err
5381	}
5382
5383	errorBody.Seek(0, io.SeekStart)
5384	if len(code) != 0 {
5385		errorCode = restjson.SanitizeErrorCode(code)
5386	}
5387	if len(message) != 0 {
5388		errorMessage = message
5389	}
5390
5391	switch {
5392	case strings.EqualFold("WAFInternalErrorException", errorCode):
5393		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5394
5395	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5396		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5397
5398	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5399		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5400
5401	default:
5402		genericError := &smithy.GenericAPIError{
5403			Code:    errorCode,
5404			Message: errorMessage,
5405		}
5406		return genericError
5407
5408	}
5409}
5410
5411type awsAwsjson11_deserializeOpGetXssMatchSet struct {
5412}
5413
5414func (*awsAwsjson11_deserializeOpGetXssMatchSet) ID() string {
5415	return "OperationDeserializer"
5416}
5417
5418func (m *awsAwsjson11_deserializeOpGetXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5419	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5420) {
5421	out, metadata, err = next.HandleDeserialize(ctx, in)
5422	if err != nil {
5423		return out, metadata, err
5424	}
5425
5426	response, ok := out.RawResponse.(*smithyhttp.Response)
5427	if !ok {
5428		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5429	}
5430
5431	if response.StatusCode < 200 || response.StatusCode >= 300 {
5432		return out, metadata, awsAwsjson11_deserializeOpErrorGetXssMatchSet(response, &metadata)
5433	}
5434	output := &GetXssMatchSetOutput{}
5435	out.Result = output
5436
5437	var buff [1024]byte
5438	ringBuffer := smithyio.NewRingBuffer(buff[:])
5439
5440	body := io.TeeReader(response.Body, ringBuffer)
5441	decoder := json.NewDecoder(body)
5442	decoder.UseNumber()
5443	var shape interface{}
5444	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5445		var snapshot bytes.Buffer
5446		io.Copy(&snapshot, ringBuffer)
5447		err = &smithy.DeserializationError{
5448			Err:      fmt.Errorf("failed to decode response body, %w", err),
5449			Snapshot: snapshot.Bytes(),
5450		}
5451		return out, metadata, err
5452	}
5453
5454	err = awsAwsjson11_deserializeOpDocumentGetXssMatchSetOutput(&output, shape)
5455	if err != nil {
5456		var snapshot bytes.Buffer
5457		io.Copy(&snapshot, ringBuffer)
5458		err = &smithy.DeserializationError{
5459			Err:      fmt.Errorf("failed to decode response body, %w", err),
5460			Snapshot: snapshot.Bytes(),
5461		}
5462		return out, metadata, err
5463	}
5464
5465	return out, metadata, err
5466}
5467
5468func awsAwsjson11_deserializeOpErrorGetXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5469	var errorBuffer bytes.Buffer
5470	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5471		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5472	}
5473	errorBody := bytes.NewReader(errorBuffer.Bytes())
5474
5475	errorCode := "UnknownError"
5476	errorMessage := errorCode
5477
5478	code := response.Header.Get("X-Amzn-ErrorType")
5479	if len(code) != 0 {
5480		errorCode = restjson.SanitizeErrorCode(code)
5481	}
5482
5483	var buff [1024]byte
5484	ringBuffer := smithyio.NewRingBuffer(buff[:])
5485
5486	body := io.TeeReader(errorBody, ringBuffer)
5487	decoder := json.NewDecoder(body)
5488	decoder.UseNumber()
5489	code, message, err := restjson.GetErrorInfo(decoder)
5490	if err != nil {
5491		var snapshot bytes.Buffer
5492		io.Copy(&snapshot, ringBuffer)
5493		err = &smithy.DeserializationError{
5494			Err:      fmt.Errorf("failed to decode response body, %w", err),
5495			Snapshot: snapshot.Bytes(),
5496		}
5497		return err
5498	}
5499
5500	errorBody.Seek(0, io.SeekStart)
5501	if len(code) != 0 {
5502		errorCode = restjson.SanitizeErrorCode(code)
5503	}
5504	if len(message) != 0 {
5505		errorMessage = message
5506	}
5507
5508	switch {
5509	case strings.EqualFold("WAFInternalErrorException", errorCode):
5510		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5511
5512	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5513		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5514
5515	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5516		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5517
5518	default:
5519		genericError := &smithy.GenericAPIError{
5520			Code:    errorCode,
5521			Message: errorMessage,
5522		}
5523		return genericError
5524
5525	}
5526}
5527
5528type awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup struct {
5529}
5530
5531func (*awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup) ID() string {
5532	return "OperationDeserializer"
5533}
5534
5535func (m *awsAwsjson11_deserializeOpListActivatedRulesInRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5536	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5537) {
5538	out, metadata, err = next.HandleDeserialize(ctx, in)
5539	if err != nil {
5540		return out, metadata, err
5541	}
5542
5543	response, ok := out.RawResponse.(*smithyhttp.Response)
5544	if !ok {
5545		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5546	}
5547
5548	if response.StatusCode < 200 || response.StatusCode >= 300 {
5549		return out, metadata, awsAwsjson11_deserializeOpErrorListActivatedRulesInRuleGroup(response, &metadata)
5550	}
5551	output := &ListActivatedRulesInRuleGroupOutput{}
5552	out.Result = output
5553
5554	var buff [1024]byte
5555	ringBuffer := smithyio.NewRingBuffer(buff[:])
5556
5557	body := io.TeeReader(response.Body, ringBuffer)
5558	decoder := json.NewDecoder(body)
5559	decoder.UseNumber()
5560	var shape interface{}
5561	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5562		var snapshot bytes.Buffer
5563		io.Copy(&snapshot, ringBuffer)
5564		err = &smithy.DeserializationError{
5565			Err:      fmt.Errorf("failed to decode response body, %w", err),
5566			Snapshot: snapshot.Bytes(),
5567		}
5568		return out, metadata, err
5569	}
5570
5571	err = awsAwsjson11_deserializeOpDocumentListActivatedRulesInRuleGroupOutput(&output, shape)
5572	if err != nil {
5573		var snapshot bytes.Buffer
5574		io.Copy(&snapshot, ringBuffer)
5575		err = &smithy.DeserializationError{
5576			Err:      fmt.Errorf("failed to decode response body, %w", err),
5577			Snapshot: snapshot.Bytes(),
5578		}
5579		return out, metadata, err
5580	}
5581
5582	return out, metadata, err
5583}
5584
5585func awsAwsjson11_deserializeOpErrorListActivatedRulesInRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5586	var errorBuffer bytes.Buffer
5587	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5588		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5589	}
5590	errorBody := bytes.NewReader(errorBuffer.Bytes())
5591
5592	errorCode := "UnknownError"
5593	errorMessage := errorCode
5594
5595	code := response.Header.Get("X-Amzn-ErrorType")
5596	if len(code) != 0 {
5597		errorCode = restjson.SanitizeErrorCode(code)
5598	}
5599
5600	var buff [1024]byte
5601	ringBuffer := smithyio.NewRingBuffer(buff[:])
5602
5603	body := io.TeeReader(errorBody, ringBuffer)
5604	decoder := json.NewDecoder(body)
5605	decoder.UseNumber()
5606	code, message, err := restjson.GetErrorInfo(decoder)
5607	if err != nil {
5608		var snapshot bytes.Buffer
5609		io.Copy(&snapshot, ringBuffer)
5610		err = &smithy.DeserializationError{
5611			Err:      fmt.Errorf("failed to decode response body, %w", err),
5612			Snapshot: snapshot.Bytes(),
5613		}
5614		return err
5615	}
5616
5617	errorBody.Seek(0, io.SeekStart)
5618	if len(code) != 0 {
5619		errorCode = restjson.SanitizeErrorCode(code)
5620	}
5621	if len(message) != 0 {
5622		errorMessage = message
5623	}
5624
5625	switch {
5626	case strings.EqualFold("WAFInternalErrorException", errorCode):
5627		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5628
5629	case strings.EqualFold("WAFInvalidParameterException", errorCode):
5630		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
5631
5632	case strings.EqualFold("WAFNonexistentItemException", errorCode):
5633		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
5634
5635	default:
5636		genericError := &smithy.GenericAPIError{
5637			Code:    errorCode,
5638			Message: errorMessage,
5639		}
5640		return genericError
5641
5642	}
5643}
5644
5645type awsAwsjson11_deserializeOpListByteMatchSets struct {
5646}
5647
5648func (*awsAwsjson11_deserializeOpListByteMatchSets) ID() string {
5649	return "OperationDeserializer"
5650}
5651
5652func (m *awsAwsjson11_deserializeOpListByteMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5653	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5654) {
5655	out, metadata, err = next.HandleDeserialize(ctx, in)
5656	if err != nil {
5657		return out, metadata, err
5658	}
5659
5660	response, ok := out.RawResponse.(*smithyhttp.Response)
5661	if !ok {
5662		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5663	}
5664
5665	if response.StatusCode < 200 || response.StatusCode >= 300 {
5666		return out, metadata, awsAwsjson11_deserializeOpErrorListByteMatchSets(response, &metadata)
5667	}
5668	output := &ListByteMatchSetsOutput{}
5669	out.Result = output
5670
5671	var buff [1024]byte
5672	ringBuffer := smithyio.NewRingBuffer(buff[:])
5673
5674	body := io.TeeReader(response.Body, ringBuffer)
5675	decoder := json.NewDecoder(body)
5676	decoder.UseNumber()
5677	var shape interface{}
5678	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5679		var snapshot bytes.Buffer
5680		io.Copy(&snapshot, ringBuffer)
5681		err = &smithy.DeserializationError{
5682			Err:      fmt.Errorf("failed to decode response body, %w", err),
5683			Snapshot: snapshot.Bytes(),
5684		}
5685		return out, metadata, err
5686	}
5687
5688	err = awsAwsjson11_deserializeOpDocumentListByteMatchSetsOutput(&output, shape)
5689	if err != nil {
5690		var snapshot bytes.Buffer
5691		io.Copy(&snapshot, ringBuffer)
5692		err = &smithy.DeserializationError{
5693			Err:      fmt.Errorf("failed to decode response body, %w", err),
5694			Snapshot: snapshot.Bytes(),
5695		}
5696		return out, metadata, err
5697	}
5698
5699	return out, metadata, err
5700}
5701
5702func awsAwsjson11_deserializeOpErrorListByteMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5703	var errorBuffer bytes.Buffer
5704	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5705		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5706	}
5707	errorBody := bytes.NewReader(errorBuffer.Bytes())
5708
5709	errorCode := "UnknownError"
5710	errorMessage := errorCode
5711
5712	code := response.Header.Get("X-Amzn-ErrorType")
5713	if len(code) != 0 {
5714		errorCode = restjson.SanitizeErrorCode(code)
5715	}
5716
5717	var buff [1024]byte
5718	ringBuffer := smithyio.NewRingBuffer(buff[:])
5719
5720	body := io.TeeReader(errorBody, ringBuffer)
5721	decoder := json.NewDecoder(body)
5722	decoder.UseNumber()
5723	code, message, err := restjson.GetErrorInfo(decoder)
5724	if err != nil {
5725		var snapshot bytes.Buffer
5726		io.Copy(&snapshot, ringBuffer)
5727		err = &smithy.DeserializationError{
5728			Err:      fmt.Errorf("failed to decode response body, %w", err),
5729			Snapshot: snapshot.Bytes(),
5730		}
5731		return err
5732	}
5733
5734	errorBody.Seek(0, io.SeekStart)
5735	if len(code) != 0 {
5736		errorCode = restjson.SanitizeErrorCode(code)
5737	}
5738	if len(message) != 0 {
5739		errorMessage = message
5740	}
5741
5742	switch {
5743	case strings.EqualFold("WAFInternalErrorException", errorCode):
5744		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5745
5746	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5747		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5748
5749	default:
5750		genericError := &smithy.GenericAPIError{
5751			Code:    errorCode,
5752			Message: errorMessage,
5753		}
5754		return genericError
5755
5756	}
5757}
5758
5759type awsAwsjson11_deserializeOpListGeoMatchSets struct {
5760}
5761
5762func (*awsAwsjson11_deserializeOpListGeoMatchSets) ID() string {
5763	return "OperationDeserializer"
5764}
5765
5766func (m *awsAwsjson11_deserializeOpListGeoMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5767	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5768) {
5769	out, metadata, err = next.HandleDeserialize(ctx, in)
5770	if err != nil {
5771		return out, metadata, err
5772	}
5773
5774	response, ok := out.RawResponse.(*smithyhttp.Response)
5775	if !ok {
5776		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5777	}
5778
5779	if response.StatusCode < 200 || response.StatusCode >= 300 {
5780		return out, metadata, awsAwsjson11_deserializeOpErrorListGeoMatchSets(response, &metadata)
5781	}
5782	output := &ListGeoMatchSetsOutput{}
5783	out.Result = output
5784
5785	var buff [1024]byte
5786	ringBuffer := smithyio.NewRingBuffer(buff[:])
5787
5788	body := io.TeeReader(response.Body, ringBuffer)
5789	decoder := json.NewDecoder(body)
5790	decoder.UseNumber()
5791	var shape interface{}
5792	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5793		var snapshot bytes.Buffer
5794		io.Copy(&snapshot, ringBuffer)
5795		err = &smithy.DeserializationError{
5796			Err:      fmt.Errorf("failed to decode response body, %w", err),
5797			Snapshot: snapshot.Bytes(),
5798		}
5799		return out, metadata, err
5800	}
5801
5802	err = awsAwsjson11_deserializeOpDocumentListGeoMatchSetsOutput(&output, shape)
5803	if err != nil {
5804		var snapshot bytes.Buffer
5805		io.Copy(&snapshot, ringBuffer)
5806		err = &smithy.DeserializationError{
5807			Err:      fmt.Errorf("failed to decode response body, %w", err),
5808			Snapshot: snapshot.Bytes(),
5809		}
5810		return out, metadata, err
5811	}
5812
5813	return out, metadata, err
5814}
5815
5816func awsAwsjson11_deserializeOpErrorListGeoMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5817	var errorBuffer bytes.Buffer
5818	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5819		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5820	}
5821	errorBody := bytes.NewReader(errorBuffer.Bytes())
5822
5823	errorCode := "UnknownError"
5824	errorMessage := errorCode
5825
5826	code := response.Header.Get("X-Amzn-ErrorType")
5827	if len(code) != 0 {
5828		errorCode = restjson.SanitizeErrorCode(code)
5829	}
5830
5831	var buff [1024]byte
5832	ringBuffer := smithyio.NewRingBuffer(buff[:])
5833
5834	body := io.TeeReader(errorBody, ringBuffer)
5835	decoder := json.NewDecoder(body)
5836	decoder.UseNumber()
5837	code, message, err := restjson.GetErrorInfo(decoder)
5838	if err != nil {
5839		var snapshot bytes.Buffer
5840		io.Copy(&snapshot, ringBuffer)
5841		err = &smithy.DeserializationError{
5842			Err:      fmt.Errorf("failed to decode response body, %w", err),
5843			Snapshot: snapshot.Bytes(),
5844		}
5845		return err
5846	}
5847
5848	errorBody.Seek(0, io.SeekStart)
5849	if len(code) != 0 {
5850		errorCode = restjson.SanitizeErrorCode(code)
5851	}
5852	if len(message) != 0 {
5853		errorMessage = message
5854	}
5855
5856	switch {
5857	case strings.EqualFold("WAFInternalErrorException", errorCode):
5858		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5859
5860	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5861		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5862
5863	default:
5864		genericError := &smithy.GenericAPIError{
5865			Code:    errorCode,
5866			Message: errorMessage,
5867		}
5868		return genericError
5869
5870	}
5871}
5872
5873type awsAwsjson11_deserializeOpListIPSets struct {
5874}
5875
5876func (*awsAwsjson11_deserializeOpListIPSets) ID() string {
5877	return "OperationDeserializer"
5878}
5879
5880func (m *awsAwsjson11_deserializeOpListIPSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5881	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5882) {
5883	out, metadata, err = next.HandleDeserialize(ctx, in)
5884	if err != nil {
5885		return out, metadata, err
5886	}
5887
5888	response, ok := out.RawResponse.(*smithyhttp.Response)
5889	if !ok {
5890		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5891	}
5892
5893	if response.StatusCode < 200 || response.StatusCode >= 300 {
5894		return out, metadata, awsAwsjson11_deserializeOpErrorListIPSets(response, &metadata)
5895	}
5896	output := &ListIPSetsOutput{}
5897	out.Result = output
5898
5899	var buff [1024]byte
5900	ringBuffer := smithyio.NewRingBuffer(buff[:])
5901
5902	body := io.TeeReader(response.Body, ringBuffer)
5903	decoder := json.NewDecoder(body)
5904	decoder.UseNumber()
5905	var shape interface{}
5906	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5907		var snapshot bytes.Buffer
5908		io.Copy(&snapshot, ringBuffer)
5909		err = &smithy.DeserializationError{
5910			Err:      fmt.Errorf("failed to decode response body, %w", err),
5911			Snapshot: snapshot.Bytes(),
5912		}
5913		return out, metadata, err
5914	}
5915
5916	err = awsAwsjson11_deserializeOpDocumentListIPSetsOutput(&output, shape)
5917	if err != nil {
5918		var snapshot bytes.Buffer
5919		io.Copy(&snapshot, ringBuffer)
5920		err = &smithy.DeserializationError{
5921			Err:      fmt.Errorf("failed to decode response body, %w", err),
5922			Snapshot: snapshot.Bytes(),
5923		}
5924		return out, metadata, err
5925	}
5926
5927	return out, metadata, err
5928}
5929
5930func awsAwsjson11_deserializeOpErrorListIPSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5931	var errorBuffer bytes.Buffer
5932	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5933		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5934	}
5935	errorBody := bytes.NewReader(errorBuffer.Bytes())
5936
5937	errorCode := "UnknownError"
5938	errorMessage := errorCode
5939
5940	code := response.Header.Get("X-Amzn-ErrorType")
5941	if len(code) != 0 {
5942		errorCode = restjson.SanitizeErrorCode(code)
5943	}
5944
5945	var buff [1024]byte
5946	ringBuffer := smithyio.NewRingBuffer(buff[:])
5947
5948	body := io.TeeReader(errorBody, ringBuffer)
5949	decoder := json.NewDecoder(body)
5950	decoder.UseNumber()
5951	code, message, err := restjson.GetErrorInfo(decoder)
5952	if err != nil {
5953		var snapshot bytes.Buffer
5954		io.Copy(&snapshot, ringBuffer)
5955		err = &smithy.DeserializationError{
5956			Err:      fmt.Errorf("failed to decode response body, %w", err),
5957			Snapshot: snapshot.Bytes(),
5958		}
5959		return err
5960	}
5961
5962	errorBody.Seek(0, io.SeekStart)
5963	if len(code) != 0 {
5964		errorCode = restjson.SanitizeErrorCode(code)
5965	}
5966	if len(message) != 0 {
5967		errorMessage = message
5968	}
5969
5970	switch {
5971	case strings.EqualFold("WAFInternalErrorException", errorCode):
5972		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
5973
5974	case strings.EqualFold("WAFInvalidAccountException", errorCode):
5975		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
5976
5977	default:
5978		genericError := &smithy.GenericAPIError{
5979			Code:    errorCode,
5980			Message: errorMessage,
5981		}
5982		return genericError
5983
5984	}
5985}
5986
5987type awsAwsjson11_deserializeOpListLoggingConfigurations struct {
5988}
5989
5990func (*awsAwsjson11_deserializeOpListLoggingConfigurations) ID() string {
5991	return "OperationDeserializer"
5992}
5993
5994func (m *awsAwsjson11_deserializeOpListLoggingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5995	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5996) {
5997	out, metadata, err = next.HandleDeserialize(ctx, in)
5998	if err != nil {
5999		return out, metadata, err
6000	}
6001
6002	response, ok := out.RawResponse.(*smithyhttp.Response)
6003	if !ok {
6004		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6005	}
6006
6007	if response.StatusCode < 200 || response.StatusCode >= 300 {
6008		return out, metadata, awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response, &metadata)
6009	}
6010	output := &ListLoggingConfigurationsOutput{}
6011	out.Result = output
6012
6013	var buff [1024]byte
6014	ringBuffer := smithyio.NewRingBuffer(buff[:])
6015
6016	body := io.TeeReader(response.Body, ringBuffer)
6017	decoder := json.NewDecoder(body)
6018	decoder.UseNumber()
6019	var shape interface{}
6020	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6021		var snapshot bytes.Buffer
6022		io.Copy(&snapshot, ringBuffer)
6023		err = &smithy.DeserializationError{
6024			Err:      fmt.Errorf("failed to decode response body, %w", err),
6025			Snapshot: snapshot.Bytes(),
6026		}
6027		return out, metadata, err
6028	}
6029
6030	err = awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(&output, shape)
6031	if err != nil {
6032		var snapshot bytes.Buffer
6033		io.Copy(&snapshot, ringBuffer)
6034		err = &smithy.DeserializationError{
6035			Err:      fmt.Errorf("failed to decode response body, %w", err),
6036			Snapshot: snapshot.Bytes(),
6037		}
6038		return out, metadata, err
6039	}
6040
6041	return out, metadata, err
6042}
6043
6044func awsAwsjson11_deserializeOpErrorListLoggingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6045	var errorBuffer bytes.Buffer
6046	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6047		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6048	}
6049	errorBody := bytes.NewReader(errorBuffer.Bytes())
6050
6051	errorCode := "UnknownError"
6052	errorMessage := errorCode
6053
6054	code := response.Header.Get("X-Amzn-ErrorType")
6055	if len(code) != 0 {
6056		errorCode = restjson.SanitizeErrorCode(code)
6057	}
6058
6059	var buff [1024]byte
6060	ringBuffer := smithyio.NewRingBuffer(buff[:])
6061
6062	body := io.TeeReader(errorBody, ringBuffer)
6063	decoder := json.NewDecoder(body)
6064	decoder.UseNumber()
6065	code, message, err := restjson.GetErrorInfo(decoder)
6066	if err != nil {
6067		var snapshot bytes.Buffer
6068		io.Copy(&snapshot, ringBuffer)
6069		err = &smithy.DeserializationError{
6070			Err:      fmt.Errorf("failed to decode response body, %w", err),
6071			Snapshot: snapshot.Bytes(),
6072		}
6073		return err
6074	}
6075
6076	errorBody.Seek(0, io.SeekStart)
6077	if len(code) != 0 {
6078		errorCode = restjson.SanitizeErrorCode(code)
6079	}
6080	if len(message) != 0 {
6081		errorMessage = message
6082	}
6083
6084	switch {
6085	case strings.EqualFold("WAFInternalErrorException", errorCode):
6086		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6087
6088	case strings.EqualFold("WAFInvalidParameterException", errorCode):
6089		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
6090
6091	case strings.EqualFold("WAFNonexistentItemException", errorCode):
6092		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
6093
6094	default:
6095		genericError := &smithy.GenericAPIError{
6096			Code:    errorCode,
6097			Message: errorMessage,
6098		}
6099		return genericError
6100
6101	}
6102}
6103
6104type awsAwsjson11_deserializeOpListRateBasedRules struct {
6105}
6106
6107func (*awsAwsjson11_deserializeOpListRateBasedRules) ID() string {
6108	return "OperationDeserializer"
6109}
6110
6111func (m *awsAwsjson11_deserializeOpListRateBasedRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6112	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6113) {
6114	out, metadata, err = next.HandleDeserialize(ctx, in)
6115	if err != nil {
6116		return out, metadata, err
6117	}
6118
6119	response, ok := out.RawResponse.(*smithyhttp.Response)
6120	if !ok {
6121		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6122	}
6123
6124	if response.StatusCode < 200 || response.StatusCode >= 300 {
6125		return out, metadata, awsAwsjson11_deserializeOpErrorListRateBasedRules(response, &metadata)
6126	}
6127	output := &ListRateBasedRulesOutput{}
6128	out.Result = output
6129
6130	var buff [1024]byte
6131	ringBuffer := smithyio.NewRingBuffer(buff[:])
6132
6133	body := io.TeeReader(response.Body, ringBuffer)
6134	decoder := json.NewDecoder(body)
6135	decoder.UseNumber()
6136	var shape interface{}
6137	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6138		var snapshot bytes.Buffer
6139		io.Copy(&snapshot, ringBuffer)
6140		err = &smithy.DeserializationError{
6141			Err:      fmt.Errorf("failed to decode response body, %w", err),
6142			Snapshot: snapshot.Bytes(),
6143		}
6144		return out, metadata, err
6145	}
6146
6147	err = awsAwsjson11_deserializeOpDocumentListRateBasedRulesOutput(&output, shape)
6148	if err != nil {
6149		var snapshot bytes.Buffer
6150		io.Copy(&snapshot, ringBuffer)
6151		err = &smithy.DeserializationError{
6152			Err:      fmt.Errorf("failed to decode response body, %w", err),
6153			Snapshot: snapshot.Bytes(),
6154		}
6155		return out, metadata, err
6156	}
6157
6158	return out, metadata, err
6159}
6160
6161func awsAwsjson11_deserializeOpErrorListRateBasedRules(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6162	var errorBuffer bytes.Buffer
6163	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6164		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6165	}
6166	errorBody := bytes.NewReader(errorBuffer.Bytes())
6167
6168	errorCode := "UnknownError"
6169	errorMessage := errorCode
6170
6171	code := response.Header.Get("X-Amzn-ErrorType")
6172	if len(code) != 0 {
6173		errorCode = restjson.SanitizeErrorCode(code)
6174	}
6175
6176	var buff [1024]byte
6177	ringBuffer := smithyio.NewRingBuffer(buff[:])
6178
6179	body := io.TeeReader(errorBody, ringBuffer)
6180	decoder := json.NewDecoder(body)
6181	decoder.UseNumber()
6182	code, message, err := restjson.GetErrorInfo(decoder)
6183	if err != nil {
6184		var snapshot bytes.Buffer
6185		io.Copy(&snapshot, ringBuffer)
6186		err = &smithy.DeserializationError{
6187			Err:      fmt.Errorf("failed to decode response body, %w", err),
6188			Snapshot: snapshot.Bytes(),
6189		}
6190		return err
6191	}
6192
6193	errorBody.Seek(0, io.SeekStart)
6194	if len(code) != 0 {
6195		errorCode = restjson.SanitizeErrorCode(code)
6196	}
6197	if len(message) != 0 {
6198		errorMessage = message
6199	}
6200
6201	switch {
6202	case strings.EqualFold("WAFInternalErrorException", errorCode):
6203		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6204
6205	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6206		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6207
6208	default:
6209		genericError := &smithy.GenericAPIError{
6210			Code:    errorCode,
6211			Message: errorMessage,
6212		}
6213		return genericError
6214
6215	}
6216}
6217
6218type awsAwsjson11_deserializeOpListRegexMatchSets struct {
6219}
6220
6221func (*awsAwsjson11_deserializeOpListRegexMatchSets) ID() string {
6222	return "OperationDeserializer"
6223}
6224
6225func (m *awsAwsjson11_deserializeOpListRegexMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6226	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6227) {
6228	out, metadata, err = next.HandleDeserialize(ctx, in)
6229	if err != nil {
6230		return out, metadata, err
6231	}
6232
6233	response, ok := out.RawResponse.(*smithyhttp.Response)
6234	if !ok {
6235		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6236	}
6237
6238	if response.StatusCode < 200 || response.StatusCode >= 300 {
6239		return out, metadata, awsAwsjson11_deserializeOpErrorListRegexMatchSets(response, &metadata)
6240	}
6241	output := &ListRegexMatchSetsOutput{}
6242	out.Result = output
6243
6244	var buff [1024]byte
6245	ringBuffer := smithyio.NewRingBuffer(buff[:])
6246
6247	body := io.TeeReader(response.Body, ringBuffer)
6248	decoder := json.NewDecoder(body)
6249	decoder.UseNumber()
6250	var shape interface{}
6251	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6252		var snapshot bytes.Buffer
6253		io.Copy(&snapshot, ringBuffer)
6254		err = &smithy.DeserializationError{
6255			Err:      fmt.Errorf("failed to decode response body, %w", err),
6256			Snapshot: snapshot.Bytes(),
6257		}
6258		return out, metadata, err
6259	}
6260
6261	err = awsAwsjson11_deserializeOpDocumentListRegexMatchSetsOutput(&output, shape)
6262	if err != nil {
6263		var snapshot bytes.Buffer
6264		io.Copy(&snapshot, ringBuffer)
6265		err = &smithy.DeserializationError{
6266			Err:      fmt.Errorf("failed to decode response body, %w", err),
6267			Snapshot: snapshot.Bytes(),
6268		}
6269		return out, metadata, err
6270	}
6271
6272	return out, metadata, err
6273}
6274
6275func awsAwsjson11_deserializeOpErrorListRegexMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6276	var errorBuffer bytes.Buffer
6277	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6278		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6279	}
6280	errorBody := bytes.NewReader(errorBuffer.Bytes())
6281
6282	errorCode := "UnknownError"
6283	errorMessage := errorCode
6284
6285	code := response.Header.Get("X-Amzn-ErrorType")
6286	if len(code) != 0 {
6287		errorCode = restjson.SanitizeErrorCode(code)
6288	}
6289
6290	var buff [1024]byte
6291	ringBuffer := smithyio.NewRingBuffer(buff[:])
6292
6293	body := io.TeeReader(errorBody, ringBuffer)
6294	decoder := json.NewDecoder(body)
6295	decoder.UseNumber()
6296	code, message, err := restjson.GetErrorInfo(decoder)
6297	if err != nil {
6298		var snapshot bytes.Buffer
6299		io.Copy(&snapshot, ringBuffer)
6300		err = &smithy.DeserializationError{
6301			Err:      fmt.Errorf("failed to decode response body, %w", err),
6302			Snapshot: snapshot.Bytes(),
6303		}
6304		return err
6305	}
6306
6307	errorBody.Seek(0, io.SeekStart)
6308	if len(code) != 0 {
6309		errorCode = restjson.SanitizeErrorCode(code)
6310	}
6311	if len(message) != 0 {
6312		errorMessage = message
6313	}
6314
6315	switch {
6316	case strings.EqualFold("WAFInternalErrorException", errorCode):
6317		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6318
6319	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6320		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6321
6322	default:
6323		genericError := &smithy.GenericAPIError{
6324			Code:    errorCode,
6325			Message: errorMessage,
6326		}
6327		return genericError
6328
6329	}
6330}
6331
6332type awsAwsjson11_deserializeOpListRegexPatternSets struct {
6333}
6334
6335func (*awsAwsjson11_deserializeOpListRegexPatternSets) ID() string {
6336	return "OperationDeserializer"
6337}
6338
6339func (m *awsAwsjson11_deserializeOpListRegexPatternSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6340	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6341) {
6342	out, metadata, err = next.HandleDeserialize(ctx, in)
6343	if err != nil {
6344		return out, metadata, err
6345	}
6346
6347	response, ok := out.RawResponse.(*smithyhttp.Response)
6348	if !ok {
6349		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6350	}
6351
6352	if response.StatusCode < 200 || response.StatusCode >= 300 {
6353		return out, metadata, awsAwsjson11_deserializeOpErrorListRegexPatternSets(response, &metadata)
6354	}
6355	output := &ListRegexPatternSetsOutput{}
6356	out.Result = output
6357
6358	var buff [1024]byte
6359	ringBuffer := smithyio.NewRingBuffer(buff[:])
6360
6361	body := io.TeeReader(response.Body, ringBuffer)
6362	decoder := json.NewDecoder(body)
6363	decoder.UseNumber()
6364	var shape interface{}
6365	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6366		var snapshot bytes.Buffer
6367		io.Copy(&snapshot, ringBuffer)
6368		err = &smithy.DeserializationError{
6369			Err:      fmt.Errorf("failed to decode response body, %w", err),
6370			Snapshot: snapshot.Bytes(),
6371		}
6372		return out, metadata, err
6373	}
6374
6375	err = awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(&output, shape)
6376	if err != nil {
6377		var snapshot bytes.Buffer
6378		io.Copy(&snapshot, ringBuffer)
6379		err = &smithy.DeserializationError{
6380			Err:      fmt.Errorf("failed to decode response body, %w", err),
6381			Snapshot: snapshot.Bytes(),
6382		}
6383		return out, metadata, err
6384	}
6385
6386	return out, metadata, err
6387}
6388
6389func awsAwsjson11_deserializeOpErrorListRegexPatternSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6390	var errorBuffer bytes.Buffer
6391	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6392		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6393	}
6394	errorBody := bytes.NewReader(errorBuffer.Bytes())
6395
6396	errorCode := "UnknownError"
6397	errorMessage := errorCode
6398
6399	code := response.Header.Get("X-Amzn-ErrorType")
6400	if len(code) != 0 {
6401		errorCode = restjson.SanitizeErrorCode(code)
6402	}
6403
6404	var buff [1024]byte
6405	ringBuffer := smithyio.NewRingBuffer(buff[:])
6406
6407	body := io.TeeReader(errorBody, ringBuffer)
6408	decoder := json.NewDecoder(body)
6409	decoder.UseNumber()
6410	code, message, err := restjson.GetErrorInfo(decoder)
6411	if err != nil {
6412		var snapshot bytes.Buffer
6413		io.Copy(&snapshot, ringBuffer)
6414		err = &smithy.DeserializationError{
6415			Err:      fmt.Errorf("failed to decode response body, %w", err),
6416			Snapshot: snapshot.Bytes(),
6417		}
6418		return err
6419	}
6420
6421	errorBody.Seek(0, io.SeekStart)
6422	if len(code) != 0 {
6423		errorCode = restjson.SanitizeErrorCode(code)
6424	}
6425	if len(message) != 0 {
6426		errorMessage = message
6427	}
6428
6429	switch {
6430	case strings.EqualFold("WAFInternalErrorException", errorCode):
6431		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6432
6433	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6434		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6435
6436	default:
6437		genericError := &smithy.GenericAPIError{
6438			Code:    errorCode,
6439			Message: errorMessage,
6440		}
6441		return genericError
6442
6443	}
6444}
6445
6446type awsAwsjson11_deserializeOpListRuleGroups struct {
6447}
6448
6449func (*awsAwsjson11_deserializeOpListRuleGroups) ID() string {
6450	return "OperationDeserializer"
6451}
6452
6453func (m *awsAwsjson11_deserializeOpListRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6454	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6455) {
6456	out, metadata, err = next.HandleDeserialize(ctx, in)
6457	if err != nil {
6458		return out, metadata, err
6459	}
6460
6461	response, ok := out.RawResponse.(*smithyhttp.Response)
6462	if !ok {
6463		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6464	}
6465
6466	if response.StatusCode < 200 || response.StatusCode >= 300 {
6467		return out, metadata, awsAwsjson11_deserializeOpErrorListRuleGroups(response, &metadata)
6468	}
6469	output := &ListRuleGroupsOutput{}
6470	out.Result = output
6471
6472	var buff [1024]byte
6473	ringBuffer := smithyio.NewRingBuffer(buff[:])
6474
6475	body := io.TeeReader(response.Body, ringBuffer)
6476	decoder := json.NewDecoder(body)
6477	decoder.UseNumber()
6478	var shape interface{}
6479	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6480		var snapshot bytes.Buffer
6481		io.Copy(&snapshot, ringBuffer)
6482		err = &smithy.DeserializationError{
6483			Err:      fmt.Errorf("failed to decode response body, %w", err),
6484			Snapshot: snapshot.Bytes(),
6485		}
6486		return out, metadata, err
6487	}
6488
6489	err = awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(&output, shape)
6490	if err != nil {
6491		var snapshot bytes.Buffer
6492		io.Copy(&snapshot, ringBuffer)
6493		err = &smithy.DeserializationError{
6494			Err:      fmt.Errorf("failed to decode response body, %w", err),
6495			Snapshot: snapshot.Bytes(),
6496		}
6497		return out, metadata, err
6498	}
6499
6500	return out, metadata, err
6501}
6502
6503func awsAwsjson11_deserializeOpErrorListRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6504	var errorBuffer bytes.Buffer
6505	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6506		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6507	}
6508	errorBody := bytes.NewReader(errorBuffer.Bytes())
6509
6510	errorCode := "UnknownError"
6511	errorMessage := errorCode
6512
6513	code := response.Header.Get("X-Amzn-ErrorType")
6514	if len(code) != 0 {
6515		errorCode = restjson.SanitizeErrorCode(code)
6516	}
6517
6518	var buff [1024]byte
6519	ringBuffer := smithyio.NewRingBuffer(buff[:])
6520
6521	body := io.TeeReader(errorBody, ringBuffer)
6522	decoder := json.NewDecoder(body)
6523	decoder.UseNumber()
6524	code, message, err := restjson.GetErrorInfo(decoder)
6525	if err != nil {
6526		var snapshot bytes.Buffer
6527		io.Copy(&snapshot, ringBuffer)
6528		err = &smithy.DeserializationError{
6529			Err:      fmt.Errorf("failed to decode response body, %w", err),
6530			Snapshot: snapshot.Bytes(),
6531		}
6532		return err
6533	}
6534
6535	errorBody.Seek(0, io.SeekStart)
6536	if len(code) != 0 {
6537		errorCode = restjson.SanitizeErrorCode(code)
6538	}
6539	if len(message) != 0 {
6540		errorMessage = message
6541	}
6542
6543	switch {
6544	case strings.EqualFold("WAFInternalErrorException", errorCode):
6545		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6546
6547	default:
6548		genericError := &smithy.GenericAPIError{
6549			Code:    errorCode,
6550			Message: errorMessage,
6551		}
6552		return genericError
6553
6554	}
6555}
6556
6557type awsAwsjson11_deserializeOpListRules struct {
6558}
6559
6560func (*awsAwsjson11_deserializeOpListRules) ID() string {
6561	return "OperationDeserializer"
6562}
6563
6564func (m *awsAwsjson11_deserializeOpListRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6565	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6566) {
6567	out, metadata, err = next.HandleDeserialize(ctx, in)
6568	if err != nil {
6569		return out, metadata, err
6570	}
6571
6572	response, ok := out.RawResponse.(*smithyhttp.Response)
6573	if !ok {
6574		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6575	}
6576
6577	if response.StatusCode < 200 || response.StatusCode >= 300 {
6578		return out, metadata, awsAwsjson11_deserializeOpErrorListRules(response, &metadata)
6579	}
6580	output := &ListRulesOutput{}
6581	out.Result = output
6582
6583	var buff [1024]byte
6584	ringBuffer := smithyio.NewRingBuffer(buff[:])
6585
6586	body := io.TeeReader(response.Body, ringBuffer)
6587	decoder := json.NewDecoder(body)
6588	decoder.UseNumber()
6589	var shape interface{}
6590	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6591		var snapshot bytes.Buffer
6592		io.Copy(&snapshot, ringBuffer)
6593		err = &smithy.DeserializationError{
6594			Err:      fmt.Errorf("failed to decode response body, %w", err),
6595			Snapshot: snapshot.Bytes(),
6596		}
6597		return out, metadata, err
6598	}
6599
6600	err = awsAwsjson11_deserializeOpDocumentListRulesOutput(&output, shape)
6601	if err != nil {
6602		var snapshot bytes.Buffer
6603		io.Copy(&snapshot, ringBuffer)
6604		err = &smithy.DeserializationError{
6605			Err:      fmt.Errorf("failed to decode response body, %w", err),
6606			Snapshot: snapshot.Bytes(),
6607		}
6608		return out, metadata, err
6609	}
6610
6611	return out, metadata, err
6612}
6613
6614func awsAwsjson11_deserializeOpErrorListRules(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6615	var errorBuffer bytes.Buffer
6616	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6617		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6618	}
6619	errorBody := bytes.NewReader(errorBuffer.Bytes())
6620
6621	errorCode := "UnknownError"
6622	errorMessage := errorCode
6623
6624	code := response.Header.Get("X-Amzn-ErrorType")
6625	if len(code) != 0 {
6626		errorCode = restjson.SanitizeErrorCode(code)
6627	}
6628
6629	var buff [1024]byte
6630	ringBuffer := smithyio.NewRingBuffer(buff[:])
6631
6632	body := io.TeeReader(errorBody, ringBuffer)
6633	decoder := json.NewDecoder(body)
6634	decoder.UseNumber()
6635	code, message, err := restjson.GetErrorInfo(decoder)
6636	if err != nil {
6637		var snapshot bytes.Buffer
6638		io.Copy(&snapshot, ringBuffer)
6639		err = &smithy.DeserializationError{
6640			Err:      fmt.Errorf("failed to decode response body, %w", err),
6641			Snapshot: snapshot.Bytes(),
6642		}
6643		return err
6644	}
6645
6646	errorBody.Seek(0, io.SeekStart)
6647	if len(code) != 0 {
6648		errorCode = restjson.SanitizeErrorCode(code)
6649	}
6650	if len(message) != 0 {
6651		errorMessage = message
6652	}
6653
6654	switch {
6655	case strings.EqualFold("WAFInternalErrorException", errorCode):
6656		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6657
6658	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6659		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6660
6661	default:
6662		genericError := &smithy.GenericAPIError{
6663			Code:    errorCode,
6664			Message: errorMessage,
6665		}
6666		return genericError
6667
6668	}
6669}
6670
6671type awsAwsjson11_deserializeOpListSizeConstraintSets struct {
6672}
6673
6674func (*awsAwsjson11_deserializeOpListSizeConstraintSets) ID() string {
6675	return "OperationDeserializer"
6676}
6677
6678func (m *awsAwsjson11_deserializeOpListSizeConstraintSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6679	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6680) {
6681	out, metadata, err = next.HandleDeserialize(ctx, in)
6682	if err != nil {
6683		return out, metadata, err
6684	}
6685
6686	response, ok := out.RawResponse.(*smithyhttp.Response)
6687	if !ok {
6688		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6689	}
6690
6691	if response.StatusCode < 200 || response.StatusCode >= 300 {
6692		return out, metadata, awsAwsjson11_deserializeOpErrorListSizeConstraintSets(response, &metadata)
6693	}
6694	output := &ListSizeConstraintSetsOutput{}
6695	out.Result = output
6696
6697	var buff [1024]byte
6698	ringBuffer := smithyio.NewRingBuffer(buff[:])
6699
6700	body := io.TeeReader(response.Body, ringBuffer)
6701	decoder := json.NewDecoder(body)
6702	decoder.UseNumber()
6703	var shape interface{}
6704	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6705		var snapshot bytes.Buffer
6706		io.Copy(&snapshot, ringBuffer)
6707		err = &smithy.DeserializationError{
6708			Err:      fmt.Errorf("failed to decode response body, %w", err),
6709			Snapshot: snapshot.Bytes(),
6710		}
6711		return out, metadata, err
6712	}
6713
6714	err = awsAwsjson11_deserializeOpDocumentListSizeConstraintSetsOutput(&output, shape)
6715	if err != nil {
6716		var snapshot bytes.Buffer
6717		io.Copy(&snapshot, ringBuffer)
6718		err = &smithy.DeserializationError{
6719			Err:      fmt.Errorf("failed to decode response body, %w", err),
6720			Snapshot: snapshot.Bytes(),
6721		}
6722		return out, metadata, err
6723	}
6724
6725	return out, metadata, err
6726}
6727
6728func awsAwsjson11_deserializeOpErrorListSizeConstraintSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6729	var errorBuffer bytes.Buffer
6730	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6731		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6732	}
6733	errorBody := bytes.NewReader(errorBuffer.Bytes())
6734
6735	errorCode := "UnknownError"
6736	errorMessage := errorCode
6737
6738	code := response.Header.Get("X-Amzn-ErrorType")
6739	if len(code) != 0 {
6740		errorCode = restjson.SanitizeErrorCode(code)
6741	}
6742
6743	var buff [1024]byte
6744	ringBuffer := smithyio.NewRingBuffer(buff[:])
6745
6746	body := io.TeeReader(errorBody, ringBuffer)
6747	decoder := json.NewDecoder(body)
6748	decoder.UseNumber()
6749	code, message, err := restjson.GetErrorInfo(decoder)
6750	if err != nil {
6751		var snapshot bytes.Buffer
6752		io.Copy(&snapshot, ringBuffer)
6753		err = &smithy.DeserializationError{
6754			Err:      fmt.Errorf("failed to decode response body, %w", err),
6755			Snapshot: snapshot.Bytes(),
6756		}
6757		return err
6758	}
6759
6760	errorBody.Seek(0, io.SeekStart)
6761	if len(code) != 0 {
6762		errorCode = restjson.SanitizeErrorCode(code)
6763	}
6764	if len(message) != 0 {
6765		errorMessage = message
6766	}
6767
6768	switch {
6769	case strings.EqualFold("WAFInternalErrorException", errorCode):
6770		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6771
6772	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6773		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6774
6775	default:
6776		genericError := &smithy.GenericAPIError{
6777			Code:    errorCode,
6778			Message: errorMessage,
6779		}
6780		return genericError
6781
6782	}
6783}
6784
6785type awsAwsjson11_deserializeOpListSqlInjectionMatchSets struct {
6786}
6787
6788func (*awsAwsjson11_deserializeOpListSqlInjectionMatchSets) ID() string {
6789	return "OperationDeserializer"
6790}
6791
6792func (m *awsAwsjson11_deserializeOpListSqlInjectionMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6793	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6794) {
6795	out, metadata, err = next.HandleDeserialize(ctx, in)
6796	if err != nil {
6797		return out, metadata, err
6798	}
6799
6800	response, ok := out.RawResponse.(*smithyhttp.Response)
6801	if !ok {
6802		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6803	}
6804
6805	if response.StatusCode < 200 || response.StatusCode >= 300 {
6806		return out, metadata, awsAwsjson11_deserializeOpErrorListSqlInjectionMatchSets(response, &metadata)
6807	}
6808	output := &ListSqlInjectionMatchSetsOutput{}
6809	out.Result = output
6810
6811	var buff [1024]byte
6812	ringBuffer := smithyio.NewRingBuffer(buff[:])
6813
6814	body := io.TeeReader(response.Body, ringBuffer)
6815	decoder := json.NewDecoder(body)
6816	decoder.UseNumber()
6817	var shape interface{}
6818	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6819		var snapshot bytes.Buffer
6820		io.Copy(&snapshot, ringBuffer)
6821		err = &smithy.DeserializationError{
6822			Err:      fmt.Errorf("failed to decode response body, %w", err),
6823			Snapshot: snapshot.Bytes(),
6824		}
6825		return out, metadata, err
6826	}
6827
6828	err = awsAwsjson11_deserializeOpDocumentListSqlInjectionMatchSetsOutput(&output, shape)
6829	if err != nil {
6830		var snapshot bytes.Buffer
6831		io.Copy(&snapshot, ringBuffer)
6832		err = &smithy.DeserializationError{
6833			Err:      fmt.Errorf("failed to decode response body, %w", err),
6834			Snapshot: snapshot.Bytes(),
6835		}
6836		return out, metadata, err
6837	}
6838
6839	return out, metadata, err
6840}
6841
6842func awsAwsjson11_deserializeOpErrorListSqlInjectionMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6843	var errorBuffer bytes.Buffer
6844	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6845		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6846	}
6847	errorBody := bytes.NewReader(errorBuffer.Bytes())
6848
6849	errorCode := "UnknownError"
6850	errorMessage := errorCode
6851
6852	code := response.Header.Get("X-Amzn-ErrorType")
6853	if len(code) != 0 {
6854		errorCode = restjson.SanitizeErrorCode(code)
6855	}
6856
6857	var buff [1024]byte
6858	ringBuffer := smithyio.NewRingBuffer(buff[:])
6859
6860	body := io.TeeReader(errorBody, ringBuffer)
6861	decoder := json.NewDecoder(body)
6862	decoder.UseNumber()
6863	code, message, err := restjson.GetErrorInfo(decoder)
6864	if err != nil {
6865		var snapshot bytes.Buffer
6866		io.Copy(&snapshot, ringBuffer)
6867		err = &smithy.DeserializationError{
6868			Err:      fmt.Errorf("failed to decode response body, %w", err),
6869			Snapshot: snapshot.Bytes(),
6870		}
6871		return err
6872	}
6873
6874	errorBody.Seek(0, io.SeekStart)
6875	if len(code) != 0 {
6876		errorCode = restjson.SanitizeErrorCode(code)
6877	}
6878	if len(message) != 0 {
6879		errorMessage = message
6880	}
6881
6882	switch {
6883	case strings.EqualFold("WAFInternalErrorException", errorCode):
6884		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6885
6886	case strings.EqualFold("WAFInvalidAccountException", errorCode):
6887		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
6888
6889	default:
6890		genericError := &smithy.GenericAPIError{
6891			Code:    errorCode,
6892			Message: errorMessage,
6893		}
6894		return genericError
6895
6896	}
6897}
6898
6899type awsAwsjson11_deserializeOpListSubscribedRuleGroups struct {
6900}
6901
6902func (*awsAwsjson11_deserializeOpListSubscribedRuleGroups) ID() string {
6903	return "OperationDeserializer"
6904}
6905
6906func (m *awsAwsjson11_deserializeOpListSubscribedRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6907	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6908) {
6909	out, metadata, err = next.HandleDeserialize(ctx, in)
6910	if err != nil {
6911		return out, metadata, err
6912	}
6913
6914	response, ok := out.RawResponse.(*smithyhttp.Response)
6915	if !ok {
6916		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6917	}
6918
6919	if response.StatusCode < 200 || response.StatusCode >= 300 {
6920		return out, metadata, awsAwsjson11_deserializeOpErrorListSubscribedRuleGroups(response, &metadata)
6921	}
6922	output := &ListSubscribedRuleGroupsOutput{}
6923	out.Result = output
6924
6925	var buff [1024]byte
6926	ringBuffer := smithyio.NewRingBuffer(buff[:])
6927
6928	body := io.TeeReader(response.Body, ringBuffer)
6929	decoder := json.NewDecoder(body)
6930	decoder.UseNumber()
6931	var shape interface{}
6932	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6933		var snapshot bytes.Buffer
6934		io.Copy(&snapshot, ringBuffer)
6935		err = &smithy.DeserializationError{
6936			Err:      fmt.Errorf("failed to decode response body, %w", err),
6937			Snapshot: snapshot.Bytes(),
6938		}
6939		return out, metadata, err
6940	}
6941
6942	err = awsAwsjson11_deserializeOpDocumentListSubscribedRuleGroupsOutput(&output, shape)
6943	if err != nil {
6944		var snapshot bytes.Buffer
6945		io.Copy(&snapshot, ringBuffer)
6946		err = &smithy.DeserializationError{
6947			Err:      fmt.Errorf("failed to decode response body, %w", err),
6948			Snapshot: snapshot.Bytes(),
6949		}
6950		return out, metadata, err
6951	}
6952
6953	return out, metadata, err
6954}
6955
6956func awsAwsjson11_deserializeOpErrorListSubscribedRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6957	var errorBuffer bytes.Buffer
6958	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6959		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6960	}
6961	errorBody := bytes.NewReader(errorBuffer.Bytes())
6962
6963	errorCode := "UnknownError"
6964	errorMessage := errorCode
6965
6966	code := response.Header.Get("X-Amzn-ErrorType")
6967	if len(code) != 0 {
6968		errorCode = restjson.SanitizeErrorCode(code)
6969	}
6970
6971	var buff [1024]byte
6972	ringBuffer := smithyio.NewRingBuffer(buff[:])
6973
6974	body := io.TeeReader(errorBody, ringBuffer)
6975	decoder := json.NewDecoder(body)
6976	decoder.UseNumber()
6977	code, message, err := restjson.GetErrorInfo(decoder)
6978	if err != nil {
6979		var snapshot bytes.Buffer
6980		io.Copy(&snapshot, ringBuffer)
6981		err = &smithy.DeserializationError{
6982			Err:      fmt.Errorf("failed to decode response body, %w", err),
6983			Snapshot: snapshot.Bytes(),
6984		}
6985		return err
6986	}
6987
6988	errorBody.Seek(0, io.SeekStart)
6989	if len(code) != 0 {
6990		errorCode = restjson.SanitizeErrorCode(code)
6991	}
6992	if len(message) != 0 {
6993		errorMessage = message
6994	}
6995
6996	switch {
6997	case strings.EqualFold("WAFInternalErrorException", errorCode):
6998		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
6999
7000	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7001		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7002
7003	default:
7004		genericError := &smithy.GenericAPIError{
7005			Code:    errorCode,
7006			Message: errorMessage,
7007		}
7008		return genericError
7009
7010	}
7011}
7012
7013type awsAwsjson11_deserializeOpListTagsForResource struct {
7014}
7015
7016func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string {
7017	return "OperationDeserializer"
7018}
7019
7020func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7021	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7022) {
7023	out, metadata, err = next.HandleDeserialize(ctx, in)
7024	if err != nil {
7025		return out, metadata, err
7026	}
7027
7028	response, ok := out.RawResponse.(*smithyhttp.Response)
7029	if !ok {
7030		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7031	}
7032
7033	if response.StatusCode < 200 || response.StatusCode >= 300 {
7034		return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata)
7035	}
7036	output := &ListTagsForResourceOutput{}
7037	out.Result = output
7038
7039	var buff [1024]byte
7040	ringBuffer := smithyio.NewRingBuffer(buff[:])
7041
7042	body := io.TeeReader(response.Body, ringBuffer)
7043	decoder := json.NewDecoder(body)
7044	decoder.UseNumber()
7045	var shape interface{}
7046	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7047		var snapshot bytes.Buffer
7048		io.Copy(&snapshot, ringBuffer)
7049		err = &smithy.DeserializationError{
7050			Err:      fmt.Errorf("failed to decode response body, %w", err),
7051			Snapshot: snapshot.Bytes(),
7052		}
7053		return out, metadata, err
7054	}
7055
7056	err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape)
7057	if err != nil {
7058		var snapshot bytes.Buffer
7059		io.Copy(&snapshot, ringBuffer)
7060		err = &smithy.DeserializationError{
7061			Err:      fmt.Errorf("failed to decode response body, %w", err),
7062			Snapshot: snapshot.Bytes(),
7063		}
7064		return out, metadata, err
7065	}
7066
7067	return out, metadata, err
7068}
7069
7070func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7071	var errorBuffer bytes.Buffer
7072	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7073		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7074	}
7075	errorBody := bytes.NewReader(errorBuffer.Bytes())
7076
7077	errorCode := "UnknownError"
7078	errorMessage := errorCode
7079
7080	code := response.Header.Get("X-Amzn-ErrorType")
7081	if len(code) != 0 {
7082		errorCode = restjson.SanitizeErrorCode(code)
7083	}
7084
7085	var buff [1024]byte
7086	ringBuffer := smithyio.NewRingBuffer(buff[:])
7087
7088	body := io.TeeReader(errorBody, ringBuffer)
7089	decoder := json.NewDecoder(body)
7090	decoder.UseNumber()
7091	code, message, err := restjson.GetErrorInfo(decoder)
7092	if err != nil {
7093		var snapshot bytes.Buffer
7094		io.Copy(&snapshot, ringBuffer)
7095		err = &smithy.DeserializationError{
7096			Err:      fmt.Errorf("failed to decode response body, %w", err),
7097			Snapshot: snapshot.Bytes(),
7098		}
7099		return err
7100	}
7101
7102	errorBody.Seek(0, io.SeekStart)
7103	if len(code) != 0 {
7104		errorCode = restjson.SanitizeErrorCode(code)
7105	}
7106	if len(message) != 0 {
7107		errorMessage = message
7108	}
7109
7110	switch {
7111	case strings.EqualFold("WAFBadRequestException", errorCode):
7112		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
7113
7114	case strings.EqualFold("WAFInternalErrorException", errorCode):
7115		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7116
7117	case strings.EqualFold("WAFInvalidParameterException", errorCode):
7118		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
7119
7120	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7121		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7122
7123	case strings.EqualFold("WAFTagOperationException", errorCode):
7124		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
7125
7126	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
7127		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
7128
7129	default:
7130		genericError := &smithy.GenericAPIError{
7131			Code:    errorCode,
7132			Message: errorMessage,
7133		}
7134		return genericError
7135
7136	}
7137}
7138
7139type awsAwsjson11_deserializeOpListWebACLs struct {
7140}
7141
7142func (*awsAwsjson11_deserializeOpListWebACLs) ID() string {
7143	return "OperationDeserializer"
7144}
7145
7146func (m *awsAwsjson11_deserializeOpListWebACLs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7147	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7148) {
7149	out, metadata, err = next.HandleDeserialize(ctx, in)
7150	if err != nil {
7151		return out, metadata, err
7152	}
7153
7154	response, ok := out.RawResponse.(*smithyhttp.Response)
7155	if !ok {
7156		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7157	}
7158
7159	if response.StatusCode < 200 || response.StatusCode >= 300 {
7160		return out, metadata, awsAwsjson11_deserializeOpErrorListWebACLs(response, &metadata)
7161	}
7162	output := &ListWebACLsOutput{}
7163	out.Result = output
7164
7165	var buff [1024]byte
7166	ringBuffer := smithyio.NewRingBuffer(buff[:])
7167
7168	body := io.TeeReader(response.Body, ringBuffer)
7169	decoder := json.NewDecoder(body)
7170	decoder.UseNumber()
7171	var shape interface{}
7172	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7173		var snapshot bytes.Buffer
7174		io.Copy(&snapshot, ringBuffer)
7175		err = &smithy.DeserializationError{
7176			Err:      fmt.Errorf("failed to decode response body, %w", err),
7177			Snapshot: snapshot.Bytes(),
7178		}
7179		return out, metadata, err
7180	}
7181
7182	err = awsAwsjson11_deserializeOpDocumentListWebACLsOutput(&output, shape)
7183	if err != nil {
7184		var snapshot bytes.Buffer
7185		io.Copy(&snapshot, ringBuffer)
7186		err = &smithy.DeserializationError{
7187			Err:      fmt.Errorf("failed to decode response body, %w", err),
7188			Snapshot: snapshot.Bytes(),
7189		}
7190		return out, metadata, err
7191	}
7192
7193	return out, metadata, err
7194}
7195
7196func awsAwsjson11_deserializeOpErrorListWebACLs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7197	var errorBuffer bytes.Buffer
7198	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7199		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7200	}
7201	errorBody := bytes.NewReader(errorBuffer.Bytes())
7202
7203	errorCode := "UnknownError"
7204	errorMessage := errorCode
7205
7206	code := response.Header.Get("X-Amzn-ErrorType")
7207	if len(code) != 0 {
7208		errorCode = restjson.SanitizeErrorCode(code)
7209	}
7210
7211	var buff [1024]byte
7212	ringBuffer := smithyio.NewRingBuffer(buff[:])
7213
7214	body := io.TeeReader(errorBody, ringBuffer)
7215	decoder := json.NewDecoder(body)
7216	decoder.UseNumber()
7217	code, message, err := restjson.GetErrorInfo(decoder)
7218	if err != nil {
7219		var snapshot bytes.Buffer
7220		io.Copy(&snapshot, ringBuffer)
7221		err = &smithy.DeserializationError{
7222			Err:      fmt.Errorf("failed to decode response body, %w", err),
7223			Snapshot: snapshot.Bytes(),
7224		}
7225		return err
7226	}
7227
7228	errorBody.Seek(0, io.SeekStart)
7229	if len(code) != 0 {
7230		errorCode = restjson.SanitizeErrorCode(code)
7231	}
7232	if len(message) != 0 {
7233		errorMessage = message
7234	}
7235
7236	switch {
7237	case strings.EqualFold("WAFInternalErrorException", errorCode):
7238		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7239
7240	case strings.EqualFold("WAFInvalidAccountException", errorCode):
7241		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
7242
7243	default:
7244		genericError := &smithy.GenericAPIError{
7245			Code:    errorCode,
7246			Message: errorMessage,
7247		}
7248		return genericError
7249
7250	}
7251}
7252
7253type awsAwsjson11_deserializeOpListXssMatchSets struct {
7254}
7255
7256func (*awsAwsjson11_deserializeOpListXssMatchSets) ID() string {
7257	return "OperationDeserializer"
7258}
7259
7260func (m *awsAwsjson11_deserializeOpListXssMatchSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7261	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7262) {
7263	out, metadata, err = next.HandleDeserialize(ctx, in)
7264	if err != nil {
7265		return out, metadata, err
7266	}
7267
7268	response, ok := out.RawResponse.(*smithyhttp.Response)
7269	if !ok {
7270		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7271	}
7272
7273	if response.StatusCode < 200 || response.StatusCode >= 300 {
7274		return out, metadata, awsAwsjson11_deserializeOpErrorListXssMatchSets(response, &metadata)
7275	}
7276	output := &ListXssMatchSetsOutput{}
7277	out.Result = output
7278
7279	var buff [1024]byte
7280	ringBuffer := smithyio.NewRingBuffer(buff[:])
7281
7282	body := io.TeeReader(response.Body, ringBuffer)
7283	decoder := json.NewDecoder(body)
7284	decoder.UseNumber()
7285	var shape interface{}
7286	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7287		var snapshot bytes.Buffer
7288		io.Copy(&snapshot, ringBuffer)
7289		err = &smithy.DeserializationError{
7290			Err:      fmt.Errorf("failed to decode response body, %w", err),
7291			Snapshot: snapshot.Bytes(),
7292		}
7293		return out, metadata, err
7294	}
7295
7296	err = awsAwsjson11_deserializeOpDocumentListXssMatchSetsOutput(&output, shape)
7297	if err != nil {
7298		var snapshot bytes.Buffer
7299		io.Copy(&snapshot, ringBuffer)
7300		err = &smithy.DeserializationError{
7301			Err:      fmt.Errorf("failed to decode response body, %w", err),
7302			Snapshot: snapshot.Bytes(),
7303		}
7304		return out, metadata, err
7305	}
7306
7307	return out, metadata, err
7308}
7309
7310func awsAwsjson11_deserializeOpErrorListXssMatchSets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7311	var errorBuffer bytes.Buffer
7312	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7313		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7314	}
7315	errorBody := bytes.NewReader(errorBuffer.Bytes())
7316
7317	errorCode := "UnknownError"
7318	errorMessage := errorCode
7319
7320	code := response.Header.Get("X-Amzn-ErrorType")
7321	if len(code) != 0 {
7322		errorCode = restjson.SanitizeErrorCode(code)
7323	}
7324
7325	var buff [1024]byte
7326	ringBuffer := smithyio.NewRingBuffer(buff[:])
7327
7328	body := io.TeeReader(errorBody, ringBuffer)
7329	decoder := json.NewDecoder(body)
7330	decoder.UseNumber()
7331	code, message, err := restjson.GetErrorInfo(decoder)
7332	if err != nil {
7333		var snapshot bytes.Buffer
7334		io.Copy(&snapshot, ringBuffer)
7335		err = &smithy.DeserializationError{
7336			Err:      fmt.Errorf("failed to decode response body, %w", err),
7337			Snapshot: snapshot.Bytes(),
7338		}
7339		return err
7340	}
7341
7342	errorBody.Seek(0, io.SeekStart)
7343	if len(code) != 0 {
7344		errorCode = restjson.SanitizeErrorCode(code)
7345	}
7346	if len(message) != 0 {
7347		errorMessage = message
7348	}
7349
7350	switch {
7351	case strings.EqualFold("WAFInternalErrorException", errorCode):
7352		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7353
7354	case strings.EqualFold("WAFInvalidAccountException", errorCode):
7355		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
7356
7357	default:
7358		genericError := &smithy.GenericAPIError{
7359			Code:    errorCode,
7360			Message: errorMessage,
7361		}
7362		return genericError
7363
7364	}
7365}
7366
7367type awsAwsjson11_deserializeOpPutLoggingConfiguration struct {
7368}
7369
7370func (*awsAwsjson11_deserializeOpPutLoggingConfiguration) ID() string {
7371	return "OperationDeserializer"
7372}
7373
7374func (m *awsAwsjson11_deserializeOpPutLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7375	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7376) {
7377	out, metadata, err = next.HandleDeserialize(ctx, in)
7378	if err != nil {
7379		return out, metadata, err
7380	}
7381
7382	response, ok := out.RawResponse.(*smithyhttp.Response)
7383	if !ok {
7384		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7385	}
7386
7387	if response.StatusCode < 200 || response.StatusCode >= 300 {
7388		return out, metadata, awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response, &metadata)
7389	}
7390	output := &PutLoggingConfigurationOutput{}
7391	out.Result = output
7392
7393	var buff [1024]byte
7394	ringBuffer := smithyio.NewRingBuffer(buff[:])
7395
7396	body := io.TeeReader(response.Body, ringBuffer)
7397	decoder := json.NewDecoder(body)
7398	decoder.UseNumber()
7399	var shape interface{}
7400	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7401		var snapshot bytes.Buffer
7402		io.Copy(&snapshot, ringBuffer)
7403		err = &smithy.DeserializationError{
7404			Err:      fmt.Errorf("failed to decode response body, %w", err),
7405			Snapshot: snapshot.Bytes(),
7406		}
7407		return out, metadata, err
7408	}
7409
7410	err = awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(&output, shape)
7411	if err != nil {
7412		var snapshot bytes.Buffer
7413		io.Copy(&snapshot, ringBuffer)
7414		err = &smithy.DeserializationError{
7415			Err:      fmt.Errorf("failed to decode response body, %w", err),
7416			Snapshot: snapshot.Bytes(),
7417		}
7418		return out, metadata, err
7419	}
7420
7421	return out, metadata, err
7422}
7423
7424func awsAwsjson11_deserializeOpErrorPutLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7425	var errorBuffer bytes.Buffer
7426	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7427		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7428	}
7429	errorBody := bytes.NewReader(errorBuffer.Bytes())
7430
7431	errorCode := "UnknownError"
7432	errorMessage := errorCode
7433
7434	code := response.Header.Get("X-Amzn-ErrorType")
7435	if len(code) != 0 {
7436		errorCode = restjson.SanitizeErrorCode(code)
7437	}
7438
7439	var buff [1024]byte
7440	ringBuffer := smithyio.NewRingBuffer(buff[:])
7441
7442	body := io.TeeReader(errorBody, ringBuffer)
7443	decoder := json.NewDecoder(body)
7444	decoder.UseNumber()
7445	code, message, err := restjson.GetErrorInfo(decoder)
7446	if err != nil {
7447		var snapshot bytes.Buffer
7448		io.Copy(&snapshot, ringBuffer)
7449		err = &smithy.DeserializationError{
7450			Err:      fmt.Errorf("failed to decode response body, %w", err),
7451			Snapshot: snapshot.Bytes(),
7452		}
7453		return err
7454	}
7455
7456	errorBody.Seek(0, io.SeekStart)
7457	if len(code) != 0 {
7458		errorCode = restjson.SanitizeErrorCode(code)
7459	}
7460	if len(message) != 0 {
7461		errorMessage = message
7462	}
7463
7464	switch {
7465	case strings.EqualFold("WAFInternalErrorException", errorCode):
7466		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7467
7468	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7469		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7470
7471	case strings.EqualFold("WAFServiceLinkedRoleErrorException", errorCode):
7472		return awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response, errorBody)
7473
7474	case strings.EqualFold("WAFStaleDataException", errorCode):
7475		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
7476
7477	default:
7478		genericError := &smithy.GenericAPIError{
7479			Code:    errorCode,
7480			Message: errorMessage,
7481		}
7482		return genericError
7483
7484	}
7485}
7486
7487type awsAwsjson11_deserializeOpPutPermissionPolicy struct {
7488}
7489
7490func (*awsAwsjson11_deserializeOpPutPermissionPolicy) ID() string {
7491	return "OperationDeserializer"
7492}
7493
7494func (m *awsAwsjson11_deserializeOpPutPermissionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7495	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7496) {
7497	out, metadata, err = next.HandleDeserialize(ctx, in)
7498	if err != nil {
7499		return out, metadata, err
7500	}
7501
7502	response, ok := out.RawResponse.(*smithyhttp.Response)
7503	if !ok {
7504		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7505	}
7506
7507	if response.StatusCode < 200 || response.StatusCode >= 300 {
7508		return out, metadata, awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response, &metadata)
7509	}
7510	output := &PutPermissionPolicyOutput{}
7511	out.Result = output
7512
7513	var buff [1024]byte
7514	ringBuffer := smithyio.NewRingBuffer(buff[:])
7515
7516	body := io.TeeReader(response.Body, ringBuffer)
7517	decoder := json.NewDecoder(body)
7518	decoder.UseNumber()
7519	var shape interface{}
7520	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7521		var snapshot bytes.Buffer
7522		io.Copy(&snapshot, ringBuffer)
7523		err = &smithy.DeserializationError{
7524			Err:      fmt.Errorf("failed to decode response body, %w", err),
7525			Snapshot: snapshot.Bytes(),
7526		}
7527		return out, metadata, err
7528	}
7529
7530	err = awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(&output, shape)
7531	if err != nil {
7532		var snapshot bytes.Buffer
7533		io.Copy(&snapshot, ringBuffer)
7534		err = &smithy.DeserializationError{
7535			Err:      fmt.Errorf("failed to decode response body, %w", err),
7536			Snapshot: snapshot.Bytes(),
7537		}
7538		return out, metadata, err
7539	}
7540
7541	return out, metadata, err
7542}
7543
7544func awsAwsjson11_deserializeOpErrorPutPermissionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7545	var errorBuffer bytes.Buffer
7546	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7547		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7548	}
7549	errorBody := bytes.NewReader(errorBuffer.Bytes())
7550
7551	errorCode := "UnknownError"
7552	errorMessage := errorCode
7553
7554	code := response.Header.Get("X-Amzn-ErrorType")
7555	if len(code) != 0 {
7556		errorCode = restjson.SanitizeErrorCode(code)
7557	}
7558
7559	var buff [1024]byte
7560	ringBuffer := smithyio.NewRingBuffer(buff[:])
7561
7562	body := io.TeeReader(errorBody, ringBuffer)
7563	decoder := json.NewDecoder(body)
7564	decoder.UseNumber()
7565	code, message, err := restjson.GetErrorInfo(decoder)
7566	if err != nil {
7567		var snapshot bytes.Buffer
7568		io.Copy(&snapshot, ringBuffer)
7569		err = &smithy.DeserializationError{
7570			Err:      fmt.Errorf("failed to decode response body, %w", err),
7571			Snapshot: snapshot.Bytes(),
7572		}
7573		return err
7574	}
7575
7576	errorBody.Seek(0, io.SeekStart)
7577	if len(code) != 0 {
7578		errorCode = restjson.SanitizeErrorCode(code)
7579	}
7580	if len(message) != 0 {
7581		errorMessage = message
7582	}
7583
7584	switch {
7585	case strings.EqualFold("WAFInternalErrorException", errorCode):
7586		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7587
7588	case strings.EqualFold("WAFInvalidPermissionPolicyException", errorCode):
7589		return awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response, errorBody)
7590
7591	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7592		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7593
7594	case strings.EqualFold("WAFStaleDataException", errorCode):
7595		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
7596
7597	default:
7598		genericError := &smithy.GenericAPIError{
7599			Code:    errorCode,
7600			Message: errorMessage,
7601		}
7602		return genericError
7603
7604	}
7605}
7606
7607type awsAwsjson11_deserializeOpTagResource struct {
7608}
7609
7610func (*awsAwsjson11_deserializeOpTagResource) ID() string {
7611	return "OperationDeserializer"
7612}
7613
7614func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7615	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7616) {
7617	out, metadata, err = next.HandleDeserialize(ctx, in)
7618	if err != nil {
7619		return out, metadata, err
7620	}
7621
7622	response, ok := out.RawResponse.(*smithyhttp.Response)
7623	if !ok {
7624		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7625	}
7626
7627	if response.StatusCode < 200 || response.StatusCode >= 300 {
7628		return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata)
7629	}
7630	output := &TagResourceOutput{}
7631	out.Result = output
7632
7633	var buff [1024]byte
7634	ringBuffer := smithyio.NewRingBuffer(buff[:])
7635
7636	body := io.TeeReader(response.Body, ringBuffer)
7637	decoder := json.NewDecoder(body)
7638	decoder.UseNumber()
7639	var shape interface{}
7640	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7641		var snapshot bytes.Buffer
7642		io.Copy(&snapshot, ringBuffer)
7643		err = &smithy.DeserializationError{
7644			Err:      fmt.Errorf("failed to decode response body, %w", err),
7645			Snapshot: snapshot.Bytes(),
7646		}
7647		return out, metadata, err
7648	}
7649
7650	err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape)
7651	if err != nil {
7652		var snapshot bytes.Buffer
7653		io.Copy(&snapshot, ringBuffer)
7654		err = &smithy.DeserializationError{
7655			Err:      fmt.Errorf("failed to decode response body, %w", err),
7656			Snapshot: snapshot.Bytes(),
7657		}
7658		return out, metadata, err
7659	}
7660
7661	return out, metadata, err
7662}
7663
7664func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7665	var errorBuffer bytes.Buffer
7666	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7667		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7668	}
7669	errorBody := bytes.NewReader(errorBuffer.Bytes())
7670
7671	errorCode := "UnknownError"
7672	errorMessage := errorCode
7673
7674	code := response.Header.Get("X-Amzn-ErrorType")
7675	if len(code) != 0 {
7676		errorCode = restjson.SanitizeErrorCode(code)
7677	}
7678
7679	var buff [1024]byte
7680	ringBuffer := smithyio.NewRingBuffer(buff[:])
7681
7682	body := io.TeeReader(errorBody, ringBuffer)
7683	decoder := json.NewDecoder(body)
7684	decoder.UseNumber()
7685	code, message, err := restjson.GetErrorInfo(decoder)
7686	if err != nil {
7687		var snapshot bytes.Buffer
7688		io.Copy(&snapshot, ringBuffer)
7689		err = &smithy.DeserializationError{
7690			Err:      fmt.Errorf("failed to decode response body, %w", err),
7691			Snapshot: snapshot.Bytes(),
7692		}
7693		return err
7694	}
7695
7696	errorBody.Seek(0, io.SeekStart)
7697	if len(code) != 0 {
7698		errorCode = restjson.SanitizeErrorCode(code)
7699	}
7700	if len(message) != 0 {
7701		errorMessage = message
7702	}
7703
7704	switch {
7705	case strings.EqualFold("WAFBadRequestException", errorCode):
7706		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
7707
7708	case strings.EqualFold("WAFInternalErrorException", errorCode):
7709		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7710
7711	case strings.EqualFold("WAFInvalidParameterException", errorCode):
7712		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
7713
7714	case strings.EqualFold("WAFLimitsExceededException", errorCode):
7715		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
7716
7717	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7718		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7719
7720	case strings.EqualFold("WAFTagOperationException", errorCode):
7721		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
7722
7723	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
7724		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
7725
7726	default:
7727		genericError := &smithy.GenericAPIError{
7728			Code:    errorCode,
7729			Message: errorMessage,
7730		}
7731		return genericError
7732
7733	}
7734}
7735
7736type awsAwsjson11_deserializeOpUntagResource struct {
7737}
7738
7739func (*awsAwsjson11_deserializeOpUntagResource) ID() string {
7740	return "OperationDeserializer"
7741}
7742
7743func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7744	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7745) {
7746	out, metadata, err = next.HandleDeserialize(ctx, in)
7747	if err != nil {
7748		return out, metadata, err
7749	}
7750
7751	response, ok := out.RawResponse.(*smithyhttp.Response)
7752	if !ok {
7753		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7754	}
7755
7756	if response.StatusCode < 200 || response.StatusCode >= 300 {
7757		return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata)
7758	}
7759	output := &UntagResourceOutput{}
7760	out.Result = output
7761
7762	var buff [1024]byte
7763	ringBuffer := smithyio.NewRingBuffer(buff[:])
7764
7765	body := io.TeeReader(response.Body, ringBuffer)
7766	decoder := json.NewDecoder(body)
7767	decoder.UseNumber()
7768	var shape interface{}
7769	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7770		var snapshot bytes.Buffer
7771		io.Copy(&snapshot, ringBuffer)
7772		err = &smithy.DeserializationError{
7773			Err:      fmt.Errorf("failed to decode response body, %w", err),
7774			Snapshot: snapshot.Bytes(),
7775		}
7776		return out, metadata, err
7777	}
7778
7779	err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape)
7780	if err != nil {
7781		var snapshot bytes.Buffer
7782		io.Copy(&snapshot, ringBuffer)
7783		err = &smithy.DeserializationError{
7784			Err:      fmt.Errorf("failed to decode response body, %w", err),
7785			Snapshot: snapshot.Bytes(),
7786		}
7787		return out, metadata, err
7788	}
7789
7790	return out, metadata, err
7791}
7792
7793func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7794	var errorBuffer bytes.Buffer
7795	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7796		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7797	}
7798	errorBody := bytes.NewReader(errorBuffer.Bytes())
7799
7800	errorCode := "UnknownError"
7801	errorMessage := errorCode
7802
7803	code := response.Header.Get("X-Amzn-ErrorType")
7804	if len(code) != 0 {
7805		errorCode = restjson.SanitizeErrorCode(code)
7806	}
7807
7808	var buff [1024]byte
7809	ringBuffer := smithyio.NewRingBuffer(buff[:])
7810
7811	body := io.TeeReader(errorBody, ringBuffer)
7812	decoder := json.NewDecoder(body)
7813	decoder.UseNumber()
7814	code, message, err := restjson.GetErrorInfo(decoder)
7815	if err != nil {
7816		var snapshot bytes.Buffer
7817		io.Copy(&snapshot, ringBuffer)
7818		err = &smithy.DeserializationError{
7819			Err:      fmt.Errorf("failed to decode response body, %w", err),
7820			Snapshot: snapshot.Bytes(),
7821		}
7822		return err
7823	}
7824
7825	errorBody.Seek(0, io.SeekStart)
7826	if len(code) != 0 {
7827		errorCode = restjson.SanitizeErrorCode(code)
7828	}
7829	if len(message) != 0 {
7830		errorMessage = message
7831	}
7832
7833	switch {
7834	case strings.EqualFold("WAFBadRequestException", errorCode):
7835		return awsAwsjson11_deserializeErrorWAFBadRequestException(response, errorBody)
7836
7837	case strings.EqualFold("WAFInternalErrorException", errorCode):
7838		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7839
7840	case strings.EqualFold("WAFInvalidParameterException", errorCode):
7841		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
7842
7843	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7844		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7845
7846	case strings.EqualFold("WAFTagOperationException", errorCode):
7847		return awsAwsjson11_deserializeErrorWAFTagOperationException(response, errorBody)
7848
7849	case strings.EqualFold("WAFTagOperationInternalErrorException", errorCode):
7850		return awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response, errorBody)
7851
7852	default:
7853		genericError := &smithy.GenericAPIError{
7854			Code:    errorCode,
7855			Message: errorMessage,
7856		}
7857		return genericError
7858
7859	}
7860}
7861
7862type awsAwsjson11_deserializeOpUpdateByteMatchSet struct {
7863}
7864
7865func (*awsAwsjson11_deserializeOpUpdateByteMatchSet) ID() string {
7866	return "OperationDeserializer"
7867}
7868
7869func (m *awsAwsjson11_deserializeOpUpdateByteMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
7870	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
7871) {
7872	out, metadata, err = next.HandleDeserialize(ctx, in)
7873	if err != nil {
7874		return out, metadata, err
7875	}
7876
7877	response, ok := out.RawResponse.(*smithyhttp.Response)
7878	if !ok {
7879		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
7880	}
7881
7882	if response.StatusCode < 200 || response.StatusCode >= 300 {
7883		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateByteMatchSet(response, &metadata)
7884	}
7885	output := &UpdateByteMatchSetOutput{}
7886	out.Result = output
7887
7888	var buff [1024]byte
7889	ringBuffer := smithyio.NewRingBuffer(buff[:])
7890
7891	body := io.TeeReader(response.Body, ringBuffer)
7892	decoder := json.NewDecoder(body)
7893	decoder.UseNumber()
7894	var shape interface{}
7895	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
7896		var snapshot bytes.Buffer
7897		io.Copy(&snapshot, ringBuffer)
7898		err = &smithy.DeserializationError{
7899			Err:      fmt.Errorf("failed to decode response body, %w", err),
7900			Snapshot: snapshot.Bytes(),
7901		}
7902		return out, metadata, err
7903	}
7904
7905	err = awsAwsjson11_deserializeOpDocumentUpdateByteMatchSetOutput(&output, shape)
7906	if err != nil {
7907		var snapshot bytes.Buffer
7908		io.Copy(&snapshot, ringBuffer)
7909		err = &smithy.DeserializationError{
7910			Err:      fmt.Errorf("failed to decode response body, %w", err),
7911			Snapshot: snapshot.Bytes(),
7912		}
7913		return out, metadata, err
7914	}
7915
7916	return out, metadata, err
7917}
7918
7919func awsAwsjson11_deserializeOpErrorUpdateByteMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
7920	var errorBuffer bytes.Buffer
7921	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
7922		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
7923	}
7924	errorBody := bytes.NewReader(errorBuffer.Bytes())
7925
7926	errorCode := "UnknownError"
7927	errorMessage := errorCode
7928
7929	code := response.Header.Get("X-Amzn-ErrorType")
7930	if len(code) != 0 {
7931		errorCode = restjson.SanitizeErrorCode(code)
7932	}
7933
7934	var buff [1024]byte
7935	ringBuffer := smithyio.NewRingBuffer(buff[:])
7936
7937	body := io.TeeReader(errorBody, ringBuffer)
7938	decoder := json.NewDecoder(body)
7939	decoder.UseNumber()
7940	code, message, err := restjson.GetErrorInfo(decoder)
7941	if err != nil {
7942		var snapshot bytes.Buffer
7943		io.Copy(&snapshot, ringBuffer)
7944		err = &smithy.DeserializationError{
7945			Err:      fmt.Errorf("failed to decode response body, %w", err),
7946			Snapshot: snapshot.Bytes(),
7947		}
7948		return err
7949	}
7950
7951	errorBody.Seek(0, io.SeekStart)
7952	if len(code) != 0 {
7953		errorCode = restjson.SanitizeErrorCode(code)
7954	}
7955	if len(message) != 0 {
7956		errorMessage = message
7957	}
7958
7959	switch {
7960	case strings.EqualFold("WAFInternalErrorException", errorCode):
7961		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
7962
7963	case strings.EqualFold("WAFInvalidAccountException", errorCode):
7964		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
7965
7966	case strings.EqualFold("WAFInvalidOperationException", errorCode):
7967		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
7968
7969	case strings.EqualFold("WAFInvalidParameterException", errorCode):
7970		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
7971
7972	case strings.EqualFold("WAFLimitsExceededException", errorCode):
7973		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
7974
7975	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
7976		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
7977
7978	case strings.EqualFold("WAFNonexistentItemException", errorCode):
7979		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
7980
7981	case strings.EqualFold("WAFStaleDataException", errorCode):
7982		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
7983
7984	default:
7985		genericError := &smithy.GenericAPIError{
7986			Code:    errorCode,
7987			Message: errorMessage,
7988		}
7989		return genericError
7990
7991	}
7992}
7993
7994type awsAwsjson11_deserializeOpUpdateGeoMatchSet struct {
7995}
7996
7997func (*awsAwsjson11_deserializeOpUpdateGeoMatchSet) ID() string {
7998	return "OperationDeserializer"
7999}
8000
8001func (m *awsAwsjson11_deserializeOpUpdateGeoMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8002	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8003) {
8004	out, metadata, err = next.HandleDeserialize(ctx, in)
8005	if err != nil {
8006		return out, metadata, err
8007	}
8008
8009	response, ok := out.RawResponse.(*smithyhttp.Response)
8010	if !ok {
8011		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8012	}
8013
8014	if response.StatusCode < 200 || response.StatusCode >= 300 {
8015		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateGeoMatchSet(response, &metadata)
8016	}
8017	output := &UpdateGeoMatchSetOutput{}
8018	out.Result = output
8019
8020	var buff [1024]byte
8021	ringBuffer := smithyio.NewRingBuffer(buff[:])
8022
8023	body := io.TeeReader(response.Body, ringBuffer)
8024	decoder := json.NewDecoder(body)
8025	decoder.UseNumber()
8026	var shape interface{}
8027	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8028		var snapshot bytes.Buffer
8029		io.Copy(&snapshot, ringBuffer)
8030		err = &smithy.DeserializationError{
8031			Err:      fmt.Errorf("failed to decode response body, %w", err),
8032			Snapshot: snapshot.Bytes(),
8033		}
8034		return out, metadata, err
8035	}
8036
8037	err = awsAwsjson11_deserializeOpDocumentUpdateGeoMatchSetOutput(&output, shape)
8038	if err != nil {
8039		var snapshot bytes.Buffer
8040		io.Copy(&snapshot, ringBuffer)
8041		err = &smithy.DeserializationError{
8042			Err:      fmt.Errorf("failed to decode response body, %w", err),
8043			Snapshot: snapshot.Bytes(),
8044		}
8045		return out, metadata, err
8046	}
8047
8048	return out, metadata, err
8049}
8050
8051func awsAwsjson11_deserializeOpErrorUpdateGeoMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8052	var errorBuffer bytes.Buffer
8053	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8054		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8055	}
8056	errorBody := bytes.NewReader(errorBuffer.Bytes())
8057
8058	errorCode := "UnknownError"
8059	errorMessage := errorCode
8060
8061	code := response.Header.Get("X-Amzn-ErrorType")
8062	if len(code) != 0 {
8063		errorCode = restjson.SanitizeErrorCode(code)
8064	}
8065
8066	var buff [1024]byte
8067	ringBuffer := smithyio.NewRingBuffer(buff[:])
8068
8069	body := io.TeeReader(errorBody, ringBuffer)
8070	decoder := json.NewDecoder(body)
8071	decoder.UseNumber()
8072	code, message, err := restjson.GetErrorInfo(decoder)
8073	if err != nil {
8074		var snapshot bytes.Buffer
8075		io.Copy(&snapshot, ringBuffer)
8076		err = &smithy.DeserializationError{
8077			Err:      fmt.Errorf("failed to decode response body, %w", err),
8078			Snapshot: snapshot.Bytes(),
8079		}
8080		return err
8081	}
8082
8083	errorBody.Seek(0, io.SeekStart)
8084	if len(code) != 0 {
8085		errorCode = restjson.SanitizeErrorCode(code)
8086	}
8087	if len(message) != 0 {
8088		errorMessage = message
8089	}
8090
8091	switch {
8092	case strings.EqualFold("WAFInternalErrorException", errorCode):
8093		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8094
8095	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8096		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8097
8098	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8099		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8100
8101	case strings.EqualFold("WAFInvalidParameterException", errorCode):
8102		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
8103
8104	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8105		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8106
8107	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8108		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8109
8110	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8111		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8112
8113	case strings.EqualFold("WAFReferencedItemException", errorCode):
8114		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
8115
8116	case strings.EqualFold("WAFStaleDataException", errorCode):
8117		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8118
8119	default:
8120		genericError := &smithy.GenericAPIError{
8121			Code:    errorCode,
8122			Message: errorMessage,
8123		}
8124		return genericError
8125
8126	}
8127}
8128
8129type awsAwsjson11_deserializeOpUpdateIPSet struct {
8130}
8131
8132func (*awsAwsjson11_deserializeOpUpdateIPSet) ID() string {
8133	return "OperationDeserializer"
8134}
8135
8136func (m *awsAwsjson11_deserializeOpUpdateIPSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8137	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8138) {
8139	out, metadata, err = next.HandleDeserialize(ctx, in)
8140	if err != nil {
8141		return out, metadata, err
8142	}
8143
8144	response, ok := out.RawResponse.(*smithyhttp.Response)
8145	if !ok {
8146		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8147	}
8148
8149	if response.StatusCode < 200 || response.StatusCode >= 300 {
8150		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateIPSet(response, &metadata)
8151	}
8152	output := &UpdateIPSetOutput{}
8153	out.Result = output
8154
8155	var buff [1024]byte
8156	ringBuffer := smithyio.NewRingBuffer(buff[:])
8157
8158	body := io.TeeReader(response.Body, ringBuffer)
8159	decoder := json.NewDecoder(body)
8160	decoder.UseNumber()
8161	var shape interface{}
8162	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8163		var snapshot bytes.Buffer
8164		io.Copy(&snapshot, ringBuffer)
8165		err = &smithy.DeserializationError{
8166			Err:      fmt.Errorf("failed to decode response body, %w", err),
8167			Snapshot: snapshot.Bytes(),
8168		}
8169		return out, metadata, err
8170	}
8171
8172	err = awsAwsjson11_deserializeOpDocumentUpdateIPSetOutput(&output, shape)
8173	if err != nil {
8174		var snapshot bytes.Buffer
8175		io.Copy(&snapshot, ringBuffer)
8176		err = &smithy.DeserializationError{
8177			Err:      fmt.Errorf("failed to decode response body, %w", err),
8178			Snapshot: snapshot.Bytes(),
8179		}
8180		return out, metadata, err
8181	}
8182
8183	return out, metadata, err
8184}
8185
8186func awsAwsjson11_deserializeOpErrorUpdateIPSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8187	var errorBuffer bytes.Buffer
8188	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8189		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8190	}
8191	errorBody := bytes.NewReader(errorBuffer.Bytes())
8192
8193	errorCode := "UnknownError"
8194	errorMessage := errorCode
8195
8196	code := response.Header.Get("X-Amzn-ErrorType")
8197	if len(code) != 0 {
8198		errorCode = restjson.SanitizeErrorCode(code)
8199	}
8200
8201	var buff [1024]byte
8202	ringBuffer := smithyio.NewRingBuffer(buff[:])
8203
8204	body := io.TeeReader(errorBody, ringBuffer)
8205	decoder := json.NewDecoder(body)
8206	decoder.UseNumber()
8207	code, message, err := restjson.GetErrorInfo(decoder)
8208	if err != nil {
8209		var snapshot bytes.Buffer
8210		io.Copy(&snapshot, ringBuffer)
8211		err = &smithy.DeserializationError{
8212			Err:      fmt.Errorf("failed to decode response body, %w", err),
8213			Snapshot: snapshot.Bytes(),
8214		}
8215		return err
8216	}
8217
8218	errorBody.Seek(0, io.SeekStart)
8219	if len(code) != 0 {
8220		errorCode = restjson.SanitizeErrorCode(code)
8221	}
8222	if len(message) != 0 {
8223		errorMessage = message
8224	}
8225
8226	switch {
8227	case strings.EqualFold("WAFInternalErrorException", errorCode):
8228		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8229
8230	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8231		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8232
8233	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8234		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8235
8236	case strings.EqualFold("WAFInvalidParameterException", errorCode):
8237		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
8238
8239	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8240		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8241
8242	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8243		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8244
8245	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8246		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8247
8248	case strings.EqualFold("WAFReferencedItemException", errorCode):
8249		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
8250
8251	case strings.EqualFold("WAFStaleDataException", errorCode):
8252		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8253
8254	default:
8255		genericError := &smithy.GenericAPIError{
8256			Code:    errorCode,
8257			Message: errorMessage,
8258		}
8259		return genericError
8260
8261	}
8262}
8263
8264type awsAwsjson11_deserializeOpUpdateRateBasedRule struct {
8265}
8266
8267func (*awsAwsjson11_deserializeOpUpdateRateBasedRule) ID() string {
8268	return "OperationDeserializer"
8269}
8270
8271func (m *awsAwsjson11_deserializeOpUpdateRateBasedRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8272	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8273) {
8274	out, metadata, err = next.HandleDeserialize(ctx, in)
8275	if err != nil {
8276		return out, metadata, err
8277	}
8278
8279	response, ok := out.RawResponse.(*smithyhttp.Response)
8280	if !ok {
8281		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8282	}
8283
8284	if response.StatusCode < 200 || response.StatusCode >= 300 {
8285		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRateBasedRule(response, &metadata)
8286	}
8287	output := &UpdateRateBasedRuleOutput{}
8288	out.Result = output
8289
8290	var buff [1024]byte
8291	ringBuffer := smithyio.NewRingBuffer(buff[:])
8292
8293	body := io.TeeReader(response.Body, ringBuffer)
8294	decoder := json.NewDecoder(body)
8295	decoder.UseNumber()
8296	var shape interface{}
8297	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8298		var snapshot bytes.Buffer
8299		io.Copy(&snapshot, ringBuffer)
8300		err = &smithy.DeserializationError{
8301			Err:      fmt.Errorf("failed to decode response body, %w", err),
8302			Snapshot: snapshot.Bytes(),
8303		}
8304		return out, metadata, err
8305	}
8306
8307	err = awsAwsjson11_deserializeOpDocumentUpdateRateBasedRuleOutput(&output, shape)
8308	if err != nil {
8309		var snapshot bytes.Buffer
8310		io.Copy(&snapshot, ringBuffer)
8311		err = &smithy.DeserializationError{
8312			Err:      fmt.Errorf("failed to decode response body, %w", err),
8313			Snapshot: snapshot.Bytes(),
8314		}
8315		return out, metadata, err
8316	}
8317
8318	return out, metadata, err
8319}
8320
8321func awsAwsjson11_deserializeOpErrorUpdateRateBasedRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8322	var errorBuffer bytes.Buffer
8323	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8324		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8325	}
8326	errorBody := bytes.NewReader(errorBuffer.Bytes())
8327
8328	errorCode := "UnknownError"
8329	errorMessage := errorCode
8330
8331	code := response.Header.Get("X-Amzn-ErrorType")
8332	if len(code) != 0 {
8333		errorCode = restjson.SanitizeErrorCode(code)
8334	}
8335
8336	var buff [1024]byte
8337	ringBuffer := smithyio.NewRingBuffer(buff[:])
8338
8339	body := io.TeeReader(errorBody, ringBuffer)
8340	decoder := json.NewDecoder(body)
8341	decoder.UseNumber()
8342	code, message, err := restjson.GetErrorInfo(decoder)
8343	if err != nil {
8344		var snapshot bytes.Buffer
8345		io.Copy(&snapshot, ringBuffer)
8346		err = &smithy.DeserializationError{
8347			Err:      fmt.Errorf("failed to decode response body, %w", err),
8348			Snapshot: snapshot.Bytes(),
8349		}
8350		return err
8351	}
8352
8353	errorBody.Seek(0, io.SeekStart)
8354	if len(code) != 0 {
8355		errorCode = restjson.SanitizeErrorCode(code)
8356	}
8357	if len(message) != 0 {
8358		errorMessage = message
8359	}
8360
8361	switch {
8362	case strings.EqualFold("WAFInternalErrorException", errorCode):
8363		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8364
8365	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8366		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8367
8368	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8369		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8370
8371	case strings.EqualFold("WAFInvalidParameterException", errorCode):
8372		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
8373
8374	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8375		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8376
8377	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8378		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8379
8380	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8381		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8382
8383	case strings.EqualFold("WAFReferencedItemException", errorCode):
8384		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
8385
8386	case strings.EqualFold("WAFStaleDataException", errorCode):
8387		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8388
8389	default:
8390		genericError := &smithy.GenericAPIError{
8391			Code:    errorCode,
8392			Message: errorMessage,
8393		}
8394		return genericError
8395
8396	}
8397}
8398
8399type awsAwsjson11_deserializeOpUpdateRegexMatchSet struct {
8400}
8401
8402func (*awsAwsjson11_deserializeOpUpdateRegexMatchSet) ID() string {
8403	return "OperationDeserializer"
8404}
8405
8406func (m *awsAwsjson11_deserializeOpUpdateRegexMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8407	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8408) {
8409	out, metadata, err = next.HandleDeserialize(ctx, in)
8410	if err != nil {
8411		return out, metadata, err
8412	}
8413
8414	response, ok := out.RawResponse.(*smithyhttp.Response)
8415	if !ok {
8416		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8417	}
8418
8419	if response.StatusCode < 200 || response.StatusCode >= 300 {
8420		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegexMatchSet(response, &metadata)
8421	}
8422	output := &UpdateRegexMatchSetOutput{}
8423	out.Result = output
8424
8425	var buff [1024]byte
8426	ringBuffer := smithyio.NewRingBuffer(buff[:])
8427
8428	body := io.TeeReader(response.Body, ringBuffer)
8429	decoder := json.NewDecoder(body)
8430	decoder.UseNumber()
8431	var shape interface{}
8432	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8433		var snapshot bytes.Buffer
8434		io.Copy(&snapshot, ringBuffer)
8435		err = &smithy.DeserializationError{
8436			Err:      fmt.Errorf("failed to decode response body, %w", err),
8437			Snapshot: snapshot.Bytes(),
8438		}
8439		return out, metadata, err
8440	}
8441
8442	err = awsAwsjson11_deserializeOpDocumentUpdateRegexMatchSetOutput(&output, shape)
8443	if err != nil {
8444		var snapshot bytes.Buffer
8445		io.Copy(&snapshot, ringBuffer)
8446		err = &smithy.DeserializationError{
8447			Err:      fmt.Errorf("failed to decode response body, %w", err),
8448			Snapshot: snapshot.Bytes(),
8449		}
8450		return out, metadata, err
8451	}
8452
8453	return out, metadata, err
8454}
8455
8456func awsAwsjson11_deserializeOpErrorUpdateRegexMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8457	var errorBuffer bytes.Buffer
8458	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8459		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8460	}
8461	errorBody := bytes.NewReader(errorBuffer.Bytes())
8462
8463	errorCode := "UnknownError"
8464	errorMessage := errorCode
8465
8466	code := response.Header.Get("X-Amzn-ErrorType")
8467	if len(code) != 0 {
8468		errorCode = restjson.SanitizeErrorCode(code)
8469	}
8470
8471	var buff [1024]byte
8472	ringBuffer := smithyio.NewRingBuffer(buff[:])
8473
8474	body := io.TeeReader(errorBody, ringBuffer)
8475	decoder := json.NewDecoder(body)
8476	decoder.UseNumber()
8477	code, message, err := restjson.GetErrorInfo(decoder)
8478	if err != nil {
8479		var snapshot bytes.Buffer
8480		io.Copy(&snapshot, ringBuffer)
8481		err = &smithy.DeserializationError{
8482			Err:      fmt.Errorf("failed to decode response body, %w", err),
8483			Snapshot: snapshot.Bytes(),
8484		}
8485		return err
8486	}
8487
8488	errorBody.Seek(0, io.SeekStart)
8489	if len(code) != 0 {
8490		errorCode = restjson.SanitizeErrorCode(code)
8491	}
8492	if len(message) != 0 {
8493		errorMessage = message
8494	}
8495
8496	switch {
8497	case strings.EqualFold("WAFDisallowedNameException", errorCode):
8498		return awsAwsjson11_deserializeErrorWAFDisallowedNameException(response, errorBody)
8499
8500	case strings.EqualFold("WAFInternalErrorException", errorCode):
8501		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8502
8503	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8504		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8505
8506	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8507		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8508
8509	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8510		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8511
8512	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8513		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8514
8515	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8516		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8517
8518	case strings.EqualFold("WAFStaleDataException", errorCode):
8519		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8520
8521	default:
8522		genericError := &smithy.GenericAPIError{
8523			Code:    errorCode,
8524			Message: errorMessage,
8525		}
8526		return genericError
8527
8528	}
8529}
8530
8531type awsAwsjson11_deserializeOpUpdateRegexPatternSet struct {
8532}
8533
8534func (*awsAwsjson11_deserializeOpUpdateRegexPatternSet) ID() string {
8535	return "OperationDeserializer"
8536}
8537
8538func (m *awsAwsjson11_deserializeOpUpdateRegexPatternSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8539	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8540) {
8541	out, metadata, err = next.HandleDeserialize(ctx, in)
8542	if err != nil {
8543		return out, metadata, err
8544	}
8545
8546	response, ok := out.RawResponse.(*smithyhttp.Response)
8547	if !ok {
8548		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8549	}
8550
8551	if response.StatusCode < 200 || response.StatusCode >= 300 {
8552		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegexPatternSet(response, &metadata)
8553	}
8554	output := &UpdateRegexPatternSetOutput{}
8555	out.Result = output
8556
8557	var buff [1024]byte
8558	ringBuffer := smithyio.NewRingBuffer(buff[:])
8559
8560	body := io.TeeReader(response.Body, ringBuffer)
8561	decoder := json.NewDecoder(body)
8562	decoder.UseNumber()
8563	var shape interface{}
8564	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8565		var snapshot bytes.Buffer
8566		io.Copy(&snapshot, ringBuffer)
8567		err = &smithy.DeserializationError{
8568			Err:      fmt.Errorf("failed to decode response body, %w", err),
8569			Snapshot: snapshot.Bytes(),
8570		}
8571		return out, metadata, err
8572	}
8573
8574	err = awsAwsjson11_deserializeOpDocumentUpdateRegexPatternSetOutput(&output, shape)
8575	if err != nil {
8576		var snapshot bytes.Buffer
8577		io.Copy(&snapshot, ringBuffer)
8578		err = &smithy.DeserializationError{
8579			Err:      fmt.Errorf("failed to decode response body, %w", err),
8580			Snapshot: snapshot.Bytes(),
8581		}
8582		return out, metadata, err
8583	}
8584
8585	return out, metadata, err
8586}
8587
8588func awsAwsjson11_deserializeOpErrorUpdateRegexPatternSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8589	var errorBuffer bytes.Buffer
8590	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8591		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8592	}
8593	errorBody := bytes.NewReader(errorBuffer.Bytes())
8594
8595	errorCode := "UnknownError"
8596	errorMessage := errorCode
8597
8598	code := response.Header.Get("X-Amzn-ErrorType")
8599	if len(code) != 0 {
8600		errorCode = restjson.SanitizeErrorCode(code)
8601	}
8602
8603	var buff [1024]byte
8604	ringBuffer := smithyio.NewRingBuffer(buff[:])
8605
8606	body := io.TeeReader(errorBody, ringBuffer)
8607	decoder := json.NewDecoder(body)
8608	decoder.UseNumber()
8609	code, message, err := restjson.GetErrorInfo(decoder)
8610	if err != nil {
8611		var snapshot bytes.Buffer
8612		io.Copy(&snapshot, ringBuffer)
8613		err = &smithy.DeserializationError{
8614			Err:      fmt.Errorf("failed to decode response body, %w", err),
8615			Snapshot: snapshot.Bytes(),
8616		}
8617		return err
8618	}
8619
8620	errorBody.Seek(0, io.SeekStart)
8621	if len(code) != 0 {
8622		errorCode = restjson.SanitizeErrorCode(code)
8623	}
8624	if len(message) != 0 {
8625		errorMessage = message
8626	}
8627
8628	switch {
8629	case strings.EqualFold("WAFInternalErrorException", errorCode):
8630		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8631
8632	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8633		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8634
8635	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8636		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8637
8638	case strings.EqualFold("WAFInvalidRegexPatternException", errorCode):
8639		return awsAwsjson11_deserializeErrorWAFInvalidRegexPatternException(response, errorBody)
8640
8641	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8642		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8643
8644	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8645		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8646
8647	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8648		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8649
8650	case strings.EqualFold("WAFStaleDataException", errorCode):
8651		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8652
8653	default:
8654		genericError := &smithy.GenericAPIError{
8655			Code:    errorCode,
8656			Message: errorMessage,
8657		}
8658		return genericError
8659
8660	}
8661}
8662
8663type awsAwsjson11_deserializeOpUpdateRule struct {
8664}
8665
8666func (*awsAwsjson11_deserializeOpUpdateRule) ID() string {
8667	return "OperationDeserializer"
8668}
8669
8670func (m *awsAwsjson11_deserializeOpUpdateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8671	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8672) {
8673	out, metadata, err = next.HandleDeserialize(ctx, in)
8674	if err != nil {
8675		return out, metadata, err
8676	}
8677
8678	response, ok := out.RawResponse.(*smithyhttp.Response)
8679	if !ok {
8680		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8681	}
8682
8683	if response.StatusCode < 200 || response.StatusCode >= 300 {
8684		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRule(response, &metadata)
8685	}
8686	output := &UpdateRuleOutput{}
8687	out.Result = output
8688
8689	var buff [1024]byte
8690	ringBuffer := smithyio.NewRingBuffer(buff[:])
8691
8692	body := io.TeeReader(response.Body, ringBuffer)
8693	decoder := json.NewDecoder(body)
8694	decoder.UseNumber()
8695	var shape interface{}
8696	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8697		var snapshot bytes.Buffer
8698		io.Copy(&snapshot, ringBuffer)
8699		err = &smithy.DeserializationError{
8700			Err:      fmt.Errorf("failed to decode response body, %w", err),
8701			Snapshot: snapshot.Bytes(),
8702		}
8703		return out, metadata, err
8704	}
8705
8706	err = awsAwsjson11_deserializeOpDocumentUpdateRuleOutput(&output, shape)
8707	if err != nil {
8708		var snapshot bytes.Buffer
8709		io.Copy(&snapshot, ringBuffer)
8710		err = &smithy.DeserializationError{
8711			Err:      fmt.Errorf("failed to decode response body, %w", err),
8712			Snapshot: snapshot.Bytes(),
8713		}
8714		return out, metadata, err
8715	}
8716
8717	return out, metadata, err
8718}
8719
8720func awsAwsjson11_deserializeOpErrorUpdateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8721	var errorBuffer bytes.Buffer
8722	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8723		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8724	}
8725	errorBody := bytes.NewReader(errorBuffer.Bytes())
8726
8727	errorCode := "UnknownError"
8728	errorMessage := errorCode
8729
8730	code := response.Header.Get("X-Amzn-ErrorType")
8731	if len(code) != 0 {
8732		errorCode = restjson.SanitizeErrorCode(code)
8733	}
8734
8735	var buff [1024]byte
8736	ringBuffer := smithyio.NewRingBuffer(buff[:])
8737
8738	body := io.TeeReader(errorBody, ringBuffer)
8739	decoder := json.NewDecoder(body)
8740	decoder.UseNumber()
8741	code, message, err := restjson.GetErrorInfo(decoder)
8742	if err != nil {
8743		var snapshot bytes.Buffer
8744		io.Copy(&snapshot, ringBuffer)
8745		err = &smithy.DeserializationError{
8746			Err:      fmt.Errorf("failed to decode response body, %w", err),
8747			Snapshot: snapshot.Bytes(),
8748		}
8749		return err
8750	}
8751
8752	errorBody.Seek(0, io.SeekStart)
8753	if len(code) != 0 {
8754		errorCode = restjson.SanitizeErrorCode(code)
8755	}
8756	if len(message) != 0 {
8757		errorMessage = message
8758	}
8759
8760	switch {
8761	case strings.EqualFold("WAFInternalErrorException", errorCode):
8762		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8763
8764	case strings.EqualFold("WAFInvalidAccountException", errorCode):
8765		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
8766
8767	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8768		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8769
8770	case strings.EqualFold("WAFInvalidParameterException", errorCode):
8771		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
8772
8773	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8774		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8775
8776	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8777		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8778
8779	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8780		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8781
8782	case strings.EqualFold("WAFReferencedItemException", errorCode):
8783		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
8784
8785	case strings.EqualFold("WAFStaleDataException", errorCode):
8786		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8787
8788	default:
8789		genericError := &smithy.GenericAPIError{
8790			Code:    errorCode,
8791			Message: errorMessage,
8792		}
8793		return genericError
8794
8795	}
8796}
8797
8798type awsAwsjson11_deserializeOpUpdateRuleGroup struct {
8799}
8800
8801func (*awsAwsjson11_deserializeOpUpdateRuleGroup) ID() string {
8802	return "OperationDeserializer"
8803}
8804
8805func (m *awsAwsjson11_deserializeOpUpdateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8806	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8807) {
8808	out, metadata, err = next.HandleDeserialize(ctx, in)
8809	if err != nil {
8810		return out, metadata, err
8811	}
8812
8813	response, ok := out.RawResponse.(*smithyhttp.Response)
8814	if !ok {
8815		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8816	}
8817
8818	if response.StatusCode < 200 || response.StatusCode >= 300 {
8819		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRuleGroup(response, &metadata)
8820	}
8821	output := &UpdateRuleGroupOutput{}
8822	out.Result = output
8823
8824	var buff [1024]byte
8825	ringBuffer := smithyio.NewRingBuffer(buff[:])
8826
8827	body := io.TeeReader(response.Body, ringBuffer)
8828	decoder := json.NewDecoder(body)
8829	decoder.UseNumber()
8830	var shape interface{}
8831	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8832		var snapshot bytes.Buffer
8833		io.Copy(&snapshot, ringBuffer)
8834		err = &smithy.DeserializationError{
8835			Err:      fmt.Errorf("failed to decode response body, %w", err),
8836			Snapshot: snapshot.Bytes(),
8837		}
8838		return out, metadata, err
8839	}
8840
8841	err = awsAwsjson11_deserializeOpDocumentUpdateRuleGroupOutput(&output, shape)
8842	if err != nil {
8843		var snapshot bytes.Buffer
8844		io.Copy(&snapshot, ringBuffer)
8845		err = &smithy.DeserializationError{
8846			Err:      fmt.Errorf("failed to decode response body, %w", err),
8847			Snapshot: snapshot.Bytes(),
8848		}
8849		return out, metadata, err
8850	}
8851
8852	return out, metadata, err
8853}
8854
8855func awsAwsjson11_deserializeOpErrorUpdateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8856	var errorBuffer bytes.Buffer
8857	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8858		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8859	}
8860	errorBody := bytes.NewReader(errorBuffer.Bytes())
8861
8862	errorCode := "UnknownError"
8863	errorMessage := errorCode
8864
8865	code := response.Header.Get("X-Amzn-ErrorType")
8866	if len(code) != 0 {
8867		errorCode = restjson.SanitizeErrorCode(code)
8868	}
8869
8870	var buff [1024]byte
8871	ringBuffer := smithyio.NewRingBuffer(buff[:])
8872
8873	body := io.TeeReader(errorBody, ringBuffer)
8874	decoder := json.NewDecoder(body)
8875	decoder.UseNumber()
8876	code, message, err := restjson.GetErrorInfo(decoder)
8877	if err != nil {
8878		var snapshot bytes.Buffer
8879		io.Copy(&snapshot, ringBuffer)
8880		err = &smithy.DeserializationError{
8881			Err:      fmt.Errorf("failed to decode response body, %w", err),
8882			Snapshot: snapshot.Bytes(),
8883		}
8884		return err
8885	}
8886
8887	errorBody.Seek(0, io.SeekStart)
8888	if len(code) != 0 {
8889		errorCode = restjson.SanitizeErrorCode(code)
8890	}
8891	if len(message) != 0 {
8892		errorMessage = message
8893	}
8894
8895	switch {
8896	case strings.EqualFold("WAFInternalErrorException", errorCode):
8897		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
8898
8899	case strings.EqualFold("WAFInvalidOperationException", errorCode):
8900		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
8901
8902	case strings.EqualFold("WAFInvalidParameterException", errorCode):
8903		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
8904
8905	case strings.EqualFold("WAFLimitsExceededException", errorCode):
8906		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
8907
8908	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
8909		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
8910
8911	case strings.EqualFold("WAFNonexistentItemException", errorCode):
8912		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
8913
8914	case strings.EqualFold("WAFStaleDataException", errorCode):
8915		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
8916
8917	default:
8918		genericError := &smithy.GenericAPIError{
8919			Code:    errorCode,
8920			Message: errorMessage,
8921		}
8922		return genericError
8923
8924	}
8925}
8926
8927type awsAwsjson11_deserializeOpUpdateSizeConstraintSet struct {
8928}
8929
8930func (*awsAwsjson11_deserializeOpUpdateSizeConstraintSet) ID() string {
8931	return "OperationDeserializer"
8932}
8933
8934func (m *awsAwsjson11_deserializeOpUpdateSizeConstraintSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
8935	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
8936) {
8937	out, metadata, err = next.HandleDeserialize(ctx, in)
8938	if err != nil {
8939		return out, metadata, err
8940	}
8941
8942	response, ok := out.RawResponse.(*smithyhttp.Response)
8943	if !ok {
8944		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
8945	}
8946
8947	if response.StatusCode < 200 || response.StatusCode >= 300 {
8948		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSizeConstraintSet(response, &metadata)
8949	}
8950	output := &UpdateSizeConstraintSetOutput{}
8951	out.Result = output
8952
8953	var buff [1024]byte
8954	ringBuffer := smithyio.NewRingBuffer(buff[:])
8955
8956	body := io.TeeReader(response.Body, ringBuffer)
8957	decoder := json.NewDecoder(body)
8958	decoder.UseNumber()
8959	var shape interface{}
8960	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
8961		var snapshot bytes.Buffer
8962		io.Copy(&snapshot, ringBuffer)
8963		err = &smithy.DeserializationError{
8964			Err:      fmt.Errorf("failed to decode response body, %w", err),
8965			Snapshot: snapshot.Bytes(),
8966		}
8967		return out, metadata, err
8968	}
8969
8970	err = awsAwsjson11_deserializeOpDocumentUpdateSizeConstraintSetOutput(&output, shape)
8971	if err != nil {
8972		var snapshot bytes.Buffer
8973		io.Copy(&snapshot, ringBuffer)
8974		err = &smithy.DeserializationError{
8975			Err:      fmt.Errorf("failed to decode response body, %w", err),
8976			Snapshot: snapshot.Bytes(),
8977		}
8978		return out, metadata, err
8979	}
8980
8981	return out, metadata, err
8982}
8983
8984func awsAwsjson11_deserializeOpErrorUpdateSizeConstraintSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
8985	var errorBuffer bytes.Buffer
8986	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
8987		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
8988	}
8989	errorBody := bytes.NewReader(errorBuffer.Bytes())
8990
8991	errorCode := "UnknownError"
8992	errorMessage := errorCode
8993
8994	code := response.Header.Get("X-Amzn-ErrorType")
8995	if len(code) != 0 {
8996		errorCode = restjson.SanitizeErrorCode(code)
8997	}
8998
8999	var buff [1024]byte
9000	ringBuffer := smithyio.NewRingBuffer(buff[:])
9001
9002	body := io.TeeReader(errorBody, ringBuffer)
9003	decoder := json.NewDecoder(body)
9004	decoder.UseNumber()
9005	code, message, err := restjson.GetErrorInfo(decoder)
9006	if err != nil {
9007		var snapshot bytes.Buffer
9008		io.Copy(&snapshot, ringBuffer)
9009		err = &smithy.DeserializationError{
9010			Err:      fmt.Errorf("failed to decode response body, %w", err),
9011			Snapshot: snapshot.Bytes(),
9012		}
9013		return err
9014	}
9015
9016	errorBody.Seek(0, io.SeekStart)
9017	if len(code) != 0 {
9018		errorCode = restjson.SanitizeErrorCode(code)
9019	}
9020	if len(message) != 0 {
9021		errorMessage = message
9022	}
9023
9024	switch {
9025	case strings.EqualFold("WAFInternalErrorException", errorCode):
9026		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
9027
9028	case strings.EqualFold("WAFInvalidAccountException", errorCode):
9029		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
9030
9031	case strings.EqualFold("WAFInvalidOperationException", errorCode):
9032		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
9033
9034	case strings.EqualFold("WAFInvalidParameterException", errorCode):
9035		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
9036
9037	case strings.EqualFold("WAFLimitsExceededException", errorCode):
9038		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
9039
9040	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
9041		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
9042
9043	case strings.EqualFold("WAFNonexistentItemException", errorCode):
9044		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
9045
9046	case strings.EqualFold("WAFReferencedItemException", errorCode):
9047		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
9048
9049	case strings.EqualFold("WAFStaleDataException", errorCode):
9050		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
9051
9052	default:
9053		genericError := &smithy.GenericAPIError{
9054			Code:    errorCode,
9055			Message: errorMessage,
9056		}
9057		return genericError
9058
9059	}
9060}
9061
9062type awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet struct {
9063}
9064
9065func (*awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet) ID() string {
9066	return "OperationDeserializer"
9067}
9068
9069func (m *awsAwsjson11_deserializeOpUpdateSqlInjectionMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
9070	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
9071) {
9072	out, metadata, err = next.HandleDeserialize(ctx, in)
9073	if err != nil {
9074		return out, metadata, err
9075	}
9076
9077	response, ok := out.RawResponse.(*smithyhttp.Response)
9078	if !ok {
9079		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
9080	}
9081
9082	if response.StatusCode < 200 || response.StatusCode >= 300 {
9083		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSqlInjectionMatchSet(response, &metadata)
9084	}
9085	output := &UpdateSqlInjectionMatchSetOutput{}
9086	out.Result = output
9087
9088	var buff [1024]byte
9089	ringBuffer := smithyio.NewRingBuffer(buff[:])
9090
9091	body := io.TeeReader(response.Body, ringBuffer)
9092	decoder := json.NewDecoder(body)
9093	decoder.UseNumber()
9094	var shape interface{}
9095	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9096		var snapshot bytes.Buffer
9097		io.Copy(&snapshot, ringBuffer)
9098		err = &smithy.DeserializationError{
9099			Err:      fmt.Errorf("failed to decode response body, %w", err),
9100			Snapshot: snapshot.Bytes(),
9101		}
9102		return out, metadata, err
9103	}
9104
9105	err = awsAwsjson11_deserializeOpDocumentUpdateSqlInjectionMatchSetOutput(&output, shape)
9106	if err != nil {
9107		var snapshot bytes.Buffer
9108		io.Copy(&snapshot, ringBuffer)
9109		err = &smithy.DeserializationError{
9110			Err:      fmt.Errorf("failed to decode response body, %w", err),
9111			Snapshot: snapshot.Bytes(),
9112		}
9113		return out, metadata, err
9114	}
9115
9116	return out, metadata, err
9117}
9118
9119func awsAwsjson11_deserializeOpErrorUpdateSqlInjectionMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
9120	var errorBuffer bytes.Buffer
9121	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
9122		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
9123	}
9124	errorBody := bytes.NewReader(errorBuffer.Bytes())
9125
9126	errorCode := "UnknownError"
9127	errorMessage := errorCode
9128
9129	code := response.Header.Get("X-Amzn-ErrorType")
9130	if len(code) != 0 {
9131		errorCode = restjson.SanitizeErrorCode(code)
9132	}
9133
9134	var buff [1024]byte
9135	ringBuffer := smithyio.NewRingBuffer(buff[:])
9136
9137	body := io.TeeReader(errorBody, ringBuffer)
9138	decoder := json.NewDecoder(body)
9139	decoder.UseNumber()
9140	code, message, err := restjson.GetErrorInfo(decoder)
9141	if err != nil {
9142		var snapshot bytes.Buffer
9143		io.Copy(&snapshot, ringBuffer)
9144		err = &smithy.DeserializationError{
9145			Err:      fmt.Errorf("failed to decode response body, %w", err),
9146			Snapshot: snapshot.Bytes(),
9147		}
9148		return err
9149	}
9150
9151	errorBody.Seek(0, io.SeekStart)
9152	if len(code) != 0 {
9153		errorCode = restjson.SanitizeErrorCode(code)
9154	}
9155	if len(message) != 0 {
9156		errorMessage = message
9157	}
9158
9159	switch {
9160	case strings.EqualFold("WAFInternalErrorException", errorCode):
9161		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
9162
9163	case strings.EqualFold("WAFInvalidAccountException", errorCode):
9164		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
9165
9166	case strings.EqualFold("WAFInvalidOperationException", errorCode):
9167		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
9168
9169	case strings.EqualFold("WAFInvalidParameterException", errorCode):
9170		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
9171
9172	case strings.EqualFold("WAFLimitsExceededException", errorCode):
9173		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
9174
9175	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
9176		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
9177
9178	case strings.EqualFold("WAFNonexistentItemException", errorCode):
9179		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
9180
9181	case strings.EqualFold("WAFStaleDataException", errorCode):
9182		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
9183
9184	default:
9185		genericError := &smithy.GenericAPIError{
9186			Code:    errorCode,
9187			Message: errorMessage,
9188		}
9189		return genericError
9190
9191	}
9192}
9193
9194type awsAwsjson11_deserializeOpUpdateWebACL struct {
9195}
9196
9197func (*awsAwsjson11_deserializeOpUpdateWebACL) ID() string {
9198	return "OperationDeserializer"
9199}
9200
9201func (m *awsAwsjson11_deserializeOpUpdateWebACL) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
9202	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
9203) {
9204	out, metadata, err = next.HandleDeserialize(ctx, in)
9205	if err != nil {
9206		return out, metadata, err
9207	}
9208
9209	response, ok := out.RawResponse.(*smithyhttp.Response)
9210	if !ok {
9211		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
9212	}
9213
9214	if response.StatusCode < 200 || response.StatusCode >= 300 {
9215		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateWebACL(response, &metadata)
9216	}
9217	output := &UpdateWebACLOutput{}
9218	out.Result = output
9219
9220	var buff [1024]byte
9221	ringBuffer := smithyio.NewRingBuffer(buff[:])
9222
9223	body := io.TeeReader(response.Body, ringBuffer)
9224	decoder := json.NewDecoder(body)
9225	decoder.UseNumber()
9226	var shape interface{}
9227	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9228		var snapshot bytes.Buffer
9229		io.Copy(&snapshot, ringBuffer)
9230		err = &smithy.DeserializationError{
9231			Err:      fmt.Errorf("failed to decode response body, %w", err),
9232			Snapshot: snapshot.Bytes(),
9233		}
9234		return out, metadata, err
9235	}
9236
9237	err = awsAwsjson11_deserializeOpDocumentUpdateWebACLOutput(&output, shape)
9238	if err != nil {
9239		var snapshot bytes.Buffer
9240		io.Copy(&snapshot, ringBuffer)
9241		err = &smithy.DeserializationError{
9242			Err:      fmt.Errorf("failed to decode response body, %w", err),
9243			Snapshot: snapshot.Bytes(),
9244		}
9245		return out, metadata, err
9246	}
9247
9248	return out, metadata, err
9249}
9250
9251func awsAwsjson11_deserializeOpErrorUpdateWebACL(response *smithyhttp.Response, metadata *middleware.Metadata) error {
9252	var errorBuffer bytes.Buffer
9253	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
9254		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
9255	}
9256	errorBody := bytes.NewReader(errorBuffer.Bytes())
9257
9258	errorCode := "UnknownError"
9259	errorMessage := errorCode
9260
9261	code := response.Header.Get("X-Amzn-ErrorType")
9262	if len(code) != 0 {
9263		errorCode = restjson.SanitizeErrorCode(code)
9264	}
9265
9266	var buff [1024]byte
9267	ringBuffer := smithyio.NewRingBuffer(buff[:])
9268
9269	body := io.TeeReader(errorBody, ringBuffer)
9270	decoder := json.NewDecoder(body)
9271	decoder.UseNumber()
9272	code, message, err := restjson.GetErrorInfo(decoder)
9273	if err != nil {
9274		var snapshot bytes.Buffer
9275		io.Copy(&snapshot, ringBuffer)
9276		err = &smithy.DeserializationError{
9277			Err:      fmt.Errorf("failed to decode response body, %w", err),
9278			Snapshot: snapshot.Bytes(),
9279		}
9280		return err
9281	}
9282
9283	errorBody.Seek(0, io.SeekStart)
9284	if len(code) != 0 {
9285		errorCode = restjson.SanitizeErrorCode(code)
9286	}
9287	if len(message) != 0 {
9288		errorMessage = message
9289	}
9290
9291	switch {
9292	case strings.EqualFold("WAFInternalErrorException", errorCode):
9293		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
9294
9295	case strings.EqualFold("WAFInvalidAccountException", errorCode):
9296		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
9297
9298	case strings.EqualFold("WAFInvalidOperationException", errorCode):
9299		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
9300
9301	case strings.EqualFold("WAFInvalidParameterException", errorCode):
9302		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
9303
9304	case strings.EqualFold("WAFLimitsExceededException", errorCode):
9305		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
9306
9307	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
9308		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
9309
9310	case strings.EqualFold("WAFNonexistentItemException", errorCode):
9311		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
9312
9313	case strings.EqualFold("WAFReferencedItemException", errorCode):
9314		return awsAwsjson11_deserializeErrorWAFReferencedItemException(response, errorBody)
9315
9316	case strings.EqualFold("WAFStaleDataException", errorCode):
9317		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
9318
9319	case strings.EqualFold("WAFSubscriptionNotFoundException", errorCode):
9320		return awsAwsjson11_deserializeErrorWAFSubscriptionNotFoundException(response, errorBody)
9321
9322	default:
9323		genericError := &smithy.GenericAPIError{
9324			Code:    errorCode,
9325			Message: errorMessage,
9326		}
9327		return genericError
9328
9329	}
9330}
9331
9332type awsAwsjson11_deserializeOpUpdateXssMatchSet struct {
9333}
9334
9335func (*awsAwsjson11_deserializeOpUpdateXssMatchSet) ID() string {
9336	return "OperationDeserializer"
9337}
9338
9339func (m *awsAwsjson11_deserializeOpUpdateXssMatchSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
9340	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
9341) {
9342	out, metadata, err = next.HandleDeserialize(ctx, in)
9343	if err != nil {
9344		return out, metadata, err
9345	}
9346
9347	response, ok := out.RawResponse.(*smithyhttp.Response)
9348	if !ok {
9349		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
9350	}
9351
9352	if response.StatusCode < 200 || response.StatusCode >= 300 {
9353		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateXssMatchSet(response, &metadata)
9354	}
9355	output := &UpdateXssMatchSetOutput{}
9356	out.Result = output
9357
9358	var buff [1024]byte
9359	ringBuffer := smithyio.NewRingBuffer(buff[:])
9360
9361	body := io.TeeReader(response.Body, ringBuffer)
9362	decoder := json.NewDecoder(body)
9363	decoder.UseNumber()
9364	var shape interface{}
9365	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9366		var snapshot bytes.Buffer
9367		io.Copy(&snapshot, ringBuffer)
9368		err = &smithy.DeserializationError{
9369			Err:      fmt.Errorf("failed to decode response body, %w", err),
9370			Snapshot: snapshot.Bytes(),
9371		}
9372		return out, metadata, err
9373	}
9374
9375	err = awsAwsjson11_deserializeOpDocumentUpdateXssMatchSetOutput(&output, shape)
9376	if err != nil {
9377		var snapshot bytes.Buffer
9378		io.Copy(&snapshot, ringBuffer)
9379		err = &smithy.DeserializationError{
9380			Err:      fmt.Errorf("failed to decode response body, %w", err),
9381			Snapshot: snapshot.Bytes(),
9382		}
9383		return out, metadata, err
9384	}
9385
9386	return out, metadata, err
9387}
9388
9389func awsAwsjson11_deserializeOpErrorUpdateXssMatchSet(response *smithyhttp.Response, metadata *middleware.Metadata) error {
9390	var errorBuffer bytes.Buffer
9391	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
9392		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
9393	}
9394	errorBody := bytes.NewReader(errorBuffer.Bytes())
9395
9396	errorCode := "UnknownError"
9397	errorMessage := errorCode
9398
9399	code := response.Header.Get("X-Amzn-ErrorType")
9400	if len(code) != 0 {
9401		errorCode = restjson.SanitizeErrorCode(code)
9402	}
9403
9404	var buff [1024]byte
9405	ringBuffer := smithyio.NewRingBuffer(buff[:])
9406
9407	body := io.TeeReader(errorBody, ringBuffer)
9408	decoder := json.NewDecoder(body)
9409	decoder.UseNumber()
9410	code, message, err := restjson.GetErrorInfo(decoder)
9411	if err != nil {
9412		var snapshot bytes.Buffer
9413		io.Copy(&snapshot, ringBuffer)
9414		err = &smithy.DeserializationError{
9415			Err:      fmt.Errorf("failed to decode response body, %w", err),
9416			Snapshot: snapshot.Bytes(),
9417		}
9418		return err
9419	}
9420
9421	errorBody.Seek(0, io.SeekStart)
9422	if len(code) != 0 {
9423		errorCode = restjson.SanitizeErrorCode(code)
9424	}
9425	if len(message) != 0 {
9426		errorMessage = message
9427	}
9428
9429	switch {
9430	case strings.EqualFold("WAFInternalErrorException", errorCode):
9431		return awsAwsjson11_deserializeErrorWAFInternalErrorException(response, errorBody)
9432
9433	case strings.EqualFold("WAFInvalidAccountException", errorCode):
9434		return awsAwsjson11_deserializeErrorWAFInvalidAccountException(response, errorBody)
9435
9436	case strings.EqualFold("WAFInvalidOperationException", errorCode):
9437		return awsAwsjson11_deserializeErrorWAFInvalidOperationException(response, errorBody)
9438
9439	case strings.EqualFold("WAFInvalidParameterException", errorCode):
9440		return awsAwsjson11_deserializeErrorWAFInvalidParameterException(response, errorBody)
9441
9442	case strings.EqualFold("WAFLimitsExceededException", errorCode):
9443		return awsAwsjson11_deserializeErrorWAFLimitsExceededException(response, errorBody)
9444
9445	case strings.EqualFold("WAFNonexistentContainerException", errorCode):
9446		return awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response, errorBody)
9447
9448	case strings.EqualFold("WAFNonexistentItemException", errorCode):
9449		return awsAwsjson11_deserializeErrorWAFNonexistentItemException(response, errorBody)
9450
9451	case strings.EqualFold("WAFStaleDataException", errorCode):
9452		return awsAwsjson11_deserializeErrorWAFStaleDataException(response, errorBody)
9453
9454	default:
9455		genericError := &smithy.GenericAPIError{
9456			Code:    errorCode,
9457			Message: errorMessage,
9458		}
9459		return genericError
9460
9461	}
9462}
9463
9464func awsAwsjson11_deserializeErrorWAFBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9465	var buff [1024]byte
9466	ringBuffer := smithyio.NewRingBuffer(buff[:])
9467
9468	body := io.TeeReader(errorBody, ringBuffer)
9469	decoder := json.NewDecoder(body)
9470	decoder.UseNumber()
9471	var shape interface{}
9472	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9473		var snapshot bytes.Buffer
9474		io.Copy(&snapshot, ringBuffer)
9475		err = &smithy.DeserializationError{
9476			Err:      fmt.Errorf("failed to decode response body, %w", err),
9477			Snapshot: snapshot.Bytes(),
9478		}
9479		return err
9480	}
9481
9482	output := &types.WAFBadRequestException{}
9483	err := awsAwsjson11_deserializeDocumentWAFBadRequestException(&output, shape)
9484
9485	if err != nil {
9486		var snapshot bytes.Buffer
9487		io.Copy(&snapshot, ringBuffer)
9488		err = &smithy.DeserializationError{
9489			Err:      fmt.Errorf("failed to decode response body, %w", err),
9490			Snapshot: snapshot.Bytes(),
9491		}
9492		return err
9493	}
9494
9495	errorBody.Seek(0, io.SeekStart)
9496	return output
9497}
9498
9499func awsAwsjson11_deserializeErrorWAFDisallowedNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9500	var buff [1024]byte
9501	ringBuffer := smithyio.NewRingBuffer(buff[:])
9502
9503	body := io.TeeReader(errorBody, ringBuffer)
9504	decoder := json.NewDecoder(body)
9505	decoder.UseNumber()
9506	var shape interface{}
9507	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9508		var snapshot bytes.Buffer
9509		io.Copy(&snapshot, ringBuffer)
9510		err = &smithy.DeserializationError{
9511			Err:      fmt.Errorf("failed to decode response body, %w", err),
9512			Snapshot: snapshot.Bytes(),
9513		}
9514		return err
9515	}
9516
9517	output := &types.WAFDisallowedNameException{}
9518	err := awsAwsjson11_deserializeDocumentWAFDisallowedNameException(&output, shape)
9519
9520	if err != nil {
9521		var snapshot bytes.Buffer
9522		io.Copy(&snapshot, ringBuffer)
9523		err = &smithy.DeserializationError{
9524			Err:      fmt.Errorf("failed to decode response body, %w", err),
9525			Snapshot: snapshot.Bytes(),
9526		}
9527		return err
9528	}
9529
9530	errorBody.Seek(0, io.SeekStart)
9531	return output
9532}
9533
9534func awsAwsjson11_deserializeErrorWAFEntityMigrationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9535	var buff [1024]byte
9536	ringBuffer := smithyio.NewRingBuffer(buff[:])
9537
9538	body := io.TeeReader(errorBody, ringBuffer)
9539	decoder := json.NewDecoder(body)
9540	decoder.UseNumber()
9541	var shape interface{}
9542	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9543		var snapshot bytes.Buffer
9544		io.Copy(&snapshot, ringBuffer)
9545		err = &smithy.DeserializationError{
9546			Err:      fmt.Errorf("failed to decode response body, %w", err),
9547			Snapshot: snapshot.Bytes(),
9548		}
9549		return err
9550	}
9551
9552	output := &types.WAFEntityMigrationException{}
9553	err := awsAwsjson11_deserializeDocumentWAFEntityMigrationException(&output, shape)
9554
9555	if err != nil {
9556		var snapshot bytes.Buffer
9557		io.Copy(&snapshot, ringBuffer)
9558		err = &smithy.DeserializationError{
9559			Err:      fmt.Errorf("failed to decode response body, %w", err),
9560			Snapshot: snapshot.Bytes(),
9561		}
9562		return err
9563	}
9564
9565	errorBody.Seek(0, io.SeekStart)
9566	return output
9567}
9568
9569func awsAwsjson11_deserializeErrorWAFInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9570	var buff [1024]byte
9571	ringBuffer := smithyio.NewRingBuffer(buff[:])
9572
9573	body := io.TeeReader(errorBody, ringBuffer)
9574	decoder := json.NewDecoder(body)
9575	decoder.UseNumber()
9576	var shape interface{}
9577	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9578		var snapshot bytes.Buffer
9579		io.Copy(&snapshot, ringBuffer)
9580		err = &smithy.DeserializationError{
9581			Err:      fmt.Errorf("failed to decode response body, %w", err),
9582			Snapshot: snapshot.Bytes(),
9583		}
9584		return err
9585	}
9586
9587	output := &types.WAFInternalErrorException{}
9588	err := awsAwsjson11_deserializeDocumentWAFInternalErrorException(&output, shape)
9589
9590	if err != nil {
9591		var snapshot bytes.Buffer
9592		io.Copy(&snapshot, ringBuffer)
9593		err = &smithy.DeserializationError{
9594			Err:      fmt.Errorf("failed to decode response body, %w", err),
9595			Snapshot: snapshot.Bytes(),
9596		}
9597		return err
9598	}
9599
9600	errorBody.Seek(0, io.SeekStart)
9601	return output
9602}
9603
9604func awsAwsjson11_deserializeErrorWAFInvalidAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9605	var buff [1024]byte
9606	ringBuffer := smithyio.NewRingBuffer(buff[:])
9607
9608	body := io.TeeReader(errorBody, ringBuffer)
9609	decoder := json.NewDecoder(body)
9610	decoder.UseNumber()
9611	var shape interface{}
9612	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9613		var snapshot bytes.Buffer
9614		io.Copy(&snapshot, ringBuffer)
9615		err = &smithy.DeserializationError{
9616			Err:      fmt.Errorf("failed to decode response body, %w", err),
9617			Snapshot: snapshot.Bytes(),
9618		}
9619		return err
9620	}
9621
9622	output := &types.WAFInvalidAccountException{}
9623	err := awsAwsjson11_deserializeDocumentWAFInvalidAccountException(&output, shape)
9624
9625	if err != nil {
9626		var snapshot bytes.Buffer
9627		io.Copy(&snapshot, ringBuffer)
9628		err = &smithy.DeserializationError{
9629			Err:      fmt.Errorf("failed to decode response body, %w", err),
9630			Snapshot: snapshot.Bytes(),
9631		}
9632		return err
9633	}
9634
9635	errorBody.Seek(0, io.SeekStart)
9636	return output
9637}
9638
9639func awsAwsjson11_deserializeErrorWAFInvalidOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9640	var buff [1024]byte
9641	ringBuffer := smithyio.NewRingBuffer(buff[:])
9642
9643	body := io.TeeReader(errorBody, ringBuffer)
9644	decoder := json.NewDecoder(body)
9645	decoder.UseNumber()
9646	var shape interface{}
9647	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9648		var snapshot bytes.Buffer
9649		io.Copy(&snapshot, ringBuffer)
9650		err = &smithy.DeserializationError{
9651			Err:      fmt.Errorf("failed to decode response body, %w", err),
9652			Snapshot: snapshot.Bytes(),
9653		}
9654		return err
9655	}
9656
9657	output := &types.WAFInvalidOperationException{}
9658	err := awsAwsjson11_deserializeDocumentWAFInvalidOperationException(&output, shape)
9659
9660	if err != nil {
9661		var snapshot bytes.Buffer
9662		io.Copy(&snapshot, ringBuffer)
9663		err = &smithy.DeserializationError{
9664			Err:      fmt.Errorf("failed to decode response body, %w", err),
9665			Snapshot: snapshot.Bytes(),
9666		}
9667		return err
9668	}
9669
9670	errorBody.Seek(0, io.SeekStart)
9671	return output
9672}
9673
9674func awsAwsjson11_deserializeErrorWAFInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9675	var buff [1024]byte
9676	ringBuffer := smithyio.NewRingBuffer(buff[:])
9677
9678	body := io.TeeReader(errorBody, ringBuffer)
9679	decoder := json.NewDecoder(body)
9680	decoder.UseNumber()
9681	var shape interface{}
9682	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9683		var snapshot bytes.Buffer
9684		io.Copy(&snapshot, ringBuffer)
9685		err = &smithy.DeserializationError{
9686			Err:      fmt.Errorf("failed to decode response body, %w", err),
9687			Snapshot: snapshot.Bytes(),
9688		}
9689		return err
9690	}
9691
9692	output := &types.WAFInvalidParameterException{}
9693	err := awsAwsjson11_deserializeDocumentWAFInvalidParameterException(&output, shape)
9694
9695	if err != nil {
9696		var snapshot bytes.Buffer
9697		io.Copy(&snapshot, ringBuffer)
9698		err = &smithy.DeserializationError{
9699			Err:      fmt.Errorf("failed to decode response body, %w", err),
9700			Snapshot: snapshot.Bytes(),
9701		}
9702		return err
9703	}
9704
9705	errorBody.Seek(0, io.SeekStart)
9706	return output
9707}
9708
9709func awsAwsjson11_deserializeErrorWAFInvalidPermissionPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9710	var buff [1024]byte
9711	ringBuffer := smithyio.NewRingBuffer(buff[:])
9712
9713	body := io.TeeReader(errorBody, ringBuffer)
9714	decoder := json.NewDecoder(body)
9715	decoder.UseNumber()
9716	var shape interface{}
9717	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9718		var snapshot bytes.Buffer
9719		io.Copy(&snapshot, ringBuffer)
9720		err = &smithy.DeserializationError{
9721			Err:      fmt.Errorf("failed to decode response body, %w", err),
9722			Snapshot: snapshot.Bytes(),
9723		}
9724		return err
9725	}
9726
9727	output := &types.WAFInvalidPermissionPolicyException{}
9728	err := awsAwsjson11_deserializeDocumentWAFInvalidPermissionPolicyException(&output, shape)
9729
9730	if err != nil {
9731		var snapshot bytes.Buffer
9732		io.Copy(&snapshot, ringBuffer)
9733		err = &smithy.DeserializationError{
9734			Err:      fmt.Errorf("failed to decode response body, %w", err),
9735			Snapshot: snapshot.Bytes(),
9736		}
9737		return err
9738	}
9739
9740	errorBody.Seek(0, io.SeekStart)
9741	return output
9742}
9743
9744func awsAwsjson11_deserializeErrorWAFInvalidRegexPatternException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9745	var buff [1024]byte
9746	ringBuffer := smithyio.NewRingBuffer(buff[:])
9747
9748	body := io.TeeReader(errorBody, ringBuffer)
9749	decoder := json.NewDecoder(body)
9750	decoder.UseNumber()
9751	var shape interface{}
9752	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9753		var snapshot bytes.Buffer
9754		io.Copy(&snapshot, ringBuffer)
9755		err = &smithy.DeserializationError{
9756			Err:      fmt.Errorf("failed to decode response body, %w", err),
9757			Snapshot: snapshot.Bytes(),
9758		}
9759		return err
9760	}
9761
9762	output := &types.WAFInvalidRegexPatternException{}
9763	err := awsAwsjson11_deserializeDocumentWAFInvalidRegexPatternException(&output, shape)
9764
9765	if err != nil {
9766		var snapshot bytes.Buffer
9767		io.Copy(&snapshot, ringBuffer)
9768		err = &smithy.DeserializationError{
9769			Err:      fmt.Errorf("failed to decode response body, %w", err),
9770			Snapshot: snapshot.Bytes(),
9771		}
9772		return err
9773	}
9774
9775	errorBody.Seek(0, io.SeekStart)
9776	return output
9777}
9778
9779func awsAwsjson11_deserializeErrorWAFLimitsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9780	var buff [1024]byte
9781	ringBuffer := smithyio.NewRingBuffer(buff[:])
9782
9783	body := io.TeeReader(errorBody, ringBuffer)
9784	decoder := json.NewDecoder(body)
9785	decoder.UseNumber()
9786	var shape interface{}
9787	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9788		var snapshot bytes.Buffer
9789		io.Copy(&snapshot, ringBuffer)
9790		err = &smithy.DeserializationError{
9791			Err:      fmt.Errorf("failed to decode response body, %w", err),
9792			Snapshot: snapshot.Bytes(),
9793		}
9794		return err
9795	}
9796
9797	output := &types.WAFLimitsExceededException{}
9798	err := awsAwsjson11_deserializeDocumentWAFLimitsExceededException(&output, shape)
9799
9800	if err != nil {
9801		var snapshot bytes.Buffer
9802		io.Copy(&snapshot, ringBuffer)
9803		err = &smithy.DeserializationError{
9804			Err:      fmt.Errorf("failed to decode response body, %w", err),
9805			Snapshot: snapshot.Bytes(),
9806		}
9807		return err
9808	}
9809
9810	errorBody.Seek(0, io.SeekStart)
9811	return output
9812}
9813
9814func awsAwsjson11_deserializeErrorWAFNonEmptyEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9815	var buff [1024]byte
9816	ringBuffer := smithyio.NewRingBuffer(buff[:])
9817
9818	body := io.TeeReader(errorBody, ringBuffer)
9819	decoder := json.NewDecoder(body)
9820	decoder.UseNumber()
9821	var shape interface{}
9822	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9823		var snapshot bytes.Buffer
9824		io.Copy(&snapshot, ringBuffer)
9825		err = &smithy.DeserializationError{
9826			Err:      fmt.Errorf("failed to decode response body, %w", err),
9827			Snapshot: snapshot.Bytes(),
9828		}
9829		return err
9830	}
9831
9832	output := &types.WAFNonEmptyEntityException{}
9833	err := awsAwsjson11_deserializeDocumentWAFNonEmptyEntityException(&output, shape)
9834
9835	if err != nil {
9836		var snapshot bytes.Buffer
9837		io.Copy(&snapshot, ringBuffer)
9838		err = &smithy.DeserializationError{
9839			Err:      fmt.Errorf("failed to decode response body, %w", err),
9840			Snapshot: snapshot.Bytes(),
9841		}
9842		return err
9843	}
9844
9845	errorBody.Seek(0, io.SeekStart)
9846	return output
9847}
9848
9849func awsAwsjson11_deserializeErrorWAFNonexistentContainerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9850	var buff [1024]byte
9851	ringBuffer := smithyio.NewRingBuffer(buff[:])
9852
9853	body := io.TeeReader(errorBody, ringBuffer)
9854	decoder := json.NewDecoder(body)
9855	decoder.UseNumber()
9856	var shape interface{}
9857	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9858		var snapshot bytes.Buffer
9859		io.Copy(&snapshot, ringBuffer)
9860		err = &smithy.DeserializationError{
9861			Err:      fmt.Errorf("failed to decode response body, %w", err),
9862			Snapshot: snapshot.Bytes(),
9863		}
9864		return err
9865	}
9866
9867	output := &types.WAFNonexistentContainerException{}
9868	err := awsAwsjson11_deserializeDocumentWAFNonexistentContainerException(&output, shape)
9869
9870	if err != nil {
9871		var snapshot bytes.Buffer
9872		io.Copy(&snapshot, ringBuffer)
9873		err = &smithy.DeserializationError{
9874			Err:      fmt.Errorf("failed to decode response body, %w", err),
9875			Snapshot: snapshot.Bytes(),
9876		}
9877		return err
9878	}
9879
9880	errorBody.Seek(0, io.SeekStart)
9881	return output
9882}
9883
9884func awsAwsjson11_deserializeErrorWAFNonexistentItemException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9885	var buff [1024]byte
9886	ringBuffer := smithyio.NewRingBuffer(buff[:])
9887
9888	body := io.TeeReader(errorBody, ringBuffer)
9889	decoder := json.NewDecoder(body)
9890	decoder.UseNumber()
9891	var shape interface{}
9892	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9893		var snapshot bytes.Buffer
9894		io.Copy(&snapshot, ringBuffer)
9895		err = &smithy.DeserializationError{
9896			Err:      fmt.Errorf("failed to decode response body, %w", err),
9897			Snapshot: snapshot.Bytes(),
9898		}
9899		return err
9900	}
9901
9902	output := &types.WAFNonexistentItemException{}
9903	err := awsAwsjson11_deserializeDocumentWAFNonexistentItemException(&output, shape)
9904
9905	if err != nil {
9906		var snapshot bytes.Buffer
9907		io.Copy(&snapshot, ringBuffer)
9908		err = &smithy.DeserializationError{
9909			Err:      fmt.Errorf("failed to decode response body, %w", err),
9910			Snapshot: snapshot.Bytes(),
9911		}
9912		return err
9913	}
9914
9915	errorBody.Seek(0, io.SeekStart)
9916	return output
9917}
9918
9919func awsAwsjson11_deserializeErrorWAFReferencedItemException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9920	var buff [1024]byte
9921	ringBuffer := smithyio.NewRingBuffer(buff[:])
9922
9923	body := io.TeeReader(errorBody, ringBuffer)
9924	decoder := json.NewDecoder(body)
9925	decoder.UseNumber()
9926	var shape interface{}
9927	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9928		var snapshot bytes.Buffer
9929		io.Copy(&snapshot, ringBuffer)
9930		err = &smithy.DeserializationError{
9931			Err:      fmt.Errorf("failed to decode response body, %w", err),
9932			Snapshot: snapshot.Bytes(),
9933		}
9934		return err
9935	}
9936
9937	output := &types.WAFReferencedItemException{}
9938	err := awsAwsjson11_deserializeDocumentWAFReferencedItemException(&output, shape)
9939
9940	if err != nil {
9941		var snapshot bytes.Buffer
9942		io.Copy(&snapshot, ringBuffer)
9943		err = &smithy.DeserializationError{
9944			Err:      fmt.Errorf("failed to decode response body, %w", err),
9945			Snapshot: snapshot.Bytes(),
9946		}
9947		return err
9948	}
9949
9950	errorBody.Seek(0, io.SeekStart)
9951	return output
9952}
9953
9954func awsAwsjson11_deserializeErrorWAFServiceLinkedRoleErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9955	var buff [1024]byte
9956	ringBuffer := smithyio.NewRingBuffer(buff[:])
9957
9958	body := io.TeeReader(errorBody, ringBuffer)
9959	decoder := json.NewDecoder(body)
9960	decoder.UseNumber()
9961	var shape interface{}
9962	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9963		var snapshot bytes.Buffer
9964		io.Copy(&snapshot, ringBuffer)
9965		err = &smithy.DeserializationError{
9966			Err:      fmt.Errorf("failed to decode response body, %w", err),
9967			Snapshot: snapshot.Bytes(),
9968		}
9969		return err
9970	}
9971
9972	output := &types.WAFServiceLinkedRoleErrorException{}
9973	err := awsAwsjson11_deserializeDocumentWAFServiceLinkedRoleErrorException(&output, shape)
9974
9975	if err != nil {
9976		var snapshot bytes.Buffer
9977		io.Copy(&snapshot, ringBuffer)
9978		err = &smithy.DeserializationError{
9979			Err:      fmt.Errorf("failed to decode response body, %w", err),
9980			Snapshot: snapshot.Bytes(),
9981		}
9982		return err
9983	}
9984
9985	errorBody.Seek(0, io.SeekStart)
9986	return output
9987}
9988
9989func awsAwsjson11_deserializeErrorWAFStaleDataException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
9990	var buff [1024]byte
9991	ringBuffer := smithyio.NewRingBuffer(buff[:])
9992
9993	body := io.TeeReader(errorBody, ringBuffer)
9994	decoder := json.NewDecoder(body)
9995	decoder.UseNumber()
9996	var shape interface{}
9997	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
9998		var snapshot bytes.Buffer
9999		io.Copy(&snapshot, ringBuffer)
10000		err = &smithy.DeserializationError{
10001			Err:      fmt.Errorf("failed to decode response body, %w", err),
10002			Snapshot: snapshot.Bytes(),
10003		}
10004		return err
10005	}
10006
10007	output := &types.WAFStaleDataException{}
10008	err := awsAwsjson11_deserializeDocumentWAFStaleDataException(&output, shape)
10009
10010	if err != nil {
10011		var snapshot bytes.Buffer
10012		io.Copy(&snapshot, ringBuffer)
10013		err = &smithy.DeserializationError{
10014			Err:      fmt.Errorf("failed to decode response body, %w", err),
10015			Snapshot: snapshot.Bytes(),
10016		}
10017		return err
10018	}
10019
10020	errorBody.Seek(0, io.SeekStart)
10021	return output
10022}
10023
10024func awsAwsjson11_deserializeErrorWAFSubscriptionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
10025	var buff [1024]byte
10026	ringBuffer := smithyio.NewRingBuffer(buff[:])
10027
10028	body := io.TeeReader(errorBody, ringBuffer)
10029	decoder := json.NewDecoder(body)
10030	decoder.UseNumber()
10031	var shape interface{}
10032	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
10033		var snapshot bytes.Buffer
10034		io.Copy(&snapshot, ringBuffer)
10035		err = &smithy.DeserializationError{
10036			Err:      fmt.Errorf("failed to decode response body, %w", err),
10037			Snapshot: snapshot.Bytes(),
10038		}
10039		return err
10040	}
10041
10042	output := &types.WAFSubscriptionNotFoundException{}
10043	err := awsAwsjson11_deserializeDocumentWAFSubscriptionNotFoundException(&output, shape)
10044
10045	if err != nil {
10046		var snapshot bytes.Buffer
10047		io.Copy(&snapshot, ringBuffer)
10048		err = &smithy.DeserializationError{
10049			Err:      fmt.Errorf("failed to decode response body, %w", err),
10050			Snapshot: snapshot.Bytes(),
10051		}
10052		return err
10053	}
10054
10055	errorBody.Seek(0, io.SeekStart)
10056	return output
10057}
10058
10059func awsAwsjson11_deserializeErrorWAFTagOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
10060	var buff [1024]byte
10061	ringBuffer := smithyio.NewRingBuffer(buff[:])
10062
10063	body := io.TeeReader(errorBody, ringBuffer)
10064	decoder := json.NewDecoder(body)
10065	decoder.UseNumber()
10066	var shape interface{}
10067	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
10068		var snapshot bytes.Buffer
10069		io.Copy(&snapshot, ringBuffer)
10070		err = &smithy.DeserializationError{
10071			Err:      fmt.Errorf("failed to decode response body, %w", err),
10072			Snapshot: snapshot.Bytes(),
10073		}
10074		return err
10075	}
10076
10077	output := &types.WAFTagOperationException{}
10078	err := awsAwsjson11_deserializeDocumentWAFTagOperationException(&output, shape)
10079
10080	if err != nil {
10081		var snapshot bytes.Buffer
10082		io.Copy(&snapshot, ringBuffer)
10083		err = &smithy.DeserializationError{
10084			Err:      fmt.Errorf("failed to decode response body, %w", err),
10085			Snapshot: snapshot.Bytes(),
10086		}
10087		return err
10088	}
10089
10090	errorBody.Seek(0, io.SeekStart)
10091	return output
10092}
10093
10094func awsAwsjson11_deserializeErrorWAFTagOperationInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
10095	var buff [1024]byte
10096	ringBuffer := smithyio.NewRingBuffer(buff[:])
10097
10098	body := io.TeeReader(errorBody, ringBuffer)
10099	decoder := json.NewDecoder(body)
10100	decoder.UseNumber()
10101	var shape interface{}
10102	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
10103		var snapshot bytes.Buffer
10104		io.Copy(&snapshot, ringBuffer)
10105		err = &smithy.DeserializationError{
10106			Err:      fmt.Errorf("failed to decode response body, %w", err),
10107			Snapshot: snapshot.Bytes(),
10108		}
10109		return err
10110	}
10111
10112	output := &types.WAFTagOperationInternalErrorException{}
10113	err := awsAwsjson11_deserializeDocumentWAFTagOperationInternalErrorException(&output, shape)
10114
10115	if err != nil {
10116		var snapshot bytes.Buffer
10117		io.Copy(&snapshot, ringBuffer)
10118		err = &smithy.DeserializationError{
10119			Err:      fmt.Errorf("failed to decode response body, %w", err),
10120			Snapshot: snapshot.Bytes(),
10121		}
10122		return err
10123	}
10124
10125	errorBody.Seek(0, io.SeekStart)
10126	return output
10127}
10128
10129func awsAwsjson11_deserializeDocumentActivatedRule(v **types.ActivatedRule, value interface{}) error {
10130	if v == nil {
10131		return fmt.Errorf("unexpected nil of type %T", v)
10132	}
10133	if value == nil {
10134		return nil
10135	}
10136
10137	shape, ok := value.(map[string]interface{})
10138	if !ok {
10139		return fmt.Errorf("unexpected JSON type %v", value)
10140	}
10141
10142	var sv *types.ActivatedRule
10143	if *v == nil {
10144		sv = &types.ActivatedRule{}
10145	} else {
10146		sv = *v
10147	}
10148
10149	for key, value := range shape {
10150		switch key {
10151		case "Action":
10152			if err := awsAwsjson11_deserializeDocumentWafAction(&sv.Action, value); err != nil {
10153				return err
10154			}
10155
10156		case "ExcludedRules":
10157			if err := awsAwsjson11_deserializeDocumentExcludedRules(&sv.ExcludedRules, value); err != nil {
10158				return err
10159			}
10160
10161		case "OverrideAction":
10162			if err := awsAwsjson11_deserializeDocumentWafOverrideAction(&sv.OverrideAction, value); err != nil {
10163				return err
10164			}
10165
10166		case "Priority":
10167			if value != nil {
10168				jtv, ok := value.(json.Number)
10169				if !ok {
10170					return fmt.Errorf("expected RulePriority to be json.Number, got %T instead", value)
10171				}
10172				i64, err := jtv.Int64()
10173				if err != nil {
10174					return err
10175				}
10176				sv.Priority = ptr.Int32(int32(i64))
10177			}
10178
10179		case "RuleId":
10180			if value != nil {
10181				jtv, ok := value.(string)
10182				if !ok {
10183					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10184				}
10185				sv.RuleId = ptr.String(jtv)
10186			}
10187
10188		case "Type":
10189			if value != nil {
10190				jtv, ok := value.(string)
10191				if !ok {
10192					return fmt.Errorf("expected WafRuleType to be of type string, got %T instead", value)
10193				}
10194				sv.Type = types.WafRuleType(jtv)
10195			}
10196
10197		default:
10198			_, _ = key, value
10199
10200		}
10201	}
10202	*v = sv
10203	return nil
10204}
10205
10206func awsAwsjson11_deserializeDocumentActivatedRules(v *[]types.ActivatedRule, value interface{}) error {
10207	if v == nil {
10208		return fmt.Errorf("unexpected nil of type %T", v)
10209	}
10210	if value == nil {
10211		return nil
10212	}
10213
10214	shape, ok := value.([]interface{})
10215	if !ok {
10216		return fmt.Errorf("unexpected JSON type %v", value)
10217	}
10218
10219	var cv []types.ActivatedRule
10220	if *v == nil {
10221		cv = []types.ActivatedRule{}
10222	} else {
10223		cv = *v
10224	}
10225
10226	for _, value := range shape {
10227		var col types.ActivatedRule
10228		destAddr := &col
10229		if err := awsAwsjson11_deserializeDocumentActivatedRule(&destAddr, value); err != nil {
10230			return err
10231		}
10232		col = *destAddr
10233		cv = append(cv, col)
10234
10235	}
10236	*v = cv
10237	return nil
10238}
10239
10240func awsAwsjson11_deserializeDocumentByteMatchSet(v **types.ByteMatchSet, value interface{}) error {
10241	if v == nil {
10242		return fmt.Errorf("unexpected nil of type %T", v)
10243	}
10244	if value == nil {
10245		return nil
10246	}
10247
10248	shape, ok := value.(map[string]interface{})
10249	if !ok {
10250		return fmt.Errorf("unexpected JSON type %v", value)
10251	}
10252
10253	var sv *types.ByteMatchSet
10254	if *v == nil {
10255		sv = &types.ByteMatchSet{}
10256	} else {
10257		sv = *v
10258	}
10259
10260	for key, value := range shape {
10261		switch key {
10262		case "ByteMatchSetId":
10263			if value != nil {
10264				jtv, ok := value.(string)
10265				if !ok {
10266					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10267				}
10268				sv.ByteMatchSetId = ptr.String(jtv)
10269			}
10270
10271		case "ByteMatchTuples":
10272			if err := awsAwsjson11_deserializeDocumentByteMatchTuples(&sv.ByteMatchTuples, value); err != nil {
10273				return err
10274			}
10275
10276		case "Name":
10277			if value != nil {
10278				jtv, ok := value.(string)
10279				if !ok {
10280					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
10281				}
10282				sv.Name = ptr.String(jtv)
10283			}
10284
10285		default:
10286			_, _ = key, value
10287
10288		}
10289	}
10290	*v = sv
10291	return nil
10292}
10293
10294func awsAwsjson11_deserializeDocumentByteMatchSetSummaries(v *[]types.ByteMatchSetSummary, value interface{}) error {
10295	if v == nil {
10296		return fmt.Errorf("unexpected nil of type %T", v)
10297	}
10298	if value == nil {
10299		return nil
10300	}
10301
10302	shape, ok := value.([]interface{})
10303	if !ok {
10304		return fmt.Errorf("unexpected JSON type %v", value)
10305	}
10306
10307	var cv []types.ByteMatchSetSummary
10308	if *v == nil {
10309		cv = []types.ByteMatchSetSummary{}
10310	} else {
10311		cv = *v
10312	}
10313
10314	for _, value := range shape {
10315		var col types.ByteMatchSetSummary
10316		destAddr := &col
10317		if err := awsAwsjson11_deserializeDocumentByteMatchSetSummary(&destAddr, value); err != nil {
10318			return err
10319		}
10320		col = *destAddr
10321		cv = append(cv, col)
10322
10323	}
10324	*v = cv
10325	return nil
10326}
10327
10328func awsAwsjson11_deserializeDocumentByteMatchSetSummary(v **types.ByteMatchSetSummary, value interface{}) error {
10329	if v == nil {
10330		return fmt.Errorf("unexpected nil of type %T", v)
10331	}
10332	if value == nil {
10333		return nil
10334	}
10335
10336	shape, ok := value.(map[string]interface{})
10337	if !ok {
10338		return fmt.Errorf("unexpected JSON type %v", value)
10339	}
10340
10341	var sv *types.ByteMatchSetSummary
10342	if *v == nil {
10343		sv = &types.ByteMatchSetSummary{}
10344	} else {
10345		sv = *v
10346	}
10347
10348	for key, value := range shape {
10349		switch key {
10350		case "ByteMatchSetId":
10351			if value != nil {
10352				jtv, ok := value.(string)
10353				if !ok {
10354					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10355				}
10356				sv.ByteMatchSetId = ptr.String(jtv)
10357			}
10358
10359		case "Name":
10360			if value != nil {
10361				jtv, ok := value.(string)
10362				if !ok {
10363					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
10364				}
10365				sv.Name = ptr.String(jtv)
10366			}
10367
10368		default:
10369			_, _ = key, value
10370
10371		}
10372	}
10373	*v = sv
10374	return nil
10375}
10376
10377func awsAwsjson11_deserializeDocumentByteMatchTuple(v **types.ByteMatchTuple, value interface{}) error {
10378	if v == nil {
10379		return fmt.Errorf("unexpected nil of type %T", v)
10380	}
10381	if value == nil {
10382		return nil
10383	}
10384
10385	shape, ok := value.(map[string]interface{})
10386	if !ok {
10387		return fmt.Errorf("unexpected JSON type %v", value)
10388	}
10389
10390	var sv *types.ByteMatchTuple
10391	if *v == nil {
10392		sv = &types.ByteMatchTuple{}
10393	} else {
10394		sv = *v
10395	}
10396
10397	for key, value := range shape {
10398		switch key {
10399		case "FieldToMatch":
10400			if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil {
10401				return err
10402			}
10403
10404		case "PositionalConstraint":
10405			if value != nil {
10406				jtv, ok := value.(string)
10407				if !ok {
10408					return fmt.Errorf("expected PositionalConstraint to be of type string, got %T instead", value)
10409				}
10410				sv.PositionalConstraint = types.PositionalConstraint(jtv)
10411			}
10412
10413		case "TargetString":
10414			if value != nil {
10415				jtv, ok := value.(string)
10416				if !ok {
10417					return fmt.Errorf("expected ByteMatchTargetString to be []byte, got %T instead", value)
10418				}
10419				dv, err := base64.StdEncoding.DecodeString(jtv)
10420				if err != nil {
10421					return fmt.Errorf("failed to base64 decode ByteMatchTargetString, %w", err)
10422				}
10423				sv.TargetString = dv
10424			}
10425
10426		case "TextTransformation":
10427			if value != nil {
10428				jtv, ok := value.(string)
10429				if !ok {
10430					return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value)
10431				}
10432				sv.TextTransformation = types.TextTransformation(jtv)
10433			}
10434
10435		default:
10436			_, _ = key, value
10437
10438		}
10439	}
10440	*v = sv
10441	return nil
10442}
10443
10444func awsAwsjson11_deserializeDocumentByteMatchTuples(v *[]types.ByteMatchTuple, value interface{}) error {
10445	if v == nil {
10446		return fmt.Errorf("unexpected nil of type %T", v)
10447	}
10448	if value == nil {
10449		return nil
10450	}
10451
10452	shape, ok := value.([]interface{})
10453	if !ok {
10454		return fmt.Errorf("unexpected JSON type %v", value)
10455	}
10456
10457	var cv []types.ByteMatchTuple
10458	if *v == nil {
10459		cv = []types.ByteMatchTuple{}
10460	} else {
10461		cv = *v
10462	}
10463
10464	for _, value := range shape {
10465		var col types.ByteMatchTuple
10466		destAddr := &col
10467		if err := awsAwsjson11_deserializeDocumentByteMatchTuple(&destAddr, value); err != nil {
10468			return err
10469		}
10470		col = *destAddr
10471		cv = append(cv, col)
10472
10473	}
10474	*v = cv
10475	return nil
10476}
10477
10478func awsAwsjson11_deserializeDocumentExcludedRule(v **types.ExcludedRule, value interface{}) error {
10479	if v == nil {
10480		return fmt.Errorf("unexpected nil of type %T", v)
10481	}
10482	if value == nil {
10483		return nil
10484	}
10485
10486	shape, ok := value.(map[string]interface{})
10487	if !ok {
10488		return fmt.Errorf("unexpected JSON type %v", value)
10489	}
10490
10491	var sv *types.ExcludedRule
10492	if *v == nil {
10493		sv = &types.ExcludedRule{}
10494	} else {
10495		sv = *v
10496	}
10497
10498	for key, value := range shape {
10499		switch key {
10500		case "RuleId":
10501			if value != nil {
10502				jtv, ok := value.(string)
10503				if !ok {
10504					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10505				}
10506				sv.RuleId = ptr.String(jtv)
10507			}
10508
10509		default:
10510			_, _ = key, value
10511
10512		}
10513	}
10514	*v = sv
10515	return nil
10516}
10517
10518func awsAwsjson11_deserializeDocumentExcludedRules(v *[]types.ExcludedRule, value interface{}) error {
10519	if v == nil {
10520		return fmt.Errorf("unexpected nil of type %T", v)
10521	}
10522	if value == nil {
10523		return nil
10524	}
10525
10526	shape, ok := value.([]interface{})
10527	if !ok {
10528		return fmt.Errorf("unexpected JSON type %v", value)
10529	}
10530
10531	var cv []types.ExcludedRule
10532	if *v == nil {
10533		cv = []types.ExcludedRule{}
10534	} else {
10535		cv = *v
10536	}
10537
10538	for _, value := range shape {
10539		var col types.ExcludedRule
10540		destAddr := &col
10541		if err := awsAwsjson11_deserializeDocumentExcludedRule(&destAddr, value); err != nil {
10542			return err
10543		}
10544		col = *destAddr
10545		cv = append(cv, col)
10546
10547	}
10548	*v = cv
10549	return nil
10550}
10551
10552func awsAwsjson11_deserializeDocumentFieldToMatch(v **types.FieldToMatch, value interface{}) error {
10553	if v == nil {
10554		return fmt.Errorf("unexpected nil of type %T", v)
10555	}
10556	if value == nil {
10557		return nil
10558	}
10559
10560	shape, ok := value.(map[string]interface{})
10561	if !ok {
10562		return fmt.Errorf("unexpected JSON type %v", value)
10563	}
10564
10565	var sv *types.FieldToMatch
10566	if *v == nil {
10567		sv = &types.FieldToMatch{}
10568	} else {
10569		sv = *v
10570	}
10571
10572	for key, value := range shape {
10573		switch key {
10574		case "Data":
10575			if value != nil {
10576				jtv, ok := value.(string)
10577				if !ok {
10578					return fmt.Errorf("expected MatchFieldData to be of type string, got %T instead", value)
10579				}
10580				sv.Data = ptr.String(jtv)
10581			}
10582
10583		case "Type":
10584			if value != nil {
10585				jtv, ok := value.(string)
10586				if !ok {
10587					return fmt.Errorf("expected MatchFieldType to be of type string, got %T instead", value)
10588				}
10589				sv.Type = types.MatchFieldType(jtv)
10590			}
10591
10592		default:
10593			_, _ = key, value
10594
10595		}
10596	}
10597	*v = sv
10598	return nil
10599}
10600
10601func awsAwsjson11_deserializeDocumentGeoMatchConstraint(v **types.GeoMatchConstraint, value interface{}) error {
10602	if v == nil {
10603		return fmt.Errorf("unexpected nil of type %T", v)
10604	}
10605	if value == nil {
10606		return nil
10607	}
10608
10609	shape, ok := value.(map[string]interface{})
10610	if !ok {
10611		return fmt.Errorf("unexpected JSON type %v", value)
10612	}
10613
10614	var sv *types.GeoMatchConstraint
10615	if *v == nil {
10616		sv = &types.GeoMatchConstraint{}
10617	} else {
10618		sv = *v
10619	}
10620
10621	for key, value := range shape {
10622		switch key {
10623		case "Type":
10624			if value != nil {
10625				jtv, ok := value.(string)
10626				if !ok {
10627					return fmt.Errorf("expected GeoMatchConstraintType to be of type string, got %T instead", value)
10628				}
10629				sv.Type = types.GeoMatchConstraintType(jtv)
10630			}
10631
10632		case "Value":
10633			if value != nil {
10634				jtv, ok := value.(string)
10635				if !ok {
10636					return fmt.Errorf("expected GeoMatchConstraintValue to be of type string, got %T instead", value)
10637				}
10638				sv.Value = types.GeoMatchConstraintValue(jtv)
10639			}
10640
10641		default:
10642			_, _ = key, value
10643
10644		}
10645	}
10646	*v = sv
10647	return nil
10648}
10649
10650func awsAwsjson11_deserializeDocumentGeoMatchConstraints(v *[]types.GeoMatchConstraint, value interface{}) error {
10651	if v == nil {
10652		return fmt.Errorf("unexpected nil of type %T", v)
10653	}
10654	if value == nil {
10655		return nil
10656	}
10657
10658	shape, ok := value.([]interface{})
10659	if !ok {
10660		return fmt.Errorf("unexpected JSON type %v", value)
10661	}
10662
10663	var cv []types.GeoMatchConstraint
10664	if *v == nil {
10665		cv = []types.GeoMatchConstraint{}
10666	} else {
10667		cv = *v
10668	}
10669
10670	for _, value := range shape {
10671		var col types.GeoMatchConstraint
10672		destAddr := &col
10673		if err := awsAwsjson11_deserializeDocumentGeoMatchConstraint(&destAddr, value); err != nil {
10674			return err
10675		}
10676		col = *destAddr
10677		cv = append(cv, col)
10678
10679	}
10680	*v = cv
10681	return nil
10682}
10683
10684func awsAwsjson11_deserializeDocumentGeoMatchSet(v **types.GeoMatchSet, value interface{}) error {
10685	if v == nil {
10686		return fmt.Errorf("unexpected nil of type %T", v)
10687	}
10688	if value == nil {
10689		return nil
10690	}
10691
10692	shape, ok := value.(map[string]interface{})
10693	if !ok {
10694		return fmt.Errorf("unexpected JSON type %v", value)
10695	}
10696
10697	var sv *types.GeoMatchSet
10698	if *v == nil {
10699		sv = &types.GeoMatchSet{}
10700	} else {
10701		sv = *v
10702	}
10703
10704	for key, value := range shape {
10705		switch key {
10706		case "GeoMatchConstraints":
10707			if err := awsAwsjson11_deserializeDocumentGeoMatchConstraints(&sv.GeoMatchConstraints, value); err != nil {
10708				return err
10709			}
10710
10711		case "GeoMatchSetId":
10712			if value != nil {
10713				jtv, ok := value.(string)
10714				if !ok {
10715					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10716				}
10717				sv.GeoMatchSetId = ptr.String(jtv)
10718			}
10719
10720		case "Name":
10721			if value != nil {
10722				jtv, ok := value.(string)
10723				if !ok {
10724					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
10725				}
10726				sv.Name = ptr.String(jtv)
10727			}
10728
10729		default:
10730			_, _ = key, value
10731
10732		}
10733	}
10734	*v = sv
10735	return nil
10736}
10737
10738func awsAwsjson11_deserializeDocumentGeoMatchSetSummaries(v *[]types.GeoMatchSetSummary, value interface{}) error {
10739	if v == nil {
10740		return fmt.Errorf("unexpected nil of type %T", v)
10741	}
10742	if value == nil {
10743		return nil
10744	}
10745
10746	shape, ok := value.([]interface{})
10747	if !ok {
10748		return fmt.Errorf("unexpected JSON type %v", value)
10749	}
10750
10751	var cv []types.GeoMatchSetSummary
10752	if *v == nil {
10753		cv = []types.GeoMatchSetSummary{}
10754	} else {
10755		cv = *v
10756	}
10757
10758	for _, value := range shape {
10759		var col types.GeoMatchSetSummary
10760		destAddr := &col
10761		if err := awsAwsjson11_deserializeDocumentGeoMatchSetSummary(&destAddr, value); err != nil {
10762			return err
10763		}
10764		col = *destAddr
10765		cv = append(cv, col)
10766
10767	}
10768	*v = cv
10769	return nil
10770}
10771
10772func awsAwsjson11_deserializeDocumentGeoMatchSetSummary(v **types.GeoMatchSetSummary, value interface{}) error {
10773	if v == nil {
10774		return fmt.Errorf("unexpected nil of type %T", v)
10775	}
10776	if value == nil {
10777		return nil
10778	}
10779
10780	shape, ok := value.(map[string]interface{})
10781	if !ok {
10782		return fmt.Errorf("unexpected JSON type %v", value)
10783	}
10784
10785	var sv *types.GeoMatchSetSummary
10786	if *v == nil {
10787		sv = &types.GeoMatchSetSummary{}
10788	} else {
10789		sv = *v
10790	}
10791
10792	for key, value := range shape {
10793		switch key {
10794		case "GeoMatchSetId":
10795			if value != nil {
10796				jtv, ok := value.(string)
10797				if !ok {
10798					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
10799				}
10800				sv.GeoMatchSetId = ptr.String(jtv)
10801			}
10802
10803		case "Name":
10804			if value != nil {
10805				jtv, ok := value.(string)
10806				if !ok {
10807					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
10808				}
10809				sv.Name = ptr.String(jtv)
10810			}
10811
10812		default:
10813			_, _ = key, value
10814
10815		}
10816	}
10817	*v = sv
10818	return nil
10819}
10820
10821func awsAwsjson11_deserializeDocumentHTTPHeader(v **types.HTTPHeader, value interface{}) error {
10822	if v == nil {
10823		return fmt.Errorf("unexpected nil of type %T", v)
10824	}
10825	if value == nil {
10826		return nil
10827	}
10828
10829	shape, ok := value.(map[string]interface{})
10830	if !ok {
10831		return fmt.Errorf("unexpected JSON type %v", value)
10832	}
10833
10834	var sv *types.HTTPHeader
10835	if *v == nil {
10836		sv = &types.HTTPHeader{}
10837	} else {
10838		sv = *v
10839	}
10840
10841	for key, value := range shape {
10842		switch key {
10843		case "Name":
10844			if value != nil {
10845				jtv, ok := value.(string)
10846				if !ok {
10847					return fmt.Errorf("expected HeaderName to be of type string, got %T instead", value)
10848				}
10849				sv.Name = ptr.String(jtv)
10850			}
10851
10852		case "Value":
10853			if value != nil {
10854				jtv, ok := value.(string)
10855				if !ok {
10856					return fmt.Errorf("expected HeaderValue to be of type string, got %T instead", value)
10857				}
10858				sv.Value = ptr.String(jtv)
10859			}
10860
10861		default:
10862			_, _ = key, value
10863
10864		}
10865	}
10866	*v = sv
10867	return nil
10868}
10869
10870func awsAwsjson11_deserializeDocumentHTTPHeaders(v *[]types.HTTPHeader, value interface{}) error {
10871	if v == nil {
10872		return fmt.Errorf("unexpected nil of type %T", v)
10873	}
10874	if value == nil {
10875		return nil
10876	}
10877
10878	shape, ok := value.([]interface{})
10879	if !ok {
10880		return fmt.Errorf("unexpected JSON type %v", value)
10881	}
10882
10883	var cv []types.HTTPHeader
10884	if *v == nil {
10885		cv = []types.HTTPHeader{}
10886	} else {
10887		cv = *v
10888	}
10889
10890	for _, value := range shape {
10891		var col types.HTTPHeader
10892		destAddr := &col
10893		if err := awsAwsjson11_deserializeDocumentHTTPHeader(&destAddr, value); err != nil {
10894			return err
10895		}
10896		col = *destAddr
10897		cv = append(cv, col)
10898
10899	}
10900	*v = cv
10901	return nil
10902}
10903
10904func awsAwsjson11_deserializeDocumentHTTPRequest(v **types.HTTPRequest, value interface{}) error {
10905	if v == nil {
10906		return fmt.Errorf("unexpected nil of type %T", v)
10907	}
10908	if value == nil {
10909		return nil
10910	}
10911
10912	shape, ok := value.(map[string]interface{})
10913	if !ok {
10914		return fmt.Errorf("unexpected JSON type %v", value)
10915	}
10916
10917	var sv *types.HTTPRequest
10918	if *v == nil {
10919		sv = &types.HTTPRequest{}
10920	} else {
10921		sv = *v
10922	}
10923
10924	for key, value := range shape {
10925		switch key {
10926		case "ClientIP":
10927			if value != nil {
10928				jtv, ok := value.(string)
10929				if !ok {
10930					return fmt.Errorf("expected IPString to be of type string, got %T instead", value)
10931				}
10932				sv.ClientIP = ptr.String(jtv)
10933			}
10934
10935		case "Country":
10936			if value != nil {
10937				jtv, ok := value.(string)
10938				if !ok {
10939					return fmt.Errorf("expected Country to be of type string, got %T instead", value)
10940				}
10941				sv.Country = ptr.String(jtv)
10942			}
10943
10944		case "Headers":
10945			if err := awsAwsjson11_deserializeDocumentHTTPHeaders(&sv.Headers, value); err != nil {
10946				return err
10947			}
10948
10949		case "HTTPVersion":
10950			if value != nil {
10951				jtv, ok := value.(string)
10952				if !ok {
10953					return fmt.Errorf("expected HTTPVersion to be of type string, got %T instead", value)
10954				}
10955				sv.HTTPVersion = ptr.String(jtv)
10956			}
10957
10958		case "Method":
10959			if value != nil {
10960				jtv, ok := value.(string)
10961				if !ok {
10962					return fmt.Errorf("expected HTTPMethod to be of type string, got %T instead", value)
10963				}
10964				sv.Method = ptr.String(jtv)
10965			}
10966
10967		case "URI":
10968			if value != nil {
10969				jtv, ok := value.(string)
10970				if !ok {
10971					return fmt.Errorf("expected URIString to be of type string, got %T instead", value)
10972				}
10973				sv.URI = ptr.String(jtv)
10974			}
10975
10976		default:
10977			_, _ = key, value
10978
10979		}
10980	}
10981	*v = sv
10982	return nil
10983}
10984
10985func awsAwsjson11_deserializeDocumentIPSet(v **types.IPSet, value interface{}) error {
10986	if v == nil {
10987		return fmt.Errorf("unexpected nil of type %T", v)
10988	}
10989	if value == nil {
10990		return nil
10991	}
10992
10993	shape, ok := value.(map[string]interface{})
10994	if !ok {
10995		return fmt.Errorf("unexpected JSON type %v", value)
10996	}
10997
10998	var sv *types.IPSet
10999	if *v == nil {
11000		sv = &types.IPSet{}
11001	} else {
11002		sv = *v
11003	}
11004
11005	for key, value := range shape {
11006		switch key {
11007		case "IPSetDescriptors":
11008			if err := awsAwsjson11_deserializeDocumentIPSetDescriptors(&sv.IPSetDescriptors, value); err != nil {
11009				return err
11010			}
11011
11012		case "IPSetId":
11013			if value != nil {
11014				jtv, ok := value.(string)
11015				if !ok {
11016					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11017				}
11018				sv.IPSetId = ptr.String(jtv)
11019			}
11020
11021		case "Name":
11022			if value != nil {
11023				jtv, ok := value.(string)
11024				if !ok {
11025					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11026				}
11027				sv.Name = ptr.String(jtv)
11028			}
11029
11030		default:
11031			_, _ = key, value
11032
11033		}
11034	}
11035	*v = sv
11036	return nil
11037}
11038
11039func awsAwsjson11_deserializeDocumentIPSetDescriptor(v **types.IPSetDescriptor, value interface{}) error {
11040	if v == nil {
11041		return fmt.Errorf("unexpected nil of type %T", v)
11042	}
11043	if value == nil {
11044		return nil
11045	}
11046
11047	shape, ok := value.(map[string]interface{})
11048	if !ok {
11049		return fmt.Errorf("unexpected JSON type %v", value)
11050	}
11051
11052	var sv *types.IPSetDescriptor
11053	if *v == nil {
11054		sv = &types.IPSetDescriptor{}
11055	} else {
11056		sv = *v
11057	}
11058
11059	for key, value := range shape {
11060		switch key {
11061		case "Type":
11062			if value != nil {
11063				jtv, ok := value.(string)
11064				if !ok {
11065					return fmt.Errorf("expected IPSetDescriptorType to be of type string, got %T instead", value)
11066				}
11067				sv.Type = types.IPSetDescriptorType(jtv)
11068			}
11069
11070		case "Value":
11071			if value != nil {
11072				jtv, ok := value.(string)
11073				if !ok {
11074					return fmt.Errorf("expected IPSetDescriptorValue to be of type string, got %T instead", value)
11075				}
11076				sv.Value = ptr.String(jtv)
11077			}
11078
11079		default:
11080			_, _ = key, value
11081
11082		}
11083	}
11084	*v = sv
11085	return nil
11086}
11087
11088func awsAwsjson11_deserializeDocumentIPSetDescriptors(v *[]types.IPSetDescriptor, value interface{}) error {
11089	if v == nil {
11090		return fmt.Errorf("unexpected nil of type %T", v)
11091	}
11092	if value == nil {
11093		return nil
11094	}
11095
11096	shape, ok := value.([]interface{})
11097	if !ok {
11098		return fmt.Errorf("unexpected JSON type %v", value)
11099	}
11100
11101	var cv []types.IPSetDescriptor
11102	if *v == nil {
11103		cv = []types.IPSetDescriptor{}
11104	} else {
11105		cv = *v
11106	}
11107
11108	for _, value := range shape {
11109		var col types.IPSetDescriptor
11110		destAddr := &col
11111		if err := awsAwsjson11_deserializeDocumentIPSetDescriptor(&destAddr, value); err != nil {
11112			return err
11113		}
11114		col = *destAddr
11115		cv = append(cv, col)
11116
11117	}
11118	*v = cv
11119	return nil
11120}
11121
11122func awsAwsjson11_deserializeDocumentIPSetSummaries(v *[]types.IPSetSummary, value interface{}) error {
11123	if v == nil {
11124		return fmt.Errorf("unexpected nil of type %T", v)
11125	}
11126	if value == nil {
11127		return nil
11128	}
11129
11130	shape, ok := value.([]interface{})
11131	if !ok {
11132		return fmt.Errorf("unexpected JSON type %v", value)
11133	}
11134
11135	var cv []types.IPSetSummary
11136	if *v == nil {
11137		cv = []types.IPSetSummary{}
11138	} else {
11139		cv = *v
11140	}
11141
11142	for _, value := range shape {
11143		var col types.IPSetSummary
11144		destAddr := &col
11145		if err := awsAwsjson11_deserializeDocumentIPSetSummary(&destAddr, value); err != nil {
11146			return err
11147		}
11148		col = *destAddr
11149		cv = append(cv, col)
11150
11151	}
11152	*v = cv
11153	return nil
11154}
11155
11156func awsAwsjson11_deserializeDocumentIPSetSummary(v **types.IPSetSummary, value interface{}) error {
11157	if v == nil {
11158		return fmt.Errorf("unexpected nil of type %T", v)
11159	}
11160	if value == nil {
11161		return nil
11162	}
11163
11164	shape, ok := value.(map[string]interface{})
11165	if !ok {
11166		return fmt.Errorf("unexpected JSON type %v", value)
11167	}
11168
11169	var sv *types.IPSetSummary
11170	if *v == nil {
11171		sv = &types.IPSetSummary{}
11172	} else {
11173		sv = *v
11174	}
11175
11176	for key, value := range shape {
11177		switch key {
11178		case "IPSetId":
11179			if value != nil {
11180				jtv, ok := value.(string)
11181				if !ok {
11182					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11183				}
11184				sv.IPSetId = ptr.String(jtv)
11185			}
11186
11187		case "Name":
11188			if value != nil {
11189				jtv, ok := value.(string)
11190				if !ok {
11191					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11192				}
11193				sv.Name = ptr.String(jtv)
11194			}
11195
11196		default:
11197			_, _ = key, value
11198
11199		}
11200	}
11201	*v = sv
11202	return nil
11203}
11204
11205func awsAwsjson11_deserializeDocumentLogDestinationConfigs(v *[]string, value interface{}) error {
11206	if v == nil {
11207		return fmt.Errorf("unexpected nil of type %T", v)
11208	}
11209	if value == nil {
11210		return nil
11211	}
11212
11213	shape, ok := value.([]interface{})
11214	if !ok {
11215		return fmt.Errorf("unexpected JSON type %v", value)
11216	}
11217
11218	var cv []string
11219	if *v == nil {
11220		cv = []string{}
11221	} else {
11222		cv = *v
11223	}
11224
11225	for _, value := range shape {
11226		var col string
11227		if value != nil {
11228			jtv, ok := value.(string)
11229			if !ok {
11230				return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
11231			}
11232			col = jtv
11233		}
11234		cv = append(cv, col)
11235
11236	}
11237	*v = cv
11238	return nil
11239}
11240
11241func awsAwsjson11_deserializeDocumentLoggingConfiguration(v **types.LoggingConfiguration, value interface{}) error {
11242	if v == nil {
11243		return fmt.Errorf("unexpected nil of type %T", v)
11244	}
11245	if value == nil {
11246		return nil
11247	}
11248
11249	shape, ok := value.(map[string]interface{})
11250	if !ok {
11251		return fmt.Errorf("unexpected JSON type %v", value)
11252	}
11253
11254	var sv *types.LoggingConfiguration
11255	if *v == nil {
11256		sv = &types.LoggingConfiguration{}
11257	} else {
11258		sv = *v
11259	}
11260
11261	for key, value := range shape {
11262		switch key {
11263		case "LogDestinationConfigs":
11264			if err := awsAwsjson11_deserializeDocumentLogDestinationConfigs(&sv.LogDestinationConfigs, value); err != nil {
11265				return err
11266			}
11267
11268		case "RedactedFields":
11269			if err := awsAwsjson11_deserializeDocumentRedactedFields(&sv.RedactedFields, value); err != nil {
11270				return err
11271			}
11272
11273		case "ResourceArn":
11274			if value != nil {
11275				jtv, ok := value.(string)
11276				if !ok {
11277					return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
11278				}
11279				sv.ResourceArn = ptr.String(jtv)
11280			}
11281
11282		default:
11283			_, _ = key, value
11284
11285		}
11286	}
11287	*v = sv
11288	return nil
11289}
11290
11291func awsAwsjson11_deserializeDocumentLoggingConfigurations(v *[]types.LoggingConfiguration, value interface{}) error {
11292	if v == nil {
11293		return fmt.Errorf("unexpected nil of type %T", v)
11294	}
11295	if value == nil {
11296		return nil
11297	}
11298
11299	shape, ok := value.([]interface{})
11300	if !ok {
11301		return fmt.Errorf("unexpected JSON type %v", value)
11302	}
11303
11304	var cv []types.LoggingConfiguration
11305	if *v == nil {
11306		cv = []types.LoggingConfiguration{}
11307	} else {
11308		cv = *v
11309	}
11310
11311	for _, value := range shape {
11312		var col types.LoggingConfiguration
11313		destAddr := &col
11314		if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&destAddr, value); err != nil {
11315			return err
11316		}
11317		col = *destAddr
11318		cv = append(cv, col)
11319
11320	}
11321	*v = cv
11322	return nil
11323}
11324
11325func awsAwsjson11_deserializeDocumentManagedKeys(v *[]string, value interface{}) error {
11326	if v == nil {
11327		return fmt.Errorf("unexpected nil of type %T", v)
11328	}
11329	if value == nil {
11330		return nil
11331	}
11332
11333	shape, ok := value.([]interface{})
11334	if !ok {
11335		return fmt.Errorf("unexpected JSON type %v", value)
11336	}
11337
11338	var cv []string
11339	if *v == nil {
11340		cv = []string{}
11341	} else {
11342		cv = *v
11343	}
11344
11345	for _, value := range shape {
11346		var col string
11347		if value != nil {
11348			jtv, ok := value.(string)
11349			if !ok {
11350				return fmt.Errorf("expected ManagedKey to be of type string, got %T instead", value)
11351			}
11352			col = jtv
11353		}
11354		cv = append(cv, col)
11355
11356	}
11357	*v = cv
11358	return nil
11359}
11360
11361func awsAwsjson11_deserializeDocumentPredicate(v **types.Predicate, value interface{}) error {
11362	if v == nil {
11363		return fmt.Errorf("unexpected nil of type %T", v)
11364	}
11365	if value == nil {
11366		return nil
11367	}
11368
11369	shape, ok := value.(map[string]interface{})
11370	if !ok {
11371		return fmt.Errorf("unexpected JSON type %v", value)
11372	}
11373
11374	var sv *types.Predicate
11375	if *v == nil {
11376		sv = &types.Predicate{}
11377	} else {
11378		sv = *v
11379	}
11380
11381	for key, value := range shape {
11382		switch key {
11383		case "DataId":
11384			if value != nil {
11385				jtv, ok := value.(string)
11386				if !ok {
11387					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11388				}
11389				sv.DataId = ptr.String(jtv)
11390			}
11391
11392		case "Negated":
11393			if value != nil {
11394				jtv, ok := value.(bool)
11395				if !ok {
11396					return fmt.Errorf("expected Negated to be of type *bool, got %T instead", value)
11397				}
11398				sv.Negated = ptr.Bool(jtv)
11399			}
11400
11401		case "Type":
11402			if value != nil {
11403				jtv, ok := value.(string)
11404				if !ok {
11405					return fmt.Errorf("expected PredicateType to be of type string, got %T instead", value)
11406				}
11407				sv.Type = types.PredicateType(jtv)
11408			}
11409
11410		default:
11411			_, _ = key, value
11412
11413		}
11414	}
11415	*v = sv
11416	return nil
11417}
11418
11419func awsAwsjson11_deserializeDocumentPredicates(v *[]types.Predicate, value interface{}) error {
11420	if v == nil {
11421		return fmt.Errorf("unexpected nil of type %T", v)
11422	}
11423	if value == nil {
11424		return nil
11425	}
11426
11427	shape, ok := value.([]interface{})
11428	if !ok {
11429		return fmt.Errorf("unexpected JSON type %v", value)
11430	}
11431
11432	var cv []types.Predicate
11433	if *v == nil {
11434		cv = []types.Predicate{}
11435	} else {
11436		cv = *v
11437	}
11438
11439	for _, value := range shape {
11440		var col types.Predicate
11441		destAddr := &col
11442		if err := awsAwsjson11_deserializeDocumentPredicate(&destAddr, value); err != nil {
11443			return err
11444		}
11445		col = *destAddr
11446		cv = append(cv, col)
11447
11448	}
11449	*v = cv
11450	return nil
11451}
11452
11453func awsAwsjson11_deserializeDocumentRateBasedRule(v **types.RateBasedRule, value interface{}) error {
11454	if v == nil {
11455		return fmt.Errorf("unexpected nil of type %T", v)
11456	}
11457	if value == nil {
11458		return nil
11459	}
11460
11461	shape, ok := value.(map[string]interface{})
11462	if !ok {
11463		return fmt.Errorf("unexpected JSON type %v", value)
11464	}
11465
11466	var sv *types.RateBasedRule
11467	if *v == nil {
11468		sv = &types.RateBasedRule{}
11469	} else {
11470		sv = *v
11471	}
11472
11473	for key, value := range shape {
11474		switch key {
11475		case "MatchPredicates":
11476			if err := awsAwsjson11_deserializeDocumentPredicates(&sv.MatchPredicates, value); err != nil {
11477				return err
11478			}
11479
11480		case "MetricName":
11481			if value != nil {
11482				jtv, ok := value.(string)
11483				if !ok {
11484					return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
11485				}
11486				sv.MetricName = ptr.String(jtv)
11487			}
11488
11489		case "Name":
11490			if value != nil {
11491				jtv, ok := value.(string)
11492				if !ok {
11493					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11494				}
11495				sv.Name = ptr.String(jtv)
11496			}
11497
11498		case "RateKey":
11499			if value != nil {
11500				jtv, ok := value.(string)
11501				if !ok {
11502					return fmt.Errorf("expected RateKey to be of type string, got %T instead", value)
11503				}
11504				sv.RateKey = types.RateKey(jtv)
11505			}
11506
11507		case "RateLimit":
11508			if value != nil {
11509				jtv, ok := value.(json.Number)
11510				if !ok {
11511					return fmt.Errorf("expected RateLimit to be json.Number, got %T instead", value)
11512				}
11513				i64, err := jtv.Int64()
11514				if err != nil {
11515					return err
11516				}
11517				sv.RateLimit = i64
11518			}
11519
11520		case "RuleId":
11521			if value != nil {
11522				jtv, ok := value.(string)
11523				if !ok {
11524					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11525				}
11526				sv.RuleId = ptr.String(jtv)
11527			}
11528
11529		default:
11530			_, _ = key, value
11531
11532		}
11533	}
11534	*v = sv
11535	return nil
11536}
11537
11538func awsAwsjson11_deserializeDocumentRedactedFields(v *[]types.FieldToMatch, value interface{}) error {
11539	if v == nil {
11540		return fmt.Errorf("unexpected nil of type %T", v)
11541	}
11542	if value == nil {
11543		return nil
11544	}
11545
11546	shape, ok := value.([]interface{})
11547	if !ok {
11548		return fmt.Errorf("unexpected JSON type %v", value)
11549	}
11550
11551	var cv []types.FieldToMatch
11552	if *v == nil {
11553		cv = []types.FieldToMatch{}
11554	} else {
11555		cv = *v
11556	}
11557
11558	for _, value := range shape {
11559		var col types.FieldToMatch
11560		destAddr := &col
11561		if err := awsAwsjson11_deserializeDocumentFieldToMatch(&destAddr, value); err != nil {
11562			return err
11563		}
11564		col = *destAddr
11565		cv = append(cv, col)
11566
11567	}
11568	*v = cv
11569	return nil
11570}
11571
11572func awsAwsjson11_deserializeDocumentRegexMatchSet(v **types.RegexMatchSet, value interface{}) error {
11573	if v == nil {
11574		return fmt.Errorf("unexpected nil of type %T", v)
11575	}
11576	if value == nil {
11577		return nil
11578	}
11579
11580	shape, ok := value.(map[string]interface{})
11581	if !ok {
11582		return fmt.Errorf("unexpected JSON type %v", value)
11583	}
11584
11585	var sv *types.RegexMatchSet
11586	if *v == nil {
11587		sv = &types.RegexMatchSet{}
11588	} else {
11589		sv = *v
11590	}
11591
11592	for key, value := range shape {
11593		switch key {
11594		case "Name":
11595			if value != nil {
11596				jtv, ok := value.(string)
11597				if !ok {
11598					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11599				}
11600				sv.Name = ptr.String(jtv)
11601			}
11602
11603		case "RegexMatchSetId":
11604			if value != nil {
11605				jtv, ok := value.(string)
11606				if !ok {
11607					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11608				}
11609				sv.RegexMatchSetId = ptr.String(jtv)
11610			}
11611
11612		case "RegexMatchTuples":
11613			if err := awsAwsjson11_deserializeDocumentRegexMatchTuples(&sv.RegexMatchTuples, value); err != nil {
11614				return err
11615			}
11616
11617		default:
11618			_, _ = key, value
11619
11620		}
11621	}
11622	*v = sv
11623	return nil
11624}
11625
11626func awsAwsjson11_deserializeDocumentRegexMatchSetSummaries(v *[]types.RegexMatchSetSummary, value interface{}) error {
11627	if v == nil {
11628		return fmt.Errorf("unexpected nil of type %T", v)
11629	}
11630	if value == nil {
11631		return nil
11632	}
11633
11634	shape, ok := value.([]interface{})
11635	if !ok {
11636		return fmt.Errorf("unexpected JSON type %v", value)
11637	}
11638
11639	var cv []types.RegexMatchSetSummary
11640	if *v == nil {
11641		cv = []types.RegexMatchSetSummary{}
11642	} else {
11643		cv = *v
11644	}
11645
11646	for _, value := range shape {
11647		var col types.RegexMatchSetSummary
11648		destAddr := &col
11649		if err := awsAwsjson11_deserializeDocumentRegexMatchSetSummary(&destAddr, value); err != nil {
11650			return err
11651		}
11652		col = *destAddr
11653		cv = append(cv, col)
11654
11655	}
11656	*v = cv
11657	return nil
11658}
11659
11660func awsAwsjson11_deserializeDocumentRegexMatchSetSummary(v **types.RegexMatchSetSummary, value interface{}) error {
11661	if v == nil {
11662		return fmt.Errorf("unexpected nil of type %T", v)
11663	}
11664	if value == nil {
11665		return nil
11666	}
11667
11668	shape, ok := value.(map[string]interface{})
11669	if !ok {
11670		return fmt.Errorf("unexpected JSON type %v", value)
11671	}
11672
11673	var sv *types.RegexMatchSetSummary
11674	if *v == nil {
11675		sv = &types.RegexMatchSetSummary{}
11676	} else {
11677		sv = *v
11678	}
11679
11680	for key, value := range shape {
11681		switch key {
11682		case "Name":
11683			if value != nil {
11684				jtv, ok := value.(string)
11685				if !ok {
11686					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11687				}
11688				sv.Name = ptr.String(jtv)
11689			}
11690
11691		case "RegexMatchSetId":
11692			if value != nil {
11693				jtv, ok := value.(string)
11694				if !ok {
11695					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11696				}
11697				sv.RegexMatchSetId = ptr.String(jtv)
11698			}
11699
11700		default:
11701			_, _ = key, value
11702
11703		}
11704	}
11705	*v = sv
11706	return nil
11707}
11708
11709func awsAwsjson11_deserializeDocumentRegexMatchTuple(v **types.RegexMatchTuple, value interface{}) error {
11710	if v == nil {
11711		return fmt.Errorf("unexpected nil of type %T", v)
11712	}
11713	if value == nil {
11714		return nil
11715	}
11716
11717	shape, ok := value.(map[string]interface{})
11718	if !ok {
11719		return fmt.Errorf("unexpected JSON type %v", value)
11720	}
11721
11722	var sv *types.RegexMatchTuple
11723	if *v == nil {
11724		sv = &types.RegexMatchTuple{}
11725	} else {
11726		sv = *v
11727	}
11728
11729	for key, value := range shape {
11730		switch key {
11731		case "FieldToMatch":
11732			if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil {
11733				return err
11734			}
11735
11736		case "RegexPatternSetId":
11737			if value != nil {
11738				jtv, ok := value.(string)
11739				if !ok {
11740					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11741				}
11742				sv.RegexPatternSetId = ptr.String(jtv)
11743			}
11744
11745		case "TextTransformation":
11746			if value != nil {
11747				jtv, ok := value.(string)
11748				if !ok {
11749					return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value)
11750				}
11751				sv.TextTransformation = types.TextTransformation(jtv)
11752			}
11753
11754		default:
11755			_, _ = key, value
11756
11757		}
11758	}
11759	*v = sv
11760	return nil
11761}
11762
11763func awsAwsjson11_deserializeDocumentRegexMatchTuples(v *[]types.RegexMatchTuple, value interface{}) error {
11764	if v == nil {
11765		return fmt.Errorf("unexpected nil of type %T", v)
11766	}
11767	if value == nil {
11768		return nil
11769	}
11770
11771	shape, ok := value.([]interface{})
11772	if !ok {
11773		return fmt.Errorf("unexpected JSON type %v", value)
11774	}
11775
11776	var cv []types.RegexMatchTuple
11777	if *v == nil {
11778		cv = []types.RegexMatchTuple{}
11779	} else {
11780		cv = *v
11781	}
11782
11783	for _, value := range shape {
11784		var col types.RegexMatchTuple
11785		destAddr := &col
11786		if err := awsAwsjson11_deserializeDocumentRegexMatchTuple(&destAddr, value); err != nil {
11787			return err
11788		}
11789		col = *destAddr
11790		cv = append(cv, col)
11791
11792	}
11793	*v = cv
11794	return nil
11795}
11796
11797func awsAwsjson11_deserializeDocumentRegexPatternSet(v **types.RegexPatternSet, value interface{}) error {
11798	if v == nil {
11799		return fmt.Errorf("unexpected nil of type %T", v)
11800	}
11801	if value == nil {
11802		return nil
11803	}
11804
11805	shape, ok := value.(map[string]interface{})
11806	if !ok {
11807		return fmt.Errorf("unexpected JSON type %v", value)
11808	}
11809
11810	var sv *types.RegexPatternSet
11811	if *v == nil {
11812		sv = &types.RegexPatternSet{}
11813	} else {
11814		sv = *v
11815	}
11816
11817	for key, value := range shape {
11818		switch key {
11819		case "Name":
11820			if value != nil {
11821				jtv, ok := value.(string)
11822				if !ok {
11823					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11824				}
11825				sv.Name = ptr.String(jtv)
11826			}
11827
11828		case "RegexPatternSetId":
11829			if value != nil {
11830				jtv, ok := value.(string)
11831				if !ok {
11832					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11833				}
11834				sv.RegexPatternSetId = ptr.String(jtv)
11835			}
11836
11837		case "RegexPatternStrings":
11838			if err := awsAwsjson11_deserializeDocumentRegexPatternStrings(&sv.RegexPatternStrings, value); err != nil {
11839				return err
11840			}
11841
11842		default:
11843			_, _ = key, value
11844
11845		}
11846	}
11847	*v = sv
11848	return nil
11849}
11850
11851func awsAwsjson11_deserializeDocumentRegexPatternSetSummaries(v *[]types.RegexPatternSetSummary, value interface{}) error {
11852	if v == nil {
11853		return fmt.Errorf("unexpected nil of type %T", v)
11854	}
11855	if value == nil {
11856		return nil
11857	}
11858
11859	shape, ok := value.([]interface{})
11860	if !ok {
11861		return fmt.Errorf("unexpected JSON type %v", value)
11862	}
11863
11864	var cv []types.RegexPatternSetSummary
11865	if *v == nil {
11866		cv = []types.RegexPatternSetSummary{}
11867	} else {
11868		cv = *v
11869	}
11870
11871	for _, value := range shape {
11872		var col types.RegexPatternSetSummary
11873		destAddr := &col
11874		if err := awsAwsjson11_deserializeDocumentRegexPatternSetSummary(&destAddr, value); err != nil {
11875			return err
11876		}
11877		col = *destAddr
11878		cv = append(cv, col)
11879
11880	}
11881	*v = cv
11882	return nil
11883}
11884
11885func awsAwsjson11_deserializeDocumentRegexPatternSetSummary(v **types.RegexPatternSetSummary, value interface{}) error {
11886	if v == nil {
11887		return fmt.Errorf("unexpected nil of type %T", v)
11888	}
11889	if value == nil {
11890		return nil
11891	}
11892
11893	shape, ok := value.(map[string]interface{})
11894	if !ok {
11895		return fmt.Errorf("unexpected JSON type %v", value)
11896	}
11897
11898	var sv *types.RegexPatternSetSummary
11899	if *v == nil {
11900		sv = &types.RegexPatternSetSummary{}
11901	} else {
11902		sv = *v
11903	}
11904
11905	for key, value := range shape {
11906		switch key {
11907		case "Name":
11908			if value != nil {
11909				jtv, ok := value.(string)
11910				if !ok {
11911					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
11912				}
11913				sv.Name = ptr.String(jtv)
11914			}
11915
11916		case "RegexPatternSetId":
11917			if value != nil {
11918				jtv, ok := value.(string)
11919				if !ok {
11920					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
11921				}
11922				sv.RegexPatternSetId = ptr.String(jtv)
11923			}
11924
11925		default:
11926			_, _ = key, value
11927
11928		}
11929	}
11930	*v = sv
11931	return nil
11932}
11933
11934func awsAwsjson11_deserializeDocumentRegexPatternStrings(v *[]string, value interface{}) error {
11935	if v == nil {
11936		return fmt.Errorf("unexpected nil of type %T", v)
11937	}
11938	if value == nil {
11939		return nil
11940	}
11941
11942	shape, ok := value.([]interface{})
11943	if !ok {
11944		return fmt.Errorf("unexpected JSON type %v", value)
11945	}
11946
11947	var cv []string
11948	if *v == nil {
11949		cv = []string{}
11950	} else {
11951		cv = *v
11952	}
11953
11954	for _, value := range shape {
11955		var col string
11956		if value != nil {
11957			jtv, ok := value.(string)
11958			if !ok {
11959				return fmt.Errorf("expected RegexPatternString to be of type string, got %T instead", value)
11960			}
11961			col = jtv
11962		}
11963		cv = append(cv, col)
11964
11965	}
11966	*v = cv
11967	return nil
11968}
11969
11970func awsAwsjson11_deserializeDocumentRule(v **types.Rule, value interface{}) error {
11971	if v == nil {
11972		return fmt.Errorf("unexpected nil of type %T", v)
11973	}
11974	if value == nil {
11975		return nil
11976	}
11977
11978	shape, ok := value.(map[string]interface{})
11979	if !ok {
11980		return fmt.Errorf("unexpected JSON type %v", value)
11981	}
11982
11983	var sv *types.Rule
11984	if *v == nil {
11985		sv = &types.Rule{}
11986	} else {
11987		sv = *v
11988	}
11989
11990	for key, value := range shape {
11991		switch key {
11992		case "MetricName":
11993			if value != nil {
11994				jtv, ok := value.(string)
11995				if !ok {
11996					return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
11997				}
11998				sv.MetricName = ptr.String(jtv)
11999			}
12000
12001		case "Name":
12002			if value != nil {
12003				jtv, ok := value.(string)
12004				if !ok {
12005					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12006				}
12007				sv.Name = ptr.String(jtv)
12008			}
12009
12010		case "Predicates":
12011			if err := awsAwsjson11_deserializeDocumentPredicates(&sv.Predicates, value); err != nil {
12012				return err
12013			}
12014
12015		case "RuleId":
12016			if value != nil {
12017				jtv, ok := value.(string)
12018				if !ok {
12019					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12020				}
12021				sv.RuleId = ptr.String(jtv)
12022			}
12023
12024		default:
12025			_, _ = key, value
12026
12027		}
12028	}
12029	*v = sv
12030	return nil
12031}
12032
12033func awsAwsjson11_deserializeDocumentRuleGroup(v **types.RuleGroup, value interface{}) error {
12034	if v == nil {
12035		return fmt.Errorf("unexpected nil of type %T", v)
12036	}
12037	if value == nil {
12038		return nil
12039	}
12040
12041	shape, ok := value.(map[string]interface{})
12042	if !ok {
12043		return fmt.Errorf("unexpected JSON type %v", value)
12044	}
12045
12046	var sv *types.RuleGroup
12047	if *v == nil {
12048		sv = &types.RuleGroup{}
12049	} else {
12050		sv = *v
12051	}
12052
12053	for key, value := range shape {
12054		switch key {
12055		case "MetricName":
12056			if value != nil {
12057				jtv, ok := value.(string)
12058				if !ok {
12059					return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
12060				}
12061				sv.MetricName = ptr.String(jtv)
12062			}
12063
12064		case "Name":
12065			if value != nil {
12066				jtv, ok := value.(string)
12067				if !ok {
12068					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12069				}
12070				sv.Name = ptr.String(jtv)
12071			}
12072
12073		case "RuleGroupId":
12074			if value != nil {
12075				jtv, ok := value.(string)
12076				if !ok {
12077					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12078				}
12079				sv.RuleGroupId = ptr.String(jtv)
12080			}
12081
12082		default:
12083			_, _ = key, value
12084
12085		}
12086	}
12087	*v = sv
12088	return nil
12089}
12090
12091func awsAwsjson11_deserializeDocumentRuleGroupSummaries(v *[]types.RuleGroupSummary, value interface{}) error {
12092	if v == nil {
12093		return fmt.Errorf("unexpected nil of type %T", v)
12094	}
12095	if value == nil {
12096		return nil
12097	}
12098
12099	shape, ok := value.([]interface{})
12100	if !ok {
12101		return fmt.Errorf("unexpected JSON type %v", value)
12102	}
12103
12104	var cv []types.RuleGroupSummary
12105	if *v == nil {
12106		cv = []types.RuleGroupSummary{}
12107	} else {
12108		cv = *v
12109	}
12110
12111	for _, value := range shape {
12112		var col types.RuleGroupSummary
12113		destAddr := &col
12114		if err := awsAwsjson11_deserializeDocumentRuleGroupSummary(&destAddr, value); err != nil {
12115			return err
12116		}
12117		col = *destAddr
12118		cv = append(cv, col)
12119
12120	}
12121	*v = cv
12122	return nil
12123}
12124
12125func awsAwsjson11_deserializeDocumentRuleGroupSummary(v **types.RuleGroupSummary, value interface{}) error {
12126	if v == nil {
12127		return fmt.Errorf("unexpected nil of type %T", v)
12128	}
12129	if value == nil {
12130		return nil
12131	}
12132
12133	shape, ok := value.(map[string]interface{})
12134	if !ok {
12135		return fmt.Errorf("unexpected JSON type %v", value)
12136	}
12137
12138	var sv *types.RuleGroupSummary
12139	if *v == nil {
12140		sv = &types.RuleGroupSummary{}
12141	} else {
12142		sv = *v
12143	}
12144
12145	for key, value := range shape {
12146		switch key {
12147		case "Name":
12148			if value != nil {
12149				jtv, ok := value.(string)
12150				if !ok {
12151					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12152				}
12153				sv.Name = ptr.String(jtv)
12154			}
12155
12156		case "RuleGroupId":
12157			if value != nil {
12158				jtv, ok := value.(string)
12159				if !ok {
12160					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12161				}
12162				sv.RuleGroupId = ptr.String(jtv)
12163			}
12164
12165		default:
12166			_, _ = key, value
12167
12168		}
12169	}
12170	*v = sv
12171	return nil
12172}
12173
12174func awsAwsjson11_deserializeDocumentRuleSummaries(v *[]types.RuleSummary, value interface{}) error {
12175	if v == nil {
12176		return fmt.Errorf("unexpected nil of type %T", v)
12177	}
12178	if value == nil {
12179		return nil
12180	}
12181
12182	shape, ok := value.([]interface{})
12183	if !ok {
12184		return fmt.Errorf("unexpected JSON type %v", value)
12185	}
12186
12187	var cv []types.RuleSummary
12188	if *v == nil {
12189		cv = []types.RuleSummary{}
12190	} else {
12191		cv = *v
12192	}
12193
12194	for _, value := range shape {
12195		var col types.RuleSummary
12196		destAddr := &col
12197		if err := awsAwsjson11_deserializeDocumentRuleSummary(&destAddr, value); err != nil {
12198			return err
12199		}
12200		col = *destAddr
12201		cv = append(cv, col)
12202
12203	}
12204	*v = cv
12205	return nil
12206}
12207
12208func awsAwsjson11_deserializeDocumentRuleSummary(v **types.RuleSummary, value interface{}) error {
12209	if v == nil {
12210		return fmt.Errorf("unexpected nil of type %T", v)
12211	}
12212	if value == nil {
12213		return nil
12214	}
12215
12216	shape, ok := value.(map[string]interface{})
12217	if !ok {
12218		return fmt.Errorf("unexpected JSON type %v", value)
12219	}
12220
12221	var sv *types.RuleSummary
12222	if *v == nil {
12223		sv = &types.RuleSummary{}
12224	} else {
12225		sv = *v
12226	}
12227
12228	for key, value := range shape {
12229		switch key {
12230		case "Name":
12231			if value != nil {
12232				jtv, ok := value.(string)
12233				if !ok {
12234					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12235				}
12236				sv.Name = ptr.String(jtv)
12237			}
12238
12239		case "RuleId":
12240			if value != nil {
12241				jtv, ok := value.(string)
12242				if !ok {
12243					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12244				}
12245				sv.RuleId = ptr.String(jtv)
12246			}
12247
12248		default:
12249			_, _ = key, value
12250
12251		}
12252	}
12253	*v = sv
12254	return nil
12255}
12256
12257func awsAwsjson11_deserializeDocumentSampledHTTPRequest(v **types.SampledHTTPRequest, value interface{}) error {
12258	if v == nil {
12259		return fmt.Errorf("unexpected nil of type %T", v)
12260	}
12261	if value == nil {
12262		return nil
12263	}
12264
12265	shape, ok := value.(map[string]interface{})
12266	if !ok {
12267		return fmt.Errorf("unexpected JSON type %v", value)
12268	}
12269
12270	var sv *types.SampledHTTPRequest
12271	if *v == nil {
12272		sv = &types.SampledHTTPRequest{}
12273	} else {
12274		sv = *v
12275	}
12276
12277	for key, value := range shape {
12278		switch key {
12279		case "Action":
12280			if value != nil {
12281				jtv, ok := value.(string)
12282				if !ok {
12283					return fmt.Errorf("expected Action to be of type string, got %T instead", value)
12284				}
12285				sv.Action = ptr.String(jtv)
12286			}
12287
12288		case "Request":
12289			if err := awsAwsjson11_deserializeDocumentHTTPRequest(&sv.Request, value); err != nil {
12290				return err
12291			}
12292
12293		case "RuleWithinRuleGroup":
12294			if value != nil {
12295				jtv, ok := value.(string)
12296				if !ok {
12297					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12298				}
12299				sv.RuleWithinRuleGroup = ptr.String(jtv)
12300			}
12301
12302		case "Timestamp":
12303			if value != nil {
12304				switch jtv := value.(type) {
12305				case json.Number:
12306					f64, err := jtv.Float64()
12307					if err != nil {
12308						return err
12309					}
12310					sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
12311
12312				default:
12313					return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
12314
12315				}
12316			}
12317
12318		case "Weight":
12319			if value != nil {
12320				jtv, ok := value.(json.Number)
12321				if !ok {
12322					return fmt.Errorf("expected SampleWeight to be json.Number, got %T instead", value)
12323				}
12324				i64, err := jtv.Int64()
12325				if err != nil {
12326					return err
12327				}
12328				sv.Weight = i64
12329			}
12330
12331		default:
12332			_, _ = key, value
12333
12334		}
12335	}
12336	*v = sv
12337	return nil
12338}
12339
12340func awsAwsjson11_deserializeDocumentSampledHTTPRequests(v *[]types.SampledHTTPRequest, value interface{}) error {
12341	if v == nil {
12342		return fmt.Errorf("unexpected nil of type %T", v)
12343	}
12344	if value == nil {
12345		return nil
12346	}
12347
12348	shape, ok := value.([]interface{})
12349	if !ok {
12350		return fmt.Errorf("unexpected JSON type %v", value)
12351	}
12352
12353	var cv []types.SampledHTTPRequest
12354	if *v == nil {
12355		cv = []types.SampledHTTPRequest{}
12356	} else {
12357		cv = *v
12358	}
12359
12360	for _, value := range shape {
12361		var col types.SampledHTTPRequest
12362		destAddr := &col
12363		if err := awsAwsjson11_deserializeDocumentSampledHTTPRequest(&destAddr, value); err != nil {
12364			return err
12365		}
12366		col = *destAddr
12367		cv = append(cv, col)
12368
12369	}
12370	*v = cv
12371	return nil
12372}
12373
12374func awsAwsjson11_deserializeDocumentSizeConstraint(v **types.SizeConstraint, value interface{}) error {
12375	if v == nil {
12376		return fmt.Errorf("unexpected nil of type %T", v)
12377	}
12378	if value == nil {
12379		return nil
12380	}
12381
12382	shape, ok := value.(map[string]interface{})
12383	if !ok {
12384		return fmt.Errorf("unexpected JSON type %v", value)
12385	}
12386
12387	var sv *types.SizeConstraint
12388	if *v == nil {
12389		sv = &types.SizeConstraint{}
12390	} else {
12391		sv = *v
12392	}
12393
12394	for key, value := range shape {
12395		switch key {
12396		case "ComparisonOperator":
12397			if value != nil {
12398				jtv, ok := value.(string)
12399				if !ok {
12400					return fmt.Errorf("expected ComparisonOperator to be of type string, got %T instead", value)
12401				}
12402				sv.ComparisonOperator = types.ComparisonOperator(jtv)
12403			}
12404
12405		case "FieldToMatch":
12406			if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil {
12407				return err
12408			}
12409
12410		case "Size":
12411			if value != nil {
12412				jtv, ok := value.(json.Number)
12413				if !ok {
12414					return fmt.Errorf("expected Size to be json.Number, got %T instead", value)
12415				}
12416				i64, err := jtv.Int64()
12417				if err != nil {
12418					return err
12419				}
12420				sv.Size = i64
12421			}
12422
12423		case "TextTransformation":
12424			if value != nil {
12425				jtv, ok := value.(string)
12426				if !ok {
12427					return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value)
12428				}
12429				sv.TextTransformation = types.TextTransformation(jtv)
12430			}
12431
12432		default:
12433			_, _ = key, value
12434
12435		}
12436	}
12437	*v = sv
12438	return nil
12439}
12440
12441func awsAwsjson11_deserializeDocumentSizeConstraints(v *[]types.SizeConstraint, value interface{}) error {
12442	if v == nil {
12443		return fmt.Errorf("unexpected nil of type %T", v)
12444	}
12445	if value == nil {
12446		return nil
12447	}
12448
12449	shape, ok := value.([]interface{})
12450	if !ok {
12451		return fmt.Errorf("unexpected JSON type %v", value)
12452	}
12453
12454	var cv []types.SizeConstraint
12455	if *v == nil {
12456		cv = []types.SizeConstraint{}
12457	} else {
12458		cv = *v
12459	}
12460
12461	for _, value := range shape {
12462		var col types.SizeConstraint
12463		destAddr := &col
12464		if err := awsAwsjson11_deserializeDocumentSizeConstraint(&destAddr, value); err != nil {
12465			return err
12466		}
12467		col = *destAddr
12468		cv = append(cv, col)
12469
12470	}
12471	*v = cv
12472	return nil
12473}
12474
12475func awsAwsjson11_deserializeDocumentSizeConstraintSet(v **types.SizeConstraintSet, value interface{}) error {
12476	if v == nil {
12477		return fmt.Errorf("unexpected nil of type %T", v)
12478	}
12479	if value == nil {
12480		return nil
12481	}
12482
12483	shape, ok := value.(map[string]interface{})
12484	if !ok {
12485		return fmt.Errorf("unexpected JSON type %v", value)
12486	}
12487
12488	var sv *types.SizeConstraintSet
12489	if *v == nil {
12490		sv = &types.SizeConstraintSet{}
12491	} else {
12492		sv = *v
12493	}
12494
12495	for key, value := range shape {
12496		switch key {
12497		case "Name":
12498			if value != nil {
12499				jtv, ok := value.(string)
12500				if !ok {
12501					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12502				}
12503				sv.Name = ptr.String(jtv)
12504			}
12505
12506		case "SizeConstraints":
12507			if err := awsAwsjson11_deserializeDocumentSizeConstraints(&sv.SizeConstraints, value); err != nil {
12508				return err
12509			}
12510
12511		case "SizeConstraintSetId":
12512			if value != nil {
12513				jtv, ok := value.(string)
12514				if !ok {
12515					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12516				}
12517				sv.SizeConstraintSetId = ptr.String(jtv)
12518			}
12519
12520		default:
12521			_, _ = key, value
12522
12523		}
12524	}
12525	*v = sv
12526	return nil
12527}
12528
12529func awsAwsjson11_deserializeDocumentSizeConstraintSetSummaries(v *[]types.SizeConstraintSetSummary, value interface{}) error {
12530	if v == nil {
12531		return fmt.Errorf("unexpected nil of type %T", v)
12532	}
12533	if value == nil {
12534		return nil
12535	}
12536
12537	shape, ok := value.([]interface{})
12538	if !ok {
12539		return fmt.Errorf("unexpected JSON type %v", value)
12540	}
12541
12542	var cv []types.SizeConstraintSetSummary
12543	if *v == nil {
12544		cv = []types.SizeConstraintSetSummary{}
12545	} else {
12546		cv = *v
12547	}
12548
12549	for _, value := range shape {
12550		var col types.SizeConstraintSetSummary
12551		destAddr := &col
12552		if err := awsAwsjson11_deserializeDocumentSizeConstraintSetSummary(&destAddr, value); err != nil {
12553			return err
12554		}
12555		col = *destAddr
12556		cv = append(cv, col)
12557
12558	}
12559	*v = cv
12560	return nil
12561}
12562
12563func awsAwsjson11_deserializeDocumentSizeConstraintSetSummary(v **types.SizeConstraintSetSummary, value interface{}) error {
12564	if v == nil {
12565		return fmt.Errorf("unexpected nil of type %T", v)
12566	}
12567	if value == nil {
12568		return nil
12569	}
12570
12571	shape, ok := value.(map[string]interface{})
12572	if !ok {
12573		return fmt.Errorf("unexpected JSON type %v", value)
12574	}
12575
12576	var sv *types.SizeConstraintSetSummary
12577	if *v == nil {
12578		sv = &types.SizeConstraintSetSummary{}
12579	} else {
12580		sv = *v
12581	}
12582
12583	for key, value := range shape {
12584		switch key {
12585		case "Name":
12586			if value != nil {
12587				jtv, ok := value.(string)
12588				if !ok {
12589					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12590				}
12591				sv.Name = ptr.String(jtv)
12592			}
12593
12594		case "SizeConstraintSetId":
12595			if value != nil {
12596				jtv, ok := value.(string)
12597				if !ok {
12598					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12599				}
12600				sv.SizeConstraintSetId = ptr.String(jtv)
12601			}
12602
12603		default:
12604			_, _ = key, value
12605
12606		}
12607	}
12608	*v = sv
12609	return nil
12610}
12611
12612func awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(v **types.SqlInjectionMatchSet, value interface{}) error {
12613	if v == nil {
12614		return fmt.Errorf("unexpected nil of type %T", v)
12615	}
12616	if value == nil {
12617		return nil
12618	}
12619
12620	shape, ok := value.(map[string]interface{})
12621	if !ok {
12622		return fmt.Errorf("unexpected JSON type %v", value)
12623	}
12624
12625	var sv *types.SqlInjectionMatchSet
12626	if *v == nil {
12627		sv = &types.SqlInjectionMatchSet{}
12628	} else {
12629		sv = *v
12630	}
12631
12632	for key, value := range shape {
12633		switch key {
12634		case "Name":
12635			if value != nil {
12636				jtv, ok := value.(string)
12637				if !ok {
12638					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12639				}
12640				sv.Name = ptr.String(jtv)
12641			}
12642
12643		case "SqlInjectionMatchSetId":
12644			if value != nil {
12645				jtv, ok := value.(string)
12646				if !ok {
12647					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12648				}
12649				sv.SqlInjectionMatchSetId = ptr.String(jtv)
12650			}
12651
12652		case "SqlInjectionMatchTuples":
12653			if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchTuples(&sv.SqlInjectionMatchTuples, value); err != nil {
12654				return err
12655			}
12656
12657		default:
12658			_, _ = key, value
12659
12660		}
12661	}
12662	*v = sv
12663	return nil
12664}
12665
12666func awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummaries(v *[]types.SqlInjectionMatchSetSummary, value interface{}) error {
12667	if v == nil {
12668		return fmt.Errorf("unexpected nil of type %T", v)
12669	}
12670	if value == nil {
12671		return nil
12672	}
12673
12674	shape, ok := value.([]interface{})
12675	if !ok {
12676		return fmt.Errorf("unexpected JSON type %v", value)
12677	}
12678
12679	var cv []types.SqlInjectionMatchSetSummary
12680	if *v == nil {
12681		cv = []types.SqlInjectionMatchSetSummary{}
12682	} else {
12683		cv = *v
12684	}
12685
12686	for _, value := range shape {
12687		var col types.SqlInjectionMatchSetSummary
12688		destAddr := &col
12689		if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummary(&destAddr, value); err != nil {
12690			return err
12691		}
12692		col = *destAddr
12693		cv = append(cv, col)
12694
12695	}
12696	*v = cv
12697	return nil
12698}
12699
12700func awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummary(v **types.SqlInjectionMatchSetSummary, value interface{}) error {
12701	if v == nil {
12702		return fmt.Errorf("unexpected nil of type %T", v)
12703	}
12704	if value == nil {
12705		return nil
12706	}
12707
12708	shape, ok := value.(map[string]interface{})
12709	if !ok {
12710		return fmt.Errorf("unexpected JSON type %v", value)
12711	}
12712
12713	var sv *types.SqlInjectionMatchSetSummary
12714	if *v == nil {
12715		sv = &types.SqlInjectionMatchSetSummary{}
12716	} else {
12717		sv = *v
12718	}
12719
12720	for key, value := range shape {
12721		switch key {
12722		case "Name":
12723			if value != nil {
12724				jtv, ok := value.(string)
12725				if !ok {
12726					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12727				}
12728				sv.Name = ptr.String(jtv)
12729			}
12730
12731		case "SqlInjectionMatchSetId":
12732			if value != nil {
12733				jtv, ok := value.(string)
12734				if !ok {
12735					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12736				}
12737				sv.SqlInjectionMatchSetId = ptr.String(jtv)
12738			}
12739
12740		default:
12741			_, _ = key, value
12742
12743		}
12744	}
12745	*v = sv
12746	return nil
12747}
12748
12749func awsAwsjson11_deserializeDocumentSqlInjectionMatchTuple(v **types.SqlInjectionMatchTuple, value interface{}) error {
12750	if v == nil {
12751		return fmt.Errorf("unexpected nil of type %T", v)
12752	}
12753	if value == nil {
12754		return nil
12755	}
12756
12757	shape, ok := value.(map[string]interface{})
12758	if !ok {
12759		return fmt.Errorf("unexpected JSON type %v", value)
12760	}
12761
12762	var sv *types.SqlInjectionMatchTuple
12763	if *v == nil {
12764		sv = &types.SqlInjectionMatchTuple{}
12765	} else {
12766		sv = *v
12767	}
12768
12769	for key, value := range shape {
12770		switch key {
12771		case "FieldToMatch":
12772			if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil {
12773				return err
12774			}
12775
12776		case "TextTransformation":
12777			if value != nil {
12778				jtv, ok := value.(string)
12779				if !ok {
12780					return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value)
12781				}
12782				sv.TextTransformation = types.TextTransformation(jtv)
12783			}
12784
12785		default:
12786			_, _ = key, value
12787
12788		}
12789	}
12790	*v = sv
12791	return nil
12792}
12793
12794func awsAwsjson11_deserializeDocumentSqlInjectionMatchTuples(v *[]types.SqlInjectionMatchTuple, value interface{}) error {
12795	if v == nil {
12796		return fmt.Errorf("unexpected nil of type %T", v)
12797	}
12798	if value == nil {
12799		return nil
12800	}
12801
12802	shape, ok := value.([]interface{})
12803	if !ok {
12804		return fmt.Errorf("unexpected JSON type %v", value)
12805	}
12806
12807	var cv []types.SqlInjectionMatchTuple
12808	if *v == nil {
12809		cv = []types.SqlInjectionMatchTuple{}
12810	} else {
12811		cv = *v
12812	}
12813
12814	for _, value := range shape {
12815		var col types.SqlInjectionMatchTuple
12816		destAddr := &col
12817		if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchTuple(&destAddr, value); err != nil {
12818			return err
12819		}
12820		col = *destAddr
12821		cv = append(cv, col)
12822
12823	}
12824	*v = cv
12825	return nil
12826}
12827
12828func awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummaries(v *[]types.SubscribedRuleGroupSummary, value interface{}) error {
12829	if v == nil {
12830		return fmt.Errorf("unexpected nil of type %T", v)
12831	}
12832	if value == nil {
12833		return nil
12834	}
12835
12836	shape, ok := value.([]interface{})
12837	if !ok {
12838		return fmt.Errorf("unexpected JSON type %v", value)
12839	}
12840
12841	var cv []types.SubscribedRuleGroupSummary
12842	if *v == nil {
12843		cv = []types.SubscribedRuleGroupSummary{}
12844	} else {
12845		cv = *v
12846	}
12847
12848	for _, value := range shape {
12849		var col types.SubscribedRuleGroupSummary
12850		destAddr := &col
12851		if err := awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummary(&destAddr, value); err != nil {
12852			return err
12853		}
12854		col = *destAddr
12855		cv = append(cv, col)
12856
12857	}
12858	*v = cv
12859	return nil
12860}
12861
12862func awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummary(v **types.SubscribedRuleGroupSummary, value interface{}) error {
12863	if v == nil {
12864		return fmt.Errorf("unexpected nil of type %T", v)
12865	}
12866	if value == nil {
12867		return nil
12868	}
12869
12870	shape, ok := value.(map[string]interface{})
12871	if !ok {
12872		return fmt.Errorf("unexpected JSON type %v", value)
12873	}
12874
12875	var sv *types.SubscribedRuleGroupSummary
12876	if *v == nil {
12877		sv = &types.SubscribedRuleGroupSummary{}
12878	} else {
12879		sv = *v
12880	}
12881
12882	for key, value := range shape {
12883		switch key {
12884		case "MetricName":
12885			if value != nil {
12886				jtv, ok := value.(string)
12887				if !ok {
12888					return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
12889				}
12890				sv.MetricName = ptr.String(jtv)
12891			}
12892
12893		case "Name":
12894			if value != nil {
12895				jtv, ok := value.(string)
12896				if !ok {
12897					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
12898				}
12899				sv.Name = ptr.String(jtv)
12900			}
12901
12902		case "RuleGroupId":
12903			if value != nil {
12904				jtv, ok := value.(string)
12905				if !ok {
12906					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
12907				}
12908				sv.RuleGroupId = ptr.String(jtv)
12909			}
12910
12911		default:
12912			_, _ = key, value
12913
12914		}
12915	}
12916	*v = sv
12917	return nil
12918}
12919
12920func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
12921	if v == nil {
12922		return fmt.Errorf("unexpected nil of type %T", v)
12923	}
12924	if value == nil {
12925		return nil
12926	}
12927
12928	shape, ok := value.(map[string]interface{})
12929	if !ok {
12930		return fmt.Errorf("unexpected JSON type %v", value)
12931	}
12932
12933	var sv *types.Tag
12934	if *v == nil {
12935		sv = &types.Tag{}
12936	} else {
12937		sv = *v
12938	}
12939
12940	for key, value := range shape {
12941		switch key {
12942		case "Key":
12943			if value != nil {
12944				jtv, ok := value.(string)
12945				if !ok {
12946					return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
12947				}
12948				sv.Key = ptr.String(jtv)
12949			}
12950
12951		case "Value":
12952			if value != nil {
12953				jtv, ok := value.(string)
12954				if !ok {
12955					return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
12956				}
12957				sv.Value = ptr.String(jtv)
12958			}
12959
12960		default:
12961			_, _ = key, value
12962
12963		}
12964	}
12965	*v = sv
12966	return nil
12967}
12968
12969func awsAwsjson11_deserializeDocumentTagInfoForResource(v **types.TagInfoForResource, value interface{}) error {
12970	if v == nil {
12971		return fmt.Errorf("unexpected nil of type %T", v)
12972	}
12973	if value == nil {
12974		return nil
12975	}
12976
12977	shape, ok := value.(map[string]interface{})
12978	if !ok {
12979		return fmt.Errorf("unexpected JSON type %v", value)
12980	}
12981
12982	var sv *types.TagInfoForResource
12983	if *v == nil {
12984		sv = &types.TagInfoForResource{}
12985	} else {
12986		sv = *v
12987	}
12988
12989	for key, value := range shape {
12990		switch key {
12991		case "ResourceARN":
12992			if value != nil {
12993				jtv, ok := value.(string)
12994				if !ok {
12995					return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
12996				}
12997				sv.ResourceARN = ptr.String(jtv)
12998			}
12999
13000		case "TagList":
13001			if err := awsAwsjson11_deserializeDocumentTagList(&sv.TagList, value); err != nil {
13002				return err
13003			}
13004
13005		default:
13006			_, _ = key, value
13007
13008		}
13009	}
13010	*v = sv
13011	return nil
13012}
13013
13014func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error {
13015	if v == nil {
13016		return fmt.Errorf("unexpected nil of type %T", v)
13017	}
13018	if value == nil {
13019		return nil
13020	}
13021
13022	shape, ok := value.([]interface{})
13023	if !ok {
13024		return fmt.Errorf("unexpected JSON type %v", value)
13025	}
13026
13027	var cv []types.Tag
13028	if *v == nil {
13029		cv = []types.Tag{}
13030	} else {
13031		cv = *v
13032	}
13033
13034	for _, value := range shape {
13035		var col types.Tag
13036		destAddr := &col
13037		if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
13038			return err
13039		}
13040		col = *destAddr
13041		cv = append(cv, col)
13042
13043	}
13044	*v = cv
13045	return nil
13046}
13047
13048func awsAwsjson11_deserializeDocumentTimeWindow(v **types.TimeWindow, value interface{}) error {
13049	if v == nil {
13050		return fmt.Errorf("unexpected nil of type %T", v)
13051	}
13052	if value == nil {
13053		return nil
13054	}
13055
13056	shape, ok := value.(map[string]interface{})
13057	if !ok {
13058		return fmt.Errorf("unexpected JSON type %v", value)
13059	}
13060
13061	var sv *types.TimeWindow
13062	if *v == nil {
13063		sv = &types.TimeWindow{}
13064	} else {
13065		sv = *v
13066	}
13067
13068	for key, value := range shape {
13069		switch key {
13070		case "EndTime":
13071			if value != nil {
13072				switch jtv := value.(type) {
13073				case json.Number:
13074					f64, err := jtv.Float64()
13075					if err != nil {
13076						return err
13077					}
13078					sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
13079
13080				default:
13081					return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
13082
13083				}
13084			}
13085
13086		case "StartTime":
13087			if value != nil {
13088				switch jtv := value.(type) {
13089				case json.Number:
13090					f64, err := jtv.Float64()
13091					if err != nil {
13092						return err
13093					}
13094					sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
13095
13096				default:
13097					return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
13098
13099				}
13100			}
13101
13102		default:
13103			_, _ = key, value
13104
13105		}
13106	}
13107	*v = sv
13108	return nil
13109}
13110
13111func awsAwsjson11_deserializeDocumentWafAction(v **types.WafAction, value interface{}) error {
13112	if v == nil {
13113		return fmt.Errorf("unexpected nil of type %T", v)
13114	}
13115	if value == nil {
13116		return nil
13117	}
13118
13119	shape, ok := value.(map[string]interface{})
13120	if !ok {
13121		return fmt.Errorf("unexpected JSON type %v", value)
13122	}
13123
13124	var sv *types.WafAction
13125	if *v == nil {
13126		sv = &types.WafAction{}
13127	} else {
13128		sv = *v
13129	}
13130
13131	for key, value := range shape {
13132		switch key {
13133		case "Type":
13134			if value != nil {
13135				jtv, ok := value.(string)
13136				if !ok {
13137					return fmt.Errorf("expected WafActionType to be of type string, got %T instead", value)
13138				}
13139				sv.Type = types.WafActionType(jtv)
13140			}
13141
13142		default:
13143			_, _ = key, value
13144
13145		}
13146	}
13147	*v = sv
13148	return nil
13149}
13150
13151func awsAwsjson11_deserializeDocumentWAFBadRequestException(v **types.WAFBadRequestException, value interface{}) error {
13152	if v == nil {
13153		return fmt.Errorf("unexpected nil of type %T", v)
13154	}
13155	if value == nil {
13156		return nil
13157	}
13158
13159	shape, ok := value.(map[string]interface{})
13160	if !ok {
13161		return fmt.Errorf("unexpected JSON type %v", value)
13162	}
13163
13164	var sv *types.WAFBadRequestException
13165	if *v == nil {
13166		sv = &types.WAFBadRequestException{}
13167	} else {
13168		sv = *v
13169	}
13170
13171	for key, value := range shape {
13172		switch key {
13173		case "message":
13174			if value != nil {
13175				jtv, ok := value.(string)
13176				if !ok {
13177					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13178				}
13179				sv.Message = ptr.String(jtv)
13180			}
13181
13182		default:
13183			_, _ = key, value
13184
13185		}
13186	}
13187	*v = sv
13188	return nil
13189}
13190
13191func awsAwsjson11_deserializeDocumentWAFDisallowedNameException(v **types.WAFDisallowedNameException, value interface{}) error {
13192	if v == nil {
13193		return fmt.Errorf("unexpected nil of type %T", v)
13194	}
13195	if value == nil {
13196		return nil
13197	}
13198
13199	shape, ok := value.(map[string]interface{})
13200	if !ok {
13201		return fmt.Errorf("unexpected JSON type %v", value)
13202	}
13203
13204	var sv *types.WAFDisallowedNameException
13205	if *v == nil {
13206		sv = &types.WAFDisallowedNameException{}
13207	} else {
13208		sv = *v
13209	}
13210
13211	for key, value := range shape {
13212		switch key {
13213		case "message":
13214			if value != nil {
13215				jtv, ok := value.(string)
13216				if !ok {
13217					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13218				}
13219				sv.Message = ptr.String(jtv)
13220			}
13221
13222		default:
13223			_, _ = key, value
13224
13225		}
13226	}
13227	*v = sv
13228	return nil
13229}
13230
13231func awsAwsjson11_deserializeDocumentWAFEntityMigrationException(v **types.WAFEntityMigrationException, value interface{}) error {
13232	if v == nil {
13233		return fmt.Errorf("unexpected nil of type %T", v)
13234	}
13235	if value == nil {
13236		return nil
13237	}
13238
13239	shape, ok := value.(map[string]interface{})
13240	if !ok {
13241		return fmt.Errorf("unexpected JSON type %v", value)
13242	}
13243
13244	var sv *types.WAFEntityMigrationException
13245	if *v == nil {
13246		sv = &types.WAFEntityMigrationException{}
13247	} else {
13248		sv = *v
13249	}
13250
13251	for key, value := range shape {
13252		switch key {
13253		case "message":
13254			if value != nil {
13255				jtv, ok := value.(string)
13256				if !ok {
13257					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13258				}
13259				sv.Message = ptr.String(jtv)
13260			}
13261
13262		case "MigrationErrorReason":
13263			if value != nil {
13264				jtv, ok := value.(string)
13265				if !ok {
13266					return fmt.Errorf("expected ErrorReason to be of type string, got %T instead", value)
13267				}
13268				sv.MigrationErrorReason = ptr.String(jtv)
13269			}
13270
13271		case "MigrationErrorType":
13272			if value != nil {
13273				jtv, ok := value.(string)
13274				if !ok {
13275					return fmt.Errorf("expected MigrationErrorType to be of type string, got %T instead", value)
13276				}
13277				sv.MigrationErrorType = types.MigrationErrorType(jtv)
13278			}
13279
13280		default:
13281			_, _ = key, value
13282
13283		}
13284	}
13285	*v = sv
13286	return nil
13287}
13288
13289func awsAwsjson11_deserializeDocumentWAFInternalErrorException(v **types.WAFInternalErrorException, value interface{}) error {
13290	if v == nil {
13291		return fmt.Errorf("unexpected nil of type %T", v)
13292	}
13293	if value == nil {
13294		return nil
13295	}
13296
13297	shape, ok := value.(map[string]interface{})
13298	if !ok {
13299		return fmt.Errorf("unexpected JSON type %v", value)
13300	}
13301
13302	var sv *types.WAFInternalErrorException
13303	if *v == nil {
13304		sv = &types.WAFInternalErrorException{}
13305	} else {
13306		sv = *v
13307	}
13308
13309	for key, value := range shape {
13310		switch key {
13311		case "message":
13312			if value != nil {
13313				jtv, ok := value.(string)
13314				if !ok {
13315					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13316				}
13317				sv.Message = ptr.String(jtv)
13318			}
13319
13320		default:
13321			_, _ = key, value
13322
13323		}
13324	}
13325	*v = sv
13326	return nil
13327}
13328
13329func awsAwsjson11_deserializeDocumentWAFInvalidAccountException(v **types.WAFInvalidAccountException, value interface{}) error {
13330	if v == nil {
13331		return fmt.Errorf("unexpected nil of type %T", v)
13332	}
13333	if value == nil {
13334		return nil
13335	}
13336
13337	shape, ok := value.(map[string]interface{})
13338	if !ok {
13339		return fmt.Errorf("unexpected JSON type %v", value)
13340	}
13341
13342	var sv *types.WAFInvalidAccountException
13343	if *v == nil {
13344		sv = &types.WAFInvalidAccountException{}
13345	} else {
13346		sv = *v
13347	}
13348
13349	for key, value := range shape {
13350		switch key {
13351		default:
13352			_, _ = key, value
13353
13354		}
13355	}
13356	*v = sv
13357	return nil
13358}
13359
13360func awsAwsjson11_deserializeDocumentWAFInvalidOperationException(v **types.WAFInvalidOperationException, value interface{}) error {
13361	if v == nil {
13362		return fmt.Errorf("unexpected nil of type %T", v)
13363	}
13364	if value == nil {
13365		return nil
13366	}
13367
13368	shape, ok := value.(map[string]interface{})
13369	if !ok {
13370		return fmt.Errorf("unexpected JSON type %v", value)
13371	}
13372
13373	var sv *types.WAFInvalidOperationException
13374	if *v == nil {
13375		sv = &types.WAFInvalidOperationException{}
13376	} else {
13377		sv = *v
13378	}
13379
13380	for key, value := range shape {
13381		switch key {
13382		case "message":
13383			if value != nil {
13384				jtv, ok := value.(string)
13385				if !ok {
13386					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13387				}
13388				sv.Message = ptr.String(jtv)
13389			}
13390
13391		default:
13392			_, _ = key, value
13393
13394		}
13395	}
13396	*v = sv
13397	return nil
13398}
13399
13400func awsAwsjson11_deserializeDocumentWAFInvalidParameterException(v **types.WAFInvalidParameterException, value interface{}) error {
13401	if v == nil {
13402		return fmt.Errorf("unexpected nil of type %T", v)
13403	}
13404	if value == nil {
13405		return nil
13406	}
13407
13408	shape, ok := value.(map[string]interface{})
13409	if !ok {
13410		return fmt.Errorf("unexpected JSON type %v", value)
13411	}
13412
13413	var sv *types.WAFInvalidParameterException
13414	if *v == nil {
13415		sv = &types.WAFInvalidParameterException{}
13416	} else {
13417		sv = *v
13418	}
13419
13420	for key, value := range shape {
13421		switch key {
13422		case "field":
13423			if value != nil {
13424				jtv, ok := value.(string)
13425				if !ok {
13426					return fmt.Errorf("expected ParameterExceptionField to be of type string, got %T instead", value)
13427				}
13428				sv.Field = types.ParameterExceptionField(jtv)
13429			}
13430
13431		case "parameter":
13432			if value != nil {
13433				jtv, ok := value.(string)
13434				if !ok {
13435					return fmt.Errorf("expected ParameterExceptionParameter to be of type string, got %T instead", value)
13436				}
13437				sv.Parameter = ptr.String(jtv)
13438			}
13439
13440		case "reason":
13441			if value != nil {
13442				jtv, ok := value.(string)
13443				if !ok {
13444					return fmt.Errorf("expected ParameterExceptionReason to be of type string, got %T instead", value)
13445				}
13446				sv.Reason = types.ParameterExceptionReason(jtv)
13447			}
13448
13449		default:
13450			_, _ = key, value
13451
13452		}
13453	}
13454	*v = sv
13455	return nil
13456}
13457
13458func awsAwsjson11_deserializeDocumentWAFInvalidPermissionPolicyException(v **types.WAFInvalidPermissionPolicyException, value interface{}) error {
13459	if v == nil {
13460		return fmt.Errorf("unexpected nil of type %T", v)
13461	}
13462	if value == nil {
13463		return nil
13464	}
13465
13466	shape, ok := value.(map[string]interface{})
13467	if !ok {
13468		return fmt.Errorf("unexpected JSON type %v", value)
13469	}
13470
13471	var sv *types.WAFInvalidPermissionPolicyException
13472	if *v == nil {
13473		sv = &types.WAFInvalidPermissionPolicyException{}
13474	} else {
13475		sv = *v
13476	}
13477
13478	for key, value := range shape {
13479		switch key {
13480		case "message":
13481			if value != nil {
13482				jtv, ok := value.(string)
13483				if !ok {
13484					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13485				}
13486				sv.Message = ptr.String(jtv)
13487			}
13488
13489		default:
13490			_, _ = key, value
13491
13492		}
13493	}
13494	*v = sv
13495	return nil
13496}
13497
13498func awsAwsjson11_deserializeDocumentWAFInvalidRegexPatternException(v **types.WAFInvalidRegexPatternException, value interface{}) error {
13499	if v == nil {
13500		return fmt.Errorf("unexpected nil of type %T", v)
13501	}
13502	if value == nil {
13503		return nil
13504	}
13505
13506	shape, ok := value.(map[string]interface{})
13507	if !ok {
13508		return fmt.Errorf("unexpected JSON type %v", value)
13509	}
13510
13511	var sv *types.WAFInvalidRegexPatternException
13512	if *v == nil {
13513		sv = &types.WAFInvalidRegexPatternException{}
13514	} else {
13515		sv = *v
13516	}
13517
13518	for key, value := range shape {
13519		switch key {
13520		case "message":
13521			if value != nil {
13522				jtv, ok := value.(string)
13523				if !ok {
13524					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13525				}
13526				sv.Message = ptr.String(jtv)
13527			}
13528
13529		default:
13530			_, _ = key, value
13531
13532		}
13533	}
13534	*v = sv
13535	return nil
13536}
13537
13538func awsAwsjson11_deserializeDocumentWAFLimitsExceededException(v **types.WAFLimitsExceededException, value interface{}) error {
13539	if v == nil {
13540		return fmt.Errorf("unexpected nil of type %T", v)
13541	}
13542	if value == nil {
13543		return nil
13544	}
13545
13546	shape, ok := value.(map[string]interface{})
13547	if !ok {
13548		return fmt.Errorf("unexpected JSON type %v", value)
13549	}
13550
13551	var sv *types.WAFLimitsExceededException
13552	if *v == nil {
13553		sv = &types.WAFLimitsExceededException{}
13554	} else {
13555		sv = *v
13556	}
13557
13558	for key, value := range shape {
13559		switch key {
13560		case "message":
13561			if value != nil {
13562				jtv, ok := value.(string)
13563				if !ok {
13564					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13565				}
13566				sv.Message = ptr.String(jtv)
13567			}
13568
13569		default:
13570			_, _ = key, value
13571
13572		}
13573	}
13574	*v = sv
13575	return nil
13576}
13577
13578func awsAwsjson11_deserializeDocumentWAFNonEmptyEntityException(v **types.WAFNonEmptyEntityException, value interface{}) error {
13579	if v == nil {
13580		return fmt.Errorf("unexpected nil of type %T", v)
13581	}
13582	if value == nil {
13583		return nil
13584	}
13585
13586	shape, ok := value.(map[string]interface{})
13587	if !ok {
13588		return fmt.Errorf("unexpected JSON type %v", value)
13589	}
13590
13591	var sv *types.WAFNonEmptyEntityException
13592	if *v == nil {
13593		sv = &types.WAFNonEmptyEntityException{}
13594	} else {
13595		sv = *v
13596	}
13597
13598	for key, value := range shape {
13599		switch key {
13600		case "message":
13601			if value != nil {
13602				jtv, ok := value.(string)
13603				if !ok {
13604					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13605				}
13606				sv.Message = ptr.String(jtv)
13607			}
13608
13609		default:
13610			_, _ = key, value
13611
13612		}
13613	}
13614	*v = sv
13615	return nil
13616}
13617
13618func awsAwsjson11_deserializeDocumentWAFNonexistentContainerException(v **types.WAFNonexistentContainerException, value interface{}) error {
13619	if v == nil {
13620		return fmt.Errorf("unexpected nil of type %T", v)
13621	}
13622	if value == nil {
13623		return nil
13624	}
13625
13626	shape, ok := value.(map[string]interface{})
13627	if !ok {
13628		return fmt.Errorf("unexpected JSON type %v", value)
13629	}
13630
13631	var sv *types.WAFNonexistentContainerException
13632	if *v == nil {
13633		sv = &types.WAFNonexistentContainerException{}
13634	} else {
13635		sv = *v
13636	}
13637
13638	for key, value := range shape {
13639		switch key {
13640		case "message":
13641			if value != nil {
13642				jtv, ok := value.(string)
13643				if !ok {
13644					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13645				}
13646				sv.Message = ptr.String(jtv)
13647			}
13648
13649		default:
13650			_, _ = key, value
13651
13652		}
13653	}
13654	*v = sv
13655	return nil
13656}
13657
13658func awsAwsjson11_deserializeDocumentWAFNonexistentItemException(v **types.WAFNonexistentItemException, value interface{}) error {
13659	if v == nil {
13660		return fmt.Errorf("unexpected nil of type %T", v)
13661	}
13662	if value == nil {
13663		return nil
13664	}
13665
13666	shape, ok := value.(map[string]interface{})
13667	if !ok {
13668		return fmt.Errorf("unexpected JSON type %v", value)
13669	}
13670
13671	var sv *types.WAFNonexistentItemException
13672	if *v == nil {
13673		sv = &types.WAFNonexistentItemException{}
13674	} else {
13675		sv = *v
13676	}
13677
13678	for key, value := range shape {
13679		switch key {
13680		case "message":
13681			if value != nil {
13682				jtv, ok := value.(string)
13683				if !ok {
13684					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13685				}
13686				sv.Message = ptr.String(jtv)
13687			}
13688
13689		default:
13690			_, _ = key, value
13691
13692		}
13693	}
13694	*v = sv
13695	return nil
13696}
13697
13698func awsAwsjson11_deserializeDocumentWafOverrideAction(v **types.WafOverrideAction, value interface{}) error {
13699	if v == nil {
13700		return fmt.Errorf("unexpected nil of type %T", v)
13701	}
13702	if value == nil {
13703		return nil
13704	}
13705
13706	shape, ok := value.(map[string]interface{})
13707	if !ok {
13708		return fmt.Errorf("unexpected JSON type %v", value)
13709	}
13710
13711	var sv *types.WafOverrideAction
13712	if *v == nil {
13713		sv = &types.WafOverrideAction{}
13714	} else {
13715		sv = *v
13716	}
13717
13718	for key, value := range shape {
13719		switch key {
13720		case "Type":
13721			if value != nil {
13722				jtv, ok := value.(string)
13723				if !ok {
13724					return fmt.Errorf("expected WafOverrideActionType to be of type string, got %T instead", value)
13725				}
13726				sv.Type = types.WafOverrideActionType(jtv)
13727			}
13728
13729		default:
13730			_, _ = key, value
13731
13732		}
13733	}
13734	*v = sv
13735	return nil
13736}
13737
13738func awsAwsjson11_deserializeDocumentWAFReferencedItemException(v **types.WAFReferencedItemException, value interface{}) error {
13739	if v == nil {
13740		return fmt.Errorf("unexpected nil of type %T", v)
13741	}
13742	if value == nil {
13743		return nil
13744	}
13745
13746	shape, ok := value.(map[string]interface{})
13747	if !ok {
13748		return fmt.Errorf("unexpected JSON type %v", value)
13749	}
13750
13751	var sv *types.WAFReferencedItemException
13752	if *v == nil {
13753		sv = &types.WAFReferencedItemException{}
13754	} else {
13755		sv = *v
13756	}
13757
13758	for key, value := range shape {
13759		switch key {
13760		case "message":
13761			if value != nil {
13762				jtv, ok := value.(string)
13763				if !ok {
13764					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13765				}
13766				sv.Message = ptr.String(jtv)
13767			}
13768
13769		default:
13770			_, _ = key, value
13771
13772		}
13773	}
13774	*v = sv
13775	return nil
13776}
13777
13778func awsAwsjson11_deserializeDocumentWAFServiceLinkedRoleErrorException(v **types.WAFServiceLinkedRoleErrorException, value interface{}) error {
13779	if v == nil {
13780		return fmt.Errorf("unexpected nil of type %T", v)
13781	}
13782	if value == nil {
13783		return nil
13784	}
13785
13786	shape, ok := value.(map[string]interface{})
13787	if !ok {
13788		return fmt.Errorf("unexpected JSON type %v", value)
13789	}
13790
13791	var sv *types.WAFServiceLinkedRoleErrorException
13792	if *v == nil {
13793		sv = &types.WAFServiceLinkedRoleErrorException{}
13794	} else {
13795		sv = *v
13796	}
13797
13798	for key, value := range shape {
13799		switch key {
13800		case "message":
13801			if value != nil {
13802				jtv, ok := value.(string)
13803				if !ok {
13804					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13805				}
13806				sv.Message = ptr.String(jtv)
13807			}
13808
13809		default:
13810			_, _ = key, value
13811
13812		}
13813	}
13814	*v = sv
13815	return nil
13816}
13817
13818func awsAwsjson11_deserializeDocumentWAFStaleDataException(v **types.WAFStaleDataException, value interface{}) error {
13819	if v == nil {
13820		return fmt.Errorf("unexpected nil of type %T", v)
13821	}
13822	if value == nil {
13823		return nil
13824	}
13825
13826	shape, ok := value.(map[string]interface{})
13827	if !ok {
13828		return fmt.Errorf("unexpected JSON type %v", value)
13829	}
13830
13831	var sv *types.WAFStaleDataException
13832	if *v == nil {
13833		sv = &types.WAFStaleDataException{}
13834	} else {
13835		sv = *v
13836	}
13837
13838	for key, value := range shape {
13839		switch key {
13840		case "message":
13841			if value != nil {
13842				jtv, ok := value.(string)
13843				if !ok {
13844					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13845				}
13846				sv.Message = ptr.String(jtv)
13847			}
13848
13849		default:
13850			_, _ = key, value
13851
13852		}
13853	}
13854	*v = sv
13855	return nil
13856}
13857
13858func awsAwsjson11_deserializeDocumentWAFSubscriptionNotFoundException(v **types.WAFSubscriptionNotFoundException, value interface{}) error {
13859	if v == nil {
13860		return fmt.Errorf("unexpected nil of type %T", v)
13861	}
13862	if value == nil {
13863		return nil
13864	}
13865
13866	shape, ok := value.(map[string]interface{})
13867	if !ok {
13868		return fmt.Errorf("unexpected JSON type %v", value)
13869	}
13870
13871	var sv *types.WAFSubscriptionNotFoundException
13872	if *v == nil {
13873		sv = &types.WAFSubscriptionNotFoundException{}
13874	} else {
13875		sv = *v
13876	}
13877
13878	for key, value := range shape {
13879		switch key {
13880		case "message":
13881			if value != nil {
13882				jtv, ok := value.(string)
13883				if !ok {
13884					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13885				}
13886				sv.Message = ptr.String(jtv)
13887			}
13888
13889		default:
13890			_, _ = key, value
13891
13892		}
13893	}
13894	*v = sv
13895	return nil
13896}
13897
13898func awsAwsjson11_deserializeDocumentWAFTagOperationException(v **types.WAFTagOperationException, value interface{}) error {
13899	if v == nil {
13900		return fmt.Errorf("unexpected nil of type %T", v)
13901	}
13902	if value == nil {
13903		return nil
13904	}
13905
13906	shape, ok := value.(map[string]interface{})
13907	if !ok {
13908		return fmt.Errorf("unexpected JSON type %v", value)
13909	}
13910
13911	var sv *types.WAFTagOperationException
13912	if *v == nil {
13913		sv = &types.WAFTagOperationException{}
13914	} else {
13915		sv = *v
13916	}
13917
13918	for key, value := range shape {
13919		switch key {
13920		case "message":
13921			if value != nil {
13922				jtv, ok := value.(string)
13923				if !ok {
13924					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13925				}
13926				sv.Message = ptr.String(jtv)
13927			}
13928
13929		default:
13930			_, _ = key, value
13931
13932		}
13933	}
13934	*v = sv
13935	return nil
13936}
13937
13938func awsAwsjson11_deserializeDocumentWAFTagOperationInternalErrorException(v **types.WAFTagOperationInternalErrorException, value interface{}) error {
13939	if v == nil {
13940		return fmt.Errorf("unexpected nil of type %T", v)
13941	}
13942	if value == nil {
13943		return nil
13944	}
13945
13946	shape, ok := value.(map[string]interface{})
13947	if !ok {
13948		return fmt.Errorf("unexpected JSON type %v", value)
13949	}
13950
13951	var sv *types.WAFTagOperationInternalErrorException
13952	if *v == nil {
13953		sv = &types.WAFTagOperationInternalErrorException{}
13954	} else {
13955		sv = *v
13956	}
13957
13958	for key, value := range shape {
13959		switch key {
13960		case "message":
13961			if value != nil {
13962				jtv, ok := value.(string)
13963				if !ok {
13964					return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
13965				}
13966				sv.Message = ptr.String(jtv)
13967			}
13968
13969		default:
13970			_, _ = key, value
13971
13972		}
13973	}
13974	*v = sv
13975	return nil
13976}
13977
13978func awsAwsjson11_deserializeDocumentWebACL(v **types.WebACL, value interface{}) error {
13979	if v == nil {
13980		return fmt.Errorf("unexpected nil of type %T", v)
13981	}
13982	if value == nil {
13983		return nil
13984	}
13985
13986	shape, ok := value.(map[string]interface{})
13987	if !ok {
13988		return fmt.Errorf("unexpected JSON type %v", value)
13989	}
13990
13991	var sv *types.WebACL
13992	if *v == nil {
13993		sv = &types.WebACL{}
13994	} else {
13995		sv = *v
13996	}
13997
13998	for key, value := range shape {
13999		switch key {
14000		case "DefaultAction":
14001			if err := awsAwsjson11_deserializeDocumentWafAction(&sv.DefaultAction, value); err != nil {
14002				return err
14003			}
14004
14005		case "MetricName":
14006			if value != nil {
14007				jtv, ok := value.(string)
14008				if !ok {
14009					return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
14010				}
14011				sv.MetricName = ptr.String(jtv)
14012			}
14013
14014		case "Name":
14015			if value != nil {
14016				jtv, ok := value.(string)
14017				if !ok {
14018					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
14019				}
14020				sv.Name = ptr.String(jtv)
14021			}
14022
14023		case "Rules":
14024			if err := awsAwsjson11_deserializeDocumentActivatedRules(&sv.Rules, value); err != nil {
14025				return err
14026			}
14027
14028		case "WebACLArn":
14029			if value != nil {
14030				jtv, ok := value.(string)
14031				if !ok {
14032					return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
14033				}
14034				sv.WebACLArn = ptr.String(jtv)
14035			}
14036
14037		case "WebACLId":
14038			if value != nil {
14039				jtv, ok := value.(string)
14040				if !ok {
14041					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
14042				}
14043				sv.WebACLId = ptr.String(jtv)
14044			}
14045
14046		default:
14047			_, _ = key, value
14048
14049		}
14050	}
14051	*v = sv
14052	return nil
14053}
14054
14055func awsAwsjson11_deserializeDocumentWebACLSummaries(v *[]types.WebACLSummary, value interface{}) error {
14056	if v == nil {
14057		return fmt.Errorf("unexpected nil of type %T", v)
14058	}
14059	if value == nil {
14060		return nil
14061	}
14062
14063	shape, ok := value.([]interface{})
14064	if !ok {
14065		return fmt.Errorf("unexpected JSON type %v", value)
14066	}
14067
14068	var cv []types.WebACLSummary
14069	if *v == nil {
14070		cv = []types.WebACLSummary{}
14071	} else {
14072		cv = *v
14073	}
14074
14075	for _, value := range shape {
14076		var col types.WebACLSummary
14077		destAddr := &col
14078		if err := awsAwsjson11_deserializeDocumentWebACLSummary(&destAddr, value); err != nil {
14079			return err
14080		}
14081		col = *destAddr
14082		cv = append(cv, col)
14083
14084	}
14085	*v = cv
14086	return nil
14087}
14088
14089func awsAwsjson11_deserializeDocumentWebACLSummary(v **types.WebACLSummary, value interface{}) error {
14090	if v == nil {
14091		return fmt.Errorf("unexpected nil of type %T", v)
14092	}
14093	if value == nil {
14094		return nil
14095	}
14096
14097	shape, ok := value.(map[string]interface{})
14098	if !ok {
14099		return fmt.Errorf("unexpected JSON type %v", value)
14100	}
14101
14102	var sv *types.WebACLSummary
14103	if *v == nil {
14104		sv = &types.WebACLSummary{}
14105	} else {
14106		sv = *v
14107	}
14108
14109	for key, value := range shape {
14110		switch key {
14111		case "Name":
14112			if value != nil {
14113				jtv, ok := value.(string)
14114				if !ok {
14115					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
14116				}
14117				sv.Name = ptr.String(jtv)
14118			}
14119
14120		case "WebACLId":
14121			if value != nil {
14122				jtv, ok := value.(string)
14123				if !ok {
14124					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
14125				}
14126				sv.WebACLId = ptr.String(jtv)
14127			}
14128
14129		default:
14130			_, _ = key, value
14131
14132		}
14133	}
14134	*v = sv
14135	return nil
14136}
14137
14138func awsAwsjson11_deserializeDocumentXssMatchSet(v **types.XssMatchSet, value interface{}) error {
14139	if v == nil {
14140		return fmt.Errorf("unexpected nil of type %T", v)
14141	}
14142	if value == nil {
14143		return nil
14144	}
14145
14146	shape, ok := value.(map[string]interface{})
14147	if !ok {
14148		return fmt.Errorf("unexpected JSON type %v", value)
14149	}
14150
14151	var sv *types.XssMatchSet
14152	if *v == nil {
14153		sv = &types.XssMatchSet{}
14154	} else {
14155		sv = *v
14156	}
14157
14158	for key, value := range shape {
14159		switch key {
14160		case "Name":
14161			if value != nil {
14162				jtv, ok := value.(string)
14163				if !ok {
14164					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
14165				}
14166				sv.Name = ptr.String(jtv)
14167			}
14168
14169		case "XssMatchSetId":
14170			if value != nil {
14171				jtv, ok := value.(string)
14172				if !ok {
14173					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
14174				}
14175				sv.XssMatchSetId = ptr.String(jtv)
14176			}
14177
14178		case "XssMatchTuples":
14179			if err := awsAwsjson11_deserializeDocumentXssMatchTuples(&sv.XssMatchTuples, value); err != nil {
14180				return err
14181			}
14182
14183		default:
14184			_, _ = key, value
14185
14186		}
14187	}
14188	*v = sv
14189	return nil
14190}
14191
14192func awsAwsjson11_deserializeDocumentXssMatchSetSummaries(v *[]types.XssMatchSetSummary, value interface{}) error {
14193	if v == nil {
14194		return fmt.Errorf("unexpected nil of type %T", v)
14195	}
14196	if value == nil {
14197		return nil
14198	}
14199
14200	shape, ok := value.([]interface{})
14201	if !ok {
14202		return fmt.Errorf("unexpected JSON type %v", value)
14203	}
14204
14205	var cv []types.XssMatchSetSummary
14206	if *v == nil {
14207		cv = []types.XssMatchSetSummary{}
14208	} else {
14209		cv = *v
14210	}
14211
14212	for _, value := range shape {
14213		var col types.XssMatchSetSummary
14214		destAddr := &col
14215		if err := awsAwsjson11_deserializeDocumentXssMatchSetSummary(&destAddr, value); err != nil {
14216			return err
14217		}
14218		col = *destAddr
14219		cv = append(cv, col)
14220
14221	}
14222	*v = cv
14223	return nil
14224}
14225
14226func awsAwsjson11_deserializeDocumentXssMatchSetSummary(v **types.XssMatchSetSummary, value interface{}) error {
14227	if v == nil {
14228		return fmt.Errorf("unexpected nil of type %T", v)
14229	}
14230	if value == nil {
14231		return nil
14232	}
14233
14234	shape, ok := value.(map[string]interface{})
14235	if !ok {
14236		return fmt.Errorf("unexpected JSON type %v", value)
14237	}
14238
14239	var sv *types.XssMatchSetSummary
14240	if *v == nil {
14241		sv = &types.XssMatchSetSummary{}
14242	} else {
14243		sv = *v
14244	}
14245
14246	for key, value := range shape {
14247		switch key {
14248		case "Name":
14249			if value != nil {
14250				jtv, ok := value.(string)
14251				if !ok {
14252					return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value)
14253				}
14254				sv.Name = ptr.String(jtv)
14255			}
14256
14257		case "XssMatchSetId":
14258			if value != nil {
14259				jtv, ok := value.(string)
14260				if !ok {
14261					return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
14262				}
14263				sv.XssMatchSetId = ptr.String(jtv)
14264			}
14265
14266		default:
14267			_, _ = key, value
14268
14269		}
14270	}
14271	*v = sv
14272	return nil
14273}
14274
14275func awsAwsjson11_deserializeDocumentXssMatchTuple(v **types.XssMatchTuple, value interface{}) error {
14276	if v == nil {
14277		return fmt.Errorf("unexpected nil of type %T", v)
14278	}
14279	if value == nil {
14280		return nil
14281	}
14282
14283	shape, ok := value.(map[string]interface{})
14284	if !ok {
14285		return fmt.Errorf("unexpected JSON type %v", value)
14286	}
14287
14288	var sv *types.XssMatchTuple
14289	if *v == nil {
14290		sv = &types.XssMatchTuple{}
14291	} else {
14292		sv = *v
14293	}
14294
14295	for key, value := range shape {
14296		switch key {
14297		case "FieldToMatch":
14298			if err := awsAwsjson11_deserializeDocumentFieldToMatch(&sv.FieldToMatch, value); err != nil {
14299				return err
14300			}
14301
14302		case "TextTransformation":
14303			if value != nil {
14304				jtv, ok := value.(string)
14305				if !ok {
14306					return fmt.Errorf("expected TextTransformation to be of type string, got %T instead", value)
14307				}
14308				sv.TextTransformation = types.TextTransformation(jtv)
14309			}
14310
14311		default:
14312			_, _ = key, value
14313
14314		}
14315	}
14316	*v = sv
14317	return nil
14318}
14319
14320func awsAwsjson11_deserializeDocumentXssMatchTuples(v *[]types.XssMatchTuple, value interface{}) error {
14321	if v == nil {
14322		return fmt.Errorf("unexpected nil of type %T", v)
14323	}
14324	if value == nil {
14325		return nil
14326	}
14327
14328	shape, ok := value.([]interface{})
14329	if !ok {
14330		return fmt.Errorf("unexpected JSON type %v", value)
14331	}
14332
14333	var cv []types.XssMatchTuple
14334	if *v == nil {
14335		cv = []types.XssMatchTuple{}
14336	} else {
14337		cv = *v
14338	}
14339
14340	for _, value := range shape {
14341		var col types.XssMatchTuple
14342		destAddr := &col
14343		if err := awsAwsjson11_deserializeDocumentXssMatchTuple(&destAddr, value); err != nil {
14344			return err
14345		}
14346		col = *destAddr
14347		cv = append(cv, col)
14348
14349	}
14350	*v = cv
14351	return nil
14352}
14353
14354func awsAwsjson11_deserializeOpDocumentCreateByteMatchSetOutput(v **CreateByteMatchSetOutput, value interface{}) error {
14355	if v == nil {
14356		return fmt.Errorf("unexpected nil of type %T", v)
14357	}
14358	if value == nil {
14359		return nil
14360	}
14361
14362	shape, ok := value.(map[string]interface{})
14363	if !ok {
14364		return fmt.Errorf("unexpected JSON type %v", value)
14365	}
14366
14367	var sv *CreateByteMatchSetOutput
14368	if *v == nil {
14369		sv = &CreateByteMatchSetOutput{}
14370	} else {
14371		sv = *v
14372	}
14373
14374	for key, value := range shape {
14375		switch key {
14376		case "ByteMatchSet":
14377			if err := awsAwsjson11_deserializeDocumentByteMatchSet(&sv.ByteMatchSet, value); err != nil {
14378				return err
14379			}
14380
14381		case "ChangeToken":
14382			if value != nil {
14383				jtv, ok := value.(string)
14384				if !ok {
14385					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14386				}
14387				sv.ChangeToken = ptr.String(jtv)
14388			}
14389
14390		default:
14391			_, _ = key, value
14392
14393		}
14394	}
14395	*v = sv
14396	return nil
14397}
14398
14399func awsAwsjson11_deserializeOpDocumentCreateGeoMatchSetOutput(v **CreateGeoMatchSetOutput, value interface{}) error {
14400	if v == nil {
14401		return fmt.Errorf("unexpected nil of type %T", v)
14402	}
14403	if value == nil {
14404		return nil
14405	}
14406
14407	shape, ok := value.(map[string]interface{})
14408	if !ok {
14409		return fmt.Errorf("unexpected JSON type %v", value)
14410	}
14411
14412	var sv *CreateGeoMatchSetOutput
14413	if *v == nil {
14414		sv = &CreateGeoMatchSetOutput{}
14415	} else {
14416		sv = *v
14417	}
14418
14419	for key, value := range shape {
14420		switch key {
14421		case "ChangeToken":
14422			if value != nil {
14423				jtv, ok := value.(string)
14424				if !ok {
14425					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14426				}
14427				sv.ChangeToken = ptr.String(jtv)
14428			}
14429
14430		case "GeoMatchSet":
14431			if err := awsAwsjson11_deserializeDocumentGeoMatchSet(&sv.GeoMatchSet, value); err != nil {
14432				return err
14433			}
14434
14435		default:
14436			_, _ = key, value
14437
14438		}
14439	}
14440	*v = sv
14441	return nil
14442}
14443
14444func awsAwsjson11_deserializeOpDocumentCreateIPSetOutput(v **CreateIPSetOutput, value interface{}) error {
14445	if v == nil {
14446		return fmt.Errorf("unexpected nil of type %T", v)
14447	}
14448	if value == nil {
14449		return nil
14450	}
14451
14452	shape, ok := value.(map[string]interface{})
14453	if !ok {
14454		return fmt.Errorf("unexpected JSON type %v", value)
14455	}
14456
14457	var sv *CreateIPSetOutput
14458	if *v == nil {
14459		sv = &CreateIPSetOutput{}
14460	} else {
14461		sv = *v
14462	}
14463
14464	for key, value := range shape {
14465		switch key {
14466		case "ChangeToken":
14467			if value != nil {
14468				jtv, ok := value.(string)
14469				if !ok {
14470					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14471				}
14472				sv.ChangeToken = ptr.String(jtv)
14473			}
14474
14475		case "IPSet":
14476			if err := awsAwsjson11_deserializeDocumentIPSet(&sv.IPSet, value); err != nil {
14477				return err
14478			}
14479
14480		default:
14481			_, _ = key, value
14482
14483		}
14484	}
14485	*v = sv
14486	return nil
14487}
14488
14489func awsAwsjson11_deserializeOpDocumentCreateRateBasedRuleOutput(v **CreateRateBasedRuleOutput, value interface{}) error {
14490	if v == nil {
14491		return fmt.Errorf("unexpected nil of type %T", v)
14492	}
14493	if value == nil {
14494		return nil
14495	}
14496
14497	shape, ok := value.(map[string]interface{})
14498	if !ok {
14499		return fmt.Errorf("unexpected JSON type %v", value)
14500	}
14501
14502	var sv *CreateRateBasedRuleOutput
14503	if *v == nil {
14504		sv = &CreateRateBasedRuleOutput{}
14505	} else {
14506		sv = *v
14507	}
14508
14509	for key, value := range shape {
14510		switch key {
14511		case "ChangeToken":
14512			if value != nil {
14513				jtv, ok := value.(string)
14514				if !ok {
14515					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14516				}
14517				sv.ChangeToken = ptr.String(jtv)
14518			}
14519
14520		case "Rule":
14521			if err := awsAwsjson11_deserializeDocumentRateBasedRule(&sv.Rule, value); err != nil {
14522				return err
14523			}
14524
14525		default:
14526			_, _ = key, value
14527
14528		}
14529	}
14530	*v = sv
14531	return nil
14532}
14533
14534func awsAwsjson11_deserializeOpDocumentCreateRegexMatchSetOutput(v **CreateRegexMatchSetOutput, value interface{}) error {
14535	if v == nil {
14536		return fmt.Errorf("unexpected nil of type %T", v)
14537	}
14538	if value == nil {
14539		return nil
14540	}
14541
14542	shape, ok := value.(map[string]interface{})
14543	if !ok {
14544		return fmt.Errorf("unexpected JSON type %v", value)
14545	}
14546
14547	var sv *CreateRegexMatchSetOutput
14548	if *v == nil {
14549		sv = &CreateRegexMatchSetOutput{}
14550	} else {
14551		sv = *v
14552	}
14553
14554	for key, value := range shape {
14555		switch key {
14556		case "ChangeToken":
14557			if value != nil {
14558				jtv, ok := value.(string)
14559				if !ok {
14560					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14561				}
14562				sv.ChangeToken = ptr.String(jtv)
14563			}
14564
14565		case "RegexMatchSet":
14566			if err := awsAwsjson11_deserializeDocumentRegexMatchSet(&sv.RegexMatchSet, value); err != nil {
14567				return err
14568			}
14569
14570		default:
14571			_, _ = key, value
14572
14573		}
14574	}
14575	*v = sv
14576	return nil
14577}
14578
14579func awsAwsjson11_deserializeOpDocumentCreateRegexPatternSetOutput(v **CreateRegexPatternSetOutput, value interface{}) error {
14580	if v == nil {
14581		return fmt.Errorf("unexpected nil of type %T", v)
14582	}
14583	if value == nil {
14584		return nil
14585	}
14586
14587	shape, ok := value.(map[string]interface{})
14588	if !ok {
14589		return fmt.Errorf("unexpected JSON type %v", value)
14590	}
14591
14592	var sv *CreateRegexPatternSetOutput
14593	if *v == nil {
14594		sv = &CreateRegexPatternSetOutput{}
14595	} else {
14596		sv = *v
14597	}
14598
14599	for key, value := range shape {
14600		switch key {
14601		case "ChangeToken":
14602			if value != nil {
14603				jtv, ok := value.(string)
14604				if !ok {
14605					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14606				}
14607				sv.ChangeToken = ptr.String(jtv)
14608			}
14609
14610		case "RegexPatternSet":
14611			if err := awsAwsjson11_deserializeDocumentRegexPatternSet(&sv.RegexPatternSet, value); err != nil {
14612				return err
14613			}
14614
14615		default:
14616			_, _ = key, value
14617
14618		}
14619	}
14620	*v = sv
14621	return nil
14622}
14623
14624func awsAwsjson11_deserializeOpDocumentCreateRuleGroupOutput(v **CreateRuleGroupOutput, value interface{}) error {
14625	if v == nil {
14626		return fmt.Errorf("unexpected nil of type %T", v)
14627	}
14628	if value == nil {
14629		return nil
14630	}
14631
14632	shape, ok := value.(map[string]interface{})
14633	if !ok {
14634		return fmt.Errorf("unexpected JSON type %v", value)
14635	}
14636
14637	var sv *CreateRuleGroupOutput
14638	if *v == nil {
14639		sv = &CreateRuleGroupOutput{}
14640	} else {
14641		sv = *v
14642	}
14643
14644	for key, value := range shape {
14645		switch key {
14646		case "ChangeToken":
14647			if value != nil {
14648				jtv, ok := value.(string)
14649				if !ok {
14650					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14651				}
14652				sv.ChangeToken = ptr.String(jtv)
14653			}
14654
14655		case "RuleGroup":
14656			if err := awsAwsjson11_deserializeDocumentRuleGroup(&sv.RuleGroup, value); err != nil {
14657				return err
14658			}
14659
14660		default:
14661			_, _ = key, value
14662
14663		}
14664	}
14665	*v = sv
14666	return nil
14667}
14668
14669func awsAwsjson11_deserializeOpDocumentCreateRuleOutput(v **CreateRuleOutput, value interface{}) error {
14670	if v == nil {
14671		return fmt.Errorf("unexpected nil of type %T", v)
14672	}
14673	if value == nil {
14674		return nil
14675	}
14676
14677	shape, ok := value.(map[string]interface{})
14678	if !ok {
14679		return fmt.Errorf("unexpected JSON type %v", value)
14680	}
14681
14682	var sv *CreateRuleOutput
14683	if *v == nil {
14684		sv = &CreateRuleOutput{}
14685	} else {
14686		sv = *v
14687	}
14688
14689	for key, value := range shape {
14690		switch key {
14691		case "ChangeToken":
14692			if value != nil {
14693				jtv, ok := value.(string)
14694				if !ok {
14695					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14696				}
14697				sv.ChangeToken = ptr.String(jtv)
14698			}
14699
14700		case "Rule":
14701			if err := awsAwsjson11_deserializeDocumentRule(&sv.Rule, value); err != nil {
14702				return err
14703			}
14704
14705		default:
14706			_, _ = key, value
14707
14708		}
14709	}
14710	*v = sv
14711	return nil
14712}
14713
14714func awsAwsjson11_deserializeOpDocumentCreateSizeConstraintSetOutput(v **CreateSizeConstraintSetOutput, value interface{}) error {
14715	if v == nil {
14716		return fmt.Errorf("unexpected nil of type %T", v)
14717	}
14718	if value == nil {
14719		return nil
14720	}
14721
14722	shape, ok := value.(map[string]interface{})
14723	if !ok {
14724		return fmt.Errorf("unexpected JSON type %v", value)
14725	}
14726
14727	var sv *CreateSizeConstraintSetOutput
14728	if *v == nil {
14729		sv = &CreateSizeConstraintSetOutput{}
14730	} else {
14731		sv = *v
14732	}
14733
14734	for key, value := range shape {
14735		switch key {
14736		case "ChangeToken":
14737			if value != nil {
14738				jtv, ok := value.(string)
14739				if !ok {
14740					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14741				}
14742				sv.ChangeToken = ptr.String(jtv)
14743			}
14744
14745		case "SizeConstraintSet":
14746			if err := awsAwsjson11_deserializeDocumentSizeConstraintSet(&sv.SizeConstraintSet, value); err != nil {
14747				return err
14748			}
14749
14750		default:
14751			_, _ = key, value
14752
14753		}
14754	}
14755	*v = sv
14756	return nil
14757}
14758
14759func awsAwsjson11_deserializeOpDocumentCreateSqlInjectionMatchSetOutput(v **CreateSqlInjectionMatchSetOutput, value interface{}) error {
14760	if v == nil {
14761		return fmt.Errorf("unexpected nil of type %T", v)
14762	}
14763	if value == nil {
14764		return nil
14765	}
14766
14767	shape, ok := value.(map[string]interface{})
14768	if !ok {
14769		return fmt.Errorf("unexpected JSON type %v", value)
14770	}
14771
14772	var sv *CreateSqlInjectionMatchSetOutput
14773	if *v == nil {
14774		sv = &CreateSqlInjectionMatchSetOutput{}
14775	} else {
14776		sv = *v
14777	}
14778
14779	for key, value := range shape {
14780		switch key {
14781		case "ChangeToken":
14782			if value != nil {
14783				jtv, ok := value.(string)
14784				if !ok {
14785					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14786				}
14787				sv.ChangeToken = ptr.String(jtv)
14788			}
14789
14790		case "SqlInjectionMatchSet":
14791			if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(&sv.SqlInjectionMatchSet, value); err != nil {
14792				return err
14793			}
14794
14795		default:
14796			_, _ = key, value
14797
14798		}
14799	}
14800	*v = sv
14801	return nil
14802}
14803
14804func awsAwsjson11_deserializeOpDocumentCreateWebACLMigrationStackOutput(v **CreateWebACLMigrationStackOutput, value interface{}) error {
14805	if v == nil {
14806		return fmt.Errorf("unexpected nil of type %T", v)
14807	}
14808	if value == nil {
14809		return nil
14810	}
14811
14812	shape, ok := value.(map[string]interface{})
14813	if !ok {
14814		return fmt.Errorf("unexpected JSON type %v", value)
14815	}
14816
14817	var sv *CreateWebACLMigrationStackOutput
14818	if *v == nil {
14819		sv = &CreateWebACLMigrationStackOutput{}
14820	} else {
14821		sv = *v
14822	}
14823
14824	for key, value := range shape {
14825		switch key {
14826		case "S3ObjectUrl":
14827			if value != nil {
14828				jtv, ok := value.(string)
14829				if !ok {
14830					return fmt.Errorf("expected S3ObjectUrl to be of type string, got %T instead", value)
14831				}
14832				sv.S3ObjectUrl = ptr.String(jtv)
14833			}
14834
14835		default:
14836			_, _ = key, value
14837
14838		}
14839	}
14840	*v = sv
14841	return nil
14842}
14843
14844func awsAwsjson11_deserializeOpDocumentCreateWebACLOutput(v **CreateWebACLOutput, value interface{}) error {
14845	if v == nil {
14846		return fmt.Errorf("unexpected nil of type %T", v)
14847	}
14848	if value == nil {
14849		return nil
14850	}
14851
14852	shape, ok := value.(map[string]interface{})
14853	if !ok {
14854		return fmt.Errorf("unexpected JSON type %v", value)
14855	}
14856
14857	var sv *CreateWebACLOutput
14858	if *v == nil {
14859		sv = &CreateWebACLOutput{}
14860	} else {
14861		sv = *v
14862	}
14863
14864	for key, value := range shape {
14865		switch key {
14866		case "ChangeToken":
14867			if value != nil {
14868				jtv, ok := value.(string)
14869				if !ok {
14870					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14871				}
14872				sv.ChangeToken = ptr.String(jtv)
14873			}
14874
14875		case "WebACL":
14876			if err := awsAwsjson11_deserializeDocumentWebACL(&sv.WebACL, value); err != nil {
14877				return err
14878			}
14879
14880		default:
14881			_, _ = key, value
14882
14883		}
14884	}
14885	*v = sv
14886	return nil
14887}
14888
14889func awsAwsjson11_deserializeOpDocumentCreateXssMatchSetOutput(v **CreateXssMatchSetOutput, value interface{}) error {
14890	if v == nil {
14891		return fmt.Errorf("unexpected nil of type %T", v)
14892	}
14893	if value == nil {
14894		return nil
14895	}
14896
14897	shape, ok := value.(map[string]interface{})
14898	if !ok {
14899		return fmt.Errorf("unexpected JSON type %v", value)
14900	}
14901
14902	var sv *CreateXssMatchSetOutput
14903	if *v == nil {
14904		sv = &CreateXssMatchSetOutput{}
14905	} else {
14906		sv = *v
14907	}
14908
14909	for key, value := range shape {
14910		switch key {
14911		case "ChangeToken":
14912			if value != nil {
14913				jtv, ok := value.(string)
14914				if !ok {
14915					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14916				}
14917				sv.ChangeToken = ptr.String(jtv)
14918			}
14919
14920		case "XssMatchSet":
14921			if err := awsAwsjson11_deserializeDocumentXssMatchSet(&sv.XssMatchSet, value); err != nil {
14922				return err
14923			}
14924
14925		default:
14926			_, _ = key, value
14927
14928		}
14929	}
14930	*v = sv
14931	return nil
14932}
14933
14934func awsAwsjson11_deserializeOpDocumentDeleteByteMatchSetOutput(v **DeleteByteMatchSetOutput, value interface{}) error {
14935	if v == nil {
14936		return fmt.Errorf("unexpected nil of type %T", v)
14937	}
14938	if value == nil {
14939		return nil
14940	}
14941
14942	shape, ok := value.(map[string]interface{})
14943	if !ok {
14944		return fmt.Errorf("unexpected JSON type %v", value)
14945	}
14946
14947	var sv *DeleteByteMatchSetOutput
14948	if *v == nil {
14949		sv = &DeleteByteMatchSetOutput{}
14950	} else {
14951		sv = *v
14952	}
14953
14954	for key, value := range shape {
14955		switch key {
14956		case "ChangeToken":
14957			if value != nil {
14958				jtv, ok := value.(string)
14959				if !ok {
14960					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
14961				}
14962				sv.ChangeToken = ptr.String(jtv)
14963			}
14964
14965		default:
14966			_, _ = key, value
14967
14968		}
14969	}
14970	*v = sv
14971	return nil
14972}
14973
14974func awsAwsjson11_deserializeOpDocumentDeleteGeoMatchSetOutput(v **DeleteGeoMatchSetOutput, value interface{}) error {
14975	if v == nil {
14976		return fmt.Errorf("unexpected nil of type %T", v)
14977	}
14978	if value == nil {
14979		return nil
14980	}
14981
14982	shape, ok := value.(map[string]interface{})
14983	if !ok {
14984		return fmt.Errorf("unexpected JSON type %v", value)
14985	}
14986
14987	var sv *DeleteGeoMatchSetOutput
14988	if *v == nil {
14989		sv = &DeleteGeoMatchSetOutput{}
14990	} else {
14991		sv = *v
14992	}
14993
14994	for key, value := range shape {
14995		switch key {
14996		case "ChangeToken":
14997			if value != nil {
14998				jtv, ok := value.(string)
14999				if !ok {
15000					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15001				}
15002				sv.ChangeToken = ptr.String(jtv)
15003			}
15004
15005		default:
15006			_, _ = key, value
15007
15008		}
15009	}
15010	*v = sv
15011	return nil
15012}
15013
15014func awsAwsjson11_deserializeOpDocumentDeleteIPSetOutput(v **DeleteIPSetOutput, value interface{}) error {
15015	if v == nil {
15016		return fmt.Errorf("unexpected nil of type %T", v)
15017	}
15018	if value == nil {
15019		return nil
15020	}
15021
15022	shape, ok := value.(map[string]interface{})
15023	if !ok {
15024		return fmt.Errorf("unexpected JSON type %v", value)
15025	}
15026
15027	var sv *DeleteIPSetOutput
15028	if *v == nil {
15029		sv = &DeleteIPSetOutput{}
15030	} else {
15031		sv = *v
15032	}
15033
15034	for key, value := range shape {
15035		switch key {
15036		case "ChangeToken":
15037			if value != nil {
15038				jtv, ok := value.(string)
15039				if !ok {
15040					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15041				}
15042				sv.ChangeToken = ptr.String(jtv)
15043			}
15044
15045		default:
15046			_, _ = key, value
15047
15048		}
15049	}
15050	*v = sv
15051	return nil
15052}
15053
15054func awsAwsjson11_deserializeOpDocumentDeleteLoggingConfigurationOutput(v **DeleteLoggingConfigurationOutput, value interface{}) error {
15055	if v == nil {
15056		return fmt.Errorf("unexpected nil of type %T", v)
15057	}
15058	if value == nil {
15059		return nil
15060	}
15061
15062	shape, ok := value.(map[string]interface{})
15063	if !ok {
15064		return fmt.Errorf("unexpected JSON type %v", value)
15065	}
15066
15067	var sv *DeleteLoggingConfigurationOutput
15068	if *v == nil {
15069		sv = &DeleteLoggingConfigurationOutput{}
15070	} else {
15071		sv = *v
15072	}
15073
15074	for key, value := range shape {
15075		switch key {
15076		default:
15077			_, _ = key, value
15078
15079		}
15080	}
15081	*v = sv
15082	return nil
15083}
15084
15085func awsAwsjson11_deserializeOpDocumentDeletePermissionPolicyOutput(v **DeletePermissionPolicyOutput, value interface{}) error {
15086	if v == nil {
15087		return fmt.Errorf("unexpected nil of type %T", v)
15088	}
15089	if value == nil {
15090		return nil
15091	}
15092
15093	shape, ok := value.(map[string]interface{})
15094	if !ok {
15095		return fmt.Errorf("unexpected JSON type %v", value)
15096	}
15097
15098	var sv *DeletePermissionPolicyOutput
15099	if *v == nil {
15100		sv = &DeletePermissionPolicyOutput{}
15101	} else {
15102		sv = *v
15103	}
15104
15105	for key, value := range shape {
15106		switch key {
15107		default:
15108			_, _ = key, value
15109
15110		}
15111	}
15112	*v = sv
15113	return nil
15114}
15115
15116func awsAwsjson11_deserializeOpDocumentDeleteRateBasedRuleOutput(v **DeleteRateBasedRuleOutput, value interface{}) error {
15117	if v == nil {
15118		return fmt.Errorf("unexpected nil of type %T", v)
15119	}
15120	if value == nil {
15121		return nil
15122	}
15123
15124	shape, ok := value.(map[string]interface{})
15125	if !ok {
15126		return fmt.Errorf("unexpected JSON type %v", value)
15127	}
15128
15129	var sv *DeleteRateBasedRuleOutput
15130	if *v == nil {
15131		sv = &DeleteRateBasedRuleOutput{}
15132	} else {
15133		sv = *v
15134	}
15135
15136	for key, value := range shape {
15137		switch key {
15138		case "ChangeToken":
15139			if value != nil {
15140				jtv, ok := value.(string)
15141				if !ok {
15142					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15143				}
15144				sv.ChangeToken = ptr.String(jtv)
15145			}
15146
15147		default:
15148			_, _ = key, value
15149
15150		}
15151	}
15152	*v = sv
15153	return nil
15154}
15155
15156func awsAwsjson11_deserializeOpDocumentDeleteRegexMatchSetOutput(v **DeleteRegexMatchSetOutput, value interface{}) error {
15157	if v == nil {
15158		return fmt.Errorf("unexpected nil of type %T", v)
15159	}
15160	if value == nil {
15161		return nil
15162	}
15163
15164	shape, ok := value.(map[string]interface{})
15165	if !ok {
15166		return fmt.Errorf("unexpected JSON type %v", value)
15167	}
15168
15169	var sv *DeleteRegexMatchSetOutput
15170	if *v == nil {
15171		sv = &DeleteRegexMatchSetOutput{}
15172	} else {
15173		sv = *v
15174	}
15175
15176	for key, value := range shape {
15177		switch key {
15178		case "ChangeToken":
15179			if value != nil {
15180				jtv, ok := value.(string)
15181				if !ok {
15182					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15183				}
15184				sv.ChangeToken = ptr.String(jtv)
15185			}
15186
15187		default:
15188			_, _ = key, value
15189
15190		}
15191	}
15192	*v = sv
15193	return nil
15194}
15195
15196func awsAwsjson11_deserializeOpDocumentDeleteRegexPatternSetOutput(v **DeleteRegexPatternSetOutput, value interface{}) error {
15197	if v == nil {
15198		return fmt.Errorf("unexpected nil of type %T", v)
15199	}
15200	if value == nil {
15201		return nil
15202	}
15203
15204	shape, ok := value.(map[string]interface{})
15205	if !ok {
15206		return fmt.Errorf("unexpected JSON type %v", value)
15207	}
15208
15209	var sv *DeleteRegexPatternSetOutput
15210	if *v == nil {
15211		sv = &DeleteRegexPatternSetOutput{}
15212	} else {
15213		sv = *v
15214	}
15215
15216	for key, value := range shape {
15217		switch key {
15218		case "ChangeToken":
15219			if value != nil {
15220				jtv, ok := value.(string)
15221				if !ok {
15222					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15223				}
15224				sv.ChangeToken = ptr.String(jtv)
15225			}
15226
15227		default:
15228			_, _ = key, value
15229
15230		}
15231	}
15232	*v = sv
15233	return nil
15234}
15235
15236func awsAwsjson11_deserializeOpDocumentDeleteRuleGroupOutput(v **DeleteRuleGroupOutput, value interface{}) error {
15237	if v == nil {
15238		return fmt.Errorf("unexpected nil of type %T", v)
15239	}
15240	if value == nil {
15241		return nil
15242	}
15243
15244	shape, ok := value.(map[string]interface{})
15245	if !ok {
15246		return fmt.Errorf("unexpected JSON type %v", value)
15247	}
15248
15249	var sv *DeleteRuleGroupOutput
15250	if *v == nil {
15251		sv = &DeleteRuleGroupOutput{}
15252	} else {
15253		sv = *v
15254	}
15255
15256	for key, value := range shape {
15257		switch key {
15258		case "ChangeToken":
15259			if value != nil {
15260				jtv, ok := value.(string)
15261				if !ok {
15262					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15263				}
15264				sv.ChangeToken = ptr.String(jtv)
15265			}
15266
15267		default:
15268			_, _ = key, value
15269
15270		}
15271	}
15272	*v = sv
15273	return nil
15274}
15275
15276func awsAwsjson11_deserializeOpDocumentDeleteRuleOutput(v **DeleteRuleOutput, value interface{}) error {
15277	if v == nil {
15278		return fmt.Errorf("unexpected nil of type %T", v)
15279	}
15280	if value == nil {
15281		return nil
15282	}
15283
15284	shape, ok := value.(map[string]interface{})
15285	if !ok {
15286		return fmt.Errorf("unexpected JSON type %v", value)
15287	}
15288
15289	var sv *DeleteRuleOutput
15290	if *v == nil {
15291		sv = &DeleteRuleOutput{}
15292	} else {
15293		sv = *v
15294	}
15295
15296	for key, value := range shape {
15297		switch key {
15298		case "ChangeToken":
15299			if value != nil {
15300				jtv, ok := value.(string)
15301				if !ok {
15302					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15303				}
15304				sv.ChangeToken = ptr.String(jtv)
15305			}
15306
15307		default:
15308			_, _ = key, value
15309
15310		}
15311	}
15312	*v = sv
15313	return nil
15314}
15315
15316func awsAwsjson11_deserializeOpDocumentDeleteSizeConstraintSetOutput(v **DeleteSizeConstraintSetOutput, value interface{}) error {
15317	if v == nil {
15318		return fmt.Errorf("unexpected nil of type %T", v)
15319	}
15320	if value == nil {
15321		return nil
15322	}
15323
15324	shape, ok := value.(map[string]interface{})
15325	if !ok {
15326		return fmt.Errorf("unexpected JSON type %v", value)
15327	}
15328
15329	var sv *DeleteSizeConstraintSetOutput
15330	if *v == nil {
15331		sv = &DeleteSizeConstraintSetOutput{}
15332	} else {
15333		sv = *v
15334	}
15335
15336	for key, value := range shape {
15337		switch key {
15338		case "ChangeToken":
15339			if value != nil {
15340				jtv, ok := value.(string)
15341				if !ok {
15342					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15343				}
15344				sv.ChangeToken = ptr.String(jtv)
15345			}
15346
15347		default:
15348			_, _ = key, value
15349
15350		}
15351	}
15352	*v = sv
15353	return nil
15354}
15355
15356func awsAwsjson11_deserializeOpDocumentDeleteSqlInjectionMatchSetOutput(v **DeleteSqlInjectionMatchSetOutput, value interface{}) error {
15357	if v == nil {
15358		return fmt.Errorf("unexpected nil of type %T", v)
15359	}
15360	if value == nil {
15361		return nil
15362	}
15363
15364	shape, ok := value.(map[string]interface{})
15365	if !ok {
15366		return fmt.Errorf("unexpected JSON type %v", value)
15367	}
15368
15369	var sv *DeleteSqlInjectionMatchSetOutput
15370	if *v == nil {
15371		sv = &DeleteSqlInjectionMatchSetOutput{}
15372	} else {
15373		sv = *v
15374	}
15375
15376	for key, value := range shape {
15377		switch key {
15378		case "ChangeToken":
15379			if value != nil {
15380				jtv, ok := value.(string)
15381				if !ok {
15382					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15383				}
15384				sv.ChangeToken = ptr.String(jtv)
15385			}
15386
15387		default:
15388			_, _ = key, value
15389
15390		}
15391	}
15392	*v = sv
15393	return nil
15394}
15395
15396func awsAwsjson11_deserializeOpDocumentDeleteWebACLOutput(v **DeleteWebACLOutput, value interface{}) error {
15397	if v == nil {
15398		return fmt.Errorf("unexpected nil of type %T", v)
15399	}
15400	if value == nil {
15401		return nil
15402	}
15403
15404	shape, ok := value.(map[string]interface{})
15405	if !ok {
15406		return fmt.Errorf("unexpected JSON type %v", value)
15407	}
15408
15409	var sv *DeleteWebACLOutput
15410	if *v == nil {
15411		sv = &DeleteWebACLOutput{}
15412	} else {
15413		sv = *v
15414	}
15415
15416	for key, value := range shape {
15417		switch key {
15418		case "ChangeToken":
15419			if value != nil {
15420				jtv, ok := value.(string)
15421				if !ok {
15422					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15423				}
15424				sv.ChangeToken = ptr.String(jtv)
15425			}
15426
15427		default:
15428			_, _ = key, value
15429
15430		}
15431	}
15432	*v = sv
15433	return nil
15434}
15435
15436func awsAwsjson11_deserializeOpDocumentDeleteXssMatchSetOutput(v **DeleteXssMatchSetOutput, value interface{}) error {
15437	if v == nil {
15438		return fmt.Errorf("unexpected nil of type %T", v)
15439	}
15440	if value == nil {
15441		return nil
15442	}
15443
15444	shape, ok := value.(map[string]interface{})
15445	if !ok {
15446		return fmt.Errorf("unexpected JSON type %v", value)
15447	}
15448
15449	var sv *DeleteXssMatchSetOutput
15450	if *v == nil {
15451		sv = &DeleteXssMatchSetOutput{}
15452	} else {
15453		sv = *v
15454	}
15455
15456	for key, value := range shape {
15457		switch key {
15458		case "ChangeToken":
15459			if value != nil {
15460				jtv, ok := value.(string)
15461				if !ok {
15462					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15463				}
15464				sv.ChangeToken = ptr.String(jtv)
15465			}
15466
15467		default:
15468			_, _ = key, value
15469
15470		}
15471	}
15472	*v = sv
15473	return nil
15474}
15475
15476func awsAwsjson11_deserializeOpDocumentGetByteMatchSetOutput(v **GetByteMatchSetOutput, value interface{}) error {
15477	if v == nil {
15478		return fmt.Errorf("unexpected nil of type %T", v)
15479	}
15480	if value == nil {
15481		return nil
15482	}
15483
15484	shape, ok := value.(map[string]interface{})
15485	if !ok {
15486		return fmt.Errorf("unexpected JSON type %v", value)
15487	}
15488
15489	var sv *GetByteMatchSetOutput
15490	if *v == nil {
15491		sv = &GetByteMatchSetOutput{}
15492	} else {
15493		sv = *v
15494	}
15495
15496	for key, value := range shape {
15497		switch key {
15498		case "ByteMatchSet":
15499			if err := awsAwsjson11_deserializeDocumentByteMatchSet(&sv.ByteMatchSet, value); err != nil {
15500				return err
15501			}
15502
15503		default:
15504			_, _ = key, value
15505
15506		}
15507	}
15508	*v = sv
15509	return nil
15510}
15511
15512func awsAwsjson11_deserializeOpDocumentGetChangeTokenOutput(v **GetChangeTokenOutput, value interface{}) error {
15513	if v == nil {
15514		return fmt.Errorf("unexpected nil of type %T", v)
15515	}
15516	if value == nil {
15517		return nil
15518	}
15519
15520	shape, ok := value.(map[string]interface{})
15521	if !ok {
15522		return fmt.Errorf("unexpected JSON type %v", value)
15523	}
15524
15525	var sv *GetChangeTokenOutput
15526	if *v == nil {
15527		sv = &GetChangeTokenOutput{}
15528	} else {
15529		sv = *v
15530	}
15531
15532	for key, value := range shape {
15533		switch key {
15534		case "ChangeToken":
15535			if value != nil {
15536				jtv, ok := value.(string)
15537				if !ok {
15538					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
15539				}
15540				sv.ChangeToken = ptr.String(jtv)
15541			}
15542
15543		default:
15544			_, _ = key, value
15545
15546		}
15547	}
15548	*v = sv
15549	return nil
15550}
15551
15552func awsAwsjson11_deserializeOpDocumentGetChangeTokenStatusOutput(v **GetChangeTokenStatusOutput, value interface{}) error {
15553	if v == nil {
15554		return fmt.Errorf("unexpected nil of type %T", v)
15555	}
15556	if value == nil {
15557		return nil
15558	}
15559
15560	shape, ok := value.(map[string]interface{})
15561	if !ok {
15562		return fmt.Errorf("unexpected JSON type %v", value)
15563	}
15564
15565	var sv *GetChangeTokenStatusOutput
15566	if *v == nil {
15567		sv = &GetChangeTokenStatusOutput{}
15568	} else {
15569		sv = *v
15570	}
15571
15572	for key, value := range shape {
15573		switch key {
15574		case "ChangeTokenStatus":
15575			if value != nil {
15576				jtv, ok := value.(string)
15577				if !ok {
15578					return fmt.Errorf("expected ChangeTokenStatus to be of type string, got %T instead", value)
15579				}
15580				sv.ChangeTokenStatus = types.ChangeTokenStatus(jtv)
15581			}
15582
15583		default:
15584			_, _ = key, value
15585
15586		}
15587	}
15588	*v = sv
15589	return nil
15590}
15591
15592func awsAwsjson11_deserializeOpDocumentGetGeoMatchSetOutput(v **GetGeoMatchSetOutput, value interface{}) error {
15593	if v == nil {
15594		return fmt.Errorf("unexpected nil of type %T", v)
15595	}
15596	if value == nil {
15597		return nil
15598	}
15599
15600	shape, ok := value.(map[string]interface{})
15601	if !ok {
15602		return fmt.Errorf("unexpected JSON type %v", value)
15603	}
15604
15605	var sv *GetGeoMatchSetOutput
15606	if *v == nil {
15607		sv = &GetGeoMatchSetOutput{}
15608	} else {
15609		sv = *v
15610	}
15611
15612	for key, value := range shape {
15613		switch key {
15614		case "GeoMatchSet":
15615			if err := awsAwsjson11_deserializeDocumentGeoMatchSet(&sv.GeoMatchSet, value); err != nil {
15616				return err
15617			}
15618
15619		default:
15620			_, _ = key, value
15621
15622		}
15623	}
15624	*v = sv
15625	return nil
15626}
15627
15628func awsAwsjson11_deserializeOpDocumentGetIPSetOutput(v **GetIPSetOutput, value interface{}) error {
15629	if v == nil {
15630		return fmt.Errorf("unexpected nil of type %T", v)
15631	}
15632	if value == nil {
15633		return nil
15634	}
15635
15636	shape, ok := value.(map[string]interface{})
15637	if !ok {
15638		return fmt.Errorf("unexpected JSON type %v", value)
15639	}
15640
15641	var sv *GetIPSetOutput
15642	if *v == nil {
15643		sv = &GetIPSetOutput{}
15644	} else {
15645		sv = *v
15646	}
15647
15648	for key, value := range shape {
15649		switch key {
15650		case "IPSet":
15651			if err := awsAwsjson11_deserializeDocumentIPSet(&sv.IPSet, value); err != nil {
15652				return err
15653			}
15654
15655		default:
15656			_, _ = key, value
15657
15658		}
15659	}
15660	*v = sv
15661	return nil
15662}
15663
15664func awsAwsjson11_deserializeOpDocumentGetLoggingConfigurationOutput(v **GetLoggingConfigurationOutput, value interface{}) error {
15665	if v == nil {
15666		return fmt.Errorf("unexpected nil of type %T", v)
15667	}
15668	if value == nil {
15669		return nil
15670	}
15671
15672	shape, ok := value.(map[string]interface{})
15673	if !ok {
15674		return fmt.Errorf("unexpected JSON type %v", value)
15675	}
15676
15677	var sv *GetLoggingConfigurationOutput
15678	if *v == nil {
15679		sv = &GetLoggingConfigurationOutput{}
15680	} else {
15681		sv = *v
15682	}
15683
15684	for key, value := range shape {
15685		switch key {
15686		case "LoggingConfiguration":
15687			if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil {
15688				return err
15689			}
15690
15691		default:
15692			_, _ = key, value
15693
15694		}
15695	}
15696	*v = sv
15697	return nil
15698}
15699
15700func awsAwsjson11_deserializeOpDocumentGetPermissionPolicyOutput(v **GetPermissionPolicyOutput, value interface{}) error {
15701	if v == nil {
15702		return fmt.Errorf("unexpected nil of type %T", v)
15703	}
15704	if value == nil {
15705		return nil
15706	}
15707
15708	shape, ok := value.(map[string]interface{})
15709	if !ok {
15710		return fmt.Errorf("unexpected JSON type %v", value)
15711	}
15712
15713	var sv *GetPermissionPolicyOutput
15714	if *v == nil {
15715		sv = &GetPermissionPolicyOutput{}
15716	} else {
15717		sv = *v
15718	}
15719
15720	for key, value := range shape {
15721		switch key {
15722		case "Policy":
15723			if value != nil {
15724				jtv, ok := value.(string)
15725				if !ok {
15726					return fmt.Errorf("expected PolicyString to be of type string, got %T instead", value)
15727				}
15728				sv.Policy = ptr.String(jtv)
15729			}
15730
15731		default:
15732			_, _ = key, value
15733
15734		}
15735	}
15736	*v = sv
15737	return nil
15738}
15739
15740func awsAwsjson11_deserializeOpDocumentGetRateBasedRuleManagedKeysOutput(v **GetRateBasedRuleManagedKeysOutput, value interface{}) error {
15741	if v == nil {
15742		return fmt.Errorf("unexpected nil of type %T", v)
15743	}
15744	if value == nil {
15745		return nil
15746	}
15747
15748	shape, ok := value.(map[string]interface{})
15749	if !ok {
15750		return fmt.Errorf("unexpected JSON type %v", value)
15751	}
15752
15753	var sv *GetRateBasedRuleManagedKeysOutput
15754	if *v == nil {
15755		sv = &GetRateBasedRuleManagedKeysOutput{}
15756	} else {
15757		sv = *v
15758	}
15759
15760	for key, value := range shape {
15761		switch key {
15762		case "ManagedKeys":
15763			if err := awsAwsjson11_deserializeDocumentManagedKeys(&sv.ManagedKeys, value); err != nil {
15764				return err
15765			}
15766
15767		case "NextMarker":
15768			if value != nil {
15769				jtv, ok := value.(string)
15770				if !ok {
15771					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
15772				}
15773				sv.NextMarker = ptr.String(jtv)
15774			}
15775
15776		default:
15777			_, _ = key, value
15778
15779		}
15780	}
15781	*v = sv
15782	return nil
15783}
15784
15785func awsAwsjson11_deserializeOpDocumentGetRateBasedRuleOutput(v **GetRateBasedRuleOutput, value interface{}) error {
15786	if v == nil {
15787		return fmt.Errorf("unexpected nil of type %T", v)
15788	}
15789	if value == nil {
15790		return nil
15791	}
15792
15793	shape, ok := value.(map[string]interface{})
15794	if !ok {
15795		return fmt.Errorf("unexpected JSON type %v", value)
15796	}
15797
15798	var sv *GetRateBasedRuleOutput
15799	if *v == nil {
15800		sv = &GetRateBasedRuleOutput{}
15801	} else {
15802		sv = *v
15803	}
15804
15805	for key, value := range shape {
15806		switch key {
15807		case "Rule":
15808			if err := awsAwsjson11_deserializeDocumentRateBasedRule(&sv.Rule, value); err != nil {
15809				return err
15810			}
15811
15812		default:
15813			_, _ = key, value
15814
15815		}
15816	}
15817	*v = sv
15818	return nil
15819}
15820
15821func awsAwsjson11_deserializeOpDocumentGetRegexMatchSetOutput(v **GetRegexMatchSetOutput, value interface{}) error {
15822	if v == nil {
15823		return fmt.Errorf("unexpected nil of type %T", v)
15824	}
15825	if value == nil {
15826		return nil
15827	}
15828
15829	shape, ok := value.(map[string]interface{})
15830	if !ok {
15831		return fmt.Errorf("unexpected JSON type %v", value)
15832	}
15833
15834	var sv *GetRegexMatchSetOutput
15835	if *v == nil {
15836		sv = &GetRegexMatchSetOutput{}
15837	} else {
15838		sv = *v
15839	}
15840
15841	for key, value := range shape {
15842		switch key {
15843		case "RegexMatchSet":
15844			if err := awsAwsjson11_deserializeDocumentRegexMatchSet(&sv.RegexMatchSet, value); err != nil {
15845				return err
15846			}
15847
15848		default:
15849			_, _ = key, value
15850
15851		}
15852	}
15853	*v = sv
15854	return nil
15855}
15856
15857func awsAwsjson11_deserializeOpDocumentGetRegexPatternSetOutput(v **GetRegexPatternSetOutput, value interface{}) error {
15858	if v == nil {
15859		return fmt.Errorf("unexpected nil of type %T", v)
15860	}
15861	if value == nil {
15862		return nil
15863	}
15864
15865	shape, ok := value.(map[string]interface{})
15866	if !ok {
15867		return fmt.Errorf("unexpected JSON type %v", value)
15868	}
15869
15870	var sv *GetRegexPatternSetOutput
15871	if *v == nil {
15872		sv = &GetRegexPatternSetOutput{}
15873	} else {
15874		sv = *v
15875	}
15876
15877	for key, value := range shape {
15878		switch key {
15879		case "RegexPatternSet":
15880			if err := awsAwsjson11_deserializeDocumentRegexPatternSet(&sv.RegexPatternSet, value); err != nil {
15881				return err
15882			}
15883
15884		default:
15885			_, _ = key, value
15886
15887		}
15888	}
15889	*v = sv
15890	return nil
15891}
15892
15893func awsAwsjson11_deserializeOpDocumentGetRuleGroupOutput(v **GetRuleGroupOutput, value interface{}) error {
15894	if v == nil {
15895		return fmt.Errorf("unexpected nil of type %T", v)
15896	}
15897	if value == nil {
15898		return nil
15899	}
15900
15901	shape, ok := value.(map[string]interface{})
15902	if !ok {
15903		return fmt.Errorf("unexpected JSON type %v", value)
15904	}
15905
15906	var sv *GetRuleGroupOutput
15907	if *v == nil {
15908		sv = &GetRuleGroupOutput{}
15909	} else {
15910		sv = *v
15911	}
15912
15913	for key, value := range shape {
15914		switch key {
15915		case "RuleGroup":
15916			if err := awsAwsjson11_deserializeDocumentRuleGroup(&sv.RuleGroup, value); err != nil {
15917				return err
15918			}
15919
15920		default:
15921			_, _ = key, value
15922
15923		}
15924	}
15925	*v = sv
15926	return nil
15927}
15928
15929func awsAwsjson11_deserializeOpDocumentGetRuleOutput(v **GetRuleOutput, value interface{}) error {
15930	if v == nil {
15931		return fmt.Errorf("unexpected nil of type %T", v)
15932	}
15933	if value == nil {
15934		return nil
15935	}
15936
15937	shape, ok := value.(map[string]interface{})
15938	if !ok {
15939		return fmt.Errorf("unexpected JSON type %v", value)
15940	}
15941
15942	var sv *GetRuleOutput
15943	if *v == nil {
15944		sv = &GetRuleOutput{}
15945	} else {
15946		sv = *v
15947	}
15948
15949	for key, value := range shape {
15950		switch key {
15951		case "Rule":
15952			if err := awsAwsjson11_deserializeDocumentRule(&sv.Rule, value); err != nil {
15953				return err
15954			}
15955
15956		default:
15957			_, _ = key, value
15958
15959		}
15960	}
15961	*v = sv
15962	return nil
15963}
15964
15965func awsAwsjson11_deserializeOpDocumentGetSampledRequestsOutput(v **GetSampledRequestsOutput, value interface{}) error {
15966	if v == nil {
15967		return fmt.Errorf("unexpected nil of type %T", v)
15968	}
15969	if value == nil {
15970		return nil
15971	}
15972
15973	shape, ok := value.(map[string]interface{})
15974	if !ok {
15975		return fmt.Errorf("unexpected JSON type %v", value)
15976	}
15977
15978	var sv *GetSampledRequestsOutput
15979	if *v == nil {
15980		sv = &GetSampledRequestsOutput{}
15981	} else {
15982		sv = *v
15983	}
15984
15985	for key, value := range shape {
15986		switch key {
15987		case "PopulationSize":
15988			if value != nil {
15989				jtv, ok := value.(json.Number)
15990				if !ok {
15991					return fmt.Errorf("expected PopulationSize to be json.Number, got %T instead", value)
15992				}
15993				i64, err := jtv.Int64()
15994				if err != nil {
15995					return err
15996				}
15997				sv.PopulationSize = i64
15998			}
15999
16000		case "SampledRequests":
16001			if err := awsAwsjson11_deserializeDocumentSampledHTTPRequests(&sv.SampledRequests, value); err != nil {
16002				return err
16003			}
16004
16005		case "TimeWindow":
16006			if err := awsAwsjson11_deserializeDocumentTimeWindow(&sv.TimeWindow, value); err != nil {
16007				return err
16008			}
16009
16010		default:
16011			_, _ = key, value
16012
16013		}
16014	}
16015	*v = sv
16016	return nil
16017}
16018
16019func awsAwsjson11_deserializeOpDocumentGetSizeConstraintSetOutput(v **GetSizeConstraintSetOutput, value interface{}) error {
16020	if v == nil {
16021		return fmt.Errorf("unexpected nil of type %T", v)
16022	}
16023	if value == nil {
16024		return nil
16025	}
16026
16027	shape, ok := value.(map[string]interface{})
16028	if !ok {
16029		return fmt.Errorf("unexpected JSON type %v", value)
16030	}
16031
16032	var sv *GetSizeConstraintSetOutput
16033	if *v == nil {
16034		sv = &GetSizeConstraintSetOutput{}
16035	} else {
16036		sv = *v
16037	}
16038
16039	for key, value := range shape {
16040		switch key {
16041		case "SizeConstraintSet":
16042			if err := awsAwsjson11_deserializeDocumentSizeConstraintSet(&sv.SizeConstraintSet, value); err != nil {
16043				return err
16044			}
16045
16046		default:
16047			_, _ = key, value
16048
16049		}
16050	}
16051	*v = sv
16052	return nil
16053}
16054
16055func awsAwsjson11_deserializeOpDocumentGetSqlInjectionMatchSetOutput(v **GetSqlInjectionMatchSetOutput, value interface{}) error {
16056	if v == nil {
16057		return fmt.Errorf("unexpected nil of type %T", v)
16058	}
16059	if value == nil {
16060		return nil
16061	}
16062
16063	shape, ok := value.(map[string]interface{})
16064	if !ok {
16065		return fmt.Errorf("unexpected JSON type %v", value)
16066	}
16067
16068	var sv *GetSqlInjectionMatchSetOutput
16069	if *v == nil {
16070		sv = &GetSqlInjectionMatchSetOutput{}
16071	} else {
16072		sv = *v
16073	}
16074
16075	for key, value := range shape {
16076		switch key {
16077		case "SqlInjectionMatchSet":
16078			if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSet(&sv.SqlInjectionMatchSet, value); err != nil {
16079				return err
16080			}
16081
16082		default:
16083			_, _ = key, value
16084
16085		}
16086	}
16087	*v = sv
16088	return nil
16089}
16090
16091func awsAwsjson11_deserializeOpDocumentGetWebACLOutput(v **GetWebACLOutput, value interface{}) error {
16092	if v == nil {
16093		return fmt.Errorf("unexpected nil of type %T", v)
16094	}
16095	if value == nil {
16096		return nil
16097	}
16098
16099	shape, ok := value.(map[string]interface{})
16100	if !ok {
16101		return fmt.Errorf("unexpected JSON type %v", value)
16102	}
16103
16104	var sv *GetWebACLOutput
16105	if *v == nil {
16106		sv = &GetWebACLOutput{}
16107	} else {
16108		sv = *v
16109	}
16110
16111	for key, value := range shape {
16112		switch key {
16113		case "WebACL":
16114			if err := awsAwsjson11_deserializeDocumentWebACL(&sv.WebACL, value); err != nil {
16115				return err
16116			}
16117
16118		default:
16119			_, _ = key, value
16120
16121		}
16122	}
16123	*v = sv
16124	return nil
16125}
16126
16127func awsAwsjson11_deserializeOpDocumentGetXssMatchSetOutput(v **GetXssMatchSetOutput, value interface{}) error {
16128	if v == nil {
16129		return fmt.Errorf("unexpected nil of type %T", v)
16130	}
16131	if value == nil {
16132		return nil
16133	}
16134
16135	shape, ok := value.(map[string]interface{})
16136	if !ok {
16137		return fmt.Errorf("unexpected JSON type %v", value)
16138	}
16139
16140	var sv *GetXssMatchSetOutput
16141	if *v == nil {
16142		sv = &GetXssMatchSetOutput{}
16143	} else {
16144		sv = *v
16145	}
16146
16147	for key, value := range shape {
16148		switch key {
16149		case "XssMatchSet":
16150			if err := awsAwsjson11_deserializeDocumentXssMatchSet(&sv.XssMatchSet, value); err != nil {
16151				return err
16152			}
16153
16154		default:
16155			_, _ = key, value
16156
16157		}
16158	}
16159	*v = sv
16160	return nil
16161}
16162
16163func awsAwsjson11_deserializeOpDocumentListActivatedRulesInRuleGroupOutput(v **ListActivatedRulesInRuleGroupOutput, value interface{}) error {
16164	if v == nil {
16165		return fmt.Errorf("unexpected nil of type %T", v)
16166	}
16167	if value == nil {
16168		return nil
16169	}
16170
16171	shape, ok := value.(map[string]interface{})
16172	if !ok {
16173		return fmt.Errorf("unexpected JSON type %v", value)
16174	}
16175
16176	var sv *ListActivatedRulesInRuleGroupOutput
16177	if *v == nil {
16178		sv = &ListActivatedRulesInRuleGroupOutput{}
16179	} else {
16180		sv = *v
16181	}
16182
16183	for key, value := range shape {
16184		switch key {
16185		case "ActivatedRules":
16186			if err := awsAwsjson11_deserializeDocumentActivatedRules(&sv.ActivatedRules, value); err != nil {
16187				return err
16188			}
16189
16190		case "NextMarker":
16191			if value != nil {
16192				jtv, ok := value.(string)
16193				if !ok {
16194					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16195				}
16196				sv.NextMarker = ptr.String(jtv)
16197			}
16198
16199		default:
16200			_, _ = key, value
16201
16202		}
16203	}
16204	*v = sv
16205	return nil
16206}
16207
16208func awsAwsjson11_deserializeOpDocumentListByteMatchSetsOutput(v **ListByteMatchSetsOutput, value interface{}) error {
16209	if v == nil {
16210		return fmt.Errorf("unexpected nil of type %T", v)
16211	}
16212	if value == nil {
16213		return nil
16214	}
16215
16216	shape, ok := value.(map[string]interface{})
16217	if !ok {
16218		return fmt.Errorf("unexpected JSON type %v", value)
16219	}
16220
16221	var sv *ListByteMatchSetsOutput
16222	if *v == nil {
16223		sv = &ListByteMatchSetsOutput{}
16224	} else {
16225		sv = *v
16226	}
16227
16228	for key, value := range shape {
16229		switch key {
16230		case "ByteMatchSets":
16231			if err := awsAwsjson11_deserializeDocumentByteMatchSetSummaries(&sv.ByteMatchSets, value); err != nil {
16232				return err
16233			}
16234
16235		case "NextMarker":
16236			if value != nil {
16237				jtv, ok := value.(string)
16238				if !ok {
16239					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16240				}
16241				sv.NextMarker = ptr.String(jtv)
16242			}
16243
16244		default:
16245			_, _ = key, value
16246
16247		}
16248	}
16249	*v = sv
16250	return nil
16251}
16252
16253func awsAwsjson11_deserializeOpDocumentListGeoMatchSetsOutput(v **ListGeoMatchSetsOutput, value interface{}) error {
16254	if v == nil {
16255		return fmt.Errorf("unexpected nil of type %T", v)
16256	}
16257	if value == nil {
16258		return nil
16259	}
16260
16261	shape, ok := value.(map[string]interface{})
16262	if !ok {
16263		return fmt.Errorf("unexpected JSON type %v", value)
16264	}
16265
16266	var sv *ListGeoMatchSetsOutput
16267	if *v == nil {
16268		sv = &ListGeoMatchSetsOutput{}
16269	} else {
16270		sv = *v
16271	}
16272
16273	for key, value := range shape {
16274		switch key {
16275		case "GeoMatchSets":
16276			if err := awsAwsjson11_deserializeDocumentGeoMatchSetSummaries(&sv.GeoMatchSets, value); err != nil {
16277				return err
16278			}
16279
16280		case "NextMarker":
16281			if value != nil {
16282				jtv, ok := value.(string)
16283				if !ok {
16284					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16285				}
16286				sv.NextMarker = ptr.String(jtv)
16287			}
16288
16289		default:
16290			_, _ = key, value
16291
16292		}
16293	}
16294	*v = sv
16295	return nil
16296}
16297
16298func awsAwsjson11_deserializeOpDocumentListIPSetsOutput(v **ListIPSetsOutput, value interface{}) error {
16299	if v == nil {
16300		return fmt.Errorf("unexpected nil of type %T", v)
16301	}
16302	if value == nil {
16303		return nil
16304	}
16305
16306	shape, ok := value.(map[string]interface{})
16307	if !ok {
16308		return fmt.Errorf("unexpected JSON type %v", value)
16309	}
16310
16311	var sv *ListIPSetsOutput
16312	if *v == nil {
16313		sv = &ListIPSetsOutput{}
16314	} else {
16315		sv = *v
16316	}
16317
16318	for key, value := range shape {
16319		switch key {
16320		case "IPSets":
16321			if err := awsAwsjson11_deserializeDocumentIPSetSummaries(&sv.IPSets, value); err != nil {
16322				return err
16323			}
16324
16325		case "NextMarker":
16326			if value != nil {
16327				jtv, ok := value.(string)
16328				if !ok {
16329					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16330				}
16331				sv.NextMarker = ptr.String(jtv)
16332			}
16333
16334		default:
16335			_, _ = key, value
16336
16337		}
16338	}
16339	*v = sv
16340	return nil
16341}
16342
16343func awsAwsjson11_deserializeOpDocumentListLoggingConfigurationsOutput(v **ListLoggingConfigurationsOutput, value interface{}) error {
16344	if v == nil {
16345		return fmt.Errorf("unexpected nil of type %T", v)
16346	}
16347	if value == nil {
16348		return nil
16349	}
16350
16351	shape, ok := value.(map[string]interface{})
16352	if !ok {
16353		return fmt.Errorf("unexpected JSON type %v", value)
16354	}
16355
16356	var sv *ListLoggingConfigurationsOutput
16357	if *v == nil {
16358		sv = &ListLoggingConfigurationsOutput{}
16359	} else {
16360		sv = *v
16361	}
16362
16363	for key, value := range shape {
16364		switch key {
16365		case "LoggingConfigurations":
16366			if err := awsAwsjson11_deserializeDocumentLoggingConfigurations(&sv.LoggingConfigurations, value); err != nil {
16367				return err
16368			}
16369
16370		case "NextMarker":
16371			if value != nil {
16372				jtv, ok := value.(string)
16373				if !ok {
16374					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16375				}
16376				sv.NextMarker = ptr.String(jtv)
16377			}
16378
16379		default:
16380			_, _ = key, value
16381
16382		}
16383	}
16384	*v = sv
16385	return nil
16386}
16387
16388func awsAwsjson11_deserializeOpDocumentListRateBasedRulesOutput(v **ListRateBasedRulesOutput, value interface{}) error {
16389	if v == nil {
16390		return fmt.Errorf("unexpected nil of type %T", v)
16391	}
16392	if value == nil {
16393		return nil
16394	}
16395
16396	shape, ok := value.(map[string]interface{})
16397	if !ok {
16398		return fmt.Errorf("unexpected JSON type %v", value)
16399	}
16400
16401	var sv *ListRateBasedRulesOutput
16402	if *v == nil {
16403		sv = &ListRateBasedRulesOutput{}
16404	} else {
16405		sv = *v
16406	}
16407
16408	for key, value := range shape {
16409		switch key {
16410		case "NextMarker":
16411			if value != nil {
16412				jtv, ok := value.(string)
16413				if !ok {
16414					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16415				}
16416				sv.NextMarker = ptr.String(jtv)
16417			}
16418
16419		case "Rules":
16420			if err := awsAwsjson11_deserializeDocumentRuleSummaries(&sv.Rules, value); err != nil {
16421				return err
16422			}
16423
16424		default:
16425			_, _ = key, value
16426
16427		}
16428	}
16429	*v = sv
16430	return nil
16431}
16432
16433func awsAwsjson11_deserializeOpDocumentListRegexMatchSetsOutput(v **ListRegexMatchSetsOutput, value interface{}) error {
16434	if v == nil {
16435		return fmt.Errorf("unexpected nil of type %T", v)
16436	}
16437	if value == nil {
16438		return nil
16439	}
16440
16441	shape, ok := value.(map[string]interface{})
16442	if !ok {
16443		return fmt.Errorf("unexpected JSON type %v", value)
16444	}
16445
16446	var sv *ListRegexMatchSetsOutput
16447	if *v == nil {
16448		sv = &ListRegexMatchSetsOutput{}
16449	} else {
16450		sv = *v
16451	}
16452
16453	for key, value := range shape {
16454		switch key {
16455		case "NextMarker":
16456			if value != nil {
16457				jtv, ok := value.(string)
16458				if !ok {
16459					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16460				}
16461				sv.NextMarker = ptr.String(jtv)
16462			}
16463
16464		case "RegexMatchSets":
16465			if err := awsAwsjson11_deserializeDocumentRegexMatchSetSummaries(&sv.RegexMatchSets, value); err != nil {
16466				return err
16467			}
16468
16469		default:
16470			_, _ = key, value
16471
16472		}
16473	}
16474	*v = sv
16475	return nil
16476}
16477
16478func awsAwsjson11_deserializeOpDocumentListRegexPatternSetsOutput(v **ListRegexPatternSetsOutput, value interface{}) error {
16479	if v == nil {
16480		return fmt.Errorf("unexpected nil of type %T", v)
16481	}
16482	if value == nil {
16483		return nil
16484	}
16485
16486	shape, ok := value.(map[string]interface{})
16487	if !ok {
16488		return fmt.Errorf("unexpected JSON type %v", value)
16489	}
16490
16491	var sv *ListRegexPatternSetsOutput
16492	if *v == nil {
16493		sv = &ListRegexPatternSetsOutput{}
16494	} else {
16495		sv = *v
16496	}
16497
16498	for key, value := range shape {
16499		switch key {
16500		case "NextMarker":
16501			if value != nil {
16502				jtv, ok := value.(string)
16503				if !ok {
16504					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16505				}
16506				sv.NextMarker = ptr.String(jtv)
16507			}
16508
16509		case "RegexPatternSets":
16510			if err := awsAwsjson11_deserializeDocumentRegexPatternSetSummaries(&sv.RegexPatternSets, value); err != nil {
16511				return err
16512			}
16513
16514		default:
16515			_, _ = key, value
16516
16517		}
16518	}
16519	*v = sv
16520	return nil
16521}
16522
16523func awsAwsjson11_deserializeOpDocumentListRuleGroupsOutput(v **ListRuleGroupsOutput, value interface{}) error {
16524	if v == nil {
16525		return fmt.Errorf("unexpected nil of type %T", v)
16526	}
16527	if value == nil {
16528		return nil
16529	}
16530
16531	shape, ok := value.(map[string]interface{})
16532	if !ok {
16533		return fmt.Errorf("unexpected JSON type %v", value)
16534	}
16535
16536	var sv *ListRuleGroupsOutput
16537	if *v == nil {
16538		sv = &ListRuleGroupsOutput{}
16539	} else {
16540		sv = *v
16541	}
16542
16543	for key, value := range shape {
16544		switch key {
16545		case "NextMarker":
16546			if value != nil {
16547				jtv, ok := value.(string)
16548				if !ok {
16549					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16550				}
16551				sv.NextMarker = ptr.String(jtv)
16552			}
16553
16554		case "RuleGroups":
16555			if err := awsAwsjson11_deserializeDocumentRuleGroupSummaries(&sv.RuleGroups, value); err != nil {
16556				return err
16557			}
16558
16559		default:
16560			_, _ = key, value
16561
16562		}
16563	}
16564	*v = sv
16565	return nil
16566}
16567
16568func awsAwsjson11_deserializeOpDocumentListRulesOutput(v **ListRulesOutput, value interface{}) error {
16569	if v == nil {
16570		return fmt.Errorf("unexpected nil of type %T", v)
16571	}
16572	if value == nil {
16573		return nil
16574	}
16575
16576	shape, ok := value.(map[string]interface{})
16577	if !ok {
16578		return fmt.Errorf("unexpected JSON type %v", value)
16579	}
16580
16581	var sv *ListRulesOutput
16582	if *v == nil {
16583		sv = &ListRulesOutput{}
16584	} else {
16585		sv = *v
16586	}
16587
16588	for key, value := range shape {
16589		switch key {
16590		case "NextMarker":
16591			if value != nil {
16592				jtv, ok := value.(string)
16593				if !ok {
16594					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16595				}
16596				sv.NextMarker = ptr.String(jtv)
16597			}
16598
16599		case "Rules":
16600			if err := awsAwsjson11_deserializeDocumentRuleSummaries(&sv.Rules, value); err != nil {
16601				return err
16602			}
16603
16604		default:
16605			_, _ = key, value
16606
16607		}
16608	}
16609	*v = sv
16610	return nil
16611}
16612
16613func awsAwsjson11_deserializeOpDocumentListSizeConstraintSetsOutput(v **ListSizeConstraintSetsOutput, value interface{}) error {
16614	if v == nil {
16615		return fmt.Errorf("unexpected nil of type %T", v)
16616	}
16617	if value == nil {
16618		return nil
16619	}
16620
16621	shape, ok := value.(map[string]interface{})
16622	if !ok {
16623		return fmt.Errorf("unexpected JSON type %v", value)
16624	}
16625
16626	var sv *ListSizeConstraintSetsOutput
16627	if *v == nil {
16628		sv = &ListSizeConstraintSetsOutput{}
16629	} else {
16630		sv = *v
16631	}
16632
16633	for key, value := range shape {
16634		switch key {
16635		case "NextMarker":
16636			if value != nil {
16637				jtv, ok := value.(string)
16638				if !ok {
16639					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16640				}
16641				sv.NextMarker = ptr.String(jtv)
16642			}
16643
16644		case "SizeConstraintSets":
16645			if err := awsAwsjson11_deserializeDocumentSizeConstraintSetSummaries(&sv.SizeConstraintSets, value); err != nil {
16646				return err
16647			}
16648
16649		default:
16650			_, _ = key, value
16651
16652		}
16653	}
16654	*v = sv
16655	return nil
16656}
16657
16658func awsAwsjson11_deserializeOpDocumentListSqlInjectionMatchSetsOutput(v **ListSqlInjectionMatchSetsOutput, value interface{}) error {
16659	if v == nil {
16660		return fmt.Errorf("unexpected nil of type %T", v)
16661	}
16662	if value == nil {
16663		return nil
16664	}
16665
16666	shape, ok := value.(map[string]interface{})
16667	if !ok {
16668		return fmt.Errorf("unexpected JSON type %v", value)
16669	}
16670
16671	var sv *ListSqlInjectionMatchSetsOutput
16672	if *v == nil {
16673		sv = &ListSqlInjectionMatchSetsOutput{}
16674	} else {
16675		sv = *v
16676	}
16677
16678	for key, value := range shape {
16679		switch key {
16680		case "NextMarker":
16681			if value != nil {
16682				jtv, ok := value.(string)
16683				if !ok {
16684					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16685				}
16686				sv.NextMarker = ptr.String(jtv)
16687			}
16688
16689		case "SqlInjectionMatchSets":
16690			if err := awsAwsjson11_deserializeDocumentSqlInjectionMatchSetSummaries(&sv.SqlInjectionMatchSets, value); err != nil {
16691				return err
16692			}
16693
16694		default:
16695			_, _ = key, value
16696
16697		}
16698	}
16699	*v = sv
16700	return nil
16701}
16702
16703func awsAwsjson11_deserializeOpDocumentListSubscribedRuleGroupsOutput(v **ListSubscribedRuleGroupsOutput, value interface{}) error {
16704	if v == nil {
16705		return fmt.Errorf("unexpected nil of type %T", v)
16706	}
16707	if value == nil {
16708		return nil
16709	}
16710
16711	shape, ok := value.(map[string]interface{})
16712	if !ok {
16713		return fmt.Errorf("unexpected JSON type %v", value)
16714	}
16715
16716	var sv *ListSubscribedRuleGroupsOutput
16717	if *v == nil {
16718		sv = &ListSubscribedRuleGroupsOutput{}
16719	} else {
16720		sv = *v
16721	}
16722
16723	for key, value := range shape {
16724		switch key {
16725		case "NextMarker":
16726			if value != nil {
16727				jtv, ok := value.(string)
16728				if !ok {
16729					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16730				}
16731				sv.NextMarker = ptr.String(jtv)
16732			}
16733
16734		case "RuleGroups":
16735			if err := awsAwsjson11_deserializeDocumentSubscribedRuleGroupSummaries(&sv.RuleGroups, value); err != nil {
16736				return err
16737			}
16738
16739		default:
16740			_, _ = key, value
16741
16742		}
16743	}
16744	*v = sv
16745	return nil
16746}
16747
16748func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error {
16749	if v == nil {
16750		return fmt.Errorf("unexpected nil of type %T", v)
16751	}
16752	if value == nil {
16753		return nil
16754	}
16755
16756	shape, ok := value.(map[string]interface{})
16757	if !ok {
16758		return fmt.Errorf("unexpected JSON type %v", value)
16759	}
16760
16761	var sv *ListTagsForResourceOutput
16762	if *v == nil {
16763		sv = &ListTagsForResourceOutput{}
16764	} else {
16765		sv = *v
16766	}
16767
16768	for key, value := range shape {
16769		switch key {
16770		case "NextMarker":
16771			if value != nil {
16772				jtv, ok := value.(string)
16773				if !ok {
16774					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16775				}
16776				sv.NextMarker = ptr.String(jtv)
16777			}
16778
16779		case "TagInfoForResource":
16780			if err := awsAwsjson11_deserializeDocumentTagInfoForResource(&sv.TagInfoForResource, value); err != nil {
16781				return err
16782			}
16783
16784		default:
16785			_, _ = key, value
16786
16787		}
16788	}
16789	*v = sv
16790	return nil
16791}
16792
16793func awsAwsjson11_deserializeOpDocumentListWebACLsOutput(v **ListWebACLsOutput, value interface{}) error {
16794	if v == nil {
16795		return fmt.Errorf("unexpected nil of type %T", v)
16796	}
16797	if value == nil {
16798		return nil
16799	}
16800
16801	shape, ok := value.(map[string]interface{})
16802	if !ok {
16803		return fmt.Errorf("unexpected JSON type %v", value)
16804	}
16805
16806	var sv *ListWebACLsOutput
16807	if *v == nil {
16808		sv = &ListWebACLsOutput{}
16809	} else {
16810		sv = *v
16811	}
16812
16813	for key, value := range shape {
16814		switch key {
16815		case "NextMarker":
16816			if value != nil {
16817				jtv, ok := value.(string)
16818				if !ok {
16819					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16820				}
16821				sv.NextMarker = ptr.String(jtv)
16822			}
16823
16824		case "WebACLs":
16825			if err := awsAwsjson11_deserializeDocumentWebACLSummaries(&sv.WebACLs, value); err != nil {
16826				return err
16827			}
16828
16829		default:
16830			_, _ = key, value
16831
16832		}
16833	}
16834	*v = sv
16835	return nil
16836}
16837
16838func awsAwsjson11_deserializeOpDocumentListXssMatchSetsOutput(v **ListXssMatchSetsOutput, value interface{}) error {
16839	if v == nil {
16840		return fmt.Errorf("unexpected nil of type %T", v)
16841	}
16842	if value == nil {
16843		return nil
16844	}
16845
16846	shape, ok := value.(map[string]interface{})
16847	if !ok {
16848		return fmt.Errorf("unexpected JSON type %v", value)
16849	}
16850
16851	var sv *ListXssMatchSetsOutput
16852	if *v == nil {
16853		sv = &ListXssMatchSetsOutput{}
16854	} else {
16855		sv = *v
16856	}
16857
16858	for key, value := range shape {
16859		switch key {
16860		case "NextMarker":
16861			if value != nil {
16862				jtv, ok := value.(string)
16863				if !ok {
16864					return fmt.Errorf("expected NextMarker to be of type string, got %T instead", value)
16865				}
16866				sv.NextMarker = ptr.String(jtv)
16867			}
16868
16869		case "XssMatchSets":
16870			if err := awsAwsjson11_deserializeDocumentXssMatchSetSummaries(&sv.XssMatchSets, value); err != nil {
16871				return err
16872			}
16873
16874		default:
16875			_, _ = key, value
16876
16877		}
16878	}
16879	*v = sv
16880	return nil
16881}
16882
16883func awsAwsjson11_deserializeOpDocumentPutLoggingConfigurationOutput(v **PutLoggingConfigurationOutput, value interface{}) error {
16884	if v == nil {
16885		return fmt.Errorf("unexpected nil of type %T", v)
16886	}
16887	if value == nil {
16888		return nil
16889	}
16890
16891	shape, ok := value.(map[string]interface{})
16892	if !ok {
16893		return fmt.Errorf("unexpected JSON type %v", value)
16894	}
16895
16896	var sv *PutLoggingConfigurationOutput
16897	if *v == nil {
16898		sv = &PutLoggingConfigurationOutput{}
16899	} else {
16900		sv = *v
16901	}
16902
16903	for key, value := range shape {
16904		switch key {
16905		case "LoggingConfiguration":
16906			if err := awsAwsjson11_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil {
16907				return err
16908			}
16909
16910		default:
16911			_, _ = key, value
16912
16913		}
16914	}
16915	*v = sv
16916	return nil
16917}
16918
16919func awsAwsjson11_deserializeOpDocumentPutPermissionPolicyOutput(v **PutPermissionPolicyOutput, value interface{}) error {
16920	if v == nil {
16921		return fmt.Errorf("unexpected nil of type %T", v)
16922	}
16923	if value == nil {
16924		return nil
16925	}
16926
16927	shape, ok := value.(map[string]interface{})
16928	if !ok {
16929		return fmt.Errorf("unexpected JSON type %v", value)
16930	}
16931
16932	var sv *PutPermissionPolicyOutput
16933	if *v == nil {
16934		sv = &PutPermissionPolicyOutput{}
16935	} else {
16936		sv = *v
16937	}
16938
16939	for key, value := range shape {
16940		switch key {
16941		default:
16942			_, _ = key, value
16943
16944		}
16945	}
16946	*v = sv
16947	return nil
16948}
16949
16950func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error {
16951	if v == nil {
16952		return fmt.Errorf("unexpected nil of type %T", v)
16953	}
16954	if value == nil {
16955		return nil
16956	}
16957
16958	shape, ok := value.(map[string]interface{})
16959	if !ok {
16960		return fmt.Errorf("unexpected JSON type %v", value)
16961	}
16962
16963	var sv *TagResourceOutput
16964	if *v == nil {
16965		sv = &TagResourceOutput{}
16966	} else {
16967		sv = *v
16968	}
16969
16970	for key, value := range shape {
16971		switch key {
16972		default:
16973			_, _ = key, value
16974
16975		}
16976	}
16977	*v = sv
16978	return nil
16979}
16980
16981func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error {
16982	if v == nil {
16983		return fmt.Errorf("unexpected nil of type %T", v)
16984	}
16985	if value == nil {
16986		return nil
16987	}
16988
16989	shape, ok := value.(map[string]interface{})
16990	if !ok {
16991		return fmt.Errorf("unexpected JSON type %v", value)
16992	}
16993
16994	var sv *UntagResourceOutput
16995	if *v == nil {
16996		sv = &UntagResourceOutput{}
16997	} else {
16998		sv = *v
16999	}
17000
17001	for key, value := range shape {
17002		switch key {
17003		default:
17004			_, _ = key, value
17005
17006		}
17007	}
17008	*v = sv
17009	return nil
17010}
17011
17012func awsAwsjson11_deserializeOpDocumentUpdateByteMatchSetOutput(v **UpdateByteMatchSetOutput, value interface{}) error {
17013	if v == nil {
17014		return fmt.Errorf("unexpected nil of type %T", v)
17015	}
17016	if value == nil {
17017		return nil
17018	}
17019
17020	shape, ok := value.(map[string]interface{})
17021	if !ok {
17022		return fmt.Errorf("unexpected JSON type %v", value)
17023	}
17024
17025	var sv *UpdateByteMatchSetOutput
17026	if *v == nil {
17027		sv = &UpdateByteMatchSetOutput{}
17028	} else {
17029		sv = *v
17030	}
17031
17032	for key, value := range shape {
17033		switch key {
17034		case "ChangeToken":
17035			if value != nil {
17036				jtv, ok := value.(string)
17037				if !ok {
17038					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17039				}
17040				sv.ChangeToken = ptr.String(jtv)
17041			}
17042
17043		default:
17044			_, _ = key, value
17045
17046		}
17047	}
17048	*v = sv
17049	return nil
17050}
17051
17052func awsAwsjson11_deserializeOpDocumentUpdateGeoMatchSetOutput(v **UpdateGeoMatchSetOutput, value interface{}) error {
17053	if v == nil {
17054		return fmt.Errorf("unexpected nil of type %T", v)
17055	}
17056	if value == nil {
17057		return nil
17058	}
17059
17060	shape, ok := value.(map[string]interface{})
17061	if !ok {
17062		return fmt.Errorf("unexpected JSON type %v", value)
17063	}
17064
17065	var sv *UpdateGeoMatchSetOutput
17066	if *v == nil {
17067		sv = &UpdateGeoMatchSetOutput{}
17068	} else {
17069		sv = *v
17070	}
17071
17072	for key, value := range shape {
17073		switch key {
17074		case "ChangeToken":
17075			if value != nil {
17076				jtv, ok := value.(string)
17077				if !ok {
17078					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17079				}
17080				sv.ChangeToken = ptr.String(jtv)
17081			}
17082
17083		default:
17084			_, _ = key, value
17085
17086		}
17087	}
17088	*v = sv
17089	return nil
17090}
17091
17092func awsAwsjson11_deserializeOpDocumentUpdateIPSetOutput(v **UpdateIPSetOutput, value interface{}) error {
17093	if v == nil {
17094		return fmt.Errorf("unexpected nil of type %T", v)
17095	}
17096	if value == nil {
17097		return nil
17098	}
17099
17100	shape, ok := value.(map[string]interface{})
17101	if !ok {
17102		return fmt.Errorf("unexpected JSON type %v", value)
17103	}
17104
17105	var sv *UpdateIPSetOutput
17106	if *v == nil {
17107		sv = &UpdateIPSetOutput{}
17108	} else {
17109		sv = *v
17110	}
17111
17112	for key, value := range shape {
17113		switch key {
17114		case "ChangeToken":
17115			if value != nil {
17116				jtv, ok := value.(string)
17117				if !ok {
17118					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17119				}
17120				sv.ChangeToken = ptr.String(jtv)
17121			}
17122
17123		default:
17124			_, _ = key, value
17125
17126		}
17127	}
17128	*v = sv
17129	return nil
17130}
17131
17132func awsAwsjson11_deserializeOpDocumentUpdateRateBasedRuleOutput(v **UpdateRateBasedRuleOutput, value interface{}) error {
17133	if v == nil {
17134		return fmt.Errorf("unexpected nil of type %T", v)
17135	}
17136	if value == nil {
17137		return nil
17138	}
17139
17140	shape, ok := value.(map[string]interface{})
17141	if !ok {
17142		return fmt.Errorf("unexpected JSON type %v", value)
17143	}
17144
17145	var sv *UpdateRateBasedRuleOutput
17146	if *v == nil {
17147		sv = &UpdateRateBasedRuleOutput{}
17148	} else {
17149		sv = *v
17150	}
17151
17152	for key, value := range shape {
17153		switch key {
17154		case "ChangeToken":
17155			if value != nil {
17156				jtv, ok := value.(string)
17157				if !ok {
17158					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17159				}
17160				sv.ChangeToken = ptr.String(jtv)
17161			}
17162
17163		default:
17164			_, _ = key, value
17165
17166		}
17167	}
17168	*v = sv
17169	return nil
17170}
17171
17172func awsAwsjson11_deserializeOpDocumentUpdateRegexMatchSetOutput(v **UpdateRegexMatchSetOutput, value interface{}) error {
17173	if v == nil {
17174		return fmt.Errorf("unexpected nil of type %T", v)
17175	}
17176	if value == nil {
17177		return nil
17178	}
17179
17180	shape, ok := value.(map[string]interface{})
17181	if !ok {
17182		return fmt.Errorf("unexpected JSON type %v", value)
17183	}
17184
17185	var sv *UpdateRegexMatchSetOutput
17186	if *v == nil {
17187		sv = &UpdateRegexMatchSetOutput{}
17188	} else {
17189		sv = *v
17190	}
17191
17192	for key, value := range shape {
17193		switch key {
17194		case "ChangeToken":
17195			if value != nil {
17196				jtv, ok := value.(string)
17197				if !ok {
17198					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17199				}
17200				sv.ChangeToken = ptr.String(jtv)
17201			}
17202
17203		default:
17204			_, _ = key, value
17205
17206		}
17207	}
17208	*v = sv
17209	return nil
17210}
17211
17212func awsAwsjson11_deserializeOpDocumentUpdateRegexPatternSetOutput(v **UpdateRegexPatternSetOutput, value interface{}) error {
17213	if v == nil {
17214		return fmt.Errorf("unexpected nil of type %T", v)
17215	}
17216	if value == nil {
17217		return nil
17218	}
17219
17220	shape, ok := value.(map[string]interface{})
17221	if !ok {
17222		return fmt.Errorf("unexpected JSON type %v", value)
17223	}
17224
17225	var sv *UpdateRegexPatternSetOutput
17226	if *v == nil {
17227		sv = &UpdateRegexPatternSetOutput{}
17228	} else {
17229		sv = *v
17230	}
17231
17232	for key, value := range shape {
17233		switch key {
17234		case "ChangeToken":
17235			if value != nil {
17236				jtv, ok := value.(string)
17237				if !ok {
17238					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17239				}
17240				sv.ChangeToken = ptr.String(jtv)
17241			}
17242
17243		default:
17244			_, _ = key, value
17245
17246		}
17247	}
17248	*v = sv
17249	return nil
17250}
17251
17252func awsAwsjson11_deserializeOpDocumentUpdateRuleGroupOutput(v **UpdateRuleGroupOutput, value interface{}) error {
17253	if v == nil {
17254		return fmt.Errorf("unexpected nil of type %T", v)
17255	}
17256	if value == nil {
17257		return nil
17258	}
17259
17260	shape, ok := value.(map[string]interface{})
17261	if !ok {
17262		return fmt.Errorf("unexpected JSON type %v", value)
17263	}
17264
17265	var sv *UpdateRuleGroupOutput
17266	if *v == nil {
17267		sv = &UpdateRuleGroupOutput{}
17268	} else {
17269		sv = *v
17270	}
17271
17272	for key, value := range shape {
17273		switch key {
17274		case "ChangeToken":
17275			if value != nil {
17276				jtv, ok := value.(string)
17277				if !ok {
17278					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17279				}
17280				sv.ChangeToken = ptr.String(jtv)
17281			}
17282
17283		default:
17284			_, _ = key, value
17285
17286		}
17287	}
17288	*v = sv
17289	return nil
17290}
17291
17292func awsAwsjson11_deserializeOpDocumentUpdateRuleOutput(v **UpdateRuleOutput, value interface{}) error {
17293	if v == nil {
17294		return fmt.Errorf("unexpected nil of type %T", v)
17295	}
17296	if value == nil {
17297		return nil
17298	}
17299
17300	shape, ok := value.(map[string]interface{})
17301	if !ok {
17302		return fmt.Errorf("unexpected JSON type %v", value)
17303	}
17304
17305	var sv *UpdateRuleOutput
17306	if *v == nil {
17307		sv = &UpdateRuleOutput{}
17308	} else {
17309		sv = *v
17310	}
17311
17312	for key, value := range shape {
17313		switch key {
17314		case "ChangeToken":
17315			if value != nil {
17316				jtv, ok := value.(string)
17317				if !ok {
17318					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17319				}
17320				sv.ChangeToken = ptr.String(jtv)
17321			}
17322
17323		default:
17324			_, _ = key, value
17325
17326		}
17327	}
17328	*v = sv
17329	return nil
17330}
17331
17332func awsAwsjson11_deserializeOpDocumentUpdateSizeConstraintSetOutput(v **UpdateSizeConstraintSetOutput, value interface{}) error {
17333	if v == nil {
17334		return fmt.Errorf("unexpected nil of type %T", v)
17335	}
17336	if value == nil {
17337		return nil
17338	}
17339
17340	shape, ok := value.(map[string]interface{})
17341	if !ok {
17342		return fmt.Errorf("unexpected JSON type %v", value)
17343	}
17344
17345	var sv *UpdateSizeConstraintSetOutput
17346	if *v == nil {
17347		sv = &UpdateSizeConstraintSetOutput{}
17348	} else {
17349		sv = *v
17350	}
17351
17352	for key, value := range shape {
17353		switch key {
17354		case "ChangeToken":
17355			if value != nil {
17356				jtv, ok := value.(string)
17357				if !ok {
17358					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17359				}
17360				sv.ChangeToken = ptr.String(jtv)
17361			}
17362
17363		default:
17364			_, _ = key, value
17365
17366		}
17367	}
17368	*v = sv
17369	return nil
17370}
17371
17372func awsAwsjson11_deserializeOpDocumentUpdateSqlInjectionMatchSetOutput(v **UpdateSqlInjectionMatchSetOutput, value interface{}) error {
17373	if v == nil {
17374		return fmt.Errorf("unexpected nil of type %T", v)
17375	}
17376	if value == nil {
17377		return nil
17378	}
17379
17380	shape, ok := value.(map[string]interface{})
17381	if !ok {
17382		return fmt.Errorf("unexpected JSON type %v", value)
17383	}
17384
17385	var sv *UpdateSqlInjectionMatchSetOutput
17386	if *v == nil {
17387		sv = &UpdateSqlInjectionMatchSetOutput{}
17388	} else {
17389		sv = *v
17390	}
17391
17392	for key, value := range shape {
17393		switch key {
17394		case "ChangeToken":
17395			if value != nil {
17396				jtv, ok := value.(string)
17397				if !ok {
17398					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17399				}
17400				sv.ChangeToken = ptr.String(jtv)
17401			}
17402
17403		default:
17404			_, _ = key, value
17405
17406		}
17407	}
17408	*v = sv
17409	return nil
17410}
17411
17412func awsAwsjson11_deserializeOpDocumentUpdateWebACLOutput(v **UpdateWebACLOutput, value interface{}) error {
17413	if v == nil {
17414		return fmt.Errorf("unexpected nil of type %T", v)
17415	}
17416	if value == nil {
17417		return nil
17418	}
17419
17420	shape, ok := value.(map[string]interface{})
17421	if !ok {
17422		return fmt.Errorf("unexpected JSON type %v", value)
17423	}
17424
17425	var sv *UpdateWebACLOutput
17426	if *v == nil {
17427		sv = &UpdateWebACLOutput{}
17428	} else {
17429		sv = *v
17430	}
17431
17432	for key, value := range shape {
17433		switch key {
17434		case "ChangeToken":
17435			if value != nil {
17436				jtv, ok := value.(string)
17437				if !ok {
17438					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17439				}
17440				sv.ChangeToken = ptr.String(jtv)
17441			}
17442
17443		default:
17444			_, _ = key, value
17445
17446		}
17447	}
17448	*v = sv
17449	return nil
17450}
17451
17452func awsAwsjson11_deserializeOpDocumentUpdateXssMatchSetOutput(v **UpdateXssMatchSetOutput, value interface{}) error {
17453	if v == nil {
17454		return fmt.Errorf("unexpected nil of type %T", v)
17455	}
17456	if value == nil {
17457		return nil
17458	}
17459
17460	shape, ok := value.(map[string]interface{})
17461	if !ok {
17462		return fmt.Errorf("unexpected JSON type %v", value)
17463	}
17464
17465	var sv *UpdateXssMatchSetOutput
17466	if *v == nil {
17467		sv = &UpdateXssMatchSetOutput{}
17468	} else {
17469		sv = *v
17470	}
17471
17472	for key, value := range shape {
17473		switch key {
17474		case "ChangeToken":
17475			if value != nil {
17476				jtv, ok := value.(string)
17477				if !ok {
17478					return fmt.Errorf("expected ChangeToken to be of type string, got %T instead", value)
17479				}
17480				sv.ChangeToken = ptr.String(jtv)
17481			}
17482
17483		default:
17484			_, _ = key, value
17485
17486		}
17487	}
17488	*v = sv
17489	return nil
17490}
17491