1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package directconnect
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/directconnect/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_deserializeOpAcceptDirectConnectGatewayAssociationProposal struct {
24}
25
26func (*awsAwsjson11_deserializeOpAcceptDirectConnectGatewayAssociationProposal) ID() string {
27	return "OperationDeserializer"
28}
29
30func (m *awsAwsjson11_deserializeOpAcceptDirectConnectGatewayAssociationProposal) 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_deserializeOpErrorAcceptDirectConnectGatewayAssociationProposal(response, &metadata)
45	}
46	output := &AcceptDirectConnectGatewayAssociationProposalOutput{}
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_deserializeOpDocumentAcceptDirectConnectGatewayAssociationProposalOutput(&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_deserializeOpErrorAcceptDirectConnectGatewayAssociationProposal(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("DirectConnectClientException", errorCode):
122		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
123
124	case strings.EqualFold("DirectConnectServerException", errorCode):
125		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
126
127	default:
128		genericError := &smithy.GenericAPIError{
129			Code:    errorCode,
130			Message: errorMessage,
131		}
132		return genericError
133
134	}
135}
136
137type awsAwsjson11_deserializeOpAllocateConnectionOnInterconnect struct {
138}
139
140func (*awsAwsjson11_deserializeOpAllocateConnectionOnInterconnect) ID() string {
141	return "OperationDeserializer"
142}
143
144func (m *awsAwsjson11_deserializeOpAllocateConnectionOnInterconnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
145	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
146) {
147	out, metadata, err = next.HandleDeserialize(ctx, in)
148	if err != nil {
149		return out, metadata, err
150	}
151
152	response, ok := out.RawResponse.(*smithyhttp.Response)
153	if !ok {
154		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
155	}
156
157	if response.StatusCode < 200 || response.StatusCode >= 300 {
158		return out, metadata, awsAwsjson11_deserializeOpErrorAllocateConnectionOnInterconnect(response, &metadata)
159	}
160	output := &AllocateConnectionOnInterconnectOutput{}
161	out.Result = output
162
163	var buff [1024]byte
164	ringBuffer := smithyio.NewRingBuffer(buff[:])
165
166	body := io.TeeReader(response.Body, ringBuffer)
167	decoder := json.NewDecoder(body)
168	decoder.UseNumber()
169	var shape interface{}
170	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
171		var snapshot bytes.Buffer
172		io.Copy(&snapshot, ringBuffer)
173		err = &smithy.DeserializationError{
174			Err:      fmt.Errorf("failed to decode response body, %w", err),
175			Snapshot: snapshot.Bytes(),
176		}
177		return out, metadata, err
178	}
179
180	err = awsAwsjson11_deserializeOpDocumentAllocateConnectionOnInterconnectOutput(&output, shape)
181	if err != nil {
182		var snapshot bytes.Buffer
183		io.Copy(&snapshot, ringBuffer)
184		err = &smithy.DeserializationError{
185			Err:      fmt.Errorf("failed to decode response body, %w", err),
186			Snapshot: snapshot.Bytes(),
187		}
188		return out, metadata, err
189	}
190
191	return out, metadata, err
192}
193
194func awsAwsjson11_deserializeOpErrorAllocateConnectionOnInterconnect(response *smithyhttp.Response, metadata *middleware.Metadata) error {
195	var errorBuffer bytes.Buffer
196	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
197		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
198	}
199	errorBody := bytes.NewReader(errorBuffer.Bytes())
200
201	errorCode := "UnknownError"
202	errorMessage := errorCode
203
204	code := response.Header.Get("X-Amzn-ErrorType")
205	if len(code) != 0 {
206		errorCode = restjson.SanitizeErrorCode(code)
207	}
208
209	var buff [1024]byte
210	ringBuffer := smithyio.NewRingBuffer(buff[:])
211
212	body := io.TeeReader(errorBody, ringBuffer)
213	decoder := json.NewDecoder(body)
214	decoder.UseNumber()
215	code, message, err := restjson.GetErrorInfo(decoder)
216	if err != nil {
217		var snapshot bytes.Buffer
218		io.Copy(&snapshot, ringBuffer)
219		err = &smithy.DeserializationError{
220			Err:      fmt.Errorf("failed to decode response body, %w", err),
221			Snapshot: snapshot.Bytes(),
222		}
223		return err
224	}
225
226	errorBody.Seek(0, io.SeekStart)
227	if len(code) != 0 {
228		errorCode = restjson.SanitizeErrorCode(code)
229	}
230	if len(message) != 0 {
231		errorMessage = message
232	}
233
234	switch {
235	case strings.EqualFold("DirectConnectClientException", errorCode):
236		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
237
238	case strings.EqualFold("DirectConnectServerException", errorCode):
239		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
240
241	default:
242		genericError := &smithy.GenericAPIError{
243			Code:    errorCode,
244			Message: errorMessage,
245		}
246		return genericError
247
248	}
249}
250
251type awsAwsjson11_deserializeOpAllocateHostedConnection struct {
252}
253
254func (*awsAwsjson11_deserializeOpAllocateHostedConnection) ID() string {
255	return "OperationDeserializer"
256}
257
258func (m *awsAwsjson11_deserializeOpAllocateHostedConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
259	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
260) {
261	out, metadata, err = next.HandleDeserialize(ctx, in)
262	if err != nil {
263		return out, metadata, err
264	}
265
266	response, ok := out.RawResponse.(*smithyhttp.Response)
267	if !ok {
268		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
269	}
270
271	if response.StatusCode < 200 || response.StatusCode >= 300 {
272		return out, metadata, awsAwsjson11_deserializeOpErrorAllocateHostedConnection(response, &metadata)
273	}
274	output := &AllocateHostedConnectionOutput{}
275	out.Result = output
276
277	var buff [1024]byte
278	ringBuffer := smithyio.NewRingBuffer(buff[:])
279
280	body := io.TeeReader(response.Body, ringBuffer)
281	decoder := json.NewDecoder(body)
282	decoder.UseNumber()
283	var shape interface{}
284	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
285		var snapshot bytes.Buffer
286		io.Copy(&snapshot, ringBuffer)
287		err = &smithy.DeserializationError{
288			Err:      fmt.Errorf("failed to decode response body, %w", err),
289			Snapshot: snapshot.Bytes(),
290		}
291		return out, metadata, err
292	}
293
294	err = awsAwsjson11_deserializeOpDocumentAllocateHostedConnectionOutput(&output, shape)
295	if err != nil {
296		var snapshot bytes.Buffer
297		io.Copy(&snapshot, ringBuffer)
298		err = &smithy.DeserializationError{
299			Err:      fmt.Errorf("failed to decode response body, %w", err),
300			Snapshot: snapshot.Bytes(),
301		}
302		return out, metadata, err
303	}
304
305	return out, metadata, err
306}
307
308func awsAwsjson11_deserializeOpErrorAllocateHostedConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error {
309	var errorBuffer bytes.Buffer
310	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
311		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
312	}
313	errorBody := bytes.NewReader(errorBuffer.Bytes())
314
315	errorCode := "UnknownError"
316	errorMessage := errorCode
317
318	code := response.Header.Get("X-Amzn-ErrorType")
319	if len(code) != 0 {
320		errorCode = restjson.SanitizeErrorCode(code)
321	}
322
323	var buff [1024]byte
324	ringBuffer := smithyio.NewRingBuffer(buff[:])
325
326	body := io.TeeReader(errorBody, ringBuffer)
327	decoder := json.NewDecoder(body)
328	decoder.UseNumber()
329	code, message, err := restjson.GetErrorInfo(decoder)
330	if err != nil {
331		var snapshot bytes.Buffer
332		io.Copy(&snapshot, ringBuffer)
333		err = &smithy.DeserializationError{
334			Err:      fmt.Errorf("failed to decode response body, %w", err),
335			Snapshot: snapshot.Bytes(),
336		}
337		return err
338	}
339
340	errorBody.Seek(0, io.SeekStart)
341	if len(code) != 0 {
342		errorCode = restjson.SanitizeErrorCode(code)
343	}
344	if len(message) != 0 {
345		errorMessage = message
346	}
347
348	switch {
349	case strings.EqualFold("DirectConnectClientException", errorCode):
350		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
351
352	case strings.EqualFold("DirectConnectServerException", errorCode):
353		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
354
355	case strings.EqualFold("DuplicateTagKeysException", errorCode):
356		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
357
358	case strings.EqualFold("TooManyTagsException", errorCode):
359		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
360
361	default:
362		genericError := &smithy.GenericAPIError{
363			Code:    errorCode,
364			Message: errorMessage,
365		}
366		return genericError
367
368	}
369}
370
371type awsAwsjson11_deserializeOpAllocatePrivateVirtualInterface struct {
372}
373
374func (*awsAwsjson11_deserializeOpAllocatePrivateVirtualInterface) ID() string {
375	return "OperationDeserializer"
376}
377
378func (m *awsAwsjson11_deserializeOpAllocatePrivateVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
379	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
380) {
381	out, metadata, err = next.HandleDeserialize(ctx, in)
382	if err != nil {
383		return out, metadata, err
384	}
385
386	response, ok := out.RawResponse.(*smithyhttp.Response)
387	if !ok {
388		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
389	}
390
391	if response.StatusCode < 200 || response.StatusCode >= 300 {
392		return out, metadata, awsAwsjson11_deserializeOpErrorAllocatePrivateVirtualInterface(response, &metadata)
393	}
394	output := &AllocatePrivateVirtualInterfaceOutput{}
395	out.Result = output
396
397	var buff [1024]byte
398	ringBuffer := smithyio.NewRingBuffer(buff[:])
399
400	body := io.TeeReader(response.Body, ringBuffer)
401	decoder := json.NewDecoder(body)
402	decoder.UseNumber()
403	var shape interface{}
404	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
405		var snapshot bytes.Buffer
406		io.Copy(&snapshot, ringBuffer)
407		err = &smithy.DeserializationError{
408			Err:      fmt.Errorf("failed to decode response body, %w", err),
409			Snapshot: snapshot.Bytes(),
410		}
411		return out, metadata, err
412	}
413
414	err = awsAwsjson11_deserializeOpDocumentAllocatePrivateVirtualInterfaceOutput(&output, shape)
415	if err != nil {
416		var snapshot bytes.Buffer
417		io.Copy(&snapshot, ringBuffer)
418		err = &smithy.DeserializationError{
419			Err:      fmt.Errorf("failed to decode response body, %w", err),
420			Snapshot: snapshot.Bytes(),
421		}
422		return out, metadata, err
423	}
424
425	return out, metadata, err
426}
427
428func awsAwsjson11_deserializeOpErrorAllocatePrivateVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
429	var errorBuffer bytes.Buffer
430	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
431		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
432	}
433	errorBody := bytes.NewReader(errorBuffer.Bytes())
434
435	errorCode := "UnknownError"
436	errorMessage := errorCode
437
438	code := response.Header.Get("X-Amzn-ErrorType")
439	if len(code) != 0 {
440		errorCode = restjson.SanitizeErrorCode(code)
441	}
442
443	var buff [1024]byte
444	ringBuffer := smithyio.NewRingBuffer(buff[:])
445
446	body := io.TeeReader(errorBody, ringBuffer)
447	decoder := json.NewDecoder(body)
448	decoder.UseNumber()
449	code, message, err := restjson.GetErrorInfo(decoder)
450	if err != nil {
451		var snapshot bytes.Buffer
452		io.Copy(&snapshot, ringBuffer)
453		err = &smithy.DeserializationError{
454			Err:      fmt.Errorf("failed to decode response body, %w", err),
455			Snapshot: snapshot.Bytes(),
456		}
457		return err
458	}
459
460	errorBody.Seek(0, io.SeekStart)
461	if len(code) != 0 {
462		errorCode = restjson.SanitizeErrorCode(code)
463	}
464	if len(message) != 0 {
465		errorMessage = message
466	}
467
468	switch {
469	case strings.EqualFold("DirectConnectClientException", errorCode):
470		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
471
472	case strings.EqualFold("DirectConnectServerException", errorCode):
473		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
474
475	case strings.EqualFold("DuplicateTagKeysException", errorCode):
476		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
477
478	case strings.EqualFold("TooManyTagsException", errorCode):
479		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
480
481	default:
482		genericError := &smithy.GenericAPIError{
483			Code:    errorCode,
484			Message: errorMessage,
485		}
486		return genericError
487
488	}
489}
490
491type awsAwsjson11_deserializeOpAllocatePublicVirtualInterface struct {
492}
493
494func (*awsAwsjson11_deserializeOpAllocatePublicVirtualInterface) ID() string {
495	return "OperationDeserializer"
496}
497
498func (m *awsAwsjson11_deserializeOpAllocatePublicVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
499	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
500) {
501	out, metadata, err = next.HandleDeserialize(ctx, in)
502	if err != nil {
503		return out, metadata, err
504	}
505
506	response, ok := out.RawResponse.(*smithyhttp.Response)
507	if !ok {
508		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
509	}
510
511	if response.StatusCode < 200 || response.StatusCode >= 300 {
512		return out, metadata, awsAwsjson11_deserializeOpErrorAllocatePublicVirtualInterface(response, &metadata)
513	}
514	output := &AllocatePublicVirtualInterfaceOutput{}
515	out.Result = output
516
517	var buff [1024]byte
518	ringBuffer := smithyio.NewRingBuffer(buff[:])
519
520	body := io.TeeReader(response.Body, ringBuffer)
521	decoder := json.NewDecoder(body)
522	decoder.UseNumber()
523	var shape interface{}
524	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
525		var snapshot bytes.Buffer
526		io.Copy(&snapshot, ringBuffer)
527		err = &smithy.DeserializationError{
528			Err:      fmt.Errorf("failed to decode response body, %w", err),
529			Snapshot: snapshot.Bytes(),
530		}
531		return out, metadata, err
532	}
533
534	err = awsAwsjson11_deserializeOpDocumentAllocatePublicVirtualInterfaceOutput(&output, shape)
535	if err != nil {
536		var snapshot bytes.Buffer
537		io.Copy(&snapshot, ringBuffer)
538		err = &smithy.DeserializationError{
539			Err:      fmt.Errorf("failed to decode response body, %w", err),
540			Snapshot: snapshot.Bytes(),
541		}
542		return out, metadata, err
543	}
544
545	return out, metadata, err
546}
547
548func awsAwsjson11_deserializeOpErrorAllocatePublicVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
549	var errorBuffer bytes.Buffer
550	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
551		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
552	}
553	errorBody := bytes.NewReader(errorBuffer.Bytes())
554
555	errorCode := "UnknownError"
556	errorMessage := errorCode
557
558	code := response.Header.Get("X-Amzn-ErrorType")
559	if len(code) != 0 {
560		errorCode = restjson.SanitizeErrorCode(code)
561	}
562
563	var buff [1024]byte
564	ringBuffer := smithyio.NewRingBuffer(buff[:])
565
566	body := io.TeeReader(errorBody, ringBuffer)
567	decoder := json.NewDecoder(body)
568	decoder.UseNumber()
569	code, message, err := restjson.GetErrorInfo(decoder)
570	if err != nil {
571		var snapshot bytes.Buffer
572		io.Copy(&snapshot, ringBuffer)
573		err = &smithy.DeserializationError{
574			Err:      fmt.Errorf("failed to decode response body, %w", err),
575			Snapshot: snapshot.Bytes(),
576		}
577		return err
578	}
579
580	errorBody.Seek(0, io.SeekStart)
581	if len(code) != 0 {
582		errorCode = restjson.SanitizeErrorCode(code)
583	}
584	if len(message) != 0 {
585		errorMessage = message
586	}
587
588	switch {
589	case strings.EqualFold("DirectConnectClientException", errorCode):
590		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
591
592	case strings.EqualFold("DirectConnectServerException", errorCode):
593		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
594
595	case strings.EqualFold("DuplicateTagKeysException", errorCode):
596		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
597
598	case strings.EqualFold("TooManyTagsException", errorCode):
599		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
600
601	default:
602		genericError := &smithy.GenericAPIError{
603			Code:    errorCode,
604			Message: errorMessage,
605		}
606		return genericError
607
608	}
609}
610
611type awsAwsjson11_deserializeOpAllocateTransitVirtualInterface struct {
612}
613
614func (*awsAwsjson11_deserializeOpAllocateTransitVirtualInterface) ID() string {
615	return "OperationDeserializer"
616}
617
618func (m *awsAwsjson11_deserializeOpAllocateTransitVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
619	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
620) {
621	out, metadata, err = next.HandleDeserialize(ctx, in)
622	if err != nil {
623		return out, metadata, err
624	}
625
626	response, ok := out.RawResponse.(*smithyhttp.Response)
627	if !ok {
628		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
629	}
630
631	if response.StatusCode < 200 || response.StatusCode >= 300 {
632		return out, metadata, awsAwsjson11_deserializeOpErrorAllocateTransitVirtualInterface(response, &metadata)
633	}
634	output := &AllocateTransitVirtualInterfaceOutput{}
635	out.Result = output
636
637	var buff [1024]byte
638	ringBuffer := smithyio.NewRingBuffer(buff[:])
639
640	body := io.TeeReader(response.Body, ringBuffer)
641	decoder := json.NewDecoder(body)
642	decoder.UseNumber()
643	var shape interface{}
644	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
645		var snapshot bytes.Buffer
646		io.Copy(&snapshot, ringBuffer)
647		err = &smithy.DeserializationError{
648			Err:      fmt.Errorf("failed to decode response body, %w", err),
649			Snapshot: snapshot.Bytes(),
650		}
651		return out, metadata, err
652	}
653
654	err = awsAwsjson11_deserializeOpDocumentAllocateTransitVirtualInterfaceOutput(&output, shape)
655	if err != nil {
656		var snapshot bytes.Buffer
657		io.Copy(&snapshot, ringBuffer)
658		err = &smithy.DeserializationError{
659			Err:      fmt.Errorf("failed to decode response body, %w", err),
660			Snapshot: snapshot.Bytes(),
661		}
662		return out, metadata, err
663	}
664
665	return out, metadata, err
666}
667
668func awsAwsjson11_deserializeOpErrorAllocateTransitVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
669	var errorBuffer bytes.Buffer
670	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
671		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
672	}
673	errorBody := bytes.NewReader(errorBuffer.Bytes())
674
675	errorCode := "UnknownError"
676	errorMessage := errorCode
677
678	code := response.Header.Get("X-Amzn-ErrorType")
679	if len(code) != 0 {
680		errorCode = restjson.SanitizeErrorCode(code)
681	}
682
683	var buff [1024]byte
684	ringBuffer := smithyio.NewRingBuffer(buff[:])
685
686	body := io.TeeReader(errorBody, ringBuffer)
687	decoder := json.NewDecoder(body)
688	decoder.UseNumber()
689	code, message, err := restjson.GetErrorInfo(decoder)
690	if err != nil {
691		var snapshot bytes.Buffer
692		io.Copy(&snapshot, ringBuffer)
693		err = &smithy.DeserializationError{
694			Err:      fmt.Errorf("failed to decode response body, %w", err),
695			Snapshot: snapshot.Bytes(),
696		}
697		return err
698	}
699
700	errorBody.Seek(0, io.SeekStart)
701	if len(code) != 0 {
702		errorCode = restjson.SanitizeErrorCode(code)
703	}
704	if len(message) != 0 {
705		errorMessage = message
706	}
707
708	switch {
709	case strings.EqualFold("DirectConnectClientException", errorCode):
710		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
711
712	case strings.EqualFold("DirectConnectServerException", errorCode):
713		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
714
715	case strings.EqualFold("DuplicateTagKeysException", errorCode):
716		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
717
718	case strings.EqualFold("TooManyTagsException", errorCode):
719		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
720
721	default:
722		genericError := &smithy.GenericAPIError{
723			Code:    errorCode,
724			Message: errorMessage,
725		}
726		return genericError
727
728	}
729}
730
731type awsAwsjson11_deserializeOpAssociateConnectionWithLag struct {
732}
733
734func (*awsAwsjson11_deserializeOpAssociateConnectionWithLag) ID() string {
735	return "OperationDeserializer"
736}
737
738func (m *awsAwsjson11_deserializeOpAssociateConnectionWithLag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
739	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
740) {
741	out, metadata, err = next.HandleDeserialize(ctx, in)
742	if err != nil {
743		return out, metadata, err
744	}
745
746	response, ok := out.RawResponse.(*smithyhttp.Response)
747	if !ok {
748		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
749	}
750
751	if response.StatusCode < 200 || response.StatusCode >= 300 {
752		return out, metadata, awsAwsjson11_deserializeOpErrorAssociateConnectionWithLag(response, &metadata)
753	}
754	output := &AssociateConnectionWithLagOutput{}
755	out.Result = output
756
757	var buff [1024]byte
758	ringBuffer := smithyio.NewRingBuffer(buff[:])
759
760	body := io.TeeReader(response.Body, ringBuffer)
761	decoder := json.NewDecoder(body)
762	decoder.UseNumber()
763	var shape interface{}
764	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
765		var snapshot bytes.Buffer
766		io.Copy(&snapshot, ringBuffer)
767		err = &smithy.DeserializationError{
768			Err:      fmt.Errorf("failed to decode response body, %w", err),
769			Snapshot: snapshot.Bytes(),
770		}
771		return out, metadata, err
772	}
773
774	err = awsAwsjson11_deserializeOpDocumentAssociateConnectionWithLagOutput(&output, shape)
775	if err != nil {
776		var snapshot bytes.Buffer
777		io.Copy(&snapshot, ringBuffer)
778		err = &smithy.DeserializationError{
779			Err:      fmt.Errorf("failed to decode response body, %w", err),
780			Snapshot: snapshot.Bytes(),
781		}
782		return out, metadata, err
783	}
784
785	return out, metadata, err
786}
787
788func awsAwsjson11_deserializeOpErrorAssociateConnectionWithLag(response *smithyhttp.Response, metadata *middleware.Metadata) error {
789	var errorBuffer bytes.Buffer
790	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
791		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
792	}
793	errorBody := bytes.NewReader(errorBuffer.Bytes())
794
795	errorCode := "UnknownError"
796	errorMessage := errorCode
797
798	code := response.Header.Get("X-Amzn-ErrorType")
799	if len(code) != 0 {
800		errorCode = restjson.SanitizeErrorCode(code)
801	}
802
803	var buff [1024]byte
804	ringBuffer := smithyio.NewRingBuffer(buff[:])
805
806	body := io.TeeReader(errorBody, ringBuffer)
807	decoder := json.NewDecoder(body)
808	decoder.UseNumber()
809	code, message, err := restjson.GetErrorInfo(decoder)
810	if err != nil {
811		var snapshot bytes.Buffer
812		io.Copy(&snapshot, ringBuffer)
813		err = &smithy.DeserializationError{
814			Err:      fmt.Errorf("failed to decode response body, %w", err),
815			Snapshot: snapshot.Bytes(),
816		}
817		return err
818	}
819
820	errorBody.Seek(0, io.SeekStart)
821	if len(code) != 0 {
822		errorCode = restjson.SanitizeErrorCode(code)
823	}
824	if len(message) != 0 {
825		errorMessage = message
826	}
827
828	switch {
829	case strings.EqualFold("DirectConnectClientException", errorCode):
830		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
831
832	case strings.EqualFold("DirectConnectServerException", errorCode):
833		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
834
835	default:
836		genericError := &smithy.GenericAPIError{
837			Code:    errorCode,
838			Message: errorMessage,
839		}
840		return genericError
841
842	}
843}
844
845type awsAwsjson11_deserializeOpAssociateHostedConnection struct {
846}
847
848func (*awsAwsjson11_deserializeOpAssociateHostedConnection) ID() string {
849	return "OperationDeserializer"
850}
851
852func (m *awsAwsjson11_deserializeOpAssociateHostedConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
853	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
854) {
855	out, metadata, err = next.HandleDeserialize(ctx, in)
856	if err != nil {
857		return out, metadata, err
858	}
859
860	response, ok := out.RawResponse.(*smithyhttp.Response)
861	if !ok {
862		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
863	}
864
865	if response.StatusCode < 200 || response.StatusCode >= 300 {
866		return out, metadata, awsAwsjson11_deserializeOpErrorAssociateHostedConnection(response, &metadata)
867	}
868	output := &AssociateHostedConnectionOutput{}
869	out.Result = output
870
871	var buff [1024]byte
872	ringBuffer := smithyio.NewRingBuffer(buff[:])
873
874	body := io.TeeReader(response.Body, ringBuffer)
875	decoder := json.NewDecoder(body)
876	decoder.UseNumber()
877	var shape interface{}
878	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
879		var snapshot bytes.Buffer
880		io.Copy(&snapshot, ringBuffer)
881		err = &smithy.DeserializationError{
882			Err:      fmt.Errorf("failed to decode response body, %w", err),
883			Snapshot: snapshot.Bytes(),
884		}
885		return out, metadata, err
886	}
887
888	err = awsAwsjson11_deserializeOpDocumentAssociateHostedConnectionOutput(&output, shape)
889	if err != nil {
890		var snapshot bytes.Buffer
891		io.Copy(&snapshot, ringBuffer)
892		err = &smithy.DeserializationError{
893			Err:      fmt.Errorf("failed to decode response body, %w", err),
894			Snapshot: snapshot.Bytes(),
895		}
896		return out, metadata, err
897	}
898
899	return out, metadata, err
900}
901
902func awsAwsjson11_deserializeOpErrorAssociateHostedConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error {
903	var errorBuffer bytes.Buffer
904	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
905		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
906	}
907	errorBody := bytes.NewReader(errorBuffer.Bytes())
908
909	errorCode := "UnknownError"
910	errorMessage := errorCode
911
912	code := response.Header.Get("X-Amzn-ErrorType")
913	if len(code) != 0 {
914		errorCode = restjson.SanitizeErrorCode(code)
915	}
916
917	var buff [1024]byte
918	ringBuffer := smithyio.NewRingBuffer(buff[:])
919
920	body := io.TeeReader(errorBody, ringBuffer)
921	decoder := json.NewDecoder(body)
922	decoder.UseNumber()
923	code, message, err := restjson.GetErrorInfo(decoder)
924	if err != nil {
925		var snapshot bytes.Buffer
926		io.Copy(&snapshot, ringBuffer)
927		err = &smithy.DeserializationError{
928			Err:      fmt.Errorf("failed to decode response body, %w", err),
929			Snapshot: snapshot.Bytes(),
930		}
931		return err
932	}
933
934	errorBody.Seek(0, io.SeekStart)
935	if len(code) != 0 {
936		errorCode = restjson.SanitizeErrorCode(code)
937	}
938	if len(message) != 0 {
939		errorMessage = message
940	}
941
942	switch {
943	case strings.EqualFold("DirectConnectClientException", errorCode):
944		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
945
946	case strings.EqualFold("DirectConnectServerException", errorCode):
947		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
948
949	default:
950		genericError := &smithy.GenericAPIError{
951			Code:    errorCode,
952			Message: errorMessage,
953		}
954		return genericError
955
956	}
957}
958
959type awsAwsjson11_deserializeOpAssociateVirtualInterface struct {
960}
961
962func (*awsAwsjson11_deserializeOpAssociateVirtualInterface) ID() string {
963	return "OperationDeserializer"
964}
965
966func (m *awsAwsjson11_deserializeOpAssociateVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
967	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
968) {
969	out, metadata, err = next.HandleDeserialize(ctx, in)
970	if err != nil {
971		return out, metadata, err
972	}
973
974	response, ok := out.RawResponse.(*smithyhttp.Response)
975	if !ok {
976		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
977	}
978
979	if response.StatusCode < 200 || response.StatusCode >= 300 {
980		return out, metadata, awsAwsjson11_deserializeOpErrorAssociateVirtualInterface(response, &metadata)
981	}
982	output := &AssociateVirtualInterfaceOutput{}
983	out.Result = output
984
985	var buff [1024]byte
986	ringBuffer := smithyio.NewRingBuffer(buff[:])
987
988	body := io.TeeReader(response.Body, ringBuffer)
989	decoder := json.NewDecoder(body)
990	decoder.UseNumber()
991	var shape interface{}
992	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
993		var snapshot bytes.Buffer
994		io.Copy(&snapshot, ringBuffer)
995		err = &smithy.DeserializationError{
996			Err:      fmt.Errorf("failed to decode response body, %w", err),
997			Snapshot: snapshot.Bytes(),
998		}
999		return out, metadata, err
1000	}
1001
1002	err = awsAwsjson11_deserializeOpDocumentAssociateVirtualInterfaceOutput(&output, shape)
1003	if err != nil {
1004		var snapshot bytes.Buffer
1005		io.Copy(&snapshot, ringBuffer)
1006		err = &smithy.DeserializationError{
1007			Err:      fmt.Errorf("failed to decode response body, %w", err),
1008			Snapshot: snapshot.Bytes(),
1009		}
1010		return out, metadata, err
1011	}
1012
1013	return out, metadata, err
1014}
1015
1016func awsAwsjson11_deserializeOpErrorAssociateVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1017	var errorBuffer bytes.Buffer
1018	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1019		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1020	}
1021	errorBody := bytes.NewReader(errorBuffer.Bytes())
1022
1023	errorCode := "UnknownError"
1024	errorMessage := errorCode
1025
1026	code := response.Header.Get("X-Amzn-ErrorType")
1027	if len(code) != 0 {
1028		errorCode = restjson.SanitizeErrorCode(code)
1029	}
1030
1031	var buff [1024]byte
1032	ringBuffer := smithyio.NewRingBuffer(buff[:])
1033
1034	body := io.TeeReader(errorBody, ringBuffer)
1035	decoder := json.NewDecoder(body)
1036	decoder.UseNumber()
1037	code, message, err := restjson.GetErrorInfo(decoder)
1038	if err != nil {
1039		var snapshot bytes.Buffer
1040		io.Copy(&snapshot, ringBuffer)
1041		err = &smithy.DeserializationError{
1042			Err:      fmt.Errorf("failed to decode response body, %w", err),
1043			Snapshot: snapshot.Bytes(),
1044		}
1045		return err
1046	}
1047
1048	errorBody.Seek(0, io.SeekStart)
1049	if len(code) != 0 {
1050		errorCode = restjson.SanitizeErrorCode(code)
1051	}
1052	if len(message) != 0 {
1053		errorMessage = message
1054	}
1055
1056	switch {
1057	case strings.EqualFold("DirectConnectClientException", errorCode):
1058		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1059
1060	case strings.EqualFold("DirectConnectServerException", errorCode):
1061		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1062
1063	default:
1064		genericError := &smithy.GenericAPIError{
1065			Code:    errorCode,
1066			Message: errorMessage,
1067		}
1068		return genericError
1069
1070	}
1071}
1072
1073type awsAwsjson11_deserializeOpConfirmConnection struct {
1074}
1075
1076func (*awsAwsjson11_deserializeOpConfirmConnection) ID() string {
1077	return "OperationDeserializer"
1078}
1079
1080func (m *awsAwsjson11_deserializeOpConfirmConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1081	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1082) {
1083	out, metadata, err = next.HandleDeserialize(ctx, in)
1084	if err != nil {
1085		return out, metadata, err
1086	}
1087
1088	response, ok := out.RawResponse.(*smithyhttp.Response)
1089	if !ok {
1090		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1091	}
1092
1093	if response.StatusCode < 200 || response.StatusCode >= 300 {
1094		return out, metadata, awsAwsjson11_deserializeOpErrorConfirmConnection(response, &metadata)
1095	}
1096	output := &ConfirmConnectionOutput{}
1097	out.Result = output
1098
1099	var buff [1024]byte
1100	ringBuffer := smithyio.NewRingBuffer(buff[:])
1101
1102	body := io.TeeReader(response.Body, ringBuffer)
1103	decoder := json.NewDecoder(body)
1104	decoder.UseNumber()
1105	var shape interface{}
1106	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1107		var snapshot bytes.Buffer
1108		io.Copy(&snapshot, ringBuffer)
1109		err = &smithy.DeserializationError{
1110			Err:      fmt.Errorf("failed to decode response body, %w", err),
1111			Snapshot: snapshot.Bytes(),
1112		}
1113		return out, metadata, err
1114	}
1115
1116	err = awsAwsjson11_deserializeOpDocumentConfirmConnectionOutput(&output, shape)
1117	if err != nil {
1118		var snapshot bytes.Buffer
1119		io.Copy(&snapshot, ringBuffer)
1120		err = &smithy.DeserializationError{
1121			Err:      fmt.Errorf("failed to decode response body, %w", err),
1122			Snapshot: snapshot.Bytes(),
1123		}
1124		return out, metadata, err
1125	}
1126
1127	return out, metadata, err
1128}
1129
1130func awsAwsjson11_deserializeOpErrorConfirmConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1131	var errorBuffer bytes.Buffer
1132	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1133		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1134	}
1135	errorBody := bytes.NewReader(errorBuffer.Bytes())
1136
1137	errorCode := "UnknownError"
1138	errorMessage := errorCode
1139
1140	code := response.Header.Get("X-Amzn-ErrorType")
1141	if len(code) != 0 {
1142		errorCode = restjson.SanitizeErrorCode(code)
1143	}
1144
1145	var buff [1024]byte
1146	ringBuffer := smithyio.NewRingBuffer(buff[:])
1147
1148	body := io.TeeReader(errorBody, ringBuffer)
1149	decoder := json.NewDecoder(body)
1150	decoder.UseNumber()
1151	code, message, err := restjson.GetErrorInfo(decoder)
1152	if err != nil {
1153		var snapshot bytes.Buffer
1154		io.Copy(&snapshot, ringBuffer)
1155		err = &smithy.DeserializationError{
1156			Err:      fmt.Errorf("failed to decode response body, %w", err),
1157			Snapshot: snapshot.Bytes(),
1158		}
1159		return err
1160	}
1161
1162	errorBody.Seek(0, io.SeekStart)
1163	if len(code) != 0 {
1164		errorCode = restjson.SanitizeErrorCode(code)
1165	}
1166	if len(message) != 0 {
1167		errorMessage = message
1168	}
1169
1170	switch {
1171	case strings.EqualFold("DirectConnectClientException", errorCode):
1172		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1173
1174	case strings.EqualFold("DirectConnectServerException", errorCode):
1175		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1176
1177	default:
1178		genericError := &smithy.GenericAPIError{
1179			Code:    errorCode,
1180			Message: errorMessage,
1181		}
1182		return genericError
1183
1184	}
1185}
1186
1187type awsAwsjson11_deserializeOpConfirmPrivateVirtualInterface struct {
1188}
1189
1190func (*awsAwsjson11_deserializeOpConfirmPrivateVirtualInterface) ID() string {
1191	return "OperationDeserializer"
1192}
1193
1194func (m *awsAwsjson11_deserializeOpConfirmPrivateVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1195	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1196) {
1197	out, metadata, err = next.HandleDeserialize(ctx, in)
1198	if err != nil {
1199		return out, metadata, err
1200	}
1201
1202	response, ok := out.RawResponse.(*smithyhttp.Response)
1203	if !ok {
1204		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1205	}
1206
1207	if response.StatusCode < 200 || response.StatusCode >= 300 {
1208		return out, metadata, awsAwsjson11_deserializeOpErrorConfirmPrivateVirtualInterface(response, &metadata)
1209	}
1210	output := &ConfirmPrivateVirtualInterfaceOutput{}
1211	out.Result = output
1212
1213	var buff [1024]byte
1214	ringBuffer := smithyio.NewRingBuffer(buff[:])
1215
1216	body := io.TeeReader(response.Body, ringBuffer)
1217	decoder := json.NewDecoder(body)
1218	decoder.UseNumber()
1219	var shape interface{}
1220	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1221		var snapshot bytes.Buffer
1222		io.Copy(&snapshot, ringBuffer)
1223		err = &smithy.DeserializationError{
1224			Err:      fmt.Errorf("failed to decode response body, %w", err),
1225			Snapshot: snapshot.Bytes(),
1226		}
1227		return out, metadata, err
1228	}
1229
1230	err = awsAwsjson11_deserializeOpDocumentConfirmPrivateVirtualInterfaceOutput(&output, shape)
1231	if err != nil {
1232		var snapshot bytes.Buffer
1233		io.Copy(&snapshot, ringBuffer)
1234		err = &smithy.DeserializationError{
1235			Err:      fmt.Errorf("failed to decode response body, %w", err),
1236			Snapshot: snapshot.Bytes(),
1237		}
1238		return out, metadata, err
1239	}
1240
1241	return out, metadata, err
1242}
1243
1244func awsAwsjson11_deserializeOpErrorConfirmPrivateVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1245	var errorBuffer bytes.Buffer
1246	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1247		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1248	}
1249	errorBody := bytes.NewReader(errorBuffer.Bytes())
1250
1251	errorCode := "UnknownError"
1252	errorMessage := errorCode
1253
1254	code := response.Header.Get("X-Amzn-ErrorType")
1255	if len(code) != 0 {
1256		errorCode = restjson.SanitizeErrorCode(code)
1257	}
1258
1259	var buff [1024]byte
1260	ringBuffer := smithyio.NewRingBuffer(buff[:])
1261
1262	body := io.TeeReader(errorBody, ringBuffer)
1263	decoder := json.NewDecoder(body)
1264	decoder.UseNumber()
1265	code, message, err := restjson.GetErrorInfo(decoder)
1266	if err != nil {
1267		var snapshot bytes.Buffer
1268		io.Copy(&snapshot, ringBuffer)
1269		err = &smithy.DeserializationError{
1270			Err:      fmt.Errorf("failed to decode response body, %w", err),
1271			Snapshot: snapshot.Bytes(),
1272		}
1273		return err
1274	}
1275
1276	errorBody.Seek(0, io.SeekStart)
1277	if len(code) != 0 {
1278		errorCode = restjson.SanitizeErrorCode(code)
1279	}
1280	if len(message) != 0 {
1281		errorMessage = message
1282	}
1283
1284	switch {
1285	case strings.EqualFold("DirectConnectClientException", errorCode):
1286		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1287
1288	case strings.EqualFold("DirectConnectServerException", errorCode):
1289		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1290
1291	default:
1292		genericError := &smithy.GenericAPIError{
1293			Code:    errorCode,
1294			Message: errorMessage,
1295		}
1296		return genericError
1297
1298	}
1299}
1300
1301type awsAwsjson11_deserializeOpConfirmPublicVirtualInterface struct {
1302}
1303
1304func (*awsAwsjson11_deserializeOpConfirmPublicVirtualInterface) ID() string {
1305	return "OperationDeserializer"
1306}
1307
1308func (m *awsAwsjson11_deserializeOpConfirmPublicVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1309	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1310) {
1311	out, metadata, err = next.HandleDeserialize(ctx, in)
1312	if err != nil {
1313		return out, metadata, err
1314	}
1315
1316	response, ok := out.RawResponse.(*smithyhttp.Response)
1317	if !ok {
1318		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1319	}
1320
1321	if response.StatusCode < 200 || response.StatusCode >= 300 {
1322		return out, metadata, awsAwsjson11_deserializeOpErrorConfirmPublicVirtualInterface(response, &metadata)
1323	}
1324	output := &ConfirmPublicVirtualInterfaceOutput{}
1325	out.Result = output
1326
1327	var buff [1024]byte
1328	ringBuffer := smithyio.NewRingBuffer(buff[:])
1329
1330	body := io.TeeReader(response.Body, ringBuffer)
1331	decoder := json.NewDecoder(body)
1332	decoder.UseNumber()
1333	var shape interface{}
1334	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1335		var snapshot bytes.Buffer
1336		io.Copy(&snapshot, ringBuffer)
1337		err = &smithy.DeserializationError{
1338			Err:      fmt.Errorf("failed to decode response body, %w", err),
1339			Snapshot: snapshot.Bytes(),
1340		}
1341		return out, metadata, err
1342	}
1343
1344	err = awsAwsjson11_deserializeOpDocumentConfirmPublicVirtualInterfaceOutput(&output, shape)
1345	if err != nil {
1346		var snapshot bytes.Buffer
1347		io.Copy(&snapshot, ringBuffer)
1348		err = &smithy.DeserializationError{
1349			Err:      fmt.Errorf("failed to decode response body, %w", err),
1350			Snapshot: snapshot.Bytes(),
1351		}
1352		return out, metadata, err
1353	}
1354
1355	return out, metadata, err
1356}
1357
1358func awsAwsjson11_deserializeOpErrorConfirmPublicVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1359	var errorBuffer bytes.Buffer
1360	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1361		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1362	}
1363	errorBody := bytes.NewReader(errorBuffer.Bytes())
1364
1365	errorCode := "UnknownError"
1366	errorMessage := errorCode
1367
1368	code := response.Header.Get("X-Amzn-ErrorType")
1369	if len(code) != 0 {
1370		errorCode = restjson.SanitizeErrorCode(code)
1371	}
1372
1373	var buff [1024]byte
1374	ringBuffer := smithyio.NewRingBuffer(buff[:])
1375
1376	body := io.TeeReader(errorBody, ringBuffer)
1377	decoder := json.NewDecoder(body)
1378	decoder.UseNumber()
1379	code, message, err := restjson.GetErrorInfo(decoder)
1380	if err != nil {
1381		var snapshot bytes.Buffer
1382		io.Copy(&snapshot, ringBuffer)
1383		err = &smithy.DeserializationError{
1384			Err:      fmt.Errorf("failed to decode response body, %w", err),
1385			Snapshot: snapshot.Bytes(),
1386		}
1387		return err
1388	}
1389
1390	errorBody.Seek(0, io.SeekStart)
1391	if len(code) != 0 {
1392		errorCode = restjson.SanitizeErrorCode(code)
1393	}
1394	if len(message) != 0 {
1395		errorMessage = message
1396	}
1397
1398	switch {
1399	case strings.EqualFold("DirectConnectClientException", errorCode):
1400		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1401
1402	case strings.EqualFold("DirectConnectServerException", errorCode):
1403		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1404
1405	default:
1406		genericError := &smithy.GenericAPIError{
1407			Code:    errorCode,
1408			Message: errorMessage,
1409		}
1410		return genericError
1411
1412	}
1413}
1414
1415type awsAwsjson11_deserializeOpConfirmTransitVirtualInterface struct {
1416}
1417
1418func (*awsAwsjson11_deserializeOpConfirmTransitVirtualInterface) ID() string {
1419	return "OperationDeserializer"
1420}
1421
1422func (m *awsAwsjson11_deserializeOpConfirmTransitVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1423	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1424) {
1425	out, metadata, err = next.HandleDeserialize(ctx, in)
1426	if err != nil {
1427		return out, metadata, err
1428	}
1429
1430	response, ok := out.RawResponse.(*smithyhttp.Response)
1431	if !ok {
1432		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1433	}
1434
1435	if response.StatusCode < 200 || response.StatusCode >= 300 {
1436		return out, metadata, awsAwsjson11_deserializeOpErrorConfirmTransitVirtualInterface(response, &metadata)
1437	}
1438	output := &ConfirmTransitVirtualInterfaceOutput{}
1439	out.Result = output
1440
1441	var buff [1024]byte
1442	ringBuffer := smithyio.NewRingBuffer(buff[:])
1443
1444	body := io.TeeReader(response.Body, ringBuffer)
1445	decoder := json.NewDecoder(body)
1446	decoder.UseNumber()
1447	var shape interface{}
1448	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1449		var snapshot bytes.Buffer
1450		io.Copy(&snapshot, ringBuffer)
1451		err = &smithy.DeserializationError{
1452			Err:      fmt.Errorf("failed to decode response body, %w", err),
1453			Snapshot: snapshot.Bytes(),
1454		}
1455		return out, metadata, err
1456	}
1457
1458	err = awsAwsjson11_deserializeOpDocumentConfirmTransitVirtualInterfaceOutput(&output, shape)
1459	if err != nil {
1460		var snapshot bytes.Buffer
1461		io.Copy(&snapshot, ringBuffer)
1462		err = &smithy.DeserializationError{
1463			Err:      fmt.Errorf("failed to decode response body, %w", err),
1464			Snapshot: snapshot.Bytes(),
1465		}
1466		return out, metadata, err
1467	}
1468
1469	return out, metadata, err
1470}
1471
1472func awsAwsjson11_deserializeOpErrorConfirmTransitVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1473	var errorBuffer bytes.Buffer
1474	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1475		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1476	}
1477	errorBody := bytes.NewReader(errorBuffer.Bytes())
1478
1479	errorCode := "UnknownError"
1480	errorMessage := errorCode
1481
1482	code := response.Header.Get("X-Amzn-ErrorType")
1483	if len(code) != 0 {
1484		errorCode = restjson.SanitizeErrorCode(code)
1485	}
1486
1487	var buff [1024]byte
1488	ringBuffer := smithyio.NewRingBuffer(buff[:])
1489
1490	body := io.TeeReader(errorBody, ringBuffer)
1491	decoder := json.NewDecoder(body)
1492	decoder.UseNumber()
1493	code, message, err := restjson.GetErrorInfo(decoder)
1494	if err != nil {
1495		var snapshot bytes.Buffer
1496		io.Copy(&snapshot, ringBuffer)
1497		err = &smithy.DeserializationError{
1498			Err:      fmt.Errorf("failed to decode response body, %w", err),
1499			Snapshot: snapshot.Bytes(),
1500		}
1501		return err
1502	}
1503
1504	errorBody.Seek(0, io.SeekStart)
1505	if len(code) != 0 {
1506		errorCode = restjson.SanitizeErrorCode(code)
1507	}
1508	if len(message) != 0 {
1509		errorMessage = message
1510	}
1511
1512	switch {
1513	case strings.EqualFold("DirectConnectClientException", errorCode):
1514		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1515
1516	case strings.EqualFold("DirectConnectServerException", errorCode):
1517		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1518
1519	default:
1520		genericError := &smithy.GenericAPIError{
1521			Code:    errorCode,
1522			Message: errorMessage,
1523		}
1524		return genericError
1525
1526	}
1527}
1528
1529type awsAwsjson11_deserializeOpCreateBGPPeer struct {
1530}
1531
1532func (*awsAwsjson11_deserializeOpCreateBGPPeer) ID() string {
1533	return "OperationDeserializer"
1534}
1535
1536func (m *awsAwsjson11_deserializeOpCreateBGPPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1537	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1538) {
1539	out, metadata, err = next.HandleDeserialize(ctx, in)
1540	if err != nil {
1541		return out, metadata, err
1542	}
1543
1544	response, ok := out.RawResponse.(*smithyhttp.Response)
1545	if !ok {
1546		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1547	}
1548
1549	if response.StatusCode < 200 || response.StatusCode >= 300 {
1550		return out, metadata, awsAwsjson11_deserializeOpErrorCreateBGPPeer(response, &metadata)
1551	}
1552	output := &CreateBGPPeerOutput{}
1553	out.Result = output
1554
1555	var buff [1024]byte
1556	ringBuffer := smithyio.NewRingBuffer(buff[:])
1557
1558	body := io.TeeReader(response.Body, ringBuffer)
1559	decoder := json.NewDecoder(body)
1560	decoder.UseNumber()
1561	var shape interface{}
1562	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1563		var snapshot bytes.Buffer
1564		io.Copy(&snapshot, ringBuffer)
1565		err = &smithy.DeserializationError{
1566			Err:      fmt.Errorf("failed to decode response body, %w", err),
1567			Snapshot: snapshot.Bytes(),
1568		}
1569		return out, metadata, err
1570	}
1571
1572	err = awsAwsjson11_deserializeOpDocumentCreateBGPPeerOutput(&output, shape)
1573	if err != nil {
1574		var snapshot bytes.Buffer
1575		io.Copy(&snapshot, ringBuffer)
1576		err = &smithy.DeserializationError{
1577			Err:      fmt.Errorf("failed to decode response body, %w", err),
1578			Snapshot: snapshot.Bytes(),
1579		}
1580		return out, metadata, err
1581	}
1582
1583	return out, metadata, err
1584}
1585
1586func awsAwsjson11_deserializeOpErrorCreateBGPPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1587	var errorBuffer bytes.Buffer
1588	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1589		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1590	}
1591	errorBody := bytes.NewReader(errorBuffer.Bytes())
1592
1593	errorCode := "UnknownError"
1594	errorMessage := errorCode
1595
1596	code := response.Header.Get("X-Amzn-ErrorType")
1597	if len(code) != 0 {
1598		errorCode = restjson.SanitizeErrorCode(code)
1599	}
1600
1601	var buff [1024]byte
1602	ringBuffer := smithyio.NewRingBuffer(buff[:])
1603
1604	body := io.TeeReader(errorBody, ringBuffer)
1605	decoder := json.NewDecoder(body)
1606	decoder.UseNumber()
1607	code, message, err := restjson.GetErrorInfo(decoder)
1608	if err != nil {
1609		var snapshot bytes.Buffer
1610		io.Copy(&snapshot, ringBuffer)
1611		err = &smithy.DeserializationError{
1612			Err:      fmt.Errorf("failed to decode response body, %w", err),
1613			Snapshot: snapshot.Bytes(),
1614		}
1615		return err
1616	}
1617
1618	errorBody.Seek(0, io.SeekStart)
1619	if len(code) != 0 {
1620		errorCode = restjson.SanitizeErrorCode(code)
1621	}
1622	if len(message) != 0 {
1623		errorMessage = message
1624	}
1625
1626	switch {
1627	case strings.EqualFold("DirectConnectClientException", errorCode):
1628		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1629
1630	case strings.EqualFold("DirectConnectServerException", errorCode):
1631		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1632
1633	default:
1634		genericError := &smithy.GenericAPIError{
1635			Code:    errorCode,
1636			Message: errorMessage,
1637		}
1638		return genericError
1639
1640	}
1641}
1642
1643type awsAwsjson11_deserializeOpCreateConnection struct {
1644}
1645
1646func (*awsAwsjson11_deserializeOpCreateConnection) ID() string {
1647	return "OperationDeserializer"
1648}
1649
1650func (m *awsAwsjson11_deserializeOpCreateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1651	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1652) {
1653	out, metadata, err = next.HandleDeserialize(ctx, in)
1654	if err != nil {
1655		return out, metadata, err
1656	}
1657
1658	response, ok := out.RawResponse.(*smithyhttp.Response)
1659	if !ok {
1660		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1661	}
1662
1663	if response.StatusCode < 200 || response.StatusCode >= 300 {
1664		return out, metadata, awsAwsjson11_deserializeOpErrorCreateConnection(response, &metadata)
1665	}
1666	output := &CreateConnectionOutput{}
1667	out.Result = output
1668
1669	var buff [1024]byte
1670	ringBuffer := smithyio.NewRingBuffer(buff[:])
1671
1672	body := io.TeeReader(response.Body, ringBuffer)
1673	decoder := json.NewDecoder(body)
1674	decoder.UseNumber()
1675	var shape interface{}
1676	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1677		var snapshot bytes.Buffer
1678		io.Copy(&snapshot, ringBuffer)
1679		err = &smithy.DeserializationError{
1680			Err:      fmt.Errorf("failed to decode response body, %w", err),
1681			Snapshot: snapshot.Bytes(),
1682		}
1683		return out, metadata, err
1684	}
1685
1686	err = awsAwsjson11_deserializeOpDocumentCreateConnectionOutput(&output, shape)
1687	if err != nil {
1688		var snapshot bytes.Buffer
1689		io.Copy(&snapshot, ringBuffer)
1690		err = &smithy.DeserializationError{
1691			Err:      fmt.Errorf("failed to decode response body, %w", err),
1692			Snapshot: snapshot.Bytes(),
1693		}
1694		return out, metadata, err
1695	}
1696
1697	return out, metadata, err
1698}
1699
1700func awsAwsjson11_deserializeOpErrorCreateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1701	var errorBuffer bytes.Buffer
1702	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1703		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1704	}
1705	errorBody := bytes.NewReader(errorBuffer.Bytes())
1706
1707	errorCode := "UnknownError"
1708	errorMessage := errorCode
1709
1710	code := response.Header.Get("X-Amzn-ErrorType")
1711	if len(code) != 0 {
1712		errorCode = restjson.SanitizeErrorCode(code)
1713	}
1714
1715	var buff [1024]byte
1716	ringBuffer := smithyio.NewRingBuffer(buff[:])
1717
1718	body := io.TeeReader(errorBody, ringBuffer)
1719	decoder := json.NewDecoder(body)
1720	decoder.UseNumber()
1721	code, message, err := restjson.GetErrorInfo(decoder)
1722	if err != nil {
1723		var snapshot bytes.Buffer
1724		io.Copy(&snapshot, ringBuffer)
1725		err = &smithy.DeserializationError{
1726			Err:      fmt.Errorf("failed to decode response body, %w", err),
1727			Snapshot: snapshot.Bytes(),
1728		}
1729		return err
1730	}
1731
1732	errorBody.Seek(0, io.SeekStart)
1733	if len(code) != 0 {
1734		errorCode = restjson.SanitizeErrorCode(code)
1735	}
1736	if len(message) != 0 {
1737		errorMessage = message
1738	}
1739
1740	switch {
1741	case strings.EqualFold("DirectConnectClientException", errorCode):
1742		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1743
1744	case strings.EqualFold("DirectConnectServerException", errorCode):
1745		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1746
1747	case strings.EqualFold("DuplicateTagKeysException", errorCode):
1748		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
1749
1750	case strings.EqualFold("TooManyTagsException", errorCode):
1751		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
1752
1753	default:
1754		genericError := &smithy.GenericAPIError{
1755			Code:    errorCode,
1756			Message: errorMessage,
1757		}
1758		return genericError
1759
1760	}
1761}
1762
1763type awsAwsjson11_deserializeOpCreateDirectConnectGateway struct {
1764}
1765
1766func (*awsAwsjson11_deserializeOpCreateDirectConnectGateway) ID() string {
1767	return "OperationDeserializer"
1768}
1769
1770func (m *awsAwsjson11_deserializeOpCreateDirectConnectGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1771	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1772) {
1773	out, metadata, err = next.HandleDeserialize(ctx, in)
1774	if err != nil {
1775		return out, metadata, err
1776	}
1777
1778	response, ok := out.RawResponse.(*smithyhttp.Response)
1779	if !ok {
1780		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1781	}
1782
1783	if response.StatusCode < 200 || response.StatusCode >= 300 {
1784		return out, metadata, awsAwsjson11_deserializeOpErrorCreateDirectConnectGateway(response, &metadata)
1785	}
1786	output := &CreateDirectConnectGatewayOutput{}
1787	out.Result = output
1788
1789	var buff [1024]byte
1790	ringBuffer := smithyio.NewRingBuffer(buff[:])
1791
1792	body := io.TeeReader(response.Body, ringBuffer)
1793	decoder := json.NewDecoder(body)
1794	decoder.UseNumber()
1795	var shape interface{}
1796	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1797		var snapshot bytes.Buffer
1798		io.Copy(&snapshot, ringBuffer)
1799		err = &smithy.DeserializationError{
1800			Err:      fmt.Errorf("failed to decode response body, %w", err),
1801			Snapshot: snapshot.Bytes(),
1802		}
1803		return out, metadata, err
1804	}
1805
1806	err = awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayOutput(&output, shape)
1807	if err != nil {
1808		var snapshot bytes.Buffer
1809		io.Copy(&snapshot, ringBuffer)
1810		err = &smithy.DeserializationError{
1811			Err:      fmt.Errorf("failed to decode response body, %w", err),
1812			Snapshot: snapshot.Bytes(),
1813		}
1814		return out, metadata, err
1815	}
1816
1817	return out, metadata, err
1818}
1819
1820func awsAwsjson11_deserializeOpErrorCreateDirectConnectGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1821	var errorBuffer bytes.Buffer
1822	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1823		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1824	}
1825	errorBody := bytes.NewReader(errorBuffer.Bytes())
1826
1827	errorCode := "UnknownError"
1828	errorMessage := errorCode
1829
1830	code := response.Header.Get("X-Amzn-ErrorType")
1831	if len(code) != 0 {
1832		errorCode = restjson.SanitizeErrorCode(code)
1833	}
1834
1835	var buff [1024]byte
1836	ringBuffer := smithyio.NewRingBuffer(buff[:])
1837
1838	body := io.TeeReader(errorBody, ringBuffer)
1839	decoder := json.NewDecoder(body)
1840	decoder.UseNumber()
1841	code, message, err := restjson.GetErrorInfo(decoder)
1842	if err != nil {
1843		var snapshot bytes.Buffer
1844		io.Copy(&snapshot, ringBuffer)
1845		err = &smithy.DeserializationError{
1846			Err:      fmt.Errorf("failed to decode response body, %w", err),
1847			Snapshot: snapshot.Bytes(),
1848		}
1849		return err
1850	}
1851
1852	errorBody.Seek(0, io.SeekStart)
1853	if len(code) != 0 {
1854		errorCode = restjson.SanitizeErrorCode(code)
1855	}
1856	if len(message) != 0 {
1857		errorMessage = message
1858	}
1859
1860	switch {
1861	case strings.EqualFold("DirectConnectClientException", errorCode):
1862		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1863
1864	case strings.EqualFold("DirectConnectServerException", errorCode):
1865		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1866
1867	default:
1868		genericError := &smithy.GenericAPIError{
1869			Code:    errorCode,
1870			Message: errorMessage,
1871		}
1872		return genericError
1873
1874	}
1875}
1876
1877type awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociation struct {
1878}
1879
1880func (*awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociation) ID() string {
1881	return "OperationDeserializer"
1882}
1883
1884func (m *awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1885	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
1886) {
1887	out, metadata, err = next.HandleDeserialize(ctx, in)
1888	if err != nil {
1889		return out, metadata, err
1890	}
1891
1892	response, ok := out.RawResponse.(*smithyhttp.Response)
1893	if !ok {
1894		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
1895	}
1896
1897	if response.StatusCode < 200 || response.StatusCode >= 300 {
1898		return out, metadata, awsAwsjson11_deserializeOpErrorCreateDirectConnectGatewayAssociation(response, &metadata)
1899	}
1900	output := &CreateDirectConnectGatewayAssociationOutput{}
1901	out.Result = output
1902
1903	var buff [1024]byte
1904	ringBuffer := smithyio.NewRingBuffer(buff[:])
1905
1906	body := io.TeeReader(response.Body, ringBuffer)
1907	decoder := json.NewDecoder(body)
1908	decoder.UseNumber()
1909	var shape interface{}
1910	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
1911		var snapshot bytes.Buffer
1912		io.Copy(&snapshot, ringBuffer)
1913		err = &smithy.DeserializationError{
1914			Err:      fmt.Errorf("failed to decode response body, %w", err),
1915			Snapshot: snapshot.Bytes(),
1916		}
1917		return out, metadata, err
1918	}
1919
1920	err = awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayAssociationOutput(&output, shape)
1921	if err != nil {
1922		var snapshot bytes.Buffer
1923		io.Copy(&snapshot, ringBuffer)
1924		err = &smithy.DeserializationError{
1925			Err:      fmt.Errorf("failed to decode response body, %w", err),
1926			Snapshot: snapshot.Bytes(),
1927		}
1928		return out, metadata, err
1929	}
1930
1931	return out, metadata, err
1932}
1933
1934func awsAwsjson11_deserializeOpErrorCreateDirectConnectGatewayAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
1935	var errorBuffer bytes.Buffer
1936	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
1937		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
1938	}
1939	errorBody := bytes.NewReader(errorBuffer.Bytes())
1940
1941	errorCode := "UnknownError"
1942	errorMessage := errorCode
1943
1944	code := response.Header.Get("X-Amzn-ErrorType")
1945	if len(code) != 0 {
1946		errorCode = restjson.SanitizeErrorCode(code)
1947	}
1948
1949	var buff [1024]byte
1950	ringBuffer := smithyio.NewRingBuffer(buff[:])
1951
1952	body := io.TeeReader(errorBody, ringBuffer)
1953	decoder := json.NewDecoder(body)
1954	decoder.UseNumber()
1955	code, message, err := restjson.GetErrorInfo(decoder)
1956	if err != nil {
1957		var snapshot bytes.Buffer
1958		io.Copy(&snapshot, ringBuffer)
1959		err = &smithy.DeserializationError{
1960			Err:      fmt.Errorf("failed to decode response body, %w", err),
1961			Snapshot: snapshot.Bytes(),
1962		}
1963		return err
1964	}
1965
1966	errorBody.Seek(0, io.SeekStart)
1967	if len(code) != 0 {
1968		errorCode = restjson.SanitizeErrorCode(code)
1969	}
1970	if len(message) != 0 {
1971		errorMessage = message
1972	}
1973
1974	switch {
1975	case strings.EqualFold("DirectConnectClientException", errorCode):
1976		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
1977
1978	case strings.EqualFold("DirectConnectServerException", errorCode):
1979		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
1980
1981	default:
1982		genericError := &smithy.GenericAPIError{
1983			Code:    errorCode,
1984			Message: errorMessage,
1985		}
1986		return genericError
1987
1988	}
1989}
1990
1991type awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociationProposal struct {
1992}
1993
1994func (*awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociationProposal) ID() string {
1995	return "OperationDeserializer"
1996}
1997
1998func (m *awsAwsjson11_deserializeOpCreateDirectConnectGatewayAssociationProposal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
1999	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2000) {
2001	out, metadata, err = next.HandleDeserialize(ctx, in)
2002	if err != nil {
2003		return out, metadata, err
2004	}
2005
2006	response, ok := out.RawResponse.(*smithyhttp.Response)
2007	if !ok {
2008		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2009	}
2010
2011	if response.StatusCode < 200 || response.StatusCode >= 300 {
2012		return out, metadata, awsAwsjson11_deserializeOpErrorCreateDirectConnectGatewayAssociationProposal(response, &metadata)
2013	}
2014	output := &CreateDirectConnectGatewayAssociationProposalOutput{}
2015	out.Result = output
2016
2017	var buff [1024]byte
2018	ringBuffer := smithyio.NewRingBuffer(buff[:])
2019
2020	body := io.TeeReader(response.Body, ringBuffer)
2021	decoder := json.NewDecoder(body)
2022	decoder.UseNumber()
2023	var shape interface{}
2024	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2025		var snapshot bytes.Buffer
2026		io.Copy(&snapshot, ringBuffer)
2027		err = &smithy.DeserializationError{
2028			Err:      fmt.Errorf("failed to decode response body, %w", err),
2029			Snapshot: snapshot.Bytes(),
2030		}
2031		return out, metadata, err
2032	}
2033
2034	err = awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayAssociationProposalOutput(&output, shape)
2035	if err != nil {
2036		var snapshot bytes.Buffer
2037		io.Copy(&snapshot, ringBuffer)
2038		err = &smithy.DeserializationError{
2039			Err:      fmt.Errorf("failed to decode response body, %w", err),
2040			Snapshot: snapshot.Bytes(),
2041		}
2042		return out, metadata, err
2043	}
2044
2045	return out, metadata, err
2046}
2047
2048func awsAwsjson11_deserializeOpErrorCreateDirectConnectGatewayAssociationProposal(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2049	var errorBuffer bytes.Buffer
2050	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2051		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2052	}
2053	errorBody := bytes.NewReader(errorBuffer.Bytes())
2054
2055	errorCode := "UnknownError"
2056	errorMessage := errorCode
2057
2058	code := response.Header.Get("X-Amzn-ErrorType")
2059	if len(code) != 0 {
2060		errorCode = restjson.SanitizeErrorCode(code)
2061	}
2062
2063	var buff [1024]byte
2064	ringBuffer := smithyio.NewRingBuffer(buff[:])
2065
2066	body := io.TeeReader(errorBody, ringBuffer)
2067	decoder := json.NewDecoder(body)
2068	decoder.UseNumber()
2069	code, message, err := restjson.GetErrorInfo(decoder)
2070	if err != nil {
2071		var snapshot bytes.Buffer
2072		io.Copy(&snapshot, ringBuffer)
2073		err = &smithy.DeserializationError{
2074			Err:      fmt.Errorf("failed to decode response body, %w", err),
2075			Snapshot: snapshot.Bytes(),
2076		}
2077		return err
2078	}
2079
2080	errorBody.Seek(0, io.SeekStart)
2081	if len(code) != 0 {
2082		errorCode = restjson.SanitizeErrorCode(code)
2083	}
2084	if len(message) != 0 {
2085		errorMessage = message
2086	}
2087
2088	switch {
2089	case strings.EqualFold("DirectConnectClientException", errorCode):
2090		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2091
2092	case strings.EqualFold("DirectConnectServerException", errorCode):
2093		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2094
2095	default:
2096		genericError := &smithy.GenericAPIError{
2097			Code:    errorCode,
2098			Message: errorMessage,
2099		}
2100		return genericError
2101
2102	}
2103}
2104
2105type awsAwsjson11_deserializeOpCreateInterconnect struct {
2106}
2107
2108func (*awsAwsjson11_deserializeOpCreateInterconnect) ID() string {
2109	return "OperationDeserializer"
2110}
2111
2112func (m *awsAwsjson11_deserializeOpCreateInterconnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2113	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2114) {
2115	out, metadata, err = next.HandleDeserialize(ctx, in)
2116	if err != nil {
2117		return out, metadata, err
2118	}
2119
2120	response, ok := out.RawResponse.(*smithyhttp.Response)
2121	if !ok {
2122		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2123	}
2124
2125	if response.StatusCode < 200 || response.StatusCode >= 300 {
2126		return out, metadata, awsAwsjson11_deserializeOpErrorCreateInterconnect(response, &metadata)
2127	}
2128	output := &CreateInterconnectOutput{}
2129	out.Result = output
2130
2131	var buff [1024]byte
2132	ringBuffer := smithyio.NewRingBuffer(buff[:])
2133
2134	body := io.TeeReader(response.Body, ringBuffer)
2135	decoder := json.NewDecoder(body)
2136	decoder.UseNumber()
2137	var shape interface{}
2138	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2139		var snapshot bytes.Buffer
2140		io.Copy(&snapshot, ringBuffer)
2141		err = &smithy.DeserializationError{
2142			Err:      fmt.Errorf("failed to decode response body, %w", err),
2143			Snapshot: snapshot.Bytes(),
2144		}
2145		return out, metadata, err
2146	}
2147
2148	err = awsAwsjson11_deserializeOpDocumentCreateInterconnectOutput(&output, shape)
2149	if err != nil {
2150		var snapshot bytes.Buffer
2151		io.Copy(&snapshot, ringBuffer)
2152		err = &smithy.DeserializationError{
2153			Err:      fmt.Errorf("failed to decode response body, %w", err),
2154			Snapshot: snapshot.Bytes(),
2155		}
2156		return out, metadata, err
2157	}
2158
2159	return out, metadata, err
2160}
2161
2162func awsAwsjson11_deserializeOpErrorCreateInterconnect(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2163	var errorBuffer bytes.Buffer
2164	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2165		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2166	}
2167	errorBody := bytes.NewReader(errorBuffer.Bytes())
2168
2169	errorCode := "UnknownError"
2170	errorMessage := errorCode
2171
2172	code := response.Header.Get("X-Amzn-ErrorType")
2173	if len(code) != 0 {
2174		errorCode = restjson.SanitizeErrorCode(code)
2175	}
2176
2177	var buff [1024]byte
2178	ringBuffer := smithyio.NewRingBuffer(buff[:])
2179
2180	body := io.TeeReader(errorBody, ringBuffer)
2181	decoder := json.NewDecoder(body)
2182	decoder.UseNumber()
2183	code, message, err := restjson.GetErrorInfo(decoder)
2184	if err != nil {
2185		var snapshot bytes.Buffer
2186		io.Copy(&snapshot, ringBuffer)
2187		err = &smithy.DeserializationError{
2188			Err:      fmt.Errorf("failed to decode response body, %w", err),
2189			Snapshot: snapshot.Bytes(),
2190		}
2191		return err
2192	}
2193
2194	errorBody.Seek(0, io.SeekStart)
2195	if len(code) != 0 {
2196		errorCode = restjson.SanitizeErrorCode(code)
2197	}
2198	if len(message) != 0 {
2199		errorMessage = message
2200	}
2201
2202	switch {
2203	case strings.EqualFold("DirectConnectClientException", errorCode):
2204		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2205
2206	case strings.EqualFold("DirectConnectServerException", errorCode):
2207		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2208
2209	case strings.EqualFold("DuplicateTagKeysException", errorCode):
2210		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
2211
2212	case strings.EqualFold("TooManyTagsException", errorCode):
2213		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
2214
2215	default:
2216		genericError := &smithy.GenericAPIError{
2217			Code:    errorCode,
2218			Message: errorMessage,
2219		}
2220		return genericError
2221
2222	}
2223}
2224
2225type awsAwsjson11_deserializeOpCreateLag struct {
2226}
2227
2228func (*awsAwsjson11_deserializeOpCreateLag) ID() string {
2229	return "OperationDeserializer"
2230}
2231
2232func (m *awsAwsjson11_deserializeOpCreateLag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2233	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2234) {
2235	out, metadata, err = next.HandleDeserialize(ctx, in)
2236	if err != nil {
2237		return out, metadata, err
2238	}
2239
2240	response, ok := out.RawResponse.(*smithyhttp.Response)
2241	if !ok {
2242		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2243	}
2244
2245	if response.StatusCode < 200 || response.StatusCode >= 300 {
2246		return out, metadata, awsAwsjson11_deserializeOpErrorCreateLag(response, &metadata)
2247	}
2248	output := &CreateLagOutput{}
2249	out.Result = output
2250
2251	var buff [1024]byte
2252	ringBuffer := smithyio.NewRingBuffer(buff[:])
2253
2254	body := io.TeeReader(response.Body, ringBuffer)
2255	decoder := json.NewDecoder(body)
2256	decoder.UseNumber()
2257	var shape interface{}
2258	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2259		var snapshot bytes.Buffer
2260		io.Copy(&snapshot, ringBuffer)
2261		err = &smithy.DeserializationError{
2262			Err:      fmt.Errorf("failed to decode response body, %w", err),
2263			Snapshot: snapshot.Bytes(),
2264		}
2265		return out, metadata, err
2266	}
2267
2268	err = awsAwsjson11_deserializeOpDocumentCreateLagOutput(&output, shape)
2269	if err != nil {
2270		var snapshot bytes.Buffer
2271		io.Copy(&snapshot, ringBuffer)
2272		err = &smithy.DeserializationError{
2273			Err:      fmt.Errorf("failed to decode response body, %w", err),
2274			Snapshot: snapshot.Bytes(),
2275		}
2276		return out, metadata, err
2277	}
2278
2279	return out, metadata, err
2280}
2281
2282func awsAwsjson11_deserializeOpErrorCreateLag(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2283	var errorBuffer bytes.Buffer
2284	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2285		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2286	}
2287	errorBody := bytes.NewReader(errorBuffer.Bytes())
2288
2289	errorCode := "UnknownError"
2290	errorMessage := errorCode
2291
2292	code := response.Header.Get("X-Amzn-ErrorType")
2293	if len(code) != 0 {
2294		errorCode = restjson.SanitizeErrorCode(code)
2295	}
2296
2297	var buff [1024]byte
2298	ringBuffer := smithyio.NewRingBuffer(buff[:])
2299
2300	body := io.TeeReader(errorBody, ringBuffer)
2301	decoder := json.NewDecoder(body)
2302	decoder.UseNumber()
2303	code, message, err := restjson.GetErrorInfo(decoder)
2304	if err != nil {
2305		var snapshot bytes.Buffer
2306		io.Copy(&snapshot, ringBuffer)
2307		err = &smithy.DeserializationError{
2308			Err:      fmt.Errorf("failed to decode response body, %w", err),
2309			Snapshot: snapshot.Bytes(),
2310		}
2311		return err
2312	}
2313
2314	errorBody.Seek(0, io.SeekStart)
2315	if len(code) != 0 {
2316		errorCode = restjson.SanitizeErrorCode(code)
2317	}
2318	if len(message) != 0 {
2319		errorMessage = message
2320	}
2321
2322	switch {
2323	case strings.EqualFold("DirectConnectClientException", errorCode):
2324		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2325
2326	case strings.EqualFold("DirectConnectServerException", errorCode):
2327		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2328
2329	case strings.EqualFold("DuplicateTagKeysException", errorCode):
2330		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
2331
2332	case strings.EqualFold("TooManyTagsException", errorCode):
2333		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
2334
2335	default:
2336		genericError := &smithy.GenericAPIError{
2337			Code:    errorCode,
2338			Message: errorMessage,
2339		}
2340		return genericError
2341
2342	}
2343}
2344
2345type awsAwsjson11_deserializeOpCreatePrivateVirtualInterface struct {
2346}
2347
2348func (*awsAwsjson11_deserializeOpCreatePrivateVirtualInterface) ID() string {
2349	return "OperationDeserializer"
2350}
2351
2352func (m *awsAwsjson11_deserializeOpCreatePrivateVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2353	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2354) {
2355	out, metadata, err = next.HandleDeserialize(ctx, in)
2356	if err != nil {
2357		return out, metadata, err
2358	}
2359
2360	response, ok := out.RawResponse.(*smithyhttp.Response)
2361	if !ok {
2362		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2363	}
2364
2365	if response.StatusCode < 200 || response.StatusCode >= 300 {
2366		return out, metadata, awsAwsjson11_deserializeOpErrorCreatePrivateVirtualInterface(response, &metadata)
2367	}
2368	output := &CreatePrivateVirtualInterfaceOutput{}
2369	out.Result = output
2370
2371	var buff [1024]byte
2372	ringBuffer := smithyio.NewRingBuffer(buff[:])
2373
2374	body := io.TeeReader(response.Body, ringBuffer)
2375	decoder := json.NewDecoder(body)
2376	decoder.UseNumber()
2377	var shape interface{}
2378	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2379		var snapshot bytes.Buffer
2380		io.Copy(&snapshot, ringBuffer)
2381		err = &smithy.DeserializationError{
2382			Err:      fmt.Errorf("failed to decode response body, %w", err),
2383			Snapshot: snapshot.Bytes(),
2384		}
2385		return out, metadata, err
2386	}
2387
2388	err = awsAwsjson11_deserializeOpDocumentCreatePrivateVirtualInterfaceOutput(&output, shape)
2389	if err != nil {
2390		var snapshot bytes.Buffer
2391		io.Copy(&snapshot, ringBuffer)
2392		err = &smithy.DeserializationError{
2393			Err:      fmt.Errorf("failed to decode response body, %w", err),
2394			Snapshot: snapshot.Bytes(),
2395		}
2396		return out, metadata, err
2397	}
2398
2399	return out, metadata, err
2400}
2401
2402func awsAwsjson11_deserializeOpErrorCreatePrivateVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2403	var errorBuffer bytes.Buffer
2404	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2405		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2406	}
2407	errorBody := bytes.NewReader(errorBuffer.Bytes())
2408
2409	errorCode := "UnknownError"
2410	errorMessage := errorCode
2411
2412	code := response.Header.Get("X-Amzn-ErrorType")
2413	if len(code) != 0 {
2414		errorCode = restjson.SanitizeErrorCode(code)
2415	}
2416
2417	var buff [1024]byte
2418	ringBuffer := smithyio.NewRingBuffer(buff[:])
2419
2420	body := io.TeeReader(errorBody, ringBuffer)
2421	decoder := json.NewDecoder(body)
2422	decoder.UseNumber()
2423	code, message, err := restjson.GetErrorInfo(decoder)
2424	if err != nil {
2425		var snapshot bytes.Buffer
2426		io.Copy(&snapshot, ringBuffer)
2427		err = &smithy.DeserializationError{
2428			Err:      fmt.Errorf("failed to decode response body, %w", err),
2429			Snapshot: snapshot.Bytes(),
2430		}
2431		return err
2432	}
2433
2434	errorBody.Seek(0, io.SeekStart)
2435	if len(code) != 0 {
2436		errorCode = restjson.SanitizeErrorCode(code)
2437	}
2438	if len(message) != 0 {
2439		errorMessage = message
2440	}
2441
2442	switch {
2443	case strings.EqualFold("DirectConnectClientException", errorCode):
2444		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2445
2446	case strings.EqualFold("DirectConnectServerException", errorCode):
2447		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2448
2449	case strings.EqualFold("DuplicateTagKeysException", errorCode):
2450		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
2451
2452	case strings.EqualFold("TooManyTagsException", errorCode):
2453		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
2454
2455	default:
2456		genericError := &smithy.GenericAPIError{
2457			Code:    errorCode,
2458			Message: errorMessage,
2459		}
2460		return genericError
2461
2462	}
2463}
2464
2465type awsAwsjson11_deserializeOpCreatePublicVirtualInterface struct {
2466}
2467
2468func (*awsAwsjson11_deserializeOpCreatePublicVirtualInterface) ID() string {
2469	return "OperationDeserializer"
2470}
2471
2472func (m *awsAwsjson11_deserializeOpCreatePublicVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2473	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2474) {
2475	out, metadata, err = next.HandleDeserialize(ctx, in)
2476	if err != nil {
2477		return out, metadata, err
2478	}
2479
2480	response, ok := out.RawResponse.(*smithyhttp.Response)
2481	if !ok {
2482		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2483	}
2484
2485	if response.StatusCode < 200 || response.StatusCode >= 300 {
2486		return out, metadata, awsAwsjson11_deserializeOpErrorCreatePublicVirtualInterface(response, &metadata)
2487	}
2488	output := &CreatePublicVirtualInterfaceOutput{}
2489	out.Result = output
2490
2491	var buff [1024]byte
2492	ringBuffer := smithyio.NewRingBuffer(buff[:])
2493
2494	body := io.TeeReader(response.Body, ringBuffer)
2495	decoder := json.NewDecoder(body)
2496	decoder.UseNumber()
2497	var shape interface{}
2498	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2499		var snapshot bytes.Buffer
2500		io.Copy(&snapshot, ringBuffer)
2501		err = &smithy.DeserializationError{
2502			Err:      fmt.Errorf("failed to decode response body, %w", err),
2503			Snapshot: snapshot.Bytes(),
2504		}
2505		return out, metadata, err
2506	}
2507
2508	err = awsAwsjson11_deserializeOpDocumentCreatePublicVirtualInterfaceOutput(&output, shape)
2509	if err != nil {
2510		var snapshot bytes.Buffer
2511		io.Copy(&snapshot, ringBuffer)
2512		err = &smithy.DeserializationError{
2513			Err:      fmt.Errorf("failed to decode response body, %w", err),
2514			Snapshot: snapshot.Bytes(),
2515		}
2516		return out, metadata, err
2517	}
2518
2519	return out, metadata, err
2520}
2521
2522func awsAwsjson11_deserializeOpErrorCreatePublicVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2523	var errorBuffer bytes.Buffer
2524	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2525		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2526	}
2527	errorBody := bytes.NewReader(errorBuffer.Bytes())
2528
2529	errorCode := "UnknownError"
2530	errorMessage := errorCode
2531
2532	code := response.Header.Get("X-Amzn-ErrorType")
2533	if len(code) != 0 {
2534		errorCode = restjson.SanitizeErrorCode(code)
2535	}
2536
2537	var buff [1024]byte
2538	ringBuffer := smithyio.NewRingBuffer(buff[:])
2539
2540	body := io.TeeReader(errorBody, ringBuffer)
2541	decoder := json.NewDecoder(body)
2542	decoder.UseNumber()
2543	code, message, err := restjson.GetErrorInfo(decoder)
2544	if err != nil {
2545		var snapshot bytes.Buffer
2546		io.Copy(&snapshot, ringBuffer)
2547		err = &smithy.DeserializationError{
2548			Err:      fmt.Errorf("failed to decode response body, %w", err),
2549			Snapshot: snapshot.Bytes(),
2550		}
2551		return err
2552	}
2553
2554	errorBody.Seek(0, io.SeekStart)
2555	if len(code) != 0 {
2556		errorCode = restjson.SanitizeErrorCode(code)
2557	}
2558	if len(message) != 0 {
2559		errorMessage = message
2560	}
2561
2562	switch {
2563	case strings.EqualFold("DirectConnectClientException", errorCode):
2564		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2565
2566	case strings.EqualFold("DirectConnectServerException", errorCode):
2567		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2568
2569	case strings.EqualFold("DuplicateTagKeysException", errorCode):
2570		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
2571
2572	case strings.EqualFold("TooManyTagsException", errorCode):
2573		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
2574
2575	default:
2576		genericError := &smithy.GenericAPIError{
2577			Code:    errorCode,
2578			Message: errorMessage,
2579		}
2580		return genericError
2581
2582	}
2583}
2584
2585type awsAwsjson11_deserializeOpCreateTransitVirtualInterface struct {
2586}
2587
2588func (*awsAwsjson11_deserializeOpCreateTransitVirtualInterface) ID() string {
2589	return "OperationDeserializer"
2590}
2591
2592func (m *awsAwsjson11_deserializeOpCreateTransitVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2593	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2594) {
2595	out, metadata, err = next.HandleDeserialize(ctx, in)
2596	if err != nil {
2597		return out, metadata, err
2598	}
2599
2600	response, ok := out.RawResponse.(*smithyhttp.Response)
2601	if !ok {
2602		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2603	}
2604
2605	if response.StatusCode < 200 || response.StatusCode >= 300 {
2606		return out, metadata, awsAwsjson11_deserializeOpErrorCreateTransitVirtualInterface(response, &metadata)
2607	}
2608	output := &CreateTransitVirtualInterfaceOutput{}
2609	out.Result = output
2610
2611	var buff [1024]byte
2612	ringBuffer := smithyio.NewRingBuffer(buff[:])
2613
2614	body := io.TeeReader(response.Body, ringBuffer)
2615	decoder := json.NewDecoder(body)
2616	decoder.UseNumber()
2617	var shape interface{}
2618	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2619		var snapshot bytes.Buffer
2620		io.Copy(&snapshot, ringBuffer)
2621		err = &smithy.DeserializationError{
2622			Err:      fmt.Errorf("failed to decode response body, %w", err),
2623			Snapshot: snapshot.Bytes(),
2624		}
2625		return out, metadata, err
2626	}
2627
2628	err = awsAwsjson11_deserializeOpDocumentCreateTransitVirtualInterfaceOutput(&output, shape)
2629	if err != nil {
2630		var snapshot bytes.Buffer
2631		io.Copy(&snapshot, ringBuffer)
2632		err = &smithy.DeserializationError{
2633			Err:      fmt.Errorf("failed to decode response body, %w", err),
2634			Snapshot: snapshot.Bytes(),
2635		}
2636		return out, metadata, err
2637	}
2638
2639	return out, metadata, err
2640}
2641
2642func awsAwsjson11_deserializeOpErrorCreateTransitVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2643	var errorBuffer bytes.Buffer
2644	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2645		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2646	}
2647	errorBody := bytes.NewReader(errorBuffer.Bytes())
2648
2649	errorCode := "UnknownError"
2650	errorMessage := errorCode
2651
2652	code := response.Header.Get("X-Amzn-ErrorType")
2653	if len(code) != 0 {
2654		errorCode = restjson.SanitizeErrorCode(code)
2655	}
2656
2657	var buff [1024]byte
2658	ringBuffer := smithyio.NewRingBuffer(buff[:])
2659
2660	body := io.TeeReader(errorBody, ringBuffer)
2661	decoder := json.NewDecoder(body)
2662	decoder.UseNumber()
2663	code, message, err := restjson.GetErrorInfo(decoder)
2664	if err != nil {
2665		var snapshot bytes.Buffer
2666		io.Copy(&snapshot, ringBuffer)
2667		err = &smithy.DeserializationError{
2668			Err:      fmt.Errorf("failed to decode response body, %w", err),
2669			Snapshot: snapshot.Bytes(),
2670		}
2671		return err
2672	}
2673
2674	errorBody.Seek(0, io.SeekStart)
2675	if len(code) != 0 {
2676		errorCode = restjson.SanitizeErrorCode(code)
2677	}
2678	if len(message) != 0 {
2679		errorMessage = message
2680	}
2681
2682	switch {
2683	case strings.EqualFold("DirectConnectClientException", errorCode):
2684		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2685
2686	case strings.EqualFold("DirectConnectServerException", errorCode):
2687		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2688
2689	case strings.EqualFold("DuplicateTagKeysException", errorCode):
2690		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
2691
2692	case strings.EqualFold("TooManyTagsException", errorCode):
2693		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
2694
2695	default:
2696		genericError := &smithy.GenericAPIError{
2697			Code:    errorCode,
2698			Message: errorMessage,
2699		}
2700		return genericError
2701
2702	}
2703}
2704
2705type awsAwsjson11_deserializeOpDeleteBGPPeer struct {
2706}
2707
2708func (*awsAwsjson11_deserializeOpDeleteBGPPeer) ID() string {
2709	return "OperationDeserializer"
2710}
2711
2712func (m *awsAwsjson11_deserializeOpDeleteBGPPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2713	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2714) {
2715	out, metadata, err = next.HandleDeserialize(ctx, in)
2716	if err != nil {
2717		return out, metadata, err
2718	}
2719
2720	response, ok := out.RawResponse.(*smithyhttp.Response)
2721	if !ok {
2722		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2723	}
2724
2725	if response.StatusCode < 200 || response.StatusCode >= 300 {
2726		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteBGPPeer(response, &metadata)
2727	}
2728	output := &DeleteBGPPeerOutput{}
2729	out.Result = output
2730
2731	var buff [1024]byte
2732	ringBuffer := smithyio.NewRingBuffer(buff[:])
2733
2734	body := io.TeeReader(response.Body, ringBuffer)
2735	decoder := json.NewDecoder(body)
2736	decoder.UseNumber()
2737	var shape interface{}
2738	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2739		var snapshot bytes.Buffer
2740		io.Copy(&snapshot, ringBuffer)
2741		err = &smithy.DeserializationError{
2742			Err:      fmt.Errorf("failed to decode response body, %w", err),
2743			Snapshot: snapshot.Bytes(),
2744		}
2745		return out, metadata, err
2746	}
2747
2748	err = awsAwsjson11_deserializeOpDocumentDeleteBGPPeerOutput(&output, shape)
2749	if err != nil {
2750		var snapshot bytes.Buffer
2751		io.Copy(&snapshot, ringBuffer)
2752		err = &smithy.DeserializationError{
2753			Err:      fmt.Errorf("failed to decode response body, %w", err),
2754			Snapshot: snapshot.Bytes(),
2755		}
2756		return out, metadata, err
2757	}
2758
2759	return out, metadata, err
2760}
2761
2762func awsAwsjson11_deserializeOpErrorDeleteBGPPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2763	var errorBuffer bytes.Buffer
2764	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2765		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2766	}
2767	errorBody := bytes.NewReader(errorBuffer.Bytes())
2768
2769	errorCode := "UnknownError"
2770	errorMessage := errorCode
2771
2772	code := response.Header.Get("X-Amzn-ErrorType")
2773	if len(code) != 0 {
2774		errorCode = restjson.SanitizeErrorCode(code)
2775	}
2776
2777	var buff [1024]byte
2778	ringBuffer := smithyio.NewRingBuffer(buff[:])
2779
2780	body := io.TeeReader(errorBody, ringBuffer)
2781	decoder := json.NewDecoder(body)
2782	decoder.UseNumber()
2783	code, message, err := restjson.GetErrorInfo(decoder)
2784	if err != nil {
2785		var snapshot bytes.Buffer
2786		io.Copy(&snapshot, ringBuffer)
2787		err = &smithy.DeserializationError{
2788			Err:      fmt.Errorf("failed to decode response body, %w", err),
2789			Snapshot: snapshot.Bytes(),
2790		}
2791		return err
2792	}
2793
2794	errorBody.Seek(0, io.SeekStart)
2795	if len(code) != 0 {
2796		errorCode = restjson.SanitizeErrorCode(code)
2797	}
2798	if len(message) != 0 {
2799		errorMessage = message
2800	}
2801
2802	switch {
2803	case strings.EqualFold("DirectConnectClientException", errorCode):
2804		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2805
2806	case strings.EqualFold("DirectConnectServerException", errorCode):
2807		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2808
2809	default:
2810		genericError := &smithy.GenericAPIError{
2811			Code:    errorCode,
2812			Message: errorMessage,
2813		}
2814		return genericError
2815
2816	}
2817}
2818
2819type awsAwsjson11_deserializeOpDeleteConnection struct {
2820}
2821
2822func (*awsAwsjson11_deserializeOpDeleteConnection) ID() string {
2823	return "OperationDeserializer"
2824}
2825
2826func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2827	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2828) {
2829	out, metadata, err = next.HandleDeserialize(ctx, in)
2830	if err != nil {
2831		return out, metadata, err
2832	}
2833
2834	response, ok := out.RawResponse.(*smithyhttp.Response)
2835	if !ok {
2836		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2837	}
2838
2839	if response.StatusCode < 200 || response.StatusCode >= 300 {
2840		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteConnection(response, &metadata)
2841	}
2842	output := &DeleteConnectionOutput{}
2843	out.Result = output
2844
2845	var buff [1024]byte
2846	ringBuffer := smithyio.NewRingBuffer(buff[:])
2847
2848	body := io.TeeReader(response.Body, ringBuffer)
2849	decoder := json.NewDecoder(body)
2850	decoder.UseNumber()
2851	var shape interface{}
2852	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2853		var snapshot bytes.Buffer
2854		io.Copy(&snapshot, ringBuffer)
2855		err = &smithy.DeserializationError{
2856			Err:      fmt.Errorf("failed to decode response body, %w", err),
2857			Snapshot: snapshot.Bytes(),
2858		}
2859		return out, metadata, err
2860	}
2861
2862	err = awsAwsjson11_deserializeOpDocumentDeleteConnectionOutput(&output, shape)
2863	if err != nil {
2864		var snapshot bytes.Buffer
2865		io.Copy(&snapshot, ringBuffer)
2866		err = &smithy.DeserializationError{
2867			Err:      fmt.Errorf("failed to decode response body, %w", err),
2868			Snapshot: snapshot.Bytes(),
2869		}
2870		return out, metadata, err
2871	}
2872
2873	return out, metadata, err
2874}
2875
2876func awsAwsjson11_deserializeOpErrorDeleteConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2877	var errorBuffer bytes.Buffer
2878	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2879		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2880	}
2881	errorBody := bytes.NewReader(errorBuffer.Bytes())
2882
2883	errorCode := "UnknownError"
2884	errorMessage := errorCode
2885
2886	code := response.Header.Get("X-Amzn-ErrorType")
2887	if len(code) != 0 {
2888		errorCode = restjson.SanitizeErrorCode(code)
2889	}
2890
2891	var buff [1024]byte
2892	ringBuffer := smithyio.NewRingBuffer(buff[:])
2893
2894	body := io.TeeReader(errorBody, ringBuffer)
2895	decoder := json.NewDecoder(body)
2896	decoder.UseNumber()
2897	code, message, err := restjson.GetErrorInfo(decoder)
2898	if err != nil {
2899		var snapshot bytes.Buffer
2900		io.Copy(&snapshot, ringBuffer)
2901		err = &smithy.DeserializationError{
2902			Err:      fmt.Errorf("failed to decode response body, %w", err),
2903			Snapshot: snapshot.Bytes(),
2904		}
2905		return err
2906	}
2907
2908	errorBody.Seek(0, io.SeekStart)
2909	if len(code) != 0 {
2910		errorCode = restjson.SanitizeErrorCode(code)
2911	}
2912	if len(message) != 0 {
2913		errorMessage = message
2914	}
2915
2916	switch {
2917	case strings.EqualFold("DirectConnectClientException", errorCode):
2918		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
2919
2920	case strings.EqualFold("DirectConnectServerException", errorCode):
2921		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
2922
2923	default:
2924		genericError := &smithy.GenericAPIError{
2925			Code:    errorCode,
2926			Message: errorMessage,
2927		}
2928		return genericError
2929
2930	}
2931}
2932
2933type awsAwsjson11_deserializeOpDeleteDirectConnectGateway struct {
2934}
2935
2936func (*awsAwsjson11_deserializeOpDeleteDirectConnectGateway) ID() string {
2937	return "OperationDeserializer"
2938}
2939
2940func (m *awsAwsjson11_deserializeOpDeleteDirectConnectGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
2941	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
2942) {
2943	out, metadata, err = next.HandleDeserialize(ctx, in)
2944	if err != nil {
2945		return out, metadata, err
2946	}
2947
2948	response, ok := out.RawResponse.(*smithyhttp.Response)
2949	if !ok {
2950		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
2951	}
2952
2953	if response.StatusCode < 200 || response.StatusCode >= 300 {
2954		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDirectConnectGateway(response, &metadata)
2955	}
2956	output := &DeleteDirectConnectGatewayOutput{}
2957	out.Result = output
2958
2959	var buff [1024]byte
2960	ringBuffer := smithyio.NewRingBuffer(buff[:])
2961
2962	body := io.TeeReader(response.Body, ringBuffer)
2963	decoder := json.NewDecoder(body)
2964	decoder.UseNumber()
2965	var shape interface{}
2966	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
2967		var snapshot bytes.Buffer
2968		io.Copy(&snapshot, ringBuffer)
2969		err = &smithy.DeserializationError{
2970			Err:      fmt.Errorf("failed to decode response body, %w", err),
2971			Snapshot: snapshot.Bytes(),
2972		}
2973		return out, metadata, err
2974	}
2975
2976	err = awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayOutput(&output, shape)
2977	if err != nil {
2978		var snapshot bytes.Buffer
2979		io.Copy(&snapshot, ringBuffer)
2980		err = &smithy.DeserializationError{
2981			Err:      fmt.Errorf("failed to decode response body, %w", err),
2982			Snapshot: snapshot.Bytes(),
2983		}
2984		return out, metadata, err
2985	}
2986
2987	return out, metadata, err
2988}
2989
2990func awsAwsjson11_deserializeOpErrorDeleteDirectConnectGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error {
2991	var errorBuffer bytes.Buffer
2992	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
2993		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
2994	}
2995	errorBody := bytes.NewReader(errorBuffer.Bytes())
2996
2997	errorCode := "UnknownError"
2998	errorMessage := errorCode
2999
3000	code := response.Header.Get("X-Amzn-ErrorType")
3001	if len(code) != 0 {
3002		errorCode = restjson.SanitizeErrorCode(code)
3003	}
3004
3005	var buff [1024]byte
3006	ringBuffer := smithyio.NewRingBuffer(buff[:])
3007
3008	body := io.TeeReader(errorBody, ringBuffer)
3009	decoder := json.NewDecoder(body)
3010	decoder.UseNumber()
3011	code, message, err := restjson.GetErrorInfo(decoder)
3012	if err != nil {
3013		var snapshot bytes.Buffer
3014		io.Copy(&snapshot, ringBuffer)
3015		err = &smithy.DeserializationError{
3016			Err:      fmt.Errorf("failed to decode response body, %w", err),
3017			Snapshot: snapshot.Bytes(),
3018		}
3019		return err
3020	}
3021
3022	errorBody.Seek(0, io.SeekStart)
3023	if len(code) != 0 {
3024		errorCode = restjson.SanitizeErrorCode(code)
3025	}
3026	if len(message) != 0 {
3027		errorMessage = message
3028	}
3029
3030	switch {
3031	case strings.EqualFold("DirectConnectClientException", errorCode):
3032		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3033
3034	case strings.EqualFold("DirectConnectServerException", errorCode):
3035		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3036
3037	default:
3038		genericError := &smithy.GenericAPIError{
3039			Code:    errorCode,
3040			Message: errorMessage,
3041		}
3042		return genericError
3043
3044	}
3045}
3046
3047type awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociation struct {
3048}
3049
3050func (*awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociation) ID() string {
3051	return "OperationDeserializer"
3052}
3053
3054func (m *awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3055	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3056) {
3057	out, metadata, err = next.HandleDeserialize(ctx, in)
3058	if err != nil {
3059		return out, metadata, err
3060	}
3061
3062	response, ok := out.RawResponse.(*smithyhttp.Response)
3063	if !ok {
3064		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3065	}
3066
3067	if response.StatusCode < 200 || response.StatusCode >= 300 {
3068		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDirectConnectGatewayAssociation(response, &metadata)
3069	}
3070	output := &DeleteDirectConnectGatewayAssociationOutput{}
3071	out.Result = output
3072
3073	var buff [1024]byte
3074	ringBuffer := smithyio.NewRingBuffer(buff[:])
3075
3076	body := io.TeeReader(response.Body, ringBuffer)
3077	decoder := json.NewDecoder(body)
3078	decoder.UseNumber()
3079	var shape interface{}
3080	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3081		var snapshot bytes.Buffer
3082		io.Copy(&snapshot, ringBuffer)
3083		err = &smithy.DeserializationError{
3084			Err:      fmt.Errorf("failed to decode response body, %w", err),
3085			Snapshot: snapshot.Bytes(),
3086		}
3087		return out, metadata, err
3088	}
3089
3090	err = awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayAssociationOutput(&output, shape)
3091	if err != nil {
3092		var snapshot bytes.Buffer
3093		io.Copy(&snapshot, ringBuffer)
3094		err = &smithy.DeserializationError{
3095			Err:      fmt.Errorf("failed to decode response body, %w", err),
3096			Snapshot: snapshot.Bytes(),
3097		}
3098		return out, metadata, err
3099	}
3100
3101	return out, metadata, err
3102}
3103
3104func awsAwsjson11_deserializeOpErrorDeleteDirectConnectGatewayAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3105	var errorBuffer bytes.Buffer
3106	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3107		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3108	}
3109	errorBody := bytes.NewReader(errorBuffer.Bytes())
3110
3111	errorCode := "UnknownError"
3112	errorMessage := errorCode
3113
3114	code := response.Header.Get("X-Amzn-ErrorType")
3115	if len(code) != 0 {
3116		errorCode = restjson.SanitizeErrorCode(code)
3117	}
3118
3119	var buff [1024]byte
3120	ringBuffer := smithyio.NewRingBuffer(buff[:])
3121
3122	body := io.TeeReader(errorBody, ringBuffer)
3123	decoder := json.NewDecoder(body)
3124	decoder.UseNumber()
3125	code, message, err := restjson.GetErrorInfo(decoder)
3126	if err != nil {
3127		var snapshot bytes.Buffer
3128		io.Copy(&snapshot, ringBuffer)
3129		err = &smithy.DeserializationError{
3130			Err:      fmt.Errorf("failed to decode response body, %w", err),
3131			Snapshot: snapshot.Bytes(),
3132		}
3133		return err
3134	}
3135
3136	errorBody.Seek(0, io.SeekStart)
3137	if len(code) != 0 {
3138		errorCode = restjson.SanitizeErrorCode(code)
3139	}
3140	if len(message) != 0 {
3141		errorMessage = message
3142	}
3143
3144	switch {
3145	case strings.EqualFold("DirectConnectClientException", errorCode):
3146		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3147
3148	case strings.EqualFold("DirectConnectServerException", errorCode):
3149		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3150
3151	default:
3152		genericError := &smithy.GenericAPIError{
3153			Code:    errorCode,
3154			Message: errorMessage,
3155		}
3156		return genericError
3157
3158	}
3159}
3160
3161type awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociationProposal struct {
3162}
3163
3164func (*awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociationProposal) ID() string {
3165	return "OperationDeserializer"
3166}
3167
3168func (m *awsAwsjson11_deserializeOpDeleteDirectConnectGatewayAssociationProposal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3169	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3170) {
3171	out, metadata, err = next.HandleDeserialize(ctx, in)
3172	if err != nil {
3173		return out, metadata, err
3174	}
3175
3176	response, ok := out.RawResponse.(*smithyhttp.Response)
3177	if !ok {
3178		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3179	}
3180
3181	if response.StatusCode < 200 || response.StatusCode >= 300 {
3182		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDirectConnectGatewayAssociationProposal(response, &metadata)
3183	}
3184	output := &DeleteDirectConnectGatewayAssociationProposalOutput{}
3185	out.Result = output
3186
3187	var buff [1024]byte
3188	ringBuffer := smithyio.NewRingBuffer(buff[:])
3189
3190	body := io.TeeReader(response.Body, ringBuffer)
3191	decoder := json.NewDecoder(body)
3192	decoder.UseNumber()
3193	var shape interface{}
3194	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3195		var snapshot bytes.Buffer
3196		io.Copy(&snapshot, ringBuffer)
3197		err = &smithy.DeserializationError{
3198			Err:      fmt.Errorf("failed to decode response body, %w", err),
3199			Snapshot: snapshot.Bytes(),
3200		}
3201		return out, metadata, err
3202	}
3203
3204	err = awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayAssociationProposalOutput(&output, shape)
3205	if err != nil {
3206		var snapshot bytes.Buffer
3207		io.Copy(&snapshot, ringBuffer)
3208		err = &smithy.DeserializationError{
3209			Err:      fmt.Errorf("failed to decode response body, %w", err),
3210			Snapshot: snapshot.Bytes(),
3211		}
3212		return out, metadata, err
3213	}
3214
3215	return out, metadata, err
3216}
3217
3218func awsAwsjson11_deserializeOpErrorDeleteDirectConnectGatewayAssociationProposal(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3219	var errorBuffer bytes.Buffer
3220	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3221		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3222	}
3223	errorBody := bytes.NewReader(errorBuffer.Bytes())
3224
3225	errorCode := "UnknownError"
3226	errorMessage := errorCode
3227
3228	code := response.Header.Get("X-Amzn-ErrorType")
3229	if len(code) != 0 {
3230		errorCode = restjson.SanitizeErrorCode(code)
3231	}
3232
3233	var buff [1024]byte
3234	ringBuffer := smithyio.NewRingBuffer(buff[:])
3235
3236	body := io.TeeReader(errorBody, ringBuffer)
3237	decoder := json.NewDecoder(body)
3238	decoder.UseNumber()
3239	code, message, err := restjson.GetErrorInfo(decoder)
3240	if err != nil {
3241		var snapshot bytes.Buffer
3242		io.Copy(&snapshot, ringBuffer)
3243		err = &smithy.DeserializationError{
3244			Err:      fmt.Errorf("failed to decode response body, %w", err),
3245			Snapshot: snapshot.Bytes(),
3246		}
3247		return err
3248	}
3249
3250	errorBody.Seek(0, io.SeekStart)
3251	if len(code) != 0 {
3252		errorCode = restjson.SanitizeErrorCode(code)
3253	}
3254	if len(message) != 0 {
3255		errorMessage = message
3256	}
3257
3258	switch {
3259	case strings.EqualFold("DirectConnectClientException", errorCode):
3260		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3261
3262	case strings.EqualFold("DirectConnectServerException", errorCode):
3263		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3264
3265	default:
3266		genericError := &smithy.GenericAPIError{
3267			Code:    errorCode,
3268			Message: errorMessage,
3269		}
3270		return genericError
3271
3272	}
3273}
3274
3275type awsAwsjson11_deserializeOpDeleteInterconnect struct {
3276}
3277
3278func (*awsAwsjson11_deserializeOpDeleteInterconnect) ID() string {
3279	return "OperationDeserializer"
3280}
3281
3282func (m *awsAwsjson11_deserializeOpDeleteInterconnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3283	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3284) {
3285	out, metadata, err = next.HandleDeserialize(ctx, in)
3286	if err != nil {
3287		return out, metadata, err
3288	}
3289
3290	response, ok := out.RawResponse.(*smithyhttp.Response)
3291	if !ok {
3292		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3293	}
3294
3295	if response.StatusCode < 200 || response.StatusCode >= 300 {
3296		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteInterconnect(response, &metadata)
3297	}
3298	output := &DeleteInterconnectOutput{}
3299	out.Result = output
3300
3301	var buff [1024]byte
3302	ringBuffer := smithyio.NewRingBuffer(buff[:])
3303
3304	body := io.TeeReader(response.Body, ringBuffer)
3305	decoder := json.NewDecoder(body)
3306	decoder.UseNumber()
3307	var shape interface{}
3308	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3309		var snapshot bytes.Buffer
3310		io.Copy(&snapshot, ringBuffer)
3311		err = &smithy.DeserializationError{
3312			Err:      fmt.Errorf("failed to decode response body, %w", err),
3313			Snapshot: snapshot.Bytes(),
3314		}
3315		return out, metadata, err
3316	}
3317
3318	err = awsAwsjson11_deserializeOpDocumentDeleteInterconnectOutput(&output, shape)
3319	if err != nil {
3320		var snapshot bytes.Buffer
3321		io.Copy(&snapshot, ringBuffer)
3322		err = &smithy.DeserializationError{
3323			Err:      fmt.Errorf("failed to decode response body, %w", err),
3324			Snapshot: snapshot.Bytes(),
3325		}
3326		return out, metadata, err
3327	}
3328
3329	return out, metadata, err
3330}
3331
3332func awsAwsjson11_deserializeOpErrorDeleteInterconnect(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3333	var errorBuffer bytes.Buffer
3334	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3335		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3336	}
3337	errorBody := bytes.NewReader(errorBuffer.Bytes())
3338
3339	errorCode := "UnknownError"
3340	errorMessage := errorCode
3341
3342	code := response.Header.Get("X-Amzn-ErrorType")
3343	if len(code) != 0 {
3344		errorCode = restjson.SanitizeErrorCode(code)
3345	}
3346
3347	var buff [1024]byte
3348	ringBuffer := smithyio.NewRingBuffer(buff[:])
3349
3350	body := io.TeeReader(errorBody, ringBuffer)
3351	decoder := json.NewDecoder(body)
3352	decoder.UseNumber()
3353	code, message, err := restjson.GetErrorInfo(decoder)
3354	if err != nil {
3355		var snapshot bytes.Buffer
3356		io.Copy(&snapshot, ringBuffer)
3357		err = &smithy.DeserializationError{
3358			Err:      fmt.Errorf("failed to decode response body, %w", err),
3359			Snapshot: snapshot.Bytes(),
3360		}
3361		return err
3362	}
3363
3364	errorBody.Seek(0, io.SeekStart)
3365	if len(code) != 0 {
3366		errorCode = restjson.SanitizeErrorCode(code)
3367	}
3368	if len(message) != 0 {
3369		errorMessage = message
3370	}
3371
3372	switch {
3373	case strings.EqualFold("DirectConnectClientException", errorCode):
3374		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3375
3376	case strings.EqualFold("DirectConnectServerException", errorCode):
3377		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3378
3379	default:
3380		genericError := &smithy.GenericAPIError{
3381			Code:    errorCode,
3382			Message: errorMessage,
3383		}
3384		return genericError
3385
3386	}
3387}
3388
3389type awsAwsjson11_deserializeOpDeleteLag struct {
3390}
3391
3392func (*awsAwsjson11_deserializeOpDeleteLag) ID() string {
3393	return "OperationDeserializer"
3394}
3395
3396func (m *awsAwsjson11_deserializeOpDeleteLag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3397	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3398) {
3399	out, metadata, err = next.HandleDeserialize(ctx, in)
3400	if err != nil {
3401		return out, metadata, err
3402	}
3403
3404	response, ok := out.RawResponse.(*smithyhttp.Response)
3405	if !ok {
3406		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3407	}
3408
3409	if response.StatusCode < 200 || response.StatusCode >= 300 {
3410		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLag(response, &metadata)
3411	}
3412	output := &DeleteLagOutput{}
3413	out.Result = output
3414
3415	var buff [1024]byte
3416	ringBuffer := smithyio.NewRingBuffer(buff[:])
3417
3418	body := io.TeeReader(response.Body, ringBuffer)
3419	decoder := json.NewDecoder(body)
3420	decoder.UseNumber()
3421	var shape interface{}
3422	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3423		var snapshot bytes.Buffer
3424		io.Copy(&snapshot, ringBuffer)
3425		err = &smithy.DeserializationError{
3426			Err:      fmt.Errorf("failed to decode response body, %w", err),
3427			Snapshot: snapshot.Bytes(),
3428		}
3429		return out, metadata, err
3430	}
3431
3432	err = awsAwsjson11_deserializeOpDocumentDeleteLagOutput(&output, shape)
3433	if err != nil {
3434		var snapshot bytes.Buffer
3435		io.Copy(&snapshot, ringBuffer)
3436		err = &smithy.DeserializationError{
3437			Err:      fmt.Errorf("failed to decode response body, %w", err),
3438			Snapshot: snapshot.Bytes(),
3439		}
3440		return out, metadata, err
3441	}
3442
3443	return out, metadata, err
3444}
3445
3446func awsAwsjson11_deserializeOpErrorDeleteLag(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3447	var errorBuffer bytes.Buffer
3448	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3449		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3450	}
3451	errorBody := bytes.NewReader(errorBuffer.Bytes())
3452
3453	errorCode := "UnknownError"
3454	errorMessage := errorCode
3455
3456	code := response.Header.Get("X-Amzn-ErrorType")
3457	if len(code) != 0 {
3458		errorCode = restjson.SanitizeErrorCode(code)
3459	}
3460
3461	var buff [1024]byte
3462	ringBuffer := smithyio.NewRingBuffer(buff[:])
3463
3464	body := io.TeeReader(errorBody, ringBuffer)
3465	decoder := json.NewDecoder(body)
3466	decoder.UseNumber()
3467	code, message, err := restjson.GetErrorInfo(decoder)
3468	if err != nil {
3469		var snapshot bytes.Buffer
3470		io.Copy(&snapshot, ringBuffer)
3471		err = &smithy.DeserializationError{
3472			Err:      fmt.Errorf("failed to decode response body, %w", err),
3473			Snapshot: snapshot.Bytes(),
3474		}
3475		return err
3476	}
3477
3478	errorBody.Seek(0, io.SeekStart)
3479	if len(code) != 0 {
3480		errorCode = restjson.SanitizeErrorCode(code)
3481	}
3482	if len(message) != 0 {
3483		errorMessage = message
3484	}
3485
3486	switch {
3487	case strings.EqualFold("DirectConnectClientException", errorCode):
3488		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3489
3490	case strings.EqualFold("DirectConnectServerException", errorCode):
3491		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3492
3493	default:
3494		genericError := &smithy.GenericAPIError{
3495			Code:    errorCode,
3496			Message: errorMessage,
3497		}
3498		return genericError
3499
3500	}
3501}
3502
3503type awsAwsjson11_deserializeOpDeleteVirtualInterface struct {
3504}
3505
3506func (*awsAwsjson11_deserializeOpDeleteVirtualInterface) ID() string {
3507	return "OperationDeserializer"
3508}
3509
3510func (m *awsAwsjson11_deserializeOpDeleteVirtualInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3511	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3512) {
3513	out, metadata, err = next.HandleDeserialize(ctx, in)
3514	if err != nil {
3515		return out, metadata, err
3516	}
3517
3518	response, ok := out.RawResponse.(*smithyhttp.Response)
3519	if !ok {
3520		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3521	}
3522
3523	if response.StatusCode < 200 || response.StatusCode >= 300 {
3524		return out, metadata, awsAwsjson11_deserializeOpErrorDeleteVirtualInterface(response, &metadata)
3525	}
3526	output := &DeleteVirtualInterfaceOutput{}
3527	out.Result = output
3528
3529	var buff [1024]byte
3530	ringBuffer := smithyio.NewRingBuffer(buff[:])
3531
3532	body := io.TeeReader(response.Body, ringBuffer)
3533	decoder := json.NewDecoder(body)
3534	decoder.UseNumber()
3535	var shape interface{}
3536	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3537		var snapshot bytes.Buffer
3538		io.Copy(&snapshot, ringBuffer)
3539		err = &smithy.DeserializationError{
3540			Err:      fmt.Errorf("failed to decode response body, %w", err),
3541			Snapshot: snapshot.Bytes(),
3542		}
3543		return out, metadata, err
3544	}
3545
3546	err = awsAwsjson11_deserializeOpDocumentDeleteVirtualInterfaceOutput(&output, shape)
3547	if err != nil {
3548		var snapshot bytes.Buffer
3549		io.Copy(&snapshot, ringBuffer)
3550		err = &smithy.DeserializationError{
3551			Err:      fmt.Errorf("failed to decode response body, %w", err),
3552			Snapshot: snapshot.Bytes(),
3553		}
3554		return out, metadata, err
3555	}
3556
3557	return out, metadata, err
3558}
3559
3560func awsAwsjson11_deserializeOpErrorDeleteVirtualInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3561	var errorBuffer bytes.Buffer
3562	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3563		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3564	}
3565	errorBody := bytes.NewReader(errorBuffer.Bytes())
3566
3567	errorCode := "UnknownError"
3568	errorMessage := errorCode
3569
3570	code := response.Header.Get("X-Amzn-ErrorType")
3571	if len(code) != 0 {
3572		errorCode = restjson.SanitizeErrorCode(code)
3573	}
3574
3575	var buff [1024]byte
3576	ringBuffer := smithyio.NewRingBuffer(buff[:])
3577
3578	body := io.TeeReader(errorBody, ringBuffer)
3579	decoder := json.NewDecoder(body)
3580	decoder.UseNumber()
3581	code, message, err := restjson.GetErrorInfo(decoder)
3582	if err != nil {
3583		var snapshot bytes.Buffer
3584		io.Copy(&snapshot, ringBuffer)
3585		err = &smithy.DeserializationError{
3586			Err:      fmt.Errorf("failed to decode response body, %w", err),
3587			Snapshot: snapshot.Bytes(),
3588		}
3589		return err
3590	}
3591
3592	errorBody.Seek(0, io.SeekStart)
3593	if len(code) != 0 {
3594		errorCode = restjson.SanitizeErrorCode(code)
3595	}
3596	if len(message) != 0 {
3597		errorMessage = message
3598	}
3599
3600	switch {
3601	case strings.EqualFold("DirectConnectClientException", errorCode):
3602		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3603
3604	case strings.EqualFold("DirectConnectServerException", errorCode):
3605		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3606
3607	default:
3608		genericError := &smithy.GenericAPIError{
3609			Code:    errorCode,
3610			Message: errorMessage,
3611		}
3612		return genericError
3613
3614	}
3615}
3616
3617type awsAwsjson11_deserializeOpDescribeConnectionLoa struct {
3618}
3619
3620func (*awsAwsjson11_deserializeOpDescribeConnectionLoa) ID() string {
3621	return "OperationDeserializer"
3622}
3623
3624func (m *awsAwsjson11_deserializeOpDescribeConnectionLoa) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3625	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3626) {
3627	out, metadata, err = next.HandleDeserialize(ctx, in)
3628	if err != nil {
3629		return out, metadata, err
3630	}
3631
3632	response, ok := out.RawResponse.(*smithyhttp.Response)
3633	if !ok {
3634		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3635	}
3636
3637	if response.StatusCode < 200 || response.StatusCode >= 300 {
3638		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeConnectionLoa(response, &metadata)
3639	}
3640	output := &DescribeConnectionLoaOutput{}
3641	out.Result = output
3642
3643	var buff [1024]byte
3644	ringBuffer := smithyio.NewRingBuffer(buff[:])
3645
3646	body := io.TeeReader(response.Body, ringBuffer)
3647	decoder := json.NewDecoder(body)
3648	decoder.UseNumber()
3649	var shape interface{}
3650	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3651		var snapshot bytes.Buffer
3652		io.Copy(&snapshot, ringBuffer)
3653		err = &smithy.DeserializationError{
3654			Err:      fmt.Errorf("failed to decode response body, %w", err),
3655			Snapshot: snapshot.Bytes(),
3656		}
3657		return out, metadata, err
3658	}
3659
3660	err = awsAwsjson11_deserializeOpDocumentDescribeConnectionLoaOutput(&output, shape)
3661	if err != nil {
3662		var snapshot bytes.Buffer
3663		io.Copy(&snapshot, ringBuffer)
3664		err = &smithy.DeserializationError{
3665			Err:      fmt.Errorf("failed to decode response body, %w", err),
3666			Snapshot: snapshot.Bytes(),
3667		}
3668		return out, metadata, err
3669	}
3670
3671	return out, metadata, err
3672}
3673
3674func awsAwsjson11_deserializeOpErrorDescribeConnectionLoa(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3675	var errorBuffer bytes.Buffer
3676	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3677		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3678	}
3679	errorBody := bytes.NewReader(errorBuffer.Bytes())
3680
3681	errorCode := "UnknownError"
3682	errorMessage := errorCode
3683
3684	code := response.Header.Get("X-Amzn-ErrorType")
3685	if len(code) != 0 {
3686		errorCode = restjson.SanitizeErrorCode(code)
3687	}
3688
3689	var buff [1024]byte
3690	ringBuffer := smithyio.NewRingBuffer(buff[:])
3691
3692	body := io.TeeReader(errorBody, ringBuffer)
3693	decoder := json.NewDecoder(body)
3694	decoder.UseNumber()
3695	code, message, err := restjson.GetErrorInfo(decoder)
3696	if err != nil {
3697		var snapshot bytes.Buffer
3698		io.Copy(&snapshot, ringBuffer)
3699		err = &smithy.DeserializationError{
3700			Err:      fmt.Errorf("failed to decode response body, %w", err),
3701			Snapshot: snapshot.Bytes(),
3702		}
3703		return err
3704	}
3705
3706	errorBody.Seek(0, io.SeekStart)
3707	if len(code) != 0 {
3708		errorCode = restjson.SanitizeErrorCode(code)
3709	}
3710	if len(message) != 0 {
3711		errorMessage = message
3712	}
3713
3714	switch {
3715	case strings.EqualFold("DirectConnectClientException", errorCode):
3716		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3717
3718	case strings.EqualFold("DirectConnectServerException", errorCode):
3719		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3720
3721	default:
3722		genericError := &smithy.GenericAPIError{
3723			Code:    errorCode,
3724			Message: errorMessage,
3725		}
3726		return genericError
3727
3728	}
3729}
3730
3731type awsAwsjson11_deserializeOpDescribeConnections struct {
3732}
3733
3734func (*awsAwsjson11_deserializeOpDescribeConnections) ID() string {
3735	return "OperationDeserializer"
3736}
3737
3738func (m *awsAwsjson11_deserializeOpDescribeConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3739	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3740) {
3741	out, metadata, err = next.HandleDeserialize(ctx, in)
3742	if err != nil {
3743		return out, metadata, err
3744	}
3745
3746	response, ok := out.RawResponse.(*smithyhttp.Response)
3747	if !ok {
3748		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3749	}
3750
3751	if response.StatusCode < 200 || response.StatusCode >= 300 {
3752		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeConnections(response, &metadata)
3753	}
3754	output := &DescribeConnectionsOutput{}
3755	out.Result = output
3756
3757	var buff [1024]byte
3758	ringBuffer := smithyio.NewRingBuffer(buff[:])
3759
3760	body := io.TeeReader(response.Body, ringBuffer)
3761	decoder := json.NewDecoder(body)
3762	decoder.UseNumber()
3763	var shape interface{}
3764	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3765		var snapshot bytes.Buffer
3766		io.Copy(&snapshot, ringBuffer)
3767		err = &smithy.DeserializationError{
3768			Err:      fmt.Errorf("failed to decode response body, %w", err),
3769			Snapshot: snapshot.Bytes(),
3770		}
3771		return out, metadata, err
3772	}
3773
3774	err = awsAwsjson11_deserializeOpDocumentDescribeConnectionsOutput(&output, shape)
3775	if err != nil {
3776		var snapshot bytes.Buffer
3777		io.Copy(&snapshot, ringBuffer)
3778		err = &smithy.DeserializationError{
3779			Err:      fmt.Errorf("failed to decode response body, %w", err),
3780			Snapshot: snapshot.Bytes(),
3781		}
3782		return out, metadata, err
3783	}
3784
3785	return out, metadata, err
3786}
3787
3788func awsAwsjson11_deserializeOpErrorDescribeConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3789	var errorBuffer bytes.Buffer
3790	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3791		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3792	}
3793	errorBody := bytes.NewReader(errorBuffer.Bytes())
3794
3795	errorCode := "UnknownError"
3796	errorMessage := errorCode
3797
3798	code := response.Header.Get("X-Amzn-ErrorType")
3799	if len(code) != 0 {
3800		errorCode = restjson.SanitizeErrorCode(code)
3801	}
3802
3803	var buff [1024]byte
3804	ringBuffer := smithyio.NewRingBuffer(buff[:])
3805
3806	body := io.TeeReader(errorBody, ringBuffer)
3807	decoder := json.NewDecoder(body)
3808	decoder.UseNumber()
3809	code, message, err := restjson.GetErrorInfo(decoder)
3810	if err != nil {
3811		var snapshot bytes.Buffer
3812		io.Copy(&snapshot, ringBuffer)
3813		err = &smithy.DeserializationError{
3814			Err:      fmt.Errorf("failed to decode response body, %w", err),
3815			Snapshot: snapshot.Bytes(),
3816		}
3817		return err
3818	}
3819
3820	errorBody.Seek(0, io.SeekStart)
3821	if len(code) != 0 {
3822		errorCode = restjson.SanitizeErrorCode(code)
3823	}
3824	if len(message) != 0 {
3825		errorMessage = message
3826	}
3827
3828	switch {
3829	case strings.EqualFold("DirectConnectClientException", errorCode):
3830		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3831
3832	case strings.EqualFold("DirectConnectServerException", errorCode):
3833		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3834
3835	default:
3836		genericError := &smithy.GenericAPIError{
3837			Code:    errorCode,
3838			Message: errorMessage,
3839		}
3840		return genericError
3841
3842	}
3843}
3844
3845type awsAwsjson11_deserializeOpDescribeConnectionsOnInterconnect struct {
3846}
3847
3848func (*awsAwsjson11_deserializeOpDescribeConnectionsOnInterconnect) ID() string {
3849	return "OperationDeserializer"
3850}
3851
3852func (m *awsAwsjson11_deserializeOpDescribeConnectionsOnInterconnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3853	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3854) {
3855	out, metadata, err = next.HandleDeserialize(ctx, in)
3856	if err != nil {
3857		return out, metadata, err
3858	}
3859
3860	response, ok := out.RawResponse.(*smithyhttp.Response)
3861	if !ok {
3862		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3863	}
3864
3865	if response.StatusCode < 200 || response.StatusCode >= 300 {
3866		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeConnectionsOnInterconnect(response, &metadata)
3867	}
3868	output := &DescribeConnectionsOnInterconnectOutput{}
3869	out.Result = output
3870
3871	var buff [1024]byte
3872	ringBuffer := smithyio.NewRingBuffer(buff[:])
3873
3874	body := io.TeeReader(response.Body, ringBuffer)
3875	decoder := json.NewDecoder(body)
3876	decoder.UseNumber()
3877	var shape interface{}
3878	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3879		var snapshot bytes.Buffer
3880		io.Copy(&snapshot, ringBuffer)
3881		err = &smithy.DeserializationError{
3882			Err:      fmt.Errorf("failed to decode response body, %w", err),
3883			Snapshot: snapshot.Bytes(),
3884		}
3885		return out, metadata, err
3886	}
3887
3888	err = awsAwsjson11_deserializeOpDocumentDescribeConnectionsOnInterconnectOutput(&output, shape)
3889	if err != nil {
3890		var snapshot bytes.Buffer
3891		io.Copy(&snapshot, ringBuffer)
3892		err = &smithy.DeserializationError{
3893			Err:      fmt.Errorf("failed to decode response body, %w", err),
3894			Snapshot: snapshot.Bytes(),
3895		}
3896		return out, metadata, err
3897	}
3898
3899	return out, metadata, err
3900}
3901
3902func awsAwsjson11_deserializeOpErrorDescribeConnectionsOnInterconnect(response *smithyhttp.Response, metadata *middleware.Metadata) error {
3903	var errorBuffer bytes.Buffer
3904	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
3905		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
3906	}
3907	errorBody := bytes.NewReader(errorBuffer.Bytes())
3908
3909	errorCode := "UnknownError"
3910	errorMessage := errorCode
3911
3912	code := response.Header.Get("X-Amzn-ErrorType")
3913	if len(code) != 0 {
3914		errorCode = restjson.SanitizeErrorCode(code)
3915	}
3916
3917	var buff [1024]byte
3918	ringBuffer := smithyio.NewRingBuffer(buff[:])
3919
3920	body := io.TeeReader(errorBody, ringBuffer)
3921	decoder := json.NewDecoder(body)
3922	decoder.UseNumber()
3923	code, message, err := restjson.GetErrorInfo(decoder)
3924	if err != nil {
3925		var snapshot bytes.Buffer
3926		io.Copy(&snapshot, ringBuffer)
3927		err = &smithy.DeserializationError{
3928			Err:      fmt.Errorf("failed to decode response body, %w", err),
3929			Snapshot: snapshot.Bytes(),
3930		}
3931		return err
3932	}
3933
3934	errorBody.Seek(0, io.SeekStart)
3935	if len(code) != 0 {
3936		errorCode = restjson.SanitizeErrorCode(code)
3937	}
3938	if len(message) != 0 {
3939		errorMessage = message
3940	}
3941
3942	switch {
3943	case strings.EqualFold("DirectConnectClientException", errorCode):
3944		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
3945
3946	case strings.EqualFold("DirectConnectServerException", errorCode):
3947		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
3948
3949	default:
3950		genericError := &smithy.GenericAPIError{
3951			Code:    errorCode,
3952			Message: errorMessage,
3953		}
3954		return genericError
3955
3956	}
3957}
3958
3959type awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociationProposals struct {
3960}
3961
3962func (*awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociationProposals) ID() string {
3963	return "OperationDeserializer"
3964}
3965
3966func (m *awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociationProposals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
3967	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
3968) {
3969	out, metadata, err = next.HandleDeserialize(ctx, in)
3970	if err != nil {
3971		return out, metadata, err
3972	}
3973
3974	response, ok := out.RawResponse.(*smithyhttp.Response)
3975	if !ok {
3976		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
3977	}
3978
3979	if response.StatusCode < 200 || response.StatusCode >= 300 {
3980		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAssociationProposals(response, &metadata)
3981	}
3982	output := &DescribeDirectConnectGatewayAssociationProposalsOutput{}
3983	out.Result = output
3984
3985	var buff [1024]byte
3986	ringBuffer := smithyio.NewRingBuffer(buff[:])
3987
3988	body := io.TeeReader(response.Body, ringBuffer)
3989	decoder := json.NewDecoder(body)
3990	decoder.UseNumber()
3991	var shape interface{}
3992	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
3993		var snapshot bytes.Buffer
3994		io.Copy(&snapshot, ringBuffer)
3995		err = &smithy.DeserializationError{
3996			Err:      fmt.Errorf("failed to decode response body, %w", err),
3997			Snapshot: snapshot.Bytes(),
3998		}
3999		return out, metadata, err
4000	}
4001
4002	err = awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAssociationProposalsOutput(&output, shape)
4003	if err != nil {
4004		var snapshot bytes.Buffer
4005		io.Copy(&snapshot, ringBuffer)
4006		err = &smithy.DeserializationError{
4007			Err:      fmt.Errorf("failed to decode response body, %w", err),
4008			Snapshot: snapshot.Bytes(),
4009		}
4010		return out, metadata, err
4011	}
4012
4013	return out, metadata, err
4014}
4015
4016func awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAssociationProposals(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4017	var errorBuffer bytes.Buffer
4018	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4019		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4020	}
4021	errorBody := bytes.NewReader(errorBuffer.Bytes())
4022
4023	errorCode := "UnknownError"
4024	errorMessage := errorCode
4025
4026	code := response.Header.Get("X-Amzn-ErrorType")
4027	if len(code) != 0 {
4028		errorCode = restjson.SanitizeErrorCode(code)
4029	}
4030
4031	var buff [1024]byte
4032	ringBuffer := smithyio.NewRingBuffer(buff[:])
4033
4034	body := io.TeeReader(errorBody, ringBuffer)
4035	decoder := json.NewDecoder(body)
4036	decoder.UseNumber()
4037	code, message, err := restjson.GetErrorInfo(decoder)
4038	if err != nil {
4039		var snapshot bytes.Buffer
4040		io.Copy(&snapshot, ringBuffer)
4041		err = &smithy.DeserializationError{
4042			Err:      fmt.Errorf("failed to decode response body, %w", err),
4043			Snapshot: snapshot.Bytes(),
4044		}
4045		return err
4046	}
4047
4048	errorBody.Seek(0, io.SeekStart)
4049	if len(code) != 0 {
4050		errorCode = restjson.SanitizeErrorCode(code)
4051	}
4052	if len(message) != 0 {
4053		errorMessage = message
4054	}
4055
4056	switch {
4057	case strings.EqualFold("DirectConnectClientException", errorCode):
4058		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4059
4060	case strings.EqualFold("DirectConnectServerException", errorCode):
4061		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4062
4063	default:
4064		genericError := &smithy.GenericAPIError{
4065			Code:    errorCode,
4066			Message: errorMessage,
4067		}
4068		return genericError
4069
4070	}
4071}
4072
4073type awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociations struct {
4074}
4075
4076func (*awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociations) ID() string {
4077	return "OperationDeserializer"
4078}
4079
4080func (m *awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4081	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4082) {
4083	out, metadata, err = next.HandleDeserialize(ctx, in)
4084	if err != nil {
4085		return out, metadata, err
4086	}
4087
4088	response, ok := out.RawResponse.(*smithyhttp.Response)
4089	if !ok {
4090		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4091	}
4092
4093	if response.StatusCode < 200 || response.StatusCode >= 300 {
4094		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAssociations(response, &metadata)
4095	}
4096	output := &DescribeDirectConnectGatewayAssociationsOutput{}
4097	out.Result = output
4098
4099	var buff [1024]byte
4100	ringBuffer := smithyio.NewRingBuffer(buff[:])
4101
4102	body := io.TeeReader(response.Body, ringBuffer)
4103	decoder := json.NewDecoder(body)
4104	decoder.UseNumber()
4105	var shape interface{}
4106	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4107		var snapshot bytes.Buffer
4108		io.Copy(&snapshot, ringBuffer)
4109		err = &smithy.DeserializationError{
4110			Err:      fmt.Errorf("failed to decode response body, %w", err),
4111			Snapshot: snapshot.Bytes(),
4112		}
4113		return out, metadata, err
4114	}
4115
4116	err = awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAssociationsOutput(&output, shape)
4117	if err != nil {
4118		var snapshot bytes.Buffer
4119		io.Copy(&snapshot, ringBuffer)
4120		err = &smithy.DeserializationError{
4121			Err:      fmt.Errorf("failed to decode response body, %w", err),
4122			Snapshot: snapshot.Bytes(),
4123		}
4124		return out, metadata, err
4125	}
4126
4127	return out, metadata, err
4128}
4129
4130func awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4131	var errorBuffer bytes.Buffer
4132	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4133		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4134	}
4135	errorBody := bytes.NewReader(errorBuffer.Bytes())
4136
4137	errorCode := "UnknownError"
4138	errorMessage := errorCode
4139
4140	code := response.Header.Get("X-Amzn-ErrorType")
4141	if len(code) != 0 {
4142		errorCode = restjson.SanitizeErrorCode(code)
4143	}
4144
4145	var buff [1024]byte
4146	ringBuffer := smithyio.NewRingBuffer(buff[:])
4147
4148	body := io.TeeReader(errorBody, ringBuffer)
4149	decoder := json.NewDecoder(body)
4150	decoder.UseNumber()
4151	code, message, err := restjson.GetErrorInfo(decoder)
4152	if err != nil {
4153		var snapshot bytes.Buffer
4154		io.Copy(&snapshot, ringBuffer)
4155		err = &smithy.DeserializationError{
4156			Err:      fmt.Errorf("failed to decode response body, %w", err),
4157			Snapshot: snapshot.Bytes(),
4158		}
4159		return err
4160	}
4161
4162	errorBody.Seek(0, io.SeekStart)
4163	if len(code) != 0 {
4164		errorCode = restjson.SanitizeErrorCode(code)
4165	}
4166	if len(message) != 0 {
4167		errorMessage = message
4168	}
4169
4170	switch {
4171	case strings.EqualFold("DirectConnectClientException", errorCode):
4172		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4173
4174	case strings.EqualFold("DirectConnectServerException", errorCode):
4175		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4176
4177	default:
4178		genericError := &smithy.GenericAPIError{
4179			Code:    errorCode,
4180			Message: errorMessage,
4181		}
4182		return genericError
4183
4184	}
4185}
4186
4187type awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAttachments struct {
4188}
4189
4190func (*awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAttachments) ID() string {
4191	return "OperationDeserializer"
4192}
4193
4194func (m *awsAwsjson11_deserializeOpDescribeDirectConnectGatewayAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4195	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4196) {
4197	out, metadata, err = next.HandleDeserialize(ctx, in)
4198	if err != nil {
4199		return out, metadata, err
4200	}
4201
4202	response, ok := out.RawResponse.(*smithyhttp.Response)
4203	if !ok {
4204		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4205	}
4206
4207	if response.StatusCode < 200 || response.StatusCode >= 300 {
4208		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAttachments(response, &metadata)
4209	}
4210	output := &DescribeDirectConnectGatewayAttachmentsOutput{}
4211	out.Result = output
4212
4213	var buff [1024]byte
4214	ringBuffer := smithyio.NewRingBuffer(buff[:])
4215
4216	body := io.TeeReader(response.Body, ringBuffer)
4217	decoder := json.NewDecoder(body)
4218	decoder.UseNumber()
4219	var shape interface{}
4220	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4221		var snapshot bytes.Buffer
4222		io.Copy(&snapshot, ringBuffer)
4223		err = &smithy.DeserializationError{
4224			Err:      fmt.Errorf("failed to decode response body, %w", err),
4225			Snapshot: snapshot.Bytes(),
4226		}
4227		return out, metadata, err
4228	}
4229
4230	err = awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAttachmentsOutput(&output, shape)
4231	if err != nil {
4232		var snapshot bytes.Buffer
4233		io.Copy(&snapshot, ringBuffer)
4234		err = &smithy.DeserializationError{
4235			Err:      fmt.Errorf("failed to decode response body, %w", err),
4236			Snapshot: snapshot.Bytes(),
4237		}
4238		return out, metadata, err
4239	}
4240
4241	return out, metadata, err
4242}
4243
4244func awsAwsjson11_deserializeOpErrorDescribeDirectConnectGatewayAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4245	var errorBuffer bytes.Buffer
4246	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4247		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4248	}
4249	errorBody := bytes.NewReader(errorBuffer.Bytes())
4250
4251	errorCode := "UnknownError"
4252	errorMessage := errorCode
4253
4254	code := response.Header.Get("X-Amzn-ErrorType")
4255	if len(code) != 0 {
4256		errorCode = restjson.SanitizeErrorCode(code)
4257	}
4258
4259	var buff [1024]byte
4260	ringBuffer := smithyio.NewRingBuffer(buff[:])
4261
4262	body := io.TeeReader(errorBody, ringBuffer)
4263	decoder := json.NewDecoder(body)
4264	decoder.UseNumber()
4265	code, message, err := restjson.GetErrorInfo(decoder)
4266	if err != nil {
4267		var snapshot bytes.Buffer
4268		io.Copy(&snapshot, ringBuffer)
4269		err = &smithy.DeserializationError{
4270			Err:      fmt.Errorf("failed to decode response body, %w", err),
4271			Snapshot: snapshot.Bytes(),
4272		}
4273		return err
4274	}
4275
4276	errorBody.Seek(0, io.SeekStart)
4277	if len(code) != 0 {
4278		errorCode = restjson.SanitizeErrorCode(code)
4279	}
4280	if len(message) != 0 {
4281		errorMessage = message
4282	}
4283
4284	switch {
4285	case strings.EqualFold("DirectConnectClientException", errorCode):
4286		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4287
4288	case strings.EqualFold("DirectConnectServerException", errorCode):
4289		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4290
4291	default:
4292		genericError := &smithy.GenericAPIError{
4293			Code:    errorCode,
4294			Message: errorMessage,
4295		}
4296		return genericError
4297
4298	}
4299}
4300
4301type awsAwsjson11_deserializeOpDescribeDirectConnectGateways struct {
4302}
4303
4304func (*awsAwsjson11_deserializeOpDescribeDirectConnectGateways) ID() string {
4305	return "OperationDeserializer"
4306}
4307
4308func (m *awsAwsjson11_deserializeOpDescribeDirectConnectGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4309	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4310) {
4311	out, metadata, err = next.HandleDeserialize(ctx, in)
4312	if err != nil {
4313		return out, metadata, err
4314	}
4315
4316	response, ok := out.RawResponse.(*smithyhttp.Response)
4317	if !ok {
4318		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4319	}
4320
4321	if response.StatusCode < 200 || response.StatusCode >= 300 {
4322		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDirectConnectGateways(response, &metadata)
4323	}
4324	output := &DescribeDirectConnectGatewaysOutput{}
4325	out.Result = output
4326
4327	var buff [1024]byte
4328	ringBuffer := smithyio.NewRingBuffer(buff[:])
4329
4330	body := io.TeeReader(response.Body, ringBuffer)
4331	decoder := json.NewDecoder(body)
4332	decoder.UseNumber()
4333	var shape interface{}
4334	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4335		var snapshot bytes.Buffer
4336		io.Copy(&snapshot, ringBuffer)
4337		err = &smithy.DeserializationError{
4338			Err:      fmt.Errorf("failed to decode response body, %w", err),
4339			Snapshot: snapshot.Bytes(),
4340		}
4341		return out, metadata, err
4342	}
4343
4344	err = awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewaysOutput(&output, shape)
4345	if err != nil {
4346		var snapshot bytes.Buffer
4347		io.Copy(&snapshot, ringBuffer)
4348		err = &smithy.DeserializationError{
4349			Err:      fmt.Errorf("failed to decode response body, %w", err),
4350			Snapshot: snapshot.Bytes(),
4351		}
4352		return out, metadata, err
4353	}
4354
4355	return out, metadata, err
4356}
4357
4358func awsAwsjson11_deserializeOpErrorDescribeDirectConnectGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4359	var errorBuffer bytes.Buffer
4360	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4361		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4362	}
4363	errorBody := bytes.NewReader(errorBuffer.Bytes())
4364
4365	errorCode := "UnknownError"
4366	errorMessage := errorCode
4367
4368	code := response.Header.Get("X-Amzn-ErrorType")
4369	if len(code) != 0 {
4370		errorCode = restjson.SanitizeErrorCode(code)
4371	}
4372
4373	var buff [1024]byte
4374	ringBuffer := smithyio.NewRingBuffer(buff[:])
4375
4376	body := io.TeeReader(errorBody, ringBuffer)
4377	decoder := json.NewDecoder(body)
4378	decoder.UseNumber()
4379	code, message, err := restjson.GetErrorInfo(decoder)
4380	if err != nil {
4381		var snapshot bytes.Buffer
4382		io.Copy(&snapshot, ringBuffer)
4383		err = &smithy.DeserializationError{
4384			Err:      fmt.Errorf("failed to decode response body, %w", err),
4385			Snapshot: snapshot.Bytes(),
4386		}
4387		return err
4388	}
4389
4390	errorBody.Seek(0, io.SeekStart)
4391	if len(code) != 0 {
4392		errorCode = restjson.SanitizeErrorCode(code)
4393	}
4394	if len(message) != 0 {
4395		errorMessage = message
4396	}
4397
4398	switch {
4399	case strings.EqualFold("DirectConnectClientException", errorCode):
4400		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4401
4402	case strings.EqualFold("DirectConnectServerException", errorCode):
4403		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4404
4405	default:
4406		genericError := &smithy.GenericAPIError{
4407			Code:    errorCode,
4408			Message: errorMessage,
4409		}
4410		return genericError
4411
4412	}
4413}
4414
4415type awsAwsjson11_deserializeOpDescribeHostedConnections struct {
4416}
4417
4418func (*awsAwsjson11_deserializeOpDescribeHostedConnections) ID() string {
4419	return "OperationDeserializer"
4420}
4421
4422func (m *awsAwsjson11_deserializeOpDescribeHostedConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4423	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4424) {
4425	out, metadata, err = next.HandleDeserialize(ctx, in)
4426	if err != nil {
4427		return out, metadata, err
4428	}
4429
4430	response, ok := out.RawResponse.(*smithyhttp.Response)
4431	if !ok {
4432		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4433	}
4434
4435	if response.StatusCode < 200 || response.StatusCode >= 300 {
4436		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeHostedConnections(response, &metadata)
4437	}
4438	output := &DescribeHostedConnectionsOutput{}
4439	out.Result = output
4440
4441	var buff [1024]byte
4442	ringBuffer := smithyio.NewRingBuffer(buff[:])
4443
4444	body := io.TeeReader(response.Body, ringBuffer)
4445	decoder := json.NewDecoder(body)
4446	decoder.UseNumber()
4447	var shape interface{}
4448	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4449		var snapshot bytes.Buffer
4450		io.Copy(&snapshot, ringBuffer)
4451		err = &smithy.DeserializationError{
4452			Err:      fmt.Errorf("failed to decode response body, %w", err),
4453			Snapshot: snapshot.Bytes(),
4454		}
4455		return out, metadata, err
4456	}
4457
4458	err = awsAwsjson11_deserializeOpDocumentDescribeHostedConnectionsOutput(&output, shape)
4459	if err != nil {
4460		var snapshot bytes.Buffer
4461		io.Copy(&snapshot, ringBuffer)
4462		err = &smithy.DeserializationError{
4463			Err:      fmt.Errorf("failed to decode response body, %w", err),
4464			Snapshot: snapshot.Bytes(),
4465		}
4466		return out, metadata, err
4467	}
4468
4469	return out, metadata, err
4470}
4471
4472func awsAwsjson11_deserializeOpErrorDescribeHostedConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4473	var errorBuffer bytes.Buffer
4474	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4475		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4476	}
4477	errorBody := bytes.NewReader(errorBuffer.Bytes())
4478
4479	errorCode := "UnknownError"
4480	errorMessage := errorCode
4481
4482	code := response.Header.Get("X-Amzn-ErrorType")
4483	if len(code) != 0 {
4484		errorCode = restjson.SanitizeErrorCode(code)
4485	}
4486
4487	var buff [1024]byte
4488	ringBuffer := smithyio.NewRingBuffer(buff[:])
4489
4490	body := io.TeeReader(errorBody, ringBuffer)
4491	decoder := json.NewDecoder(body)
4492	decoder.UseNumber()
4493	code, message, err := restjson.GetErrorInfo(decoder)
4494	if err != nil {
4495		var snapshot bytes.Buffer
4496		io.Copy(&snapshot, ringBuffer)
4497		err = &smithy.DeserializationError{
4498			Err:      fmt.Errorf("failed to decode response body, %w", err),
4499			Snapshot: snapshot.Bytes(),
4500		}
4501		return err
4502	}
4503
4504	errorBody.Seek(0, io.SeekStart)
4505	if len(code) != 0 {
4506		errorCode = restjson.SanitizeErrorCode(code)
4507	}
4508	if len(message) != 0 {
4509		errorMessage = message
4510	}
4511
4512	switch {
4513	case strings.EqualFold("DirectConnectClientException", errorCode):
4514		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4515
4516	case strings.EqualFold("DirectConnectServerException", errorCode):
4517		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4518
4519	default:
4520		genericError := &smithy.GenericAPIError{
4521			Code:    errorCode,
4522			Message: errorMessage,
4523		}
4524		return genericError
4525
4526	}
4527}
4528
4529type awsAwsjson11_deserializeOpDescribeInterconnectLoa struct {
4530}
4531
4532func (*awsAwsjson11_deserializeOpDescribeInterconnectLoa) ID() string {
4533	return "OperationDeserializer"
4534}
4535
4536func (m *awsAwsjson11_deserializeOpDescribeInterconnectLoa) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4537	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4538) {
4539	out, metadata, err = next.HandleDeserialize(ctx, in)
4540	if err != nil {
4541		return out, metadata, err
4542	}
4543
4544	response, ok := out.RawResponse.(*smithyhttp.Response)
4545	if !ok {
4546		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4547	}
4548
4549	if response.StatusCode < 200 || response.StatusCode >= 300 {
4550		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInterconnectLoa(response, &metadata)
4551	}
4552	output := &DescribeInterconnectLoaOutput{}
4553	out.Result = output
4554
4555	var buff [1024]byte
4556	ringBuffer := smithyio.NewRingBuffer(buff[:])
4557
4558	body := io.TeeReader(response.Body, ringBuffer)
4559	decoder := json.NewDecoder(body)
4560	decoder.UseNumber()
4561	var shape interface{}
4562	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4563		var snapshot bytes.Buffer
4564		io.Copy(&snapshot, ringBuffer)
4565		err = &smithy.DeserializationError{
4566			Err:      fmt.Errorf("failed to decode response body, %w", err),
4567			Snapshot: snapshot.Bytes(),
4568		}
4569		return out, metadata, err
4570	}
4571
4572	err = awsAwsjson11_deserializeOpDocumentDescribeInterconnectLoaOutput(&output, shape)
4573	if err != nil {
4574		var snapshot bytes.Buffer
4575		io.Copy(&snapshot, ringBuffer)
4576		err = &smithy.DeserializationError{
4577			Err:      fmt.Errorf("failed to decode response body, %w", err),
4578			Snapshot: snapshot.Bytes(),
4579		}
4580		return out, metadata, err
4581	}
4582
4583	return out, metadata, err
4584}
4585
4586func awsAwsjson11_deserializeOpErrorDescribeInterconnectLoa(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4587	var errorBuffer bytes.Buffer
4588	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4589		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4590	}
4591	errorBody := bytes.NewReader(errorBuffer.Bytes())
4592
4593	errorCode := "UnknownError"
4594	errorMessage := errorCode
4595
4596	code := response.Header.Get("X-Amzn-ErrorType")
4597	if len(code) != 0 {
4598		errorCode = restjson.SanitizeErrorCode(code)
4599	}
4600
4601	var buff [1024]byte
4602	ringBuffer := smithyio.NewRingBuffer(buff[:])
4603
4604	body := io.TeeReader(errorBody, ringBuffer)
4605	decoder := json.NewDecoder(body)
4606	decoder.UseNumber()
4607	code, message, err := restjson.GetErrorInfo(decoder)
4608	if err != nil {
4609		var snapshot bytes.Buffer
4610		io.Copy(&snapshot, ringBuffer)
4611		err = &smithy.DeserializationError{
4612			Err:      fmt.Errorf("failed to decode response body, %w", err),
4613			Snapshot: snapshot.Bytes(),
4614		}
4615		return err
4616	}
4617
4618	errorBody.Seek(0, io.SeekStart)
4619	if len(code) != 0 {
4620		errorCode = restjson.SanitizeErrorCode(code)
4621	}
4622	if len(message) != 0 {
4623		errorMessage = message
4624	}
4625
4626	switch {
4627	case strings.EqualFold("DirectConnectClientException", errorCode):
4628		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4629
4630	case strings.EqualFold("DirectConnectServerException", errorCode):
4631		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4632
4633	default:
4634		genericError := &smithy.GenericAPIError{
4635			Code:    errorCode,
4636			Message: errorMessage,
4637		}
4638		return genericError
4639
4640	}
4641}
4642
4643type awsAwsjson11_deserializeOpDescribeInterconnects struct {
4644}
4645
4646func (*awsAwsjson11_deserializeOpDescribeInterconnects) ID() string {
4647	return "OperationDeserializer"
4648}
4649
4650func (m *awsAwsjson11_deserializeOpDescribeInterconnects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4651	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4652) {
4653	out, metadata, err = next.HandleDeserialize(ctx, in)
4654	if err != nil {
4655		return out, metadata, err
4656	}
4657
4658	response, ok := out.RawResponse.(*smithyhttp.Response)
4659	if !ok {
4660		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4661	}
4662
4663	if response.StatusCode < 200 || response.StatusCode >= 300 {
4664		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInterconnects(response, &metadata)
4665	}
4666	output := &DescribeInterconnectsOutput{}
4667	out.Result = output
4668
4669	var buff [1024]byte
4670	ringBuffer := smithyio.NewRingBuffer(buff[:])
4671
4672	body := io.TeeReader(response.Body, ringBuffer)
4673	decoder := json.NewDecoder(body)
4674	decoder.UseNumber()
4675	var shape interface{}
4676	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4677		var snapshot bytes.Buffer
4678		io.Copy(&snapshot, ringBuffer)
4679		err = &smithy.DeserializationError{
4680			Err:      fmt.Errorf("failed to decode response body, %w", err),
4681			Snapshot: snapshot.Bytes(),
4682		}
4683		return out, metadata, err
4684	}
4685
4686	err = awsAwsjson11_deserializeOpDocumentDescribeInterconnectsOutput(&output, shape)
4687	if err != nil {
4688		var snapshot bytes.Buffer
4689		io.Copy(&snapshot, ringBuffer)
4690		err = &smithy.DeserializationError{
4691			Err:      fmt.Errorf("failed to decode response body, %w", err),
4692			Snapshot: snapshot.Bytes(),
4693		}
4694		return out, metadata, err
4695	}
4696
4697	return out, metadata, err
4698}
4699
4700func awsAwsjson11_deserializeOpErrorDescribeInterconnects(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4701	var errorBuffer bytes.Buffer
4702	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4703		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4704	}
4705	errorBody := bytes.NewReader(errorBuffer.Bytes())
4706
4707	errorCode := "UnknownError"
4708	errorMessage := errorCode
4709
4710	code := response.Header.Get("X-Amzn-ErrorType")
4711	if len(code) != 0 {
4712		errorCode = restjson.SanitizeErrorCode(code)
4713	}
4714
4715	var buff [1024]byte
4716	ringBuffer := smithyio.NewRingBuffer(buff[:])
4717
4718	body := io.TeeReader(errorBody, ringBuffer)
4719	decoder := json.NewDecoder(body)
4720	decoder.UseNumber()
4721	code, message, err := restjson.GetErrorInfo(decoder)
4722	if err != nil {
4723		var snapshot bytes.Buffer
4724		io.Copy(&snapshot, ringBuffer)
4725		err = &smithy.DeserializationError{
4726			Err:      fmt.Errorf("failed to decode response body, %w", err),
4727			Snapshot: snapshot.Bytes(),
4728		}
4729		return err
4730	}
4731
4732	errorBody.Seek(0, io.SeekStart)
4733	if len(code) != 0 {
4734		errorCode = restjson.SanitizeErrorCode(code)
4735	}
4736	if len(message) != 0 {
4737		errorMessage = message
4738	}
4739
4740	switch {
4741	case strings.EqualFold("DirectConnectClientException", errorCode):
4742		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4743
4744	case strings.EqualFold("DirectConnectServerException", errorCode):
4745		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4746
4747	default:
4748		genericError := &smithy.GenericAPIError{
4749			Code:    errorCode,
4750			Message: errorMessage,
4751		}
4752		return genericError
4753
4754	}
4755}
4756
4757type awsAwsjson11_deserializeOpDescribeLags struct {
4758}
4759
4760func (*awsAwsjson11_deserializeOpDescribeLags) ID() string {
4761	return "OperationDeserializer"
4762}
4763
4764func (m *awsAwsjson11_deserializeOpDescribeLags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4765	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4766) {
4767	out, metadata, err = next.HandleDeserialize(ctx, in)
4768	if err != nil {
4769		return out, metadata, err
4770	}
4771
4772	response, ok := out.RawResponse.(*smithyhttp.Response)
4773	if !ok {
4774		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4775	}
4776
4777	if response.StatusCode < 200 || response.StatusCode >= 300 {
4778		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLags(response, &metadata)
4779	}
4780	output := &DescribeLagsOutput{}
4781	out.Result = output
4782
4783	var buff [1024]byte
4784	ringBuffer := smithyio.NewRingBuffer(buff[:])
4785
4786	body := io.TeeReader(response.Body, ringBuffer)
4787	decoder := json.NewDecoder(body)
4788	decoder.UseNumber()
4789	var shape interface{}
4790	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4791		var snapshot bytes.Buffer
4792		io.Copy(&snapshot, ringBuffer)
4793		err = &smithy.DeserializationError{
4794			Err:      fmt.Errorf("failed to decode response body, %w", err),
4795			Snapshot: snapshot.Bytes(),
4796		}
4797		return out, metadata, err
4798	}
4799
4800	err = awsAwsjson11_deserializeOpDocumentDescribeLagsOutput(&output, shape)
4801	if err != nil {
4802		var snapshot bytes.Buffer
4803		io.Copy(&snapshot, ringBuffer)
4804		err = &smithy.DeserializationError{
4805			Err:      fmt.Errorf("failed to decode response body, %w", err),
4806			Snapshot: snapshot.Bytes(),
4807		}
4808		return out, metadata, err
4809	}
4810
4811	return out, metadata, err
4812}
4813
4814func awsAwsjson11_deserializeOpErrorDescribeLags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4815	var errorBuffer bytes.Buffer
4816	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4817		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4818	}
4819	errorBody := bytes.NewReader(errorBuffer.Bytes())
4820
4821	errorCode := "UnknownError"
4822	errorMessage := errorCode
4823
4824	code := response.Header.Get("X-Amzn-ErrorType")
4825	if len(code) != 0 {
4826		errorCode = restjson.SanitizeErrorCode(code)
4827	}
4828
4829	var buff [1024]byte
4830	ringBuffer := smithyio.NewRingBuffer(buff[:])
4831
4832	body := io.TeeReader(errorBody, ringBuffer)
4833	decoder := json.NewDecoder(body)
4834	decoder.UseNumber()
4835	code, message, err := restjson.GetErrorInfo(decoder)
4836	if err != nil {
4837		var snapshot bytes.Buffer
4838		io.Copy(&snapshot, ringBuffer)
4839		err = &smithy.DeserializationError{
4840			Err:      fmt.Errorf("failed to decode response body, %w", err),
4841			Snapshot: snapshot.Bytes(),
4842		}
4843		return err
4844	}
4845
4846	errorBody.Seek(0, io.SeekStart)
4847	if len(code) != 0 {
4848		errorCode = restjson.SanitizeErrorCode(code)
4849	}
4850	if len(message) != 0 {
4851		errorMessage = message
4852	}
4853
4854	switch {
4855	case strings.EqualFold("DirectConnectClientException", errorCode):
4856		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4857
4858	case strings.EqualFold("DirectConnectServerException", errorCode):
4859		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4860
4861	default:
4862		genericError := &smithy.GenericAPIError{
4863			Code:    errorCode,
4864			Message: errorMessage,
4865		}
4866		return genericError
4867
4868	}
4869}
4870
4871type awsAwsjson11_deserializeOpDescribeLoa struct {
4872}
4873
4874func (*awsAwsjson11_deserializeOpDescribeLoa) ID() string {
4875	return "OperationDeserializer"
4876}
4877
4878func (m *awsAwsjson11_deserializeOpDescribeLoa) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4879	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4880) {
4881	out, metadata, err = next.HandleDeserialize(ctx, in)
4882	if err != nil {
4883		return out, metadata, err
4884	}
4885
4886	response, ok := out.RawResponse.(*smithyhttp.Response)
4887	if !ok {
4888		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
4889	}
4890
4891	if response.StatusCode < 200 || response.StatusCode >= 300 {
4892		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLoa(response, &metadata)
4893	}
4894	output := &DescribeLoaOutput{}
4895	out.Result = output
4896
4897	var buff [1024]byte
4898	ringBuffer := smithyio.NewRingBuffer(buff[:])
4899
4900	body := io.TeeReader(response.Body, ringBuffer)
4901	decoder := json.NewDecoder(body)
4902	decoder.UseNumber()
4903	var shape interface{}
4904	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
4905		var snapshot bytes.Buffer
4906		io.Copy(&snapshot, ringBuffer)
4907		err = &smithy.DeserializationError{
4908			Err:      fmt.Errorf("failed to decode response body, %w", err),
4909			Snapshot: snapshot.Bytes(),
4910		}
4911		return out, metadata, err
4912	}
4913
4914	err = awsAwsjson11_deserializeOpDocumentDescribeLoaOutput(&output, shape)
4915	if err != nil {
4916		var snapshot bytes.Buffer
4917		io.Copy(&snapshot, ringBuffer)
4918		err = &smithy.DeserializationError{
4919			Err:      fmt.Errorf("failed to decode response body, %w", err),
4920			Snapshot: snapshot.Bytes(),
4921		}
4922		return out, metadata, err
4923	}
4924
4925	return out, metadata, err
4926}
4927
4928func awsAwsjson11_deserializeOpErrorDescribeLoa(response *smithyhttp.Response, metadata *middleware.Metadata) error {
4929	var errorBuffer bytes.Buffer
4930	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
4931		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
4932	}
4933	errorBody := bytes.NewReader(errorBuffer.Bytes())
4934
4935	errorCode := "UnknownError"
4936	errorMessage := errorCode
4937
4938	code := response.Header.Get("X-Amzn-ErrorType")
4939	if len(code) != 0 {
4940		errorCode = restjson.SanitizeErrorCode(code)
4941	}
4942
4943	var buff [1024]byte
4944	ringBuffer := smithyio.NewRingBuffer(buff[:])
4945
4946	body := io.TeeReader(errorBody, ringBuffer)
4947	decoder := json.NewDecoder(body)
4948	decoder.UseNumber()
4949	code, message, err := restjson.GetErrorInfo(decoder)
4950	if err != nil {
4951		var snapshot bytes.Buffer
4952		io.Copy(&snapshot, ringBuffer)
4953		err = &smithy.DeserializationError{
4954			Err:      fmt.Errorf("failed to decode response body, %w", err),
4955			Snapshot: snapshot.Bytes(),
4956		}
4957		return err
4958	}
4959
4960	errorBody.Seek(0, io.SeekStart)
4961	if len(code) != 0 {
4962		errorCode = restjson.SanitizeErrorCode(code)
4963	}
4964	if len(message) != 0 {
4965		errorMessage = message
4966	}
4967
4968	switch {
4969	case strings.EqualFold("DirectConnectClientException", errorCode):
4970		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
4971
4972	case strings.EqualFold("DirectConnectServerException", errorCode):
4973		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
4974
4975	default:
4976		genericError := &smithy.GenericAPIError{
4977			Code:    errorCode,
4978			Message: errorMessage,
4979		}
4980		return genericError
4981
4982	}
4983}
4984
4985type awsAwsjson11_deserializeOpDescribeLocations struct {
4986}
4987
4988func (*awsAwsjson11_deserializeOpDescribeLocations) ID() string {
4989	return "OperationDeserializer"
4990}
4991
4992func (m *awsAwsjson11_deserializeOpDescribeLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
4993	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
4994) {
4995	out, metadata, err = next.HandleDeserialize(ctx, in)
4996	if err != nil {
4997		return out, metadata, err
4998	}
4999
5000	response, ok := out.RawResponse.(*smithyhttp.Response)
5001	if !ok {
5002		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5003	}
5004
5005	if response.StatusCode < 200 || response.StatusCode >= 300 {
5006		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLocations(response, &metadata)
5007	}
5008	output := &DescribeLocationsOutput{}
5009	out.Result = output
5010
5011	var buff [1024]byte
5012	ringBuffer := smithyio.NewRingBuffer(buff[:])
5013
5014	body := io.TeeReader(response.Body, ringBuffer)
5015	decoder := json.NewDecoder(body)
5016	decoder.UseNumber()
5017	var shape interface{}
5018	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5019		var snapshot bytes.Buffer
5020		io.Copy(&snapshot, ringBuffer)
5021		err = &smithy.DeserializationError{
5022			Err:      fmt.Errorf("failed to decode response body, %w", err),
5023			Snapshot: snapshot.Bytes(),
5024		}
5025		return out, metadata, err
5026	}
5027
5028	err = awsAwsjson11_deserializeOpDocumentDescribeLocationsOutput(&output, shape)
5029	if err != nil {
5030		var snapshot bytes.Buffer
5031		io.Copy(&snapshot, ringBuffer)
5032		err = &smithy.DeserializationError{
5033			Err:      fmt.Errorf("failed to decode response body, %w", err),
5034			Snapshot: snapshot.Bytes(),
5035		}
5036		return out, metadata, err
5037	}
5038
5039	return out, metadata, err
5040}
5041
5042func awsAwsjson11_deserializeOpErrorDescribeLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5043	var errorBuffer bytes.Buffer
5044	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5045		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5046	}
5047	errorBody := bytes.NewReader(errorBuffer.Bytes())
5048
5049	errorCode := "UnknownError"
5050	errorMessage := errorCode
5051
5052	code := response.Header.Get("X-Amzn-ErrorType")
5053	if len(code) != 0 {
5054		errorCode = restjson.SanitizeErrorCode(code)
5055	}
5056
5057	var buff [1024]byte
5058	ringBuffer := smithyio.NewRingBuffer(buff[:])
5059
5060	body := io.TeeReader(errorBody, ringBuffer)
5061	decoder := json.NewDecoder(body)
5062	decoder.UseNumber()
5063	code, message, err := restjson.GetErrorInfo(decoder)
5064	if err != nil {
5065		var snapshot bytes.Buffer
5066		io.Copy(&snapshot, ringBuffer)
5067		err = &smithy.DeserializationError{
5068			Err:      fmt.Errorf("failed to decode response body, %w", err),
5069			Snapshot: snapshot.Bytes(),
5070		}
5071		return err
5072	}
5073
5074	errorBody.Seek(0, io.SeekStart)
5075	if len(code) != 0 {
5076		errorCode = restjson.SanitizeErrorCode(code)
5077	}
5078	if len(message) != 0 {
5079		errorMessage = message
5080	}
5081
5082	switch {
5083	case strings.EqualFold("DirectConnectClientException", errorCode):
5084		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5085
5086	case strings.EqualFold("DirectConnectServerException", errorCode):
5087		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5088
5089	default:
5090		genericError := &smithy.GenericAPIError{
5091			Code:    errorCode,
5092			Message: errorMessage,
5093		}
5094		return genericError
5095
5096	}
5097}
5098
5099type awsAwsjson11_deserializeOpDescribeTags struct {
5100}
5101
5102func (*awsAwsjson11_deserializeOpDescribeTags) ID() string {
5103	return "OperationDeserializer"
5104}
5105
5106func (m *awsAwsjson11_deserializeOpDescribeTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5107	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5108) {
5109	out, metadata, err = next.HandleDeserialize(ctx, in)
5110	if err != nil {
5111		return out, metadata, err
5112	}
5113
5114	response, ok := out.RawResponse.(*smithyhttp.Response)
5115	if !ok {
5116		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5117	}
5118
5119	if response.StatusCode < 200 || response.StatusCode >= 300 {
5120		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTags(response, &metadata)
5121	}
5122	output := &DescribeTagsOutput{}
5123	out.Result = output
5124
5125	var buff [1024]byte
5126	ringBuffer := smithyio.NewRingBuffer(buff[:])
5127
5128	body := io.TeeReader(response.Body, ringBuffer)
5129	decoder := json.NewDecoder(body)
5130	decoder.UseNumber()
5131	var shape interface{}
5132	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5133		var snapshot bytes.Buffer
5134		io.Copy(&snapshot, ringBuffer)
5135		err = &smithy.DeserializationError{
5136			Err:      fmt.Errorf("failed to decode response body, %w", err),
5137			Snapshot: snapshot.Bytes(),
5138		}
5139		return out, metadata, err
5140	}
5141
5142	err = awsAwsjson11_deserializeOpDocumentDescribeTagsOutput(&output, shape)
5143	if err != nil {
5144		var snapshot bytes.Buffer
5145		io.Copy(&snapshot, ringBuffer)
5146		err = &smithy.DeserializationError{
5147			Err:      fmt.Errorf("failed to decode response body, %w", err),
5148			Snapshot: snapshot.Bytes(),
5149		}
5150		return out, metadata, err
5151	}
5152
5153	return out, metadata, err
5154}
5155
5156func awsAwsjson11_deserializeOpErrorDescribeTags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5157	var errorBuffer bytes.Buffer
5158	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5159		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5160	}
5161	errorBody := bytes.NewReader(errorBuffer.Bytes())
5162
5163	errorCode := "UnknownError"
5164	errorMessage := errorCode
5165
5166	code := response.Header.Get("X-Amzn-ErrorType")
5167	if len(code) != 0 {
5168		errorCode = restjson.SanitizeErrorCode(code)
5169	}
5170
5171	var buff [1024]byte
5172	ringBuffer := smithyio.NewRingBuffer(buff[:])
5173
5174	body := io.TeeReader(errorBody, ringBuffer)
5175	decoder := json.NewDecoder(body)
5176	decoder.UseNumber()
5177	code, message, err := restjson.GetErrorInfo(decoder)
5178	if err != nil {
5179		var snapshot bytes.Buffer
5180		io.Copy(&snapshot, ringBuffer)
5181		err = &smithy.DeserializationError{
5182			Err:      fmt.Errorf("failed to decode response body, %w", err),
5183			Snapshot: snapshot.Bytes(),
5184		}
5185		return err
5186	}
5187
5188	errorBody.Seek(0, io.SeekStart)
5189	if len(code) != 0 {
5190		errorCode = restjson.SanitizeErrorCode(code)
5191	}
5192	if len(message) != 0 {
5193		errorMessage = message
5194	}
5195
5196	switch {
5197	case strings.EqualFold("DirectConnectClientException", errorCode):
5198		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5199
5200	case strings.EqualFold("DirectConnectServerException", errorCode):
5201		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5202
5203	default:
5204		genericError := &smithy.GenericAPIError{
5205			Code:    errorCode,
5206			Message: errorMessage,
5207		}
5208		return genericError
5209
5210	}
5211}
5212
5213type awsAwsjson11_deserializeOpDescribeVirtualGateways struct {
5214}
5215
5216func (*awsAwsjson11_deserializeOpDescribeVirtualGateways) ID() string {
5217	return "OperationDeserializer"
5218}
5219
5220func (m *awsAwsjson11_deserializeOpDescribeVirtualGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5221	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5222) {
5223	out, metadata, err = next.HandleDeserialize(ctx, in)
5224	if err != nil {
5225		return out, metadata, err
5226	}
5227
5228	response, ok := out.RawResponse.(*smithyhttp.Response)
5229	if !ok {
5230		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5231	}
5232
5233	if response.StatusCode < 200 || response.StatusCode >= 300 {
5234		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeVirtualGateways(response, &metadata)
5235	}
5236	output := &DescribeVirtualGatewaysOutput{}
5237	out.Result = output
5238
5239	var buff [1024]byte
5240	ringBuffer := smithyio.NewRingBuffer(buff[:])
5241
5242	body := io.TeeReader(response.Body, ringBuffer)
5243	decoder := json.NewDecoder(body)
5244	decoder.UseNumber()
5245	var shape interface{}
5246	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5247		var snapshot bytes.Buffer
5248		io.Copy(&snapshot, ringBuffer)
5249		err = &smithy.DeserializationError{
5250			Err:      fmt.Errorf("failed to decode response body, %w", err),
5251			Snapshot: snapshot.Bytes(),
5252		}
5253		return out, metadata, err
5254	}
5255
5256	err = awsAwsjson11_deserializeOpDocumentDescribeVirtualGatewaysOutput(&output, shape)
5257	if err != nil {
5258		var snapshot bytes.Buffer
5259		io.Copy(&snapshot, ringBuffer)
5260		err = &smithy.DeserializationError{
5261			Err:      fmt.Errorf("failed to decode response body, %w", err),
5262			Snapshot: snapshot.Bytes(),
5263		}
5264		return out, metadata, err
5265	}
5266
5267	return out, metadata, err
5268}
5269
5270func awsAwsjson11_deserializeOpErrorDescribeVirtualGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5271	var errorBuffer bytes.Buffer
5272	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5273		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5274	}
5275	errorBody := bytes.NewReader(errorBuffer.Bytes())
5276
5277	errorCode := "UnknownError"
5278	errorMessage := errorCode
5279
5280	code := response.Header.Get("X-Amzn-ErrorType")
5281	if len(code) != 0 {
5282		errorCode = restjson.SanitizeErrorCode(code)
5283	}
5284
5285	var buff [1024]byte
5286	ringBuffer := smithyio.NewRingBuffer(buff[:])
5287
5288	body := io.TeeReader(errorBody, ringBuffer)
5289	decoder := json.NewDecoder(body)
5290	decoder.UseNumber()
5291	code, message, err := restjson.GetErrorInfo(decoder)
5292	if err != nil {
5293		var snapshot bytes.Buffer
5294		io.Copy(&snapshot, ringBuffer)
5295		err = &smithy.DeserializationError{
5296			Err:      fmt.Errorf("failed to decode response body, %w", err),
5297			Snapshot: snapshot.Bytes(),
5298		}
5299		return err
5300	}
5301
5302	errorBody.Seek(0, io.SeekStart)
5303	if len(code) != 0 {
5304		errorCode = restjson.SanitizeErrorCode(code)
5305	}
5306	if len(message) != 0 {
5307		errorMessage = message
5308	}
5309
5310	switch {
5311	case strings.EqualFold("DirectConnectClientException", errorCode):
5312		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5313
5314	case strings.EqualFold("DirectConnectServerException", errorCode):
5315		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5316
5317	default:
5318		genericError := &smithy.GenericAPIError{
5319			Code:    errorCode,
5320			Message: errorMessage,
5321		}
5322		return genericError
5323
5324	}
5325}
5326
5327type awsAwsjson11_deserializeOpDescribeVirtualInterfaces struct {
5328}
5329
5330func (*awsAwsjson11_deserializeOpDescribeVirtualInterfaces) ID() string {
5331	return "OperationDeserializer"
5332}
5333
5334func (m *awsAwsjson11_deserializeOpDescribeVirtualInterfaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5335	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5336) {
5337	out, metadata, err = next.HandleDeserialize(ctx, in)
5338	if err != nil {
5339		return out, metadata, err
5340	}
5341
5342	response, ok := out.RawResponse.(*smithyhttp.Response)
5343	if !ok {
5344		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5345	}
5346
5347	if response.StatusCode < 200 || response.StatusCode >= 300 {
5348		return out, metadata, awsAwsjson11_deserializeOpErrorDescribeVirtualInterfaces(response, &metadata)
5349	}
5350	output := &DescribeVirtualInterfacesOutput{}
5351	out.Result = output
5352
5353	var buff [1024]byte
5354	ringBuffer := smithyio.NewRingBuffer(buff[:])
5355
5356	body := io.TeeReader(response.Body, ringBuffer)
5357	decoder := json.NewDecoder(body)
5358	decoder.UseNumber()
5359	var shape interface{}
5360	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5361		var snapshot bytes.Buffer
5362		io.Copy(&snapshot, ringBuffer)
5363		err = &smithy.DeserializationError{
5364			Err:      fmt.Errorf("failed to decode response body, %w", err),
5365			Snapshot: snapshot.Bytes(),
5366		}
5367		return out, metadata, err
5368	}
5369
5370	err = awsAwsjson11_deserializeOpDocumentDescribeVirtualInterfacesOutput(&output, shape)
5371	if err != nil {
5372		var snapshot bytes.Buffer
5373		io.Copy(&snapshot, ringBuffer)
5374		err = &smithy.DeserializationError{
5375			Err:      fmt.Errorf("failed to decode response body, %w", err),
5376			Snapshot: snapshot.Bytes(),
5377		}
5378		return out, metadata, err
5379	}
5380
5381	return out, metadata, err
5382}
5383
5384func awsAwsjson11_deserializeOpErrorDescribeVirtualInterfaces(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5385	var errorBuffer bytes.Buffer
5386	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5387		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5388	}
5389	errorBody := bytes.NewReader(errorBuffer.Bytes())
5390
5391	errorCode := "UnknownError"
5392	errorMessage := errorCode
5393
5394	code := response.Header.Get("X-Amzn-ErrorType")
5395	if len(code) != 0 {
5396		errorCode = restjson.SanitizeErrorCode(code)
5397	}
5398
5399	var buff [1024]byte
5400	ringBuffer := smithyio.NewRingBuffer(buff[:])
5401
5402	body := io.TeeReader(errorBody, ringBuffer)
5403	decoder := json.NewDecoder(body)
5404	decoder.UseNumber()
5405	code, message, err := restjson.GetErrorInfo(decoder)
5406	if err != nil {
5407		var snapshot bytes.Buffer
5408		io.Copy(&snapshot, ringBuffer)
5409		err = &smithy.DeserializationError{
5410			Err:      fmt.Errorf("failed to decode response body, %w", err),
5411			Snapshot: snapshot.Bytes(),
5412		}
5413		return err
5414	}
5415
5416	errorBody.Seek(0, io.SeekStart)
5417	if len(code) != 0 {
5418		errorCode = restjson.SanitizeErrorCode(code)
5419	}
5420	if len(message) != 0 {
5421		errorMessage = message
5422	}
5423
5424	switch {
5425	case strings.EqualFold("DirectConnectClientException", errorCode):
5426		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5427
5428	case strings.EqualFold("DirectConnectServerException", errorCode):
5429		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5430
5431	default:
5432		genericError := &smithy.GenericAPIError{
5433			Code:    errorCode,
5434			Message: errorMessage,
5435		}
5436		return genericError
5437
5438	}
5439}
5440
5441type awsAwsjson11_deserializeOpDisassociateConnectionFromLag struct {
5442}
5443
5444func (*awsAwsjson11_deserializeOpDisassociateConnectionFromLag) ID() string {
5445	return "OperationDeserializer"
5446}
5447
5448func (m *awsAwsjson11_deserializeOpDisassociateConnectionFromLag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5449	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5450) {
5451	out, metadata, err = next.HandleDeserialize(ctx, in)
5452	if err != nil {
5453		return out, metadata, err
5454	}
5455
5456	response, ok := out.RawResponse.(*smithyhttp.Response)
5457	if !ok {
5458		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5459	}
5460
5461	if response.StatusCode < 200 || response.StatusCode >= 300 {
5462		return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateConnectionFromLag(response, &metadata)
5463	}
5464	output := &DisassociateConnectionFromLagOutput{}
5465	out.Result = output
5466
5467	var buff [1024]byte
5468	ringBuffer := smithyio.NewRingBuffer(buff[:])
5469
5470	body := io.TeeReader(response.Body, ringBuffer)
5471	decoder := json.NewDecoder(body)
5472	decoder.UseNumber()
5473	var shape interface{}
5474	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5475		var snapshot bytes.Buffer
5476		io.Copy(&snapshot, ringBuffer)
5477		err = &smithy.DeserializationError{
5478			Err:      fmt.Errorf("failed to decode response body, %w", err),
5479			Snapshot: snapshot.Bytes(),
5480		}
5481		return out, metadata, err
5482	}
5483
5484	err = awsAwsjson11_deserializeOpDocumentDisassociateConnectionFromLagOutput(&output, shape)
5485	if err != nil {
5486		var snapshot bytes.Buffer
5487		io.Copy(&snapshot, ringBuffer)
5488		err = &smithy.DeserializationError{
5489			Err:      fmt.Errorf("failed to decode response body, %w", err),
5490			Snapshot: snapshot.Bytes(),
5491		}
5492		return out, metadata, err
5493	}
5494
5495	return out, metadata, err
5496}
5497
5498func awsAwsjson11_deserializeOpErrorDisassociateConnectionFromLag(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5499	var errorBuffer bytes.Buffer
5500	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5501		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5502	}
5503	errorBody := bytes.NewReader(errorBuffer.Bytes())
5504
5505	errorCode := "UnknownError"
5506	errorMessage := errorCode
5507
5508	code := response.Header.Get("X-Amzn-ErrorType")
5509	if len(code) != 0 {
5510		errorCode = restjson.SanitizeErrorCode(code)
5511	}
5512
5513	var buff [1024]byte
5514	ringBuffer := smithyio.NewRingBuffer(buff[:])
5515
5516	body := io.TeeReader(errorBody, ringBuffer)
5517	decoder := json.NewDecoder(body)
5518	decoder.UseNumber()
5519	code, message, err := restjson.GetErrorInfo(decoder)
5520	if err != nil {
5521		var snapshot bytes.Buffer
5522		io.Copy(&snapshot, ringBuffer)
5523		err = &smithy.DeserializationError{
5524			Err:      fmt.Errorf("failed to decode response body, %w", err),
5525			Snapshot: snapshot.Bytes(),
5526		}
5527		return err
5528	}
5529
5530	errorBody.Seek(0, io.SeekStart)
5531	if len(code) != 0 {
5532		errorCode = restjson.SanitizeErrorCode(code)
5533	}
5534	if len(message) != 0 {
5535		errorMessage = message
5536	}
5537
5538	switch {
5539	case strings.EqualFold("DirectConnectClientException", errorCode):
5540		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5541
5542	case strings.EqualFold("DirectConnectServerException", errorCode):
5543		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5544
5545	default:
5546		genericError := &smithy.GenericAPIError{
5547			Code:    errorCode,
5548			Message: errorMessage,
5549		}
5550		return genericError
5551
5552	}
5553}
5554
5555type awsAwsjson11_deserializeOpListVirtualInterfaceTestHistory struct {
5556}
5557
5558func (*awsAwsjson11_deserializeOpListVirtualInterfaceTestHistory) ID() string {
5559	return "OperationDeserializer"
5560}
5561
5562func (m *awsAwsjson11_deserializeOpListVirtualInterfaceTestHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5563	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5564) {
5565	out, metadata, err = next.HandleDeserialize(ctx, in)
5566	if err != nil {
5567		return out, metadata, err
5568	}
5569
5570	response, ok := out.RawResponse.(*smithyhttp.Response)
5571	if !ok {
5572		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5573	}
5574
5575	if response.StatusCode < 200 || response.StatusCode >= 300 {
5576		return out, metadata, awsAwsjson11_deserializeOpErrorListVirtualInterfaceTestHistory(response, &metadata)
5577	}
5578	output := &ListVirtualInterfaceTestHistoryOutput{}
5579	out.Result = output
5580
5581	var buff [1024]byte
5582	ringBuffer := smithyio.NewRingBuffer(buff[:])
5583
5584	body := io.TeeReader(response.Body, ringBuffer)
5585	decoder := json.NewDecoder(body)
5586	decoder.UseNumber()
5587	var shape interface{}
5588	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5589		var snapshot bytes.Buffer
5590		io.Copy(&snapshot, ringBuffer)
5591		err = &smithy.DeserializationError{
5592			Err:      fmt.Errorf("failed to decode response body, %w", err),
5593			Snapshot: snapshot.Bytes(),
5594		}
5595		return out, metadata, err
5596	}
5597
5598	err = awsAwsjson11_deserializeOpDocumentListVirtualInterfaceTestHistoryOutput(&output, shape)
5599	if err != nil {
5600		var snapshot bytes.Buffer
5601		io.Copy(&snapshot, ringBuffer)
5602		err = &smithy.DeserializationError{
5603			Err:      fmt.Errorf("failed to decode response body, %w", err),
5604			Snapshot: snapshot.Bytes(),
5605		}
5606		return out, metadata, err
5607	}
5608
5609	return out, metadata, err
5610}
5611
5612func awsAwsjson11_deserializeOpErrorListVirtualInterfaceTestHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5613	var errorBuffer bytes.Buffer
5614	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5615		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5616	}
5617	errorBody := bytes.NewReader(errorBuffer.Bytes())
5618
5619	errorCode := "UnknownError"
5620	errorMessage := errorCode
5621
5622	code := response.Header.Get("X-Amzn-ErrorType")
5623	if len(code) != 0 {
5624		errorCode = restjson.SanitizeErrorCode(code)
5625	}
5626
5627	var buff [1024]byte
5628	ringBuffer := smithyio.NewRingBuffer(buff[:])
5629
5630	body := io.TeeReader(errorBody, ringBuffer)
5631	decoder := json.NewDecoder(body)
5632	decoder.UseNumber()
5633	code, message, err := restjson.GetErrorInfo(decoder)
5634	if err != nil {
5635		var snapshot bytes.Buffer
5636		io.Copy(&snapshot, ringBuffer)
5637		err = &smithy.DeserializationError{
5638			Err:      fmt.Errorf("failed to decode response body, %w", err),
5639			Snapshot: snapshot.Bytes(),
5640		}
5641		return err
5642	}
5643
5644	errorBody.Seek(0, io.SeekStart)
5645	if len(code) != 0 {
5646		errorCode = restjson.SanitizeErrorCode(code)
5647	}
5648	if len(message) != 0 {
5649		errorMessage = message
5650	}
5651
5652	switch {
5653	case strings.EqualFold("DirectConnectClientException", errorCode):
5654		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5655
5656	case strings.EqualFold("DirectConnectServerException", errorCode):
5657		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5658
5659	default:
5660		genericError := &smithy.GenericAPIError{
5661			Code:    errorCode,
5662			Message: errorMessage,
5663		}
5664		return genericError
5665
5666	}
5667}
5668
5669type awsAwsjson11_deserializeOpStartBgpFailoverTest struct {
5670}
5671
5672func (*awsAwsjson11_deserializeOpStartBgpFailoverTest) ID() string {
5673	return "OperationDeserializer"
5674}
5675
5676func (m *awsAwsjson11_deserializeOpStartBgpFailoverTest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5677	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5678) {
5679	out, metadata, err = next.HandleDeserialize(ctx, in)
5680	if err != nil {
5681		return out, metadata, err
5682	}
5683
5684	response, ok := out.RawResponse.(*smithyhttp.Response)
5685	if !ok {
5686		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5687	}
5688
5689	if response.StatusCode < 200 || response.StatusCode >= 300 {
5690		return out, metadata, awsAwsjson11_deserializeOpErrorStartBgpFailoverTest(response, &metadata)
5691	}
5692	output := &StartBgpFailoverTestOutput{}
5693	out.Result = output
5694
5695	var buff [1024]byte
5696	ringBuffer := smithyio.NewRingBuffer(buff[:])
5697
5698	body := io.TeeReader(response.Body, ringBuffer)
5699	decoder := json.NewDecoder(body)
5700	decoder.UseNumber()
5701	var shape interface{}
5702	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5703		var snapshot bytes.Buffer
5704		io.Copy(&snapshot, ringBuffer)
5705		err = &smithy.DeserializationError{
5706			Err:      fmt.Errorf("failed to decode response body, %w", err),
5707			Snapshot: snapshot.Bytes(),
5708		}
5709		return out, metadata, err
5710	}
5711
5712	err = awsAwsjson11_deserializeOpDocumentStartBgpFailoverTestOutput(&output, shape)
5713	if err != nil {
5714		var snapshot bytes.Buffer
5715		io.Copy(&snapshot, ringBuffer)
5716		err = &smithy.DeserializationError{
5717			Err:      fmt.Errorf("failed to decode response body, %w", err),
5718			Snapshot: snapshot.Bytes(),
5719		}
5720		return out, metadata, err
5721	}
5722
5723	return out, metadata, err
5724}
5725
5726func awsAwsjson11_deserializeOpErrorStartBgpFailoverTest(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5727	var errorBuffer bytes.Buffer
5728	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5729		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5730	}
5731	errorBody := bytes.NewReader(errorBuffer.Bytes())
5732
5733	errorCode := "UnknownError"
5734	errorMessage := errorCode
5735
5736	code := response.Header.Get("X-Amzn-ErrorType")
5737	if len(code) != 0 {
5738		errorCode = restjson.SanitizeErrorCode(code)
5739	}
5740
5741	var buff [1024]byte
5742	ringBuffer := smithyio.NewRingBuffer(buff[:])
5743
5744	body := io.TeeReader(errorBody, ringBuffer)
5745	decoder := json.NewDecoder(body)
5746	decoder.UseNumber()
5747	code, message, err := restjson.GetErrorInfo(decoder)
5748	if err != nil {
5749		var snapshot bytes.Buffer
5750		io.Copy(&snapshot, ringBuffer)
5751		err = &smithy.DeserializationError{
5752			Err:      fmt.Errorf("failed to decode response body, %w", err),
5753			Snapshot: snapshot.Bytes(),
5754		}
5755		return err
5756	}
5757
5758	errorBody.Seek(0, io.SeekStart)
5759	if len(code) != 0 {
5760		errorCode = restjson.SanitizeErrorCode(code)
5761	}
5762	if len(message) != 0 {
5763		errorMessage = message
5764	}
5765
5766	switch {
5767	case strings.EqualFold("DirectConnectClientException", errorCode):
5768		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5769
5770	case strings.EqualFold("DirectConnectServerException", errorCode):
5771		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5772
5773	default:
5774		genericError := &smithy.GenericAPIError{
5775			Code:    errorCode,
5776			Message: errorMessage,
5777		}
5778		return genericError
5779
5780	}
5781}
5782
5783type awsAwsjson11_deserializeOpStopBgpFailoverTest struct {
5784}
5785
5786func (*awsAwsjson11_deserializeOpStopBgpFailoverTest) ID() string {
5787	return "OperationDeserializer"
5788}
5789
5790func (m *awsAwsjson11_deserializeOpStopBgpFailoverTest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5791	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5792) {
5793	out, metadata, err = next.HandleDeserialize(ctx, in)
5794	if err != nil {
5795		return out, metadata, err
5796	}
5797
5798	response, ok := out.RawResponse.(*smithyhttp.Response)
5799	if !ok {
5800		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5801	}
5802
5803	if response.StatusCode < 200 || response.StatusCode >= 300 {
5804		return out, metadata, awsAwsjson11_deserializeOpErrorStopBgpFailoverTest(response, &metadata)
5805	}
5806	output := &StopBgpFailoverTestOutput{}
5807	out.Result = output
5808
5809	var buff [1024]byte
5810	ringBuffer := smithyio.NewRingBuffer(buff[:])
5811
5812	body := io.TeeReader(response.Body, ringBuffer)
5813	decoder := json.NewDecoder(body)
5814	decoder.UseNumber()
5815	var shape interface{}
5816	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5817		var snapshot bytes.Buffer
5818		io.Copy(&snapshot, ringBuffer)
5819		err = &smithy.DeserializationError{
5820			Err:      fmt.Errorf("failed to decode response body, %w", err),
5821			Snapshot: snapshot.Bytes(),
5822		}
5823		return out, metadata, err
5824	}
5825
5826	err = awsAwsjson11_deserializeOpDocumentStopBgpFailoverTestOutput(&output, shape)
5827	if err != nil {
5828		var snapshot bytes.Buffer
5829		io.Copy(&snapshot, ringBuffer)
5830		err = &smithy.DeserializationError{
5831			Err:      fmt.Errorf("failed to decode response body, %w", err),
5832			Snapshot: snapshot.Bytes(),
5833		}
5834		return out, metadata, err
5835	}
5836
5837	return out, metadata, err
5838}
5839
5840func awsAwsjson11_deserializeOpErrorStopBgpFailoverTest(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5841	var errorBuffer bytes.Buffer
5842	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5843		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5844	}
5845	errorBody := bytes.NewReader(errorBuffer.Bytes())
5846
5847	errorCode := "UnknownError"
5848	errorMessage := errorCode
5849
5850	code := response.Header.Get("X-Amzn-ErrorType")
5851	if len(code) != 0 {
5852		errorCode = restjson.SanitizeErrorCode(code)
5853	}
5854
5855	var buff [1024]byte
5856	ringBuffer := smithyio.NewRingBuffer(buff[:])
5857
5858	body := io.TeeReader(errorBody, ringBuffer)
5859	decoder := json.NewDecoder(body)
5860	decoder.UseNumber()
5861	code, message, err := restjson.GetErrorInfo(decoder)
5862	if err != nil {
5863		var snapshot bytes.Buffer
5864		io.Copy(&snapshot, ringBuffer)
5865		err = &smithy.DeserializationError{
5866			Err:      fmt.Errorf("failed to decode response body, %w", err),
5867			Snapshot: snapshot.Bytes(),
5868		}
5869		return err
5870	}
5871
5872	errorBody.Seek(0, io.SeekStart)
5873	if len(code) != 0 {
5874		errorCode = restjson.SanitizeErrorCode(code)
5875	}
5876	if len(message) != 0 {
5877		errorMessage = message
5878	}
5879
5880	switch {
5881	case strings.EqualFold("DirectConnectClientException", errorCode):
5882		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5883
5884	case strings.EqualFold("DirectConnectServerException", errorCode):
5885		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
5886
5887	default:
5888		genericError := &smithy.GenericAPIError{
5889			Code:    errorCode,
5890			Message: errorMessage,
5891		}
5892		return genericError
5893
5894	}
5895}
5896
5897type awsAwsjson11_deserializeOpTagResource struct {
5898}
5899
5900func (*awsAwsjson11_deserializeOpTagResource) ID() string {
5901	return "OperationDeserializer"
5902}
5903
5904func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
5905	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
5906) {
5907	out, metadata, err = next.HandleDeserialize(ctx, in)
5908	if err != nil {
5909		return out, metadata, err
5910	}
5911
5912	response, ok := out.RawResponse.(*smithyhttp.Response)
5913	if !ok {
5914		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
5915	}
5916
5917	if response.StatusCode < 200 || response.StatusCode >= 300 {
5918		return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata)
5919	}
5920	output := &TagResourceOutput{}
5921	out.Result = output
5922
5923	var buff [1024]byte
5924	ringBuffer := smithyio.NewRingBuffer(buff[:])
5925
5926	body := io.TeeReader(response.Body, ringBuffer)
5927	decoder := json.NewDecoder(body)
5928	decoder.UseNumber()
5929	var shape interface{}
5930	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
5931		var snapshot bytes.Buffer
5932		io.Copy(&snapshot, ringBuffer)
5933		err = &smithy.DeserializationError{
5934			Err:      fmt.Errorf("failed to decode response body, %w", err),
5935			Snapshot: snapshot.Bytes(),
5936		}
5937		return out, metadata, err
5938	}
5939
5940	err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape)
5941	if err != nil {
5942		var snapshot bytes.Buffer
5943		io.Copy(&snapshot, ringBuffer)
5944		err = &smithy.DeserializationError{
5945			Err:      fmt.Errorf("failed to decode response body, %w", err),
5946			Snapshot: snapshot.Bytes(),
5947		}
5948		return out, metadata, err
5949	}
5950
5951	return out, metadata, err
5952}
5953
5954func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
5955	var errorBuffer bytes.Buffer
5956	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
5957		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
5958	}
5959	errorBody := bytes.NewReader(errorBuffer.Bytes())
5960
5961	errorCode := "UnknownError"
5962	errorMessage := errorCode
5963
5964	code := response.Header.Get("X-Amzn-ErrorType")
5965	if len(code) != 0 {
5966		errorCode = restjson.SanitizeErrorCode(code)
5967	}
5968
5969	var buff [1024]byte
5970	ringBuffer := smithyio.NewRingBuffer(buff[:])
5971
5972	body := io.TeeReader(errorBody, ringBuffer)
5973	decoder := json.NewDecoder(body)
5974	decoder.UseNumber()
5975	code, message, err := restjson.GetErrorInfo(decoder)
5976	if err != nil {
5977		var snapshot bytes.Buffer
5978		io.Copy(&snapshot, ringBuffer)
5979		err = &smithy.DeserializationError{
5980			Err:      fmt.Errorf("failed to decode response body, %w", err),
5981			Snapshot: snapshot.Bytes(),
5982		}
5983		return err
5984	}
5985
5986	errorBody.Seek(0, io.SeekStart)
5987	if len(code) != 0 {
5988		errorCode = restjson.SanitizeErrorCode(code)
5989	}
5990	if len(message) != 0 {
5991		errorMessage = message
5992	}
5993
5994	switch {
5995	case strings.EqualFold("DirectConnectClientException", errorCode):
5996		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
5997
5998	case strings.EqualFold("DirectConnectServerException", errorCode):
5999		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
6000
6001	case strings.EqualFold("DuplicateTagKeysException", errorCode):
6002		return awsAwsjson11_deserializeErrorDuplicateTagKeysException(response, errorBody)
6003
6004	case strings.EqualFold("TooManyTagsException", errorCode):
6005		return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody)
6006
6007	default:
6008		genericError := &smithy.GenericAPIError{
6009			Code:    errorCode,
6010			Message: errorMessage,
6011		}
6012		return genericError
6013
6014	}
6015}
6016
6017type awsAwsjson11_deserializeOpUntagResource struct {
6018}
6019
6020func (*awsAwsjson11_deserializeOpUntagResource) ID() string {
6021	return "OperationDeserializer"
6022}
6023
6024func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6025	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6026) {
6027	out, metadata, err = next.HandleDeserialize(ctx, in)
6028	if err != nil {
6029		return out, metadata, err
6030	}
6031
6032	response, ok := out.RawResponse.(*smithyhttp.Response)
6033	if !ok {
6034		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6035	}
6036
6037	if response.StatusCode < 200 || response.StatusCode >= 300 {
6038		return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata)
6039	}
6040	output := &UntagResourceOutput{}
6041	out.Result = output
6042
6043	var buff [1024]byte
6044	ringBuffer := smithyio.NewRingBuffer(buff[:])
6045
6046	body := io.TeeReader(response.Body, ringBuffer)
6047	decoder := json.NewDecoder(body)
6048	decoder.UseNumber()
6049	var shape interface{}
6050	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6051		var snapshot bytes.Buffer
6052		io.Copy(&snapshot, ringBuffer)
6053		err = &smithy.DeserializationError{
6054			Err:      fmt.Errorf("failed to decode response body, %w", err),
6055			Snapshot: snapshot.Bytes(),
6056		}
6057		return out, metadata, err
6058	}
6059
6060	err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape)
6061	if err != nil {
6062		var snapshot bytes.Buffer
6063		io.Copy(&snapshot, ringBuffer)
6064		err = &smithy.DeserializationError{
6065			Err:      fmt.Errorf("failed to decode response body, %w", err),
6066			Snapshot: snapshot.Bytes(),
6067		}
6068		return out, metadata, err
6069	}
6070
6071	return out, metadata, err
6072}
6073
6074func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6075	var errorBuffer bytes.Buffer
6076	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6077		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6078	}
6079	errorBody := bytes.NewReader(errorBuffer.Bytes())
6080
6081	errorCode := "UnknownError"
6082	errorMessage := errorCode
6083
6084	code := response.Header.Get("X-Amzn-ErrorType")
6085	if len(code) != 0 {
6086		errorCode = restjson.SanitizeErrorCode(code)
6087	}
6088
6089	var buff [1024]byte
6090	ringBuffer := smithyio.NewRingBuffer(buff[:])
6091
6092	body := io.TeeReader(errorBody, ringBuffer)
6093	decoder := json.NewDecoder(body)
6094	decoder.UseNumber()
6095	code, message, err := restjson.GetErrorInfo(decoder)
6096	if err != nil {
6097		var snapshot bytes.Buffer
6098		io.Copy(&snapshot, ringBuffer)
6099		err = &smithy.DeserializationError{
6100			Err:      fmt.Errorf("failed to decode response body, %w", err),
6101			Snapshot: snapshot.Bytes(),
6102		}
6103		return err
6104	}
6105
6106	errorBody.Seek(0, io.SeekStart)
6107	if len(code) != 0 {
6108		errorCode = restjson.SanitizeErrorCode(code)
6109	}
6110	if len(message) != 0 {
6111		errorMessage = message
6112	}
6113
6114	switch {
6115	case strings.EqualFold("DirectConnectClientException", errorCode):
6116		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
6117
6118	case strings.EqualFold("DirectConnectServerException", errorCode):
6119		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
6120
6121	default:
6122		genericError := &smithy.GenericAPIError{
6123			Code:    errorCode,
6124			Message: errorMessage,
6125		}
6126		return genericError
6127
6128	}
6129}
6130
6131type awsAwsjson11_deserializeOpUpdateDirectConnectGatewayAssociation struct {
6132}
6133
6134func (*awsAwsjson11_deserializeOpUpdateDirectConnectGatewayAssociation) ID() string {
6135	return "OperationDeserializer"
6136}
6137
6138func (m *awsAwsjson11_deserializeOpUpdateDirectConnectGatewayAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6139	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6140) {
6141	out, metadata, err = next.HandleDeserialize(ctx, in)
6142	if err != nil {
6143		return out, metadata, err
6144	}
6145
6146	response, ok := out.RawResponse.(*smithyhttp.Response)
6147	if !ok {
6148		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6149	}
6150
6151	if response.StatusCode < 200 || response.StatusCode >= 300 {
6152		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDirectConnectGatewayAssociation(response, &metadata)
6153	}
6154	output := &UpdateDirectConnectGatewayAssociationOutput{}
6155	out.Result = output
6156
6157	var buff [1024]byte
6158	ringBuffer := smithyio.NewRingBuffer(buff[:])
6159
6160	body := io.TeeReader(response.Body, ringBuffer)
6161	decoder := json.NewDecoder(body)
6162	decoder.UseNumber()
6163	var shape interface{}
6164	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6165		var snapshot bytes.Buffer
6166		io.Copy(&snapshot, ringBuffer)
6167		err = &smithy.DeserializationError{
6168			Err:      fmt.Errorf("failed to decode response body, %w", err),
6169			Snapshot: snapshot.Bytes(),
6170		}
6171		return out, metadata, err
6172	}
6173
6174	err = awsAwsjson11_deserializeOpDocumentUpdateDirectConnectGatewayAssociationOutput(&output, shape)
6175	if err != nil {
6176		var snapshot bytes.Buffer
6177		io.Copy(&snapshot, ringBuffer)
6178		err = &smithy.DeserializationError{
6179			Err:      fmt.Errorf("failed to decode response body, %w", err),
6180			Snapshot: snapshot.Bytes(),
6181		}
6182		return out, metadata, err
6183	}
6184
6185	return out, metadata, err
6186}
6187
6188func awsAwsjson11_deserializeOpErrorUpdateDirectConnectGatewayAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6189	var errorBuffer bytes.Buffer
6190	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6191		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6192	}
6193	errorBody := bytes.NewReader(errorBuffer.Bytes())
6194
6195	errorCode := "UnknownError"
6196	errorMessage := errorCode
6197
6198	code := response.Header.Get("X-Amzn-ErrorType")
6199	if len(code) != 0 {
6200		errorCode = restjson.SanitizeErrorCode(code)
6201	}
6202
6203	var buff [1024]byte
6204	ringBuffer := smithyio.NewRingBuffer(buff[:])
6205
6206	body := io.TeeReader(errorBody, ringBuffer)
6207	decoder := json.NewDecoder(body)
6208	decoder.UseNumber()
6209	code, message, err := restjson.GetErrorInfo(decoder)
6210	if err != nil {
6211		var snapshot bytes.Buffer
6212		io.Copy(&snapshot, ringBuffer)
6213		err = &smithy.DeserializationError{
6214			Err:      fmt.Errorf("failed to decode response body, %w", err),
6215			Snapshot: snapshot.Bytes(),
6216		}
6217		return err
6218	}
6219
6220	errorBody.Seek(0, io.SeekStart)
6221	if len(code) != 0 {
6222		errorCode = restjson.SanitizeErrorCode(code)
6223	}
6224	if len(message) != 0 {
6225		errorMessage = message
6226	}
6227
6228	switch {
6229	case strings.EqualFold("DirectConnectClientException", errorCode):
6230		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
6231
6232	case strings.EqualFold("DirectConnectServerException", errorCode):
6233		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
6234
6235	default:
6236		genericError := &smithy.GenericAPIError{
6237			Code:    errorCode,
6238			Message: errorMessage,
6239		}
6240		return genericError
6241
6242	}
6243}
6244
6245type awsAwsjson11_deserializeOpUpdateLag struct {
6246}
6247
6248func (*awsAwsjson11_deserializeOpUpdateLag) ID() string {
6249	return "OperationDeserializer"
6250}
6251
6252func (m *awsAwsjson11_deserializeOpUpdateLag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6253	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6254) {
6255	out, metadata, err = next.HandleDeserialize(ctx, in)
6256	if err != nil {
6257		return out, metadata, err
6258	}
6259
6260	response, ok := out.RawResponse.(*smithyhttp.Response)
6261	if !ok {
6262		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6263	}
6264
6265	if response.StatusCode < 200 || response.StatusCode >= 300 {
6266		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLag(response, &metadata)
6267	}
6268	output := &UpdateLagOutput{}
6269	out.Result = output
6270
6271	var buff [1024]byte
6272	ringBuffer := smithyio.NewRingBuffer(buff[:])
6273
6274	body := io.TeeReader(response.Body, ringBuffer)
6275	decoder := json.NewDecoder(body)
6276	decoder.UseNumber()
6277	var shape interface{}
6278	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6279		var snapshot bytes.Buffer
6280		io.Copy(&snapshot, ringBuffer)
6281		err = &smithy.DeserializationError{
6282			Err:      fmt.Errorf("failed to decode response body, %w", err),
6283			Snapshot: snapshot.Bytes(),
6284		}
6285		return out, metadata, err
6286	}
6287
6288	err = awsAwsjson11_deserializeOpDocumentUpdateLagOutput(&output, shape)
6289	if err != nil {
6290		var snapshot bytes.Buffer
6291		io.Copy(&snapshot, ringBuffer)
6292		err = &smithy.DeserializationError{
6293			Err:      fmt.Errorf("failed to decode response body, %w", err),
6294			Snapshot: snapshot.Bytes(),
6295		}
6296		return out, metadata, err
6297	}
6298
6299	return out, metadata, err
6300}
6301
6302func awsAwsjson11_deserializeOpErrorUpdateLag(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6303	var errorBuffer bytes.Buffer
6304	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6305		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6306	}
6307	errorBody := bytes.NewReader(errorBuffer.Bytes())
6308
6309	errorCode := "UnknownError"
6310	errorMessage := errorCode
6311
6312	code := response.Header.Get("X-Amzn-ErrorType")
6313	if len(code) != 0 {
6314		errorCode = restjson.SanitizeErrorCode(code)
6315	}
6316
6317	var buff [1024]byte
6318	ringBuffer := smithyio.NewRingBuffer(buff[:])
6319
6320	body := io.TeeReader(errorBody, ringBuffer)
6321	decoder := json.NewDecoder(body)
6322	decoder.UseNumber()
6323	code, message, err := restjson.GetErrorInfo(decoder)
6324	if err != nil {
6325		var snapshot bytes.Buffer
6326		io.Copy(&snapshot, ringBuffer)
6327		err = &smithy.DeserializationError{
6328			Err:      fmt.Errorf("failed to decode response body, %w", err),
6329			Snapshot: snapshot.Bytes(),
6330		}
6331		return err
6332	}
6333
6334	errorBody.Seek(0, io.SeekStart)
6335	if len(code) != 0 {
6336		errorCode = restjson.SanitizeErrorCode(code)
6337	}
6338	if len(message) != 0 {
6339		errorMessage = message
6340	}
6341
6342	switch {
6343	case strings.EqualFold("DirectConnectClientException", errorCode):
6344		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
6345
6346	case strings.EqualFold("DirectConnectServerException", errorCode):
6347		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
6348
6349	default:
6350		genericError := &smithy.GenericAPIError{
6351			Code:    errorCode,
6352			Message: errorMessage,
6353		}
6354		return genericError
6355
6356	}
6357}
6358
6359type awsAwsjson11_deserializeOpUpdateVirtualInterfaceAttributes struct {
6360}
6361
6362func (*awsAwsjson11_deserializeOpUpdateVirtualInterfaceAttributes) ID() string {
6363	return "OperationDeserializer"
6364}
6365
6366func (m *awsAwsjson11_deserializeOpUpdateVirtualInterfaceAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
6367	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
6368) {
6369	out, metadata, err = next.HandleDeserialize(ctx, in)
6370	if err != nil {
6371		return out, metadata, err
6372	}
6373
6374	response, ok := out.RawResponse.(*smithyhttp.Response)
6375	if !ok {
6376		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
6377	}
6378
6379	if response.StatusCode < 200 || response.StatusCode >= 300 {
6380		return out, metadata, awsAwsjson11_deserializeOpErrorUpdateVirtualInterfaceAttributes(response, &metadata)
6381	}
6382	output := &UpdateVirtualInterfaceAttributesOutput{}
6383	out.Result = output
6384
6385	var buff [1024]byte
6386	ringBuffer := smithyio.NewRingBuffer(buff[:])
6387
6388	body := io.TeeReader(response.Body, ringBuffer)
6389	decoder := json.NewDecoder(body)
6390	decoder.UseNumber()
6391	var shape interface{}
6392	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6393		var snapshot bytes.Buffer
6394		io.Copy(&snapshot, ringBuffer)
6395		err = &smithy.DeserializationError{
6396			Err:      fmt.Errorf("failed to decode response body, %w", err),
6397			Snapshot: snapshot.Bytes(),
6398		}
6399		return out, metadata, err
6400	}
6401
6402	err = awsAwsjson11_deserializeOpDocumentUpdateVirtualInterfaceAttributesOutput(&output, shape)
6403	if err != nil {
6404		var snapshot bytes.Buffer
6405		io.Copy(&snapshot, ringBuffer)
6406		err = &smithy.DeserializationError{
6407			Err:      fmt.Errorf("failed to decode response body, %w", err),
6408			Snapshot: snapshot.Bytes(),
6409		}
6410		return out, metadata, err
6411	}
6412
6413	return out, metadata, err
6414}
6415
6416func awsAwsjson11_deserializeOpErrorUpdateVirtualInterfaceAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error {
6417	var errorBuffer bytes.Buffer
6418	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
6419		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
6420	}
6421	errorBody := bytes.NewReader(errorBuffer.Bytes())
6422
6423	errorCode := "UnknownError"
6424	errorMessage := errorCode
6425
6426	code := response.Header.Get("X-Amzn-ErrorType")
6427	if len(code) != 0 {
6428		errorCode = restjson.SanitizeErrorCode(code)
6429	}
6430
6431	var buff [1024]byte
6432	ringBuffer := smithyio.NewRingBuffer(buff[:])
6433
6434	body := io.TeeReader(errorBody, ringBuffer)
6435	decoder := json.NewDecoder(body)
6436	decoder.UseNumber()
6437	code, message, err := restjson.GetErrorInfo(decoder)
6438	if err != nil {
6439		var snapshot bytes.Buffer
6440		io.Copy(&snapshot, ringBuffer)
6441		err = &smithy.DeserializationError{
6442			Err:      fmt.Errorf("failed to decode response body, %w", err),
6443			Snapshot: snapshot.Bytes(),
6444		}
6445		return err
6446	}
6447
6448	errorBody.Seek(0, io.SeekStart)
6449	if len(code) != 0 {
6450		errorCode = restjson.SanitizeErrorCode(code)
6451	}
6452	if len(message) != 0 {
6453		errorMessage = message
6454	}
6455
6456	switch {
6457	case strings.EqualFold("DirectConnectClientException", errorCode):
6458		return awsAwsjson11_deserializeErrorDirectConnectClientException(response, errorBody)
6459
6460	case strings.EqualFold("DirectConnectServerException", errorCode):
6461		return awsAwsjson11_deserializeErrorDirectConnectServerException(response, errorBody)
6462
6463	default:
6464		genericError := &smithy.GenericAPIError{
6465			Code:    errorCode,
6466			Message: errorMessage,
6467		}
6468		return genericError
6469
6470	}
6471}
6472
6473func awsAwsjson11_deserializeErrorDirectConnectClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
6474	var buff [1024]byte
6475	ringBuffer := smithyio.NewRingBuffer(buff[:])
6476
6477	body := io.TeeReader(errorBody, ringBuffer)
6478	decoder := json.NewDecoder(body)
6479	decoder.UseNumber()
6480	var shape interface{}
6481	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6482		var snapshot bytes.Buffer
6483		io.Copy(&snapshot, ringBuffer)
6484		err = &smithy.DeserializationError{
6485			Err:      fmt.Errorf("failed to decode response body, %w", err),
6486			Snapshot: snapshot.Bytes(),
6487		}
6488		return err
6489	}
6490
6491	output := &types.DirectConnectClientException{}
6492	err := awsAwsjson11_deserializeDocumentDirectConnectClientException(&output, shape)
6493
6494	if err != nil {
6495		var snapshot bytes.Buffer
6496		io.Copy(&snapshot, ringBuffer)
6497		err = &smithy.DeserializationError{
6498			Err:      fmt.Errorf("failed to decode response body, %w", err),
6499			Snapshot: snapshot.Bytes(),
6500		}
6501		return err
6502	}
6503
6504	errorBody.Seek(0, io.SeekStart)
6505	return output
6506}
6507
6508func awsAwsjson11_deserializeErrorDirectConnectServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
6509	var buff [1024]byte
6510	ringBuffer := smithyio.NewRingBuffer(buff[:])
6511
6512	body := io.TeeReader(errorBody, ringBuffer)
6513	decoder := json.NewDecoder(body)
6514	decoder.UseNumber()
6515	var shape interface{}
6516	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6517		var snapshot bytes.Buffer
6518		io.Copy(&snapshot, ringBuffer)
6519		err = &smithy.DeserializationError{
6520			Err:      fmt.Errorf("failed to decode response body, %w", err),
6521			Snapshot: snapshot.Bytes(),
6522		}
6523		return err
6524	}
6525
6526	output := &types.DirectConnectServerException{}
6527	err := awsAwsjson11_deserializeDocumentDirectConnectServerException(&output, shape)
6528
6529	if err != nil {
6530		var snapshot bytes.Buffer
6531		io.Copy(&snapshot, ringBuffer)
6532		err = &smithy.DeserializationError{
6533			Err:      fmt.Errorf("failed to decode response body, %w", err),
6534			Snapshot: snapshot.Bytes(),
6535		}
6536		return err
6537	}
6538
6539	errorBody.Seek(0, io.SeekStart)
6540	return output
6541}
6542
6543func awsAwsjson11_deserializeErrorDuplicateTagKeysException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
6544	var buff [1024]byte
6545	ringBuffer := smithyio.NewRingBuffer(buff[:])
6546
6547	body := io.TeeReader(errorBody, ringBuffer)
6548	decoder := json.NewDecoder(body)
6549	decoder.UseNumber()
6550	var shape interface{}
6551	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6552		var snapshot bytes.Buffer
6553		io.Copy(&snapshot, ringBuffer)
6554		err = &smithy.DeserializationError{
6555			Err:      fmt.Errorf("failed to decode response body, %w", err),
6556			Snapshot: snapshot.Bytes(),
6557		}
6558		return err
6559	}
6560
6561	output := &types.DuplicateTagKeysException{}
6562	err := awsAwsjson11_deserializeDocumentDuplicateTagKeysException(&output, shape)
6563
6564	if err != nil {
6565		var snapshot bytes.Buffer
6566		io.Copy(&snapshot, ringBuffer)
6567		err = &smithy.DeserializationError{
6568			Err:      fmt.Errorf("failed to decode response body, %w", err),
6569			Snapshot: snapshot.Bytes(),
6570		}
6571		return err
6572	}
6573
6574	errorBody.Seek(0, io.SeekStart)
6575	return output
6576}
6577
6578func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
6579	var buff [1024]byte
6580	ringBuffer := smithyio.NewRingBuffer(buff[:])
6581
6582	body := io.TeeReader(errorBody, ringBuffer)
6583	decoder := json.NewDecoder(body)
6584	decoder.UseNumber()
6585	var shape interface{}
6586	if err := decoder.Decode(&shape); err != nil && err != io.EOF {
6587		var snapshot bytes.Buffer
6588		io.Copy(&snapshot, ringBuffer)
6589		err = &smithy.DeserializationError{
6590			Err:      fmt.Errorf("failed to decode response body, %w", err),
6591			Snapshot: snapshot.Bytes(),
6592		}
6593		return err
6594	}
6595
6596	output := &types.TooManyTagsException{}
6597	err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape)
6598
6599	if err != nil {
6600		var snapshot bytes.Buffer
6601		io.Copy(&snapshot, ringBuffer)
6602		err = &smithy.DeserializationError{
6603			Err:      fmt.Errorf("failed to decode response body, %w", err),
6604			Snapshot: snapshot.Bytes(),
6605		}
6606		return err
6607	}
6608
6609	errorBody.Seek(0, io.SeekStart)
6610	return output
6611}
6612
6613func awsAwsjson11_deserializeDocumentAssociatedGateway(v **types.AssociatedGateway, value interface{}) error {
6614	if v == nil {
6615		return fmt.Errorf("unexpected nil of type %T", v)
6616	}
6617	if value == nil {
6618		return nil
6619	}
6620
6621	shape, ok := value.(map[string]interface{})
6622	if !ok {
6623		return fmt.Errorf("unexpected JSON type %v", value)
6624	}
6625
6626	var sv *types.AssociatedGateway
6627	if *v == nil {
6628		sv = &types.AssociatedGateway{}
6629	} else {
6630		sv = *v
6631	}
6632
6633	for key, value := range shape {
6634		switch key {
6635		case "id":
6636			if value != nil {
6637				jtv, ok := value.(string)
6638				if !ok {
6639					return fmt.Errorf("expected GatewayIdentifier to be of type string, got %T instead", value)
6640				}
6641				sv.Id = ptr.String(jtv)
6642			}
6643
6644		case "ownerAccount":
6645			if value != nil {
6646				jtv, ok := value.(string)
6647				if !ok {
6648					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
6649				}
6650				sv.OwnerAccount = ptr.String(jtv)
6651			}
6652
6653		case "region":
6654			if value != nil {
6655				jtv, ok := value.(string)
6656				if !ok {
6657					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
6658				}
6659				sv.Region = ptr.String(jtv)
6660			}
6661
6662		case "type":
6663			if value != nil {
6664				jtv, ok := value.(string)
6665				if !ok {
6666					return fmt.Errorf("expected GatewayType to be of type string, got %T instead", value)
6667				}
6668				sv.Type = types.GatewayType(jtv)
6669			}
6670
6671		default:
6672			_, _ = key, value
6673
6674		}
6675	}
6676	*v = sv
6677	return nil
6678}
6679
6680func awsAwsjson11_deserializeDocumentAvailablePortSpeeds(v *[]string, value interface{}) error {
6681	if v == nil {
6682		return fmt.Errorf("unexpected nil of type %T", v)
6683	}
6684	if value == nil {
6685		return nil
6686	}
6687
6688	shape, ok := value.([]interface{})
6689	if !ok {
6690		return fmt.Errorf("unexpected JSON type %v", value)
6691	}
6692
6693	var cv []string
6694	if *v == nil {
6695		cv = []string{}
6696	} else {
6697		cv = *v
6698	}
6699
6700	for _, value := range shape {
6701		var col string
6702		if value != nil {
6703			jtv, ok := value.(string)
6704			if !ok {
6705				return fmt.Errorf("expected PortSpeed to be of type string, got %T instead", value)
6706			}
6707			col = jtv
6708		}
6709		cv = append(cv, col)
6710
6711	}
6712	*v = cv
6713	return nil
6714}
6715
6716func awsAwsjson11_deserializeDocumentBGPPeer(v **types.BGPPeer, value interface{}) error {
6717	if v == nil {
6718		return fmt.Errorf("unexpected nil of type %T", v)
6719	}
6720	if value == nil {
6721		return nil
6722	}
6723
6724	shape, ok := value.(map[string]interface{})
6725	if !ok {
6726		return fmt.Errorf("unexpected JSON type %v", value)
6727	}
6728
6729	var sv *types.BGPPeer
6730	if *v == nil {
6731		sv = &types.BGPPeer{}
6732	} else {
6733		sv = *v
6734	}
6735
6736	for key, value := range shape {
6737		switch key {
6738		case "addressFamily":
6739			if value != nil {
6740				jtv, ok := value.(string)
6741				if !ok {
6742					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
6743				}
6744				sv.AddressFamily = types.AddressFamily(jtv)
6745			}
6746
6747		case "amazonAddress":
6748			if value != nil {
6749				jtv, ok := value.(string)
6750				if !ok {
6751					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
6752				}
6753				sv.AmazonAddress = ptr.String(jtv)
6754			}
6755
6756		case "asn":
6757			if value != nil {
6758				jtv, ok := value.(json.Number)
6759				if !ok {
6760					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
6761				}
6762				i64, err := jtv.Int64()
6763				if err != nil {
6764					return err
6765				}
6766				sv.Asn = int32(i64)
6767			}
6768
6769		case "authKey":
6770			if value != nil {
6771				jtv, ok := value.(string)
6772				if !ok {
6773					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
6774				}
6775				sv.AuthKey = ptr.String(jtv)
6776			}
6777
6778		case "awsDeviceV2":
6779			if value != nil {
6780				jtv, ok := value.(string)
6781				if !ok {
6782					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
6783				}
6784				sv.AwsDeviceV2 = ptr.String(jtv)
6785			}
6786
6787		case "bgpPeerId":
6788			if value != nil {
6789				jtv, ok := value.(string)
6790				if !ok {
6791					return fmt.Errorf("expected BGPPeerId to be of type string, got %T instead", value)
6792				}
6793				sv.BgpPeerId = ptr.String(jtv)
6794			}
6795
6796		case "bgpPeerState":
6797			if value != nil {
6798				jtv, ok := value.(string)
6799				if !ok {
6800					return fmt.Errorf("expected BGPPeerState to be of type string, got %T instead", value)
6801				}
6802				sv.BgpPeerState = types.BGPPeerState(jtv)
6803			}
6804
6805		case "bgpStatus":
6806			if value != nil {
6807				jtv, ok := value.(string)
6808				if !ok {
6809					return fmt.Errorf("expected BGPStatus to be of type string, got %T instead", value)
6810				}
6811				sv.BgpStatus = types.BGPStatus(jtv)
6812			}
6813
6814		case "customerAddress":
6815			if value != nil {
6816				jtv, ok := value.(string)
6817				if !ok {
6818					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
6819				}
6820				sv.CustomerAddress = ptr.String(jtv)
6821			}
6822
6823		default:
6824			_, _ = key, value
6825
6826		}
6827	}
6828	*v = sv
6829	return nil
6830}
6831
6832func awsAwsjson11_deserializeDocumentBGPPeerIdList(v *[]string, value interface{}) error {
6833	if v == nil {
6834		return fmt.Errorf("unexpected nil of type %T", v)
6835	}
6836	if value == nil {
6837		return nil
6838	}
6839
6840	shape, ok := value.([]interface{})
6841	if !ok {
6842		return fmt.Errorf("unexpected JSON type %v", value)
6843	}
6844
6845	var cv []string
6846	if *v == nil {
6847		cv = []string{}
6848	} else {
6849		cv = *v
6850	}
6851
6852	for _, value := range shape {
6853		var col string
6854		if value != nil {
6855			jtv, ok := value.(string)
6856			if !ok {
6857				return fmt.Errorf("expected BGPPeerId to be of type string, got %T instead", value)
6858			}
6859			col = jtv
6860		}
6861		cv = append(cv, col)
6862
6863	}
6864	*v = cv
6865	return nil
6866}
6867
6868func awsAwsjson11_deserializeDocumentBGPPeerList(v *[]types.BGPPeer, value interface{}) error {
6869	if v == nil {
6870		return fmt.Errorf("unexpected nil of type %T", v)
6871	}
6872	if value == nil {
6873		return nil
6874	}
6875
6876	shape, ok := value.([]interface{})
6877	if !ok {
6878		return fmt.Errorf("unexpected JSON type %v", value)
6879	}
6880
6881	var cv []types.BGPPeer
6882	if *v == nil {
6883		cv = []types.BGPPeer{}
6884	} else {
6885		cv = *v
6886	}
6887
6888	for _, value := range shape {
6889		var col types.BGPPeer
6890		destAddr := &col
6891		if err := awsAwsjson11_deserializeDocumentBGPPeer(&destAddr, value); err != nil {
6892			return err
6893		}
6894		col = *destAddr
6895		cv = append(cv, col)
6896
6897	}
6898	*v = cv
6899	return nil
6900}
6901
6902func awsAwsjson11_deserializeDocumentConnection(v **types.Connection, value interface{}) error {
6903	if v == nil {
6904		return fmt.Errorf("unexpected nil of type %T", v)
6905	}
6906	if value == nil {
6907		return nil
6908	}
6909
6910	shape, ok := value.(map[string]interface{})
6911	if !ok {
6912		return fmt.Errorf("unexpected JSON type %v", value)
6913	}
6914
6915	var sv *types.Connection
6916	if *v == nil {
6917		sv = &types.Connection{}
6918	} else {
6919		sv = *v
6920	}
6921
6922	for key, value := range shape {
6923		switch key {
6924		case "awsDevice":
6925			if value != nil {
6926				jtv, ok := value.(string)
6927				if !ok {
6928					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
6929				}
6930				sv.AwsDevice = ptr.String(jtv)
6931			}
6932
6933		case "awsDeviceV2":
6934			if value != nil {
6935				jtv, ok := value.(string)
6936				if !ok {
6937					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
6938				}
6939				sv.AwsDeviceV2 = ptr.String(jtv)
6940			}
6941
6942		case "bandwidth":
6943			if value != nil {
6944				jtv, ok := value.(string)
6945				if !ok {
6946					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
6947				}
6948				sv.Bandwidth = ptr.String(jtv)
6949			}
6950
6951		case "connectionId":
6952			if value != nil {
6953				jtv, ok := value.(string)
6954				if !ok {
6955					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
6956				}
6957				sv.ConnectionId = ptr.String(jtv)
6958			}
6959
6960		case "connectionName":
6961			if value != nil {
6962				jtv, ok := value.(string)
6963				if !ok {
6964					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
6965				}
6966				sv.ConnectionName = ptr.String(jtv)
6967			}
6968
6969		case "connectionState":
6970			if value != nil {
6971				jtv, ok := value.(string)
6972				if !ok {
6973					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
6974				}
6975				sv.ConnectionState = types.ConnectionState(jtv)
6976			}
6977
6978		case "hasLogicalRedundancy":
6979			if value != nil {
6980				jtv, ok := value.(string)
6981				if !ok {
6982					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
6983				}
6984				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
6985			}
6986
6987		case "jumboFrameCapable":
6988			if value != nil {
6989				jtv, ok := value.(bool)
6990				if !ok {
6991					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
6992				}
6993				sv.JumboFrameCapable = ptr.Bool(jtv)
6994			}
6995
6996		case "lagId":
6997			if value != nil {
6998				jtv, ok := value.(string)
6999				if !ok {
7000					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
7001				}
7002				sv.LagId = ptr.String(jtv)
7003			}
7004
7005		case "loaIssueTime":
7006			if value != nil {
7007				jtv, ok := value.(json.Number)
7008				if !ok {
7009					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
7010				}
7011				f64, err := jtv.Float64()
7012				if err != nil {
7013					return err
7014				}
7015				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
7016			}
7017
7018		case "location":
7019			if value != nil {
7020				jtv, ok := value.(string)
7021				if !ok {
7022					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
7023				}
7024				sv.Location = ptr.String(jtv)
7025			}
7026
7027		case "ownerAccount":
7028			if value != nil {
7029				jtv, ok := value.(string)
7030				if !ok {
7031					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7032				}
7033				sv.OwnerAccount = ptr.String(jtv)
7034			}
7035
7036		case "partnerName":
7037			if value != nil {
7038				jtv, ok := value.(string)
7039				if !ok {
7040					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
7041				}
7042				sv.PartnerName = ptr.String(jtv)
7043			}
7044
7045		case "providerName":
7046			if value != nil {
7047				jtv, ok := value.(string)
7048				if !ok {
7049					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
7050				}
7051				sv.ProviderName = ptr.String(jtv)
7052			}
7053
7054		case "region":
7055			if value != nil {
7056				jtv, ok := value.(string)
7057				if !ok {
7058					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
7059				}
7060				sv.Region = ptr.String(jtv)
7061			}
7062
7063		case "tags":
7064			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
7065				return err
7066			}
7067
7068		case "vlan":
7069			if value != nil {
7070				jtv, ok := value.(json.Number)
7071				if !ok {
7072					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
7073				}
7074				i64, err := jtv.Int64()
7075				if err != nil {
7076					return err
7077				}
7078				sv.Vlan = int32(i64)
7079			}
7080
7081		default:
7082			_, _ = key, value
7083
7084		}
7085	}
7086	*v = sv
7087	return nil
7088}
7089
7090func awsAwsjson11_deserializeDocumentConnectionList(v *[]types.Connection, value interface{}) error {
7091	if v == nil {
7092		return fmt.Errorf("unexpected nil of type %T", v)
7093	}
7094	if value == nil {
7095		return nil
7096	}
7097
7098	shape, ok := value.([]interface{})
7099	if !ok {
7100		return fmt.Errorf("unexpected JSON type %v", value)
7101	}
7102
7103	var cv []types.Connection
7104	if *v == nil {
7105		cv = []types.Connection{}
7106	} else {
7107		cv = *v
7108	}
7109
7110	for _, value := range shape {
7111		var col types.Connection
7112		destAddr := &col
7113		if err := awsAwsjson11_deserializeDocumentConnection(&destAddr, value); err != nil {
7114			return err
7115		}
7116		col = *destAddr
7117		cv = append(cv, col)
7118
7119	}
7120	*v = cv
7121	return nil
7122}
7123
7124func awsAwsjson11_deserializeDocumentDirectConnectClientException(v **types.DirectConnectClientException, value interface{}) error {
7125	if v == nil {
7126		return fmt.Errorf("unexpected nil of type %T", v)
7127	}
7128	if value == nil {
7129		return nil
7130	}
7131
7132	shape, ok := value.(map[string]interface{})
7133	if !ok {
7134		return fmt.Errorf("unexpected JSON type %v", value)
7135	}
7136
7137	var sv *types.DirectConnectClientException
7138	if *v == nil {
7139		sv = &types.DirectConnectClientException{}
7140	} else {
7141		sv = *v
7142	}
7143
7144	for key, value := range shape {
7145		switch key {
7146		case "message":
7147			if value != nil {
7148				jtv, ok := value.(string)
7149				if !ok {
7150					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7151				}
7152				sv.Message = ptr.String(jtv)
7153			}
7154
7155		default:
7156			_, _ = key, value
7157
7158		}
7159	}
7160	*v = sv
7161	return nil
7162}
7163
7164func awsAwsjson11_deserializeDocumentDirectConnectGateway(v **types.DirectConnectGateway, value interface{}) error {
7165	if v == nil {
7166		return fmt.Errorf("unexpected nil of type %T", v)
7167	}
7168	if value == nil {
7169		return nil
7170	}
7171
7172	shape, ok := value.(map[string]interface{})
7173	if !ok {
7174		return fmt.Errorf("unexpected JSON type %v", value)
7175	}
7176
7177	var sv *types.DirectConnectGateway
7178	if *v == nil {
7179		sv = &types.DirectConnectGateway{}
7180	} else {
7181		sv = *v
7182	}
7183
7184	for key, value := range shape {
7185		switch key {
7186		case "amazonSideAsn":
7187			if value != nil {
7188				jtv, ok := value.(json.Number)
7189				if !ok {
7190					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
7191				}
7192				i64, err := jtv.Int64()
7193				if err != nil {
7194					return err
7195				}
7196				sv.AmazonSideAsn = ptr.Int64(i64)
7197			}
7198
7199		case "directConnectGatewayId":
7200			if value != nil {
7201				jtv, ok := value.(string)
7202				if !ok {
7203					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
7204				}
7205				sv.DirectConnectGatewayId = ptr.String(jtv)
7206			}
7207
7208		case "directConnectGatewayName":
7209			if value != nil {
7210				jtv, ok := value.(string)
7211				if !ok {
7212					return fmt.Errorf("expected DirectConnectGatewayName to be of type string, got %T instead", value)
7213				}
7214				sv.DirectConnectGatewayName = ptr.String(jtv)
7215			}
7216
7217		case "directConnectGatewayState":
7218			if value != nil {
7219				jtv, ok := value.(string)
7220				if !ok {
7221					return fmt.Errorf("expected DirectConnectGatewayState to be of type string, got %T instead", value)
7222				}
7223				sv.DirectConnectGatewayState = types.DirectConnectGatewayState(jtv)
7224			}
7225
7226		case "ownerAccount":
7227			if value != nil {
7228				jtv, ok := value.(string)
7229				if !ok {
7230					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7231				}
7232				sv.OwnerAccount = ptr.String(jtv)
7233			}
7234
7235		case "stateChangeError":
7236			if value != nil {
7237				jtv, ok := value.(string)
7238				if !ok {
7239					return fmt.Errorf("expected StateChangeError to be of type string, got %T instead", value)
7240				}
7241				sv.StateChangeError = ptr.String(jtv)
7242			}
7243
7244		default:
7245			_, _ = key, value
7246
7247		}
7248	}
7249	*v = sv
7250	return nil
7251}
7252
7253func awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(v **types.DirectConnectGatewayAssociation, value interface{}) error {
7254	if v == nil {
7255		return fmt.Errorf("unexpected nil of type %T", v)
7256	}
7257	if value == nil {
7258		return nil
7259	}
7260
7261	shape, ok := value.(map[string]interface{})
7262	if !ok {
7263		return fmt.Errorf("unexpected JSON type %v", value)
7264	}
7265
7266	var sv *types.DirectConnectGatewayAssociation
7267	if *v == nil {
7268		sv = &types.DirectConnectGatewayAssociation{}
7269	} else {
7270		sv = *v
7271	}
7272
7273	for key, value := range shape {
7274		switch key {
7275		case "allowedPrefixesToDirectConnectGateway":
7276			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.AllowedPrefixesToDirectConnectGateway, value); err != nil {
7277				return err
7278			}
7279
7280		case "associatedGateway":
7281			if err := awsAwsjson11_deserializeDocumentAssociatedGateway(&sv.AssociatedGateway, value); err != nil {
7282				return err
7283			}
7284
7285		case "associationId":
7286			if value != nil {
7287				jtv, ok := value.(string)
7288				if !ok {
7289					return fmt.Errorf("expected DirectConnectGatewayAssociationId to be of type string, got %T instead", value)
7290				}
7291				sv.AssociationId = ptr.String(jtv)
7292			}
7293
7294		case "associationState":
7295			if value != nil {
7296				jtv, ok := value.(string)
7297				if !ok {
7298					return fmt.Errorf("expected DirectConnectGatewayAssociationState to be of type string, got %T instead", value)
7299				}
7300				sv.AssociationState = types.DirectConnectGatewayAssociationState(jtv)
7301			}
7302
7303		case "directConnectGatewayId":
7304			if value != nil {
7305				jtv, ok := value.(string)
7306				if !ok {
7307					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
7308				}
7309				sv.DirectConnectGatewayId = ptr.String(jtv)
7310			}
7311
7312		case "directConnectGatewayOwnerAccount":
7313			if value != nil {
7314				jtv, ok := value.(string)
7315				if !ok {
7316					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7317				}
7318				sv.DirectConnectGatewayOwnerAccount = ptr.String(jtv)
7319			}
7320
7321		case "stateChangeError":
7322			if value != nil {
7323				jtv, ok := value.(string)
7324				if !ok {
7325					return fmt.Errorf("expected StateChangeError to be of type string, got %T instead", value)
7326				}
7327				sv.StateChangeError = ptr.String(jtv)
7328			}
7329
7330		case "virtualGatewayId":
7331			if value != nil {
7332				jtv, ok := value.(string)
7333				if !ok {
7334					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
7335				}
7336				sv.VirtualGatewayId = ptr.String(jtv)
7337			}
7338
7339		case "virtualGatewayOwnerAccount":
7340			if value != nil {
7341				jtv, ok := value.(string)
7342				if !ok {
7343					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7344				}
7345				sv.VirtualGatewayOwnerAccount = ptr.String(jtv)
7346			}
7347
7348		case "virtualGatewayRegion":
7349			if value != nil {
7350				jtv, ok := value.(string)
7351				if !ok {
7352					return fmt.Errorf("expected VirtualGatewayRegion to be of type string, got %T instead", value)
7353				}
7354				sv.VirtualGatewayRegion = ptr.String(jtv)
7355			}
7356
7357		default:
7358			_, _ = key, value
7359
7360		}
7361	}
7362	*v = sv
7363	return nil
7364}
7365
7366func awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationList(v *[]types.DirectConnectGatewayAssociation, value interface{}) error {
7367	if v == nil {
7368		return fmt.Errorf("unexpected nil of type %T", v)
7369	}
7370	if value == nil {
7371		return nil
7372	}
7373
7374	shape, ok := value.([]interface{})
7375	if !ok {
7376		return fmt.Errorf("unexpected JSON type %v", value)
7377	}
7378
7379	var cv []types.DirectConnectGatewayAssociation
7380	if *v == nil {
7381		cv = []types.DirectConnectGatewayAssociation{}
7382	} else {
7383		cv = *v
7384	}
7385
7386	for _, value := range shape {
7387		var col types.DirectConnectGatewayAssociation
7388		destAddr := &col
7389		if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(&destAddr, value); err != nil {
7390			return err
7391		}
7392		col = *destAddr
7393		cv = append(cv, col)
7394
7395	}
7396	*v = cv
7397	return nil
7398}
7399
7400func awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposal(v **types.DirectConnectGatewayAssociationProposal, value interface{}) error {
7401	if v == nil {
7402		return fmt.Errorf("unexpected nil of type %T", v)
7403	}
7404	if value == nil {
7405		return nil
7406	}
7407
7408	shape, ok := value.(map[string]interface{})
7409	if !ok {
7410		return fmt.Errorf("unexpected JSON type %v", value)
7411	}
7412
7413	var sv *types.DirectConnectGatewayAssociationProposal
7414	if *v == nil {
7415		sv = &types.DirectConnectGatewayAssociationProposal{}
7416	} else {
7417		sv = *v
7418	}
7419
7420	for key, value := range shape {
7421		switch key {
7422		case "associatedGateway":
7423			if err := awsAwsjson11_deserializeDocumentAssociatedGateway(&sv.AssociatedGateway, value); err != nil {
7424				return err
7425			}
7426
7427		case "directConnectGatewayId":
7428			if value != nil {
7429				jtv, ok := value.(string)
7430				if !ok {
7431					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
7432				}
7433				sv.DirectConnectGatewayId = ptr.String(jtv)
7434			}
7435
7436		case "directConnectGatewayOwnerAccount":
7437			if value != nil {
7438				jtv, ok := value.(string)
7439				if !ok {
7440					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7441				}
7442				sv.DirectConnectGatewayOwnerAccount = ptr.String(jtv)
7443			}
7444
7445		case "existingAllowedPrefixesToDirectConnectGateway":
7446			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.ExistingAllowedPrefixesToDirectConnectGateway, value); err != nil {
7447				return err
7448			}
7449
7450		case "proposalId":
7451			if value != nil {
7452				jtv, ok := value.(string)
7453				if !ok {
7454					return fmt.Errorf("expected DirectConnectGatewayAssociationProposalId to be of type string, got %T instead", value)
7455				}
7456				sv.ProposalId = ptr.String(jtv)
7457			}
7458
7459		case "proposalState":
7460			if value != nil {
7461				jtv, ok := value.(string)
7462				if !ok {
7463					return fmt.Errorf("expected DirectConnectGatewayAssociationProposalState to be of type string, got %T instead", value)
7464				}
7465				sv.ProposalState = types.DirectConnectGatewayAssociationProposalState(jtv)
7466			}
7467
7468		case "requestedAllowedPrefixesToDirectConnectGateway":
7469			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RequestedAllowedPrefixesToDirectConnectGateway, value); err != nil {
7470				return err
7471			}
7472
7473		default:
7474			_, _ = key, value
7475
7476		}
7477	}
7478	*v = sv
7479	return nil
7480}
7481
7482func awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposalList(v *[]types.DirectConnectGatewayAssociationProposal, value interface{}) error {
7483	if v == nil {
7484		return fmt.Errorf("unexpected nil of type %T", v)
7485	}
7486	if value == nil {
7487		return nil
7488	}
7489
7490	shape, ok := value.([]interface{})
7491	if !ok {
7492		return fmt.Errorf("unexpected JSON type %v", value)
7493	}
7494
7495	var cv []types.DirectConnectGatewayAssociationProposal
7496	if *v == nil {
7497		cv = []types.DirectConnectGatewayAssociationProposal{}
7498	} else {
7499		cv = *v
7500	}
7501
7502	for _, value := range shape {
7503		var col types.DirectConnectGatewayAssociationProposal
7504		destAddr := &col
7505		if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposal(&destAddr, value); err != nil {
7506			return err
7507		}
7508		col = *destAddr
7509		cv = append(cv, col)
7510
7511	}
7512	*v = cv
7513	return nil
7514}
7515
7516func awsAwsjson11_deserializeDocumentDirectConnectGatewayAttachment(v **types.DirectConnectGatewayAttachment, value interface{}) error {
7517	if v == nil {
7518		return fmt.Errorf("unexpected nil of type %T", v)
7519	}
7520	if value == nil {
7521		return nil
7522	}
7523
7524	shape, ok := value.(map[string]interface{})
7525	if !ok {
7526		return fmt.Errorf("unexpected JSON type %v", value)
7527	}
7528
7529	var sv *types.DirectConnectGatewayAttachment
7530	if *v == nil {
7531		sv = &types.DirectConnectGatewayAttachment{}
7532	} else {
7533		sv = *v
7534	}
7535
7536	for key, value := range shape {
7537		switch key {
7538		case "attachmentState":
7539			if value != nil {
7540				jtv, ok := value.(string)
7541				if !ok {
7542					return fmt.Errorf("expected DirectConnectGatewayAttachmentState to be of type string, got %T instead", value)
7543				}
7544				sv.AttachmentState = types.DirectConnectGatewayAttachmentState(jtv)
7545			}
7546
7547		case "attachmentType":
7548			if value != nil {
7549				jtv, ok := value.(string)
7550				if !ok {
7551					return fmt.Errorf("expected DirectConnectGatewayAttachmentType to be of type string, got %T instead", value)
7552				}
7553				sv.AttachmentType = types.DirectConnectGatewayAttachmentType(jtv)
7554			}
7555
7556		case "directConnectGatewayId":
7557			if value != nil {
7558				jtv, ok := value.(string)
7559				if !ok {
7560					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
7561				}
7562				sv.DirectConnectGatewayId = ptr.String(jtv)
7563			}
7564
7565		case "stateChangeError":
7566			if value != nil {
7567				jtv, ok := value.(string)
7568				if !ok {
7569					return fmt.Errorf("expected StateChangeError to be of type string, got %T instead", value)
7570				}
7571				sv.StateChangeError = ptr.String(jtv)
7572			}
7573
7574		case "virtualInterfaceId":
7575			if value != nil {
7576				jtv, ok := value.(string)
7577				if !ok {
7578					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
7579				}
7580				sv.VirtualInterfaceId = ptr.String(jtv)
7581			}
7582
7583		case "virtualInterfaceOwnerAccount":
7584			if value != nil {
7585				jtv, ok := value.(string)
7586				if !ok {
7587					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
7588				}
7589				sv.VirtualInterfaceOwnerAccount = ptr.String(jtv)
7590			}
7591
7592		case "virtualInterfaceRegion":
7593			if value != nil {
7594				jtv, ok := value.(string)
7595				if !ok {
7596					return fmt.Errorf("expected VirtualInterfaceRegion to be of type string, got %T instead", value)
7597				}
7598				sv.VirtualInterfaceRegion = ptr.String(jtv)
7599			}
7600
7601		default:
7602			_, _ = key, value
7603
7604		}
7605	}
7606	*v = sv
7607	return nil
7608}
7609
7610func awsAwsjson11_deserializeDocumentDirectConnectGatewayAttachmentList(v *[]types.DirectConnectGatewayAttachment, value interface{}) error {
7611	if v == nil {
7612		return fmt.Errorf("unexpected nil of type %T", v)
7613	}
7614	if value == nil {
7615		return nil
7616	}
7617
7618	shape, ok := value.([]interface{})
7619	if !ok {
7620		return fmt.Errorf("unexpected JSON type %v", value)
7621	}
7622
7623	var cv []types.DirectConnectGatewayAttachment
7624	if *v == nil {
7625		cv = []types.DirectConnectGatewayAttachment{}
7626	} else {
7627		cv = *v
7628	}
7629
7630	for _, value := range shape {
7631		var col types.DirectConnectGatewayAttachment
7632		destAddr := &col
7633		if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAttachment(&destAddr, value); err != nil {
7634			return err
7635		}
7636		col = *destAddr
7637		cv = append(cv, col)
7638
7639	}
7640	*v = cv
7641	return nil
7642}
7643
7644func awsAwsjson11_deserializeDocumentDirectConnectGatewayList(v *[]types.DirectConnectGateway, value interface{}) error {
7645	if v == nil {
7646		return fmt.Errorf("unexpected nil of type %T", v)
7647	}
7648	if value == nil {
7649		return nil
7650	}
7651
7652	shape, ok := value.([]interface{})
7653	if !ok {
7654		return fmt.Errorf("unexpected JSON type %v", value)
7655	}
7656
7657	var cv []types.DirectConnectGateway
7658	if *v == nil {
7659		cv = []types.DirectConnectGateway{}
7660	} else {
7661		cv = *v
7662	}
7663
7664	for _, value := range shape {
7665		var col types.DirectConnectGateway
7666		destAddr := &col
7667		if err := awsAwsjson11_deserializeDocumentDirectConnectGateway(&destAddr, value); err != nil {
7668			return err
7669		}
7670		col = *destAddr
7671		cv = append(cv, col)
7672
7673	}
7674	*v = cv
7675	return nil
7676}
7677
7678func awsAwsjson11_deserializeDocumentDirectConnectServerException(v **types.DirectConnectServerException, value interface{}) error {
7679	if v == nil {
7680		return fmt.Errorf("unexpected nil of type %T", v)
7681	}
7682	if value == nil {
7683		return nil
7684	}
7685
7686	shape, ok := value.(map[string]interface{})
7687	if !ok {
7688		return fmt.Errorf("unexpected JSON type %v", value)
7689	}
7690
7691	var sv *types.DirectConnectServerException
7692	if *v == nil {
7693		sv = &types.DirectConnectServerException{}
7694	} else {
7695		sv = *v
7696	}
7697
7698	for key, value := range shape {
7699		switch key {
7700		case "message":
7701			if value != nil {
7702				jtv, ok := value.(string)
7703				if !ok {
7704					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7705				}
7706				sv.Message = ptr.String(jtv)
7707			}
7708
7709		default:
7710			_, _ = key, value
7711
7712		}
7713	}
7714	*v = sv
7715	return nil
7716}
7717
7718func awsAwsjson11_deserializeDocumentDuplicateTagKeysException(v **types.DuplicateTagKeysException, value interface{}) error {
7719	if v == nil {
7720		return fmt.Errorf("unexpected nil of type %T", v)
7721	}
7722	if value == nil {
7723		return nil
7724	}
7725
7726	shape, ok := value.(map[string]interface{})
7727	if !ok {
7728		return fmt.Errorf("unexpected JSON type %v", value)
7729	}
7730
7731	var sv *types.DuplicateTagKeysException
7732	if *v == nil {
7733		sv = &types.DuplicateTagKeysException{}
7734	} else {
7735		sv = *v
7736	}
7737
7738	for key, value := range shape {
7739		switch key {
7740		case "message":
7741			if value != nil {
7742				jtv, ok := value.(string)
7743				if !ok {
7744					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
7745				}
7746				sv.Message = ptr.String(jtv)
7747			}
7748
7749		default:
7750			_, _ = key, value
7751
7752		}
7753	}
7754	*v = sv
7755	return nil
7756}
7757
7758func awsAwsjson11_deserializeDocumentInterconnect(v **types.Interconnect, value interface{}) error {
7759	if v == nil {
7760		return fmt.Errorf("unexpected nil of type %T", v)
7761	}
7762	if value == nil {
7763		return nil
7764	}
7765
7766	shape, ok := value.(map[string]interface{})
7767	if !ok {
7768		return fmt.Errorf("unexpected JSON type %v", value)
7769	}
7770
7771	var sv *types.Interconnect
7772	if *v == nil {
7773		sv = &types.Interconnect{}
7774	} else {
7775		sv = *v
7776	}
7777
7778	for key, value := range shape {
7779		switch key {
7780		case "awsDevice":
7781			if value != nil {
7782				jtv, ok := value.(string)
7783				if !ok {
7784					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
7785				}
7786				sv.AwsDevice = ptr.String(jtv)
7787			}
7788
7789		case "awsDeviceV2":
7790			if value != nil {
7791				jtv, ok := value.(string)
7792				if !ok {
7793					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
7794				}
7795				sv.AwsDeviceV2 = ptr.String(jtv)
7796			}
7797
7798		case "bandwidth":
7799			if value != nil {
7800				jtv, ok := value.(string)
7801				if !ok {
7802					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
7803				}
7804				sv.Bandwidth = ptr.String(jtv)
7805			}
7806
7807		case "hasLogicalRedundancy":
7808			if value != nil {
7809				jtv, ok := value.(string)
7810				if !ok {
7811					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
7812				}
7813				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
7814			}
7815
7816		case "interconnectId":
7817			if value != nil {
7818				jtv, ok := value.(string)
7819				if !ok {
7820					return fmt.Errorf("expected InterconnectId to be of type string, got %T instead", value)
7821				}
7822				sv.InterconnectId = ptr.String(jtv)
7823			}
7824
7825		case "interconnectName":
7826			if value != nil {
7827				jtv, ok := value.(string)
7828				if !ok {
7829					return fmt.Errorf("expected InterconnectName to be of type string, got %T instead", value)
7830				}
7831				sv.InterconnectName = ptr.String(jtv)
7832			}
7833
7834		case "interconnectState":
7835			if value != nil {
7836				jtv, ok := value.(string)
7837				if !ok {
7838					return fmt.Errorf("expected InterconnectState to be of type string, got %T instead", value)
7839				}
7840				sv.InterconnectState = types.InterconnectState(jtv)
7841			}
7842
7843		case "jumboFrameCapable":
7844			if value != nil {
7845				jtv, ok := value.(bool)
7846				if !ok {
7847					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
7848				}
7849				sv.JumboFrameCapable = ptr.Bool(jtv)
7850			}
7851
7852		case "lagId":
7853			if value != nil {
7854				jtv, ok := value.(string)
7855				if !ok {
7856					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
7857				}
7858				sv.LagId = ptr.String(jtv)
7859			}
7860
7861		case "loaIssueTime":
7862			if value != nil {
7863				jtv, ok := value.(json.Number)
7864				if !ok {
7865					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
7866				}
7867				f64, err := jtv.Float64()
7868				if err != nil {
7869					return err
7870				}
7871				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
7872			}
7873
7874		case "location":
7875			if value != nil {
7876				jtv, ok := value.(string)
7877				if !ok {
7878					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
7879				}
7880				sv.Location = ptr.String(jtv)
7881			}
7882
7883		case "providerName":
7884			if value != nil {
7885				jtv, ok := value.(string)
7886				if !ok {
7887					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
7888				}
7889				sv.ProviderName = ptr.String(jtv)
7890			}
7891
7892		case "region":
7893			if value != nil {
7894				jtv, ok := value.(string)
7895				if !ok {
7896					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
7897				}
7898				sv.Region = ptr.String(jtv)
7899			}
7900
7901		case "tags":
7902			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
7903				return err
7904			}
7905
7906		default:
7907			_, _ = key, value
7908
7909		}
7910	}
7911	*v = sv
7912	return nil
7913}
7914
7915func awsAwsjson11_deserializeDocumentInterconnectList(v *[]types.Interconnect, value interface{}) error {
7916	if v == nil {
7917		return fmt.Errorf("unexpected nil of type %T", v)
7918	}
7919	if value == nil {
7920		return nil
7921	}
7922
7923	shape, ok := value.([]interface{})
7924	if !ok {
7925		return fmt.Errorf("unexpected JSON type %v", value)
7926	}
7927
7928	var cv []types.Interconnect
7929	if *v == nil {
7930		cv = []types.Interconnect{}
7931	} else {
7932		cv = *v
7933	}
7934
7935	for _, value := range shape {
7936		var col types.Interconnect
7937		destAddr := &col
7938		if err := awsAwsjson11_deserializeDocumentInterconnect(&destAddr, value); err != nil {
7939			return err
7940		}
7941		col = *destAddr
7942		cv = append(cv, col)
7943
7944	}
7945	*v = cv
7946	return nil
7947}
7948
7949func awsAwsjson11_deserializeDocumentLag(v **types.Lag, value interface{}) error {
7950	if v == nil {
7951		return fmt.Errorf("unexpected nil of type %T", v)
7952	}
7953	if value == nil {
7954		return nil
7955	}
7956
7957	shape, ok := value.(map[string]interface{})
7958	if !ok {
7959		return fmt.Errorf("unexpected JSON type %v", value)
7960	}
7961
7962	var sv *types.Lag
7963	if *v == nil {
7964		sv = &types.Lag{}
7965	} else {
7966		sv = *v
7967	}
7968
7969	for key, value := range shape {
7970		switch key {
7971		case "allowsHostedConnections":
7972			if value != nil {
7973				jtv, ok := value.(bool)
7974				if !ok {
7975					return fmt.Errorf("expected BooleanFlag to be of type *bool, got %T instead", value)
7976				}
7977				sv.AllowsHostedConnections = jtv
7978			}
7979
7980		case "awsDevice":
7981			if value != nil {
7982				jtv, ok := value.(string)
7983				if !ok {
7984					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
7985				}
7986				sv.AwsDevice = ptr.String(jtv)
7987			}
7988
7989		case "awsDeviceV2":
7990			if value != nil {
7991				jtv, ok := value.(string)
7992				if !ok {
7993					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
7994				}
7995				sv.AwsDeviceV2 = ptr.String(jtv)
7996			}
7997
7998		case "connections":
7999			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
8000				return err
8001			}
8002
8003		case "connectionsBandwidth":
8004			if value != nil {
8005				jtv, ok := value.(string)
8006				if !ok {
8007					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
8008				}
8009				sv.ConnectionsBandwidth = ptr.String(jtv)
8010			}
8011
8012		case "hasLogicalRedundancy":
8013			if value != nil {
8014				jtv, ok := value.(string)
8015				if !ok {
8016					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
8017				}
8018				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
8019			}
8020
8021		case "jumboFrameCapable":
8022			if value != nil {
8023				jtv, ok := value.(bool)
8024				if !ok {
8025					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
8026				}
8027				sv.JumboFrameCapable = ptr.Bool(jtv)
8028			}
8029
8030		case "lagId":
8031			if value != nil {
8032				jtv, ok := value.(string)
8033				if !ok {
8034					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
8035				}
8036				sv.LagId = ptr.String(jtv)
8037			}
8038
8039		case "lagName":
8040			if value != nil {
8041				jtv, ok := value.(string)
8042				if !ok {
8043					return fmt.Errorf("expected LagName to be of type string, got %T instead", value)
8044				}
8045				sv.LagName = ptr.String(jtv)
8046			}
8047
8048		case "lagState":
8049			if value != nil {
8050				jtv, ok := value.(string)
8051				if !ok {
8052					return fmt.Errorf("expected LagState to be of type string, got %T instead", value)
8053				}
8054				sv.LagState = types.LagState(jtv)
8055			}
8056
8057		case "location":
8058			if value != nil {
8059				jtv, ok := value.(string)
8060				if !ok {
8061					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
8062				}
8063				sv.Location = ptr.String(jtv)
8064			}
8065
8066		case "minimumLinks":
8067			if value != nil {
8068				jtv, ok := value.(json.Number)
8069				if !ok {
8070					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
8071				}
8072				i64, err := jtv.Int64()
8073				if err != nil {
8074					return err
8075				}
8076				sv.MinimumLinks = int32(i64)
8077			}
8078
8079		case "numberOfConnections":
8080			if value != nil {
8081				jtv, ok := value.(json.Number)
8082				if !ok {
8083					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
8084				}
8085				i64, err := jtv.Int64()
8086				if err != nil {
8087					return err
8088				}
8089				sv.NumberOfConnections = int32(i64)
8090			}
8091
8092		case "ownerAccount":
8093			if value != nil {
8094				jtv, ok := value.(string)
8095				if !ok {
8096					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
8097				}
8098				sv.OwnerAccount = ptr.String(jtv)
8099			}
8100
8101		case "providerName":
8102			if value != nil {
8103				jtv, ok := value.(string)
8104				if !ok {
8105					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
8106				}
8107				sv.ProviderName = ptr.String(jtv)
8108			}
8109
8110		case "region":
8111			if value != nil {
8112				jtv, ok := value.(string)
8113				if !ok {
8114					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
8115				}
8116				sv.Region = ptr.String(jtv)
8117			}
8118
8119		case "tags":
8120			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
8121				return err
8122			}
8123
8124		default:
8125			_, _ = key, value
8126
8127		}
8128	}
8129	*v = sv
8130	return nil
8131}
8132
8133func awsAwsjson11_deserializeDocumentLagList(v *[]types.Lag, value interface{}) error {
8134	if v == nil {
8135		return fmt.Errorf("unexpected nil of type %T", v)
8136	}
8137	if value == nil {
8138		return nil
8139	}
8140
8141	shape, ok := value.([]interface{})
8142	if !ok {
8143		return fmt.Errorf("unexpected JSON type %v", value)
8144	}
8145
8146	var cv []types.Lag
8147	if *v == nil {
8148		cv = []types.Lag{}
8149	} else {
8150		cv = *v
8151	}
8152
8153	for _, value := range shape {
8154		var col types.Lag
8155		destAddr := &col
8156		if err := awsAwsjson11_deserializeDocumentLag(&destAddr, value); err != nil {
8157			return err
8158		}
8159		col = *destAddr
8160		cv = append(cv, col)
8161
8162	}
8163	*v = cv
8164	return nil
8165}
8166
8167func awsAwsjson11_deserializeDocumentLoa(v **types.Loa, value interface{}) error {
8168	if v == nil {
8169		return fmt.Errorf("unexpected nil of type %T", v)
8170	}
8171	if value == nil {
8172		return nil
8173	}
8174
8175	shape, ok := value.(map[string]interface{})
8176	if !ok {
8177		return fmt.Errorf("unexpected JSON type %v", value)
8178	}
8179
8180	var sv *types.Loa
8181	if *v == nil {
8182		sv = &types.Loa{}
8183	} else {
8184		sv = *v
8185	}
8186
8187	for key, value := range shape {
8188		switch key {
8189		case "loaContent":
8190			if value != nil {
8191				jtv, ok := value.(string)
8192				if !ok {
8193					return fmt.Errorf("expected LoaContent to be []byte, got %T instead", value)
8194				}
8195				dv, err := base64.StdEncoding.DecodeString(jtv)
8196				if err != nil {
8197					return fmt.Errorf("failed to base64 decode LoaContent, %w", err)
8198				}
8199				sv.LoaContent = dv
8200			}
8201
8202		case "loaContentType":
8203			if value != nil {
8204				jtv, ok := value.(string)
8205				if !ok {
8206					return fmt.Errorf("expected LoaContentType to be of type string, got %T instead", value)
8207				}
8208				sv.LoaContentType = types.LoaContentType(jtv)
8209			}
8210
8211		default:
8212			_, _ = key, value
8213
8214		}
8215	}
8216	*v = sv
8217	return nil
8218}
8219
8220func awsAwsjson11_deserializeDocumentLocation(v **types.Location, value interface{}) error {
8221	if v == nil {
8222		return fmt.Errorf("unexpected nil of type %T", v)
8223	}
8224	if value == nil {
8225		return nil
8226	}
8227
8228	shape, ok := value.(map[string]interface{})
8229	if !ok {
8230		return fmt.Errorf("unexpected JSON type %v", value)
8231	}
8232
8233	var sv *types.Location
8234	if *v == nil {
8235		sv = &types.Location{}
8236	} else {
8237		sv = *v
8238	}
8239
8240	for key, value := range shape {
8241		switch key {
8242		case "availablePortSpeeds":
8243			if err := awsAwsjson11_deserializeDocumentAvailablePortSpeeds(&sv.AvailablePortSpeeds, value); err != nil {
8244				return err
8245			}
8246
8247		case "availableProviders":
8248			if err := awsAwsjson11_deserializeDocumentProviderList(&sv.AvailableProviders, value); err != nil {
8249				return err
8250			}
8251
8252		case "locationCode":
8253			if value != nil {
8254				jtv, ok := value.(string)
8255				if !ok {
8256					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
8257				}
8258				sv.LocationCode = ptr.String(jtv)
8259			}
8260
8261		case "locationName":
8262			if value != nil {
8263				jtv, ok := value.(string)
8264				if !ok {
8265					return fmt.Errorf("expected LocationName to be of type string, got %T instead", value)
8266				}
8267				sv.LocationName = ptr.String(jtv)
8268			}
8269
8270		case "region":
8271			if value != nil {
8272				jtv, ok := value.(string)
8273				if !ok {
8274					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
8275				}
8276				sv.Region = ptr.String(jtv)
8277			}
8278
8279		default:
8280			_, _ = key, value
8281
8282		}
8283	}
8284	*v = sv
8285	return nil
8286}
8287
8288func awsAwsjson11_deserializeDocumentLocationList(v *[]types.Location, value interface{}) error {
8289	if v == nil {
8290		return fmt.Errorf("unexpected nil of type %T", v)
8291	}
8292	if value == nil {
8293		return nil
8294	}
8295
8296	shape, ok := value.([]interface{})
8297	if !ok {
8298		return fmt.Errorf("unexpected JSON type %v", value)
8299	}
8300
8301	var cv []types.Location
8302	if *v == nil {
8303		cv = []types.Location{}
8304	} else {
8305		cv = *v
8306	}
8307
8308	for _, value := range shape {
8309		var col types.Location
8310		destAddr := &col
8311		if err := awsAwsjson11_deserializeDocumentLocation(&destAddr, value); err != nil {
8312			return err
8313		}
8314		col = *destAddr
8315		cv = append(cv, col)
8316
8317	}
8318	*v = cv
8319	return nil
8320}
8321
8322func awsAwsjson11_deserializeDocumentProviderList(v *[]string, value interface{}) error {
8323	if v == nil {
8324		return fmt.Errorf("unexpected nil of type %T", v)
8325	}
8326	if value == nil {
8327		return nil
8328	}
8329
8330	shape, ok := value.([]interface{})
8331	if !ok {
8332		return fmt.Errorf("unexpected JSON type %v", value)
8333	}
8334
8335	var cv []string
8336	if *v == nil {
8337		cv = []string{}
8338	} else {
8339		cv = *v
8340	}
8341
8342	for _, value := range shape {
8343		var col string
8344		if value != nil {
8345			jtv, ok := value.(string)
8346			if !ok {
8347				return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
8348			}
8349			col = jtv
8350		}
8351		cv = append(cv, col)
8352
8353	}
8354	*v = cv
8355	return nil
8356}
8357
8358func awsAwsjson11_deserializeDocumentResourceTag(v **types.ResourceTag, value interface{}) error {
8359	if v == nil {
8360		return fmt.Errorf("unexpected nil of type %T", v)
8361	}
8362	if value == nil {
8363		return nil
8364	}
8365
8366	shape, ok := value.(map[string]interface{})
8367	if !ok {
8368		return fmt.Errorf("unexpected JSON type %v", value)
8369	}
8370
8371	var sv *types.ResourceTag
8372	if *v == nil {
8373		sv = &types.ResourceTag{}
8374	} else {
8375		sv = *v
8376	}
8377
8378	for key, value := range shape {
8379		switch key {
8380		case "resourceArn":
8381			if value != nil {
8382				jtv, ok := value.(string)
8383				if !ok {
8384					return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
8385				}
8386				sv.ResourceArn = ptr.String(jtv)
8387			}
8388
8389		case "tags":
8390			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
8391				return err
8392			}
8393
8394		default:
8395			_, _ = key, value
8396
8397		}
8398	}
8399	*v = sv
8400	return nil
8401}
8402
8403func awsAwsjson11_deserializeDocumentResourceTagList(v *[]types.ResourceTag, value interface{}) error {
8404	if v == nil {
8405		return fmt.Errorf("unexpected nil of type %T", v)
8406	}
8407	if value == nil {
8408		return nil
8409	}
8410
8411	shape, ok := value.([]interface{})
8412	if !ok {
8413		return fmt.Errorf("unexpected JSON type %v", value)
8414	}
8415
8416	var cv []types.ResourceTag
8417	if *v == nil {
8418		cv = []types.ResourceTag{}
8419	} else {
8420		cv = *v
8421	}
8422
8423	for _, value := range shape {
8424		var col types.ResourceTag
8425		destAddr := &col
8426		if err := awsAwsjson11_deserializeDocumentResourceTag(&destAddr, value); err != nil {
8427			return err
8428		}
8429		col = *destAddr
8430		cv = append(cv, col)
8431
8432	}
8433	*v = cv
8434	return nil
8435}
8436
8437func awsAwsjson11_deserializeDocumentRouteFilterPrefix(v **types.RouteFilterPrefix, value interface{}) error {
8438	if v == nil {
8439		return fmt.Errorf("unexpected nil of type %T", v)
8440	}
8441	if value == nil {
8442		return nil
8443	}
8444
8445	shape, ok := value.(map[string]interface{})
8446	if !ok {
8447		return fmt.Errorf("unexpected JSON type %v", value)
8448	}
8449
8450	var sv *types.RouteFilterPrefix
8451	if *v == nil {
8452		sv = &types.RouteFilterPrefix{}
8453	} else {
8454		sv = *v
8455	}
8456
8457	for key, value := range shape {
8458		switch key {
8459		case "cidr":
8460			if value != nil {
8461				jtv, ok := value.(string)
8462				if !ok {
8463					return fmt.Errorf("expected CIDR to be of type string, got %T instead", value)
8464				}
8465				sv.Cidr = ptr.String(jtv)
8466			}
8467
8468		default:
8469			_, _ = key, value
8470
8471		}
8472	}
8473	*v = sv
8474	return nil
8475}
8476
8477func awsAwsjson11_deserializeDocumentRouteFilterPrefixList(v *[]types.RouteFilterPrefix, value interface{}) error {
8478	if v == nil {
8479		return fmt.Errorf("unexpected nil of type %T", v)
8480	}
8481	if value == nil {
8482		return nil
8483	}
8484
8485	shape, ok := value.([]interface{})
8486	if !ok {
8487		return fmt.Errorf("unexpected JSON type %v", value)
8488	}
8489
8490	var cv []types.RouteFilterPrefix
8491	if *v == nil {
8492		cv = []types.RouteFilterPrefix{}
8493	} else {
8494		cv = *v
8495	}
8496
8497	for _, value := range shape {
8498		var col types.RouteFilterPrefix
8499		destAddr := &col
8500		if err := awsAwsjson11_deserializeDocumentRouteFilterPrefix(&destAddr, value); err != nil {
8501			return err
8502		}
8503		col = *destAddr
8504		cv = append(cv, col)
8505
8506	}
8507	*v = cv
8508	return nil
8509}
8510
8511func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
8512	if v == nil {
8513		return fmt.Errorf("unexpected nil of type %T", v)
8514	}
8515	if value == nil {
8516		return nil
8517	}
8518
8519	shape, ok := value.(map[string]interface{})
8520	if !ok {
8521		return fmt.Errorf("unexpected JSON type %v", value)
8522	}
8523
8524	var sv *types.Tag
8525	if *v == nil {
8526		sv = &types.Tag{}
8527	} else {
8528		sv = *v
8529	}
8530
8531	for key, value := range shape {
8532		switch key {
8533		case "key":
8534			if value != nil {
8535				jtv, ok := value.(string)
8536				if !ok {
8537					return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
8538				}
8539				sv.Key = ptr.String(jtv)
8540			}
8541
8542		case "value":
8543			if value != nil {
8544				jtv, ok := value.(string)
8545				if !ok {
8546					return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
8547				}
8548				sv.Value = ptr.String(jtv)
8549			}
8550
8551		default:
8552			_, _ = key, value
8553
8554		}
8555	}
8556	*v = sv
8557	return nil
8558}
8559
8560func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error {
8561	if v == nil {
8562		return fmt.Errorf("unexpected nil of type %T", v)
8563	}
8564	if value == nil {
8565		return nil
8566	}
8567
8568	shape, ok := value.([]interface{})
8569	if !ok {
8570		return fmt.Errorf("unexpected JSON type %v", value)
8571	}
8572
8573	var cv []types.Tag
8574	if *v == nil {
8575		cv = []types.Tag{}
8576	} else {
8577		cv = *v
8578	}
8579
8580	for _, value := range shape {
8581		var col types.Tag
8582		destAddr := &col
8583		if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
8584			return err
8585		}
8586		col = *destAddr
8587		cv = append(cv, col)
8588
8589	}
8590	*v = cv
8591	return nil
8592}
8593
8594func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error {
8595	if v == nil {
8596		return fmt.Errorf("unexpected nil of type %T", v)
8597	}
8598	if value == nil {
8599		return nil
8600	}
8601
8602	shape, ok := value.(map[string]interface{})
8603	if !ok {
8604		return fmt.Errorf("unexpected JSON type %v", value)
8605	}
8606
8607	var sv *types.TooManyTagsException
8608	if *v == nil {
8609		sv = &types.TooManyTagsException{}
8610	} else {
8611		sv = *v
8612	}
8613
8614	for key, value := range shape {
8615		switch key {
8616		case "message":
8617			if value != nil {
8618				jtv, ok := value.(string)
8619				if !ok {
8620					return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
8621				}
8622				sv.Message = ptr.String(jtv)
8623			}
8624
8625		default:
8626			_, _ = key, value
8627
8628		}
8629	}
8630	*v = sv
8631	return nil
8632}
8633
8634func awsAwsjson11_deserializeDocumentVirtualGateway(v **types.VirtualGateway, value interface{}) error {
8635	if v == nil {
8636		return fmt.Errorf("unexpected nil of type %T", v)
8637	}
8638	if value == nil {
8639		return nil
8640	}
8641
8642	shape, ok := value.(map[string]interface{})
8643	if !ok {
8644		return fmt.Errorf("unexpected JSON type %v", value)
8645	}
8646
8647	var sv *types.VirtualGateway
8648	if *v == nil {
8649		sv = &types.VirtualGateway{}
8650	} else {
8651		sv = *v
8652	}
8653
8654	for key, value := range shape {
8655		switch key {
8656		case "virtualGatewayId":
8657			if value != nil {
8658				jtv, ok := value.(string)
8659				if !ok {
8660					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
8661				}
8662				sv.VirtualGatewayId = ptr.String(jtv)
8663			}
8664
8665		case "virtualGatewayState":
8666			if value != nil {
8667				jtv, ok := value.(string)
8668				if !ok {
8669					return fmt.Errorf("expected VirtualGatewayState to be of type string, got %T instead", value)
8670				}
8671				sv.VirtualGatewayState = ptr.String(jtv)
8672			}
8673
8674		default:
8675			_, _ = key, value
8676
8677		}
8678	}
8679	*v = sv
8680	return nil
8681}
8682
8683func awsAwsjson11_deserializeDocumentVirtualGatewayList(v *[]types.VirtualGateway, value interface{}) error {
8684	if v == nil {
8685		return fmt.Errorf("unexpected nil of type %T", v)
8686	}
8687	if value == nil {
8688		return nil
8689	}
8690
8691	shape, ok := value.([]interface{})
8692	if !ok {
8693		return fmt.Errorf("unexpected JSON type %v", value)
8694	}
8695
8696	var cv []types.VirtualGateway
8697	if *v == nil {
8698		cv = []types.VirtualGateway{}
8699	} else {
8700		cv = *v
8701	}
8702
8703	for _, value := range shape {
8704		var col types.VirtualGateway
8705		destAddr := &col
8706		if err := awsAwsjson11_deserializeDocumentVirtualGateway(&destAddr, value); err != nil {
8707			return err
8708		}
8709		col = *destAddr
8710		cv = append(cv, col)
8711
8712	}
8713	*v = cv
8714	return nil
8715}
8716
8717func awsAwsjson11_deserializeDocumentVirtualInterface(v **types.VirtualInterface, value interface{}) error {
8718	if v == nil {
8719		return fmt.Errorf("unexpected nil of type %T", v)
8720	}
8721	if value == nil {
8722		return nil
8723	}
8724
8725	shape, ok := value.(map[string]interface{})
8726	if !ok {
8727		return fmt.Errorf("unexpected JSON type %v", value)
8728	}
8729
8730	var sv *types.VirtualInterface
8731	if *v == nil {
8732		sv = &types.VirtualInterface{}
8733	} else {
8734		sv = *v
8735	}
8736
8737	for key, value := range shape {
8738		switch key {
8739		case "addressFamily":
8740			if value != nil {
8741				jtv, ok := value.(string)
8742				if !ok {
8743					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
8744				}
8745				sv.AddressFamily = types.AddressFamily(jtv)
8746			}
8747
8748		case "amazonAddress":
8749			if value != nil {
8750				jtv, ok := value.(string)
8751				if !ok {
8752					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
8753				}
8754				sv.AmazonAddress = ptr.String(jtv)
8755			}
8756
8757		case "amazonSideAsn":
8758			if value != nil {
8759				jtv, ok := value.(json.Number)
8760				if !ok {
8761					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
8762				}
8763				i64, err := jtv.Int64()
8764				if err != nil {
8765					return err
8766				}
8767				sv.AmazonSideAsn = ptr.Int64(i64)
8768			}
8769
8770		case "asn":
8771			if value != nil {
8772				jtv, ok := value.(json.Number)
8773				if !ok {
8774					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
8775				}
8776				i64, err := jtv.Int64()
8777				if err != nil {
8778					return err
8779				}
8780				sv.Asn = int32(i64)
8781			}
8782
8783		case "authKey":
8784			if value != nil {
8785				jtv, ok := value.(string)
8786				if !ok {
8787					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
8788				}
8789				sv.AuthKey = ptr.String(jtv)
8790			}
8791
8792		case "awsDeviceV2":
8793			if value != nil {
8794				jtv, ok := value.(string)
8795				if !ok {
8796					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
8797				}
8798				sv.AwsDeviceV2 = ptr.String(jtv)
8799			}
8800
8801		case "bgpPeers":
8802			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
8803				return err
8804			}
8805
8806		case "connectionId":
8807			if value != nil {
8808				jtv, ok := value.(string)
8809				if !ok {
8810					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
8811				}
8812				sv.ConnectionId = ptr.String(jtv)
8813			}
8814
8815		case "customerAddress":
8816			if value != nil {
8817				jtv, ok := value.(string)
8818				if !ok {
8819					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
8820				}
8821				sv.CustomerAddress = ptr.String(jtv)
8822			}
8823
8824		case "customerRouterConfig":
8825			if value != nil {
8826				jtv, ok := value.(string)
8827				if !ok {
8828					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
8829				}
8830				sv.CustomerRouterConfig = ptr.String(jtv)
8831			}
8832
8833		case "directConnectGatewayId":
8834			if value != nil {
8835				jtv, ok := value.(string)
8836				if !ok {
8837					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
8838				}
8839				sv.DirectConnectGatewayId = ptr.String(jtv)
8840			}
8841
8842		case "jumboFrameCapable":
8843			if value != nil {
8844				jtv, ok := value.(bool)
8845				if !ok {
8846					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
8847				}
8848				sv.JumboFrameCapable = ptr.Bool(jtv)
8849			}
8850
8851		case "location":
8852			if value != nil {
8853				jtv, ok := value.(string)
8854				if !ok {
8855					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
8856				}
8857				sv.Location = ptr.String(jtv)
8858			}
8859
8860		case "mtu":
8861			if value != nil {
8862				jtv, ok := value.(json.Number)
8863				if !ok {
8864					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
8865				}
8866				i64, err := jtv.Int64()
8867				if err != nil {
8868					return err
8869				}
8870				sv.Mtu = ptr.Int32(int32(i64))
8871			}
8872
8873		case "ownerAccount":
8874			if value != nil {
8875				jtv, ok := value.(string)
8876				if !ok {
8877					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
8878				}
8879				sv.OwnerAccount = ptr.String(jtv)
8880			}
8881
8882		case "region":
8883			if value != nil {
8884				jtv, ok := value.(string)
8885				if !ok {
8886					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
8887				}
8888				sv.Region = ptr.String(jtv)
8889			}
8890
8891		case "routeFilterPrefixes":
8892			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
8893				return err
8894			}
8895
8896		case "tags":
8897			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
8898				return err
8899			}
8900
8901		case "virtualGatewayId":
8902			if value != nil {
8903				jtv, ok := value.(string)
8904				if !ok {
8905					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
8906				}
8907				sv.VirtualGatewayId = ptr.String(jtv)
8908			}
8909
8910		case "virtualInterfaceId":
8911			if value != nil {
8912				jtv, ok := value.(string)
8913				if !ok {
8914					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
8915				}
8916				sv.VirtualInterfaceId = ptr.String(jtv)
8917			}
8918
8919		case "virtualInterfaceName":
8920			if value != nil {
8921				jtv, ok := value.(string)
8922				if !ok {
8923					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
8924				}
8925				sv.VirtualInterfaceName = ptr.String(jtv)
8926			}
8927
8928		case "virtualInterfaceState":
8929			if value != nil {
8930				jtv, ok := value.(string)
8931				if !ok {
8932					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
8933				}
8934				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
8935			}
8936
8937		case "virtualInterfaceType":
8938			if value != nil {
8939				jtv, ok := value.(string)
8940				if !ok {
8941					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
8942				}
8943				sv.VirtualInterfaceType = ptr.String(jtv)
8944			}
8945
8946		case "vlan":
8947			if value != nil {
8948				jtv, ok := value.(json.Number)
8949				if !ok {
8950					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
8951				}
8952				i64, err := jtv.Int64()
8953				if err != nil {
8954					return err
8955				}
8956				sv.Vlan = int32(i64)
8957			}
8958
8959		default:
8960			_, _ = key, value
8961
8962		}
8963	}
8964	*v = sv
8965	return nil
8966}
8967
8968func awsAwsjson11_deserializeDocumentVirtualInterfaceList(v *[]types.VirtualInterface, value interface{}) error {
8969	if v == nil {
8970		return fmt.Errorf("unexpected nil of type %T", v)
8971	}
8972	if value == nil {
8973		return nil
8974	}
8975
8976	shape, ok := value.([]interface{})
8977	if !ok {
8978		return fmt.Errorf("unexpected JSON type %v", value)
8979	}
8980
8981	var cv []types.VirtualInterface
8982	if *v == nil {
8983		cv = []types.VirtualInterface{}
8984	} else {
8985		cv = *v
8986	}
8987
8988	for _, value := range shape {
8989		var col types.VirtualInterface
8990		destAddr := &col
8991		if err := awsAwsjson11_deserializeDocumentVirtualInterface(&destAddr, value); err != nil {
8992			return err
8993		}
8994		col = *destAddr
8995		cv = append(cv, col)
8996
8997	}
8998	*v = cv
8999	return nil
9000}
9001
9002func awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistory(v **types.VirtualInterfaceTestHistory, value interface{}) error {
9003	if v == nil {
9004		return fmt.Errorf("unexpected nil of type %T", v)
9005	}
9006	if value == nil {
9007		return nil
9008	}
9009
9010	shape, ok := value.(map[string]interface{})
9011	if !ok {
9012		return fmt.Errorf("unexpected JSON type %v", value)
9013	}
9014
9015	var sv *types.VirtualInterfaceTestHistory
9016	if *v == nil {
9017		sv = &types.VirtualInterfaceTestHistory{}
9018	} else {
9019		sv = *v
9020	}
9021
9022	for key, value := range shape {
9023		switch key {
9024		case "bgpPeers":
9025			if err := awsAwsjson11_deserializeDocumentBGPPeerIdList(&sv.BgpPeers, value); err != nil {
9026				return err
9027			}
9028
9029		case "endTime":
9030			if value != nil {
9031				jtv, ok := value.(json.Number)
9032				if !ok {
9033					return fmt.Errorf("expected EndTime to be json.Number, got %T instead", value)
9034				}
9035				f64, err := jtv.Float64()
9036				if err != nil {
9037					return err
9038				}
9039				sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
9040			}
9041
9042		case "ownerAccount":
9043			if value != nil {
9044				jtv, ok := value.(string)
9045				if !ok {
9046					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
9047				}
9048				sv.OwnerAccount = ptr.String(jtv)
9049			}
9050
9051		case "startTime":
9052			if value != nil {
9053				jtv, ok := value.(json.Number)
9054				if !ok {
9055					return fmt.Errorf("expected StartTime to be json.Number, got %T instead", value)
9056				}
9057				f64, err := jtv.Float64()
9058				if err != nil {
9059					return err
9060				}
9061				sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
9062			}
9063
9064		case "status":
9065			if value != nil {
9066				jtv, ok := value.(string)
9067				if !ok {
9068					return fmt.Errorf("expected FailureTestHistoryStatus to be of type string, got %T instead", value)
9069				}
9070				sv.Status = ptr.String(jtv)
9071			}
9072
9073		case "testDurationInMinutes":
9074			if value != nil {
9075				jtv, ok := value.(json.Number)
9076				if !ok {
9077					return fmt.Errorf("expected TestDuration to be json.Number, got %T instead", value)
9078				}
9079				i64, err := jtv.Int64()
9080				if err != nil {
9081					return err
9082				}
9083				sv.TestDurationInMinutes = ptr.Int32(int32(i64))
9084			}
9085
9086		case "testId":
9087			if value != nil {
9088				jtv, ok := value.(string)
9089				if !ok {
9090					return fmt.Errorf("expected TestId to be of type string, got %T instead", value)
9091				}
9092				sv.TestId = ptr.String(jtv)
9093			}
9094
9095		case "virtualInterfaceId":
9096			if value != nil {
9097				jtv, ok := value.(string)
9098				if !ok {
9099					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
9100				}
9101				sv.VirtualInterfaceId = ptr.String(jtv)
9102			}
9103
9104		default:
9105			_, _ = key, value
9106
9107		}
9108	}
9109	*v = sv
9110	return nil
9111}
9112
9113func awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistoryList(v *[]types.VirtualInterfaceTestHistory, value interface{}) error {
9114	if v == nil {
9115		return fmt.Errorf("unexpected nil of type %T", v)
9116	}
9117	if value == nil {
9118		return nil
9119	}
9120
9121	shape, ok := value.([]interface{})
9122	if !ok {
9123		return fmt.Errorf("unexpected JSON type %v", value)
9124	}
9125
9126	var cv []types.VirtualInterfaceTestHistory
9127	if *v == nil {
9128		cv = []types.VirtualInterfaceTestHistory{}
9129	} else {
9130		cv = *v
9131	}
9132
9133	for _, value := range shape {
9134		var col types.VirtualInterfaceTestHistory
9135		destAddr := &col
9136		if err := awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistory(&destAddr, value); err != nil {
9137			return err
9138		}
9139		col = *destAddr
9140		cv = append(cv, col)
9141
9142	}
9143	*v = cv
9144	return nil
9145}
9146
9147func awsAwsjson11_deserializeOpDocumentAcceptDirectConnectGatewayAssociationProposalOutput(v **AcceptDirectConnectGatewayAssociationProposalOutput, value interface{}) error {
9148	if v == nil {
9149		return fmt.Errorf("unexpected nil of type %T", v)
9150	}
9151	if value == nil {
9152		return nil
9153	}
9154
9155	shape, ok := value.(map[string]interface{})
9156	if !ok {
9157		return fmt.Errorf("unexpected JSON type %v", value)
9158	}
9159
9160	var sv *AcceptDirectConnectGatewayAssociationProposalOutput
9161	if *v == nil {
9162		sv = &AcceptDirectConnectGatewayAssociationProposalOutput{}
9163	} else {
9164		sv = *v
9165	}
9166
9167	for key, value := range shape {
9168		switch key {
9169		case "directConnectGatewayAssociation":
9170			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(&sv.DirectConnectGatewayAssociation, value); err != nil {
9171				return err
9172			}
9173
9174		default:
9175			_, _ = key, value
9176
9177		}
9178	}
9179	*v = sv
9180	return nil
9181}
9182
9183func awsAwsjson11_deserializeOpDocumentAllocateConnectionOnInterconnectOutput(v **AllocateConnectionOnInterconnectOutput, value interface{}) error {
9184	if v == nil {
9185		return fmt.Errorf("unexpected nil of type %T", v)
9186	}
9187	if value == nil {
9188		return nil
9189	}
9190
9191	shape, ok := value.(map[string]interface{})
9192	if !ok {
9193		return fmt.Errorf("unexpected JSON type %v", value)
9194	}
9195
9196	var sv *AllocateConnectionOnInterconnectOutput
9197	if *v == nil {
9198		sv = &AllocateConnectionOnInterconnectOutput{}
9199	} else {
9200		sv = *v
9201	}
9202
9203	for key, value := range shape {
9204		switch key {
9205		case "awsDevice":
9206			if value != nil {
9207				jtv, ok := value.(string)
9208				if !ok {
9209					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
9210				}
9211				sv.AwsDevice = ptr.String(jtv)
9212			}
9213
9214		case "awsDeviceV2":
9215			if value != nil {
9216				jtv, ok := value.(string)
9217				if !ok {
9218					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
9219				}
9220				sv.AwsDeviceV2 = ptr.String(jtv)
9221			}
9222
9223		case "bandwidth":
9224			if value != nil {
9225				jtv, ok := value.(string)
9226				if !ok {
9227					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
9228				}
9229				sv.Bandwidth = ptr.String(jtv)
9230			}
9231
9232		case "connectionId":
9233			if value != nil {
9234				jtv, ok := value.(string)
9235				if !ok {
9236					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
9237				}
9238				sv.ConnectionId = ptr.String(jtv)
9239			}
9240
9241		case "connectionName":
9242			if value != nil {
9243				jtv, ok := value.(string)
9244				if !ok {
9245					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
9246				}
9247				sv.ConnectionName = ptr.String(jtv)
9248			}
9249
9250		case "connectionState":
9251			if value != nil {
9252				jtv, ok := value.(string)
9253				if !ok {
9254					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
9255				}
9256				sv.ConnectionState = types.ConnectionState(jtv)
9257			}
9258
9259		case "hasLogicalRedundancy":
9260			if value != nil {
9261				jtv, ok := value.(string)
9262				if !ok {
9263					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
9264				}
9265				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
9266			}
9267
9268		case "jumboFrameCapable":
9269			if value != nil {
9270				jtv, ok := value.(bool)
9271				if !ok {
9272					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
9273				}
9274				sv.JumboFrameCapable = ptr.Bool(jtv)
9275			}
9276
9277		case "lagId":
9278			if value != nil {
9279				jtv, ok := value.(string)
9280				if !ok {
9281					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
9282				}
9283				sv.LagId = ptr.String(jtv)
9284			}
9285
9286		case "loaIssueTime":
9287			if value != nil {
9288				jtv, ok := value.(json.Number)
9289				if !ok {
9290					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
9291				}
9292				f64, err := jtv.Float64()
9293				if err != nil {
9294					return err
9295				}
9296				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
9297			}
9298
9299		case "location":
9300			if value != nil {
9301				jtv, ok := value.(string)
9302				if !ok {
9303					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
9304				}
9305				sv.Location = ptr.String(jtv)
9306			}
9307
9308		case "ownerAccount":
9309			if value != nil {
9310				jtv, ok := value.(string)
9311				if !ok {
9312					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
9313				}
9314				sv.OwnerAccount = ptr.String(jtv)
9315			}
9316
9317		case "partnerName":
9318			if value != nil {
9319				jtv, ok := value.(string)
9320				if !ok {
9321					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
9322				}
9323				sv.PartnerName = ptr.String(jtv)
9324			}
9325
9326		case "providerName":
9327			if value != nil {
9328				jtv, ok := value.(string)
9329				if !ok {
9330					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
9331				}
9332				sv.ProviderName = ptr.String(jtv)
9333			}
9334
9335		case "region":
9336			if value != nil {
9337				jtv, ok := value.(string)
9338				if !ok {
9339					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
9340				}
9341				sv.Region = ptr.String(jtv)
9342			}
9343
9344		case "tags":
9345			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
9346				return err
9347			}
9348
9349		case "vlan":
9350			if value != nil {
9351				jtv, ok := value.(json.Number)
9352				if !ok {
9353					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
9354				}
9355				i64, err := jtv.Int64()
9356				if err != nil {
9357					return err
9358				}
9359				sv.Vlan = int32(i64)
9360			}
9361
9362		default:
9363			_, _ = key, value
9364
9365		}
9366	}
9367	*v = sv
9368	return nil
9369}
9370
9371func awsAwsjson11_deserializeOpDocumentAllocateHostedConnectionOutput(v **AllocateHostedConnectionOutput, value interface{}) error {
9372	if v == nil {
9373		return fmt.Errorf("unexpected nil of type %T", v)
9374	}
9375	if value == nil {
9376		return nil
9377	}
9378
9379	shape, ok := value.(map[string]interface{})
9380	if !ok {
9381		return fmt.Errorf("unexpected JSON type %v", value)
9382	}
9383
9384	var sv *AllocateHostedConnectionOutput
9385	if *v == nil {
9386		sv = &AllocateHostedConnectionOutput{}
9387	} else {
9388		sv = *v
9389	}
9390
9391	for key, value := range shape {
9392		switch key {
9393		case "awsDevice":
9394			if value != nil {
9395				jtv, ok := value.(string)
9396				if !ok {
9397					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
9398				}
9399				sv.AwsDevice = ptr.String(jtv)
9400			}
9401
9402		case "awsDeviceV2":
9403			if value != nil {
9404				jtv, ok := value.(string)
9405				if !ok {
9406					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
9407				}
9408				sv.AwsDeviceV2 = ptr.String(jtv)
9409			}
9410
9411		case "bandwidth":
9412			if value != nil {
9413				jtv, ok := value.(string)
9414				if !ok {
9415					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
9416				}
9417				sv.Bandwidth = ptr.String(jtv)
9418			}
9419
9420		case "connectionId":
9421			if value != nil {
9422				jtv, ok := value.(string)
9423				if !ok {
9424					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
9425				}
9426				sv.ConnectionId = ptr.String(jtv)
9427			}
9428
9429		case "connectionName":
9430			if value != nil {
9431				jtv, ok := value.(string)
9432				if !ok {
9433					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
9434				}
9435				sv.ConnectionName = ptr.String(jtv)
9436			}
9437
9438		case "connectionState":
9439			if value != nil {
9440				jtv, ok := value.(string)
9441				if !ok {
9442					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
9443				}
9444				sv.ConnectionState = types.ConnectionState(jtv)
9445			}
9446
9447		case "hasLogicalRedundancy":
9448			if value != nil {
9449				jtv, ok := value.(string)
9450				if !ok {
9451					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
9452				}
9453				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
9454			}
9455
9456		case "jumboFrameCapable":
9457			if value != nil {
9458				jtv, ok := value.(bool)
9459				if !ok {
9460					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
9461				}
9462				sv.JumboFrameCapable = ptr.Bool(jtv)
9463			}
9464
9465		case "lagId":
9466			if value != nil {
9467				jtv, ok := value.(string)
9468				if !ok {
9469					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
9470				}
9471				sv.LagId = ptr.String(jtv)
9472			}
9473
9474		case "loaIssueTime":
9475			if value != nil {
9476				jtv, ok := value.(json.Number)
9477				if !ok {
9478					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
9479				}
9480				f64, err := jtv.Float64()
9481				if err != nil {
9482					return err
9483				}
9484				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
9485			}
9486
9487		case "location":
9488			if value != nil {
9489				jtv, ok := value.(string)
9490				if !ok {
9491					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
9492				}
9493				sv.Location = ptr.String(jtv)
9494			}
9495
9496		case "ownerAccount":
9497			if value != nil {
9498				jtv, ok := value.(string)
9499				if !ok {
9500					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
9501				}
9502				sv.OwnerAccount = ptr.String(jtv)
9503			}
9504
9505		case "partnerName":
9506			if value != nil {
9507				jtv, ok := value.(string)
9508				if !ok {
9509					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
9510				}
9511				sv.PartnerName = ptr.String(jtv)
9512			}
9513
9514		case "providerName":
9515			if value != nil {
9516				jtv, ok := value.(string)
9517				if !ok {
9518					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
9519				}
9520				sv.ProviderName = ptr.String(jtv)
9521			}
9522
9523		case "region":
9524			if value != nil {
9525				jtv, ok := value.(string)
9526				if !ok {
9527					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
9528				}
9529				sv.Region = ptr.String(jtv)
9530			}
9531
9532		case "tags":
9533			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
9534				return err
9535			}
9536
9537		case "vlan":
9538			if value != nil {
9539				jtv, ok := value.(json.Number)
9540				if !ok {
9541					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
9542				}
9543				i64, err := jtv.Int64()
9544				if err != nil {
9545					return err
9546				}
9547				sv.Vlan = int32(i64)
9548			}
9549
9550		default:
9551			_, _ = key, value
9552
9553		}
9554	}
9555	*v = sv
9556	return nil
9557}
9558
9559func awsAwsjson11_deserializeOpDocumentAllocatePrivateVirtualInterfaceOutput(v **AllocatePrivateVirtualInterfaceOutput, value interface{}) error {
9560	if v == nil {
9561		return fmt.Errorf("unexpected nil of type %T", v)
9562	}
9563	if value == nil {
9564		return nil
9565	}
9566
9567	shape, ok := value.(map[string]interface{})
9568	if !ok {
9569		return fmt.Errorf("unexpected JSON type %v", value)
9570	}
9571
9572	var sv *AllocatePrivateVirtualInterfaceOutput
9573	if *v == nil {
9574		sv = &AllocatePrivateVirtualInterfaceOutput{}
9575	} else {
9576		sv = *v
9577	}
9578
9579	for key, value := range shape {
9580		switch key {
9581		case "addressFamily":
9582			if value != nil {
9583				jtv, ok := value.(string)
9584				if !ok {
9585					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
9586				}
9587				sv.AddressFamily = types.AddressFamily(jtv)
9588			}
9589
9590		case "amazonAddress":
9591			if value != nil {
9592				jtv, ok := value.(string)
9593				if !ok {
9594					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
9595				}
9596				sv.AmazonAddress = ptr.String(jtv)
9597			}
9598
9599		case "amazonSideAsn":
9600			if value != nil {
9601				jtv, ok := value.(json.Number)
9602				if !ok {
9603					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
9604				}
9605				i64, err := jtv.Int64()
9606				if err != nil {
9607					return err
9608				}
9609				sv.AmazonSideAsn = ptr.Int64(i64)
9610			}
9611
9612		case "asn":
9613			if value != nil {
9614				jtv, ok := value.(json.Number)
9615				if !ok {
9616					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
9617				}
9618				i64, err := jtv.Int64()
9619				if err != nil {
9620					return err
9621				}
9622				sv.Asn = int32(i64)
9623			}
9624
9625		case "authKey":
9626			if value != nil {
9627				jtv, ok := value.(string)
9628				if !ok {
9629					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
9630				}
9631				sv.AuthKey = ptr.String(jtv)
9632			}
9633
9634		case "awsDeviceV2":
9635			if value != nil {
9636				jtv, ok := value.(string)
9637				if !ok {
9638					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
9639				}
9640				sv.AwsDeviceV2 = ptr.String(jtv)
9641			}
9642
9643		case "bgpPeers":
9644			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
9645				return err
9646			}
9647
9648		case "connectionId":
9649			if value != nil {
9650				jtv, ok := value.(string)
9651				if !ok {
9652					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
9653				}
9654				sv.ConnectionId = ptr.String(jtv)
9655			}
9656
9657		case "customerAddress":
9658			if value != nil {
9659				jtv, ok := value.(string)
9660				if !ok {
9661					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
9662				}
9663				sv.CustomerAddress = ptr.String(jtv)
9664			}
9665
9666		case "customerRouterConfig":
9667			if value != nil {
9668				jtv, ok := value.(string)
9669				if !ok {
9670					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
9671				}
9672				sv.CustomerRouterConfig = ptr.String(jtv)
9673			}
9674
9675		case "directConnectGatewayId":
9676			if value != nil {
9677				jtv, ok := value.(string)
9678				if !ok {
9679					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
9680				}
9681				sv.DirectConnectGatewayId = ptr.String(jtv)
9682			}
9683
9684		case "jumboFrameCapable":
9685			if value != nil {
9686				jtv, ok := value.(bool)
9687				if !ok {
9688					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
9689				}
9690				sv.JumboFrameCapable = ptr.Bool(jtv)
9691			}
9692
9693		case "location":
9694			if value != nil {
9695				jtv, ok := value.(string)
9696				if !ok {
9697					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
9698				}
9699				sv.Location = ptr.String(jtv)
9700			}
9701
9702		case "mtu":
9703			if value != nil {
9704				jtv, ok := value.(json.Number)
9705				if !ok {
9706					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
9707				}
9708				i64, err := jtv.Int64()
9709				if err != nil {
9710					return err
9711				}
9712				sv.Mtu = ptr.Int32(int32(i64))
9713			}
9714
9715		case "ownerAccount":
9716			if value != nil {
9717				jtv, ok := value.(string)
9718				if !ok {
9719					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
9720				}
9721				sv.OwnerAccount = ptr.String(jtv)
9722			}
9723
9724		case "region":
9725			if value != nil {
9726				jtv, ok := value.(string)
9727				if !ok {
9728					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
9729				}
9730				sv.Region = ptr.String(jtv)
9731			}
9732
9733		case "routeFilterPrefixes":
9734			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
9735				return err
9736			}
9737
9738		case "tags":
9739			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
9740				return err
9741			}
9742
9743		case "virtualGatewayId":
9744			if value != nil {
9745				jtv, ok := value.(string)
9746				if !ok {
9747					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
9748				}
9749				sv.VirtualGatewayId = ptr.String(jtv)
9750			}
9751
9752		case "virtualInterfaceId":
9753			if value != nil {
9754				jtv, ok := value.(string)
9755				if !ok {
9756					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
9757				}
9758				sv.VirtualInterfaceId = ptr.String(jtv)
9759			}
9760
9761		case "virtualInterfaceName":
9762			if value != nil {
9763				jtv, ok := value.(string)
9764				if !ok {
9765					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
9766				}
9767				sv.VirtualInterfaceName = ptr.String(jtv)
9768			}
9769
9770		case "virtualInterfaceState":
9771			if value != nil {
9772				jtv, ok := value.(string)
9773				if !ok {
9774					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
9775				}
9776				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
9777			}
9778
9779		case "virtualInterfaceType":
9780			if value != nil {
9781				jtv, ok := value.(string)
9782				if !ok {
9783					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
9784				}
9785				sv.VirtualInterfaceType = ptr.String(jtv)
9786			}
9787
9788		case "vlan":
9789			if value != nil {
9790				jtv, ok := value.(json.Number)
9791				if !ok {
9792					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
9793				}
9794				i64, err := jtv.Int64()
9795				if err != nil {
9796					return err
9797				}
9798				sv.Vlan = int32(i64)
9799			}
9800
9801		default:
9802			_, _ = key, value
9803
9804		}
9805	}
9806	*v = sv
9807	return nil
9808}
9809
9810func awsAwsjson11_deserializeOpDocumentAllocatePublicVirtualInterfaceOutput(v **AllocatePublicVirtualInterfaceOutput, value interface{}) error {
9811	if v == nil {
9812		return fmt.Errorf("unexpected nil of type %T", v)
9813	}
9814	if value == nil {
9815		return nil
9816	}
9817
9818	shape, ok := value.(map[string]interface{})
9819	if !ok {
9820		return fmt.Errorf("unexpected JSON type %v", value)
9821	}
9822
9823	var sv *AllocatePublicVirtualInterfaceOutput
9824	if *v == nil {
9825		sv = &AllocatePublicVirtualInterfaceOutput{}
9826	} else {
9827		sv = *v
9828	}
9829
9830	for key, value := range shape {
9831		switch key {
9832		case "addressFamily":
9833			if value != nil {
9834				jtv, ok := value.(string)
9835				if !ok {
9836					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
9837				}
9838				sv.AddressFamily = types.AddressFamily(jtv)
9839			}
9840
9841		case "amazonAddress":
9842			if value != nil {
9843				jtv, ok := value.(string)
9844				if !ok {
9845					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
9846				}
9847				sv.AmazonAddress = ptr.String(jtv)
9848			}
9849
9850		case "amazonSideAsn":
9851			if value != nil {
9852				jtv, ok := value.(json.Number)
9853				if !ok {
9854					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
9855				}
9856				i64, err := jtv.Int64()
9857				if err != nil {
9858					return err
9859				}
9860				sv.AmazonSideAsn = ptr.Int64(i64)
9861			}
9862
9863		case "asn":
9864			if value != nil {
9865				jtv, ok := value.(json.Number)
9866				if !ok {
9867					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
9868				}
9869				i64, err := jtv.Int64()
9870				if err != nil {
9871					return err
9872				}
9873				sv.Asn = int32(i64)
9874			}
9875
9876		case "authKey":
9877			if value != nil {
9878				jtv, ok := value.(string)
9879				if !ok {
9880					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
9881				}
9882				sv.AuthKey = ptr.String(jtv)
9883			}
9884
9885		case "awsDeviceV2":
9886			if value != nil {
9887				jtv, ok := value.(string)
9888				if !ok {
9889					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
9890				}
9891				sv.AwsDeviceV2 = ptr.String(jtv)
9892			}
9893
9894		case "bgpPeers":
9895			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
9896				return err
9897			}
9898
9899		case "connectionId":
9900			if value != nil {
9901				jtv, ok := value.(string)
9902				if !ok {
9903					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
9904				}
9905				sv.ConnectionId = ptr.String(jtv)
9906			}
9907
9908		case "customerAddress":
9909			if value != nil {
9910				jtv, ok := value.(string)
9911				if !ok {
9912					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
9913				}
9914				sv.CustomerAddress = ptr.String(jtv)
9915			}
9916
9917		case "customerRouterConfig":
9918			if value != nil {
9919				jtv, ok := value.(string)
9920				if !ok {
9921					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
9922				}
9923				sv.CustomerRouterConfig = ptr.String(jtv)
9924			}
9925
9926		case "directConnectGatewayId":
9927			if value != nil {
9928				jtv, ok := value.(string)
9929				if !ok {
9930					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
9931				}
9932				sv.DirectConnectGatewayId = ptr.String(jtv)
9933			}
9934
9935		case "jumboFrameCapable":
9936			if value != nil {
9937				jtv, ok := value.(bool)
9938				if !ok {
9939					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
9940				}
9941				sv.JumboFrameCapable = ptr.Bool(jtv)
9942			}
9943
9944		case "location":
9945			if value != nil {
9946				jtv, ok := value.(string)
9947				if !ok {
9948					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
9949				}
9950				sv.Location = ptr.String(jtv)
9951			}
9952
9953		case "mtu":
9954			if value != nil {
9955				jtv, ok := value.(json.Number)
9956				if !ok {
9957					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
9958				}
9959				i64, err := jtv.Int64()
9960				if err != nil {
9961					return err
9962				}
9963				sv.Mtu = ptr.Int32(int32(i64))
9964			}
9965
9966		case "ownerAccount":
9967			if value != nil {
9968				jtv, ok := value.(string)
9969				if !ok {
9970					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
9971				}
9972				sv.OwnerAccount = ptr.String(jtv)
9973			}
9974
9975		case "region":
9976			if value != nil {
9977				jtv, ok := value.(string)
9978				if !ok {
9979					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
9980				}
9981				sv.Region = ptr.String(jtv)
9982			}
9983
9984		case "routeFilterPrefixes":
9985			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
9986				return err
9987			}
9988
9989		case "tags":
9990			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
9991				return err
9992			}
9993
9994		case "virtualGatewayId":
9995			if value != nil {
9996				jtv, ok := value.(string)
9997				if !ok {
9998					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
9999				}
10000				sv.VirtualGatewayId = ptr.String(jtv)
10001			}
10002
10003		case "virtualInterfaceId":
10004			if value != nil {
10005				jtv, ok := value.(string)
10006				if !ok {
10007					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
10008				}
10009				sv.VirtualInterfaceId = ptr.String(jtv)
10010			}
10011
10012		case "virtualInterfaceName":
10013			if value != nil {
10014				jtv, ok := value.(string)
10015				if !ok {
10016					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
10017				}
10018				sv.VirtualInterfaceName = ptr.String(jtv)
10019			}
10020
10021		case "virtualInterfaceState":
10022			if value != nil {
10023				jtv, ok := value.(string)
10024				if !ok {
10025					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
10026				}
10027				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
10028			}
10029
10030		case "virtualInterfaceType":
10031			if value != nil {
10032				jtv, ok := value.(string)
10033				if !ok {
10034					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
10035				}
10036				sv.VirtualInterfaceType = ptr.String(jtv)
10037			}
10038
10039		case "vlan":
10040			if value != nil {
10041				jtv, ok := value.(json.Number)
10042				if !ok {
10043					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
10044				}
10045				i64, err := jtv.Int64()
10046				if err != nil {
10047					return err
10048				}
10049				sv.Vlan = int32(i64)
10050			}
10051
10052		default:
10053			_, _ = key, value
10054
10055		}
10056	}
10057	*v = sv
10058	return nil
10059}
10060
10061func awsAwsjson11_deserializeOpDocumentAllocateTransitVirtualInterfaceOutput(v **AllocateTransitVirtualInterfaceOutput, value interface{}) error {
10062	if v == nil {
10063		return fmt.Errorf("unexpected nil of type %T", v)
10064	}
10065	if value == nil {
10066		return nil
10067	}
10068
10069	shape, ok := value.(map[string]interface{})
10070	if !ok {
10071		return fmt.Errorf("unexpected JSON type %v", value)
10072	}
10073
10074	var sv *AllocateTransitVirtualInterfaceOutput
10075	if *v == nil {
10076		sv = &AllocateTransitVirtualInterfaceOutput{}
10077	} else {
10078		sv = *v
10079	}
10080
10081	for key, value := range shape {
10082		switch key {
10083		case "virtualInterface":
10084			if err := awsAwsjson11_deserializeDocumentVirtualInterface(&sv.VirtualInterface, value); err != nil {
10085				return err
10086			}
10087
10088		default:
10089			_, _ = key, value
10090
10091		}
10092	}
10093	*v = sv
10094	return nil
10095}
10096
10097func awsAwsjson11_deserializeOpDocumentAssociateConnectionWithLagOutput(v **AssociateConnectionWithLagOutput, value interface{}) error {
10098	if v == nil {
10099		return fmt.Errorf("unexpected nil of type %T", v)
10100	}
10101	if value == nil {
10102		return nil
10103	}
10104
10105	shape, ok := value.(map[string]interface{})
10106	if !ok {
10107		return fmt.Errorf("unexpected JSON type %v", value)
10108	}
10109
10110	var sv *AssociateConnectionWithLagOutput
10111	if *v == nil {
10112		sv = &AssociateConnectionWithLagOutput{}
10113	} else {
10114		sv = *v
10115	}
10116
10117	for key, value := range shape {
10118		switch key {
10119		case "awsDevice":
10120			if value != nil {
10121				jtv, ok := value.(string)
10122				if !ok {
10123					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
10124				}
10125				sv.AwsDevice = ptr.String(jtv)
10126			}
10127
10128		case "awsDeviceV2":
10129			if value != nil {
10130				jtv, ok := value.(string)
10131				if !ok {
10132					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
10133				}
10134				sv.AwsDeviceV2 = ptr.String(jtv)
10135			}
10136
10137		case "bandwidth":
10138			if value != nil {
10139				jtv, ok := value.(string)
10140				if !ok {
10141					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
10142				}
10143				sv.Bandwidth = ptr.String(jtv)
10144			}
10145
10146		case "connectionId":
10147			if value != nil {
10148				jtv, ok := value.(string)
10149				if !ok {
10150					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
10151				}
10152				sv.ConnectionId = ptr.String(jtv)
10153			}
10154
10155		case "connectionName":
10156			if value != nil {
10157				jtv, ok := value.(string)
10158				if !ok {
10159					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
10160				}
10161				sv.ConnectionName = ptr.String(jtv)
10162			}
10163
10164		case "connectionState":
10165			if value != nil {
10166				jtv, ok := value.(string)
10167				if !ok {
10168					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
10169				}
10170				sv.ConnectionState = types.ConnectionState(jtv)
10171			}
10172
10173		case "hasLogicalRedundancy":
10174			if value != nil {
10175				jtv, ok := value.(string)
10176				if !ok {
10177					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
10178				}
10179				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
10180			}
10181
10182		case "jumboFrameCapable":
10183			if value != nil {
10184				jtv, ok := value.(bool)
10185				if !ok {
10186					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
10187				}
10188				sv.JumboFrameCapable = ptr.Bool(jtv)
10189			}
10190
10191		case "lagId":
10192			if value != nil {
10193				jtv, ok := value.(string)
10194				if !ok {
10195					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
10196				}
10197				sv.LagId = ptr.String(jtv)
10198			}
10199
10200		case "loaIssueTime":
10201			if value != nil {
10202				jtv, ok := value.(json.Number)
10203				if !ok {
10204					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
10205				}
10206				f64, err := jtv.Float64()
10207				if err != nil {
10208					return err
10209				}
10210				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
10211			}
10212
10213		case "location":
10214			if value != nil {
10215				jtv, ok := value.(string)
10216				if !ok {
10217					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
10218				}
10219				sv.Location = ptr.String(jtv)
10220			}
10221
10222		case "ownerAccount":
10223			if value != nil {
10224				jtv, ok := value.(string)
10225				if !ok {
10226					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
10227				}
10228				sv.OwnerAccount = ptr.String(jtv)
10229			}
10230
10231		case "partnerName":
10232			if value != nil {
10233				jtv, ok := value.(string)
10234				if !ok {
10235					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
10236				}
10237				sv.PartnerName = ptr.String(jtv)
10238			}
10239
10240		case "providerName":
10241			if value != nil {
10242				jtv, ok := value.(string)
10243				if !ok {
10244					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
10245				}
10246				sv.ProviderName = ptr.String(jtv)
10247			}
10248
10249		case "region":
10250			if value != nil {
10251				jtv, ok := value.(string)
10252				if !ok {
10253					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
10254				}
10255				sv.Region = ptr.String(jtv)
10256			}
10257
10258		case "tags":
10259			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
10260				return err
10261			}
10262
10263		case "vlan":
10264			if value != nil {
10265				jtv, ok := value.(json.Number)
10266				if !ok {
10267					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
10268				}
10269				i64, err := jtv.Int64()
10270				if err != nil {
10271					return err
10272				}
10273				sv.Vlan = int32(i64)
10274			}
10275
10276		default:
10277			_, _ = key, value
10278
10279		}
10280	}
10281	*v = sv
10282	return nil
10283}
10284
10285func awsAwsjson11_deserializeOpDocumentAssociateHostedConnectionOutput(v **AssociateHostedConnectionOutput, value interface{}) error {
10286	if v == nil {
10287		return fmt.Errorf("unexpected nil of type %T", v)
10288	}
10289	if value == nil {
10290		return nil
10291	}
10292
10293	shape, ok := value.(map[string]interface{})
10294	if !ok {
10295		return fmt.Errorf("unexpected JSON type %v", value)
10296	}
10297
10298	var sv *AssociateHostedConnectionOutput
10299	if *v == nil {
10300		sv = &AssociateHostedConnectionOutput{}
10301	} else {
10302		sv = *v
10303	}
10304
10305	for key, value := range shape {
10306		switch key {
10307		case "awsDevice":
10308			if value != nil {
10309				jtv, ok := value.(string)
10310				if !ok {
10311					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
10312				}
10313				sv.AwsDevice = ptr.String(jtv)
10314			}
10315
10316		case "awsDeviceV2":
10317			if value != nil {
10318				jtv, ok := value.(string)
10319				if !ok {
10320					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
10321				}
10322				sv.AwsDeviceV2 = ptr.String(jtv)
10323			}
10324
10325		case "bandwidth":
10326			if value != nil {
10327				jtv, ok := value.(string)
10328				if !ok {
10329					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
10330				}
10331				sv.Bandwidth = ptr.String(jtv)
10332			}
10333
10334		case "connectionId":
10335			if value != nil {
10336				jtv, ok := value.(string)
10337				if !ok {
10338					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
10339				}
10340				sv.ConnectionId = ptr.String(jtv)
10341			}
10342
10343		case "connectionName":
10344			if value != nil {
10345				jtv, ok := value.(string)
10346				if !ok {
10347					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
10348				}
10349				sv.ConnectionName = ptr.String(jtv)
10350			}
10351
10352		case "connectionState":
10353			if value != nil {
10354				jtv, ok := value.(string)
10355				if !ok {
10356					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
10357				}
10358				sv.ConnectionState = types.ConnectionState(jtv)
10359			}
10360
10361		case "hasLogicalRedundancy":
10362			if value != nil {
10363				jtv, ok := value.(string)
10364				if !ok {
10365					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
10366				}
10367				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
10368			}
10369
10370		case "jumboFrameCapable":
10371			if value != nil {
10372				jtv, ok := value.(bool)
10373				if !ok {
10374					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
10375				}
10376				sv.JumboFrameCapable = ptr.Bool(jtv)
10377			}
10378
10379		case "lagId":
10380			if value != nil {
10381				jtv, ok := value.(string)
10382				if !ok {
10383					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
10384				}
10385				sv.LagId = ptr.String(jtv)
10386			}
10387
10388		case "loaIssueTime":
10389			if value != nil {
10390				jtv, ok := value.(json.Number)
10391				if !ok {
10392					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
10393				}
10394				f64, err := jtv.Float64()
10395				if err != nil {
10396					return err
10397				}
10398				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
10399			}
10400
10401		case "location":
10402			if value != nil {
10403				jtv, ok := value.(string)
10404				if !ok {
10405					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
10406				}
10407				sv.Location = ptr.String(jtv)
10408			}
10409
10410		case "ownerAccount":
10411			if value != nil {
10412				jtv, ok := value.(string)
10413				if !ok {
10414					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
10415				}
10416				sv.OwnerAccount = ptr.String(jtv)
10417			}
10418
10419		case "partnerName":
10420			if value != nil {
10421				jtv, ok := value.(string)
10422				if !ok {
10423					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
10424				}
10425				sv.PartnerName = ptr.String(jtv)
10426			}
10427
10428		case "providerName":
10429			if value != nil {
10430				jtv, ok := value.(string)
10431				if !ok {
10432					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
10433				}
10434				sv.ProviderName = ptr.String(jtv)
10435			}
10436
10437		case "region":
10438			if value != nil {
10439				jtv, ok := value.(string)
10440				if !ok {
10441					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
10442				}
10443				sv.Region = ptr.String(jtv)
10444			}
10445
10446		case "tags":
10447			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
10448				return err
10449			}
10450
10451		case "vlan":
10452			if value != nil {
10453				jtv, ok := value.(json.Number)
10454				if !ok {
10455					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
10456				}
10457				i64, err := jtv.Int64()
10458				if err != nil {
10459					return err
10460				}
10461				sv.Vlan = int32(i64)
10462			}
10463
10464		default:
10465			_, _ = key, value
10466
10467		}
10468	}
10469	*v = sv
10470	return nil
10471}
10472
10473func awsAwsjson11_deserializeOpDocumentAssociateVirtualInterfaceOutput(v **AssociateVirtualInterfaceOutput, value interface{}) error {
10474	if v == nil {
10475		return fmt.Errorf("unexpected nil of type %T", v)
10476	}
10477	if value == nil {
10478		return nil
10479	}
10480
10481	shape, ok := value.(map[string]interface{})
10482	if !ok {
10483		return fmt.Errorf("unexpected JSON type %v", value)
10484	}
10485
10486	var sv *AssociateVirtualInterfaceOutput
10487	if *v == nil {
10488		sv = &AssociateVirtualInterfaceOutput{}
10489	} else {
10490		sv = *v
10491	}
10492
10493	for key, value := range shape {
10494		switch key {
10495		case "addressFamily":
10496			if value != nil {
10497				jtv, ok := value.(string)
10498				if !ok {
10499					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
10500				}
10501				sv.AddressFamily = types.AddressFamily(jtv)
10502			}
10503
10504		case "amazonAddress":
10505			if value != nil {
10506				jtv, ok := value.(string)
10507				if !ok {
10508					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
10509				}
10510				sv.AmazonAddress = ptr.String(jtv)
10511			}
10512
10513		case "amazonSideAsn":
10514			if value != nil {
10515				jtv, ok := value.(json.Number)
10516				if !ok {
10517					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
10518				}
10519				i64, err := jtv.Int64()
10520				if err != nil {
10521					return err
10522				}
10523				sv.AmazonSideAsn = ptr.Int64(i64)
10524			}
10525
10526		case "asn":
10527			if value != nil {
10528				jtv, ok := value.(json.Number)
10529				if !ok {
10530					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
10531				}
10532				i64, err := jtv.Int64()
10533				if err != nil {
10534					return err
10535				}
10536				sv.Asn = int32(i64)
10537			}
10538
10539		case "authKey":
10540			if value != nil {
10541				jtv, ok := value.(string)
10542				if !ok {
10543					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
10544				}
10545				sv.AuthKey = ptr.String(jtv)
10546			}
10547
10548		case "awsDeviceV2":
10549			if value != nil {
10550				jtv, ok := value.(string)
10551				if !ok {
10552					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
10553				}
10554				sv.AwsDeviceV2 = ptr.String(jtv)
10555			}
10556
10557		case "bgpPeers":
10558			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
10559				return err
10560			}
10561
10562		case "connectionId":
10563			if value != nil {
10564				jtv, ok := value.(string)
10565				if !ok {
10566					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
10567				}
10568				sv.ConnectionId = ptr.String(jtv)
10569			}
10570
10571		case "customerAddress":
10572			if value != nil {
10573				jtv, ok := value.(string)
10574				if !ok {
10575					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
10576				}
10577				sv.CustomerAddress = ptr.String(jtv)
10578			}
10579
10580		case "customerRouterConfig":
10581			if value != nil {
10582				jtv, ok := value.(string)
10583				if !ok {
10584					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
10585				}
10586				sv.CustomerRouterConfig = ptr.String(jtv)
10587			}
10588
10589		case "directConnectGatewayId":
10590			if value != nil {
10591				jtv, ok := value.(string)
10592				if !ok {
10593					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
10594				}
10595				sv.DirectConnectGatewayId = ptr.String(jtv)
10596			}
10597
10598		case "jumboFrameCapable":
10599			if value != nil {
10600				jtv, ok := value.(bool)
10601				if !ok {
10602					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
10603				}
10604				sv.JumboFrameCapable = ptr.Bool(jtv)
10605			}
10606
10607		case "location":
10608			if value != nil {
10609				jtv, ok := value.(string)
10610				if !ok {
10611					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
10612				}
10613				sv.Location = ptr.String(jtv)
10614			}
10615
10616		case "mtu":
10617			if value != nil {
10618				jtv, ok := value.(json.Number)
10619				if !ok {
10620					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
10621				}
10622				i64, err := jtv.Int64()
10623				if err != nil {
10624					return err
10625				}
10626				sv.Mtu = ptr.Int32(int32(i64))
10627			}
10628
10629		case "ownerAccount":
10630			if value != nil {
10631				jtv, ok := value.(string)
10632				if !ok {
10633					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
10634				}
10635				sv.OwnerAccount = ptr.String(jtv)
10636			}
10637
10638		case "region":
10639			if value != nil {
10640				jtv, ok := value.(string)
10641				if !ok {
10642					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
10643				}
10644				sv.Region = ptr.String(jtv)
10645			}
10646
10647		case "routeFilterPrefixes":
10648			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
10649				return err
10650			}
10651
10652		case "tags":
10653			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
10654				return err
10655			}
10656
10657		case "virtualGatewayId":
10658			if value != nil {
10659				jtv, ok := value.(string)
10660				if !ok {
10661					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
10662				}
10663				sv.VirtualGatewayId = ptr.String(jtv)
10664			}
10665
10666		case "virtualInterfaceId":
10667			if value != nil {
10668				jtv, ok := value.(string)
10669				if !ok {
10670					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
10671				}
10672				sv.VirtualInterfaceId = ptr.String(jtv)
10673			}
10674
10675		case "virtualInterfaceName":
10676			if value != nil {
10677				jtv, ok := value.(string)
10678				if !ok {
10679					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
10680				}
10681				sv.VirtualInterfaceName = ptr.String(jtv)
10682			}
10683
10684		case "virtualInterfaceState":
10685			if value != nil {
10686				jtv, ok := value.(string)
10687				if !ok {
10688					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
10689				}
10690				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
10691			}
10692
10693		case "virtualInterfaceType":
10694			if value != nil {
10695				jtv, ok := value.(string)
10696				if !ok {
10697					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
10698				}
10699				sv.VirtualInterfaceType = ptr.String(jtv)
10700			}
10701
10702		case "vlan":
10703			if value != nil {
10704				jtv, ok := value.(json.Number)
10705				if !ok {
10706					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
10707				}
10708				i64, err := jtv.Int64()
10709				if err != nil {
10710					return err
10711				}
10712				sv.Vlan = int32(i64)
10713			}
10714
10715		default:
10716			_, _ = key, value
10717
10718		}
10719	}
10720	*v = sv
10721	return nil
10722}
10723
10724func awsAwsjson11_deserializeOpDocumentConfirmConnectionOutput(v **ConfirmConnectionOutput, value interface{}) error {
10725	if v == nil {
10726		return fmt.Errorf("unexpected nil of type %T", v)
10727	}
10728	if value == nil {
10729		return nil
10730	}
10731
10732	shape, ok := value.(map[string]interface{})
10733	if !ok {
10734		return fmt.Errorf("unexpected JSON type %v", value)
10735	}
10736
10737	var sv *ConfirmConnectionOutput
10738	if *v == nil {
10739		sv = &ConfirmConnectionOutput{}
10740	} else {
10741		sv = *v
10742	}
10743
10744	for key, value := range shape {
10745		switch key {
10746		case "connectionState":
10747			if value != nil {
10748				jtv, ok := value.(string)
10749				if !ok {
10750					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
10751				}
10752				sv.ConnectionState = types.ConnectionState(jtv)
10753			}
10754
10755		default:
10756			_, _ = key, value
10757
10758		}
10759	}
10760	*v = sv
10761	return nil
10762}
10763
10764func awsAwsjson11_deserializeOpDocumentConfirmPrivateVirtualInterfaceOutput(v **ConfirmPrivateVirtualInterfaceOutput, value interface{}) error {
10765	if v == nil {
10766		return fmt.Errorf("unexpected nil of type %T", v)
10767	}
10768	if value == nil {
10769		return nil
10770	}
10771
10772	shape, ok := value.(map[string]interface{})
10773	if !ok {
10774		return fmt.Errorf("unexpected JSON type %v", value)
10775	}
10776
10777	var sv *ConfirmPrivateVirtualInterfaceOutput
10778	if *v == nil {
10779		sv = &ConfirmPrivateVirtualInterfaceOutput{}
10780	} else {
10781		sv = *v
10782	}
10783
10784	for key, value := range shape {
10785		switch key {
10786		case "virtualInterfaceState":
10787			if value != nil {
10788				jtv, ok := value.(string)
10789				if !ok {
10790					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
10791				}
10792				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
10793			}
10794
10795		default:
10796			_, _ = key, value
10797
10798		}
10799	}
10800	*v = sv
10801	return nil
10802}
10803
10804func awsAwsjson11_deserializeOpDocumentConfirmPublicVirtualInterfaceOutput(v **ConfirmPublicVirtualInterfaceOutput, value interface{}) error {
10805	if v == nil {
10806		return fmt.Errorf("unexpected nil of type %T", v)
10807	}
10808	if value == nil {
10809		return nil
10810	}
10811
10812	shape, ok := value.(map[string]interface{})
10813	if !ok {
10814		return fmt.Errorf("unexpected JSON type %v", value)
10815	}
10816
10817	var sv *ConfirmPublicVirtualInterfaceOutput
10818	if *v == nil {
10819		sv = &ConfirmPublicVirtualInterfaceOutput{}
10820	} else {
10821		sv = *v
10822	}
10823
10824	for key, value := range shape {
10825		switch key {
10826		case "virtualInterfaceState":
10827			if value != nil {
10828				jtv, ok := value.(string)
10829				if !ok {
10830					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
10831				}
10832				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
10833			}
10834
10835		default:
10836			_, _ = key, value
10837
10838		}
10839	}
10840	*v = sv
10841	return nil
10842}
10843
10844func awsAwsjson11_deserializeOpDocumentConfirmTransitVirtualInterfaceOutput(v **ConfirmTransitVirtualInterfaceOutput, value interface{}) error {
10845	if v == nil {
10846		return fmt.Errorf("unexpected nil of type %T", v)
10847	}
10848	if value == nil {
10849		return nil
10850	}
10851
10852	shape, ok := value.(map[string]interface{})
10853	if !ok {
10854		return fmt.Errorf("unexpected JSON type %v", value)
10855	}
10856
10857	var sv *ConfirmTransitVirtualInterfaceOutput
10858	if *v == nil {
10859		sv = &ConfirmTransitVirtualInterfaceOutput{}
10860	} else {
10861		sv = *v
10862	}
10863
10864	for key, value := range shape {
10865		switch key {
10866		case "virtualInterfaceState":
10867			if value != nil {
10868				jtv, ok := value.(string)
10869				if !ok {
10870					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
10871				}
10872				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
10873			}
10874
10875		default:
10876			_, _ = key, value
10877
10878		}
10879	}
10880	*v = sv
10881	return nil
10882}
10883
10884func awsAwsjson11_deserializeOpDocumentCreateBGPPeerOutput(v **CreateBGPPeerOutput, value interface{}) error {
10885	if v == nil {
10886		return fmt.Errorf("unexpected nil of type %T", v)
10887	}
10888	if value == nil {
10889		return nil
10890	}
10891
10892	shape, ok := value.(map[string]interface{})
10893	if !ok {
10894		return fmt.Errorf("unexpected JSON type %v", value)
10895	}
10896
10897	var sv *CreateBGPPeerOutput
10898	if *v == nil {
10899		sv = &CreateBGPPeerOutput{}
10900	} else {
10901		sv = *v
10902	}
10903
10904	for key, value := range shape {
10905		switch key {
10906		case "virtualInterface":
10907			if err := awsAwsjson11_deserializeDocumentVirtualInterface(&sv.VirtualInterface, value); err != nil {
10908				return err
10909			}
10910
10911		default:
10912			_, _ = key, value
10913
10914		}
10915	}
10916	*v = sv
10917	return nil
10918}
10919
10920func awsAwsjson11_deserializeOpDocumentCreateConnectionOutput(v **CreateConnectionOutput, value interface{}) error {
10921	if v == nil {
10922		return fmt.Errorf("unexpected nil of type %T", v)
10923	}
10924	if value == nil {
10925		return nil
10926	}
10927
10928	shape, ok := value.(map[string]interface{})
10929	if !ok {
10930		return fmt.Errorf("unexpected JSON type %v", value)
10931	}
10932
10933	var sv *CreateConnectionOutput
10934	if *v == nil {
10935		sv = &CreateConnectionOutput{}
10936	} else {
10937		sv = *v
10938	}
10939
10940	for key, value := range shape {
10941		switch key {
10942		case "awsDevice":
10943			if value != nil {
10944				jtv, ok := value.(string)
10945				if !ok {
10946					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
10947				}
10948				sv.AwsDevice = ptr.String(jtv)
10949			}
10950
10951		case "awsDeviceV2":
10952			if value != nil {
10953				jtv, ok := value.(string)
10954				if !ok {
10955					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
10956				}
10957				sv.AwsDeviceV2 = ptr.String(jtv)
10958			}
10959
10960		case "bandwidth":
10961			if value != nil {
10962				jtv, ok := value.(string)
10963				if !ok {
10964					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
10965				}
10966				sv.Bandwidth = ptr.String(jtv)
10967			}
10968
10969		case "connectionId":
10970			if value != nil {
10971				jtv, ok := value.(string)
10972				if !ok {
10973					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
10974				}
10975				sv.ConnectionId = ptr.String(jtv)
10976			}
10977
10978		case "connectionName":
10979			if value != nil {
10980				jtv, ok := value.(string)
10981				if !ok {
10982					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
10983				}
10984				sv.ConnectionName = ptr.String(jtv)
10985			}
10986
10987		case "connectionState":
10988			if value != nil {
10989				jtv, ok := value.(string)
10990				if !ok {
10991					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
10992				}
10993				sv.ConnectionState = types.ConnectionState(jtv)
10994			}
10995
10996		case "hasLogicalRedundancy":
10997			if value != nil {
10998				jtv, ok := value.(string)
10999				if !ok {
11000					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
11001				}
11002				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
11003			}
11004
11005		case "jumboFrameCapable":
11006			if value != nil {
11007				jtv, ok := value.(bool)
11008				if !ok {
11009					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
11010				}
11011				sv.JumboFrameCapable = ptr.Bool(jtv)
11012			}
11013
11014		case "lagId":
11015			if value != nil {
11016				jtv, ok := value.(string)
11017				if !ok {
11018					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
11019				}
11020				sv.LagId = ptr.String(jtv)
11021			}
11022
11023		case "loaIssueTime":
11024			if value != nil {
11025				jtv, ok := value.(json.Number)
11026				if !ok {
11027					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
11028				}
11029				f64, err := jtv.Float64()
11030				if err != nil {
11031					return err
11032				}
11033				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
11034			}
11035
11036		case "location":
11037			if value != nil {
11038				jtv, ok := value.(string)
11039				if !ok {
11040					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
11041				}
11042				sv.Location = ptr.String(jtv)
11043			}
11044
11045		case "ownerAccount":
11046			if value != nil {
11047				jtv, ok := value.(string)
11048				if !ok {
11049					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
11050				}
11051				sv.OwnerAccount = ptr.String(jtv)
11052			}
11053
11054		case "partnerName":
11055			if value != nil {
11056				jtv, ok := value.(string)
11057				if !ok {
11058					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
11059				}
11060				sv.PartnerName = ptr.String(jtv)
11061			}
11062
11063		case "providerName":
11064			if value != nil {
11065				jtv, ok := value.(string)
11066				if !ok {
11067					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
11068				}
11069				sv.ProviderName = ptr.String(jtv)
11070			}
11071
11072		case "region":
11073			if value != nil {
11074				jtv, ok := value.(string)
11075				if !ok {
11076					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
11077				}
11078				sv.Region = ptr.String(jtv)
11079			}
11080
11081		case "tags":
11082			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
11083				return err
11084			}
11085
11086		case "vlan":
11087			if value != nil {
11088				jtv, ok := value.(json.Number)
11089				if !ok {
11090					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
11091				}
11092				i64, err := jtv.Int64()
11093				if err != nil {
11094					return err
11095				}
11096				sv.Vlan = int32(i64)
11097			}
11098
11099		default:
11100			_, _ = key, value
11101
11102		}
11103	}
11104	*v = sv
11105	return nil
11106}
11107
11108func awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayAssociationOutput(v **CreateDirectConnectGatewayAssociationOutput, value interface{}) error {
11109	if v == nil {
11110		return fmt.Errorf("unexpected nil of type %T", v)
11111	}
11112	if value == nil {
11113		return nil
11114	}
11115
11116	shape, ok := value.(map[string]interface{})
11117	if !ok {
11118		return fmt.Errorf("unexpected JSON type %v", value)
11119	}
11120
11121	var sv *CreateDirectConnectGatewayAssociationOutput
11122	if *v == nil {
11123		sv = &CreateDirectConnectGatewayAssociationOutput{}
11124	} else {
11125		sv = *v
11126	}
11127
11128	for key, value := range shape {
11129		switch key {
11130		case "directConnectGatewayAssociation":
11131			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(&sv.DirectConnectGatewayAssociation, value); err != nil {
11132				return err
11133			}
11134
11135		default:
11136			_, _ = key, value
11137
11138		}
11139	}
11140	*v = sv
11141	return nil
11142}
11143
11144func awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayAssociationProposalOutput(v **CreateDirectConnectGatewayAssociationProposalOutput, value interface{}) error {
11145	if v == nil {
11146		return fmt.Errorf("unexpected nil of type %T", v)
11147	}
11148	if value == nil {
11149		return nil
11150	}
11151
11152	shape, ok := value.(map[string]interface{})
11153	if !ok {
11154		return fmt.Errorf("unexpected JSON type %v", value)
11155	}
11156
11157	var sv *CreateDirectConnectGatewayAssociationProposalOutput
11158	if *v == nil {
11159		sv = &CreateDirectConnectGatewayAssociationProposalOutput{}
11160	} else {
11161		sv = *v
11162	}
11163
11164	for key, value := range shape {
11165		switch key {
11166		case "directConnectGatewayAssociationProposal":
11167			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposal(&sv.DirectConnectGatewayAssociationProposal, value); err != nil {
11168				return err
11169			}
11170
11171		default:
11172			_, _ = key, value
11173
11174		}
11175	}
11176	*v = sv
11177	return nil
11178}
11179
11180func awsAwsjson11_deserializeOpDocumentCreateDirectConnectGatewayOutput(v **CreateDirectConnectGatewayOutput, value interface{}) error {
11181	if v == nil {
11182		return fmt.Errorf("unexpected nil of type %T", v)
11183	}
11184	if value == nil {
11185		return nil
11186	}
11187
11188	shape, ok := value.(map[string]interface{})
11189	if !ok {
11190		return fmt.Errorf("unexpected JSON type %v", value)
11191	}
11192
11193	var sv *CreateDirectConnectGatewayOutput
11194	if *v == nil {
11195		sv = &CreateDirectConnectGatewayOutput{}
11196	} else {
11197		sv = *v
11198	}
11199
11200	for key, value := range shape {
11201		switch key {
11202		case "directConnectGateway":
11203			if err := awsAwsjson11_deserializeDocumentDirectConnectGateway(&sv.DirectConnectGateway, value); err != nil {
11204				return err
11205			}
11206
11207		default:
11208			_, _ = key, value
11209
11210		}
11211	}
11212	*v = sv
11213	return nil
11214}
11215
11216func awsAwsjson11_deserializeOpDocumentCreateInterconnectOutput(v **CreateInterconnectOutput, value interface{}) error {
11217	if v == nil {
11218		return fmt.Errorf("unexpected nil of type %T", v)
11219	}
11220	if value == nil {
11221		return nil
11222	}
11223
11224	shape, ok := value.(map[string]interface{})
11225	if !ok {
11226		return fmt.Errorf("unexpected JSON type %v", value)
11227	}
11228
11229	var sv *CreateInterconnectOutput
11230	if *v == nil {
11231		sv = &CreateInterconnectOutput{}
11232	} else {
11233		sv = *v
11234	}
11235
11236	for key, value := range shape {
11237		switch key {
11238		case "awsDevice":
11239			if value != nil {
11240				jtv, ok := value.(string)
11241				if !ok {
11242					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
11243				}
11244				sv.AwsDevice = ptr.String(jtv)
11245			}
11246
11247		case "awsDeviceV2":
11248			if value != nil {
11249				jtv, ok := value.(string)
11250				if !ok {
11251					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
11252				}
11253				sv.AwsDeviceV2 = ptr.String(jtv)
11254			}
11255
11256		case "bandwidth":
11257			if value != nil {
11258				jtv, ok := value.(string)
11259				if !ok {
11260					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
11261				}
11262				sv.Bandwidth = ptr.String(jtv)
11263			}
11264
11265		case "hasLogicalRedundancy":
11266			if value != nil {
11267				jtv, ok := value.(string)
11268				if !ok {
11269					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
11270				}
11271				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
11272			}
11273
11274		case "interconnectId":
11275			if value != nil {
11276				jtv, ok := value.(string)
11277				if !ok {
11278					return fmt.Errorf("expected InterconnectId to be of type string, got %T instead", value)
11279				}
11280				sv.InterconnectId = ptr.String(jtv)
11281			}
11282
11283		case "interconnectName":
11284			if value != nil {
11285				jtv, ok := value.(string)
11286				if !ok {
11287					return fmt.Errorf("expected InterconnectName to be of type string, got %T instead", value)
11288				}
11289				sv.InterconnectName = ptr.String(jtv)
11290			}
11291
11292		case "interconnectState":
11293			if value != nil {
11294				jtv, ok := value.(string)
11295				if !ok {
11296					return fmt.Errorf("expected InterconnectState to be of type string, got %T instead", value)
11297				}
11298				sv.InterconnectState = types.InterconnectState(jtv)
11299			}
11300
11301		case "jumboFrameCapable":
11302			if value != nil {
11303				jtv, ok := value.(bool)
11304				if !ok {
11305					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
11306				}
11307				sv.JumboFrameCapable = ptr.Bool(jtv)
11308			}
11309
11310		case "lagId":
11311			if value != nil {
11312				jtv, ok := value.(string)
11313				if !ok {
11314					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
11315				}
11316				sv.LagId = ptr.String(jtv)
11317			}
11318
11319		case "loaIssueTime":
11320			if value != nil {
11321				jtv, ok := value.(json.Number)
11322				if !ok {
11323					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
11324				}
11325				f64, err := jtv.Float64()
11326				if err != nil {
11327					return err
11328				}
11329				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
11330			}
11331
11332		case "location":
11333			if value != nil {
11334				jtv, ok := value.(string)
11335				if !ok {
11336					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
11337				}
11338				sv.Location = ptr.String(jtv)
11339			}
11340
11341		case "providerName":
11342			if value != nil {
11343				jtv, ok := value.(string)
11344				if !ok {
11345					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
11346				}
11347				sv.ProviderName = ptr.String(jtv)
11348			}
11349
11350		case "region":
11351			if value != nil {
11352				jtv, ok := value.(string)
11353				if !ok {
11354					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
11355				}
11356				sv.Region = ptr.String(jtv)
11357			}
11358
11359		case "tags":
11360			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
11361				return err
11362			}
11363
11364		default:
11365			_, _ = key, value
11366
11367		}
11368	}
11369	*v = sv
11370	return nil
11371}
11372
11373func awsAwsjson11_deserializeOpDocumentCreateLagOutput(v **CreateLagOutput, value interface{}) error {
11374	if v == nil {
11375		return fmt.Errorf("unexpected nil of type %T", v)
11376	}
11377	if value == nil {
11378		return nil
11379	}
11380
11381	shape, ok := value.(map[string]interface{})
11382	if !ok {
11383		return fmt.Errorf("unexpected JSON type %v", value)
11384	}
11385
11386	var sv *CreateLagOutput
11387	if *v == nil {
11388		sv = &CreateLagOutput{}
11389	} else {
11390		sv = *v
11391	}
11392
11393	for key, value := range shape {
11394		switch key {
11395		case "allowsHostedConnections":
11396			if value != nil {
11397				jtv, ok := value.(bool)
11398				if !ok {
11399					return fmt.Errorf("expected BooleanFlag to be of type *bool, got %T instead", value)
11400				}
11401				sv.AllowsHostedConnections = jtv
11402			}
11403
11404		case "awsDevice":
11405			if value != nil {
11406				jtv, ok := value.(string)
11407				if !ok {
11408					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
11409				}
11410				sv.AwsDevice = ptr.String(jtv)
11411			}
11412
11413		case "awsDeviceV2":
11414			if value != nil {
11415				jtv, ok := value.(string)
11416				if !ok {
11417					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
11418				}
11419				sv.AwsDeviceV2 = ptr.String(jtv)
11420			}
11421
11422		case "connections":
11423			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
11424				return err
11425			}
11426
11427		case "connectionsBandwidth":
11428			if value != nil {
11429				jtv, ok := value.(string)
11430				if !ok {
11431					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
11432				}
11433				sv.ConnectionsBandwidth = ptr.String(jtv)
11434			}
11435
11436		case "hasLogicalRedundancy":
11437			if value != nil {
11438				jtv, ok := value.(string)
11439				if !ok {
11440					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
11441				}
11442				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
11443			}
11444
11445		case "jumboFrameCapable":
11446			if value != nil {
11447				jtv, ok := value.(bool)
11448				if !ok {
11449					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
11450				}
11451				sv.JumboFrameCapable = ptr.Bool(jtv)
11452			}
11453
11454		case "lagId":
11455			if value != nil {
11456				jtv, ok := value.(string)
11457				if !ok {
11458					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
11459				}
11460				sv.LagId = ptr.String(jtv)
11461			}
11462
11463		case "lagName":
11464			if value != nil {
11465				jtv, ok := value.(string)
11466				if !ok {
11467					return fmt.Errorf("expected LagName to be of type string, got %T instead", value)
11468				}
11469				sv.LagName = ptr.String(jtv)
11470			}
11471
11472		case "lagState":
11473			if value != nil {
11474				jtv, ok := value.(string)
11475				if !ok {
11476					return fmt.Errorf("expected LagState to be of type string, got %T instead", value)
11477				}
11478				sv.LagState = types.LagState(jtv)
11479			}
11480
11481		case "location":
11482			if value != nil {
11483				jtv, ok := value.(string)
11484				if !ok {
11485					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
11486				}
11487				sv.Location = ptr.String(jtv)
11488			}
11489
11490		case "minimumLinks":
11491			if value != nil {
11492				jtv, ok := value.(json.Number)
11493				if !ok {
11494					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
11495				}
11496				i64, err := jtv.Int64()
11497				if err != nil {
11498					return err
11499				}
11500				sv.MinimumLinks = int32(i64)
11501			}
11502
11503		case "numberOfConnections":
11504			if value != nil {
11505				jtv, ok := value.(json.Number)
11506				if !ok {
11507					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
11508				}
11509				i64, err := jtv.Int64()
11510				if err != nil {
11511					return err
11512				}
11513				sv.NumberOfConnections = int32(i64)
11514			}
11515
11516		case "ownerAccount":
11517			if value != nil {
11518				jtv, ok := value.(string)
11519				if !ok {
11520					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
11521				}
11522				sv.OwnerAccount = ptr.String(jtv)
11523			}
11524
11525		case "providerName":
11526			if value != nil {
11527				jtv, ok := value.(string)
11528				if !ok {
11529					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
11530				}
11531				sv.ProviderName = ptr.String(jtv)
11532			}
11533
11534		case "region":
11535			if value != nil {
11536				jtv, ok := value.(string)
11537				if !ok {
11538					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
11539				}
11540				sv.Region = ptr.String(jtv)
11541			}
11542
11543		case "tags":
11544			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
11545				return err
11546			}
11547
11548		default:
11549			_, _ = key, value
11550
11551		}
11552	}
11553	*v = sv
11554	return nil
11555}
11556
11557func awsAwsjson11_deserializeOpDocumentCreatePrivateVirtualInterfaceOutput(v **CreatePrivateVirtualInterfaceOutput, value interface{}) error {
11558	if v == nil {
11559		return fmt.Errorf("unexpected nil of type %T", v)
11560	}
11561	if value == nil {
11562		return nil
11563	}
11564
11565	shape, ok := value.(map[string]interface{})
11566	if !ok {
11567		return fmt.Errorf("unexpected JSON type %v", value)
11568	}
11569
11570	var sv *CreatePrivateVirtualInterfaceOutput
11571	if *v == nil {
11572		sv = &CreatePrivateVirtualInterfaceOutput{}
11573	} else {
11574		sv = *v
11575	}
11576
11577	for key, value := range shape {
11578		switch key {
11579		case "addressFamily":
11580			if value != nil {
11581				jtv, ok := value.(string)
11582				if !ok {
11583					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
11584				}
11585				sv.AddressFamily = types.AddressFamily(jtv)
11586			}
11587
11588		case "amazonAddress":
11589			if value != nil {
11590				jtv, ok := value.(string)
11591				if !ok {
11592					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
11593				}
11594				sv.AmazonAddress = ptr.String(jtv)
11595			}
11596
11597		case "amazonSideAsn":
11598			if value != nil {
11599				jtv, ok := value.(json.Number)
11600				if !ok {
11601					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
11602				}
11603				i64, err := jtv.Int64()
11604				if err != nil {
11605					return err
11606				}
11607				sv.AmazonSideAsn = ptr.Int64(i64)
11608			}
11609
11610		case "asn":
11611			if value != nil {
11612				jtv, ok := value.(json.Number)
11613				if !ok {
11614					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
11615				}
11616				i64, err := jtv.Int64()
11617				if err != nil {
11618					return err
11619				}
11620				sv.Asn = int32(i64)
11621			}
11622
11623		case "authKey":
11624			if value != nil {
11625				jtv, ok := value.(string)
11626				if !ok {
11627					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
11628				}
11629				sv.AuthKey = ptr.String(jtv)
11630			}
11631
11632		case "awsDeviceV2":
11633			if value != nil {
11634				jtv, ok := value.(string)
11635				if !ok {
11636					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
11637				}
11638				sv.AwsDeviceV2 = ptr.String(jtv)
11639			}
11640
11641		case "bgpPeers":
11642			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
11643				return err
11644			}
11645
11646		case "connectionId":
11647			if value != nil {
11648				jtv, ok := value.(string)
11649				if !ok {
11650					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
11651				}
11652				sv.ConnectionId = ptr.String(jtv)
11653			}
11654
11655		case "customerAddress":
11656			if value != nil {
11657				jtv, ok := value.(string)
11658				if !ok {
11659					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
11660				}
11661				sv.CustomerAddress = ptr.String(jtv)
11662			}
11663
11664		case "customerRouterConfig":
11665			if value != nil {
11666				jtv, ok := value.(string)
11667				if !ok {
11668					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
11669				}
11670				sv.CustomerRouterConfig = ptr.String(jtv)
11671			}
11672
11673		case "directConnectGatewayId":
11674			if value != nil {
11675				jtv, ok := value.(string)
11676				if !ok {
11677					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
11678				}
11679				sv.DirectConnectGatewayId = ptr.String(jtv)
11680			}
11681
11682		case "jumboFrameCapable":
11683			if value != nil {
11684				jtv, ok := value.(bool)
11685				if !ok {
11686					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
11687				}
11688				sv.JumboFrameCapable = ptr.Bool(jtv)
11689			}
11690
11691		case "location":
11692			if value != nil {
11693				jtv, ok := value.(string)
11694				if !ok {
11695					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
11696				}
11697				sv.Location = ptr.String(jtv)
11698			}
11699
11700		case "mtu":
11701			if value != nil {
11702				jtv, ok := value.(json.Number)
11703				if !ok {
11704					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
11705				}
11706				i64, err := jtv.Int64()
11707				if err != nil {
11708					return err
11709				}
11710				sv.Mtu = ptr.Int32(int32(i64))
11711			}
11712
11713		case "ownerAccount":
11714			if value != nil {
11715				jtv, ok := value.(string)
11716				if !ok {
11717					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
11718				}
11719				sv.OwnerAccount = ptr.String(jtv)
11720			}
11721
11722		case "region":
11723			if value != nil {
11724				jtv, ok := value.(string)
11725				if !ok {
11726					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
11727				}
11728				sv.Region = ptr.String(jtv)
11729			}
11730
11731		case "routeFilterPrefixes":
11732			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
11733				return err
11734			}
11735
11736		case "tags":
11737			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
11738				return err
11739			}
11740
11741		case "virtualGatewayId":
11742			if value != nil {
11743				jtv, ok := value.(string)
11744				if !ok {
11745					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
11746				}
11747				sv.VirtualGatewayId = ptr.String(jtv)
11748			}
11749
11750		case "virtualInterfaceId":
11751			if value != nil {
11752				jtv, ok := value.(string)
11753				if !ok {
11754					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
11755				}
11756				sv.VirtualInterfaceId = ptr.String(jtv)
11757			}
11758
11759		case "virtualInterfaceName":
11760			if value != nil {
11761				jtv, ok := value.(string)
11762				if !ok {
11763					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
11764				}
11765				sv.VirtualInterfaceName = ptr.String(jtv)
11766			}
11767
11768		case "virtualInterfaceState":
11769			if value != nil {
11770				jtv, ok := value.(string)
11771				if !ok {
11772					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
11773				}
11774				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
11775			}
11776
11777		case "virtualInterfaceType":
11778			if value != nil {
11779				jtv, ok := value.(string)
11780				if !ok {
11781					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
11782				}
11783				sv.VirtualInterfaceType = ptr.String(jtv)
11784			}
11785
11786		case "vlan":
11787			if value != nil {
11788				jtv, ok := value.(json.Number)
11789				if !ok {
11790					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
11791				}
11792				i64, err := jtv.Int64()
11793				if err != nil {
11794					return err
11795				}
11796				sv.Vlan = int32(i64)
11797			}
11798
11799		default:
11800			_, _ = key, value
11801
11802		}
11803	}
11804	*v = sv
11805	return nil
11806}
11807
11808func awsAwsjson11_deserializeOpDocumentCreatePublicVirtualInterfaceOutput(v **CreatePublicVirtualInterfaceOutput, value interface{}) error {
11809	if v == nil {
11810		return fmt.Errorf("unexpected nil of type %T", v)
11811	}
11812	if value == nil {
11813		return nil
11814	}
11815
11816	shape, ok := value.(map[string]interface{})
11817	if !ok {
11818		return fmt.Errorf("unexpected JSON type %v", value)
11819	}
11820
11821	var sv *CreatePublicVirtualInterfaceOutput
11822	if *v == nil {
11823		sv = &CreatePublicVirtualInterfaceOutput{}
11824	} else {
11825		sv = *v
11826	}
11827
11828	for key, value := range shape {
11829		switch key {
11830		case "addressFamily":
11831			if value != nil {
11832				jtv, ok := value.(string)
11833				if !ok {
11834					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
11835				}
11836				sv.AddressFamily = types.AddressFamily(jtv)
11837			}
11838
11839		case "amazonAddress":
11840			if value != nil {
11841				jtv, ok := value.(string)
11842				if !ok {
11843					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
11844				}
11845				sv.AmazonAddress = ptr.String(jtv)
11846			}
11847
11848		case "amazonSideAsn":
11849			if value != nil {
11850				jtv, ok := value.(json.Number)
11851				if !ok {
11852					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
11853				}
11854				i64, err := jtv.Int64()
11855				if err != nil {
11856					return err
11857				}
11858				sv.AmazonSideAsn = ptr.Int64(i64)
11859			}
11860
11861		case "asn":
11862			if value != nil {
11863				jtv, ok := value.(json.Number)
11864				if !ok {
11865					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
11866				}
11867				i64, err := jtv.Int64()
11868				if err != nil {
11869					return err
11870				}
11871				sv.Asn = int32(i64)
11872			}
11873
11874		case "authKey":
11875			if value != nil {
11876				jtv, ok := value.(string)
11877				if !ok {
11878					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
11879				}
11880				sv.AuthKey = ptr.String(jtv)
11881			}
11882
11883		case "awsDeviceV2":
11884			if value != nil {
11885				jtv, ok := value.(string)
11886				if !ok {
11887					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
11888				}
11889				sv.AwsDeviceV2 = ptr.String(jtv)
11890			}
11891
11892		case "bgpPeers":
11893			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
11894				return err
11895			}
11896
11897		case "connectionId":
11898			if value != nil {
11899				jtv, ok := value.(string)
11900				if !ok {
11901					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
11902				}
11903				sv.ConnectionId = ptr.String(jtv)
11904			}
11905
11906		case "customerAddress":
11907			if value != nil {
11908				jtv, ok := value.(string)
11909				if !ok {
11910					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
11911				}
11912				sv.CustomerAddress = ptr.String(jtv)
11913			}
11914
11915		case "customerRouterConfig":
11916			if value != nil {
11917				jtv, ok := value.(string)
11918				if !ok {
11919					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
11920				}
11921				sv.CustomerRouterConfig = ptr.String(jtv)
11922			}
11923
11924		case "directConnectGatewayId":
11925			if value != nil {
11926				jtv, ok := value.(string)
11927				if !ok {
11928					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
11929				}
11930				sv.DirectConnectGatewayId = ptr.String(jtv)
11931			}
11932
11933		case "jumboFrameCapable":
11934			if value != nil {
11935				jtv, ok := value.(bool)
11936				if !ok {
11937					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
11938				}
11939				sv.JumboFrameCapable = ptr.Bool(jtv)
11940			}
11941
11942		case "location":
11943			if value != nil {
11944				jtv, ok := value.(string)
11945				if !ok {
11946					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
11947				}
11948				sv.Location = ptr.String(jtv)
11949			}
11950
11951		case "mtu":
11952			if value != nil {
11953				jtv, ok := value.(json.Number)
11954				if !ok {
11955					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
11956				}
11957				i64, err := jtv.Int64()
11958				if err != nil {
11959					return err
11960				}
11961				sv.Mtu = ptr.Int32(int32(i64))
11962			}
11963
11964		case "ownerAccount":
11965			if value != nil {
11966				jtv, ok := value.(string)
11967				if !ok {
11968					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
11969				}
11970				sv.OwnerAccount = ptr.String(jtv)
11971			}
11972
11973		case "region":
11974			if value != nil {
11975				jtv, ok := value.(string)
11976				if !ok {
11977					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
11978				}
11979				sv.Region = ptr.String(jtv)
11980			}
11981
11982		case "routeFilterPrefixes":
11983			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
11984				return err
11985			}
11986
11987		case "tags":
11988			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
11989				return err
11990			}
11991
11992		case "virtualGatewayId":
11993			if value != nil {
11994				jtv, ok := value.(string)
11995				if !ok {
11996					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
11997				}
11998				sv.VirtualGatewayId = ptr.String(jtv)
11999			}
12000
12001		case "virtualInterfaceId":
12002			if value != nil {
12003				jtv, ok := value.(string)
12004				if !ok {
12005					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
12006				}
12007				sv.VirtualInterfaceId = ptr.String(jtv)
12008			}
12009
12010		case "virtualInterfaceName":
12011			if value != nil {
12012				jtv, ok := value.(string)
12013				if !ok {
12014					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
12015				}
12016				sv.VirtualInterfaceName = ptr.String(jtv)
12017			}
12018
12019		case "virtualInterfaceState":
12020			if value != nil {
12021				jtv, ok := value.(string)
12022				if !ok {
12023					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
12024				}
12025				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
12026			}
12027
12028		case "virtualInterfaceType":
12029			if value != nil {
12030				jtv, ok := value.(string)
12031				if !ok {
12032					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
12033				}
12034				sv.VirtualInterfaceType = ptr.String(jtv)
12035			}
12036
12037		case "vlan":
12038			if value != nil {
12039				jtv, ok := value.(json.Number)
12040				if !ok {
12041					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
12042				}
12043				i64, err := jtv.Int64()
12044				if err != nil {
12045					return err
12046				}
12047				sv.Vlan = int32(i64)
12048			}
12049
12050		default:
12051			_, _ = key, value
12052
12053		}
12054	}
12055	*v = sv
12056	return nil
12057}
12058
12059func awsAwsjson11_deserializeOpDocumentCreateTransitVirtualInterfaceOutput(v **CreateTransitVirtualInterfaceOutput, value interface{}) error {
12060	if v == nil {
12061		return fmt.Errorf("unexpected nil of type %T", v)
12062	}
12063	if value == nil {
12064		return nil
12065	}
12066
12067	shape, ok := value.(map[string]interface{})
12068	if !ok {
12069		return fmt.Errorf("unexpected JSON type %v", value)
12070	}
12071
12072	var sv *CreateTransitVirtualInterfaceOutput
12073	if *v == nil {
12074		sv = &CreateTransitVirtualInterfaceOutput{}
12075	} else {
12076		sv = *v
12077	}
12078
12079	for key, value := range shape {
12080		switch key {
12081		case "virtualInterface":
12082			if err := awsAwsjson11_deserializeDocumentVirtualInterface(&sv.VirtualInterface, value); err != nil {
12083				return err
12084			}
12085
12086		default:
12087			_, _ = key, value
12088
12089		}
12090	}
12091	*v = sv
12092	return nil
12093}
12094
12095func awsAwsjson11_deserializeOpDocumentDeleteBGPPeerOutput(v **DeleteBGPPeerOutput, value interface{}) error {
12096	if v == nil {
12097		return fmt.Errorf("unexpected nil of type %T", v)
12098	}
12099	if value == nil {
12100		return nil
12101	}
12102
12103	shape, ok := value.(map[string]interface{})
12104	if !ok {
12105		return fmt.Errorf("unexpected JSON type %v", value)
12106	}
12107
12108	var sv *DeleteBGPPeerOutput
12109	if *v == nil {
12110		sv = &DeleteBGPPeerOutput{}
12111	} else {
12112		sv = *v
12113	}
12114
12115	for key, value := range shape {
12116		switch key {
12117		case "virtualInterface":
12118			if err := awsAwsjson11_deserializeDocumentVirtualInterface(&sv.VirtualInterface, value); err != nil {
12119				return err
12120			}
12121
12122		default:
12123			_, _ = key, value
12124
12125		}
12126	}
12127	*v = sv
12128	return nil
12129}
12130
12131func awsAwsjson11_deserializeOpDocumentDeleteConnectionOutput(v **DeleteConnectionOutput, value interface{}) error {
12132	if v == nil {
12133		return fmt.Errorf("unexpected nil of type %T", v)
12134	}
12135	if value == nil {
12136		return nil
12137	}
12138
12139	shape, ok := value.(map[string]interface{})
12140	if !ok {
12141		return fmt.Errorf("unexpected JSON type %v", value)
12142	}
12143
12144	var sv *DeleteConnectionOutput
12145	if *v == nil {
12146		sv = &DeleteConnectionOutput{}
12147	} else {
12148		sv = *v
12149	}
12150
12151	for key, value := range shape {
12152		switch key {
12153		case "awsDevice":
12154			if value != nil {
12155				jtv, ok := value.(string)
12156				if !ok {
12157					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
12158				}
12159				sv.AwsDevice = ptr.String(jtv)
12160			}
12161
12162		case "awsDeviceV2":
12163			if value != nil {
12164				jtv, ok := value.(string)
12165				if !ok {
12166					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
12167				}
12168				sv.AwsDeviceV2 = ptr.String(jtv)
12169			}
12170
12171		case "bandwidth":
12172			if value != nil {
12173				jtv, ok := value.(string)
12174				if !ok {
12175					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
12176				}
12177				sv.Bandwidth = ptr.String(jtv)
12178			}
12179
12180		case "connectionId":
12181			if value != nil {
12182				jtv, ok := value.(string)
12183				if !ok {
12184					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
12185				}
12186				sv.ConnectionId = ptr.String(jtv)
12187			}
12188
12189		case "connectionName":
12190			if value != nil {
12191				jtv, ok := value.(string)
12192				if !ok {
12193					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
12194				}
12195				sv.ConnectionName = ptr.String(jtv)
12196			}
12197
12198		case "connectionState":
12199			if value != nil {
12200				jtv, ok := value.(string)
12201				if !ok {
12202					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
12203				}
12204				sv.ConnectionState = types.ConnectionState(jtv)
12205			}
12206
12207		case "hasLogicalRedundancy":
12208			if value != nil {
12209				jtv, ok := value.(string)
12210				if !ok {
12211					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
12212				}
12213				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
12214			}
12215
12216		case "jumboFrameCapable":
12217			if value != nil {
12218				jtv, ok := value.(bool)
12219				if !ok {
12220					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
12221				}
12222				sv.JumboFrameCapable = ptr.Bool(jtv)
12223			}
12224
12225		case "lagId":
12226			if value != nil {
12227				jtv, ok := value.(string)
12228				if !ok {
12229					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
12230				}
12231				sv.LagId = ptr.String(jtv)
12232			}
12233
12234		case "loaIssueTime":
12235			if value != nil {
12236				jtv, ok := value.(json.Number)
12237				if !ok {
12238					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
12239				}
12240				f64, err := jtv.Float64()
12241				if err != nil {
12242					return err
12243				}
12244				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
12245			}
12246
12247		case "location":
12248			if value != nil {
12249				jtv, ok := value.(string)
12250				if !ok {
12251					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
12252				}
12253				sv.Location = ptr.String(jtv)
12254			}
12255
12256		case "ownerAccount":
12257			if value != nil {
12258				jtv, ok := value.(string)
12259				if !ok {
12260					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
12261				}
12262				sv.OwnerAccount = ptr.String(jtv)
12263			}
12264
12265		case "partnerName":
12266			if value != nil {
12267				jtv, ok := value.(string)
12268				if !ok {
12269					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
12270				}
12271				sv.PartnerName = ptr.String(jtv)
12272			}
12273
12274		case "providerName":
12275			if value != nil {
12276				jtv, ok := value.(string)
12277				if !ok {
12278					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
12279				}
12280				sv.ProviderName = ptr.String(jtv)
12281			}
12282
12283		case "region":
12284			if value != nil {
12285				jtv, ok := value.(string)
12286				if !ok {
12287					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
12288				}
12289				sv.Region = ptr.String(jtv)
12290			}
12291
12292		case "tags":
12293			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
12294				return err
12295			}
12296
12297		case "vlan":
12298			if value != nil {
12299				jtv, ok := value.(json.Number)
12300				if !ok {
12301					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
12302				}
12303				i64, err := jtv.Int64()
12304				if err != nil {
12305					return err
12306				}
12307				sv.Vlan = int32(i64)
12308			}
12309
12310		default:
12311			_, _ = key, value
12312
12313		}
12314	}
12315	*v = sv
12316	return nil
12317}
12318
12319func awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayAssociationOutput(v **DeleteDirectConnectGatewayAssociationOutput, value interface{}) error {
12320	if v == nil {
12321		return fmt.Errorf("unexpected nil of type %T", v)
12322	}
12323	if value == nil {
12324		return nil
12325	}
12326
12327	shape, ok := value.(map[string]interface{})
12328	if !ok {
12329		return fmt.Errorf("unexpected JSON type %v", value)
12330	}
12331
12332	var sv *DeleteDirectConnectGatewayAssociationOutput
12333	if *v == nil {
12334		sv = &DeleteDirectConnectGatewayAssociationOutput{}
12335	} else {
12336		sv = *v
12337	}
12338
12339	for key, value := range shape {
12340		switch key {
12341		case "directConnectGatewayAssociation":
12342			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(&sv.DirectConnectGatewayAssociation, value); err != nil {
12343				return err
12344			}
12345
12346		default:
12347			_, _ = key, value
12348
12349		}
12350	}
12351	*v = sv
12352	return nil
12353}
12354
12355func awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayAssociationProposalOutput(v **DeleteDirectConnectGatewayAssociationProposalOutput, value interface{}) error {
12356	if v == nil {
12357		return fmt.Errorf("unexpected nil of type %T", v)
12358	}
12359	if value == nil {
12360		return nil
12361	}
12362
12363	shape, ok := value.(map[string]interface{})
12364	if !ok {
12365		return fmt.Errorf("unexpected JSON type %v", value)
12366	}
12367
12368	var sv *DeleteDirectConnectGatewayAssociationProposalOutput
12369	if *v == nil {
12370		sv = &DeleteDirectConnectGatewayAssociationProposalOutput{}
12371	} else {
12372		sv = *v
12373	}
12374
12375	for key, value := range shape {
12376		switch key {
12377		case "directConnectGatewayAssociationProposal":
12378			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposal(&sv.DirectConnectGatewayAssociationProposal, value); err != nil {
12379				return err
12380			}
12381
12382		default:
12383			_, _ = key, value
12384
12385		}
12386	}
12387	*v = sv
12388	return nil
12389}
12390
12391func awsAwsjson11_deserializeOpDocumentDeleteDirectConnectGatewayOutput(v **DeleteDirectConnectGatewayOutput, value interface{}) error {
12392	if v == nil {
12393		return fmt.Errorf("unexpected nil of type %T", v)
12394	}
12395	if value == nil {
12396		return nil
12397	}
12398
12399	shape, ok := value.(map[string]interface{})
12400	if !ok {
12401		return fmt.Errorf("unexpected JSON type %v", value)
12402	}
12403
12404	var sv *DeleteDirectConnectGatewayOutput
12405	if *v == nil {
12406		sv = &DeleteDirectConnectGatewayOutput{}
12407	} else {
12408		sv = *v
12409	}
12410
12411	for key, value := range shape {
12412		switch key {
12413		case "directConnectGateway":
12414			if err := awsAwsjson11_deserializeDocumentDirectConnectGateway(&sv.DirectConnectGateway, value); err != nil {
12415				return err
12416			}
12417
12418		default:
12419			_, _ = key, value
12420
12421		}
12422	}
12423	*v = sv
12424	return nil
12425}
12426
12427func awsAwsjson11_deserializeOpDocumentDeleteInterconnectOutput(v **DeleteInterconnectOutput, value interface{}) error {
12428	if v == nil {
12429		return fmt.Errorf("unexpected nil of type %T", v)
12430	}
12431	if value == nil {
12432		return nil
12433	}
12434
12435	shape, ok := value.(map[string]interface{})
12436	if !ok {
12437		return fmt.Errorf("unexpected JSON type %v", value)
12438	}
12439
12440	var sv *DeleteInterconnectOutput
12441	if *v == nil {
12442		sv = &DeleteInterconnectOutput{}
12443	} else {
12444		sv = *v
12445	}
12446
12447	for key, value := range shape {
12448		switch key {
12449		case "interconnectState":
12450			if value != nil {
12451				jtv, ok := value.(string)
12452				if !ok {
12453					return fmt.Errorf("expected InterconnectState to be of type string, got %T instead", value)
12454				}
12455				sv.InterconnectState = types.InterconnectState(jtv)
12456			}
12457
12458		default:
12459			_, _ = key, value
12460
12461		}
12462	}
12463	*v = sv
12464	return nil
12465}
12466
12467func awsAwsjson11_deserializeOpDocumentDeleteLagOutput(v **DeleteLagOutput, value interface{}) error {
12468	if v == nil {
12469		return fmt.Errorf("unexpected nil of type %T", v)
12470	}
12471	if value == nil {
12472		return nil
12473	}
12474
12475	shape, ok := value.(map[string]interface{})
12476	if !ok {
12477		return fmt.Errorf("unexpected JSON type %v", value)
12478	}
12479
12480	var sv *DeleteLagOutput
12481	if *v == nil {
12482		sv = &DeleteLagOutput{}
12483	} else {
12484		sv = *v
12485	}
12486
12487	for key, value := range shape {
12488		switch key {
12489		case "allowsHostedConnections":
12490			if value != nil {
12491				jtv, ok := value.(bool)
12492				if !ok {
12493					return fmt.Errorf("expected BooleanFlag to be of type *bool, got %T instead", value)
12494				}
12495				sv.AllowsHostedConnections = jtv
12496			}
12497
12498		case "awsDevice":
12499			if value != nil {
12500				jtv, ok := value.(string)
12501				if !ok {
12502					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
12503				}
12504				sv.AwsDevice = ptr.String(jtv)
12505			}
12506
12507		case "awsDeviceV2":
12508			if value != nil {
12509				jtv, ok := value.(string)
12510				if !ok {
12511					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
12512				}
12513				sv.AwsDeviceV2 = ptr.String(jtv)
12514			}
12515
12516		case "connections":
12517			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
12518				return err
12519			}
12520
12521		case "connectionsBandwidth":
12522			if value != nil {
12523				jtv, ok := value.(string)
12524				if !ok {
12525					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
12526				}
12527				sv.ConnectionsBandwidth = ptr.String(jtv)
12528			}
12529
12530		case "hasLogicalRedundancy":
12531			if value != nil {
12532				jtv, ok := value.(string)
12533				if !ok {
12534					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
12535				}
12536				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
12537			}
12538
12539		case "jumboFrameCapable":
12540			if value != nil {
12541				jtv, ok := value.(bool)
12542				if !ok {
12543					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
12544				}
12545				sv.JumboFrameCapable = ptr.Bool(jtv)
12546			}
12547
12548		case "lagId":
12549			if value != nil {
12550				jtv, ok := value.(string)
12551				if !ok {
12552					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
12553				}
12554				sv.LagId = ptr.String(jtv)
12555			}
12556
12557		case "lagName":
12558			if value != nil {
12559				jtv, ok := value.(string)
12560				if !ok {
12561					return fmt.Errorf("expected LagName to be of type string, got %T instead", value)
12562				}
12563				sv.LagName = ptr.String(jtv)
12564			}
12565
12566		case "lagState":
12567			if value != nil {
12568				jtv, ok := value.(string)
12569				if !ok {
12570					return fmt.Errorf("expected LagState to be of type string, got %T instead", value)
12571				}
12572				sv.LagState = types.LagState(jtv)
12573			}
12574
12575		case "location":
12576			if value != nil {
12577				jtv, ok := value.(string)
12578				if !ok {
12579					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
12580				}
12581				sv.Location = ptr.String(jtv)
12582			}
12583
12584		case "minimumLinks":
12585			if value != nil {
12586				jtv, ok := value.(json.Number)
12587				if !ok {
12588					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
12589				}
12590				i64, err := jtv.Int64()
12591				if err != nil {
12592					return err
12593				}
12594				sv.MinimumLinks = int32(i64)
12595			}
12596
12597		case "numberOfConnections":
12598			if value != nil {
12599				jtv, ok := value.(json.Number)
12600				if !ok {
12601					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
12602				}
12603				i64, err := jtv.Int64()
12604				if err != nil {
12605					return err
12606				}
12607				sv.NumberOfConnections = int32(i64)
12608			}
12609
12610		case "ownerAccount":
12611			if value != nil {
12612				jtv, ok := value.(string)
12613				if !ok {
12614					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
12615				}
12616				sv.OwnerAccount = ptr.String(jtv)
12617			}
12618
12619		case "providerName":
12620			if value != nil {
12621				jtv, ok := value.(string)
12622				if !ok {
12623					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
12624				}
12625				sv.ProviderName = ptr.String(jtv)
12626			}
12627
12628		case "region":
12629			if value != nil {
12630				jtv, ok := value.(string)
12631				if !ok {
12632					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
12633				}
12634				sv.Region = ptr.String(jtv)
12635			}
12636
12637		case "tags":
12638			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
12639				return err
12640			}
12641
12642		default:
12643			_, _ = key, value
12644
12645		}
12646	}
12647	*v = sv
12648	return nil
12649}
12650
12651func awsAwsjson11_deserializeOpDocumentDeleteVirtualInterfaceOutput(v **DeleteVirtualInterfaceOutput, value interface{}) error {
12652	if v == nil {
12653		return fmt.Errorf("unexpected nil of type %T", v)
12654	}
12655	if value == nil {
12656		return nil
12657	}
12658
12659	shape, ok := value.(map[string]interface{})
12660	if !ok {
12661		return fmt.Errorf("unexpected JSON type %v", value)
12662	}
12663
12664	var sv *DeleteVirtualInterfaceOutput
12665	if *v == nil {
12666		sv = &DeleteVirtualInterfaceOutput{}
12667	} else {
12668		sv = *v
12669	}
12670
12671	for key, value := range shape {
12672		switch key {
12673		case "virtualInterfaceState":
12674			if value != nil {
12675				jtv, ok := value.(string)
12676				if !ok {
12677					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
12678				}
12679				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
12680			}
12681
12682		default:
12683			_, _ = key, value
12684
12685		}
12686	}
12687	*v = sv
12688	return nil
12689}
12690
12691func awsAwsjson11_deserializeOpDocumentDescribeConnectionLoaOutput(v **DescribeConnectionLoaOutput, value interface{}) error {
12692	if v == nil {
12693		return fmt.Errorf("unexpected nil of type %T", v)
12694	}
12695	if value == nil {
12696		return nil
12697	}
12698
12699	shape, ok := value.(map[string]interface{})
12700	if !ok {
12701		return fmt.Errorf("unexpected JSON type %v", value)
12702	}
12703
12704	var sv *DescribeConnectionLoaOutput
12705	if *v == nil {
12706		sv = &DescribeConnectionLoaOutput{}
12707	} else {
12708		sv = *v
12709	}
12710
12711	for key, value := range shape {
12712		switch key {
12713		case "loa":
12714			if err := awsAwsjson11_deserializeDocumentLoa(&sv.Loa, value); err != nil {
12715				return err
12716			}
12717
12718		default:
12719			_, _ = key, value
12720
12721		}
12722	}
12723	*v = sv
12724	return nil
12725}
12726
12727func awsAwsjson11_deserializeOpDocumentDescribeConnectionsOnInterconnectOutput(v **DescribeConnectionsOnInterconnectOutput, value interface{}) error {
12728	if v == nil {
12729		return fmt.Errorf("unexpected nil of type %T", v)
12730	}
12731	if value == nil {
12732		return nil
12733	}
12734
12735	shape, ok := value.(map[string]interface{})
12736	if !ok {
12737		return fmt.Errorf("unexpected JSON type %v", value)
12738	}
12739
12740	var sv *DescribeConnectionsOnInterconnectOutput
12741	if *v == nil {
12742		sv = &DescribeConnectionsOnInterconnectOutput{}
12743	} else {
12744		sv = *v
12745	}
12746
12747	for key, value := range shape {
12748		switch key {
12749		case "connections":
12750			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
12751				return err
12752			}
12753
12754		default:
12755			_, _ = key, value
12756
12757		}
12758	}
12759	*v = sv
12760	return nil
12761}
12762
12763func awsAwsjson11_deserializeOpDocumentDescribeConnectionsOutput(v **DescribeConnectionsOutput, value interface{}) error {
12764	if v == nil {
12765		return fmt.Errorf("unexpected nil of type %T", v)
12766	}
12767	if value == nil {
12768		return nil
12769	}
12770
12771	shape, ok := value.(map[string]interface{})
12772	if !ok {
12773		return fmt.Errorf("unexpected JSON type %v", value)
12774	}
12775
12776	var sv *DescribeConnectionsOutput
12777	if *v == nil {
12778		sv = &DescribeConnectionsOutput{}
12779	} else {
12780		sv = *v
12781	}
12782
12783	for key, value := range shape {
12784		switch key {
12785		case "connections":
12786			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
12787				return err
12788			}
12789
12790		default:
12791			_, _ = key, value
12792
12793		}
12794	}
12795	*v = sv
12796	return nil
12797}
12798
12799func awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAssociationProposalsOutput(v **DescribeDirectConnectGatewayAssociationProposalsOutput, value interface{}) error {
12800	if v == nil {
12801		return fmt.Errorf("unexpected nil of type %T", v)
12802	}
12803	if value == nil {
12804		return nil
12805	}
12806
12807	shape, ok := value.(map[string]interface{})
12808	if !ok {
12809		return fmt.Errorf("unexpected JSON type %v", value)
12810	}
12811
12812	var sv *DescribeDirectConnectGatewayAssociationProposalsOutput
12813	if *v == nil {
12814		sv = &DescribeDirectConnectGatewayAssociationProposalsOutput{}
12815	} else {
12816		sv = *v
12817	}
12818
12819	for key, value := range shape {
12820		switch key {
12821		case "directConnectGatewayAssociationProposals":
12822			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationProposalList(&sv.DirectConnectGatewayAssociationProposals, value); err != nil {
12823				return err
12824			}
12825
12826		case "nextToken":
12827			if value != nil {
12828				jtv, ok := value.(string)
12829				if !ok {
12830					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
12831				}
12832				sv.NextToken = ptr.String(jtv)
12833			}
12834
12835		default:
12836			_, _ = key, value
12837
12838		}
12839	}
12840	*v = sv
12841	return nil
12842}
12843
12844func awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAssociationsOutput(v **DescribeDirectConnectGatewayAssociationsOutput, value interface{}) error {
12845	if v == nil {
12846		return fmt.Errorf("unexpected nil of type %T", v)
12847	}
12848	if value == nil {
12849		return nil
12850	}
12851
12852	shape, ok := value.(map[string]interface{})
12853	if !ok {
12854		return fmt.Errorf("unexpected JSON type %v", value)
12855	}
12856
12857	var sv *DescribeDirectConnectGatewayAssociationsOutput
12858	if *v == nil {
12859		sv = &DescribeDirectConnectGatewayAssociationsOutput{}
12860	} else {
12861		sv = *v
12862	}
12863
12864	for key, value := range shape {
12865		switch key {
12866		case "directConnectGatewayAssociations":
12867			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociationList(&sv.DirectConnectGatewayAssociations, value); err != nil {
12868				return err
12869			}
12870
12871		case "nextToken":
12872			if value != nil {
12873				jtv, ok := value.(string)
12874				if !ok {
12875					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
12876				}
12877				sv.NextToken = ptr.String(jtv)
12878			}
12879
12880		default:
12881			_, _ = key, value
12882
12883		}
12884	}
12885	*v = sv
12886	return nil
12887}
12888
12889func awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewayAttachmentsOutput(v **DescribeDirectConnectGatewayAttachmentsOutput, value interface{}) error {
12890	if v == nil {
12891		return fmt.Errorf("unexpected nil of type %T", v)
12892	}
12893	if value == nil {
12894		return nil
12895	}
12896
12897	shape, ok := value.(map[string]interface{})
12898	if !ok {
12899		return fmt.Errorf("unexpected JSON type %v", value)
12900	}
12901
12902	var sv *DescribeDirectConnectGatewayAttachmentsOutput
12903	if *v == nil {
12904		sv = &DescribeDirectConnectGatewayAttachmentsOutput{}
12905	} else {
12906		sv = *v
12907	}
12908
12909	for key, value := range shape {
12910		switch key {
12911		case "directConnectGatewayAttachments":
12912			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAttachmentList(&sv.DirectConnectGatewayAttachments, value); err != nil {
12913				return err
12914			}
12915
12916		case "nextToken":
12917			if value != nil {
12918				jtv, ok := value.(string)
12919				if !ok {
12920					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
12921				}
12922				sv.NextToken = ptr.String(jtv)
12923			}
12924
12925		default:
12926			_, _ = key, value
12927
12928		}
12929	}
12930	*v = sv
12931	return nil
12932}
12933
12934func awsAwsjson11_deserializeOpDocumentDescribeDirectConnectGatewaysOutput(v **DescribeDirectConnectGatewaysOutput, value interface{}) error {
12935	if v == nil {
12936		return fmt.Errorf("unexpected nil of type %T", v)
12937	}
12938	if value == nil {
12939		return nil
12940	}
12941
12942	shape, ok := value.(map[string]interface{})
12943	if !ok {
12944		return fmt.Errorf("unexpected JSON type %v", value)
12945	}
12946
12947	var sv *DescribeDirectConnectGatewaysOutput
12948	if *v == nil {
12949		sv = &DescribeDirectConnectGatewaysOutput{}
12950	} else {
12951		sv = *v
12952	}
12953
12954	for key, value := range shape {
12955		switch key {
12956		case "directConnectGateways":
12957			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayList(&sv.DirectConnectGateways, value); err != nil {
12958				return err
12959			}
12960
12961		case "nextToken":
12962			if value != nil {
12963				jtv, ok := value.(string)
12964				if !ok {
12965					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
12966				}
12967				sv.NextToken = ptr.String(jtv)
12968			}
12969
12970		default:
12971			_, _ = key, value
12972
12973		}
12974	}
12975	*v = sv
12976	return nil
12977}
12978
12979func awsAwsjson11_deserializeOpDocumentDescribeHostedConnectionsOutput(v **DescribeHostedConnectionsOutput, value interface{}) error {
12980	if v == nil {
12981		return fmt.Errorf("unexpected nil of type %T", v)
12982	}
12983	if value == nil {
12984		return nil
12985	}
12986
12987	shape, ok := value.(map[string]interface{})
12988	if !ok {
12989		return fmt.Errorf("unexpected JSON type %v", value)
12990	}
12991
12992	var sv *DescribeHostedConnectionsOutput
12993	if *v == nil {
12994		sv = &DescribeHostedConnectionsOutput{}
12995	} else {
12996		sv = *v
12997	}
12998
12999	for key, value := range shape {
13000		switch key {
13001		case "connections":
13002			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
13003				return err
13004			}
13005
13006		default:
13007			_, _ = key, value
13008
13009		}
13010	}
13011	*v = sv
13012	return nil
13013}
13014
13015func awsAwsjson11_deserializeOpDocumentDescribeInterconnectLoaOutput(v **DescribeInterconnectLoaOutput, value interface{}) error {
13016	if v == nil {
13017		return fmt.Errorf("unexpected nil of type %T", v)
13018	}
13019	if value == nil {
13020		return nil
13021	}
13022
13023	shape, ok := value.(map[string]interface{})
13024	if !ok {
13025		return fmt.Errorf("unexpected JSON type %v", value)
13026	}
13027
13028	var sv *DescribeInterconnectLoaOutput
13029	if *v == nil {
13030		sv = &DescribeInterconnectLoaOutput{}
13031	} else {
13032		sv = *v
13033	}
13034
13035	for key, value := range shape {
13036		switch key {
13037		case "loa":
13038			if err := awsAwsjson11_deserializeDocumentLoa(&sv.Loa, value); err != nil {
13039				return err
13040			}
13041
13042		default:
13043			_, _ = key, value
13044
13045		}
13046	}
13047	*v = sv
13048	return nil
13049}
13050
13051func awsAwsjson11_deserializeOpDocumentDescribeInterconnectsOutput(v **DescribeInterconnectsOutput, value interface{}) error {
13052	if v == nil {
13053		return fmt.Errorf("unexpected nil of type %T", v)
13054	}
13055	if value == nil {
13056		return nil
13057	}
13058
13059	shape, ok := value.(map[string]interface{})
13060	if !ok {
13061		return fmt.Errorf("unexpected JSON type %v", value)
13062	}
13063
13064	var sv *DescribeInterconnectsOutput
13065	if *v == nil {
13066		sv = &DescribeInterconnectsOutput{}
13067	} else {
13068		sv = *v
13069	}
13070
13071	for key, value := range shape {
13072		switch key {
13073		case "interconnects":
13074			if err := awsAwsjson11_deserializeDocumentInterconnectList(&sv.Interconnects, value); err != nil {
13075				return err
13076			}
13077
13078		default:
13079			_, _ = key, value
13080
13081		}
13082	}
13083	*v = sv
13084	return nil
13085}
13086
13087func awsAwsjson11_deserializeOpDocumentDescribeLagsOutput(v **DescribeLagsOutput, value interface{}) error {
13088	if v == nil {
13089		return fmt.Errorf("unexpected nil of type %T", v)
13090	}
13091	if value == nil {
13092		return nil
13093	}
13094
13095	shape, ok := value.(map[string]interface{})
13096	if !ok {
13097		return fmt.Errorf("unexpected JSON type %v", value)
13098	}
13099
13100	var sv *DescribeLagsOutput
13101	if *v == nil {
13102		sv = &DescribeLagsOutput{}
13103	} else {
13104		sv = *v
13105	}
13106
13107	for key, value := range shape {
13108		switch key {
13109		case "lags":
13110			if err := awsAwsjson11_deserializeDocumentLagList(&sv.Lags, value); err != nil {
13111				return err
13112			}
13113
13114		default:
13115			_, _ = key, value
13116
13117		}
13118	}
13119	*v = sv
13120	return nil
13121}
13122
13123func awsAwsjson11_deserializeOpDocumentDescribeLoaOutput(v **DescribeLoaOutput, value interface{}) error {
13124	if v == nil {
13125		return fmt.Errorf("unexpected nil of type %T", v)
13126	}
13127	if value == nil {
13128		return nil
13129	}
13130
13131	shape, ok := value.(map[string]interface{})
13132	if !ok {
13133		return fmt.Errorf("unexpected JSON type %v", value)
13134	}
13135
13136	var sv *DescribeLoaOutput
13137	if *v == nil {
13138		sv = &DescribeLoaOutput{}
13139	} else {
13140		sv = *v
13141	}
13142
13143	for key, value := range shape {
13144		switch key {
13145		case "loaContent":
13146			if value != nil {
13147				jtv, ok := value.(string)
13148				if !ok {
13149					return fmt.Errorf("expected LoaContent to be []byte, got %T instead", value)
13150				}
13151				dv, err := base64.StdEncoding.DecodeString(jtv)
13152				if err != nil {
13153					return fmt.Errorf("failed to base64 decode LoaContent, %w", err)
13154				}
13155				sv.LoaContent = dv
13156			}
13157
13158		case "loaContentType":
13159			if value != nil {
13160				jtv, ok := value.(string)
13161				if !ok {
13162					return fmt.Errorf("expected LoaContentType to be of type string, got %T instead", value)
13163				}
13164				sv.LoaContentType = types.LoaContentType(jtv)
13165			}
13166
13167		default:
13168			_, _ = key, value
13169
13170		}
13171	}
13172	*v = sv
13173	return nil
13174}
13175
13176func awsAwsjson11_deserializeOpDocumentDescribeLocationsOutput(v **DescribeLocationsOutput, value interface{}) error {
13177	if v == nil {
13178		return fmt.Errorf("unexpected nil of type %T", v)
13179	}
13180	if value == nil {
13181		return nil
13182	}
13183
13184	shape, ok := value.(map[string]interface{})
13185	if !ok {
13186		return fmt.Errorf("unexpected JSON type %v", value)
13187	}
13188
13189	var sv *DescribeLocationsOutput
13190	if *v == nil {
13191		sv = &DescribeLocationsOutput{}
13192	} else {
13193		sv = *v
13194	}
13195
13196	for key, value := range shape {
13197		switch key {
13198		case "locations":
13199			if err := awsAwsjson11_deserializeDocumentLocationList(&sv.Locations, value); err != nil {
13200				return err
13201			}
13202
13203		default:
13204			_, _ = key, value
13205
13206		}
13207	}
13208	*v = sv
13209	return nil
13210}
13211
13212func awsAwsjson11_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, value interface{}) error {
13213	if v == nil {
13214		return fmt.Errorf("unexpected nil of type %T", v)
13215	}
13216	if value == nil {
13217		return nil
13218	}
13219
13220	shape, ok := value.(map[string]interface{})
13221	if !ok {
13222		return fmt.Errorf("unexpected JSON type %v", value)
13223	}
13224
13225	var sv *DescribeTagsOutput
13226	if *v == nil {
13227		sv = &DescribeTagsOutput{}
13228	} else {
13229		sv = *v
13230	}
13231
13232	for key, value := range shape {
13233		switch key {
13234		case "resourceTags":
13235			if err := awsAwsjson11_deserializeDocumentResourceTagList(&sv.ResourceTags, value); err != nil {
13236				return err
13237			}
13238
13239		default:
13240			_, _ = key, value
13241
13242		}
13243	}
13244	*v = sv
13245	return nil
13246}
13247
13248func awsAwsjson11_deserializeOpDocumentDescribeVirtualGatewaysOutput(v **DescribeVirtualGatewaysOutput, value interface{}) error {
13249	if v == nil {
13250		return fmt.Errorf("unexpected nil of type %T", v)
13251	}
13252	if value == nil {
13253		return nil
13254	}
13255
13256	shape, ok := value.(map[string]interface{})
13257	if !ok {
13258		return fmt.Errorf("unexpected JSON type %v", value)
13259	}
13260
13261	var sv *DescribeVirtualGatewaysOutput
13262	if *v == nil {
13263		sv = &DescribeVirtualGatewaysOutput{}
13264	} else {
13265		sv = *v
13266	}
13267
13268	for key, value := range shape {
13269		switch key {
13270		case "virtualGateways":
13271			if err := awsAwsjson11_deserializeDocumentVirtualGatewayList(&sv.VirtualGateways, value); err != nil {
13272				return err
13273			}
13274
13275		default:
13276			_, _ = key, value
13277
13278		}
13279	}
13280	*v = sv
13281	return nil
13282}
13283
13284func awsAwsjson11_deserializeOpDocumentDescribeVirtualInterfacesOutput(v **DescribeVirtualInterfacesOutput, value interface{}) error {
13285	if v == nil {
13286		return fmt.Errorf("unexpected nil of type %T", v)
13287	}
13288	if value == nil {
13289		return nil
13290	}
13291
13292	shape, ok := value.(map[string]interface{})
13293	if !ok {
13294		return fmt.Errorf("unexpected JSON type %v", value)
13295	}
13296
13297	var sv *DescribeVirtualInterfacesOutput
13298	if *v == nil {
13299		sv = &DescribeVirtualInterfacesOutput{}
13300	} else {
13301		sv = *v
13302	}
13303
13304	for key, value := range shape {
13305		switch key {
13306		case "virtualInterfaces":
13307			if err := awsAwsjson11_deserializeDocumentVirtualInterfaceList(&sv.VirtualInterfaces, value); err != nil {
13308				return err
13309			}
13310
13311		default:
13312			_, _ = key, value
13313
13314		}
13315	}
13316	*v = sv
13317	return nil
13318}
13319
13320func awsAwsjson11_deserializeOpDocumentDisassociateConnectionFromLagOutput(v **DisassociateConnectionFromLagOutput, value interface{}) error {
13321	if v == nil {
13322		return fmt.Errorf("unexpected nil of type %T", v)
13323	}
13324	if value == nil {
13325		return nil
13326	}
13327
13328	shape, ok := value.(map[string]interface{})
13329	if !ok {
13330		return fmt.Errorf("unexpected JSON type %v", value)
13331	}
13332
13333	var sv *DisassociateConnectionFromLagOutput
13334	if *v == nil {
13335		sv = &DisassociateConnectionFromLagOutput{}
13336	} else {
13337		sv = *v
13338	}
13339
13340	for key, value := range shape {
13341		switch key {
13342		case "awsDevice":
13343			if value != nil {
13344				jtv, ok := value.(string)
13345				if !ok {
13346					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
13347				}
13348				sv.AwsDevice = ptr.String(jtv)
13349			}
13350
13351		case "awsDeviceV2":
13352			if value != nil {
13353				jtv, ok := value.(string)
13354				if !ok {
13355					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
13356				}
13357				sv.AwsDeviceV2 = ptr.String(jtv)
13358			}
13359
13360		case "bandwidth":
13361			if value != nil {
13362				jtv, ok := value.(string)
13363				if !ok {
13364					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
13365				}
13366				sv.Bandwidth = ptr.String(jtv)
13367			}
13368
13369		case "connectionId":
13370			if value != nil {
13371				jtv, ok := value.(string)
13372				if !ok {
13373					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
13374				}
13375				sv.ConnectionId = ptr.String(jtv)
13376			}
13377
13378		case "connectionName":
13379			if value != nil {
13380				jtv, ok := value.(string)
13381				if !ok {
13382					return fmt.Errorf("expected ConnectionName to be of type string, got %T instead", value)
13383				}
13384				sv.ConnectionName = ptr.String(jtv)
13385			}
13386
13387		case "connectionState":
13388			if value != nil {
13389				jtv, ok := value.(string)
13390				if !ok {
13391					return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value)
13392				}
13393				sv.ConnectionState = types.ConnectionState(jtv)
13394			}
13395
13396		case "hasLogicalRedundancy":
13397			if value != nil {
13398				jtv, ok := value.(string)
13399				if !ok {
13400					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
13401				}
13402				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
13403			}
13404
13405		case "jumboFrameCapable":
13406			if value != nil {
13407				jtv, ok := value.(bool)
13408				if !ok {
13409					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
13410				}
13411				sv.JumboFrameCapable = ptr.Bool(jtv)
13412			}
13413
13414		case "lagId":
13415			if value != nil {
13416				jtv, ok := value.(string)
13417				if !ok {
13418					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
13419				}
13420				sv.LagId = ptr.String(jtv)
13421			}
13422
13423		case "loaIssueTime":
13424			if value != nil {
13425				jtv, ok := value.(json.Number)
13426				if !ok {
13427					return fmt.Errorf("expected LoaIssueTime to be json.Number, got %T instead", value)
13428				}
13429				f64, err := jtv.Float64()
13430				if err != nil {
13431					return err
13432				}
13433				sv.LoaIssueTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
13434			}
13435
13436		case "location":
13437			if value != nil {
13438				jtv, ok := value.(string)
13439				if !ok {
13440					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
13441				}
13442				sv.Location = ptr.String(jtv)
13443			}
13444
13445		case "ownerAccount":
13446			if value != nil {
13447				jtv, ok := value.(string)
13448				if !ok {
13449					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
13450				}
13451				sv.OwnerAccount = ptr.String(jtv)
13452			}
13453
13454		case "partnerName":
13455			if value != nil {
13456				jtv, ok := value.(string)
13457				if !ok {
13458					return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value)
13459				}
13460				sv.PartnerName = ptr.String(jtv)
13461			}
13462
13463		case "providerName":
13464			if value != nil {
13465				jtv, ok := value.(string)
13466				if !ok {
13467					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
13468				}
13469				sv.ProviderName = ptr.String(jtv)
13470			}
13471
13472		case "region":
13473			if value != nil {
13474				jtv, ok := value.(string)
13475				if !ok {
13476					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
13477				}
13478				sv.Region = ptr.String(jtv)
13479			}
13480
13481		case "tags":
13482			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
13483				return err
13484			}
13485
13486		case "vlan":
13487			if value != nil {
13488				jtv, ok := value.(json.Number)
13489				if !ok {
13490					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
13491				}
13492				i64, err := jtv.Int64()
13493				if err != nil {
13494					return err
13495				}
13496				sv.Vlan = int32(i64)
13497			}
13498
13499		default:
13500			_, _ = key, value
13501
13502		}
13503	}
13504	*v = sv
13505	return nil
13506}
13507
13508func awsAwsjson11_deserializeOpDocumentListVirtualInterfaceTestHistoryOutput(v **ListVirtualInterfaceTestHistoryOutput, value interface{}) error {
13509	if v == nil {
13510		return fmt.Errorf("unexpected nil of type %T", v)
13511	}
13512	if value == nil {
13513		return nil
13514	}
13515
13516	shape, ok := value.(map[string]interface{})
13517	if !ok {
13518		return fmt.Errorf("unexpected JSON type %v", value)
13519	}
13520
13521	var sv *ListVirtualInterfaceTestHistoryOutput
13522	if *v == nil {
13523		sv = &ListVirtualInterfaceTestHistoryOutput{}
13524	} else {
13525		sv = *v
13526	}
13527
13528	for key, value := range shape {
13529		switch key {
13530		case "nextToken":
13531			if value != nil {
13532				jtv, ok := value.(string)
13533				if !ok {
13534					return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value)
13535				}
13536				sv.NextToken = ptr.String(jtv)
13537			}
13538
13539		case "virtualInterfaceTestHistory":
13540			if err := awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistoryList(&sv.VirtualInterfaceTestHistory, value); err != nil {
13541				return err
13542			}
13543
13544		default:
13545			_, _ = key, value
13546
13547		}
13548	}
13549	*v = sv
13550	return nil
13551}
13552
13553func awsAwsjson11_deserializeOpDocumentStartBgpFailoverTestOutput(v **StartBgpFailoverTestOutput, value interface{}) error {
13554	if v == nil {
13555		return fmt.Errorf("unexpected nil of type %T", v)
13556	}
13557	if value == nil {
13558		return nil
13559	}
13560
13561	shape, ok := value.(map[string]interface{})
13562	if !ok {
13563		return fmt.Errorf("unexpected JSON type %v", value)
13564	}
13565
13566	var sv *StartBgpFailoverTestOutput
13567	if *v == nil {
13568		sv = &StartBgpFailoverTestOutput{}
13569	} else {
13570		sv = *v
13571	}
13572
13573	for key, value := range shape {
13574		switch key {
13575		case "virtualInterfaceTest":
13576			if err := awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistory(&sv.VirtualInterfaceTest, value); err != nil {
13577				return err
13578			}
13579
13580		default:
13581			_, _ = key, value
13582
13583		}
13584	}
13585	*v = sv
13586	return nil
13587}
13588
13589func awsAwsjson11_deserializeOpDocumentStopBgpFailoverTestOutput(v **StopBgpFailoverTestOutput, value interface{}) error {
13590	if v == nil {
13591		return fmt.Errorf("unexpected nil of type %T", v)
13592	}
13593	if value == nil {
13594		return nil
13595	}
13596
13597	shape, ok := value.(map[string]interface{})
13598	if !ok {
13599		return fmt.Errorf("unexpected JSON type %v", value)
13600	}
13601
13602	var sv *StopBgpFailoverTestOutput
13603	if *v == nil {
13604		sv = &StopBgpFailoverTestOutput{}
13605	} else {
13606		sv = *v
13607	}
13608
13609	for key, value := range shape {
13610		switch key {
13611		case "virtualInterfaceTest":
13612			if err := awsAwsjson11_deserializeDocumentVirtualInterfaceTestHistory(&sv.VirtualInterfaceTest, value); err != nil {
13613				return err
13614			}
13615
13616		default:
13617			_, _ = key, value
13618
13619		}
13620	}
13621	*v = sv
13622	return nil
13623}
13624
13625func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error {
13626	if v == nil {
13627		return fmt.Errorf("unexpected nil of type %T", v)
13628	}
13629	if value == nil {
13630		return nil
13631	}
13632
13633	shape, ok := value.(map[string]interface{})
13634	if !ok {
13635		return fmt.Errorf("unexpected JSON type %v", value)
13636	}
13637
13638	var sv *TagResourceOutput
13639	if *v == nil {
13640		sv = &TagResourceOutput{}
13641	} else {
13642		sv = *v
13643	}
13644
13645	for key, value := range shape {
13646		switch key {
13647		default:
13648			_, _ = key, value
13649
13650		}
13651	}
13652	*v = sv
13653	return nil
13654}
13655
13656func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error {
13657	if v == nil {
13658		return fmt.Errorf("unexpected nil of type %T", v)
13659	}
13660	if value == nil {
13661		return nil
13662	}
13663
13664	shape, ok := value.(map[string]interface{})
13665	if !ok {
13666		return fmt.Errorf("unexpected JSON type %v", value)
13667	}
13668
13669	var sv *UntagResourceOutput
13670	if *v == nil {
13671		sv = &UntagResourceOutput{}
13672	} else {
13673		sv = *v
13674	}
13675
13676	for key, value := range shape {
13677		switch key {
13678		default:
13679			_, _ = key, value
13680
13681		}
13682	}
13683	*v = sv
13684	return nil
13685}
13686
13687func awsAwsjson11_deserializeOpDocumentUpdateDirectConnectGatewayAssociationOutput(v **UpdateDirectConnectGatewayAssociationOutput, value interface{}) error {
13688	if v == nil {
13689		return fmt.Errorf("unexpected nil of type %T", v)
13690	}
13691	if value == nil {
13692		return nil
13693	}
13694
13695	shape, ok := value.(map[string]interface{})
13696	if !ok {
13697		return fmt.Errorf("unexpected JSON type %v", value)
13698	}
13699
13700	var sv *UpdateDirectConnectGatewayAssociationOutput
13701	if *v == nil {
13702		sv = &UpdateDirectConnectGatewayAssociationOutput{}
13703	} else {
13704		sv = *v
13705	}
13706
13707	for key, value := range shape {
13708		switch key {
13709		case "directConnectGatewayAssociation":
13710			if err := awsAwsjson11_deserializeDocumentDirectConnectGatewayAssociation(&sv.DirectConnectGatewayAssociation, value); err != nil {
13711				return err
13712			}
13713
13714		default:
13715			_, _ = key, value
13716
13717		}
13718	}
13719	*v = sv
13720	return nil
13721}
13722
13723func awsAwsjson11_deserializeOpDocumentUpdateLagOutput(v **UpdateLagOutput, value interface{}) error {
13724	if v == nil {
13725		return fmt.Errorf("unexpected nil of type %T", v)
13726	}
13727	if value == nil {
13728		return nil
13729	}
13730
13731	shape, ok := value.(map[string]interface{})
13732	if !ok {
13733		return fmt.Errorf("unexpected JSON type %v", value)
13734	}
13735
13736	var sv *UpdateLagOutput
13737	if *v == nil {
13738		sv = &UpdateLagOutput{}
13739	} else {
13740		sv = *v
13741	}
13742
13743	for key, value := range shape {
13744		switch key {
13745		case "allowsHostedConnections":
13746			if value != nil {
13747				jtv, ok := value.(bool)
13748				if !ok {
13749					return fmt.Errorf("expected BooleanFlag to be of type *bool, got %T instead", value)
13750				}
13751				sv.AllowsHostedConnections = jtv
13752			}
13753
13754		case "awsDevice":
13755			if value != nil {
13756				jtv, ok := value.(string)
13757				if !ok {
13758					return fmt.Errorf("expected AwsDevice to be of type string, got %T instead", value)
13759				}
13760				sv.AwsDevice = ptr.String(jtv)
13761			}
13762
13763		case "awsDeviceV2":
13764			if value != nil {
13765				jtv, ok := value.(string)
13766				if !ok {
13767					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
13768				}
13769				sv.AwsDeviceV2 = ptr.String(jtv)
13770			}
13771
13772		case "connections":
13773			if err := awsAwsjson11_deserializeDocumentConnectionList(&sv.Connections, value); err != nil {
13774				return err
13775			}
13776
13777		case "connectionsBandwidth":
13778			if value != nil {
13779				jtv, ok := value.(string)
13780				if !ok {
13781					return fmt.Errorf("expected Bandwidth to be of type string, got %T instead", value)
13782				}
13783				sv.ConnectionsBandwidth = ptr.String(jtv)
13784			}
13785
13786		case "hasLogicalRedundancy":
13787			if value != nil {
13788				jtv, ok := value.(string)
13789				if !ok {
13790					return fmt.Errorf("expected HasLogicalRedundancy to be of type string, got %T instead", value)
13791				}
13792				sv.HasLogicalRedundancy = types.HasLogicalRedundancy(jtv)
13793			}
13794
13795		case "jumboFrameCapable":
13796			if value != nil {
13797				jtv, ok := value.(bool)
13798				if !ok {
13799					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
13800				}
13801				sv.JumboFrameCapable = ptr.Bool(jtv)
13802			}
13803
13804		case "lagId":
13805			if value != nil {
13806				jtv, ok := value.(string)
13807				if !ok {
13808					return fmt.Errorf("expected LagId to be of type string, got %T instead", value)
13809				}
13810				sv.LagId = ptr.String(jtv)
13811			}
13812
13813		case "lagName":
13814			if value != nil {
13815				jtv, ok := value.(string)
13816				if !ok {
13817					return fmt.Errorf("expected LagName to be of type string, got %T instead", value)
13818				}
13819				sv.LagName = ptr.String(jtv)
13820			}
13821
13822		case "lagState":
13823			if value != nil {
13824				jtv, ok := value.(string)
13825				if !ok {
13826					return fmt.Errorf("expected LagState to be of type string, got %T instead", value)
13827				}
13828				sv.LagState = types.LagState(jtv)
13829			}
13830
13831		case "location":
13832			if value != nil {
13833				jtv, ok := value.(string)
13834				if !ok {
13835					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
13836				}
13837				sv.Location = ptr.String(jtv)
13838			}
13839
13840		case "minimumLinks":
13841			if value != nil {
13842				jtv, ok := value.(json.Number)
13843				if !ok {
13844					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
13845				}
13846				i64, err := jtv.Int64()
13847				if err != nil {
13848					return err
13849				}
13850				sv.MinimumLinks = int32(i64)
13851			}
13852
13853		case "numberOfConnections":
13854			if value != nil {
13855				jtv, ok := value.(json.Number)
13856				if !ok {
13857					return fmt.Errorf("expected Count to be json.Number, got %T instead", value)
13858				}
13859				i64, err := jtv.Int64()
13860				if err != nil {
13861					return err
13862				}
13863				sv.NumberOfConnections = int32(i64)
13864			}
13865
13866		case "ownerAccount":
13867			if value != nil {
13868				jtv, ok := value.(string)
13869				if !ok {
13870					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
13871				}
13872				sv.OwnerAccount = ptr.String(jtv)
13873			}
13874
13875		case "providerName":
13876			if value != nil {
13877				jtv, ok := value.(string)
13878				if !ok {
13879					return fmt.Errorf("expected ProviderName to be of type string, got %T instead", value)
13880				}
13881				sv.ProviderName = ptr.String(jtv)
13882			}
13883
13884		case "region":
13885			if value != nil {
13886				jtv, ok := value.(string)
13887				if !ok {
13888					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
13889				}
13890				sv.Region = ptr.String(jtv)
13891			}
13892
13893		case "tags":
13894			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
13895				return err
13896			}
13897
13898		default:
13899			_, _ = key, value
13900
13901		}
13902	}
13903	*v = sv
13904	return nil
13905}
13906
13907func awsAwsjson11_deserializeOpDocumentUpdateVirtualInterfaceAttributesOutput(v **UpdateVirtualInterfaceAttributesOutput, value interface{}) error {
13908	if v == nil {
13909		return fmt.Errorf("unexpected nil of type %T", v)
13910	}
13911	if value == nil {
13912		return nil
13913	}
13914
13915	shape, ok := value.(map[string]interface{})
13916	if !ok {
13917		return fmt.Errorf("unexpected JSON type %v", value)
13918	}
13919
13920	var sv *UpdateVirtualInterfaceAttributesOutput
13921	if *v == nil {
13922		sv = &UpdateVirtualInterfaceAttributesOutput{}
13923	} else {
13924		sv = *v
13925	}
13926
13927	for key, value := range shape {
13928		switch key {
13929		case "addressFamily":
13930			if value != nil {
13931				jtv, ok := value.(string)
13932				if !ok {
13933					return fmt.Errorf("expected AddressFamily to be of type string, got %T instead", value)
13934				}
13935				sv.AddressFamily = types.AddressFamily(jtv)
13936			}
13937
13938		case "amazonAddress":
13939			if value != nil {
13940				jtv, ok := value.(string)
13941				if !ok {
13942					return fmt.Errorf("expected AmazonAddress to be of type string, got %T instead", value)
13943				}
13944				sv.AmazonAddress = ptr.String(jtv)
13945			}
13946
13947		case "amazonSideAsn":
13948			if value != nil {
13949				jtv, ok := value.(json.Number)
13950				if !ok {
13951					return fmt.Errorf("expected LongAsn to be json.Number, got %T instead", value)
13952				}
13953				i64, err := jtv.Int64()
13954				if err != nil {
13955					return err
13956				}
13957				sv.AmazonSideAsn = ptr.Int64(i64)
13958			}
13959
13960		case "asn":
13961			if value != nil {
13962				jtv, ok := value.(json.Number)
13963				if !ok {
13964					return fmt.Errorf("expected ASN to be json.Number, got %T instead", value)
13965				}
13966				i64, err := jtv.Int64()
13967				if err != nil {
13968					return err
13969				}
13970				sv.Asn = int32(i64)
13971			}
13972
13973		case "authKey":
13974			if value != nil {
13975				jtv, ok := value.(string)
13976				if !ok {
13977					return fmt.Errorf("expected BGPAuthKey to be of type string, got %T instead", value)
13978				}
13979				sv.AuthKey = ptr.String(jtv)
13980			}
13981
13982		case "awsDeviceV2":
13983			if value != nil {
13984				jtv, ok := value.(string)
13985				if !ok {
13986					return fmt.Errorf("expected AwsDeviceV2 to be of type string, got %T instead", value)
13987				}
13988				sv.AwsDeviceV2 = ptr.String(jtv)
13989			}
13990
13991		case "bgpPeers":
13992			if err := awsAwsjson11_deserializeDocumentBGPPeerList(&sv.BgpPeers, value); err != nil {
13993				return err
13994			}
13995
13996		case "connectionId":
13997			if value != nil {
13998				jtv, ok := value.(string)
13999				if !ok {
14000					return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value)
14001				}
14002				sv.ConnectionId = ptr.String(jtv)
14003			}
14004
14005		case "customerAddress":
14006			if value != nil {
14007				jtv, ok := value.(string)
14008				if !ok {
14009					return fmt.Errorf("expected CustomerAddress to be of type string, got %T instead", value)
14010				}
14011				sv.CustomerAddress = ptr.String(jtv)
14012			}
14013
14014		case "customerRouterConfig":
14015			if value != nil {
14016				jtv, ok := value.(string)
14017				if !ok {
14018					return fmt.Errorf("expected RouterConfig to be of type string, got %T instead", value)
14019				}
14020				sv.CustomerRouterConfig = ptr.String(jtv)
14021			}
14022
14023		case "directConnectGatewayId":
14024			if value != nil {
14025				jtv, ok := value.(string)
14026				if !ok {
14027					return fmt.Errorf("expected DirectConnectGatewayId to be of type string, got %T instead", value)
14028				}
14029				sv.DirectConnectGatewayId = ptr.String(jtv)
14030			}
14031
14032		case "jumboFrameCapable":
14033			if value != nil {
14034				jtv, ok := value.(bool)
14035				if !ok {
14036					return fmt.Errorf("expected JumboFrameCapable to be of type *bool, got %T instead", value)
14037				}
14038				sv.JumboFrameCapable = ptr.Bool(jtv)
14039			}
14040
14041		case "location":
14042			if value != nil {
14043				jtv, ok := value.(string)
14044				if !ok {
14045					return fmt.Errorf("expected LocationCode to be of type string, got %T instead", value)
14046				}
14047				sv.Location = ptr.String(jtv)
14048			}
14049
14050		case "mtu":
14051			if value != nil {
14052				jtv, ok := value.(json.Number)
14053				if !ok {
14054					return fmt.Errorf("expected MTU to be json.Number, got %T instead", value)
14055				}
14056				i64, err := jtv.Int64()
14057				if err != nil {
14058					return err
14059				}
14060				sv.Mtu = ptr.Int32(int32(i64))
14061			}
14062
14063		case "ownerAccount":
14064			if value != nil {
14065				jtv, ok := value.(string)
14066				if !ok {
14067					return fmt.Errorf("expected OwnerAccount to be of type string, got %T instead", value)
14068				}
14069				sv.OwnerAccount = ptr.String(jtv)
14070			}
14071
14072		case "region":
14073			if value != nil {
14074				jtv, ok := value.(string)
14075				if !ok {
14076					return fmt.Errorf("expected Region to be of type string, got %T instead", value)
14077				}
14078				sv.Region = ptr.String(jtv)
14079			}
14080
14081		case "routeFilterPrefixes":
14082			if err := awsAwsjson11_deserializeDocumentRouteFilterPrefixList(&sv.RouteFilterPrefixes, value); err != nil {
14083				return err
14084			}
14085
14086		case "tags":
14087			if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
14088				return err
14089			}
14090
14091		case "virtualGatewayId":
14092			if value != nil {
14093				jtv, ok := value.(string)
14094				if !ok {
14095					return fmt.Errorf("expected VirtualGatewayId to be of type string, got %T instead", value)
14096				}
14097				sv.VirtualGatewayId = ptr.String(jtv)
14098			}
14099
14100		case "virtualInterfaceId":
14101			if value != nil {
14102				jtv, ok := value.(string)
14103				if !ok {
14104					return fmt.Errorf("expected VirtualInterfaceId to be of type string, got %T instead", value)
14105				}
14106				sv.VirtualInterfaceId = ptr.String(jtv)
14107			}
14108
14109		case "virtualInterfaceName":
14110			if value != nil {
14111				jtv, ok := value.(string)
14112				if !ok {
14113					return fmt.Errorf("expected VirtualInterfaceName to be of type string, got %T instead", value)
14114				}
14115				sv.VirtualInterfaceName = ptr.String(jtv)
14116			}
14117
14118		case "virtualInterfaceState":
14119			if value != nil {
14120				jtv, ok := value.(string)
14121				if !ok {
14122					return fmt.Errorf("expected VirtualInterfaceState to be of type string, got %T instead", value)
14123				}
14124				sv.VirtualInterfaceState = types.VirtualInterfaceState(jtv)
14125			}
14126
14127		case "virtualInterfaceType":
14128			if value != nil {
14129				jtv, ok := value.(string)
14130				if !ok {
14131					return fmt.Errorf("expected VirtualInterfaceType to be of type string, got %T instead", value)
14132				}
14133				sv.VirtualInterfaceType = ptr.String(jtv)
14134			}
14135
14136		case "vlan":
14137			if value != nil {
14138				jtv, ok := value.(json.Number)
14139				if !ok {
14140					return fmt.Errorf("expected VLAN to be json.Number, got %T instead", value)
14141				}
14142				i64, err := jtv.Int64()
14143				if err != nil {
14144					return err
14145				}
14146				sv.Vlan = int32(i64)
14147			}
14148
14149		default:
14150			_, _ = key, value
14151
14152		}
14153	}
14154	*v = sv
14155	return nil
14156}
14157