1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package apigateway
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/apigateway/types"
10	smithy "github.com/aws/smithy-go"
11	"github.com/aws/smithy-go/encoding/httpbinding"
12	smithyjson "github.com/aws/smithy-go/encoding/json"
13	"github.com/aws/smithy-go/middleware"
14	smithyhttp "github.com/aws/smithy-go/transport/http"
15)
16
17type awsRestjson1_serializeOpCreateApiKey struct {
18}
19
20func (*awsRestjson1_serializeOpCreateApiKey) ID() string {
21	return "OperationSerializer"
22}
23
24func (m *awsRestjson1_serializeOpCreateApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
25	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
26) {
27	request, ok := in.Request.(*smithyhttp.Request)
28	if !ok {
29		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
30	}
31
32	input, ok := in.Parameters.(*CreateApiKeyInput)
33	_ = input
34	if !ok {
35		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
36	}
37
38	opPath, opQuery := httpbinding.SplitURI("/apikeys")
39	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
40	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
41	request.Method = "POST"
42	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
43	if err != nil {
44		return out, metadata, &smithy.SerializationError{Err: err}
45	}
46
47	restEncoder.SetHeader("Content-Type").String("application/json")
48
49	jsonEncoder := smithyjson.NewEncoder()
50	if err := awsRestjson1_serializeOpDocumentCreateApiKeyInput(input, jsonEncoder.Value); err != nil {
51		return out, metadata, &smithy.SerializationError{Err: err}
52	}
53
54	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
55		return out, metadata, &smithy.SerializationError{Err: err}
56	}
57
58	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
59		return out, metadata, &smithy.SerializationError{Err: err}
60	}
61	in.Request = request
62
63	return next.HandleSerialize(ctx, in)
64}
65func awsRestjson1_serializeOpHttpBindingsCreateApiKeyInput(v *CreateApiKeyInput, encoder *httpbinding.Encoder) error {
66	if v == nil {
67		return fmt.Errorf("unsupported serialization of nil %T", v)
68	}
69
70	return nil
71}
72
73func awsRestjson1_serializeOpDocumentCreateApiKeyInput(v *CreateApiKeyInput, value smithyjson.Value) error {
74	object := value.Object()
75	defer object.Close()
76
77	if v.CustomerId != nil {
78		ok := object.Key("customerId")
79		ok.String(*v.CustomerId)
80	}
81
82	if v.Description != nil {
83		ok := object.Key("description")
84		ok.String(*v.Description)
85	}
86
87	if v.Enabled {
88		ok := object.Key("enabled")
89		ok.Boolean(v.Enabled)
90	}
91
92	if v.GenerateDistinctId {
93		ok := object.Key("generateDistinctId")
94		ok.Boolean(v.GenerateDistinctId)
95	}
96
97	if v.Name != nil {
98		ok := object.Key("name")
99		ok.String(*v.Name)
100	}
101
102	if v.StageKeys != nil {
103		ok := object.Key("stageKeys")
104		if err := awsRestjson1_serializeDocumentListOfStageKeys(v.StageKeys, ok); err != nil {
105			return err
106		}
107	}
108
109	if v.Tags != nil {
110		ok := object.Key("tags")
111		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
112			return err
113		}
114	}
115
116	if v.Value != nil {
117		ok := object.Key("value")
118		ok.String(*v.Value)
119	}
120
121	return nil
122}
123
124type awsRestjson1_serializeOpCreateAuthorizer struct {
125}
126
127func (*awsRestjson1_serializeOpCreateAuthorizer) ID() string {
128	return "OperationSerializer"
129}
130
131func (m *awsRestjson1_serializeOpCreateAuthorizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
132	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
133) {
134	request, ok := in.Request.(*smithyhttp.Request)
135	if !ok {
136		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
137	}
138
139	input, ok := in.Parameters.(*CreateAuthorizerInput)
140	_ = input
141	if !ok {
142		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
143	}
144
145	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers")
146	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
147	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
148	request.Method = "POST"
149	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
150	if err != nil {
151		return out, metadata, &smithy.SerializationError{Err: err}
152	}
153
154	if err := awsRestjson1_serializeOpHttpBindingsCreateAuthorizerInput(input, restEncoder); err != nil {
155		return out, metadata, &smithy.SerializationError{Err: err}
156	}
157
158	restEncoder.SetHeader("Content-Type").String("application/json")
159
160	jsonEncoder := smithyjson.NewEncoder()
161	if err := awsRestjson1_serializeOpDocumentCreateAuthorizerInput(input, jsonEncoder.Value); err != nil {
162		return out, metadata, &smithy.SerializationError{Err: err}
163	}
164
165	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
166		return out, metadata, &smithy.SerializationError{Err: err}
167	}
168
169	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
170		return out, metadata, &smithy.SerializationError{Err: err}
171	}
172	in.Request = request
173
174	return next.HandleSerialize(ctx, in)
175}
176func awsRestjson1_serializeOpHttpBindingsCreateAuthorizerInput(v *CreateAuthorizerInput, encoder *httpbinding.Encoder) error {
177	if v == nil {
178		return fmt.Errorf("unsupported serialization of nil %T", v)
179	}
180
181	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
182		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
183	}
184	if v.RestApiId != nil {
185		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
186			return err
187		}
188	}
189
190	return nil
191}
192
193func awsRestjson1_serializeOpDocumentCreateAuthorizerInput(v *CreateAuthorizerInput, value smithyjson.Value) error {
194	object := value.Object()
195	defer object.Close()
196
197	if v.AuthorizerCredentials != nil {
198		ok := object.Key("authorizerCredentials")
199		ok.String(*v.AuthorizerCredentials)
200	}
201
202	if v.AuthorizerResultTtlInSeconds != nil {
203		ok := object.Key("authorizerResultTtlInSeconds")
204		ok.Integer(*v.AuthorizerResultTtlInSeconds)
205	}
206
207	if v.AuthorizerUri != nil {
208		ok := object.Key("authorizerUri")
209		ok.String(*v.AuthorizerUri)
210	}
211
212	if v.AuthType != nil {
213		ok := object.Key("authType")
214		ok.String(*v.AuthType)
215	}
216
217	if v.IdentitySource != nil {
218		ok := object.Key("identitySource")
219		ok.String(*v.IdentitySource)
220	}
221
222	if v.IdentityValidationExpression != nil {
223		ok := object.Key("identityValidationExpression")
224		ok.String(*v.IdentityValidationExpression)
225	}
226
227	if v.Name != nil {
228		ok := object.Key("name")
229		ok.String(*v.Name)
230	}
231
232	if v.ProviderARNs != nil {
233		ok := object.Key("providerARNs")
234		if err := awsRestjson1_serializeDocumentListOfARNs(v.ProviderARNs, ok); err != nil {
235			return err
236		}
237	}
238
239	if len(v.Type) > 0 {
240		ok := object.Key("type")
241		ok.String(string(v.Type))
242	}
243
244	return nil
245}
246
247type awsRestjson1_serializeOpCreateBasePathMapping struct {
248}
249
250func (*awsRestjson1_serializeOpCreateBasePathMapping) ID() string {
251	return "OperationSerializer"
252}
253
254func (m *awsRestjson1_serializeOpCreateBasePathMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
255	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
256) {
257	request, ok := in.Request.(*smithyhttp.Request)
258	if !ok {
259		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
260	}
261
262	input, ok := in.Parameters.(*CreateBasePathMappingInput)
263	_ = input
264	if !ok {
265		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
266	}
267
268	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings")
269	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
270	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
271	request.Method = "POST"
272	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
273	if err != nil {
274		return out, metadata, &smithy.SerializationError{Err: err}
275	}
276
277	if err := awsRestjson1_serializeOpHttpBindingsCreateBasePathMappingInput(input, restEncoder); err != nil {
278		return out, metadata, &smithy.SerializationError{Err: err}
279	}
280
281	restEncoder.SetHeader("Content-Type").String("application/json")
282
283	jsonEncoder := smithyjson.NewEncoder()
284	if err := awsRestjson1_serializeOpDocumentCreateBasePathMappingInput(input, jsonEncoder.Value); err != nil {
285		return out, metadata, &smithy.SerializationError{Err: err}
286	}
287
288	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
289		return out, metadata, &smithy.SerializationError{Err: err}
290	}
291
292	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
293		return out, metadata, &smithy.SerializationError{Err: err}
294	}
295	in.Request = request
296
297	return next.HandleSerialize(ctx, in)
298}
299func awsRestjson1_serializeOpHttpBindingsCreateBasePathMappingInput(v *CreateBasePathMappingInput, encoder *httpbinding.Encoder) error {
300	if v == nil {
301		return fmt.Errorf("unsupported serialization of nil %T", v)
302	}
303
304	if v.DomainName == nil || len(*v.DomainName) == 0 {
305		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
306	}
307	if v.DomainName != nil {
308		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
309			return err
310		}
311	}
312
313	return nil
314}
315
316func awsRestjson1_serializeOpDocumentCreateBasePathMappingInput(v *CreateBasePathMappingInput, value smithyjson.Value) error {
317	object := value.Object()
318	defer object.Close()
319
320	if v.BasePath != nil {
321		ok := object.Key("basePath")
322		ok.String(*v.BasePath)
323	}
324
325	if v.RestApiId != nil {
326		ok := object.Key("restApiId")
327		ok.String(*v.RestApiId)
328	}
329
330	if v.Stage != nil {
331		ok := object.Key("stage")
332		ok.String(*v.Stage)
333	}
334
335	return nil
336}
337
338type awsRestjson1_serializeOpCreateDeployment struct {
339}
340
341func (*awsRestjson1_serializeOpCreateDeployment) ID() string {
342	return "OperationSerializer"
343}
344
345func (m *awsRestjson1_serializeOpCreateDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
346	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
347) {
348	request, ok := in.Request.(*smithyhttp.Request)
349	if !ok {
350		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
351	}
352
353	input, ok := in.Parameters.(*CreateDeploymentInput)
354	_ = input
355	if !ok {
356		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
357	}
358
359	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments")
360	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
361	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
362	request.Method = "POST"
363	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
364	if err != nil {
365		return out, metadata, &smithy.SerializationError{Err: err}
366	}
367
368	if err := awsRestjson1_serializeOpHttpBindingsCreateDeploymentInput(input, restEncoder); err != nil {
369		return out, metadata, &smithy.SerializationError{Err: err}
370	}
371
372	restEncoder.SetHeader("Content-Type").String("application/json")
373
374	jsonEncoder := smithyjson.NewEncoder()
375	if err := awsRestjson1_serializeOpDocumentCreateDeploymentInput(input, jsonEncoder.Value); err != nil {
376		return out, metadata, &smithy.SerializationError{Err: err}
377	}
378
379	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
380		return out, metadata, &smithy.SerializationError{Err: err}
381	}
382
383	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
384		return out, metadata, &smithy.SerializationError{Err: err}
385	}
386	in.Request = request
387
388	return next.HandleSerialize(ctx, in)
389}
390func awsRestjson1_serializeOpHttpBindingsCreateDeploymentInput(v *CreateDeploymentInput, encoder *httpbinding.Encoder) error {
391	if v == nil {
392		return fmt.Errorf("unsupported serialization of nil %T", v)
393	}
394
395	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
396		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
397	}
398	if v.RestApiId != nil {
399		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
400			return err
401		}
402	}
403
404	return nil
405}
406
407func awsRestjson1_serializeOpDocumentCreateDeploymentInput(v *CreateDeploymentInput, value smithyjson.Value) error {
408	object := value.Object()
409	defer object.Close()
410
411	if v.CacheClusterEnabled != nil {
412		ok := object.Key("cacheClusterEnabled")
413		ok.Boolean(*v.CacheClusterEnabled)
414	}
415
416	if len(v.CacheClusterSize) > 0 {
417		ok := object.Key("cacheClusterSize")
418		ok.String(string(v.CacheClusterSize))
419	}
420
421	if v.CanarySettings != nil {
422		ok := object.Key("canarySettings")
423		if err := awsRestjson1_serializeDocumentDeploymentCanarySettings(v.CanarySettings, ok); err != nil {
424			return err
425		}
426	}
427
428	if v.Description != nil {
429		ok := object.Key("description")
430		ok.String(*v.Description)
431	}
432
433	if v.StageDescription != nil {
434		ok := object.Key("stageDescription")
435		ok.String(*v.StageDescription)
436	}
437
438	if v.StageName != nil {
439		ok := object.Key("stageName")
440		ok.String(*v.StageName)
441	}
442
443	if v.TracingEnabled != nil {
444		ok := object.Key("tracingEnabled")
445		ok.Boolean(*v.TracingEnabled)
446	}
447
448	if v.Variables != nil {
449		ok := object.Key("variables")
450		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Variables, ok); err != nil {
451			return err
452		}
453	}
454
455	return nil
456}
457
458type awsRestjson1_serializeOpCreateDocumentationPart struct {
459}
460
461func (*awsRestjson1_serializeOpCreateDocumentationPart) ID() string {
462	return "OperationSerializer"
463}
464
465func (m *awsRestjson1_serializeOpCreateDocumentationPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
466	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
467) {
468	request, ok := in.Request.(*smithyhttp.Request)
469	if !ok {
470		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
471	}
472
473	input, ok := in.Parameters.(*CreateDocumentationPartInput)
474	_ = input
475	if !ok {
476		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
477	}
478
479	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts")
480	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
481	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
482	request.Method = "POST"
483	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
484	if err != nil {
485		return out, metadata, &smithy.SerializationError{Err: err}
486	}
487
488	if err := awsRestjson1_serializeOpHttpBindingsCreateDocumentationPartInput(input, restEncoder); err != nil {
489		return out, metadata, &smithy.SerializationError{Err: err}
490	}
491
492	restEncoder.SetHeader("Content-Type").String("application/json")
493
494	jsonEncoder := smithyjson.NewEncoder()
495	if err := awsRestjson1_serializeOpDocumentCreateDocumentationPartInput(input, jsonEncoder.Value); err != nil {
496		return out, metadata, &smithy.SerializationError{Err: err}
497	}
498
499	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
500		return out, metadata, &smithy.SerializationError{Err: err}
501	}
502
503	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
504		return out, metadata, &smithy.SerializationError{Err: err}
505	}
506	in.Request = request
507
508	return next.HandleSerialize(ctx, in)
509}
510func awsRestjson1_serializeOpHttpBindingsCreateDocumentationPartInput(v *CreateDocumentationPartInput, encoder *httpbinding.Encoder) error {
511	if v == nil {
512		return fmt.Errorf("unsupported serialization of nil %T", v)
513	}
514
515	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
516		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
517	}
518	if v.RestApiId != nil {
519		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
520			return err
521		}
522	}
523
524	return nil
525}
526
527func awsRestjson1_serializeOpDocumentCreateDocumentationPartInput(v *CreateDocumentationPartInput, value smithyjson.Value) error {
528	object := value.Object()
529	defer object.Close()
530
531	if v.Location != nil {
532		ok := object.Key("location")
533		if err := awsRestjson1_serializeDocumentDocumentationPartLocation(v.Location, ok); err != nil {
534			return err
535		}
536	}
537
538	if v.Properties != nil {
539		ok := object.Key("properties")
540		ok.String(*v.Properties)
541	}
542
543	return nil
544}
545
546type awsRestjson1_serializeOpCreateDocumentationVersion struct {
547}
548
549func (*awsRestjson1_serializeOpCreateDocumentationVersion) ID() string {
550	return "OperationSerializer"
551}
552
553func (m *awsRestjson1_serializeOpCreateDocumentationVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
554	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
555) {
556	request, ok := in.Request.(*smithyhttp.Request)
557	if !ok {
558		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
559	}
560
561	input, ok := in.Parameters.(*CreateDocumentationVersionInput)
562	_ = input
563	if !ok {
564		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
565	}
566
567	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions")
568	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
569	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
570	request.Method = "POST"
571	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
572	if err != nil {
573		return out, metadata, &smithy.SerializationError{Err: err}
574	}
575
576	if err := awsRestjson1_serializeOpHttpBindingsCreateDocumentationVersionInput(input, restEncoder); err != nil {
577		return out, metadata, &smithy.SerializationError{Err: err}
578	}
579
580	restEncoder.SetHeader("Content-Type").String("application/json")
581
582	jsonEncoder := smithyjson.NewEncoder()
583	if err := awsRestjson1_serializeOpDocumentCreateDocumentationVersionInput(input, jsonEncoder.Value); err != nil {
584		return out, metadata, &smithy.SerializationError{Err: err}
585	}
586
587	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
588		return out, metadata, &smithy.SerializationError{Err: err}
589	}
590
591	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
592		return out, metadata, &smithy.SerializationError{Err: err}
593	}
594	in.Request = request
595
596	return next.HandleSerialize(ctx, in)
597}
598func awsRestjson1_serializeOpHttpBindingsCreateDocumentationVersionInput(v *CreateDocumentationVersionInput, encoder *httpbinding.Encoder) error {
599	if v == nil {
600		return fmt.Errorf("unsupported serialization of nil %T", v)
601	}
602
603	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
604		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
605	}
606	if v.RestApiId != nil {
607		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
608			return err
609		}
610	}
611
612	return nil
613}
614
615func awsRestjson1_serializeOpDocumentCreateDocumentationVersionInput(v *CreateDocumentationVersionInput, value smithyjson.Value) error {
616	object := value.Object()
617	defer object.Close()
618
619	if v.Description != nil {
620		ok := object.Key("description")
621		ok.String(*v.Description)
622	}
623
624	if v.DocumentationVersion != nil {
625		ok := object.Key("documentationVersion")
626		ok.String(*v.DocumentationVersion)
627	}
628
629	if v.StageName != nil {
630		ok := object.Key("stageName")
631		ok.String(*v.StageName)
632	}
633
634	return nil
635}
636
637type awsRestjson1_serializeOpCreateDomainName struct {
638}
639
640func (*awsRestjson1_serializeOpCreateDomainName) ID() string {
641	return "OperationSerializer"
642}
643
644func (m *awsRestjson1_serializeOpCreateDomainName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
645	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
646) {
647	request, ok := in.Request.(*smithyhttp.Request)
648	if !ok {
649		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
650	}
651
652	input, ok := in.Parameters.(*CreateDomainNameInput)
653	_ = input
654	if !ok {
655		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
656	}
657
658	opPath, opQuery := httpbinding.SplitURI("/domainnames")
659	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
660	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
661	request.Method = "POST"
662	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
663	if err != nil {
664		return out, metadata, &smithy.SerializationError{Err: err}
665	}
666
667	restEncoder.SetHeader("Content-Type").String("application/json")
668
669	jsonEncoder := smithyjson.NewEncoder()
670	if err := awsRestjson1_serializeOpDocumentCreateDomainNameInput(input, jsonEncoder.Value); err != nil {
671		return out, metadata, &smithy.SerializationError{Err: err}
672	}
673
674	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
675		return out, metadata, &smithy.SerializationError{Err: err}
676	}
677
678	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
679		return out, metadata, &smithy.SerializationError{Err: err}
680	}
681	in.Request = request
682
683	return next.HandleSerialize(ctx, in)
684}
685func awsRestjson1_serializeOpHttpBindingsCreateDomainNameInput(v *CreateDomainNameInput, encoder *httpbinding.Encoder) error {
686	if v == nil {
687		return fmt.Errorf("unsupported serialization of nil %T", v)
688	}
689
690	return nil
691}
692
693func awsRestjson1_serializeOpDocumentCreateDomainNameInput(v *CreateDomainNameInput, value smithyjson.Value) error {
694	object := value.Object()
695	defer object.Close()
696
697	if v.CertificateArn != nil {
698		ok := object.Key("certificateArn")
699		ok.String(*v.CertificateArn)
700	}
701
702	if v.CertificateBody != nil {
703		ok := object.Key("certificateBody")
704		ok.String(*v.CertificateBody)
705	}
706
707	if v.CertificateChain != nil {
708		ok := object.Key("certificateChain")
709		ok.String(*v.CertificateChain)
710	}
711
712	if v.CertificateName != nil {
713		ok := object.Key("certificateName")
714		ok.String(*v.CertificateName)
715	}
716
717	if v.CertificatePrivateKey != nil {
718		ok := object.Key("certificatePrivateKey")
719		ok.String(*v.CertificatePrivateKey)
720	}
721
722	if v.DomainName != nil {
723		ok := object.Key("domainName")
724		ok.String(*v.DomainName)
725	}
726
727	if v.EndpointConfiguration != nil {
728		ok := object.Key("endpointConfiguration")
729		if err := awsRestjson1_serializeDocumentEndpointConfiguration(v.EndpointConfiguration, ok); err != nil {
730			return err
731		}
732	}
733
734	if v.MutualTlsAuthentication != nil {
735		ok := object.Key("mutualTlsAuthentication")
736		if err := awsRestjson1_serializeDocumentMutualTlsAuthenticationInput(v.MutualTlsAuthentication, ok); err != nil {
737			return err
738		}
739	}
740
741	if v.RegionalCertificateArn != nil {
742		ok := object.Key("regionalCertificateArn")
743		ok.String(*v.RegionalCertificateArn)
744	}
745
746	if v.RegionalCertificateName != nil {
747		ok := object.Key("regionalCertificateName")
748		ok.String(*v.RegionalCertificateName)
749	}
750
751	if len(v.SecurityPolicy) > 0 {
752		ok := object.Key("securityPolicy")
753		ok.String(string(v.SecurityPolicy))
754	}
755
756	if v.Tags != nil {
757		ok := object.Key("tags")
758		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
759			return err
760		}
761	}
762
763	return nil
764}
765
766type awsRestjson1_serializeOpCreateModel struct {
767}
768
769func (*awsRestjson1_serializeOpCreateModel) ID() string {
770	return "OperationSerializer"
771}
772
773func (m *awsRestjson1_serializeOpCreateModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
774	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
775) {
776	request, ok := in.Request.(*smithyhttp.Request)
777	if !ok {
778		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
779	}
780
781	input, ok := in.Parameters.(*CreateModelInput)
782	_ = input
783	if !ok {
784		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
785	}
786
787	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models")
788	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
789	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
790	request.Method = "POST"
791	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
792	if err != nil {
793		return out, metadata, &smithy.SerializationError{Err: err}
794	}
795
796	if err := awsRestjson1_serializeOpHttpBindingsCreateModelInput(input, restEncoder); err != nil {
797		return out, metadata, &smithy.SerializationError{Err: err}
798	}
799
800	restEncoder.SetHeader("Content-Type").String("application/json")
801
802	jsonEncoder := smithyjson.NewEncoder()
803	if err := awsRestjson1_serializeOpDocumentCreateModelInput(input, jsonEncoder.Value); err != nil {
804		return out, metadata, &smithy.SerializationError{Err: err}
805	}
806
807	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
808		return out, metadata, &smithy.SerializationError{Err: err}
809	}
810
811	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
812		return out, metadata, &smithy.SerializationError{Err: err}
813	}
814	in.Request = request
815
816	return next.HandleSerialize(ctx, in)
817}
818func awsRestjson1_serializeOpHttpBindingsCreateModelInput(v *CreateModelInput, encoder *httpbinding.Encoder) error {
819	if v == nil {
820		return fmt.Errorf("unsupported serialization of nil %T", v)
821	}
822
823	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
824		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
825	}
826	if v.RestApiId != nil {
827		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
828			return err
829		}
830	}
831
832	return nil
833}
834
835func awsRestjson1_serializeOpDocumentCreateModelInput(v *CreateModelInput, value smithyjson.Value) error {
836	object := value.Object()
837	defer object.Close()
838
839	if v.ContentType != nil {
840		ok := object.Key("contentType")
841		ok.String(*v.ContentType)
842	}
843
844	if v.Description != nil {
845		ok := object.Key("description")
846		ok.String(*v.Description)
847	}
848
849	if v.Name != nil {
850		ok := object.Key("name")
851		ok.String(*v.Name)
852	}
853
854	if v.Schema != nil {
855		ok := object.Key("schema")
856		ok.String(*v.Schema)
857	}
858
859	return nil
860}
861
862type awsRestjson1_serializeOpCreateRequestValidator struct {
863}
864
865func (*awsRestjson1_serializeOpCreateRequestValidator) ID() string {
866	return "OperationSerializer"
867}
868
869func (m *awsRestjson1_serializeOpCreateRequestValidator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
870	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
871) {
872	request, ok := in.Request.(*smithyhttp.Request)
873	if !ok {
874		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
875	}
876
877	input, ok := in.Parameters.(*CreateRequestValidatorInput)
878	_ = input
879	if !ok {
880		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
881	}
882
883	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators")
884	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
885	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
886	request.Method = "POST"
887	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
888	if err != nil {
889		return out, metadata, &smithy.SerializationError{Err: err}
890	}
891
892	if err := awsRestjson1_serializeOpHttpBindingsCreateRequestValidatorInput(input, restEncoder); err != nil {
893		return out, metadata, &smithy.SerializationError{Err: err}
894	}
895
896	restEncoder.SetHeader("Content-Type").String("application/json")
897
898	jsonEncoder := smithyjson.NewEncoder()
899	if err := awsRestjson1_serializeOpDocumentCreateRequestValidatorInput(input, jsonEncoder.Value); err != nil {
900		return out, metadata, &smithy.SerializationError{Err: err}
901	}
902
903	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
904		return out, metadata, &smithy.SerializationError{Err: err}
905	}
906
907	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
908		return out, metadata, &smithy.SerializationError{Err: err}
909	}
910	in.Request = request
911
912	return next.HandleSerialize(ctx, in)
913}
914func awsRestjson1_serializeOpHttpBindingsCreateRequestValidatorInput(v *CreateRequestValidatorInput, encoder *httpbinding.Encoder) error {
915	if v == nil {
916		return fmt.Errorf("unsupported serialization of nil %T", v)
917	}
918
919	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
920		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
921	}
922	if v.RestApiId != nil {
923		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
924			return err
925		}
926	}
927
928	return nil
929}
930
931func awsRestjson1_serializeOpDocumentCreateRequestValidatorInput(v *CreateRequestValidatorInput, value smithyjson.Value) error {
932	object := value.Object()
933	defer object.Close()
934
935	if v.Name != nil {
936		ok := object.Key("name")
937		ok.String(*v.Name)
938	}
939
940	if v.ValidateRequestBody {
941		ok := object.Key("validateRequestBody")
942		ok.Boolean(v.ValidateRequestBody)
943	}
944
945	if v.ValidateRequestParameters {
946		ok := object.Key("validateRequestParameters")
947		ok.Boolean(v.ValidateRequestParameters)
948	}
949
950	return nil
951}
952
953type awsRestjson1_serializeOpCreateResource struct {
954}
955
956func (*awsRestjson1_serializeOpCreateResource) ID() string {
957	return "OperationSerializer"
958}
959
960func (m *awsRestjson1_serializeOpCreateResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
961	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
962) {
963	request, ok := in.Request.(*smithyhttp.Request)
964	if !ok {
965		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
966	}
967
968	input, ok := in.Parameters.(*CreateResourceInput)
969	_ = input
970	if !ok {
971		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
972	}
973
974	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{parentId}")
975	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
976	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
977	request.Method = "POST"
978	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
979	if err != nil {
980		return out, metadata, &smithy.SerializationError{Err: err}
981	}
982
983	if err := awsRestjson1_serializeOpHttpBindingsCreateResourceInput(input, restEncoder); err != nil {
984		return out, metadata, &smithy.SerializationError{Err: err}
985	}
986
987	restEncoder.SetHeader("Content-Type").String("application/json")
988
989	jsonEncoder := smithyjson.NewEncoder()
990	if err := awsRestjson1_serializeOpDocumentCreateResourceInput(input, jsonEncoder.Value); err != nil {
991		return out, metadata, &smithy.SerializationError{Err: err}
992	}
993
994	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
995		return out, metadata, &smithy.SerializationError{Err: err}
996	}
997
998	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
999		return out, metadata, &smithy.SerializationError{Err: err}
1000	}
1001	in.Request = request
1002
1003	return next.HandleSerialize(ctx, in)
1004}
1005func awsRestjson1_serializeOpHttpBindingsCreateResourceInput(v *CreateResourceInput, encoder *httpbinding.Encoder) error {
1006	if v == nil {
1007		return fmt.Errorf("unsupported serialization of nil %T", v)
1008	}
1009
1010	if v.ParentId == nil || len(*v.ParentId) == 0 {
1011		return &smithy.SerializationError{Err: fmt.Errorf("input member parentId must not be empty")}
1012	}
1013	if v.ParentId != nil {
1014		if err := encoder.SetURI("parentId").String(*v.ParentId); err != nil {
1015			return err
1016		}
1017	}
1018
1019	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
1020		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
1021	}
1022	if v.RestApiId != nil {
1023		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
1024			return err
1025		}
1026	}
1027
1028	return nil
1029}
1030
1031func awsRestjson1_serializeOpDocumentCreateResourceInput(v *CreateResourceInput, value smithyjson.Value) error {
1032	object := value.Object()
1033	defer object.Close()
1034
1035	if v.PathPart != nil {
1036		ok := object.Key("pathPart")
1037		ok.String(*v.PathPart)
1038	}
1039
1040	return nil
1041}
1042
1043type awsRestjson1_serializeOpCreateRestApi struct {
1044}
1045
1046func (*awsRestjson1_serializeOpCreateRestApi) ID() string {
1047	return "OperationSerializer"
1048}
1049
1050func (m *awsRestjson1_serializeOpCreateRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1051	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1052) {
1053	request, ok := in.Request.(*smithyhttp.Request)
1054	if !ok {
1055		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1056	}
1057
1058	input, ok := in.Parameters.(*CreateRestApiInput)
1059	_ = input
1060	if !ok {
1061		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1062	}
1063
1064	opPath, opQuery := httpbinding.SplitURI("/restapis")
1065	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1066	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1067	request.Method = "POST"
1068	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1069	if err != nil {
1070		return out, metadata, &smithy.SerializationError{Err: err}
1071	}
1072
1073	restEncoder.SetHeader("Content-Type").String("application/json")
1074
1075	jsonEncoder := smithyjson.NewEncoder()
1076	if err := awsRestjson1_serializeOpDocumentCreateRestApiInput(input, jsonEncoder.Value); err != nil {
1077		return out, metadata, &smithy.SerializationError{Err: err}
1078	}
1079
1080	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1081		return out, metadata, &smithy.SerializationError{Err: err}
1082	}
1083
1084	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1085		return out, metadata, &smithy.SerializationError{Err: err}
1086	}
1087	in.Request = request
1088
1089	return next.HandleSerialize(ctx, in)
1090}
1091func awsRestjson1_serializeOpHttpBindingsCreateRestApiInput(v *CreateRestApiInput, encoder *httpbinding.Encoder) error {
1092	if v == nil {
1093		return fmt.Errorf("unsupported serialization of nil %T", v)
1094	}
1095
1096	return nil
1097}
1098
1099func awsRestjson1_serializeOpDocumentCreateRestApiInput(v *CreateRestApiInput, value smithyjson.Value) error {
1100	object := value.Object()
1101	defer object.Close()
1102
1103	if len(v.ApiKeySource) > 0 {
1104		ok := object.Key("apiKeySource")
1105		ok.String(string(v.ApiKeySource))
1106	}
1107
1108	if v.BinaryMediaTypes != nil {
1109		ok := object.Key("binaryMediaTypes")
1110		if err := awsRestjson1_serializeDocumentListOfString(v.BinaryMediaTypes, ok); err != nil {
1111			return err
1112		}
1113	}
1114
1115	if v.CloneFrom != nil {
1116		ok := object.Key("cloneFrom")
1117		ok.String(*v.CloneFrom)
1118	}
1119
1120	if v.Description != nil {
1121		ok := object.Key("description")
1122		ok.String(*v.Description)
1123	}
1124
1125	if v.DisableExecuteApiEndpoint {
1126		ok := object.Key("disableExecuteApiEndpoint")
1127		ok.Boolean(v.DisableExecuteApiEndpoint)
1128	}
1129
1130	if v.EndpointConfiguration != nil {
1131		ok := object.Key("endpointConfiguration")
1132		if err := awsRestjson1_serializeDocumentEndpointConfiguration(v.EndpointConfiguration, ok); err != nil {
1133			return err
1134		}
1135	}
1136
1137	if v.MinimumCompressionSize != nil {
1138		ok := object.Key("minimumCompressionSize")
1139		ok.Integer(*v.MinimumCompressionSize)
1140	}
1141
1142	if v.Name != nil {
1143		ok := object.Key("name")
1144		ok.String(*v.Name)
1145	}
1146
1147	if v.Policy != nil {
1148		ok := object.Key("policy")
1149		ok.String(*v.Policy)
1150	}
1151
1152	if v.Tags != nil {
1153		ok := object.Key("tags")
1154		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
1155			return err
1156		}
1157	}
1158
1159	if v.Version != nil {
1160		ok := object.Key("version")
1161		ok.String(*v.Version)
1162	}
1163
1164	return nil
1165}
1166
1167type awsRestjson1_serializeOpCreateStage struct {
1168}
1169
1170func (*awsRestjson1_serializeOpCreateStage) ID() string {
1171	return "OperationSerializer"
1172}
1173
1174func (m *awsRestjson1_serializeOpCreateStage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1175	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1176) {
1177	request, ok := in.Request.(*smithyhttp.Request)
1178	if !ok {
1179		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1180	}
1181
1182	input, ok := in.Parameters.(*CreateStageInput)
1183	_ = input
1184	if !ok {
1185		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1186	}
1187
1188	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages")
1189	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1190	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1191	request.Method = "POST"
1192	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1193	if err != nil {
1194		return out, metadata, &smithy.SerializationError{Err: err}
1195	}
1196
1197	if err := awsRestjson1_serializeOpHttpBindingsCreateStageInput(input, restEncoder); err != nil {
1198		return out, metadata, &smithy.SerializationError{Err: err}
1199	}
1200
1201	restEncoder.SetHeader("Content-Type").String("application/json")
1202
1203	jsonEncoder := smithyjson.NewEncoder()
1204	if err := awsRestjson1_serializeOpDocumentCreateStageInput(input, jsonEncoder.Value); err != nil {
1205		return out, metadata, &smithy.SerializationError{Err: err}
1206	}
1207
1208	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1209		return out, metadata, &smithy.SerializationError{Err: err}
1210	}
1211
1212	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1213		return out, metadata, &smithy.SerializationError{Err: err}
1214	}
1215	in.Request = request
1216
1217	return next.HandleSerialize(ctx, in)
1218}
1219func awsRestjson1_serializeOpHttpBindingsCreateStageInput(v *CreateStageInput, encoder *httpbinding.Encoder) error {
1220	if v == nil {
1221		return fmt.Errorf("unsupported serialization of nil %T", v)
1222	}
1223
1224	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
1225		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
1226	}
1227	if v.RestApiId != nil {
1228		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
1229			return err
1230		}
1231	}
1232
1233	return nil
1234}
1235
1236func awsRestjson1_serializeOpDocumentCreateStageInput(v *CreateStageInput, value smithyjson.Value) error {
1237	object := value.Object()
1238	defer object.Close()
1239
1240	if v.CacheClusterEnabled {
1241		ok := object.Key("cacheClusterEnabled")
1242		ok.Boolean(v.CacheClusterEnabled)
1243	}
1244
1245	if len(v.CacheClusterSize) > 0 {
1246		ok := object.Key("cacheClusterSize")
1247		ok.String(string(v.CacheClusterSize))
1248	}
1249
1250	if v.CanarySettings != nil {
1251		ok := object.Key("canarySettings")
1252		if err := awsRestjson1_serializeDocumentCanarySettings(v.CanarySettings, ok); err != nil {
1253			return err
1254		}
1255	}
1256
1257	if v.DeploymentId != nil {
1258		ok := object.Key("deploymentId")
1259		ok.String(*v.DeploymentId)
1260	}
1261
1262	if v.Description != nil {
1263		ok := object.Key("description")
1264		ok.String(*v.Description)
1265	}
1266
1267	if v.DocumentationVersion != nil {
1268		ok := object.Key("documentationVersion")
1269		ok.String(*v.DocumentationVersion)
1270	}
1271
1272	if v.StageName != nil {
1273		ok := object.Key("stageName")
1274		ok.String(*v.StageName)
1275	}
1276
1277	if v.Tags != nil {
1278		ok := object.Key("tags")
1279		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
1280			return err
1281		}
1282	}
1283
1284	if v.TracingEnabled {
1285		ok := object.Key("tracingEnabled")
1286		ok.Boolean(v.TracingEnabled)
1287	}
1288
1289	if v.Variables != nil {
1290		ok := object.Key("variables")
1291		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Variables, ok); err != nil {
1292			return err
1293		}
1294	}
1295
1296	return nil
1297}
1298
1299type awsRestjson1_serializeOpCreateUsagePlan struct {
1300}
1301
1302func (*awsRestjson1_serializeOpCreateUsagePlan) ID() string {
1303	return "OperationSerializer"
1304}
1305
1306func (m *awsRestjson1_serializeOpCreateUsagePlan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1307	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1308) {
1309	request, ok := in.Request.(*smithyhttp.Request)
1310	if !ok {
1311		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1312	}
1313
1314	input, ok := in.Parameters.(*CreateUsagePlanInput)
1315	_ = input
1316	if !ok {
1317		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1318	}
1319
1320	opPath, opQuery := httpbinding.SplitURI("/usageplans")
1321	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1322	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1323	request.Method = "POST"
1324	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1325	if err != nil {
1326		return out, metadata, &smithy.SerializationError{Err: err}
1327	}
1328
1329	restEncoder.SetHeader("Content-Type").String("application/json")
1330
1331	jsonEncoder := smithyjson.NewEncoder()
1332	if err := awsRestjson1_serializeOpDocumentCreateUsagePlanInput(input, jsonEncoder.Value); err != nil {
1333		return out, metadata, &smithy.SerializationError{Err: err}
1334	}
1335
1336	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1337		return out, metadata, &smithy.SerializationError{Err: err}
1338	}
1339
1340	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1341		return out, metadata, &smithy.SerializationError{Err: err}
1342	}
1343	in.Request = request
1344
1345	return next.HandleSerialize(ctx, in)
1346}
1347func awsRestjson1_serializeOpHttpBindingsCreateUsagePlanInput(v *CreateUsagePlanInput, encoder *httpbinding.Encoder) error {
1348	if v == nil {
1349		return fmt.Errorf("unsupported serialization of nil %T", v)
1350	}
1351
1352	return nil
1353}
1354
1355func awsRestjson1_serializeOpDocumentCreateUsagePlanInput(v *CreateUsagePlanInput, value smithyjson.Value) error {
1356	object := value.Object()
1357	defer object.Close()
1358
1359	if v.ApiStages != nil {
1360		ok := object.Key("apiStages")
1361		if err := awsRestjson1_serializeDocumentListOfApiStage(v.ApiStages, ok); err != nil {
1362			return err
1363		}
1364	}
1365
1366	if v.Description != nil {
1367		ok := object.Key("description")
1368		ok.String(*v.Description)
1369	}
1370
1371	if v.Name != nil {
1372		ok := object.Key("name")
1373		ok.String(*v.Name)
1374	}
1375
1376	if v.Quota != nil {
1377		ok := object.Key("quota")
1378		if err := awsRestjson1_serializeDocumentQuotaSettings(v.Quota, ok); err != nil {
1379			return err
1380		}
1381	}
1382
1383	if v.Tags != nil {
1384		ok := object.Key("tags")
1385		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
1386			return err
1387		}
1388	}
1389
1390	if v.Throttle != nil {
1391		ok := object.Key("throttle")
1392		if err := awsRestjson1_serializeDocumentThrottleSettings(v.Throttle, ok); err != nil {
1393			return err
1394		}
1395	}
1396
1397	return nil
1398}
1399
1400type awsRestjson1_serializeOpCreateUsagePlanKey struct {
1401}
1402
1403func (*awsRestjson1_serializeOpCreateUsagePlanKey) ID() string {
1404	return "OperationSerializer"
1405}
1406
1407func (m *awsRestjson1_serializeOpCreateUsagePlanKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1408	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1409) {
1410	request, ok := in.Request.(*smithyhttp.Request)
1411	if !ok {
1412		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1413	}
1414
1415	input, ok := in.Parameters.(*CreateUsagePlanKeyInput)
1416	_ = input
1417	if !ok {
1418		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1419	}
1420
1421	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys")
1422	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1423	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1424	request.Method = "POST"
1425	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1426	if err != nil {
1427		return out, metadata, &smithy.SerializationError{Err: err}
1428	}
1429
1430	if err := awsRestjson1_serializeOpHttpBindingsCreateUsagePlanKeyInput(input, restEncoder); err != nil {
1431		return out, metadata, &smithy.SerializationError{Err: err}
1432	}
1433
1434	restEncoder.SetHeader("Content-Type").String("application/json")
1435
1436	jsonEncoder := smithyjson.NewEncoder()
1437	if err := awsRestjson1_serializeOpDocumentCreateUsagePlanKeyInput(input, jsonEncoder.Value); err != nil {
1438		return out, metadata, &smithy.SerializationError{Err: err}
1439	}
1440
1441	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1442		return out, metadata, &smithy.SerializationError{Err: err}
1443	}
1444
1445	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1446		return out, metadata, &smithy.SerializationError{Err: err}
1447	}
1448	in.Request = request
1449
1450	return next.HandleSerialize(ctx, in)
1451}
1452func awsRestjson1_serializeOpHttpBindingsCreateUsagePlanKeyInput(v *CreateUsagePlanKeyInput, encoder *httpbinding.Encoder) error {
1453	if v == nil {
1454		return fmt.Errorf("unsupported serialization of nil %T", v)
1455	}
1456
1457	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
1458		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
1459	}
1460	if v.UsagePlanId != nil {
1461		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
1462			return err
1463		}
1464	}
1465
1466	return nil
1467}
1468
1469func awsRestjson1_serializeOpDocumentCreateUsagePlanKeyInput(v *CreateUsagePlanKeyInput, value smithyjson.Value) error {
1470	object := value.Object()
1471	defer object.Close()
1472
1473	if v.KeyId != nil {
1474		ok := object.Key("keyId")
1475		ok.String(*v.KeyId)
1476	}
1477
1478	if v.KeyType != nil {
1479		ok := object.Key("keyType")
1480		ok.String(*v.KeyType)
1481	}
1482
1483	return nil
1484}
1485
1486type awsRestjson1_serializeOpCreateVpcLink struct {
1487}
1488
1489func (*awsRestjson1_serializeOpCreateVpcLink) ID() string {
1490	return "OperationSerializer"
1491}
1492
1493func (m *awsRestjson1_serializeOpCreateVpcLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1494	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1495) {
1496	request, ok := in.Request.(*smithyhttp.Request)
1497	if !ok {
1498		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1499	}
1500
1501	input, ok := in.Parameters.(*CreateVpcLinkInput)
1502	_ = input
1503	if !ok {
1504		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1505	}
1506
1507	opPath, opQuery := httpbinding.SplitURI("/vpclinks")
1508	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1509	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1510	request.Method = "POST"
1511	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1512	if err != nil {
1513		return out, metadata, &smithy.SerializationError{Err: err}
1514	}
1515
1516	restEncoder.SetHeader("Content-Type").String("application/json")
1517
1518	jsonEncoder := smithyjson.NewEncoder()
1519	if err := awsRestjson1_serializeOpDocumentCreateVpcLinkInput(input, jsonEncoder.Value); err != nil {
1520		return out, metadata, &smithy.SerializationError{Err: err}
1521	}
1522
1523	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1524		return out, metadata, &smithy.SerializationError{Err: err}
1525	}
1526
1527	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1528		return out, metadata, &smithy.SerializationError{Err: err}
1529	}
1530	in.Request = request
1531
1532	return next.HandleSerialize(ctx, in)
1533}
1534func awsRestjson1_serializeOpHttpBindingsCreateVpcLinkInput(v *CreateVpcLinkInput, encoder *httpbinding.Encoder) error {
1535	if v == nil {
1536		return fmt.Errorf("unsupported serialization of nil %T", v)
1537	}
1538
1539	return nil
1540}
1541
1542func awsRestjson1_serializeOpDocumentCreateVpcLinkInput(v *CreateVpcLinkInput, value smithyjson.Value) error {
1543	object := value.Object()
1544	defer object.Close()
1545
1546	if v.Description != nil {
1547		ok := object.Key("description")
1548		ok.String(*v.Description)
1549	}
1550
1551	if v.Name != nil {
1552		ok := object.Key("name")
1553		ok.String(*v.Name)
1554	}
1555
1556	if v.Tags != nil {
1557		ok := object.Key("tags")
1558		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
1559			return err
1560		}
1561	}
1562
1563	if v.TargetArns != nil {
1564		ok := object.Key("targetArns")
1565		if err := awsRestjson1_serializeDocumentListOfString(v.TargetArns, ok); err != nil {
1566			return err
1567		}
1568	}
1569
1570	return nil
1571}
1572
1573type awsRestjson1_serializeOpDeleteApiKey struct {
1574}
1575
1576func (*awsRestjson1_serializeOpDeleteApiKey) ID() string {
1577	return "OperationSerializer"
1578}
1579
1580func (m *awsRestjson1_serializeOpDeleteApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1581	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1582) {
1583	request, ok := in.Request.(*smithyhttp.Request)
1584	if !ok {
1585		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1586	}
1587
1588	input, ok := in.Parameters.(*DeleteApiKeyInput)
1589	_ = input
1590	if !ok {
1591		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1592	}
1593
1594	opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}")
1595	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1596	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1597	request.Method = "DELETE"
1598	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1599	if err != nil {
1600		return out, metadata, &smithy.SerializationError{Err: err}
1601	}
1602
1603	if err := awsRestjson1_serializeOpHttpBindingsDeleteApiKeyInput(input, restEncoder); err != nil {
1604		return out, metadata, &smithy.SerializationError{Err: err}
1605	}
1606
1607	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1608		return out, metadata, &smithy.SerializationError{Err: err}
1609	}
1610	in.Request = request
1611
1612	return next.HandleSerialize(ctx, in)
1613}
1614func awsRestjson1_serializeOpHttpBindingsDeleteApiKeyInput(v *DeleteApiKeyInput, encoder *httpbinding.Encoder) error {
1615	if v == nil {
1616		return fmt.Errorf("unsupported serialization of nil %T", v)
1617	}
1618
1619	if v.ApiKey == nil || len(*v.ApiKey) == 0 {
1620		return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")}
1621	}
1622	if v.ApiKey != nil {
1623		if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil {
1624			return err
1625		}
1626	}
1627
1628	return nil
1629}
1630
1631type awsRestjson1_serializeOpDeleteAuthorizer struct {
1632}
1633
1634func (*awsRestjson1_serializeOpDeleteAuthorizer) ID() string {
1635	return "OperationSerializer"
1636}
1637
1638func (m *awsRestjson1_serializeOpDeleteAuthorizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1639	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1640) {
1641	request, ok := in.Request.(*smithyhttp.Request)
1642	if !ok {
1643		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1644	}
1645
1646	input, ok := in.Parameters.(*DeleteAuthorizerInput)
1647	_ = input
1648	if !ok {
1649		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1650	}
1651
1652	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}")
1653	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1654	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1655	request.Method = "DELETE"
1656	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1657	if err != nil {
1658		return out, metadata, &smithy.SerializationError{Err: err}
1659	}
1660
1661	if err := awsRestjson1_serializeOpHttpBindingsDeleteAuthorizerInput(input, restEncoder); err != nil {
1662		return out, metadata, &smithy.SerializationError{Err: err}
1663	}
1664
1665	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1666		return out, metadata, &smithy.SerializationError{Err: err}
1667	}
1668	in.Request = request
1669
1670	return next.HandleSerialize(ctx, in)
1671}
1672func awsRestjson1_serializeOpHttpBindingsDeleteAuthorizerInput(v *DeleteAuthorizerInput, encoder *httpbinding.Encoder) error {
1673	if v == nil {
1674		return fmt.Errorf("unsupported serialization of nil %T", v)
1675	}
1676
1677	if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 {
1678		return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")}
1679	}
1680	if v.AuthorizerId != nil {
1681		if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil {
1682			return err
1683		}
1684	}
1685
1686	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
1687		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
1688	}
1689	if v.RestApiId != nil {
1690		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
1691			return err
1692		}
1693	}
1694
1695	return nil
1696}
1697
1698type awsRestjson1_serializeOpDeleteBasePathMapping struct {
1699}
1700
1701func (*awsRestjson1_serializeOpDeleteBasePathMapping) ID() string {
1702	return "OperationSerializer"
1703}
1704
1705func (m *awsRestjson1_serializeOpDeleteBasePathMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1706	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1707) {
1708	request, ok := in.Request.(*smithyhttp.Request)
1709	if !ok {
1710		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1711	}
1712
1713	input, ok := in.Parameters.(*DeleteBasePathMappingInput)
1714	_ = input
1715	if !ok {
1716		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1717	}
1718
1719	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}")
1720	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1721	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1722	request.Method = "DELETE"
1723	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1724	if err != nil {
1725		return out, metadata, &smithy.SerializationError{Err: err}
1726	}
1727
1728	if err := awsRestjson1_serializeOpHttpBindingsDeleteBasePathMappingInput(input, restEncoder); err != nil {
1729		return out, metadata, &smithy.SerializationError{Err: err}
1730	}
1731
1732	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1733		return out, metadata, &smithy.SerializationError{Err: err}
1734	}
1735	in.Request = request
1736
1737	return next.HandleSerialize(ctx, in)
1738}
1739func awsRestjson1_serializeOpHttpBindingsDeleteBasePathMappingInput(v *DeleteBasePathMappingInput, encoder *httpbinding.Encoder) error {
1740	if v == nil {
1741		return fmt.Errorf("unsupported serialization of nil %T", v)
1742	}
1743
1744	if v.BasePath == nil || len(*v.BasePath) == 0 {
1745		return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")}
1746	}
1747	if v.BasePath != nil {
1748		if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil {
1749			return err
1750		}
1751	}
1752
1753	if v.DomainName == nil || len(*v.DomainName) == 0 {
1754		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
1755	}
1756	if v.DomainName != nil {
1757		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
1758			return err
1759		}
1760	}
1761
1762	return nil
1763}
1764
1765type awsRestjson1_serializeOpDeleteClientCertificate struct {
1766}
1767
1768func (*awsRestjson1_serializeOpDeleteClientCertificate) ID() string {
1769	return "OperationSerializer"
1770}
1771
1772func (m *awsRestjson1_serializeOpDeleteClientCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1773	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1774) {
1775	request, ok := in.Request.(*smithyhttp.Request)
1776	if !ok {
1777		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1778	}
1779
1780	input, ok := in.Parameters.(*DeleteClientCertificateInput)
1781	_ = input
1782	if !ok {
1783		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1784	}
1785
1786	opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}")
1787	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1788	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1789	request.Method = "DELETE"
1790	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1791	if err != nil {
1792		return out, metadata, &smithy.SerializationError{Err: err}
1793	}
1794
1795	if err := awsRestjson1_serializeOpHttpBindingsDeleteClientCertificateInput(input, restEncoder); err != nil {
1796		return out, metadata, &smithy.SerializationError{Err: err}
1797	}
1798
1799	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1800		return out, metadata, &smithy.SerializationError{Err: err}
1801	}
1802	in.Request = request
1803
1804	return next.HandleSerialize(ctx, in)
1805}
1806func awsRestjson1_serializeOpHttpBindingsDeleteClientCertificateInput(v *DeleteClientCertificateInput, encoder *httpbinding.Encoder) error {
1807	if v == nil {
1808		return fmt.Errorf("unsupported serialization of nil %T", v)
1809	}
1810
1811	if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 {
1812		return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")}
1813	}
1814	if v.ClientCertificateId != nil {
1815		if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil {
1816			return err
1817		}
1818	}
1819
1820	return nil
1821}
1822
1823type awsRestjson1_serializeOpDeleteDeployment struct {
1824}
1825
1826func (*awsRestjson1_serializeOpDeleteDeployment) ID() string {
1827	return "OperationSerializer"
1828}
1829
1830func (m *awsRestjson1_serializeOpDeleteDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1831	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1832) {
1833	request, ok := in.Request.(*smithyhttp.Request)
1834	if !ok {
1835		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1836	}
1837
1838	input, ok := in.Parameters.(*DeleteDeploymentInput)
1839	_ = input
1840	if !ok {
1841		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1842	}
1843
1844	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}")
1845	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1846	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1847	request.Method = "DELETE"
1848	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1849	if err != nil {
1850		return out, metadata, &smithy.SerializationError{Err: err}
1851	}
1852
1853	if err := awsRestjson1_serializeOpHttpBindingsDeleteDeploymentInput(input, restEncoder); err != nil {
1854		return out, metadata, &smithy.SerializationError{Err: err}
1855	}
1856
1857	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1858		return out, metadata, &smithy.SerializationError{Err: err}
1859	}
1860	in.Request = request
1861
1862	return next.HandleSerialize(ctx, in)
1863}
1864func awsRestjson1_serializeOpHttpBindingsDeleteDeploymentInput(v *DeleteDeploymentInput, encoder *httpbinding.Encoder) error {
1865	if v == nil {
1866		return fmt.Errorf("unsupported serialization of nil %T", v)
1867	}
1868
1869	if v.DeploymentId == nil || len(*v.DeploymentId) == 0 {
1870		return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")}
1871	}
1872	if v.DeploymentId != nil {
1873		if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil {
1874			return err
1875		}
1876	}
1877
1878	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
1879		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
1880	}
1881	if v.RestApiId != nil {
1882		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
1883			return err
1884		}
1885	}
1886
1887	return nil
1888}
1889
1890type awsRestjson1_serializeOpDeleteDocumentationPart struct {
1891}
1892
1893func (*awsRestjson1_serializeOpDeleteDocumentationPart) ID() string {
1894	return "OperationSerializer"
1895}
1896
1897func (m *awsRestjson1_serializeOpDeleteDocumentationPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1898	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1899) {
1900	request, ok := in.Request.(*smithyhttp.Request)
1901	if !ok {
1902		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1903	}
1904
1905	input, ok := in.Parameters.(*DeleteDocumentationPartInput)
1906	_ = input
1907	if !ok {
1908		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1909	}
1910
1911	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}")
1912	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1913	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1914	request.Method = "DELETE"
1915	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1916	if err != nil {
1917		return out, metadata, &smithy.SerializationError{Err: err}
1918	}
1919
1920	if err := awsRestjson1_serializeOpHttpBindingsDeleteDocumentationPartInput(input, restEncoder); err != nil {
1921		return out, metadata, &smithy.SerializationError{Err: err}
1922	}
1923
1924	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1925		return out, metadata, &smithy.SerializationError{Err: err}
1926	}
1927	in.Request = request
1928
1929	return next.HandleSerialize(ctx, in)
1930}
1931func awsRestjson1_serializeOpHttpBindingsDeleteDocumentationPartInput(v *DeleteDocumentationPartInput, encoder *httpbinding.Encoder) error {
1932	if v == nil {
1933		return fmt.Errorf("unsupported serialization of nil %T", v)
1934	}
1935
1936	if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 {
1937		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")}
1938	}
1939	if v.DocumentationPartId != nil {
1940		if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil {
1941			return err
1942		}
1943	}
1944
1945	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
1946		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
1947	}
1948	if v.RestApiId != nil {
1949		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
1950			return err
1951		}
1952	}
1953
1954	return nil
1955}
1956
1957type awsRestjson1_serializeOpDeleteDocumentationVersion struct {
1958}
1959
1960func (*awsRestjson1_serializeOpDeleteDocumentationVersion) ID() string {
1961	return "OperationSerializer"
1962}
1963
1964func (m *awsRestjson1_serializeOpDeleteDocumentationVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1965	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1966) {
1967	request, ok := in.Request.(*smithyhttp.Request)
1968	if !ok {
1969		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1970	}
1971
1972	input, ok := in.Parameters.(*DeleteDocumentationVersionInput)
1973	_ = input
1974	if !ok {
1975		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1976	}
1977
1978	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}")
1979	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1980	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1981	request.Method = "DELETE"
1982	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1983	if err != nil {
1984		return out, metadata, &smithy.SerializationError{Err: err}
1985	}
1986
1987	if err := awsRestjson1_serializeOpHttpBindingsDeleteDocumentationVersionInput(input, restEncoder); err != nil {
1988		return out, metadata, &smithy.SerializationError{Err: err}
1989	}
1990
1991	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1992		return out, metadata, &smithy.SerializationError{Err: err}
1993	}
1994	in.Request = request
1995
1996	return next.HandleSerialize(ctx, in)
1997}
1998func awsRestjson1_serializeOpHttpBindingsDeleteDocumentationVersionInput(v *DeleteDocumentationVersionInput, encoder *httpbinding.Encoder) error {
1999	if v == nil {
2000		return fmt.Errorf("unsupported serialization of nil %T", v)
2001	}
2002
2003	if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 {
2004		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")}
2005	}
2006	if v.DocumentationVersion != nil {
2007		if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil {
2008			return err
2009		}
2010	}
2011
2012	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2013		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2014	}
2015	if v.RestApiId != nil {
2016		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2017			return err
2018		}
2019	}
2020
2021	return nil
2022}
2023
2024type awsRestjson1_serializeOpDeleteDomainName struct {
2025}
2026
2027func (*awsRestjson1_serializeOpDeleteDomainName) ID() string {
2028	return "OperationSerializer"
2029}
2030
2031func (m *awsRestjson1_serializeOpDeleteDomainName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2032	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2033) {
2034	request, ok := in.Request.(*smithyhttp.Request)
2035	if !ok {
2036		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2037	}
2038
2039	input, ok := in.Parameters.(*DeleteDomainNameInput)
2040	_ = input
2041	if !ok {
2042		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2043	}
2044
2045	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}")
2046	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2047	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2048	request.Method = "DELETE"
2049	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2050	if err != nil {
2051		return out, metadata, &smithy.SerializationError{Err: err}
2052	}
2053
2054	if err := awsRestjson1_serializeOpHttpBindingsDeleteDomainNameInput(input, restEncoder); err != nil {
2055		return out, metadata, &smithy.SerializationError{Err: err}
2056	}
2057
2058	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2059		return out, metadata, &smithy.SerializationError{Err: err}
2060	}
2061	in.Request = request
2062
2063	return next.HandleSerialize(ctx, in)
2064}
2065func awsRestjson1_serializeOpHttpBindingsDeleteDomainNameInput(v *DeleteDomainNameInput, encoder *httpbinding.Encoder) error {
2066	if v == nil {
2067		return fmt.Errorf("unsupported serialization of nil %T", v)
2068	}
2069
2070	if v.DomainName == nil || len(*v.DomainName) == 0 {
2071		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
2072	}
2073	if v.DomainName != nil {
2074		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
2075			return err
2076		}
2077	}
2078
2079	return nil
2080}
2081
2082type awsRestjson1_serializeOpDeleteGatewayResponse struct {
2083}
2084
2085func (*awsRestjson1_serializeOpDeleteGatewayResponse) ID() string {
2086	return "OperationSerializer"
2087}
2088
2089func (m *awsRestjson1_serializeOpDeleteGatewayResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2090	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2091) {
2092	request, ok := in.Request.(*smithyhttp.Request)
2093	if !ok {
2094		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2095	}
2096
2097	input, ok := in.Parameters.(*DeleteGatewayResponseInput)
2098	_ = input
2099	if !ok {
2100		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2101	}
2102
2103	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}")
2104	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2105	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2106	request.Method = "DELETE"
2107	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2108	if err != nil {
2109		return out, metadata, &smithy.SerializationError{Err: err}
2110	}
2111
2112	if err := awsRestjson1_serializeOpHttpBindingsDeleteGatewayResponseInput(input, restEncoder); err != nil {
2113		return out, metadata, &smithy.SerializationError{Err: err}
2114	}
2115
2116	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2117		return out, metadata, &smithy.SerializationError{Err: err}
2118	}
2119	in.Request = request
2120
2121	return next.HandleSerialize(ctx, in)
2122}
2123func awsRestjson1_serializeOpHttpBindingsDeleteGatewayResponseInput(v *DeleteGatewayResponseInput, encoder *httpbinding.Encoder) error {
2124	if v == nil {
2125		return fmt.Errorf("unsupported serialization of nil %T", v)
2126	}
2127
2128	if len(v.ResponseType) == 0 {
2129		return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")}
2130	}
2131	if len(v.ResponseType) > 0 {
2132		if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil {
2133			return err
2134		}
2135	}
2136
2137	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2138		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2139	}
2140	if v.RestApiId != nil {
2141		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2142			return err
2143		}
2144	}
2145
2146	return nil
2147}
2148
2149type awsRestjson1_serializeOpDeleteIntegration struct {
2150}
2151
2152func (*awsRestjson1_serializeOpDeleteIntegration) ID() string {
2153	return "OperationSerializer"
2154}
2155
2156func (m *awsRestjson1_serializeOpDeleteIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2157	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2158) {
2159	request, ok := in.Request.(*smithyhttp.Request)
2160	if !ok {
2161		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2162	}
2163
2164	input, ok := in.Parameters.(*DeleteIntegrationInput)
2165	_ = input
2166	if !ok {
2167		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2168	}
2169
2170	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration")
2171	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2172	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2173	request.Method = "DELETE"
2174	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2175	if err != nil {
2176		return out, metadata, &smithy.SerializationError{Err: err}
2177	}
2178
2179	if err := awsRestjson1_serializeOpHttpBindingsDeleteIntegrationInput(input, restEncoder); err != nil {
2180		return out, metadata, &smithy.SerializationError{Err: err}
2181	}
2182
2183	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2184		return out, metadata, &smithy.SerializationError{Err: err}
2185	}
2186	in.Request = request
2187
2188	return next.HandleSerialize(ctx, in)
2189}
2190func awsRestjson1_serializeOpHttpBindingsDeleteIntegrationInput(v *DeleteIntegrationInput, encoder *httpbinding.Encoder) error {
2191	if v == nil {
2192		return fmt.Errorf("unsupported serialization of nil %T", v)
2193	}
2194
2195	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
2196		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
2197	}
2198	if v.HttpMethod != nil {
2199		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
2200			return err
2201		}
2202	}
2203
2204	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
2205		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
2206	}
2207	if v.ResourceId != nil {
2208		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
2209			return err
2210		}
2211	}
2212
2213	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2214		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2215	}
2216	if v.RestApiId != nil {
2217		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2218			return err
2219		}
2220	}
2221
2222	return nil
2223}
2224
2225type awsRestjson1_serializeOpDeleteIntegrationResponse struct {
2226}
2227
2228func (*awsRestjson1_serializeOpDeleteIntegrationResponse) ID() string {
2229	return "OperationSerializer"
2230}
2231
2232func (m *awsRestjson1_serializeOpDeleteIntegrationResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2233	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2234) {
2235	request, ok := in.Request.(*smithyhttp.Request)
2236	if !ok {
2237		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2238	}
2239
2240	input, ok := in.Parameters.(*DeleteIntegrationResponseInput)
2241	_ = input
2242	if !ok {
2243		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2244	}
2245
2246	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}")
2247	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2248	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2249	request.Method = "DELETE"
2250	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2251	if err != nil {
2252		return out, metadata, &smithy.SerializationError{Err: err}
2253	}
2254
2255	if err := awsRestjson1_serializeOpHttpBindingsDeleteIntegrationResponseInput(input, restEncoder); err != nil {
2256		return out, metadata, &smithy.SerializationError{Err: err}
2257	}
2258
2259	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2260		return out, metadata, &smithy.SerializationError{Err: err}
2261	}
2262	in.Request = request
2263
2264	return next.HandleSerialize(ctx, in)
2265}
2266func awsRestjson1_serializeOpHttpBindingsDeleteIntegrationResponseInput(v *DeleteIntegrationResponseInput, encoder *httpbinding.Encoder) error {
2267	if v == nil {
2268		return fmt.Errorf("unsupported serialization of nil %T", v)
2269	}
2270
2271	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
2272		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
2273	}
2274	if v.HttpMethod != nil {
2275		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
2276			return err
2277		}
2278	}
2279
2280	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
2281		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
2282	}
2283	if v.ResourceId != nil {
2284		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
2285			return err
2286		}
2287	}
2288
2289	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2290		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2291	}
2292	if v.RestApiId != nil {
2293		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2294			return err
2295		}
2296	}
2297
2298	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
2299		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
2300	}
2301	if v.StatusCode != nil {
2302		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
2303			return err
2304		}
2305	}
2306
2307	return nil
2308}
2309
2310type awsRestjson1_serializeOpDeleteMethod struct {
2311}
2312
2313func (*awsRestjson1_serializeOpDeleteMethod) ID() string {
2314	return "OperationSerializer"
2315}
2316
2317func (m *awsRestjson1_serializeOpDeleteMethod) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2318	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2319) {
2320	request, ok := in.Request.(*smithyhttp.Request)
2321	if !ok {
2322		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2323	}
2324
2325	input, ok := in.Parameters.(*DeleteMethodInput)
2326	_ = input
2327	if !ok {
2328		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2329	}
2330
2331	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}")
2332	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2333	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2334	request.Method = "DELETE"
2335	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2336	if err != nil {
2337		return out, metadata, &smithy.SerializationError{Err: err}
2338	}
2339
2340	if err := awsRestjson1_serializeOpHttpBindingsDeleteMethodInput(input, restEncoder); err != nil {
2341		return out, metadata, &smithy.SerializationError{Err: err}
2342	}
2343
2344	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2345		return out, metadata, &smithy.SerializationError{Err: err}
2346	}
2347	in.Request = request
2348
2349	return next.HandleSerialize(ctx, in)
2350}
2351func awsRestjson1_serializeOpHttpBindingsDeleteMethodInput(v *DeleteMethodInput, encoder *httpbinding.Encoder) error {
2352	if v == nil {
2353		return fmt.Errorf("unsupported serialization of nil %T", v)
2354	}
2355
2356	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
2357		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
2358	}
2359	if v.HttpMethod != nil {
2360		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
2361			return err
2362		}
2363	}
2364
2365	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
2366		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
2367	}
2368	if v.ResourceId != nil {
2369		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
2370			return err
2371		}
2372	}
2373
2374	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2375		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2376	}
2377	if v.RestApiId != nil {
2378		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2379			return err
2380		}
2381	}
2382
2383	return nil
2384}
2385
2386type awsRestjson1_serializeOpDeleteMethodResponse struct {
2387}
2388
2389func (*awsRestjson1_serializeOpDeleteMethodResponse) ID() string {
2390	return "OperationSerializer"
2391}
2392
2393func (m *awsRestjson1_serializeOpDeleteMethodResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2394	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2395) {
2396	request, ok := in.Request.(*smithyhttp.Request)
2397	if !ok {
2398		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2399	}
2400
2401	input, ok := in.Parameters.(*DeleteMethodResponseInput)
2402	_ = input
2403	if !ok {
2404		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2405	}
2406
2407	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}")
2408	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2409	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2410	request.Method = "DELETE"
2411	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2412	if err != nil {
2413		return out, metadata, &smithy.SerializationError{Err: err}
2414	}
2415
2416	if err := awsRestjson1_serializeOpHttpBindingsDeleteMethodResponseInput(input, restEncoder); err != nil {
2417		return out, metadata, &smithy.SerializationError{Err: err}
2418	}
2419
2420	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2421		return out, metadata, &smithy.SerializationError{Err: err}
2422	}
2423	in.Request = request
2424
2425	return next.HandleSerialize(ctx, in)
2426}
2427func awsRestjson1_serializeOpHttpBindingsDeleteMethodResponseInput(v *DeleteMethodResponseInput, encoder *httpbinding.Encoder) error {
2428	if v == nil {
2429		return fmt.Errorf("unsupported serialization of nil %T", v)
2430	}
2431
2432	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
2433		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
2434	}
2435	if v.HttpMethod != nil {
2436		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
2437			return err
2438		}
2439	}
2440
2441	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
2442		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
2443	}
2444	if v.ResourceId != nil {
2445		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
2446			return err
2447		}
2448	}
2449
2450	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2451		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2452	}
2453	if v.RestApiId != nil {
2454		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2455			return err
2456		}
2457	}
2458
2459	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
2460		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
2461	}
2462	if v.StatusCode != nil {
2463		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
2464			return err
2465		}
2466	}
2467
2468	return nil
2469}
2470
2471type awsRestjson1_serializeOpDeleteModel struct {
2472}
2473
2474func (*awsRestjson1_serializeOpDeleteModel) ID() string {
2475	return "OperationSerializer"
2476}
2477
2478func (m *awsRestjson1_serializeOpDeleteModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2479	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2480) {
2481	request, ok := in.Request.(*smithyhttp.Request)
2482	if !ok {
2483		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2484	}
2485
2486	input, ok := in.Parameters.(*DeleteModelInput)
2487	_ = input
2488	if !ok {
2489		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2490	}
2491
2492	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}")
2493	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2494	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2495	request.Method = "DELETE"
2496	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2497	if err != nil {
2498		return out, metadata, &smithy.SerializationError{Err: err}
2499	}
2500
2501	if err := awsRestjson1_serializeOpHttpBindingsDeleteModelInput(input, restEncoder); err != nil {
2502		return out, metadata, &smithy.SerializationError{Err: err}
2503	}
2504
2505	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2506		return out, metadata, &smithy.SerializationError{Err: err}
2507	}
2508	in.Request = request
2509
2510	return next.HandleSerialize(ctx, in)
2511}
2512func awsRestjson1_serializeOpHttpBindingsDeleteModelInput(v *DeleteModelInput, encoder *httpbinding.Encoder) error {
2513	if v == nil {
2514		return fmt.Errorf("unsupported serialization of nil %T", v)
2515	}
2516
2517	if v.ModelName == nil || len(*v.ModelName) == 0 {
2518		return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")}
2519	}
2520	if v.ModelName != nil {
2521		if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil {
2522			return err
2523		}
2524	}
2525
2526	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2527		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2528	}
2529	if v.RestApiId != nil {
2530		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2531			return err
2532		}
2533	}
2534
2535	return nil
2536}
2537
2538type awsRestjson1_serializeOpDeleteRequestValidator struct {
2539}
2540
2541func (*awsRestjson1_serializeOpDeleteRequestValidator) ID() string {
2542	return "OperationSerializer"
2543}
2544
2545func (m *awsRestjson1_serializeOpDeleteRequestValidator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2546	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2547) {
2548	request, ok := in.Request.(*smithyhttp.Request)
2549	if !ok {
2550		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2551	}
2552
2553	input, ok := in.Parameters.(*DeleteRequestValidatorInput)
2554	_ = input
2555	if !ok {
2556		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2557	}
2558
2559	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}")
2560	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2561	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2562	request.Method = "DELETE"
2563	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2564	if err != nil {
2565		return out, metadata, &smithy.SerializationError{Err: err}
2566	}
2567
2568	if err := awsRestjson1_serializeOpHttpBindingsDeleteRequestValidatorInput(input, restEncoder); err != nil {
2569		return out, metadata, &smithy.SerializationError{Err: err}
2570	}
2571
2572	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2573		return out, metadata, &smithy.SerializationError{Err: err}
2574	}
2575	in.Request = request
2576
2577	return next.HandleSerialize(ctx, in)
2578}
2579func awsRestjson1_serializeOpHttpBindingsDeleteRequestValidatorInput(v *DeleteRequestValidatorInput, encoder *httpbinding.Encoder) error {
2580	if v == nil {
2581		return fmt.Errorf("unsupported serialization of nil %T", v)
2582	}
2583
2584	if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 {
2585		return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")}
2586	}
2587	if v.RequestValidatorId != nil {
2588		if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil {
2589			return err
2590		}
2591	}
2592
2593	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2594		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2595	}
2596	if v.RestApiId != nil {
2597		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2598			return err
2599		}
2600	}
2601
2602	return nil
2603}
2604
2605type awsRestjson1_serializeOpDeleteResource struct {
2606}
2607
2608func (*awsRestjson1_serializeOpDeleteResource) ID() string {
2609	return "OperationSerializer"
2610}
2611
2612func (m *awsRestjson1_serializeOpDeleteResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2613	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2614) {
2615	request, ok := in.Request.(*smithyhttp.Request)
2616	if !ok {
2617		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2618	}
2619
2620	input, ok := in.Parameters.(*DeleteResourceInput)
2621	_ = input
2622	if !ok {
2623		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2624	}
2625
2626	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}")
2627	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2628	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2629	request.Method = "DELETE"
2630	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2631	if err != nil {
2632		return out, metadata, &smithy.SerializationError{Err: err}
2633	}
2634
2635	if err := awsRestjson1_serializeOpHttpBindingsDeleteResourceInput(input, restEncoder); err != nil {
2636		return out, metadata, &smithy.SerializationError{Err: err}
2637	}
2638
2639	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2640		return out, metadata, &smithy.SerializationError{Err: err}
2641	}
2642	in.Request = request
2643
2644	return next.HandleSerialize(ctx, in)
2645}
2646func awsRestjson1_serializeOpHttpBindingsDeleteResourceInput(v *DeleteResourceInput, encoder *httpbinding.Encoder) error {
2647	if v == nil {
2648		return fmt.Errorf("unsupported serialization of nil %T", v)
2649	}
2650
2651	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
2652		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
2653	}
2654	if v.ResourceId != nil {
2655		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
2656			return err
2657		}
2658	}
2659
2660	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2661		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2662	}
2663	if v.RestApiId != nil {
2664		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2665			return err
2666		}
2667	}
2668
2669	return nil
2670}
2671
2672type awsRestjson1_serializeOpDeleteRestApi struct {
2673}
2674
2675func (*awsRestjson1_serializeOpDeleteRestApi) ID() string {
2676	return "OperationSerializer"
2677}
2678
2679func (m *awsRestjson1_serializeOpDeleteRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2680	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2681) {
2682	request, ok := in.Request.(*smithyhttp.Request)
2683	if !ok {
2684		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2685	}
2686
2687	input, ok := in.Parameters.(*DeleteRestApiInput)
2688	_ = input
2689	if !ok {
2690		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2691	}
2692
2693	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}")
2694	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2695	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2696	request.Method = "DELETE"
2697	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2698	if err != nil {
2699		return out, metadata, &smithy.SerializationError{Err: err}
2700	}
2701
2702	if err := awsRestjson1_serializeOpHttpBindingsDeleteRestApiInput(input, restEncoder); err != nil {
2703		return out, metadata, &smithy.SerializationError{Err: err}
2704	}
2705
2706	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2707		return out, metadata, &smithy.SerializationError{Err: err}
2708	}
2709	in.Request = request
2710
2711	return next.HandleSerialize(ctx, in)
2712}
2713func awsRestjson1_serializeOpHttpBindingsDeleteRestApiInput(v *DeleteRestApiInput, encoder *httpbinding.Encoder) error {
2714	if v == nil {
2715		return fmt.Errorf("unsupported serialization of nil %T", v)
2716	}
2717
2718	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2719		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2720	}
2721	if v.RestApiId != nil {
2722		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2723			return err
2724		}
2725	}
2726
2727	return nil
2728}
2729
2730type awsRestjson1_serializeOpDeleteStage struct {
2731}
2732
2733func (*awsRestjson1_serializeOpDeleteStage) ID() string {
2734	return "OperationSerializer"
2735}
2736
2737func (m *awsRestjson1_serializeOpDeleteStage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2738	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2739) {
2740	request, ok := in.Request.(*smithyhttp.Request)
2741	if !ok {
2742		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2743	}
2744
2745	input, ok := in.Parameters.(*DeleteStageInput)
2746	_ = input
2747	if !ok {
2748		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2749	}
2750
2751	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}")
2752	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2753	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2754	request.Method = "DELETE"
2755	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2756	if err != nil {
2757		return out, metadata, &smithy.SerializationError{Err: err}
2758	}
2759
2760	if err := awsRestjson1_serializeOpHttpBindingsDeleteStageInput(input, restEncoder); err != nil {
2761		return out, metadata, &smithy.SerializationError{Err: err}
2762	}
2763
2764	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2765		return out, metadata, &smithy.SerializationError{Err: err}
2766	}
2767	in.Request = request
2768
2769	return next.HandleSerialize(ctx, in)
2770}
2771func awsRestjson1_serializeOpHttpBindingsDeleteStageInput(v *DeleteStageInput, encoder *httpbinding.Encoder) error {
2772	if v == nil {
2773		return fmt.Errorf("unsupported serialization of nil %T", v)
2774	}
2775
2776	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
2777		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
2778	}
2779	if v.RestApiId != nil {
2780		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
2781			return err
2782		}
2783	}
2784
2785	if v.StageName == nil || len(*v.StageName) == 0 {
2786		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
2787	}
2788	if v.StageName != nil {
2789		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
2790			return err
2791		}
2792	}
2793
2794	return nil
2795}
2796
2797type awsRestjson1_serializeOpDeleteUsagePlan struct {
2798}
2799
2800func (*awsRestjson1_serializeOpDeleteUsagePlan) ID() string {
2801	return "OperationSerializer"
2802}
2803
2804func (m *awsRestjson1_serializeOpDeleteUsagePlan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2805	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2806) {
2807	request, ok := in.Request.(*smithyhttp.Request)
2808	if !ok {
2809		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2810	}
2811
2812	input, ok := in.Parameters.(*DeleteUsagePlanInput)
2813	_ = input
2814	if !ok {
2815		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2816	}
2817
2818	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}")
2819	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2820	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2821	request.Method = "DELETE"
2822	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2823	if err != nil {
2824		return out, metadata, &smithy.SerializationError{Err: err}
2825	}
2826
2827	if err := awsRestjson1_serializeOpHttpBindingsDeleteUsagePlanInput(input, restEncoder); err != nil {
2828		return out, metadata, &smithy.SerializationError{Err: err}
2829	}
2830
2831	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2832		return out, metadata, &smithy.SerializationError{Err: err}
2833	}
2834	in.Request = request
2835
2836	return next.HandleSerialize(ctx, in)
2837}
2838func awsRestjson1_serializeOpHttpBindingsDeleteUsagePlanInput(v *DeleteUsagePlanInput, encoder *httpbinding.Encoder) error {
2839	if v == nil {
2840		return fmt.Errorf("unsupported serialization of nil %T", v)
2841	}
2842
2843	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
2844		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
2845	}
2846	if v.UsagePlanId != nil {
2847		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
2848			return err
2849		}
2850	}
2851
2852	return nil
2853}
2854
2855type awsRestjson1_serializeOpDeleteUsagePlanKey struct {
2856}
2857
2858func (*awsRestjson1_serializeOpDeleteUsagePlanKey) ID() string {
2859	return "OperationSerializer"
2860}
2861
2862func (m *awsRestjson1_serializeOpDeleteUsagePlanKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2863	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2864) {
2865	request, ok := in.Request.(*smithyhttp.Request)
2866	if !ok {
2867		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2868	}
2869
2870	input, ok := in.Parameters.(*DeleteUsagePlanKeyInput)
2871	_ = input
2872	if !ok {
2873		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2874	}
2875
2876	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}")
2877	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2878	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2879	request.Method = "DELETE"
2880	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2881	if err != nil {
2882		return out, metadata, &smithy.SerializationError{Err: err}
2883	}
2884
2885	if err := awsRestjson1_serializeOpHttpBindingsDeleteUsagePlanKeyInput(input, restEncoder); err != nil {
2886		return out, metadata, &smithy.SerializationError{Err: err}
2887	}
2888
2889	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2890		return out, metadata, &smithy.SerializationError{Err: err}
2891	}
2892	in.Request = request
2893
2894	return next.HandleSerialize(ctx, in)
2895}
2896func awsRestjson1_serializeOpHttpBindingsDeleteUsagePlanKeyInput(v *DeleteUsagePlanKeyInput, encoder *httpbinding.Encoder) error {
2897	if v == nil {
2898		return fmt.Errorf("unsupported serialization of nil %T", v)
2899	}
2900
2901	if v.KeyId == nil || len(*v.KeyId) == 0 {
2902		return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")}
2903	}
2904	if v.KeyId != nil {
2905		if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil {
2906			return err
2907		}
2908	}
2909
2910	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
2911		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
2912	}
2913	if v.UsagePlanId != nil {
2914		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
2915			return err
2916		}
2917	}
2918
2919	return nil
2920}
2921
2922type awsRestjson1_serializeOpDeleteVpcLink struct {
2923}
2924
2925func (*awsRestjson1_serializeOpDeleteVpcLink) ID() string {
2926	return "OperationSerializer"
2927}
2928
2929func (m *awsRestjson1_serializeOpDeleteVpcLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2930	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2931) {
2932	request, ok := in.Request.(*smithyhttp.Request)
2933	if !ok {
2934		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2935	}
2936
2937	input, ok := in.Parameters.(*DeleteVpcLinkInput)
2938	_ = input
2939	if !ok {
2940		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2941	}
2942
2943	opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}")
2944	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2945	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2946	request.Method = "DELETE"
2947	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2948	if err != nil {
2949		return out, metadata, &smithy.SerializationError{Err: err}
2950	}
2951
2952	if err := awsRestjson1_serializeOpHttpBindingsDeleteVpcLinkInput(input, restEncoder); err != nil {
2953		return out, metadata, &smithy.SerializationError{Err: err}
2954	}
2955
2956	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2957		return out, metadata, &smithy.SerializationError{Err: err}
2958	}
2959	in.Request = request
2960
2961	return next.HandleSerialize(ctx, in)
2962}
2963func awsRestjson1_serializeOpHttpBindingsDeleteVpcLinkInput(v *DeleteVpcLinkInput, encoder *httpbinding.Encoder) error {
2964	if v == nil {
2965		return fmt.Errorf("unsupported serialization of nil %T", v)
2966	}
2967
2968	if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 {
2969		return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")}
2970	}
2971	if v.VpcLinkId != nil {
2972		if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil {
2973			return err
2974		}
2975	}
2976
2977	return nil
2978}
2979
2980type awsRestjson1_serializeOpFlushStageAuthorizersCache struct {
2981}
2982
2983func (*awsRestjson1_serializeOpFlushStageAuthorizersCache) ID() string {
2984	return "OperationSerializer"
2985}
2986
2987func (m *awsRestjson1_serializeOpFlushStageAuthorizersCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2988	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2989) {
2990	request, ok := in.Request.(*smithyhttp.Request)
2991	if !ok {
2992		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2993	}
2994
2995	input, ok := in.Parameters.(*FlushStageAuthorizersCacheInput)
2996	_ = input
2997	if !ok {
2998		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2999	}
3000
3001	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/cache/authorizers")
3002	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3003	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3004	request.Method = "DELETE"
3005	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3006	if err != nil {
3007		return out, metadata, &smithy.SerializationError{Err: err}
3008	}
3009
3010	if err := awsRestjson1_serializeOpHttpBindingsFlushStageAuthorizersCacheInput(input, restEncoder); err != nil {
3011		return out, metadata, &smithy.SerializationError{Err: err}
3012	}
3013
3014	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3015		return out, metadata, &smithy.SerializationError{Err: err}
3016	}
3017	in.Request = request
3018
3019	return next.HandleSerialize(ctx, in)
3020}
3021func awsRestjson1_serializeOpHttpBindingsFlushStageAuthorizersCacheInput(v *FlushStageAuthorizersCacheInput, encoder *httpbinding.Encoder) error {
3022	if v == nil {
3023		return fmt.Errorf("unsupported serialization of nil %T", v)
3024	}
3025
3026	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3027		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3028	}
3029	if v.RestApiId != nil {
3030		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3031			return err
3032		}
3033	}
3034
3035	if v.StageName == nil || len(*v.StageName) == 0 {
3036		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
3037	}
3038	if v.StageName != nil {
3039		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
3040			return err
3041		}
3042	}
3043
3044	return nil
3045}
3046
3047type awsRestjson1_serializeOpFlushStageCache struct {
3048}
3049
3050func (*awsRestjson1_serializeOpFlushStageCache) ID() string {
3051	return "OperationSerializer"
3052}
3053
3054func (m *awsRestjson1_serializeOpFlushStageCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3055	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3056) {
3057	request, ok := in.Request.(*smithyhttp.Request)
3058	if !ok {
3059		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3060	}
3061
3062	input, ok := in.Parameters.(*FlushStageCacheInput)
3063	_ = input
3064	if !ok {
3065		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3066	}
3067
3068	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/cache/data")
3069	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3070	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3071	request.Method = "DELETE"
3072	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3073	if err != nil {
3074		return out, metadata, &smithy.SerializationError{Err: err}
3075	}
3076
3077	if err := awsRestjson1_serializeOpHttpBindingsFlushStageCacheInput(input, restEncoder); err != nil {
3078		return out, metadata, &smithy.SerializationError{Err: err}
3079	}
3080
3081	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3082		return out, metadata, &smithy.SerializationError{Err: err}
3083	}
3084	in.Request = request
3085
3086	return next.HandleSerialize(ctx, in)
3087}
3088func awsRestjson1_serializeOpHttpBindingsFlushStageCacheInput(v *FlushStageCacheInput, encoder *httpbinding.Encoder) error {
3089	if v == nil {
3090		return fmt.Errorf("unsupported serialization of nil %T", v)
3091	}
3092
3093	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3094		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3095	}
3096	if v.RestApiId != nil {
3097		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3098			return err
3099		}
3100	}
3101
3102	if v.StageName == nil || len(*v.StageName) == 0 {
3103		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
3104	}
3105	if v.StageName != nil {
3106		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
3107			return err
3108		}
3109	}
3110
3111	return nil
3112}
3113
3114type awsRestjson1_serializeOpGenerateClientCertificate struct {
3115}
3116
3117func (*awsRestjson1_serializeOpGenerateClientCertificate) ID() string {
3118	return "OperationSerializer"
3119}
3120
3121func (m *awsRestjson1_serializeOpGenerateClientCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3122	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3123) {
3124	request, ok := in.Request.(*smithyhttp.Request)
3125	if !ok {
3126		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3127	}
3128
3129	input, ok := in.Parameters.(*GenerateClientCertificateInput)
3130	_ = input
3131	if !ok {
3132		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3133	}
3134
3135	opPath, opQuery := httpbinding.SplitURI("/clientcertificates")
3136	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3137	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3138	request.Method = "POST"
3139	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3140	if err != nil {
3141		return out, metadata, &smithy.SerializationError{Err: err}
3142	}
3143
3144	restEncoder.SetHeader("Content-Type").String("application/json")
3145
3146	jsonEncoder := smithyjson.NewEncoder()
3147	if err := awsRestjson1_serializeOpDocumentGenerateClientCertificateInput(input, jsonEncoder.Value); err != nil {
3148		return out, metadata, &smithy.SerializationError{Err: err}
3149	}
3150
3151	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3152		return out, metadata, &smithy.SerializationError{Err: err}
3153	}
3154
3155	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3156		return out, metadata, &smithy.SerializationError{Err: err}
3157	}
3158	in.Request = request
3159
3160	return next.HandleSerialize(ctx, in)
3161}
3162func awsRestjson1_serializeOpHttpBindingsGenerateClientCertificateInput(v *GenerateClientCertificateInput, encoder *httpbinding.Encoder) error {
3163	if v == nil {
3164		return fmt.Errorf("unsupported serialization of nil %T", v)
3165	}
3166
3167	return nil
3168}
3169
3170func awsRestjson1_serializeOpDocumentGenerateClientCertificateInput(v *GenerateClientCertificateInput, value smithyjson.Value) error {
3171	object := value.Object()
3172	defer object.Close()
3173
3174	if v.Description != nil {
3175		ok := object.Key("description")
3176		ok.String(*v.Description)
3177	}
3178
3179	if v.Tags != nil {
3180		ok := object.Key("tags")
3181		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
3182			return err
3183		}
3184	}
3185
3186	return nil
3187}
3188
3189type awsRestjson1_serializeOpGetAccount struct {
3190}
3191
3192func (*awsRestjson1_serializeOpGetAccount) ID() string {
3193	return "OperationSerializer"
3194}
3195
3196func (m *awsRestjson1_serializeOpGetAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3197	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3198) {
3199	request, ok := in.Request.(*smithyhttp.Request)
3200	if !ok {
3201		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3202	}
3203
3204	input, ok := in.Parameters.(*GetAccountInput)
3205	_ = input
3206	if !ok {
3207		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3208	}
3209
3210	opPath, opQuery := httpbinding.SplitURI("/account")
3211	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3212	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3213	request.Method = "GET"
3214	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3215	if err != nil {
3216		return out, metadata, &smithy.SerializationError{Err: err}
3217	}
3218
3219	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3220		return out, metadata, &smithy.SerializationError{Err: err}
3221	}
3222	in.Request = request
3223
3224	return next.HandleSerialize(ctx, in)
3225}
3226func awsRestjson1_serializeOpHttpBindingsGetAccountInput(v *GetAccountInput, encoder *httpbinding.Encoder) error {
3227	if v == nil {
3228		return fmt.Errorf("unsupported serialization of nil %T", v)
3229	}
3230
3231	return nil
3232}
3233
3234type awsRestjson1_serializeOpGetApiKey struct {
3235}
3236
3237func (*awsRestjson1_serializeOpGetApiKey) ID() string {
3238	return "OperationSerializer"
3239}
3240
3241func (m *awsRestjson1_serializeOpGetApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3242	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3243) {
3244	request, ok := in.Request.(*smithyhttp.Request)
3245	if !ok {
3246		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3247	}
3248
3249	input, ok := in.Parameters.(*GetApiKeyInput)
3250	_ = input
3251	if !ok {
3252		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3253	}
3254
3255	opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}")
3256	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3257	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3258	request.Method = "GET"
3259	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3260	if err != nil {
3261		return out, metadata, &smithy.SerializationError{Err: err}
3262	}
3263
3264	if err := awsRestjson1_serializeOpHttpBindingsGetApiKeyInput(input, restEncoder); err != nil {
3265		return out, metadata, &smithy.SerializationError{Err: err}
3266	}
3267
3268	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3269		return out, metadata, &smithy.SerializationError{Err: err}
3270	}
3271	in.Request = request
3272
3273	return next.HandleSerialize(ctx, in)
3274}
3275func awsRestjson1_serializeOpHttpBindingsGetApiKeyInput(v *GetApiKeyInput, encoder *httpbinding.Encoder) error {
3276	if v == nil {
3277		return fmt.Errorf("unsupported serialization of nil %T", v)
3278	}
3279
3280	if v.ApiKey == nil || len(*v.ApiKey) == 0 {
3281		return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")}
3282	}
3283	if v.ApiKey != nil {
3284		if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil {
3285			return err
3286		}
3287	}
3288
3289	if v.IncludeValue != nil {
3290		encoder.SetQuery("includeValue").Boolean(*v.IncludeValue)
3291	}
3292
3293	return nil
3294}
3295
3296type awsRestjson1_serializeOpGetApiKeys struct {
3297}
3298
3299func (*awsRestjson1_serializeOpGetApiKeys) ID() string {
3300	return "OperationSerializer"
3301}
3302
3303func (m *awsRestjson1_serializeOpGetApiKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3304	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3305) {
3306	request, ok := in.Request.(*smithyhttp.Request)
3307	if !ok {
3308		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3309	}
3310
3311	input, ok := in.Parameters.(*GetApiKeysInput)
3312	_ = input
3313	if !ok {
3314		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3315	}
3316
3317	opPath, opQuery := httpbinding.SplitURI("/apikeys")
3318	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3319	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3320	request.Method = "GET"
3321	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3322	if err != nil {
3323		return out, metadata, &smithy.SerializationError{Err: err}
3324	}
3325
3326	if err := awsRestjson1_serializeOpHttpBindingsGetApiKeysInput(input, restEncoder); err != nil {
3327		return out, metadata, &smithy.SerializationError{Err: err}
3328	}
3329
3330	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3331		return out, metadata, &smithy.SerializationError{Err: err}
3332	}
3333	in.Request = request
3334
3335	return next.HandleSerialize(ctx, in)
3336}
3337func awsRestjson1_serializeOpHttpBindingsGetApiKeysInput(v *GetApiKeysInput, encoder *httpbinding.Encoder) error {
3338	if v == nil {
3339		return fmt.Errorf("unsupported serialization of nil %T", v)
3340	}
3341
3342	if v.CustomerId != nil {
3343		encoder.SetQuery("customerId").String(*v.CustomerId)
3344	}
3345
3346	if v.IncludeValues != nil {
3347		encoder.SetQuery("includeValues").Boolean(*v.IncludeValues)
3348	}
3349
3350	if v.Limit != nil {
3351		encoder.SetQuery("limit").Integer(*v.Limit)
3352	}
3353
3354	if v.NameQuery != nil {
3355		encoder.SetQuery("name").String(*v.NameQuery)
3356	}
3357
3358	if v.Position != nil {
3359		encoder.SetQuery("position").String(*v.Position)
3360	}
3361
3362	return nil
3363}
3364
3365type awsRestjson1_serializeOpGetAuthorizer struct {
3366}
3367
3368func (*awsRestjson1_serializeOpGetAuthorizer) ID() string {
3369	return "OperationSerializer"
3370}
3371
3372func (m *awsRestjson1_serializeOpGetAuthorizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3373	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3374) {
3375	request, ok := in.Request.(*smithyhttp.Request)
3376	if !ok {
3377		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3378	}
3379
3380	input, ok := in.Parameters.(*GetAuthorizerInput)
3381	_ = input
3382	if !ok {
3383		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3384	}
3385
3386	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}")
3387	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3388	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3389	request.Method = "GET"
3390	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3391	if err != nil {
3392		return out, metadata, &smithy.SerializationError{Err: err}
3393	}
3394
3395	if err := awsRestjson1_serializeOpHttpBindingsGetAuthorizerInput(input, restEncoder); err != nil {
3396		return out, metadata, &smithy.SerializationError{Err: err}
3397	}
3398
3399	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3400		return out, metadata, &smithy.SerializationError{Err: err}
3401	}
3402	in.Request = request
3403
3404	return next.HandleSerialize(ctx, in)
3405}
3406func awsRestjson1_serializeOpHttpBindingsGetAuthorizerInput(v *GetAuthorizerInput, encoder *httpbinding.Encoder) error {
3407	if v == nil {
3408		return fmt.Errorf("unsupported serialization of nil %T", v)
3409	}
3410
3411	if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 {
3412		return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")}
3413	}
3414	if v.AuthorizerId != nil {
3415		if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil {
3416			return err
3417		}
3418	}
3419
3420	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3421		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3422	}
3423	if v.RestApiId != nil {
3424		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3425			return err
3426		}
3427	}
3428
3429	return nil
3430}
3431
3432type awsRestjson1_serializeOpGetAuthorizers struct {
3433}
3434
3435func (*awsRestjson1_serializeOpGetAuthorizers) ID() string {
3436	return "OperationSerializer"
3437}
3438
3439func (m *awsRestjson1_serializeOpGetAuthorizers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3440	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3441) {
3442	request, ok := in.Request.(*smithyhttp.Request)
3443	if !ok {
3444		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3445	}
3446
3447	input, ok := in.Parameters.(*GetAuthorizersInput)
3448	_ = input
3449	if !ok {
3450		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3451	}
3452
3453	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers")
3454	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3455	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3456	request.Method = "GET"
3457	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3458	if err != nil {
3459		return out, metadata, &smithy.SerializationError{Err: err}
3460	}
3461
3462	if err := awsRestjson1_serializeOpHttpBindingsGetAuthorizersInput(input, restEncoder); err != nil {
3463		return out, metadata, &smithy.SerializationError{Err: err}
3464	}
3465
3466	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3467		return out, metadata, &smithy.SerializationError{Err: err}
3468	}
3469	in.Request = request
3470
3471	return next.HandleSerialize(ctx, in)
3472}
3473func awsRestjson1_serializeOpHttpBindingsGetAuthorizersInput(v *GetAuthorizersInput, encoder *httpbinding.Encoder) error {
3474	if v == nil {
3475		return fmt.Errorf("unsupported serialization of nil %T", v)
3476	}
3477
3478	if v.Limit != nil {
3479		encoder.SetQuery("limit").Integer(*v.Limit)
3480	}
3481
3482	if v.Position != nil {
3483		encoder.SetQuery("position").String(*v.Position)
3484	}
3485
3486	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3487		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3488	}
3489	if v.RestApiId != nil {
3490		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3491			return err
3492		}
3493	}
3494
3495	return nil
3496}
3497
3498type awsRestjson1_serializeOpGetBasePathMapping struct {
3499}
3500
3501func (*awsRestjson1_serializeOpGetBasePathMapping) ID() string {
3502	return "OperationSerializer"
3503}
3504
3505func (m *awsRestjson1_serializeOpGetBasePathMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3506	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3507) {
3508	request, ok := in.Request.(*smithyhttp.Request)
3509	if !ok {
3510		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3511	}
3512
3513	input, ok := in.Parameters.(*GetBasePathMappingInput)
3514	_ = input
3515	if !ok {
3516		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3517	}
3518
3519	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}")
3520	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3521	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3522	request.Method = "GET"
3523	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3524	if err != nil {
3525		return out, metadata, &smithy.SerializationError{Err: err}
3526	}
3527
3528	if err := awsRestjson1_serializeOpHttpBindingsGetBasePathMappingInput(input, restEncoder); err != nil {
3529		return out, metadata, &smithy.SerializationError{Err: err}
3530	}
3531
3532	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3533		return out, metadata, &smithy.SerializationError{Err: err}
3534	}
3535	in.Request = request
3536
3537	return next.HandleSerialize(ctx, in)
3538}
3539func awsRestjson1_serializeOpHttpBindingsGetBasePathMappingInput(v *GetBasePathMappingInput, encoder *httpbinding.Encoder) error {
3540	if v == nil {
3541		return fmt.Errorf("unsupported serialization of nil %T", v)
3542	}
3543
3544	if v.BasePath == nil || len(*v.BasePath) == 0 {
3545		return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")}
3546	}
3547	if v.BasePath != nil {
3548		if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil {
3549			return err
3550		}
3551	}
3552
3553	if v.DomainName == nil || len(*v.DomainName) == 0 {
3554		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
3555	}
3556	if v.DomainName != nil {
3557		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
3558			return err
3559		}
3560	}
3561
3562	return nil
3563}
3564
3565type awsRestjson1_serializeOpGetBasePathMappings struct {
3566}
3567
3568func (*awsRestjson1_serializeOpGetBasePathMappings) ID() string {
3569	return "OperationSerializer"
3570}
3571
3572func (m *awsRestjson1_serializeOpGetBasePathMappings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3573	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3574) {
3575	request, ok := in.Request.(*smithyhttp.Request)
3576	if !ok {
3577		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3578	}
3579
3580	input, ok := in.Parameters.(*GetBasePathMappingsInput)
3581	_ = input
3582	if !ok {
3583		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3584	}
3585
3586	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings")
3587	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3588	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3589	request.Method = "GET"
3590	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3591	if err != nil {
3592		return out, metadata, &smithy.SerializationError{Err: err}
3593	}
3594
3595	if err := awsRestjson1_serializeOpHttpBindingsGetBasePathMappingsInput(input, restEncoder); err != nil {
3596		return out, metadata, &smithy.SerializationError{Err: err}
3597	}
3598
3599	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3600		return out, metadata, &smithy.SerializationError{Err: err}
3601	}
3602	in.Request = request
3603
3604	return next.HandleSerialize(ctx, in)
3605}
3606func awsRestjson1_serializeOpHttpBindingsGetBasePathMappingsInput(v *GetBasePathMappingsInput, encoder *httpbinding.Encoder) error {
3607	if v == nil {
3608		return fmt.Errorf("unsupported serialization of nil %T", v)
3609	}
3610
3611	if v.DomainName == nil || len(*v.DomainName) == 0 {
3612		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
3613	}
3614	if v.DomainName != nil {
3615		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
3616			return err
3617		}
3618	}
3619
3620	if v.Limit != nil {
3621		encoder.SetQuery("limit").Integer(*v.Limit)
3622	}
3623
3624	if v.Position != nil {
3625		encoder.SetQuery("position").String(*v.Position)
3626	}
3627
3628	return nil
3629}
3630
3631type awsRestjson1_serializeOpGetClientCertificate struct {
3632}
3633
3634func (*awsRestjson1_serializeOpGetClientCertificate) ID() string {
3635	return "OperationSerializer"
3636}
3637
3638func (m *awsRestjson1_serializeOpGetClientCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3639	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3640) {
3641	request, ok := in.Request.(*smithyhttp.Request)
3642	if !ok {
3643		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3644	}
3645
3646	input, ok := in.Parameters.(*GetClientCertificateInput)
3647	_ = input
3648	if !ok {
3649		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3650	}
3651
3652	opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}")
3653	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3654	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3655	request.Method = "GET"
3656	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3657	if err != nil {
3658		return out, metadata, &smithy.SerializationError{Err: err}
3659	}
3660
3661	if err := awsRestjson1_serializeOpHttpBindingsGetClientCertificateInput(input, restEncoder); err != nil {
3662		return out, metadata, &smithy.SerializationError{Err: err}
3663	}
3664
3665	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3666		return out, metadata, &smithy.SerializationError{Err: err}
3667	}
3668	in.Request = request
3669
3670	return next.HandleSerialize(ctx, in)
3671}
3672func awsRestjson1_serializeOpHttpBindingsGetClientCertificateInput(v *GetClientCertificateInput, encoder *httpbinding.Encoder) error {
3673	if v == nil {
3674		return fmt.Errorf("unsupported serialization of nil %T", v)
3675	}
3676
3677	if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 {
3678		return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")}
3679	}
3680	if v.ClientCertificateId != nil {
3681		if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil {
3682			return err
3683		}
3684	}
3685
3686	return nil
3687}
3688
3689type awsRestjson1_serializeOpGetClientCertificates struct {
3690}
3691
3692func (*awsRestjson1_serializeOpGetClientCertificates) ID() string {
3693	return "OperationSerializer"
3694}
3695
3696func (m *awsRestjson1_serializeOpGetClientCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3697	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3698) {
3699	request, ok := in.Request.(*smithyhttp.Request)
3700	if !ok {
3701		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3702	}
3703
3704	input, ok := in.Parameters.(*GetClientCertificatesInput)
3705	_ = input
3706	if !ok {
3707		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3708	}
3709
3710	opPath, opQuery := httpbinding.SplitURI("/clientcertificates")
3711	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3712	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3713	request.Method = "GET"
3714	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3715	if err != nil {
3716		return out, metadata, &smithy.SerializationError{Err: err}
3717	}
3718
3719	if err := awsRestjson1_serializeOpHttpBindingsGetClientCertificatesInput(input, restEncoder); err != nil {
3720		return out, metadata, &smithy.SerializationError{Err: err}
3721	}
3722
3723	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3724		return out, metadata, &smithy.SerializationError{Err: err}
3725	}
3726	in.Request = request
3727
3728	return next.HandleSerialize(ctx, in)
3729}
3730func awsRestjson1_serializeOpHttpBindingsGetClientCertificatesInput(v *GetClientCertificatesInput, encoder *httpbinding.Encoder) error {
3731	if v == nil {
3732		return fmt.Errorf("unsupported serialization of nil %T", v)
3733	}
3734
3735	if v.Limit != nil {
3736		encoder.SetQuery("limit").Integer(*v.Limit)
3737	}
3738
3739	if v.Position != nil {
3740		encoder.SetQuery("position").String(*v.Position)
3741	}
3742
3743	return nil
3744}
3745
3746type awsRestjson1_serializeOpGetDeployment struct {
3747}
3748
3749func (*awsRestjson1_serializeOpGetDeployment) ID() string {
3750	return "OperationSerializer"
3751}
3752
3753func (m *awsRestjson1_serializeOpGetDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3754	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3755) {
3756	request, ok := in.Request.(*smithyhttp.Request)
3757	if !ok {
3758		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3759	}
3760
3761	input, ok := in.Parameters.(*GetDeploymentInput)
3762	_ = input
3763	if !ok {
3764		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3765	}
3766
3767	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}")
3768	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3769	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3770	request.Method = "GET"
3771	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3772	if err != nil {
3773		return out, metadata, &smithy.SerializationError{Err: err}
3774	}
3775
3776	if err := awsRestjson1_serializeOpHttpBindingsGetDeploymentInput(input, restEncoder); err != nil {
3777		return out, metadata, &smithy.SerializationError{Err: err}
3778	}
3779
3780	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3781		return out, metadata, &smithy.SerializationError{Err: err}
3782	}
3783	in.Request = request
3784
3785	return next.HandleSerialize(ctx, in)
3786}
3787func awsRestjson1_serializeOpHttpBindingsGetDeploymentInput(v *GetDeploymentInput, encoder *httpbinding.Encoder) error {
3788	if v == nil {
3789		return fmt.Errorf("unsupported serialization of nil %T", v)
3790	}
3791
3792	if v.DeploymentId == nil || len(*v.DeploymentId) == 0 {
3793		return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")}
3794	}
3795	if v.DeploymentId != nil {
3796		if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil {
3797			return err
3798		}
3799	}
3800
3801	if v.Embed != nil {
3802		for i := range v.Embed {
3803			encoder.AddQuery("embed").String(v.Embed[i])
3804		}
3805	}
3806
3807	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3808		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3809	}
3810	if v.RestApiId != nil {
3811		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3812			return err
3813		}
3814	}
3815
3816	return nil
3817}
3818
3819type awsRestjson1_serializeOpGetDeployments struct {
3820}
3821
3822func (*awsRestjson1_serializeOpGetDeployments) ID() string {
3823	return "OperationSerializer"
3824}
3825
3826func (m *awsRestjson1_serializeOpGetDeployments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3827	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3828) {
3829	request, ok := in.Request.(*smithyhttp.Request)
3830	if !ok {
3831		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3832	}
3833
3834	input, ok := in.Parameters.(*GetDeploymentsInput)
3835	_ = input
3836	if !ok {
3837		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3838	}
3839
3840	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments")
3841	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3842	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3843	request.Method = "GET"
3844	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3845	if err != nil {
3846		return out, metadata, &smithy.SerializationError{Err: err}
3847	}
3848
3849	if err := awsRestjson1_serializeOpHttpBindingsGetDeploymentsInput(input, restEncoder); err != nil {
3850		return out, metadata, &smithy.SerializationError{Err: err}
3851	}
3852
3853	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3854		return out, metadata, &smithy.SerializationError{Err: err}
3855	}
3856	in.Request = request
3857
3858	return next.HandleSerialize(ctx, in)
3859}
3860func awsRestjson1_serializeOpHttpBindingsGetDeploymentsInput(v *GetDeploymentsInput, encoder *httpbinding.Encoder) error {
3861	if v == nil {
3862		return fmt.Errorf("unsupported serialization of nil %T", v)
3863	}
3864
3865	if v.Limit != nil {
3866		encoder.SetQuery("limit").Integer(*v.Limit)
3867	}
3868
3869	if v.Position != nil {
3870		encoder.SetQuery("position").String(*v.Position)
3871	}
3872
3873	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3874		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3875	}
3876	if v.RestApiId != nil {
3877		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3878			return err
3879		}
3880	}
3881
3882	return nil
3883}
3884
3885type awsRestjson1_serializeOpGetDocumentationPart struct {
3886}
3887
3888func (*awsRestjson1_serializeOpGetDocumentationPart) ID() string {
3889	return "OperationSerializer"
3890}
3891
3892func (m *awsRestjson1_serializeOpGetDocumentationPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3893	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3894) {
3895	request, ok := in.Request.(*smithyhttp.Request)
3896	if !ok {
3897		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3898	}
3899
3900	input, ok := in.Parameters.(*GetDocumentationPartInput)
3901	_ = input
3902	if !ok {
3903		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3904	}
3905
3906	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}")
3907	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3908	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3909	request.Method = "GET"
3910	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3911	if err != nil {
3912		return out, metadata, &smithy.SerializationError{Err: err}
3913	}
3914
3915	if err := awsRestjson1_serializeOpHttpBindingsGetDocumentationPartInput(input, restEncoder); err != nil {
3916		return out, metadata, &smithy.SerializationError{Err: err}
3917	}
3918
3919	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3920		return out, metadata, &smithy.SerializationError{Err: err}
3921	}
3922	in.Request = request
3923
3924	return next.HandleSerialize(ctx, in)
3925}
3926func awsRestjson1_serializeOpHttpBindingsGetDocumentationPartInput(v *GetDocumentationPartInput, encoder *httpbinding.Encoder) error {
3927	if v == nil {
3928		return fmt.Errorf("unsupported serialization of nil %T", v)
3929	}
3930
3931	if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 {
3932		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")}
3933	}
3934	if v.DocumentationPartId != nil {
3935		if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil {
3936			return err
3937		}
3938	}
3939
3940	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
3941		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
3942	}
3943	if v.RestApiId != nil {
3944		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
3945			return err
3946		}
3947	}
3948
3949	return nil
3950}
3951
3952type awsRestjson1_serializeOpGetDocumentationParts struct {
3953}
3954
3955func (*awsRestjson1_serializeOpGetDocumentationParts) ID() string {
3956	return "OperationSerializer"
3957}
3958
3959func (m *awsRestjson1_serializeOpGetDocumentationParts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3960	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3961) {
3962	request, ok := in.Request.(*smithyhttp.Request)
3963	if !ok {
3964		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3965	}
3966
3967	input, ok := in.Parameters.(*GetDocumentationPartsInput)
3968	_ = input
3969	if !ok {
3970		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3971	}
3972
3973	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts")
3974	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3975	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3976	request.Method = "GET"
3977	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3978	if err != nil {
3979		return out, metadata, &smithy.SerializationError{Err: err}
3980	}
3981
3982	if err := awsRestjson1_serializeOpHttpBindingsGetDocumentationPartsInput(input, restEncoder); err != nil {
3983		return out, metadata, &smithy.SerializationError{Err: err}
3984	}
3985
3986	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3987		return out, metadata, &smithy.SerializationError{Err: err}
3988	}
3989	in.Request = request
3990
3991	return next.HandleSerialize(ctx, in)
3992}
3993func awsRestjson1_serializeOpHttpBindingsGetDocumentationPartsInput(v *GetDocumentationPartsInput, encoder *httpbinding.Encoder) error {
3994	if v == nil {
3995		return fmt.Errorf("unsupported serialization of nil %T", v)
3996	}
3997
3998	if v.Limit != nil {
3999		encoder.SetQuery("limit").Integer(*v.Limit)
4000	}
4001
4002	if len(v.LocationStatus) > 0 {
4003		encoder.SetQuery("locationStatus").String(string(v.LocationStatus))
4004	}
4005
4006	if v.NameQuery != nil {
4007		encoder.SetQuery("name").String(*v.NameQuery)
4008	}
4009
4010	if v.Path != nil {
4011		encoder.SetQuery("path").String(*v.Path)
4012	}
4013
4014	if v.Position != nil {
4015		encoder.SetQuery("position").String(*v.Position)
4016	}
4017
4018	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4019		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4020	}
4021	if v.RestApiId != nil {
4022		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4023			return err
4024		}
4025	}
4026
4027	if len(v.Type) > 0 {
4028		encoder.SetQuery("type").String(string(v.Type))
4029	}
4030
4031	return nil
4032}
4033
4034type awsRestjson1_serializeOpGetDocumentationVersion struct {
4035}
4036
4037func (*awsRestjson1_serializeOpGetDocumentationVersion) ID() string {
4038	return "OperationSerializer"
4039}
4040
4041func (m *awsRestjson1_serializeOpGetDocumentationVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4042	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4043) {
4044	request, ok := in.Request.(*smithyhttp.Request)
4045	if !ok {
4046		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4047	}
4048
4049	input, ok := in.Parameters.(*GetDocumentationVersionInput)
4050	_ = input
4051	if !ok {
4052		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4053	}
4054
4055	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}")
4056	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4057	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4058	request.Method = "GET"
4059	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4060	if err != nil {
4061		return out, metadata, &smithy.SerializationError{Err: err}
4062	}
4063
4064	if err := awsRestjson1_serializeOpHttpBindingsGetDocumentationVersionInput(input, restEncoder); err != nil {
4065		return out, metadata, &smithy.SerializationError{Err: err}
4066	}
4067
4068	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4069		return out, metadata, &smithy.SerializationError{Err: err}
4070	}
4071	in.Request = request
4072
4073	return next.HandleSerialize(ctx, in)
4074}
4075func awsRestjson1_serializeOpHttpBindingsGetDocumentationVersionInput(v *GetDocumentationVersionInput, encoder *httpbinding.Encoder) error {
4076	if v == nil {
4077		return fmt.Errorf("unsupported serialization of nil %T", v)
4078	}
4079
4080	if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 {
4081		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")}
4082	}
4083	if v.DocumentationVersion != nil {
4084		if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil {
4085			return err
4086		}
4087	}
4088
4089	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4090		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4091	}
4092	if v.RestApiId != nil {
4093		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4094			return err
4095		}
4096	}
4097
4098	return nil
4099}
4100
4101type awsRestjson1_serializeOpGetDocumentationVersions struct {
4102}
4103
4104func (*awsRestjson1_serializeOpGetDocumentationVersions) ID() string {
4105	return "OperationSerializer"
4106}
4107
4108func (m *awsRestjson1_serializeOpGetDocumentationVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4109	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4110) {
4111	request, ok := in.Request.(*smithyhttp.Request)
4112	if !ok {
4113		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4114	}
4115
4116	input, ok := in.Parameters.(*GetDocumentationVersionsInput)
4117	_ = input
4118	if !ok {
4119		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4120	}
4121
4122	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions")
4123	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4124	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4125	request.Method = "GET"
4126	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4127	if err != nil {
4128		return out, metadata, &smithy.SerializationError{Err: err}
4129	}
4130
4131	if err := awsRestjson1_serializeOpHttpBindingsGetDocumentationVersionsInput(input, restEncoder); err != nil {
4132		return out, metadata, &smithy.SerializationError{Err: err}
4133	}
4134
4135	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4136		return out, metadata, &smithy.SerializationError{Err: err}
4137	}
4138	in.Request = request
4139
4140	return next.HandleSerialize(ctx, in)
4141}
4142func awsRestjson1_serializeOpHttpBindingsGetDocumentationVersionsInput(v *GetDocumentationVersionsInput, encoder *httpbinding.Encoder) error {
4143	if v == nil {
4144		return fmt.Errorf("unsupported serialization of nil %T", v)
4145	}
4146
4147	if v.Limit != nil {
4148		encoder.SetQuery("limit").Integer(*v.Limit)
4149	}
4150
4151	if v.Position != nil {
4152		encoder.SetQuery("position").String(*v.Position)
4153	}
4154
4155	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4156		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4157	}
4158	if v.RestApiId != nil {
4159		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4160			return err
4161		}
4162	}
4163
4164	return nil
4165}
4166
4167type awsRestjson1_serializeOpGetDomainName struct {
4168}
4169
4170func (*awsRestjson1_serializeOpGetDomainName) ID() string {
4171	return "OperationSerializer"
4172}
4173
4174func (m *awsRestjson1_serializeOpGetDomainName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4175	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4176) {
4177	request, ok := in.Request.(*smithyhttp.Request)
4178	if !ok {
4179		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4180	}
4181
4182	input, ok := in.Parameters.(*GetDomainNameInput)
4183	_ = input
4184	if !ok {
4185		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4186	}
4187
4188	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}")
4189	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4190	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4191	request.Method = "GET"
4192	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4193	if err != nil {
4194		return out, metadata, &smithy.SerializationError{Err: err}
4195	}
4196
4197	if err := awsRestjson1_serializeOpHttpBindingsGetDomainNameInput(input, restEncoder); err != nil {
4198		return out, metadata, &smithy.SerializationError{Err: err}
4199	}
4200
4201	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4202		return out, metadata, &smithy.SerializationError{Err: err}
4203	}
4204	in.Request = request
4205
4206	return next.HandleSerialize(ctx, in)
4207}
4208func awsRestjson1_serializeOpHttpBindingsGetDomainNameInput(v *GetDomainNameInput, encoder *httpbinding.Encoder) error {
4209	if v == nil {
4210		return fmt.Errorf("unsupported serialization of nil %T", v)
4211	}
4212
4213	if v.DomainName == nil || len(*v.DomainName) == 0 {
4214		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
4215	}
4216	if v.DomainName != nil {
4217		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
4218			return err
4219		}
4220	}
4221
4222	return nil
4223}
4224
4225type awsRestjson1_serializeOpGetDomainNames struct {
4226}
4227
4228func (*awsRestjson1_serializeOpGetDomainNames) ID() string {
4229	return "OperationSerializer"
4230}
4231
4232func (m *awsRestjson1_serializeOpGetDomainNames) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4233	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4234) {
4235	request, ok := in.Request.(*smithyhttp.Request)
4236	if !ok {
4237		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4238	}
4239
4240	input, ok := in.Parameters.(*GetDomainNamesInput)
4241	_ = input
4242	if !ok {
4243		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4244	}
4245
4246	opPath, opQuery := httpbinding.SplitURI("/domainnames")
4247	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4248	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4249	request.Method = "GET"
4250	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4251	if err != nil {
4252		return out, metadata, &smithy.SerializationError{Err: err}
4253	}
4254
4255	if err := awsRestjson1_serializeOpHttpBindingsGetDomainNamesInput(input, restEncoder); err != nil {
4256		return out, metadata, &smithy.SerializationError{Err: err}
4257	}
4258
4259	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4260		return out, metadata, &smithy.SerializationError{Err: err}
4261	}
4262	in.Request = request
4263
4264	return next.HandleSerialize(ctx, in)
4265}
4266func awsRestjson1_serializeOpHttpBindingsGetDomainNamesInput(v *GetDomainNamesInput, encoder *httpbinding.Encoder) error {
4267	if v == nil {
4268		return fmt.Errorf("unsupported serialization of nil %T", v)
4269	}
4270
4271	if v.Limit != nil {
4272		encoder.SetQuery("limit").Integer(*v.Limit)
4273	}
4274
4275	if v.Position != nil {
4276		encoder.SetQuery("position").String(*v.Position)
4277	}
4278
4279	return nil
4280}
4281
4282type awsRestjson1_serializeOpGetExport struct {
4283}
4284
4285func (*awsRestjson1_serializeOpGetExport) ID() string {
4286	return "OperationSerializer"
4287}
4288
4289func (m *awsRestjson1_serializeOpGetExport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4290	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4291) {
4292	request, ok := in.Request.(*smithyhttp.Request)
4293	if !ok {
4294		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4295	}
4296
4297	input, ok := in.Parameters.(*GetExportInput)
4298	_ = input
4299	if !ok {
4300		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4301	}
4302
4303	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/exports/{exportType}")
4304	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4305	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4306	request.Method = "GET"
4307	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4308	if err != nil {
4309		return out, metadata, &smithy.SerializationError{Err: err}
4310	}
4311
4312	if err := awsRestjson1_serializeOpHttpBindingsGetExportInput(input, restEncoder); err != nil {
4313		return out, metadata, &smithy.SerializationError{Err: err}
4314	}
4315
4316	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4317		return out, metadata, &smithy.SerializationError{Err: err}
4318	}
4319	in.Request = request
4320
4321	return next.HandleSerialize(ctx, in)
4322}
4323func awsRestjson1_serializeOpHttpBindingsGetExportInput(v *GetExportInput, encoder *httpbinding.Encoder) error {
4324	if v == nil {
4325		return fmt.Errorf("unsupported serialization of nil %T", v)
4326	}
4327
4328	if v.Accepts != nil && len(*v.Accepts) > 0 {
4329		locationName := "Accept"
4330		encoder.SetHeader(locationName).String(*v.Accepts)
4331	}
4332
4333	if v.ExportType == nil || len(*v.ExportType) == 0 {
4334		return &smithy.SerializationError{Err: fmt.Errorf("input member exportType must not be empty")}
4335	}
4336	if v.ExportType != nil {
4337		if err := encoder.SetURI("exportType").String(*v.ExportType); err != nil {
4338			return err
4339		}
4340	}
4341
4342	if v.Parameters != nil {
4343		for qkey, qvalue := range v.Parameters {
4344			if encoder.HasQuery(qkey) {
4345				continue
4346			}
4347			encoder.SetQuery(qkey).String(qvalue)
4348		}
4349	}
4350
4351	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4352		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4353	}
4354	if v.RestApiId != nil {
4355		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4356			return err
4357		}
4358	}
4359
4360	if v.StageName == nil || len(*v.StageName) == 0 {
4361		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
4362	}
4363	if v.StageName != nil {
4364		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
4365			return err
4366		}
4367	}
4368
4369	return nil
4370}
4371
4372type awsRestjson1_serializeOpGetGatewayResponse struct {
4373}
4374
4375func (*awsRestjson1_serializeOpGetGatewayResponse) ID() string {
4376	return "OperationSerializer"
4377}
4378
4379func (m *awsRestjson1_serializeOpGetGatewayResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4380	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4381) {
4382	request, ok := in.Request.(*smithyhttp.Request)
4383	if !ok {
4384		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4385	}
4386
4387	input, ok := in.Parameters.(*GetGatewayResponseInput)
4388	_ = input
4389	if !ok {
4390		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4391	}
4392
4393	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}")
4394	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4395	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4396	request.Method = "GET"
4397	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4398	if err != nil {
4399		return out, metadata, &smithy.SerializationError{Err: err}
4400	}
4401
4402	if err := awsRestjson1_serializeOpHttpBindingsGetGatewayResponseInput(input, restEncoder); err != nil {
4403		return out, metadata, &smithy.SerializationError{Err: err}
4404	}
4405
4406	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4407		return out, metadata, &smithy.SerializationError{Err: err}
4408	}
4409	in.Request = request
4410
4411	return next.HandleSerialize(ctx, in)
4412}
4413func awsRestjson1_serializeOpHttpBindingsGetGatewayResponseInput(v *GetGatewayResponseInput, encoder *httpbinding.Encoder) error {
4414	if v == nil {
4415		return fmt.Errorf("unsupported serialization of nil %T", v)
4416	}
4417
4418	if len(v.ResponseType) == 0 {
4419		return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")}
4420	}
4421	if len(v.ResponseType) > 0 {
4422		if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil {
4423			return err
4424		}
4425	}
4426
4427	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4428		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4429	}
4430	if v.RestApiId != nil {
4431		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4432			return err
4433		}
4434	}
4435
4436	return nil
4437}
4438
4439type awsRestjson1_serializeOpGetGatewayResponses struct {
4440}
4441
4442func (*awsRestjson1_serializeOpGetGatewayResponses) ID() string {
4443	return "OperationSerializer"
4444}
4445
4446func (m *awsRestjson1_serializeOpGetGatewayResponses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4447	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4448) {
4449	request, ok := in.Request.(*smithyhttp.Request)
4450	if !ok {
4451		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4452	}
4453
4454	input, ok := in.Parameters.(*GetGatewayResponsesInput)
4455	_ = input
4456	if !ok {
4457		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4458	}
4459
4460	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses")
4461	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4462	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4463	request.Method = "GET"
4464	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4465	if err != nil {
4466		return out, metadata, &smithy.SerializationError{Err: err}
4467	}
4468
4469	if err := awsRestjson1_serializeOpHttpBindingsGetGatewayResponsesInput(input, restEncoder); err != nil {
4470		return out, metadata, &smithy.SerializationError{Err: err}
4471	}
4472
4473	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4474		return out, metadata, &smithy.SerializationError{Err: err}
4475	}
4476	in.Request = request
4477
4478	return next.HandleSerialize(ctx, in)
4479}
4480func awsRestjson1_serializeOpHttpBindingsGetGatewayResponsesInput(v *GetGatewayResponsesInput, encoder *httpbinding.Encoder) error {
4481	if v == nil {
4482		return fmt.Errorf("unsupported serialization of nil %T", v)
4483	}
4484
4485	if v.Limit != nil {
4486		encoder.SetQuery("limit").Integer(*v.Limit)
4487	}
4488
4489	if v.Position != nil {
4490		encoder.SetQuery("position").String(*v.Position)
4491	}
4492
4493	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4494		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4495	}
4496	if v.RestApiId != nil {
4497		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4498			return err
4499		}
4500	}
4501
4502	return nil
4503}
4504
4505type awsRestjson1_serializeOpGetIntegration struct {
4506}
4507
4508func (*awsRestjson1_serializeOpGetIntegration) ID() string {
4509	return "OperationSerializer"
4510}
4511
4512func (m *awsRestjson1_serializeOpGetIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4513	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4514) {
4515	request, ok := in.Request.(*smithyhttp.Request)
4516	if !ok {
4517		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4518	}
4519
4520	input, ok := in.Parameters.(*GetIntegrationInput)
4521	_ = input
4522	if !ok {
4523		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4524	}
4525
4526	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration")
4527	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4528	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4529	request.Method = "GET"
4530	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4531	if err != nil {
4532		return out, metadata, &smithy.SerializationError{Err: err}
4533	}
4534
4535	if err := awsRestjson1_serializeOpHttpBindingsGetIntegrationInput(input, restEncoder); err != nil {
4536		return out, metadata, &smithy.SerializationError{Err: err}
4537	}
4538
4539	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4540		return out, metadata, &smithy.SerializationError{Err: err}
4541	}
4542	in.Request = request
4543
4544	return next.HandleSerialize(ctx, in)
4545}
4546func awsRestjson1_serializeOpHttpBindingsGetIntegrationInput(v *GetIntegrationInput, encoder *httpbinding.Encoder) error {
4547	if v == nil {
4548		return fmt.Errorf("unsupported serialization of nil %T", v)
4549	}
4550
4551	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
4552		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
4553	}
4554	if v.HttpMethod != nil {
4555		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
4556			return err
4557		}
4558	}
4559
4560	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
4561		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
4562	}
4563	if v.ResourceId != nil {
4564		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
4565			return err
4566		}
4567	}
4568
4569	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4570		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4571	}
4572	if v.RestApiId != nil {
4573		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4574			return err
4575		}
4576	}
4577
4578	return nil
4579}
4580
4581type awsRestjson1_serializeOpGetIntegrationResponse struct {
4582}
4583
4584func (*awsRestjson1_serializeOpGetIntegrationResponse) ID() string {
4585	return "OperationSerializer"
4586}
4587
4588func (m *awsRestjson1_serializeOpGetIntegrationResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4589	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4590) {
4591	request, ok := in.Request.(*smithyhttp.Request)
4592	if !ok {
4593		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4594	}
4595
4596	input, ok := in.Parameters.(*GetIntegrationResponseInput)
4597	_ = input
4598	if !ok {
4599		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4600	}
4601
4602	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}")
4603	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4604	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4605	request.Method = "GET"
4606	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4607	if err != nil {
4608		return out, metadata, &smithy.SerializationError{Err: err}
4609	}
4610
4611	if err := awsRestjson1_serializeOpHttpBindingsGetIntegrationResponseInput(input, restEncoder); err != nil {
4612		return out, metadata, &smithy.SerializationError{Err: err}
4613	}
4614
4615	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4616		return out, metadata, &smithy.SerializationError{Err: err}
4617	}
4618	in.Request = request
4619
4620	return next.HandleSerialize(ctx, in)
4621}
4622func awsRestjson1_serializeOpHttpBindingsGetIntegrationResponseInput(v *GetIntegrationResponseInput, encoder *httpbinding.Encoder) error {
4623	if v == nil {
4624		return fmt.Errorf("unsupported serialization of nil %T", v)
4625	}
4626
4627	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
4628		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
4629	}
4630	if v.HttpMethod != nil {
4631		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
4632			return err
4633		}
4634	}
4635
4636	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
4637		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
4638	}
4639	if v.ResourceId != nil {
4640		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
4641			return err
4642		}
4643	}
4644
4645	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4646		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4647	}
4648	if v.RestApiId != nil {
4649		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4650			return err
4651		}
4652	}
4653
4654	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
4655		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
4656	}
4657	if v.StatusCode != nil {
4658		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
4659			return err
4660		}
4661	}
4662
4663	return nil
4664}
4665
4666type awsRestjson1_serializeOpGetMethod struct {
4667}
4668
4669func (*awsRestjson1_serializeOpGetMethod) ID() string {
4670	return "OperationSerializer"
4671}
4672
4673func (m *awsRestjson1_serializeOpGetMethod) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4674	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4675) {
4676	request, ok := in.Request.(*smithyhttp.Request)
4677	if !ok {
4678		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4679	}
4680
4681	input, ok := in.Parameters.(*GetMethodInput)
4682	_ = input
4683	if !ok {
4684		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4685	}
4686
4687	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}")
4688	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4689	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4690	request.Method = "GET"
4691	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4692	if err != nil {
4693		return out, metadata, &smithy.SerializationError{Err: err}
4694	}
4695
4696	if err := awsRestjson1_serializeOpHttpBindingsGetMethodInput(input, restEncoder); err != nil {
4697		return out, metadata, &smithy.SerializationError{Err: err}
4698	}
4699
4700	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4701		return out, metadata, &smithy.SerializationError{Err: err}
4702	}
4703	in.Request = request
4704
4705	return next.HandleSerialize(ctx, in)
4706}
4707func awsRestjson1_serializeOpHttpBindingsGetMethodInput(v *GetMethodInput, encoder *httpbinding.Encoder) error {
4708	if v == nil {
4709		return fmt.Errorf("unsupported serialization of nil %T", v)
4710	}
4711
4712	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
4713		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
4714	}
4715	if v.HttpMethod != nil {
4716		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
4717			return err
4718		}
4719	}
4720
4721	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
4722		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
4723	}
4724	if v.ResourceId != nil {
4725		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
4726			return err
4727		}
4728	}
4729
4730	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4731		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4732	}
4733	if v.RestApiId != nil {
4734		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4735			return err
4736		}
4737	}
4738
4739	return nil
4740}
4741
4742type awsRestjson1_serializeOpGetMethodResponse struct {
4743}
4744
4745func (*awsRestjson1_serializeOpGetMethodResponse) ID() string {
4746	return "OperationSerializer"
4747}
4748
4749func (m *awsRestjson1_serializeOpGetMethodResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4750	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4751) {
4752	request, ok := in.Request.(*smithyhttp.Request)
4753	if !ok {
4754		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4755	}
4756
4757	input, ok := in.Parameters.(*GetMethodResponseInput)
4758	_ = input
4759	if !ok {
4760		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4761	}
4762
4763	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}")
4764	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4765	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4766	request.Method = "GET"
4767	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4768	if err != nil {
4769		return out, metadata, &smithy.SerializationError{Err: err}
4770	}
4771
4772	if err := awsRestjson1_serializeOpHttpBindingsGetMethodResponseInput(input, restEncoder); err != nil {
4773		return out, metadata, &smithy.SerializationError{Err: err}
4774	}
4775
4776	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4777		return out, metadata, &smithy.SerializationError{Err: err}
4778	}
4779	in.Request = request
4780
4781	return next.HandleSerialize(ctx, in)
4782}
4783func awsRestjson1_serializeOpHttpBindingsGetMethodResponseInput(v *GetMethodResponseInput, encoder *httpbinding.Encoder) error {
4784	if v == nil {
4785		return fmt.Errorf("unsupported serialization of nil %T", v)
4786	}
4787
4788	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
4789		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
4790	}
4791	if v.HttpMethod != nil {
4792		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
4793			return err
4794		}
4795	}
4796
4797	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
4798		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
4799	}
4800	if v.ResourceId != nil {
4801		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
4802			return err
4803		}
4804	}
4805
4806	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4807		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4808	}
4809	if v.RestApiId != nil {
4810		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4811			return err
4812		}
4813	}
4814
4815	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
4816		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
4817	}
4818	if v.StatusCode != nil {
4819		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
4820			return err
4821		}
4822	}
4823
4824	return nil
4825}
4826
4827type awsRestjson1_serializeOpGetModel struct {
4828}
4829
4830func (*awsRestjson1_serializeOpGetModel) ID() string {
4831	return "OperationSerializer"
4832}
4833
4834func (m *awsRestjson1_serializeOpGetModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4835	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4836) {
4837	request, ok := in.Request.(*smithyhttp.Request)
4838	if !ok {
4839		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4840	}
4841
4842	input, ok := in.Parameters.(*GetModelInput)
4843	_ = input
4844	if !ok {
4845		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4846	}
4847
4848	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}")
4849	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4850	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4851	request.Method = "GET"
4852	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4853	if err != nil {
4854		return out, metadata, &smithy.SerializationError{Err: err}
4855	}
4856
4857	if err := awsRestjson1_serializeOpHttpBindingsGetModelInput(input, restEncoder); err != nil {
4858		return out, metadata, &smithy.SerializationError{Err: err}
4859	}
4860
4861	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4862		return out, metadata, &smithy.SerializationError{Err: err}
4863	}
4864	in.Request = request
4865
4866	return next.HandleSerialize(ctx, in)
4867}
4868func awsRestjson1_serializeOpHttpBindingsGetModelInput(v *GetModelInput, encoder *httpbinding.Encoder) error {
4869	if v == nil {
4870		return fmt.Errorf("unsupported serialization of nil %T", v)
4871	}
4872
4873	if v.Flatten {
4874		encoder.SetQuery("flatten").Boolean(v.Flatten)
4875	}
4876
4877	if v.ModelName == nil || len(*v.ModelName) == 0 {
4878		return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")}
4879	}
4880	if v.ModelName != nil {
4881		if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil {
4882			return err
4883		}
4884	}
4885
4886	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4887		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4888	}
4889	if v.RestApiId != nil {
4890		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4891			return err
4892		}
4893	}
4894
4895	return nil
4896}
4897
4898type awsRestjson1_serializeOpGetModels struct {
4899}
4900
4901func (*awsRestjson1_serializeOpGetModels) ID() string {
4902	return "OperationSerializer"
4903}
4904
4905func (m *awsRestjson1_serializeOpGetModels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4906	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4907) {
4908	request, ok := in.Request.(*smithyhttp.Request)
4909	if !ok {
4910		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4911	}
4912
4913	input, ok := in.Parameters.(*GetModelsInput)
4914	_ = input
4915	if !ok {
4916		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4917	}
4918
4919	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models")
4920	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4921	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4922	request.Method = "GET"
4923	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4924	if err != nil {
4925		return out, metadata, &smithy.SerializationError{Err: err}
4926	}
4927
4928	if err := awsRestjson1_serializeOpHttpBindingsGetModelsInput(input, restEncoder); err != nil {
4929		return out, metadata, &smithy.SerializationError{Err: err}
4930	}
4931
4932	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4933		return out, metadata, &smithy.SerializationError{Err: err}
4934	}
4935	in.Request = request
4936
4937	return next.HandleSerialize(ctx, in)
4938}
4939func awsRestjson1_serializeOpHttpBindingsGetModelsInput(v *GetModelsInput, encoder *httpbinding.Encoder) error {
4940	if v == nil {
4941		return fmt.Errorf("unsupported serialization of nil %T", v)
4942	}
4943
4944	if v.Limit != nil {
4945		encoder.SetQuery("limit").Integer(*v.Limit)
4946	}
4947
4948	if v.Position != nil {
4949		encoder.SetQuery("position").String(*v.Position)
4950	}
4951
4952	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
4953		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
4954	}
4955	if v.RestApiId != nil {
4956		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
4957			return err
4958		}
4959	}
4960
4961	return nil
4962}
4963
4964type awsRestjson1_serializeOpGetModelTemplate struct {
4965}
4966
4967func (*awsRestjson1_serializeOpGetModelTemplate) ID() string {
4968	return "OperationSerializer"
4969}
4970
4971func (m *awsRestjson1_serializeOpGetModelTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4972	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4973) {
4974	request, ok := in.Request.(*smithyhttp.Request)
4975	if !ok {
4976		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4977	}
4978
4979	input, ok := in.Parameters.(*GetModelTemplateInput)
4980	_ = input
4981	if !ok {
4982		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4983	}
4984
4985	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}/default_template")
4986	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4987	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4988	request.Method = "GET"
4989	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4990	if err != nil {
4991		return out, metadata, &smithy.SerializationError{Err: err}
4992	}
4993
4994	if err := awsRestjson1_serializeOpHttpBindingsGetModelTemplateInput(input, restEncoder); err != nil {
4995		return out, metadata, &smithy.SerializationError{Err: err}
4996	}
4997
4998	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4999		return out, metadata, &smithy.SerializationError{Err: err}
5000	}
5001	in.Request = request
5002
5003	return next.HandleSerialize(ctx, in)
5004}
5005func awsRestjson1_serializeOpHttpBindingsGetModelTemplateInput(v *GetModelTemplateInput, encoder *httpbinding.Encoder) error {
5006	if v == nil {
5007		return fmt.Errorf("unsupported serialization of nil %T", v)
5008	}
5009
5010	if v.ModelName == nil || len(*v.ModelName) == 0 {
5011		return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")}
5012	}
5013	if v.ModelName != nil {
5014		if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil {
5015			return err
5016		}
5017	}
5018
5019	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5020		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5021	}
5022	if v.RestApiId != nil {
5023		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5024			return err
5025		}
5026	}
5027
5028	return nil
5029}
5030
5031type awsRestjson1_serializeOpGetRequestValidator struct {
5032}
5033
5034func (*awsRestjson1_serializeOpGetRequestValidator) ID() string {
5035	return "OperationSerializer"
5036}
5037
5038func (m *awsRestjson1_serializeOpGetRequestValidator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5039	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5040) {
5041	request, ok := in.Request.(*smithyhttp.Request)
5042	if !ok {
5043		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5044	}
5045
5046	input, ok := in.Parameters.(*GetRequestValidatorInput)
5047	_ = input
5048	if !ok {
5049		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5050	}
5051
5052	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}")
5053	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5054	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5055	request.Method = "GET"
5056	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5057	if err != nil {
5058		return out, metadata, &smithy.SerializationError{Err: err}
5059	}
5060
5061	if err := awsRestjson1_serializeOpHttpBindingsGetRequestValidatorInput(input, restEncoder); err != nil {
5062		return out, metadata, &smithy.SerializationError{Err: err}
5063	}
5064
5065	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5066		return out, metadata, &smithy.SerializationError{Err: err}
5067	}
5068	in.Request = request
5069
5070	return next.HandleSerialize(ctx, in)
5071}
5072func awsRestjson1_serializeOpHttpBindingsGetRequestValidatorInput(v *GetRequestValidatorInput, encoder *httpbinding.Encoder) error {
5073	if v == nil {
5074		return fmt.Errorf("unsupported serialization of nil %T", v)
5075	}
5076
5077	if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 {
5078		return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")}
5079	}
5080	if v.RequestValidatorId != nil {
5081		if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil {
5082			return err
5083		}
5084	}
5085
5086	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5087		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5088	}
5089	if v.RestApiId != nil {
5090		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5091			return err
5092		}
5093	}
5094
5095	return nil
5096}
5097
5098type awsRestjson1_serializeOpGetRequestValidators struct {
5099}
5100
5101func (*awsRestjson1_serializeOpGetRequestValidators) ID() string {
5102	return "OperationSerializer"
5103}
5104
5105func (m *awsRestjson1_serializeOpGetRequestValidators) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5106	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5107) {
5108	request, ok := in.Request.(*smithyhttp.Request)
5109	if !ok {
5110		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5111	}
5112
5113	input, ok := in.Parameters.(*GetRequestValidatorsInput)
5114	_ = input
5115	if !ok {
5116		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5117	}
5118
5119	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators")
5120	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5121	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5122	request.Method = "GET"
5123	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5124	if err != nil {
5125		return out, metadata, &smithy.SerializationError{Err: err}
5126	}
5127
5128	if err := awsRestjson1_serializeOpHttpBindingsGetRequestValidatorsInput(input, restEncoder); err != nil {
5129		return out, metadata, &smithy.SerializationError{Err: err}
5130	}
5131
5132	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5133		return out, metadata, &smithy.SerializationError{Err: err}
5134	}
5135	in.Request = request
5136
5137	return next.HandleSerialize(ctx, in)
5138}
5139func awsRestjson1_serializeOpHttpBindingsGetRequestValidatorsInput(v *GetRequestValidatorsInput, encoder *httpbinding.Encoder) error {
5140	if v == nil {
5141		return fmt.Errorf("unsupported serialization of nil %T", v)
5142	}
5143
5144	if v.Limit != nil {
5145		encoder.SetQuery("limit").Integer(*v.Limit)
5146	}
5147
5148	if v.Position != nil {
5149		encoder.SetQuery("position").String(*v.Position)
5150	}
5151
5152	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5153		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5154	}
5155	if v.RestApiId != nil {
5156		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5157			return err
5158		}
5159	}
5160
5161	return nil
5162}
5163
5164type awsRestjson1_serializeOpGetResource struct {
5165}
5166
5167func (*awsRestjson1_serializeOpGetResource) ID() string {
5168	return "OperationSerializer"
5169}
5170
5171func (m *awsRestjson1_serializeOpGetResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5172	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5173) {
5174	request, ok := in.Request.(*smithyhttp.Request)
5175	if !ok {
5176		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5177	}
5178
5179	input, ok := in.Parameters.(*GetResourceInput)
5180	_ = input
5181	if !ok {
5182		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5183	}
5184
5185	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}")
5186	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5187	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5188	request.Method = "GET"
5189	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5190	if err != nil {
5191		return out, metadata, &smithy.SerializationError{Err: err}
5192	}
5193
5194	if err := awsRestjson1_serializeOpHttpBindingsGetResourceInput(input, restEncoder); err != nil {
5195		return out, metadata, &smithy.SerializationError{Err: err}
5196	}
5197
5198	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5199		return out, metadata, &smithy.SerializationError{Err: err}
5200	}
5201	in.Request = request
5202
5203	return next.HandleSerialize(ctx, in)
5204}
5205func awsRestjson1_serializeOpHttpBindingsGetResourceInput(v *GetResourceInput, encoder *httpbinding.Encoder) error {
5206	if v == nil {
5207		return fmt.Errorf("unsupported serialization of nil %T", v)
5208	}
5209
5210	if v.Embed != nil {
5211		for i := range v.Embed {
5212			encoder.AddQuery("embed").String(v.Embed[i])
5213		}
5214	}
5215
5216	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
5217		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
5218	}
5219	if v.ResourceId != nil {
5220		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
5221			return err
5222		}
5223	}
5224
5225	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5226		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5227	}
5228	if v.RestApiId != nil {
5229		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5230			return err
5231		}
5232	}
5233
5234	return nil
5235}
5236
5237type awsRestjson1_serializeOpGetResources struct {
5238}
5239
5240func (*awsRestjson1_serializeOpGetResources) ID() string {
5241	return "OperationSerializer"
5242}
5243
5244func (m *awsRestjson1_serializeOpGetResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5245	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5246) {
5247	request, ok := in.Request.(*smithyhttp.Request)
5248	if !ok {
5249		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5250	}
5251
5252	input, ok := in.Parameters.(*GetResourcesInput)
5253	_ = input
5254	if !ok {
5255		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5256	}
5257
5258	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources")
5259	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5260	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5261	request.Method = "GET"
5262	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5263	if err != nil {
5264		return out, metadata, &smithy.SerializationError{Err: err}
5265	}
5266
5267	if err := awsRestjson1_serializeOpHttpBindingsGetResourcesInput(input, restEncoder); err != nil {
5268		return out, metadata, &smithy.SerializationError{Err: err}
5269	}
5270
5271	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5272		return out, metadata, &smithy.SerializationError{Err: err}
5273	}
5274	in.Request = request
5275
5276	return next.HandleSerialize(ctx, in)
5277}
5278func awsRestjson1_serializeOpHttpBindingsGetResourcesInput(v *GetResourcesInput, encoder *httpbinding.Encoder) error {
5279	if v == nil {
5280		return fmt.Errorf("unsupported serialization of nil %T", v)
5281	}
5282
5283	if v.Embed != nil {
5284		for i := range v.Embed {
5285			encoder.AddQuery("embed").String(v.Embed[i])
5286		}
5287	}
5288
5289	if v.Limit != nil {
5290		encoder.SetQuery("limit").Integer(*v.Limit)
5291	}
5292
5293	if v.Position != nil {
5294		encoder.SetQuery("position").String(*v.Position)
5295	}
5296
5297	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5298		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5299	}
5300	if v.RestApiId != nil {
5301		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5302			return err
5303		}
5304	}
5305
5306	return nil
5307}
5308
5309type awsRestjson1_serializeOpGetRestApi struct {
5310}
5311
5312func (*awsRestjson1_serializeOpGetRestApi) ID() string {
5313	return "OperationSerializer"
5314}
5315
5316func (m *awsRestjson1_serializeOpGetRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5317	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5318) {
5319	request, ok := in.Request.(*smithyhttp.Request)
5320	if !ok {
5321		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5322	}
5323
5324	input, ok := in.Parameters.(*GetRestApiInput)
5325	_ = input
5326	if !ok {
5327		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5328	}
5329
5330	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}")
5331	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5332	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5333	request.Method = "GET"
5334	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5335	if err != nil {
5336		return out, metadata, &smithy.SerializationError{Err: err}
5337	}
5338
5339	if err := awsRestjson1_serializeOpHttpBindingsGetRestApiInput(input, restEncoder); err != nil {
5340		return out, metadata, &smithy.SerializationError{Err: err}
5341	}
5342
5343	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5344		return out, metadata, &smithy.SerializationError{Err: err}
5345	}
5346	in.Request = request
5347
5348	return next.HandleSerialize(ctx, in)
5349}
5350func awsRestjson1_serializeOpHttpBindingsGetRestApiInput(v *GetRestApiInput, encoder *httpbinding.Encoder) error {
5351	if v == nil {
5352		return fmt.Errorf("unsupported serialization of nil %T", v)
5353	}
5354
5355	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5356		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5357	}
5358	if v.RestApiId != nil {
5359		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5360			return err
5361		}
5362	}
5363
5364	return nil
5365}
5366
5367type awsRestjson1_serializeOpGetRestApis struct {
5368}
5369
5370func (*awsRestjson1_serializeOpGetRestApis) ID() string {
5371	return "OperationSerializer"
5372}
5373
5374func (m *awsRestjson1_serializeOpGetRestApis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5375	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5376) {
5377	request, ok := in.Request.(*smithyhttp.Request)
5378	if !ok {
5379		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5380	}
5381
5382	input, ok := in.Parameters.(*GetRestApisInput)
5383	_ = input
5384	if !ok {
5385		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5386	}
5387
5388	opPath, opQuery := httpbinding.SplitURI("/restapis")
5389	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5390	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5391	request.Method = "GET"
5392	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5393	if err != nil {
5394		return out, metadata, &smithy.SerializationError{Err: err}
5395	}
5396
5397	if err := awsRestjson1_serializeOpHttpBindingsGetRestApisInput(input, restEncoder); err != nil {
5398		return out, metadata, &smithy.SerializationError{Err: err}
5399	}
5400
5401	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5402		return out, metadata, &smithy.SerializationError{Err: err}
5403	}
5404	in.Request = request
5405
5406	return next.HandleSerialize(ctx, in)
5407}
5408func awsRestjson1_serializeOpHttpBindingsGetRestApisInput(v *GetRestApisInput, encoder *httpbinding.Encoder) error {
5409	if v == nil {
5410		return fmt.Errorf("unsupported serialization of nil %T", v)
5411	}
5412
5413	if v.Limit != nil {
5414		encoder.SetQuery("limit").Integer(*v.Limit)
5415	}
5416
5417	if v.Position != nil {
5418		encoder.SetQuery("position").String(*v.Position)
5419	}
5420
5421	return nil
5422}
5423
5424type awsRestjson1_serializeOpGetSdk struct {
5425}
5426
5427func (*awsRestjson1_serializeOpGetSdk) ID() string {
5428	return "OperationSerializer"
5429}
5430
5431func (m *awsRestjson1_serializeOpGetSdk) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5432	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5433) {
5434	request, ok := in.Request.(*smithyhttp.Request)
5435	if !ok {
5436		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5437	}
5438
5439	input, ok := in.Parameters.(*GetSdkInput)
5440	_ = input
5441	if !ok {
5442		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5443	}
5444
5445	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/sdks/{sdkType}")
5446	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5447	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5448	request.Method = "GET"
5449	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5450	if err != nil {
5451		return out, metadata, &smithy.SerializationError{Err: err}
5452	}
5453
5454	if err := awsRestjson1_serializeOpHttpBindingsGetSdkInput(input, restEncoder); err != nil {
5455		return out, metadata, &smithy.SerializationError{Err: err}
5456	}
5457
5458	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5459		return out, metadata, &smithy.SerializationError{Err: err}
5460	}
5461	in.Request = request
5462
5463	return next.HandleSerialize(ctx, in)
5464}
5465func awsRestjson1_serializeOpHttpBindingsGetSdkInput(v *GetSdkInput, encoder *httpbinding.Encoder) error {
5466	if v == nil {
5467		return fmt.Errorf("unsupported serialization of nil %T", v)
5468	}
5469
5470	if v.Parameters != nil {
5471		for qkey, qvalue := range v.Parameters {
5472			if encoder.HasQuery(qkey) {
5473				continue
5474			}
5475			encoder.SetQuery(qkey).String(qvalue)
5476		}
5477	}
5478
5479	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5480		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5481	}
5482	if v.RestApiId != nil {
5483		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5484			return err
5485		}
5486	}
5487
5488	if v.SdkType == nil || len(*v.SdkType) == 0 {
5489		return &smithy.SerializationError{Err: fmt.Errorf("input member sdkType must not be empty")}
5490	}
5491	if v.SdkType != nil {
5492		if err := encoder.SetURI("sdkType").String(*v.SdkType); err != nil {
5493			return err
5494		}
5495	}
5496
5497	if v.StageName == nil || len(*v.StageName) == 0 {
5498		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
5499	}
5500	if v.StageName != nil {
5501		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
5502			return err
5503		}
5504	}
5505
5506	return nil
5507}
5508
5509type awsRestjson1_serializeOpGetSdkType struct {
5510}
5511
5512func (*awsRestjson1_serializeOpGetSdkType) ID() string {
5513	return "OperationSerializer"
5514}
5515
5516func (m *awsRestjson1_serializeOpGetSdkType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5517	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5518) {
5519	request, ok := in.Request.(*smithyhttp.Request)
5520	if !ok {
5521		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5522	}
5523
5524	input, ok := in.Parameters.(*GetSdkTypeInput)
5525	_ = input
5526	if !ok {
5527		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5528	}
5529
5530	opPath, opQuery := httpbinding.SplitURI("/sdktypes/{id}")
5531	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5532	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5533	request.Method = "GET"
5534	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5535	if err != nil {
5536		return out, metadata, &smithy.SerializationError{Err: err}
5537	}
5538
5539	if err := awsRestjson1_serializeOpHttpBindingsGetSdkTypeInput(input, restEncoder); err != nil {
5540		return out, metadata, &smithy.SerializationError{Err: err}
5541	}
5542
5543	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5544		return out, metadata, &smithy.SerializationError{Err: err}
5545	}
5546	in.Request = request
5547
5548	return next.HandleSerialize(ctx, in)
5549}
5550func awsRestjson1_serializeOpHttpBindingsGetSdkTypeInput(v *GetSdkTypeInput, encoder *httpbinding.Encoder) error {
5551	if v == nil {
5552		return fmt.Errorf("unsupported serialization of nil %T", v)
5553	}
5554
5555	if v.Id == nil || len(*v.Id) == 0 {
5556		return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")}
5557	}
5558	if v.Id != nil {
5559		if err := encoder.SetURI("id").String(*v.Id); err != nil {
5560			return err
5561		}
5562	}
5563
5564	return nil
5565}
5566
5567type awsRestjson1_serializeOpGetSdkTypes struct {
5568}
5569
5570func (*awsRestjson1_serializeOpGetSdkTypes) ID() string {
5571	return "OperationSerializer"
5572}
5573
5574func (m *awsRestjson1_serializeOpGetSdkTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5575	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5576) {
5577	request, ok := in.Request.(*smithyhttp.Request)
5578	if !ok {
5579		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5580	}
5581
5582	input, ok := in.Parameters.(*GetSdkTypesInput)
5583	_ = input
5584	if !ok {
5585		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5586	}
5587
5588	opPath, opQuery := httpbinding.SplitURI("/sdktypes")
5589	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5590	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5591	request.Method = "GET"
5592	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5593	if err != nil {
5594		return out, metadata, &smithy.SerializationError{Err: err}
5595	}
5596
5597	if err := awsRestjson1_serializeOpHttpBindingsGetSdkTypesInput(input, restEncoder); err != nil {
5598		return out, metadata, &smithy.SerializationError{Err: err}
5599	}
5600
5601	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5602		return out, metadata, &smithy.SerializationError{Err: err}
5603	}
5604	in.Request = request
5605
5606	return next.HandleSerialize(ctx, in)
5607}
5608func awsRestjson1_serializeOpHttpBindingsGetSdkTypesInput(v *GetSdkTypesInput, encoder *httpbinding.Encoder) error {
5609	if v == nil {
5610		return fmt.Errorf("unsupported serialization of nil %T", v)
5611	}
5612
5613	if v.Limit != nil {
5614		encoder.SetQuery("limit").Integer(*v.Limit)
5615	}
5616
5617	if v.Position != nil {
5618		encoder.SetQuery("position").String(*v.Position)
5619	}
5620
5621	return nil
5622}
5623
5624type awsRestjson1_serializeOpGetStage struct {
5625}
5626
5627func (*awsRestjson1_serializeOpGetStage) ID() string {
5628	return "OperationSerializer"
5629}
5630
5631func (m *awsRestjson1_serializeOpGetStage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5632	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5633) {
5634	request, ok := in.Request.(*smithyhttp.Request)
5635	if !ok {
5636		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5637	}
5638
5639	input, ok := in.Parameters.(*GetStageInput)
5640	_ = input
5641	if !ok {
5642		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5643	}
5644
5645	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}")
5646	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5647	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5648	request.Method = "GET"
5649	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5650	if err != nil {
5651		return out, metadata, &smithy.SerializationError{Err: err}
5652	}
5653
5654	if err := awsRestjson1_serializeOpHttpBindingsGetStageInput(input, restEncoder); err != nil {
5655		return out, metadata, &smithy.SerializationError{Err: err}
5656	}
5657
5658	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5659		return out, metadata, &smithy.SerializationError{Err: err}
5660	}
5661	in.Request = request
5662
5663	return next.HandleSerialize(ctx, in)
5664}
5665func awsRestjson1_serializeOpHttpBindingsGetStageInput(v *GetStageInput, encoder *httpbinding.Encoder) error {
5666	if v == nil {
5667		return fmt.Errorf("unsupported serialization of nil %T", v)
5668	}
5669
5670	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5671		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5672	}
5673	if v.RestApiId != nil {
5674		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5675			return err
5676		}
5677	}
5678
5679	if v.StageName == nil || len(*v.StageName) == 0 {
5680		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
5681	}
5682	if v.StageName != nil {
5683		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
5684			return err
5685		}
5686	}
5687
5688	return nil
5689}
5690
5691type awsRestjson1_serializeOpGetStages struct {
5692}
5693
5694func (*awsRestjson1_serializeOpGetStages) ID() string {
5695	return "OperationSerializer"
5696}
5697
5698func (m *awsRestjson1_serializeOpGetStages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5699	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5700) {
5701	request, ok := in.Request.(*smithyhttp.Request)
5702	if !ok {
5703		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5704	}
5705
5706	input, ok := in.Parameters.(*GetStagesInput)
5707	_ = input
5708	if !ok {
5709		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5710	}
5711
5712	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages")
5713	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5714	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5715	request.Method = "GET"
5716	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5717	if err != nil {
5718		return out, metadata, &smithy.SerializationError{Err: err}
5719	}
5720
5721	if err := awsRestjson1_serializeOpHttpBindingsGetStagesInput(input, restEncoder); err != nil {
5722		return out, metadata, &smithy.SerializationError{Err: err}
5723	}
5724
5725	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5726		return out, metadata, &smithy.SerializationError{Err: err}
5727	}
5728	in.Request = request
5729
5730	return next.HandleSerialize(ctx, in)
5731}
5732func awsRestjson1_serializeOpHttpBindingsGetStagesInput(v *GetStagesInput, encoder *httpbinding.Encoder) error {
5733	if v == nil {
5734		return fmt.Errorf("unsupported serialization of nil %T", v)
5735	}
5736
5737	if v.DeploymentId != nil {
5738		encoder.SetQuery("deploymentId").String(*v.DeploymentId)
5739	}
5740
5741	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
5742		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
5743	}
5744	if v.RestApiId != nil {
5745		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
5746			return err
5747		}
5748	}
5749
5750	return nil
5751}
5752
5753type awsRestjson1_serializeOpGetTags struct {
5754}
5755
5756func (*awsRestjson1_serializeOpGetTags) ID() string {
5757	return "OperationSerializer"
5758}
5759
5760func (m *awsRestjson1_serializeOpGetTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5761	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5762) {
5763	request, ok := in.Request.(*smithyhttp.Request)
5764	if !ok {
5765		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5766	}
5767
5768	input, ok := in.Parameters.(*GetTagsInput)
5769	_ = input
5770	if !ok {
5771		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5772	}
5773
5774	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
5775	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5776	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5777	request.Method = "GET"
5778	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5779	if err != nil {
5780		return out, metadata, &smithy.SerializationError{Err: err}
5781	}
5782
5783	if err := awsRestjson1_serializeOpHttpBindingsGetTagsInput(input, restEncoder); err != nil {
5784		return out, metadata, &smithy.SerializationError{Err: err}
5785	}
5786
5787	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5788		return out, metadata, &smithy.SerializationError{Err: err}
5789	}
5790	in.Request = request
5791
5792	return next.HandleSerialize(ctx, in)
5793}
5794func awsRestjson1_serializeOpHttpBindingsGetTagsInput(v *GetTagsInput, encoder *httpbinding.Encoder) error {
5795	if v == nil {
5796		return fmt.Errorf("unsupported serialization of nil %T", v)
5797	}
5798
5799	if v.Limit != nil {
5800		encoder.SetQuery("limit").Integer(*v.Limit)
5801	}
5802
5803	if v.Position != nil {
5804		encoder.SetQuery("position").String(*v.Position)
5805	}
5806
5807	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
5808		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
5809	}
5810	if v.ResourceArn != nil {
5811		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
5812			return err
5813		}
5814	}
5815
5816	return nil
5817}
5818
5819type awsRestjson1_serializeOpGetUsage struct {
5820}
5821
5822func (*awsRestjson1_serializeOpGetUsage) ID() string {
5823	return "OperationSerializer"
5824}
5825
5826func (m *awsRestjson1_serializeOpGetUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5827	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5828) {
5829	request, ok := in.Request.(*smithyhttp.Request)
5830	if !ok {
5831		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5832	}
5833
5834	input, ok := in.Parameters.(*GetUsageInput)
5835	_ = input
5836	if !ok {
5837		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5838	}
5839
5840	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/usage")
5841	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5842	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5843	request.Method = "GET"
5844	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5845	if err != nil {
5846		return out, metadata, &smithy.SerializationError{Err: err}
5847	}
5848
5849	if err := awsRestjson1_serializeOpHttpBindingsGetUsageInput(input, restEncoder); err != nil {
5850		return out, metadata, &smithy.SerializationError{Err: err}
5851	}
5852
5853	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5854		return out, metadata, &smithy.SerializationError{Err: err}
5855	}
5856	in.Request = request
5857
5858	return next.HandleSerialize(ctx, in)
5859}
5860func awsRestjson1_serializeOpHttpBindingsGetUsageInput(v *GetUsageInput, encoder *httpbinding.Encoder) error {
5861	if v == nil {
5862		return fmt.Errorf("unsupported serialization of nil %T", v)
5863	}
5864
5865	if v.EndDate != nil {
5866		encoder.SetQuery("endDate").String(*v.EndDate)
5867	}
5868
5869	if v.KeyId != nil {
5870		encoder.SetQuery("keyId").String(*v.KeyId)
5871	}
5872
5873	if v.Limit != nil {
5874		encoder.SetQuery("limit").Integer(*v.Limit)
5875	}
5876
5877	if v.Position != nil {
5878		encoder.SetQuery("position").String(*v.Position)
5879	}
5880
5881	if v.StartDate != nil {
5882		encoder.SetQuery("startDate").String(*v.StartDate)
5883	}
5884
5885	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
5886		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
5887	}
5888	if v.UsagePlanId != nil {
5889		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
5890			return err
5891		}
5892	}
5893
5894	return nil
5895}
5896
5897type awsRestjson1_serializeOpGetUsagePlan struct {
5898}
5899
5900func (*awsRestjson1_serializeOpGetUsagePlan) ID() string {
5901	return "OperationSerializer"
5902}
5903
5904func (m *awsRestjson1_serializeOpGetUsagePlan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5905	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5906) {
5907	request, ok := in.Request.(*smithyhttp.Request)
5908	if !ok {
5909		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5910	}
5911
5912	input, ok := in.Parameters.(*GetUsagePlanInput)
5913	_ = input
5914	if !ok {
5915		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5916	}
5917
5918	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}")
5919	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5920	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5921	request.Method = "GET"
5922	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5923	if err != nil {
5924		return out, metadata, &smithy.SerializationError{Err: err}
5925	}
5926
5927	if err := awsRestjson1_serializeOpHttpBindingsGetUsagePlanInput(input, restEncoder); err != nil {
5928		return out, metadata, &smithy.SerializationError{Err: err}
5929	}
5930
5931	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5932		return out, metadata, &smithy.SerializationError{Err: err}
5933	}
5934	in.Request = request
5935
5936	return next.HandleSerialize(ctx, in)
5937}
5938func awsRestjson1_serializeOpHttpBindingsGetUsagePlanInput(v *GetUsagePlanInput, encoder *httpbinding.Encoder) error {
5939	if v == nil {
5940		return fmt.Errorf("unsupported serialization of nil %T", v)
5941	}
5942
5943	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
5944		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
5945	}
5946	if v.UsagePlanId != nil {
5947		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
5948			return err
5949		}
5950	}
5951
5952	return nil
5953}
5954
5955type awsRestjson1_serializeOpGetUsagePlanKey struct {
5956}
5957
5958func (*awsRestjson1_serializeOpGetUsagePlanKey) ID() string {
5959	return "OperationSerializer"
5960}
5961
5962func (m *awsRestjson1_serializeOpGetUsagePlanKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5963	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5964) {
5965	request, ok := in.Request.(*smithyhttp.Request)
5966	if !ok {
5967		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5968	}
5969
5970	input, ok := in.Parameters.(*GetUsagePlanKeyInput)
5971	_ = input
5972	if !ok {
5973		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5974	}
5975
5976	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}")
5977	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5978	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5979	request.Method = "GET"
5980	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5981	if err != nil {
5982		return out, metadata, &smithy.SerializationError{Err: err}
5983	}
5984
5985	if err := awsRestjson1_serializeOpHttpBindingsGetUsagePlanKeyInput(input, restEncoder); err != nil {
5986		return out, metadata, &smithy.SerializationError{Err: err}
5987	}
5988
5989	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5990		return out, metadata, &smithy.SerializationError{Err: err}
5991	}
5992	in.Request = request
5993
5994	return next.HandleSerialize(ctx, in)
5995}
5996func awsRestjson1_serializeOpHttpBindingsGetUsagePlanKeyInput(v *GetUsagePlanKeyInput, encoder *httpbinding.Encoder) error {
5997	if v == nil {
5998		return fmt.Errorf("unsupported serialization of nil %T", v)
5999	}
6000
6001	if v.KeyId == nil || len(*v.KeyId) == 0 {
6002		return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")}
6003	}
6004	if v.KeyId != nil {
6005		if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil {
6006			return err
6007		}
6008	}
6009
6010	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
6011		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
6012	}
6013	if v.UsagePlanId != nil {
6014		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
6015			return err
6016		}
6017	}
6018
6019	return nil
6020}
6021
6022type awsRestjson1_serializeOpGetUsagePlanKeys struct {
6023}
6024
6025func (*awsRestjson1_serializeOpGetUsagePlanKeys) ID() string {
6026	return "OperationSerializer"
6027}
6028
6029func (m *awsRestjson1_serializeOpGetUsagePlanKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6030	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6031) {
6032	request, ok := in.Request.(*smithyhttp.Request)
6033	if !ok {
6034		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6035	}
6036
6037	input, ok := in.Parameters.(*GetUsagePlanKeysInput)
6038	_ = input
6039	if !ok {
6040		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6041	}
6042
6043	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys")
6044	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6045	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6046	request.Method = "GET"
6047	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6048	if err != nil {
6049		return out, metadata, &smithy.SerializationError{Err: err}
6050	}
6051
6052	if err := awsRestjson1_serializeOpHttpBindingsGetUsagePlanKeysInput(input, restEncoder); err != nil {
6053		return out, metadata, &smithy.SerializationError{Err: err}
6054	}
6055
6056	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6057		return out, metadata, &smithy.SerializationError{Err: err}
6058	}
6059	in.Request = request
6060
6061	return next.HandleSerialize(ctx, in)
6062}
6063func awsRestjson1_serializeOpHttpBindingsGetUsagePlanKeysInput(v *GetUsagePlanKeysInput, encoder *httpbinding.Encoder) error {
6064	if v == nil {
6065		return fmt.Errorf("unsupported serialization of nil %T", v)
6066	}
6067
6068	if v.Limit != nil {
6069		encoder.SetQuery("limit").Integer(*v.Limit)
6070	}
6071
6072	if v.NameQuery != nil {
6073		encoder.SetQuery("name").String(*v.NameQuery)
6074	}
6075
6076	if v.Position != nil {
6077		encoder.SetQuery("position").String(*v.Position)
6078	}
6079
6080	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
6081		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
6082	}
6083	if v.UsagePlanId != nil {
6084		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
6085			return err
6086		}
6087	}
6088
6089	return nil
6090}
6091
6092type awsRestjson1_serializeOpGetUsagePlans struct {
6093}
6094
6095func (*awsRestjson1_serializeOpGetUsagePlans) ID() string {
6096	return "OperationSerializer"
6097}
6098
6099func (m *awsRestjson1_serializeOpGetUsagePlans) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6100	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6101) {
6102	request, ok := in.Request.(*smithyhttp.Request)
6103	if !ok {
6104		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6105	}
6106
6107	input, ok := in.Parameters.(*GetUsagePlansInput)
6108	_ = input
6109	if !ok {
6110		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6111	}
6112
6113	opPath, opQuery := httpbinding.SplitURI("/usageplans")
6114	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6115	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6116	request.Method = "GET"
6117	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6118	if err != nil {
6119		return out, metadata, &smithy.SerializationError{Err: err}
6120	}
6121
6122	if err := awsRestjson1_serializeOpHttpBindingsGetUsagePlansInput(input, restEncoder); err != nil {
6123		return out, metadata, &smithy.SerializationError{Err: err}
6124	}
6125
6126	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6127		return out, metadata, &smithy.SerializationError{Err: err}
6128	}
6129	in.Request = request
6130
6131	return next.HandleSerialize(ctx, in)
6132}
6133func awsRestjson1_serializeOpHttpBindingsGetUsagePlansInput(v *GetUsagePlansInput, encoder *httpbinding.Encoder) error {
6134	if v == nil {
6135		return fmt.Errorf("unsupported serialization of nil %T", v)
6136	}
6137
6138	if v.KeyId != nil {
6139		encoder.SetQuery("keyId").String(*v.KeyId)
6140	}
6141
6142	if v.Limit != nil {
6143		encoder.SetQuery("limit").Integer(*v.Limit)
6144	}
6145
6146	if v.Position != nil {
6147		encoder.SetQuery("position").String(*v.Position)
6148	}
6149
6150	return nil
6151}
6152
6153type awsRestjson1_serializeOpGetVpcLink struct {
6154}
6155
6156func (*awsRestjson1_serializeOpGetVpcLink) ID() string {
6157	return "OperationSerializer"
6158}
6159
6160func (m *awsRestjson1_serializeOpGetVpcLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6161	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6162) {
6163	request, ok := in.Request.(*smithyhttp.Request)
6164	if !ok {
6165		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6166	}
6167
6168	input, ok := in.Parameters.(*GetVpcLinkInput)
6169	_ = input
6170	if !ok {
6171		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6172	}
6173
6174	opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}")
6175	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6176	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6177	request.Method = "GET"
6178	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6179	if err != nil {
6180		return out, metadata, &smithy.SerializationError{Err: err}
6181	}
6182
6183	if err := awsRestjson1_serializeOpHttpBindingsGetVpcLinkInput(input, restEncoder); err != nil {
6184		return out, metadata, &smithy.SerializationError{Err: err}
6185	}
6186
6187	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6188		return out, metadata, &smithy.SerializationError{Err: err}
6189	}
6190	in.Request = request
6191
6192	return next.HandleSerialize(ctx, in)
6193}
6194func awsRestjson1_serializeOpHttpBindingsGetVpcLinkInput(v *GetVpcLinkInput, encoder *httpbinding.Encoder) error {
6195	if v == nil {
6196		return fmt.Errorf("unsupported serialization of nil %T", v)
6197	}
6198
6199	if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 {
6200		return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")}
6201	}
6202	if v.VpcLinkId != nil {
6203		if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil {
6204			return err
6205		}
6206	}
6207
6208	return nil
6209}
6210
6211type awsRestjson1_serializeOpGetVpcLinks struct {
6212}
6213
6214func (*awsRestjson1_serializeOpGetVpcLinks) ID() string {
6215	return "OperationSerializer"
6216}
6217
6218func (m *awsRestjson1_serializeOpGetVpcLinks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6219	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6220) {
6221	request, ok := in.Request.(*smithyhttp.Request)
6222	if !ok {
6223		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6224	}
6225
6226	input, ok := in.Parameters.(*GetVpcLinksInput)
6227	_ = input
6228	if !ok {
6229		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6230	}
6231
6232	opPath, opQuery := httpbinding.SplitURI("/vpclinks")
6233	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6234	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6235	request.Method = "GET"
6236	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6237	if err != nil {
6238		return out, metadata, &smithy.SerializationError{Err: err}
6239	}
6240
6241	if err := awsRestjson1_serializeOpHttpBindingsGetVpcLinksInput(input, restEncoder); err != nil {
6242		return out, metadata, &smithy.SerializationError{Err: err}
6243	}
6244
6245	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6246		return out, metadata, &smithy.SerializationError{Err: err}
6247	}
6248	in.Request = request
6249
6250	return next.HandleSerialize(ctx, in)
6251}
6252func awsRestjson1_serializeOpHttpBindingsGetVpcLinksInput(v *GetVpcLinksInput, encoder *httpbinding.Encoder) error {
6253	if v == nil {
6254		return fmt.Errorf("unsupported serialization of nil %T", v)
6255	}
6256
6257	if v.Limit != nil {
6258		encoder.SetQuery("limit").Integer(*v.Limit)
6259	}
6260
6261	if v.Position != nil {
6262		encoder.SetQuery("position").String(*v.Position)
6263	}
6264
6265	return nil
6266}
6267
6268type awsRestjson1_serializeOpImportApiKeys struct {
6269}
6270
6271func (*awsRestjson1_serializeOpImportApiKeys) ID() string {
6272	return "OperationSerializer"
6273}
6274
6275func (m *awsRestjson1_serializeOpImportApiKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6276	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6277) {
6278	request, ok := in.Request.(*smithyhttp.Request)
6279	if !ok {
6280		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6281	}
6282
6283	input, ok := in.Parameters.(*ImportApiKeysInput)
6284	_ = input
6285	if !ok {
6286		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6287	}
6288
6289	opPath, opQuery := httpbinding.SplitURI("/apikeys?mode=import")
6290	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6291	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6292	request.Method = "POST"
6293	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6294	if err != nil {
6295		return out, metadata, &smithy.SerializationError{Err: err}
6296	}
6297
6298	if err := awsRestjson1_serializeOpHttpBindingsImportApiKeysInput(input, restEncoder); err != nil {
6299		return out, metadata, &smithy.SerializationError{Err: err}
6300	}
6301
6302	if input.Body != nil {
6303		if !restEncoder.HasHeader("Content-Type") {
6304			restEncoder.SetHeader("Content-Type").String("application/octet-stream")
6305		}
6306
6307		payload := bytes.NewReader(input.Body)
6308		if request, err = request.SetStream(payload); err != nil {
6309			return out, metadata, &smithy.SerializationError{Err: err}
6310		}
6311	}
6312
6313	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6314		return out, metadata, &smithy.SerializationError{Err: err}
6315	}
6316	in.Request = request
6317
6318	return next.HandleSerialize(ctx, in)
6319}
6320func awsRestjson1_serializeOpHttpBindingsImportApiKeysInput(v *ImportApiKeysInput, encoder *httpbinding.Encoder) error {
6321	if v == nil {
6322		return fmt.Errorf("unsupported serialization of nil %T", v)
6323	}
6324
6325	if v.FailOnWarnings {
6326		encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings)
6327	}
6328
6329	if len(v.Format) > 0 {
6330		encoder.SetQuery("format").String(string(v.Format))
6331	}
6332
6333	return nil
6334}
6335
6336type awsRestjson1_serializeOpImportDocumentationParts struct {
6337}
6338
6339func (*awsRestjson1_serializeOpImportDocumentationParts) ID() string {
6340	return "OperationSerializer"
6341}
6342
6343func (m *awsRestjson1_serializeOpImportDocumentationParts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6344	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6345) {
6346	request, ok := in.Request.(*smithyhttp.Request)
6347	if !ok {
6348		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6349	}
6350
6351	input, ok := in.Parameters.(*ImportDocumentationPartsInput)
6352	_ = input
6353	if !ok {
6354		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6355	}
6356
6357	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts")
6358	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6359	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6360	request.Method = "PUT"
6361	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6362	if err != nil {
6363		return out, metadata, &smithy.SerializationError{Err: err}
6364	}
6365
6366	if err := awsRestjson1_serializeOpHttpBindingsImportDocumentationPartsInput(input, restEncoder); err != nil {
6367		return out, metadata, &smithy.SerializationError{Err: err}
6368	}
6369
6370	if input.Body != nil {
6371		if !restEncoder.HasHeader("Content-Type") {
6372			restEncoder.SetHeader("Content-Type").String("application/octet-stream")
6373		}
6374
6375		payload := bytes.NewReader(input.Body)
6376		if request, err = request.SetStream(payload); err != nil {
6377			return out, metadata, &smithy.SerializationError{Err: err}
6378		}
6379	}
6380
6381	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6382		return out, metadata, &smithy.SerializationError{Err: err}
6383	}
6384	in.Request = request
6385
6386	return next.HandleSerialize(ctx, in)
6387}
6388func awsRestjson1_serializeOpHttpBindingsImportDocumentationPartsInput(v *ImportDocumentationPartsInput, encoder *httpbinding.Encoder) error {
6389	if v == nil {
6390		return fmt.Errorf("unsupported serialization of nil %T", v)
6391	}
6392
6393	if v.FailOnWarnings {
6394		encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings)
6395	}
6396
6397	if len(v.Mode) > 0 {
6398		encoder.SetQuery("mode").String(string(v.Mode))
6399	}
6400
6401	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
6402		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
6403	}
6404	if v.RestApiId != nil {
6405		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
6406			return err
6407		}
6408	}
6409
6410	return nil
6411}
6412
6413type awsRestjson1_serializeOpImportRestApi struct {
6414}
6415
6416func (*awsRestjson1_serializeOpImportRestApi) ID() string {
6417	return "OperationSerializer"
6418}
6419
6420func (m *awsRestjson1_serializeOpImportRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6421	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6422) {
6423	request, ok := in.Request.(*smithyhttp.Request)
6424	if !ok {
6425		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6426	}
6427
6428	input, ok := in.Parameters.(*ImportRestApiInput)
6429	_ = input
6430	if !ok {
6431		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6432	}
6433
6434	opPath, opQuery := httpbinding.SplitURI("/restapis?mode=import")
6435	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6436	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6437	request.Method = "POST"
6438	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6439	if err != nil {
6440		return out, metadata, &smithy.SerializationError{Err: err}
6441	}
6442
6443	if err := awsRestjson1_serializeOpHttpBindingsImportRestApiInput(input, restEncoder); err != nil {
6444		return out, metadata, &smithy.SerializationError{Err: err}
6445	}
6446
6447	if input.Body != nil {
6448		if !restEncoder.HasHeader("Content-Type") {
6449			restEncoder.SetHeader("Content-Type").String("application/octet-stream")
6450		}
6451
6452		payload := bytes.NewReader(input.Body)
6453		if request, err = request.SetStream(payload); err != nil {
6454			return out, metadata, &smithy.SerializationError{Err: err}
6455		}
6456	}
6457
6458	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6459		return out, metadata, &smithy.SerializationError{Err: err}
6460	}
6461	in.Request = request
6462
6463	return next.HandleSerialize(ctx, in)
6464}
6465func awsRestjson1_serializeOpHttpBindingsImportRestApiInput(v *ImportRestApiInput, encoder *httpbinding.Encoder) error {
6466	if v == nil {
6467		return fmt.Errorf("unsupported serialization of nil %T", v)
6468	}
6469
6470	if v.FailOnWarnings {
6471		encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings)
6472	}
6473
6474	if v.Parameters != nil {
6475		for qkey, qvalue := range v.Parameters {
6476			if encoder.HasQuery(qkey) {
6477				continue
6478			}
6479			encoder.SetQuery(qkey).String(qvalue)
6480		}
6481	}
6482
6483	return nil
6484}
6485
6486type awsRestjson1_serializeOpPutGatewayResponse struct {
6487}
6488
6489func (*awsRestjson1_serializeOpPutGatewayResponse) ID() string {
6490	return "OperationSerializer"
6491}
6492
6493func (m *awsRestjson1_serializeOpPutGatewayResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6494	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6495) {
6496	request, ok := in.Request.(*smithyhttp.Request)
6497	if !ok {
6498		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6499	}
6500
6501	input, ok := in.Parameters.(*PutGatewayResponseInput)
6502	_ = input
6503	if !ok {
6504		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6505	}
6506
6507	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}")
6508	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6509	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6510	request.Method = "PUT"
6511	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6512	if err != nil {
6513		return out, metadata, &smithy.SerializationError{Err: err}
6514	}
6515
6516	if err := awsRestjson1_serializeOpHttpBindingsPutGatewayResponseInput(input, restEncoder); err != nil {
6517		return out, metadata, &smithy.SerializationError{Err: err}
6518	}
6519
6520	restEncoder.SetHeader("Content-Type").String("application/json")
6521
6522	jsonEncoder := smithyjson.NewEncoder()
6523	if err := awsRestjson1_serializeOpDocumentPutGatewayResponseInput(input, jsonEncoder.Value); err != nil {
6524		return out, metadata, &smithy.SerializationError{Err: err}
6525	}
6526
6527	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
6528		return out, metadata, &smithy.SerializationError{Err: err}
6529	}
6530
6531	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6532		return out, metadata, &smithy.SerializationError{Err: err}
6533	}
6534	in.Request = request
6535
6536	return next.HandleSerialize(ctx, in)
6537}
6538func awsRestjson1_serializeOpHttpBindingsPutGatewayResponseInput(v *PutGatewayResponseInput, encoder *httpbinding.Encoder) error {
6539	if v == nil {
6540		return fmt.Errorf("unsupported serialization of nil %T", v)
6541	}
6542
6543	if len(v.ResponseType) == 0 {
6544		return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")}
6545	}
6546	if len(v.ResponseType) > 0 {
6547		if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil {
6548			return err
6549		}
6550	}
6551
6552	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
6553		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
6554	}
6555	if v.RestApiId != nil {
6556		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
6557			return err
6558		}
6559	}
6560
6561	return nil
6562}
6563
6564func awsRestjson1_serializeOpDocumentPutGatewayResponseInput(v *PutGatewayResponseInput, value smithyjson.Value) error {
6565	object := value.Object()
6566	defer object.Close()
6567
6568	if v.ResponseParameters != nil {
6569		ok := object.Key("responseParameters")
6570		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseParameters, ok); err != nil {
6571			return err
6572		}
6573	}
6574
6575	if v.ResponseTemplates != nil {
6576		ok := object.Key("responseTemplates")
6577		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseTemplates, ok); err != nil {
6578			return err
6579		}
6580	}
6581
6582	if v.StatusCode != nil {
6583		ok := object.Key("statusCode")
6584		ok.String(*v.StatusCode)
6585	}
6586
6587	return nil
6588}
6589
6590type awsRestjson1_serializeOpPutIntegration struct {
6591}
6592
6593func (*awsRestjson1_serializeOpPutIntegration) ID() string {
6594	return "OperationSerializer"
6595}
6596
6597func (m *awsRestjson1_serializeOpPutIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6598	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6599) {
6600	request, ok := in.Request.(*smithyhttp.Request)
6601	if !ok {
6602		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6603	}
6604
6605	input, ok := in.Parameters.(*PutIntegrationInput)
6606	_ = input
6607	if !ok {
6608		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6609	}
6610
6611	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration")
6612	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6613	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6614	request.Method = "PUT"
6615	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6616	if err != nil {
6617		return out, metadata, &smithy.SerializationError{Err: err}
6618	}
6619
6620	if err := awsRestjson1_serializeOpHttpBindingsPutIntegrationInput(input, restEncoder); err != nil {
6621		return out, metadata, &smithy.SerializationError{Err: err}
6622	}
6623
6624	restEncoder.SetHeader("Content-Type").String("application/json")
6625
6626	jsonEncoder := smithyjson.NewEncoder()
6627	if err := awsRestjson1_serializeOpDocumentPutIntegrationInput(input, jsonEncoder.Value); err != nil {
6628		return out, metadata, &smithy.SerializationError{Err: err}
6629	}
6630
6631	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
6632		return out, metadata, &smithy.SerializationError{Err: err}
6633	}
6634
6635	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6636		return out, metadata, &smithy.SerializationError{Err: err}
6637	}
6638	in.Request = request
6639
6640	return next.HandleSerialize(ctx, in)
6641}
6642func awsRestjson1_serializeOpHttpBindingsPutIntegrationInput(v *PutIntegrationInput, encoder *httpbinding.Encoder) error {
6643	if v == nil {
6644		return fmt.Errorf("unsupported serialization of nil %T", v)
6645	}
6646
6647	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
6648		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
6649	}
6650	if v.HttpMethod != nil {
6651		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
6652			return err
6653		}
6654	}
6655
6656	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
6657		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
6658	}
6659	if v.ResourceId != nil {
6660		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
6661			return err
6662		}
6663	}
6664
6665	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
6666		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
6667	}
6668	if v.RestApiId != nil {
6669		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
6670			return err
6671		}
6672	}
6673
6674	return nil
6675}
6676
6677func awsRestjson1_serializeOpDocumentPutIntegrationInput(v *PutIntegrationInput, value smithyjson.Value) error {
6678	object := value.Object()
6679	defer object.Close()
6680
6681	if v.CacheKeyParameters != nil {
6682		ok := object.Key("cacheKeyParameters")
6683		if err := awsRestjson1_serializeDocumentListOfString(v.CacheKeyParameters, ok); err != nil {
6684			return err
6685		}
6686	}
6687
6688	if v.CacheNamespace != nil {
6689		ok := object.Key("cacheNamespace")
6690		ok.String(*v.CacheNamespace)
6691	}
6692
6693	if v.ConnectionId != nil {
6694		ok := object.Key("connectionId")
6695		ok.String(*v.ConnectionId)
6696	}
6697
6698	if len(v.ConnectionType) > 0 {
6699		ok := object.Key("connectionType")
6700		ok.String(string(v.ConnectionType))
6701	}
6702
6703	if len(v.ContentHandling) > 0 {
6704		ok := object.Key("contentHandling")
6705		ok.String(string(v.ContentHandling))
6706	}
6707
6708	if v.Credentials != nil {
6709		ok := object.Key("credentials")
6710		ok.String(*v.Credentials)
6711	}
6712
6713	if v.IntegrationHttpMethod != nil {
6714		ok := object.Key("httpMethod")
6715		ok.String(*v.IntegrationHttpMethod)
6716	}
6717
6718	if v.PassthroughBehavior != nil {
6719		ok := object.Key("passthroughBehavior")
6720		ok.String(*v.PassthroughBehavior)
6721	}
6722
6723	if v.RequestParameters != nil {
6724		ok := object.Key("requestParameters")
6725		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestParameters, ok); err != nil {
6726			return err
6727		}
6728	}
6729
6730	if v.RequestTemplates != nil {
6731		ok := object.Key("requestTemplates")
6732		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestTemplates, ok); err != nil {
6733			return err
6734		}
6735	}
6736
6737	if v.TimeoutInMillis != nil {
6738		ok := object.Key("timeoutInMillis")
6739		ok.Integer(*v.TimeoutInMillis)
6740	}
6741
6742	if v.TlsConfig != nil {
6743		ok := object.Key("tlsConfig")
6744		if err := awsRestjson1_serializeDocumentTlsConfig(v.TlsConfig, ok); err != nil {
6745			return err
6746		}
6747	}
6748
6749	if len(v.Type) > 0 {
6750		ok := object.Key("type")
6751		ok.String(string(v.Type))
6752	}
6753
6754	if v.Uri != nil {
6755		ok := object.Key("uri")
6756		ok.String(*v.Uri)
6757	}
6758
6759	return nil
6760}
6761
6762type awsRestjson1_serializeOpPutIntegrationResponse struct {
6763}
6764
6765func (*awsRestjson1_serializeOpPutIntegrationResponse) ID() string {
6766	return "OperationSerializer"
6767}
6768
6769func (m *awsRestjson1_serializeOpPutIntegrationResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6770	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6771) {
6772	request, ok := in.Request.(*smithyhttp.Request)
6773	if !ok {
6774		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6775	}
6776
6777	input, ok := in.Parameters.(*PutIntegrationResponseInput)
6778	_ = input
6779	if !ok {
6780		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6781	}
6782
6783	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}")
6784	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6785	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6786	request.Method = "PUT"
6787	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6788	if err != nil {
6789		return out, metadata, &smithy.SerializationError{Err: err}
6790	}
6791
6792	if err := awsRestjson1_serializeOpHttpBindingsPutIntegrationResponseInput(input, restEncoder); err != nil {
6793		return out, metadata, &smithy.SerializationError{Err: err}
6794	}
6795
6796	restEncoder.SetHeader("Content-Type").String("application/json")
6797
6798	jsonEncoder := smithyjson.NewEncoder()
6799	if err := awsRestjson1_serializeOpDocumentPutIntegrationResponseInput(input, jsonEncoder.Value); err != nil {
6800		return out, metadata, &smithy.SerializationError{Err: err}
6801	}
6802
6803	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
6804		return out, metadata, &smithy.SerializationError{Err: err}
6805	}
6806
6807	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6808		return out, metadata, &smithy.SerializationError{Err: err}
6809	}
6810	in.Request = request
6811
6812	return next.HandleSerialize(ctx, in)
6813}
6814func awsRestjson1_serializeOpHttpBindingsPutIntegrationResponseInput(v *PutIntegrationResponseInput, encoder *httpbinding.Encoder) error {
6815	if v == nil {
6816		return fmt.Errorf("unsupported serialization of nil %T", v)
6817	}
6818
6819	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
6820		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
6821	}
6822	if v.HttpMethod != nil {
6823		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
6824			return err
6825		}
6826	}
6827
6828	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
6829		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
6830	}
6831	if v.ResourceId != nil {
6832		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
6833			return err
6834		}
6835	}
6836
6837	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
6838		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
6839	}
6840	if v.RestApiId != nil {
6841		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
6842			return err
6843		}
6844	}
6845
6846	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
6847		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
6848	}
6849	if v.StatusCode != nil {
6850		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
6851			return err
6852		}
6853	}
6854
6855	return nil
6856}
6857
6858func awsRestjson1_serializeOpDocumentPutIntegrationResponseInput(v *PutIntegrationResponseInput, value smithyjson.Value) error {
6859	object := value.Object()
6860	defer object.Close()
6861
6862	if len(v.ContentHandling) > 0 {
6863		ok := object.Key("contentHandling")
6864		ok.String(string(v.ContentHandling))
6865	}
6866
6867	if v.ResponseParameters != nil {
6868		ok := object.Key("responseParameters")
6869		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseParameters, ok); err != nil {
6870			return err
6871		}
6872	}
6873
6874	if v.ResponseTemplates != nil {
6875		ok := object.Key("responseTemplates")
6876		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseTemplates, ok); err != nil {
6877			return err
6878		}
6879	}
6880
6881	if v.SelectionPattern != nil {
6882		ok := object.Key("selectionPattern")
6883		ok.String(*v.SelectionPattern)
6884	}
6885
6886	return nil
6887}
6888
6889type awsRestjson1_serializeOpPutMethod struct {
6890}
6891
6892func (*awsRestjson1_serializeOpPutMethod) ID() string {
6893	return "OperationSerializer"
6894}
6895
6896func (m *awsRestjson1_serializeOpPutMethod) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
6897	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
6898) {
6899	request, ok := in.Request.(*smithyhttp.Request)
6900	if !ok {
6901		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
6902	}
6903
6904	input, ok := in.Parameters.(*PutMethodInput)
6905	_ = input
6906	if !ok {
6907		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
6908	}
6909
6910	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}")
6911	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
6912	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
6913	request.Method = "PUT"
6914	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
6915	if err != nil {
6916		return out, metadata, &smithy.SerializationError{Err: err}
6917	}
6918
6919	if err := awsRestjson1_serializeOpHttpBindingsPutMethodInput(input, restEncoder); err != nil {
6920		return out, metadata, &smithy.SerializationError{Err: err}
6921	}
6922
6923	restEncoder.SetHeader("Content-Type").String("application/json")
6924
6925	jsonEncoder := smithyjson.NewEncoder()
6926	if err := awsRestjson1_serializeOpDocumentPutMethodInput(input, jsonEncoder.Value); err != nil {
6927		return out, metadata, &smithy.SerializationError{Err: err}
6928	}
6929
6930	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
6931		return out, metadata, &smithy.SerializationError{Err: err}
6932	}
6933
6934	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
6935		return out, metadata, &smithy.SerializationError{Err: err}
6936	}
6937	in.Request = request
6938
6939	return next.HandleSerialize(ctx, in)
6940}
6941func awsRestjson1_serializeOpHttpBindingsPutMethodInput(v *PutMethodInput, encoder *httpbinding.Encoder) error {
6942	if v == nil {
6943		return fmt.Errorf("unsupported serialization of nil %T", v)
6944	}
6945
6946	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
6947		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
6948	}
6949	if v.HttpMethod != nil {
6950		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
6951			return err
6952		}
6953	}
6954
6955	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
6956		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
6957	}
6958	if v.ResourceId != nil {
6959		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
6960			return err
6961		}
6962	}
6963
6964	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
6965		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
6966	}
6967	if v.RestApiId != nil {
6968		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
6969			return err
6970		}
6971	}
6972
6973	return nil
6974}
6975
6976func awsRestjson1_serializeOpDocumentPutMethodInput(v *PutMethodInput, value smithyjson.Value) error {
6977	object := value.Object()
6978	defer object.Close()
6979
6980	if v.ApiKeyRequired {
6981		ok := object.Key("apiKeyRequired")
6982		ok.Boolean(v.ApiKeyRequired)
6983	}
6984
6985	if v.AuthorizationScopes != nil {
6986		ok := object.Key("authorizationScopes")
6987		if err := awsRestjson1_serializeDocumentListOfString(v.AuthorizationScopes, ok); err != nil {
6988			return err
6989		}
6990	}
6991
6992	if v.AuthorizationType != nil {
6993		ok := object.Key("authorizationType")
6994		ok.String(*v.AuthorizationType)
6995	}
6996
6997	if v.AuthorizerId != nil {
6998		ok := object.Key("authorizerId")
6999		ok.String(*v.AuthorizerId)
7000	}
7001
7002	if v.OperationName != nil {
7003		ok := object.Key("operationName")
7004		ok.String(*v.OperationName)
7005	}
7006
7007	if v.RequestModels != nil {
7008		ok := object.Key("requestModels")
7009		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestModels, ok); err != nil {
7010			return err
7011		}
7012	}
7013
7014	if v.RequestParameters != nil {
7015		ok := object.Key("requestParameters")
7016		if err := awsRestjson1_serializeDocumentMapOfStringToBoolean(v.RequestParameters, ok); err != nil {
7017			return err
7018		}
7019	}
7020
7021	if v.RequestValidatorId != nil {
7022		ok := object.Key("requestValidatorId")
7023		ok.String(*v.RequestValidatorId)
7024	}
7025
7026	return nil
7027}
7028
7029type awsRestjson1_serializeOpPutMethodResponse struct {
7030}
7031
7032func (*awsRestjson1_serializeOpPutMethodResponse) ID() string {
7033	return "OperationSerializer"
7034}
7035
7036func (m *awsRestjson1_serializeOpPutMethodResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7037	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7038) {
7039	request, ok := in.Request.(*smithyhttp.Request)
7040	if !ok {
7041		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7042	}
7043
7044	input, ok := in.Parameters.(*PutMethodResponseInput)
7045	_ = input
7046	if !ok {
7047		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7048	}
7049
7050	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}")
7051	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7052	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7053	request.Method = "PUT"
7054	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7055	if err != nil {
7056		return out, metadata, &smithy.SerializationError{Err: err}
7057	}
7058
7059	if err := awsRestjson1_serializeOpHttpBindingsPutMethodResponseInput(input, restEncoder); err != nil {
7060		return out, metadata, &smithy.SerializationError{Err: err}
7061	}
7062
7063	restEncoder.SetHeader("Content-Type").String("application/json")
7064
7065	jsonEncoder := smithyjson.NewEncoder()
7066	if err := awsRestjson1_serializeOpDocumentPutMethodResponseInput(input, jsonEncoder.Value); err != nil {
7067		return out, metadata, &smithy.SerializationError{Err: err}
7068	}
7069
7070	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7071		return out, metadata, &smithy.SerializationError{Err: err}
7072	}
7073
7074	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7075		return out, metadata, &smithy.SerializationError{Err: err}
7076	}
7077	in.Request = request
7078
7079	return next.HandleSerialize(ctx, in)
7080}
7081func awsRestjson1_serializeOpHttpBindingsPutMethodResponseInput(v *PutMethodResponseInput, encoder *httpbinding.Encoder) error {
7082	if v == nil {
7083		return fmt.Errorf("unsupported serialization of nil %T", v)
7084	}
7085
7086	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
7087		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
7088	}
7089	if v.HttpMethod != nil {
7090		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
7091			return err
7092		}
7093	}
7094
7095	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
7096		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
7097	}
7098	if v.ResourceId != nil {
7099		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
7100			return err
7101		}
7102	}
7103
7104	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
7105		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
7106	}
7107	if v.RestApiId != nil {
7108		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
7109			return err
7110		}
7111	}
7112
7113	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
7114		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
7115	}
7116	if v.StatusCode != nil {
7117		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
7118			return err
7119		}
7120	}
7121
7122	return nil
7123}
7124
7125func awsRestjson1_serializeOpDocumentPutMethodResponseInput(v *PutMethodResponseInput, value smithyjson.Value) error {
7126	object := value.Object()
7127	defer object.Close()
7128
7129	if v.ResponseModels != nil {
7130		ok := object.Key("responseModels")
7131		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseModels, ok); err != nil {
7132			return err
7133		}
7134	}
7135
7136	if v.ResponseParameters != nil {
7137		ok := object.Key("responseParameters")
7138		if err := awsRestjson1_serializeDocumentMapOfStringToBoolean(v.ResponseParameters, ok); err != nil {
7139			return err
7140		}
7141	}
7142
7143	return nil
7144}
7145
7146type awsRestjson1_serializeOpPutRestApi struct {
7147}
7148
7149func (*awsRestjson1_serializeOpPutRestApi) ID() string {
7150	return "OperationSerializer"
7151}
7152
7153func (m *awsRestjson1_serializeOpPutRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7154	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7155) {
7156	request, ok := in.Request.(*smithyhttp.Request)
7157	if !ok {
7158		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7159	}
7160
7161	input, ok := in.Parameters.(*PutRestApiInput)
7162	_ = input
7163	if !ok {
7164		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7165	}
7166
7167	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}")
7168	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7169	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7170	request.Method = "PUT"
7171	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7172	if err != nil {
7173		return out, metadata, &smithy.SerializationError{Err: err}
7174	}
7175
7176	if err := awsRestjson1_serializeOpHttpBindingsPutRestApiInput(input, restEncoder); err != nil {
7177		return out, metadata, &smithy.SerializationError{Err: err}
7178	}
7179
7180	if input.Body != nil {
7181		if !restEncoder.HasHeader("Content-Type") {
7182			restEncoder.SetHeader("Content-Type").String("application/octet-stream")
7183		}
7184
7185		payload := bytes.NewReader(input.Body)
7186		if request, err = request.SetStream(payload); err != nil {
7187			return out, metadata, &smithy.SerializationError{Err: err}
7188		}
7189	}
7190
7191	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7192		return out, metadata, &smithy.SerializationError{Err: err}
7193	}
7194	in.Request = request
7195
7196	return next.HandleSerialize(ctx, in)
7197}
7198func awsRestjson1_serializeOpHttpBindingsPutRestApiInput(v *PutRestApiInput, encoder *httpbinding.Encoder) error {
7199	if v == nil {
7200		return fmt.Errorf("unsupported serialization of nil %T", v)
7201	}
7202
7203	if v.FailOnWarnings {
7204		encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings)
7205	}
7206
7207	if len(v.Mode) > 0 {
7208		encoder.SetQuery("mode").String(string(v.Mode))
7209	}
7210
7211	if v.Parameters != nil {
7212		for qkey, qvalue := range v.Parameters {
7213			if encoder.HasQuery(qkey) {
7214				continue
7215			}
7216			encoder.SetQuery(qkey).String(qvalue)
7217		}
7218	}
7219
7220	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
7221		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
7222	}
7223	if v.RestApiId != nil {
7224		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
7225			return err
7226		}
7227	}
7228
7229	return nil
7230}
7231
7232type awsRestjson1_serializeOpTagResource struct {
7233}
7234
7235func (*awsRestjson1_serializeOpTagResource) ID() string {
7236	return "OperationSerializer"
7237}
7238
7239func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7240	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7241) {
7242	request, ok := in.Request.(*smithyhttp.Request)
7243	if !ok {
7244		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7245	}
7246
7247	input, ok := in.Parameters.(*TagResourceInput)
7248	_ = input
7249	if !ok {
7250		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7251	}
7252
7253	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
7254	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7255	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7256	request.Method = "PUT"
7257	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7258	if err != nil {
7259		return out, metadata, &smithy.SerializationError{Err: err}
7260	}
7261
7262	if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
7263		return out, metadata, &smithy.SerializationError{Err: err}
7264	}
7265
7266	restEncoder.SetHeader("Content-Type").String("application/json")
7267
7268	jsonEncoder := smithyjson.NewEncoder()
7269	if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
7270		return out, metadata, &smithy.SerializationError{Err: err}
7271	}
7272
7273	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7274		return out, metadata, &smithy.SerializationError{Err: err}
7275	}
7276
7277	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7278		return out, metadata, &smithy.SerializationError{Err: err}
7279	}
7280	in.Request = request
7281
7282	return next.HandleSerialize(ctx, in)
7283}
7284func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
7285	if v == nil {
7286		return fmt.Errorf("unsupported serialization of nil %T", v)
7287	}
7288
7289	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
7290		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
7291	}
7292	if v.ResourceArn != nil {
7293		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
7294			return err
7295		}
7296	}
7297
7298	return nil
7299}
7300
7301func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
7302	object := value.Object()
7303	defer object.Close()
7304
7305	if v.Tags != nil {
7306		ok := object.Key("tags")
7307		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil {
7308			return err
7309		}
7310	}
7311
7312	return nil
7313}
7314
7315type awsRestjson1_serializeOpTestInvokeAuthorizer struct {
7316}
7317
7318func (*awsRestjson1_serializeOpTestInvokeAuthorizer) ID() string {
7319	return "OperationSerializer"
7320}
7321
7322func (m *awsRestjson1_serializeOpTestInvokeAuthorizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7323	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7324) {
7325	request, ok := in.Request.(*smithyhttp.Request)
7326	if !ok {
7327		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7328	}
7329
7330	input, ok := in.Parameters.(*TestInvokeAuthorizerInput)
7331	_ = input
7332	if !ok {
7333		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7334	}
7335
7336	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}")
7337	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7338	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7339	request.Method = "POST"
7340	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7341	if err != nil {
7342		return out, metadata, &smithy.SerializationError{Err: err}
7343	}
7344
7345	if err := awsRestjson1_serializeOpHttpBindingsTestInvokeAuthorizerInput(input, restEncoder); err != nil {
7346		return out, metadata, &smithy.SerializationError{Err: err}
7347	}
7348
7349	restEncoder.SetHeader("Content-Type").String("application/json")
7350
7351	jsonEncoder := smithyjson.NewEncoder()
7352	if err := awsRestjson1_serializeOpDocumentTestInvokeAuthorizerInput(input, jsonEncoder.Value); err != nil {
7353		return out, metadata, &smithy.SerializationError{Err: err}
7354	}
7355
7356	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7357		return out, metadata, &smithy.SerializationError{Err: err}
7358	}
7359
7360	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7361		return out, metadata, &smithy.SerializationError{Err: err}
7362	}
7363	in.Request = request
7364
7365	return next.HandleSerialize(ctx, in)
7366}
7367func awsRestjson1_serializeOpHttpBindingsTestInvokeAuthorizerInput(v *TestInvokeAuthorizerInput, encoder *httpbinding.Encoder) error {
7368	if v == nil {
7369		return fmt.Errorf("unsupported serialization of nil %T", v)
7370	}
7371
7372	if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 {
7373		return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")}
7374	}
7375	if v.AuthorizerId != nil {
7376		if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil {
7377			return err
7378		}
7379	}
7380
7381	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
7382		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
7383	}
7384	if v.RestApiId != nil {
7385		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
7386			return err
7387		}
7388	}
7389
7390	return nil
7391}
7392
7393func awsRestjson1_serializeOpDocumentTestInvokeAuthorizerInput(v *TestInvokeAuthorizerInput, value smithyjson.Value) error {
7394	object := value.Object()
7395	defer object.Close()
7396
7397	if v.AdditionalContext != nil {
7398		ok := object.Key("additionalContext")
7399		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.AdditionalContext, ok); err != nil {
7400			return err
7401		}
7402	}
7403
7404	if v.Body != nil {
7405		ok := object.Key("body")
7406		ok.String(*v.Body)
7407	}
7408
7409	if v.Headers != nil {
7410		ok := object.Key("headers")
7411		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Headers, ok); err != nil {
7412			return err
7413		}
7414	}
7415
7416	if v.MultiValueHeaders != nil {
7417		ok := object.Key("multiValueHeaders")
7418		if err := awsRestjson1_serializeDocumentMapOfStringToList(v.MultiValueHeaders, ok); err != nil {
7419			return err
7420		}
7421	}
7422
7423	if v.PathWithQueryString != nil {
7424		ok := object.Key("pathWithQueryString")
7425		ok.String(*v.PathWithQueryString)
7426	}
7427
7428	if v.StageVariables != nil {
7429		ok := object.Key("stageVariables")
7430		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariables, ok); err != nil {
7431			return err
7432		}
7433	}
7434
7435	return nil
7436}
7437
7438type awsRestjson1_serializeOpTestInvokeMethod struct {
7439}
7440
7441func (*awsRestjson1_serializeOpTestInvokeMethod) ID() string {
7442	return "OperationSerializer"
7443}
7444
7445func (m *awsRestjson1_serializeOpTestInvokeMethod) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7446	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7447) {
7448	request, ok := in.Request.(*smithyhttp.Request)
7449	if !ok {
7450		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7451	}
7452
7453	input, ok := in.Parameters.(*TestInvokeMethodInput)
7454	_ = input
7455	if !ok {
7456		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7457	}
7458
7459	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}")
7460	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7461	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7462	request.Method = "POST"
7463	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7464	if err != nil {
7465		return out, metadata, &smithy.SerializationError{Err: err}
7466	}
7467
7468	if err := awsRestjson1_serializeOpHttpBindingsTestInvokeMethodInput(input, restEncoder); err != nil {
7469		return out, metadata, &smithy.SerializationError{Err: err}
7470	}
7471
7472	restEncoder.SetHeader("Content-Type").String("application/json")
7473
7474	jsonEncoder := smithyjson.NewEncoder()
7475	if err := awsRestjson1_serializeOpDocumentTestInvokeMethodInput(input, jsonEncoder.Value); err != nil {
7476		return out, metadata, &smithy.SerializationError{Err: err}
7477	}
7478
7479	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7480		return out, metadata, &smithy.SerializationError{Err: err}
7481	}
7482
7483	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7484		return out, metadata, &smithy.SerializationError{Err: err}
7485	}
7486	in.Request = request
7487
7488	return next.HandleSerialize(ctx, in)
7489}
7490func awsRestjson1_serializeOpHttpBindingsTestInvokeMethodInput(v *TestInvokeMethodInput, encoder *httpbinding.Encoder) error {
7491	if v == nil {
7492		return fmt.Errorf("unsupported serialization of nil %T", v)
7493	}
7494
7495	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
7496		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
7497	}
7498	if v.HttpMethod != nil {
7499		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
7500			return err
7501		}
7502	}
7503
7504	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
7505		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
7506	}
7507	if v.ResourceId != nil {
7508		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
7509			return err
7510		}
7511	}
7512
7513	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
7514		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
7515	}
7516	if v.RestApiId != nil {
7517		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
7518			return err
7519		}
7520	}
7521
7522	return nil
7523}
7524
7525func awsRestjson1_serializeOpDocumentTestInvokeMethodInput(v *TestInvokeMethodInput, value smithyjson.Value) error {
7526	object := value.Object()
7527	defer object.Close()
7528
7529	if v.Body != nil {
7530		ok := object.Key("body")
7531		ok.String(*v.Body)
7532	}
7533
7534	if v.ClientCertificateId != nil {
7535		ok := object.Key("clientCertificateId")
7536		ok.String(*v.ClientCertificateId)
7537	}
7538
7539	if v.Headers != nil {
7540		ok := object.Key("headers")
7541		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Headers, ok); err != nil {
7542			return err
7543		}
7544	}
7545
7546	if v.MultiValueHeaders != nil {
7547		ok := object.Key("multiValueHeaders")
7548		if err := awsRestjson1_serializeDocumentMapOfStringToList(v.MultiValueHeaders, ok); err != nil {
7549			return err
7550		}
7551	}
7552
7553	if v.PathWithQueryString != nil {
7554		ok := object.Key("pathWithQueryString")
7555		ok.String(*v.PathWithQueryString)
7556	}
7557
7558	if v.StageVariables != nil {
7559		ok := object.Key("stageVariables")
7560		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariables, ok); err != nil {
7561			return err
7562		}
7563	}
7564
7565	return nil
7566}
7567
7568type awsRestjson1_serializeOpUntagResource struct {
7569}
7570
7571func (*awsRestjson1_serializeOpUntagResource) ID() string {
7572	return "OperationSerializer"
7573}
7574
7575func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7576	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7577) {
7578	request, ok := in.Request.(*smithyhttp.Request)
7579	if !ok {
7580		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7581	}
7582
7583	input, ok := in.Parameters.(*UntagResourceInput)
7584	_ = input
7585	if !ok {
7586		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7587	}
7588
7589	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
7590	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7591	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7592	request.Method = "DELETE"
7593	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7594	if err != nil {
7595		return out, metadata, &smithy.SerializationError{Err: err}
7596	}
7597
7598	if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
7599		return out, metadata, &smithy.SerializationError{Err: err}
7600	}
7601
7602	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7603		return out, metadata, &smithy.SerializationError{Err: err}
7604	}
7605	in.Request = request
7606
7607	return next.HandleSerialize(ctx, in)
7608}
7609func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
7610	if v == nil {
7611		return fmt.Errorf("unsupported serialization of nil %T", v)
7612	}
7613
7614	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
7615		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
7616	}
7617	if v.ResourceArn != nil {
7618		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
7619			return err
7620		}
7621	}
7622
7623	if v.TagKeys != nil {
7624		for i := range v.TagKeys {
7625			encoder.AddQuery("tagKeys").String(v.TagKeys[i])
7626		}
7627	}
7628
7629	return nil
7630}
7631
7632type awsRestjson1_serializeOpUpdateAccount struct {
7633}
7634
7635func (*awsRestjson1_serializeOpUpdateAccount) ID() string {
7636	return "OperationSerializer"
7637}
7638
7639func (m *awsRestjson1_serializeOpUpdateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7640	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7641) {
7642	request, ok := in.Request.(*smithyhttp.Request)
7643	if !ok {
7644		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7645	}
7646
7647	input, ok := in.Parameters.(*UpdateAccountInput)
7648	_ = input
7649	if !ok {
7650		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7651	}
7652
7653	opPath, opQuery := httpbinding.SplitURI("/account")
7654	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7655	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7656	request.Method = "PATCH"
7657	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7658	if err != nil {
7659		return out, metadata, &smithy.SerializationError{Err: err}
7660	}
7661
7662	restEncoder.SetHeader("Content-Type").String("application/json")
7663
7664	jsonEncoder := smithyjson.NewEncoder()
7665	if err := awsRestjson1_serializeOpDocumentUpdateAccountInput(input, jsonEncoder.Value); err != nil {
7666		return out, metadata, &smithy.SerializationError{Err: err}
7667	}
7668
7669	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7670		return out, metadata, &smithy.SerializationError{Err: err}
7671	}
7672
7673	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7674		return out, metadata, &smithy.SerializationError{Err: err}
7675	}
7676	in.Request = request
7677
7678	return next.HandleSerialize(ctx, in)
7679}
7680func awsRestjson1_serializeOpHttpBindingsUpdateAccountInput(v *UpdateAccountInput, encoder *httpbinding.Encoder) error {
7681	if v == nil {
7682		return fmt.Errorf("unsupported serialization of nil %T", v)
7683	}
7684
7685	return nil
7686}
7687
7688func awsRestjson1_serializeOpDocumentUpdateAccountInput(v *UpdateAccountInput, value smithyjson.Value) error {
7689	object := value.Object()
7690	defer object.Close()
7691
7692	if v.PatchOperations != nil {
7693		ok := object.Key("patchOperations")
7694		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
7695			return err
7696		}
7697	}
7698
7699	return nil
7700}
7701
7702type awsRestjson1_serializeOpUpdateApiKey struct {
7703}
7704
7705func (*awsRestjson1_serializeOpUpdateApiKey) ID() string {
7706	return "OperationSerializer"
7707}
7708
7709func (m *awsRestjson1_serializeOpUpdateApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7710	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7711) {
7712	request, ok := in.Request.(*smithyhttp.Request)
7713	if !ok {
7714		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7715	}
7716
7717	input, ok := in.Parameters.(*UpdateApiKeyInput)
7718	_ = input
7719	if !ok {
7720		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7721	}
7722
7723	opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}")
7724	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7725	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7726	request.Method = "PATCH"
7727	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7728	if err != nil {
7729		return out, metadata, &smithy.SerializationError{Err: err}
7730	}
7731
7732	if err := awsRestjson1_serializeOpHttpBindingsUpdateApiKeyInput(input, restEncoder); err != nil {
7733		return out, metadata, &smithy.SerializationError{Err: err}
7734	}
7735
7736	restEncoder.SetHeader("Content-Type").String("application/json")
7737
7738	jsonEncoder := smithyjson.NewEncoder()
7739	if err := awsRestjson1_serializeOpDocumentUpdateApiKeyInput(input, jsonEncoder.Value); err != nil {
7740		return out, metadata, &smithy.SerializationError{Err: err}
7741	}
7742
7743	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7744		return out, metadata, &smithy.SerializationError{Err: err}
7745	}
7746
7747	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7748		return out, metadata, &smithy.SerializationError{Err: err}
7749	}
7750	in.Request = request
7751
7752	return next.HandleSerialize(ctx, in)
7753}
7754func awsRestjson1_serializeOpHttpBindingsUpdateApiKeyInput(v *UpdateApiKeyInput, encoder *httpbinding.Encoder) error {
7755	if v == nil {
7756		return fmt.Errorf("unsupported serialization of nil %T", v)
7757	}
7758
7759	if v.ApiKey == nil || len(*v.ApiKey) == 0 {
7760		return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")}
7761	}
7762	if v.ApiKey != nil {
7763		if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil {
7764			return err
7765		}
7766	}
7767
7768	return nil
7769}
7770
7771func awsRestjson1_serializeOpDocumentUpdateApiKeyInput(v *UpdateApiKeyInput, value smithyjson.Value) error {
7772	object := value.Object()
7773	defer object.Close()
7774
7775	if v.PatchOperations != nil {
7776		ok := object.Key("patchOperations")
7777		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
7778			return err
7779		}
7780	}
7781
7782	return nil
7783}
7784
7785type awsRestjson1_serializeOpUpdateAuthorizer struct {
7786}
7787
7788func (*awsRestjson1_serializeOpUpdateAuthorizer) ID() string {
7789	return "OperationSerializer"
7790}
7791
7792func (m *awsRestjson1_serializeOpUpdateAuthorizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7793	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7794) {
7795	request, ok := in.Request.(*smithyhttp.Request)
7796	if !ok {
7797		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7798	}
7799
7800	input, ok := in.Parameters.(*UpdateAuthorizerInput)
7801	_ = input
7802	if !ok {
7803		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7804	}
7805
7806	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}")
7807	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7808	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7809	request.Method = "PATCH"
7810	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7811	if err != nil {
7812		return out, metadata, &smithy.SerializationError{Err: err}
7813	}
7814
7815	if err := awsRestjson1_serializeOpHttpBindingsUpdateAuthorizerInput(input, restEncoder); err != nil {
7816		return out, metadata, &smithy.SerializationError{Err: err}
7817	}
7818
7819	restEncoder.SetHeader("Content-Type").String("application/json")
7820
7821	jsonEncoder := smithyjson.NewEncoder()
7822	if err := awsRestjson1_serializeOpDocumentUpdateAuthorizerInput(input, jsonEncoder.Value); err != nil {
7823		return out, metadata, &smithy.SerializationError{Err: err}
7824	}
7825
7826	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7827		return out, metadata, &smithy.SerializationError{Err: err}
7828	}
7829
7830	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7831		return out, metadata, &smithy.SerializationError{Err: err}
7832	}
7833	in.Request = request
7834
7835	return next.HandleSerialize(ctx, in)
7836}
7837func awsRestjson1_serializeOpHttpBindingsUpdateAuthorizerInput(v *UpdateAuthorizerInput, encoder *httpbinding.Encoder) error {
7838	if v == nil {
7839		return fmt.Errorf("unsupported serialization of nil %T", v)
7840	}
7841
7842	if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 {
7843		return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")}
7844	}
7845	if v.AuthorizerId != nil {
7846		if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil {
7847			return err
7848		}
7849	}
7850
7851	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
7852		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
7853	}
7854	if v.RestApiId != nil {
7855		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
7856			return err
7857		}
7858	}
7859
7860	return nil
7861}
7862
7863func awsRestjson1_serializeOpDocumentUpdateAuthorizerInput(v *UpdateAuthorizerInput, value smithyjson.Value) error {
7864	object := value.Object()
7865	defer object.Close()
7866
7867	if v.PatchOperations != nil {
7868		ok := object.Key("patchOperations")
7869		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
7870			return err
7871		}
7872	}
7873
7874	return nil
7875}
7876
7877type awsRestjson1_serializeOpUpdateBasePathMapping struct {
7878}
7879
7880func (*awsRestjson1_serializeOpUpdateBasePathMapping) ID() string {
7881	return "OperationSerializer"
7882}
7883
7884func (m *awsRestjson1_serializeOpUpdateBasePathMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7885	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7886) {
7887	request, ok := in.Request.(*smithyhttp.Request)
7888	if !ok {
7889		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7890	}
7891
7892	input, ok := in.Parameters.(*UpdateBasePathMappingInput)
7893	_ = input
7894	if !ok {
7895		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7896	}
7897
7898	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}")
7899	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7900	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7901	request.Method = "PATCH"
7902	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7903	if err != nil {
7904		return out, metadata, &smithy.SerializationError{Err: err}
7905	}
7906
7907	if err := awsRestjson1_serializeOpHttpBindingsUpdateBasePathMappingInput(input, restEncoder); err != nil {
7908		return out, metadata, &smithy.SerializationError{Err: err}
7909	}
7910
7911	restEncoder.SetHeader("Content-Type").String("application/json")
7912
7913	jsonEncoder := smithyjson.NewEncoder()
7914	if err := awsRestjson1_serializeOpDocumentUpdateBasePathMappingInput(input, jsonEncoder.Value); err != nil {
7915		return out, metadata, &smithy.SerializationError{Err: err}
7916	}
7917
7918	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
7919		return out, metadata, &smithy.SerializationError{Err: err}
7920	}
7921
7922	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
7923		return out, metadata, &smithy.SerializationError{Err: err}
7924	}
7925	in.Request = request
7926
7927	return next.HandleSerialize(ctx, in)
7928}
7929func awsRestjson1_serializeOpHttpBindingsUpdateBasePathMappingInput(v *UpdateBasePathMappingInput, encoder *httpbinding.Encoder) error {
7930	if v == nil {
7931		return fmt.Errorf("unsupported serialization of nil %T", v)
7932	}
7933
7934	if v.BasePath == nil || len(*v.BasePath) == 0 {
7935		return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")}
7936	}
7937	if v.BasePath != nil {
7938		if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil {
7939			return err
7940		}
7941	}
7942
7943	if v.DomainName == nil || len(*v.DomainName) == 0 {
7944		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
7945	}
7946	if v.DomainName != nil {
7947		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
7948			return err
7949		}
7950	}
7951
7952	return nil
7953}
7954
7955func awsRestjson1_serializeOpDocumentUpdateBasePathMappingInput(v *UpdateBasePathMappingInput, value smithyjson.Value) error {
7956	object := value.Object()
7957	defer object.Close()
7958
7959	if v.PatchOperations != nil {
7960		ok := object.Key("patchOperations")
7961		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
7962			return err
7963		}
7964	}
7965
7966	return nil
7967}
7968
7969type awsRestjson1_serializeOpUpdateClientCertificate struct {
7970}
7971
7972func (*awsRestjson1_serializeOpUpdateClientCertificate) ID() string {
7973	return "OperationSerializer"
7974}
7975
7976func (m *awsRestjson1_serializeOpUpdateClientCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
7977	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
7978) {
7979	request, ok := in.Request.(*smithyhttp.Request)
7980	if !ok {
7981		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
7982	}
7983
7984	input, ok := in.Parameters.(*UpdateClientCertificateInput)
7985	_ = input
7986	if !ok {
7987		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
7988	}
7989
7990	opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}")
7991	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
7992	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
7993	request.Method = "PATCH"
7994	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
7995	if err != nil {
7996		return out, metadata, &smithy.SerializationError{Err: err}
7997	}
7998
7999	if err := awsRestjson1_serializeOpHttpBindingsUpdateClientCertificateInput(input, restEncoder); err != nil {
8000		return out, metadata, &smithy.SerializationError{Err: err}
8001	}
8002
8003	restEncoder.SetHeader("Content-Type").String("application/json")
8004
8005	jsonEncoder := smithyjson.NewEncoder()
8006	if err := awsRestjson1_serializeOpDocumentUpdateClientCertificateInput(input, jsonEncoder.Value); err != nil {
8007		return out, metadata, &smithy.SerializationError{Err: err}
8008	}
8009
8010	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8011		return out, metadata, &smithy.SerializationError{Err: err}
8012	}
8013
8014	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8015		return out, metadata, &smithy.SerializationError{Err: err}
8016	}
8017	in.Request = request
8018
8019	return next.HandleSerialize(ctx, in)
8020}
8021func awsRestjson1_serializeOpHttpBindingsUpdateClientCertificateInput(v *UpdateClientCertificateInput, encoder *httpbinding.Encoder) error {
8022	if v == nil {
8023		return fmt.Errorf("unsupported serialization of nil %T", v)
8024	}
8025
8026	if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 {
8027		return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")}
8028	}
8029	if v.ClientCertificateId != nil {
8030		if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil {
8031			return err
8032		}
8033	}
8034
8035	return nil
8036}
8037
8038func awsRestjson1_serializeOpDocumentUpdateClientCertificateInput(v *UpdateClientCertificateInput, value smithyjson.Value) error {
8039	object := value.Object()
8040	defer object.Close()
8041
8042	if v.PatchOperations != nil {
8043		ok := object.Key("patchOperations")
8044		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8045			return err
8046		}
8047	}
8048
8049	return nil
8050}
8051
8052type awsRestjson1_serializeOpUpdateDeployment struct {
8053}
8054
8055func (*awsRestjson1_serializeOpUpdateDeployment) ID() string {
8056	return "OperationSerializer"
8057}
8058
8059func (m *awsRestjson1_serializeOpUpdateDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8060	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8061) {
8062	request, ok := in.Request.(*smithyhttp.Request)
8063	if !ok {
8064		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8065	}
8066
8067	input, ok := in.Parameters.(*UpdateDeploymentInput)
8068	_ = input
8069	if !ok {
8070		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8071	}
8072
8073	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}")
8074	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8075	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8076	request.Method = "PATCH"
8077	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8078	if err != nil {
8079		return out, metadata, &smithy.SerializationError{Err: err}
8080	}
8081
8082	if err := awsRestjson1_serializeOpHttpBindingsUpdateDeploymentInput(input, restEncoder); err != nil {
8083		return out, metadata, &smithy.SerializationError{Err: err}
8084	}
8085
8086	restEncoder.SetHeader("Content-Type").String("application/json")
8087
8088	jsonEncoder := smithyjson.NewEncoder()
8089	if err := awsRestjson1_serializeOpDocumentUpdateDeploymentInput(input, jsonEncoder.Value); err != nil {
8090		return out, metadata, &smithy.SerializationError{Err: err}
8091	}
8092
8093	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8094		return out, metadata, &smithy.SerializationError{Err: err}
8095	}
8096
8097	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8098		return out, metadata, &smithy.SerializationError{Err: err}
8099	}
8100	in.Request = request
8101
8102	return next.HandleSerialize(ctx, in)
8103}
8104func awsRestjson1_serializeOpHttpBindingsUpdateDeploymentInput(v *UpdateDeploymentInput, encoder *httpbinding.Encoder) error {
8105	if v == nil {
8106		return fmt.Errorf("unsupported serialization of nil %T", v)
8107	}
8108
8109	if v.DeploymentId == nil || len(*v.DeploymentId) == 0 {
8110		return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")}
8111	}
8112	if v.DeploymentId != nil {
8113		if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil {
8114			return err
8115		}
8116	}
8117
8118	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8119		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8120	}
8121	if v.RestApiId != nil {
8122		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8123			return err
8124		}
8125	}
8126
8127	return nil
8128}
8129
8130func awsRestjson1_serializeOpDocumentUpdateDeploymentInput(v *UpdateDeploymentInput, value smithyjson.Value) error {
8131	object := value.Object()
8132	defer object.Close()
8133
8134	if v.PatchOperations != nil {
8135		ok := object.Key("patchOperations")
8136		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8137			return err
8138		}
8139	}
8140
8141	return nil
8142}
8143
8144type awsRestjson1_serializeOpUpdateDocumentationPart struct {
8145}
8146
8147func (*awsRestjson1_serializeOpUpdateDocumentationPart) ID() string {
8148	return "OperationSerializer"
8149}
8150
8151func (m *awsRestjson1_serializeOpUpdateDocumentationPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8152	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8153) {
8154	request, ok := in.Request.(*smithyhttp.Request)
8155	if !ok {
8156		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8157	}
8158
8159	input, ok := in.Parameters.(*UpdateDocumentationPartInput)
8160	_ = input
8161	if !ok {
8162		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8163	}
8164
8165	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}")
8166	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8167	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8168	request.Method = "PATCH"
8169	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8170	if err != nil {
8171		return out, metadata, &smithy.SerializationError{Err: err}
8172	}
8173
8174	if err := awsRestjson1_serializeOpHttpBindingsUpdateDocumentationPartInput(input, restEncoder); err != nil {
8175		return out, metadata, &smithy.SerializationError{Err: err}
8176	}
8177
8178	restEncoder.SetHeader("Content-Type").String("application/json")
8179
8180	jsonEncoder := smithyjson.NewEncoder()
8181	if err := awsRestjson1_serializeOpDocumentUpdateDocumentationPartInput(input, jsonEncoder.Value); err != nil {
8182		return out, metadata, &smithy.SerializationError{Err: err}
8183	}
8184
8185	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8186		return out, metadata, &smithy.SerializationError{Err: err}
8187	}
8188
8189	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8190		return out, metadata, &smithy.SerializationError{Err: err}
8191	}
8192	in.Request = request
8193
8194	return next.HandleSerialize(ctx, in)
8195}
8196func awsRestjson1_serializeOpHttpBindingsUpdateDocumentationPartInput(v *UpdateDocumentationPartInput, encoder *httpbinding.Encoder) error {
8197	if v == nil {
8198		return fmt.Errorf("unsupported serialization of nil %T", v)
8199	}
8200
8201	if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 {
8202		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")}
8203	}
8204	if v.DocumentationPartId != nil {
8205		if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil {
8206			return err
8207		}
8208	}
8209
8210	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8211		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8212	}
8213	if v.RestApiId != nil {
8214		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8215			return err
8216		}
8217	}
8218
8219	return nil
8220}
8221
8222func awsRestjson1_serializeOpDocumentUpdateDocumentationPartInput(v *UpdateDocumentationPartInput, value smithyjson.Value) error {
8223	object := value.Object()
8224	defer object.Close()
8225
8226	if v.PatchOperations != nil {
8227		ok := object.Key("patchOperations")
8228		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8229			return err
8230		}
8231	}
8232
8233	return nil
8234}
8235
8236type awsRestjson1_serializeOpUpdateDocumentationVersion struct {
8237}
8238
8239func (*awsRestjson1_serializeOpUpdateDocumentationVersion) ID() string {
8240	return "OperationSerializer"
8241}
8242
8243func (m *awsRestjson1_serializeOpUpdateDocumentationVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8244	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8245) {
8246	request, ok := in.Request.(*smithyhttp.Request)
8247	if !ok {
8248		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8249	}
8250
8251	input, ok := in.Parameters.(*UpdateDocumentationVersionInput)
8252	_ = input
8253	if !ok {
8254		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8255	}
8256
8257	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}")
8258	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8259	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8260	request.Method = "PATCH"
8261	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8262	if err != nil {
8263		return out, metadata, &smithy.SerializationError{Err: err}
8264	}
8265
8266	if err := awsRestjson1_serializeOpHttpBindingsUpdateDocumentationVersionInput(input, restEncoder); err != nil {
8267		return out, metadata, &smithy.SerializationError{Err: err}
8268	}
8269
8270	restEncoder.SetHeader("Content-Type").String("application/json")
8271
8272	jsonEncoder := smithyjson.NewEncoder()
8273	if err := awsRestjson1_serializeOpDocumentUpdateDocumentationVersionInput(input, jsonEncoder.Value); err != nil {
8274		return out, metadata, &smithy.SerializationError{Err: err}
8275	}
8276
8277	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8278		return out, metadata, &smithy.SerializationError{Err: err}
8279	}
8280
8281	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8282		return out, metadata, &smithy.SerializationError{Err: err}
8283	}
8284	in.Request = request
8285
8286	return next.HandleSerialize(ctx, in)
8287}
8288func awsRestjson1_serializeOpHttpBindingsUpdateDocumentationVersionInput(v *UpdateDocumentationVersionInput, encoder *httpbinding.Encoder) error {
8289	if v == nil {
8290		return fmt.Errorf("unsupported serialization of nil %T", v)
8291	}
8292
8293	if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 {
8294		return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")}
8295	}
8296	if v.DocumentationVersion != nil {
8297		if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil {
8298			return err
8299		}
8300	}
8301
8302	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8303		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8304	}
8305	if v.RestApiId != nil {
8306		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8307			return err
8308		}
8309	}
8310
8311	return nil
8312}
8313
8314func awsRestjson1_serializeOpDocumentUpdateDocumentationVersionInput(v *UpdateDocumentationVersionInput, value smithyjson.Value) error {
8315	object := value.Object()
8316	defer object.Close()
8317
8318	if v.PatchOperations != nil {
8319		ok := object.Key("patchOperations")
8320		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8321			return err
8322		}
8323	}
8324
8325	return nil
8326}
8327
8328type awsRestjson1_serializeOpUpdateDomainName struct {
8329}
8330
8331func (*awsRestjson1_serializeOpUpdateDomainName) ID() string {
8332	return "OperationSerializer"
8333}
8334
8335func (m *awsRestjson1_serializeOpUpdateDomainName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8336	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8337) {
8338	request, ok := in.Request.(*smithyhttp.Request)
8339	if !ok {
8340		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8341	}
8342
8343	input, ok := in.Parameters.(*UpdateDomainNameInput)
8344	_ = input
8345	if !ok {
8346		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8347	}
8348
8349	opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}")
8350	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8351	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8352	request.Method = "PATCH"
8353	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8354	if err != nil {
8355		return out, metadata, &smithy.SerializationError{Err: err}
8356	}
8357
8358	if err := awsRestjson1_serializeOpHttpBindingsUpdateDomainNameInput(input, restEncoder); err != nil {
8359		return out, metadata, &smithy.SerializationError{Err: err}
8360	}
8361
8362	restEncoder.SetHeader("Content-Type").String("application/json")
8363
8364	jsonEncoder := smithyjson.NewEncoder()
8365	if err := awsRestjson1_serializeOpDocumentUpdateDomainNameInput(input, jsonEncoder.Value); err != nil {
8366		return out, metadata, &smithy.SerializationError{Err: err}
8367	}
8368
8369	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8370		return out, metadata, &smithy.SerializationError{Err: err}
8371	}
8372
8373	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8374		return out, metadata, &smithy.SerializationError{Err: err}
8375	}
8376	in.Request = request
8377
8378	return next.HandleSerialize(ctx, in)
8379}
8380func awsRestjson1_serializeOpHttpBindingsUpdateDomainNameInput(v *UpdateDomainNameInput, encoder *httpbinding.Encoder) error {
8381	if v == nil {
8382		return fmt.Errorf("unsupported serialization of nil %T", v)
8383	}
8384
8385	if v.DomainName == nil || len(*v.DomainName) == 0 {
8386		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
8387	}
8388	if v.DomainName != nil {
8389		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
8390			return err
8391		}
8392	}
8393
8394	return nil
8395}
8396
8397func awsRestjson1_serializeOpDocumentUpdateDomainNameInput(v *UpdateDomainNameInput, value smithyjson.Value) error {
8398	object := value.Object()
8399	defer object.Close()
8400
8401	if v.PatchOperations != nil {
8402		ok := object.Key("patchOperations")
8403		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8404			return err
8405		}
8406	}
8407
8408	return nil
8409}
8410
8411type awsRestjson1_serializeOpUpdateGatewayResponse struct {
8412}
8413
8414func (*awsRestjson1_serializeOpUpdateGatewayResponse) ID() string {
8415	return "OperationSerializer"
8416}
8417
8418func (m *awsRestjson1_serializeOpUpdateGatewayResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8419	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8420) {
8421	request, ok := in.Request.(*smithyhttp.Request)
8422	if !ok {
8423		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8424	}
8425
8426	input, ok := in.Parameters.(*UpdateGatewayResponseInput)
8427	_ = input
8428	if !ok {
8429		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8430	}
8431
8432	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}")
8433	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8434	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8435	request.Method = "PATCH"
8436	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8437	if err != nil {
8438		return out, metadata, &smithy.SerializationError{Err: err}
8439	}
8440
8441	if err := awsRestjson1_serializeOpHttpBindingsUpdateGatewayResponseInput(input, restEncoder); err != nil {
8442		return out, metadata, &smithy.SerializationError{Err: err}
8443	}
8444
8445	restEncoder.SetHeader("Content-Type").String("application/json")
8446
8447	jsonEncoder := smithyjson.NewEncoder()
8448	if err := awsRestjson1_serializeOpDocumentUpdateGatewayResponseInput(input, jsonEncoder.Value); err != nil {
8449		return out, metadata, &smithy.SerializationError{Err: err}
8450	}
8451
8452	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8453		return out, metadata, &smithy.SerializationError{Err: err}
8454	}
8455
8456	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8457		return out, metadata, &smithy.SerializationError{Err: err}
8458	}
8459	in.Request = request
8460
8461	return next.HandleSerialize(ctx, in)
8462}
8463func awsRestjson1_serializeOpHttpBindingsUpdateGatewayResponseInput(v *UpdateGatewayResponseInput, encoder *httpbinding.Encoder) error {
8464	if v == nil {
8465		return fmt.Errorf("unsupported serialization of nil %T", v)
8466	}
8467
8468	if len(v.ResponseType) == 0 {
8469		return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")}
8470	}
8471	if len(v.ResponseType) > 0 {
8472		if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil {
8473			return err
8474		}
8475	}
8476
8477	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8478		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8479	}
8480	if v.RestApiId != nil {
8481		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8482			return err
8483		}
8484	}
8485
8486	return nil
8487}
8488
8489func awsRestjson1_serializeOpDocumentUpdateGatewayResponseInput(v *UpdateGatewayResponseInput, value smithyjson.Value) error {
8490	object := value.Object()
8491	defer object.Close()
8492
8493	if v.PatchOperations != nil {
8494		ok := object.Key("patchOperations")
8495		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8496			return err
8497		}
8498	}
8499
8500	return nil
8501}
8502
8503type awsRestjson1_serializeOpUpdateIntegration struct {
8504}
8505
8506func (*awsRestjson1_serializeOpUpdateIntegration) ID() string {
8507	return "OperationSerializer"
8508}
8509
8510func (m *awsRestjson1_serializeOpUpdateIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8511	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8512) {
8513	request, ok := in.Request.(*smithyhttp.Request)
8514	if !ok {
8515		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8516	}
8517
8518	input, ok := in.Parameters.(*UpdateIntegrationInput)
8519	_ = input
8520	if !ok {
8521		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8522	}
8523
8524	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration")
8525	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8526	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8527	request.Method = "PATCH"
8528	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8529	if err != nil {
8530		return out, metadata, &smithy.SerializationError{Err: err}
8531	}
8532
8533	if err := awsRestjson1_serializeOpHttpBindingsUpdateIntegrationInput(input, restEncoder); err != nil {
8534		return out, metadata, &smithy.SerializationError{Err: err}
8535	}
8536
8537	restEncoder.SetHeader("Content-Type").String("application/json")
8538
8539	jsonEncoder := smithyjson.NewEncoder()
8540	if err := awsRestjson1_serializeOpDocumentUpdateIntegrationInput(input, jsonEncoder.Value); err != nil {
8541		return out, metadata, &smithy.SerializationError{Err: err}
8542	}
8543
8544	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8545		return out, metadata, &smithy.SerializationError{Err: err}
8546	}
8547
8548	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8549		return out, metadata, &smithy.SerializationError{Err: err}
8550	}
8551	in.Request = request
8552
8553	return next.HandleSerialize(ctx, in)
8554}
8555func awsRestjson1_serializeOpHttpBindingsUpdateIntegrationInput(v *UpdateIntegrationInput, encoder *httpbinding.Encoder) error {
8556	if v == nil {
8557		return fmt.Errorf("unsupported serialization of nil %T", v)
8558	}
8559
8560	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
8561		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
8562	}
8563	if v.HttpMethod != nil {
8564		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
8565			return err
8566		}
8567	}
8568
8569	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
8570		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
8571	}
8572	if v.ResourceId != nil {
8573		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
8574			return err
8575		}
8576	}
8577
8578	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8579		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8580	}
8581	if v.RestApiId != nil {
8582		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8583			return err
8584		}
8585	}
8586
8587	return nil
8588}
8589
8590func awsRestjson1_serializeOpDocumentUpdateIntegrationInput(v *UpdateIntegrationInput, value smithyjson.Value) error {
8591	object := value.Object()
8592	defer object.Close()
8593
8594	if v.PatchOperations != nil {
8595		ok := object.Key("patchOperations")
8596		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8597			return err
8598		}
8599	}
8600
8601	return nil
8602}
8603
8604type awsRestjson1_serializeOpUpdateIntegrationResponse struct {
8605}
8606
8607func (*awsRestjson1_serializeOpUpdateIntegrationResponse) ID() string {
8608	return "OperationSerializer"
8609}
8610
8611func (m *awsRestjson1_serializeOpUpdateIntegrationResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8612	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8613) {
8614	request, ok := in.Request.(*smithyhttp.Request)
8615	if !ok {
8616		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8617	}
8618
8619	input, ok := in.Parameters.(*UpdateIntegrationResponseInput)
8620	_ = input
8621	if !ok {
8622		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8623	}
8624
8625	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}")
8626	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8627	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8628	request.Method = "PATCH"
8629	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8630	if err != nil {
8631		return out, metadata, &smithy.SerializationError{Err: err}
8632	}
8633
8634	if err := awsRestjson1_serializeOpHttpBindingsUpdateIntegrationResponseInput(input, restEncoder); err != nil {
8635		return out, metadata, &smithy.SerializationError{Err: err}
8636	}
8637
8638	restEncoder.SetHeader("Content-Type").String("application/json")
8639
8640	jsonEncoder := smithyjson.NewEncoder()
8641	if err := awsRestjson1_serializeOpDocumentUpdateIntegrationResponseInput(input, jsonEncoder.Value); err != nil {
8642		return out, metadata, &smithy.SerializationError{Err: err}
8643	}
8644
8645	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8646		return out, metadata, &smithy.SerializationError{Err: err}
8647	}
8648
8649	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8650		return out, metadata, &smithy.SerializationError{Err: err}
8651	}
8652	in.Request = request
8653
8654	return next.HandleSerialize(ctx, in)
8655}
8656func awsRestjson1_serializeOpHttpBindingsUpdateIntegrationResponseInput(v *UpdateIntegrationResponseInput, encoder *httpbinding.Encoder) error {
8657	if v == nil {
8658		return fmt.Errorf("unsupported serialization of nil %T", v)
8659	}
8660
8661	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
8662		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
8663	}
8664	if v.HttpMethod != nil {
8665		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
8666			return err
8667		}
8668	}
8669
8670	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
8671		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
8672	}
8673	if v.ResourceId != nil {
8674		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
8675			return err
8676		}
8677	}
8678
8679	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8680		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8681	}
8682	if v.RestApiId != nil {
8683		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8684			return err
8685		}
8686	}
8687
8688	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
8689		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
8690	}
8691	if v.StatusCode != nil {
8692		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
8693			return err
8694		}
8695	}
8696
8697	return nil
8698}
8699
8700func awsRestjson1_serializeOpDocumentUpdateIntegrationResponseInput(v *UpdateIntegrationResponseInput, value smithyjson.Value) error {
8701	object := value.Object()
8702	defer object.Close()
8703
8704	if v.PatchOperations != nil {
8705		ok := object.Key("patchOperations")
8706		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8707			return err
8708		}
8709	}
8710
8711	return nil
8712}
8713
8714type awsRestjson1_serializeOpUpdateMethod struct {
8715}
8716
8717func (*awsRestjson1_serializeOpUpdateMethod) ID() string {
8718	return "OperationSerializer"
8719}
8720
8721func (m *awsRestjson1_serializeOpUpdateMethod) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8722	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8723) {
8724	request, ok := in.Request.(*smithyhttp.Request)
8725	if !ok {
8726		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8727	}
8728
8729	input, ok := in.Parameters.(*UpdateMethodInput)
8730	_ = input
8731	if !ok {
8732		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8733	}
8734
8735	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}")
8736	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8737	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8738	request.Method = "PATCH"
8739	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8740	if err != nil {
8741		return out, metadata, &smithy.SerializationError{Err: err}
8742	}
8743
8744	if err := awsRestjson1_serializeOpHttpBindingsUpdateMethodInput(input, restEncoder); err != nil {
8745		return out, metadata, &smithy.SerializationError{Err: err}
8746	}
8747
8748	restEncoder.SetHeader("Content-Type").String("application/json")
8749
8750	jsonEncoder := smithyjson.NewEncoder()
8751	if err := awsRestjson1_serializeOpDocumentUpdateMethodInput(input, jsonEncoder.Value); err != nil {
8752		return out, metadata, &smithy.SerializationError{Err: err}
8753	}
8754
8755	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8756		return out, metadata, &smithy.SerializationError{Err: err}
8757	}
8758
8759	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8760		return out, metadata, &smithy.SerializationError{Err: err}
8761	}
8762	in.Request = request
8763
8764	return next.HandleSerialize(ctx, in)
8765}
8766func awsRestjson1_serializeOpHttpBindingsUpdateMethodInput(v *UpdateMethodInput, encoder *httpbinding.Encoder) error {
8767	if v == nil {
8768		return fmt.Errorf("unsupported serialization of nil %T", v)
8769	}
8770
8771	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
8772		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
8773	}
8774	if v.HttpMethod != nil {
8775		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
8776			return err
8777		}
8778	}
8779
8780	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
8781		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
8782	}
8783	if v.ResourceId != nil {
8784		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
8785			return err
8786		}
8787	}
8788
8789	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8790		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8791	}
8792	if v.RestApiId != nil {
8793		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8794			return err
8795		}
8796	}
8797
8798	return nil
8799}
8800
8801func awsRestjson1_serializeOpDocumentUpdateMethodInput(v *UpdateMethodInput, value smithyjson.Value) error {
8802	object := value.Object()
8803	defer object.Close()
8804
8805	if v.PatchOperations != nil {
8806		ok := object.Key("patchOperations")
8807		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8808			return err
8809		}
8810	}
8811
8812	return nil
8813}
8814
8815type awsRestjson1_serializeOpUpdateMethodResponse struct {
8816}
8817
8818func (*awsRestjson1_serializeOpUpdateMethodResponse) ID() string {
8819	return "OperationSerializer"
8820}
8821
8822func (m *awsRestjson1_serializeOpUpdateMethodResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8823	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8824) {
8825	request, ok := in.Request.(*smithyhttp.Request)
8826	if !ok {
8827		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8828	}
8829
8830	input, ok := in.Parameters.(*UpdateMethodResponseInput)
8831	_ = input
8832	if !ok {
8833		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8834	}
8835
8836	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}")
8837	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8838	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8839	request.Method = "PATCH"
8840	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8841	if err != nil {
8842		return out, metadata, &smithy.SerializationError{Err: err}
8843	}
8844
8845	if err := awsRestjson1_serializeOpHttpBindingsUpdateMethodResponseInput(input, restEncoder); err != nil {
8846		return out, metadata, &smithy.SerializationError{Err: err}
8847	}
8848
8849	restEncoder.SetHeader("Content-Type").String("application/json")
8850
8851	jsonEncoder := smithyjson.NewEncoder()
8852	if err := awsRestjson1_serializeOpDocumentUpdateMethodResponseInput(input, jsonEncoder.Value); err != nil {
8853		return out, metadata, &smithy.SerializationError{Err: err}
8854	}
8855
8856	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8857		return out, metadata, &smithy.SerializationError{Err: err}
8858	}
8859
8860	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8861		return out, metadata, &smithy.SerializationError{Err: err}
8862	}
8863	in.Request = request
8864
8865	return next.HandleSerialize(ctx, in)
8866}
8867func awsRestjson1_serializeOpHttpBindingsUpdateMethodResponseInput(v *UpdateMethodResponseInput, encoder *httpbinding.Encoder) error {
8868	if v == nil {
8869		return fmt.Errorf("unsupported serialization of nil %T", v)
8870	}
8871
8872	if v.HttpMethod == nil || len(*v.HttpMethod) == 0 {
8873		return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")}
8874	}
8875	if v.HttpMethod != nil {
8876		if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil {
8877			return err
8878		}
8879	}
8880
8881	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
8882		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
8883	}
8884	if v.ResourceId != nil {
8885		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
8886			return err
8887		}
8888	}
8889
8890	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8891		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8892	}
8893	if v.RestApiId != nil {
8894		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8895			return err
8896		}
8897	}
8898
8899	if v.StatusCode == nil || len(*v.StatusCode) == 0 {
8900		return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")}
8901	}
8902	if v.StatusCode != nil {
8903		if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil {
8904			return err
8905		}
8906	}
8907
8908	return nil
8909}
8910
8911func awsRestjson1_serializeOpDocumentUpdateMethodResponseInput(v *UpdateMethodResponseInput, value smithyjson.Value) error {
8912	object := value.Object()
8913	defer object.Close()
8914
8915	if v.PatchOperations != nil {
8916		ok := object.Key("patchOperations")
8917		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
8918			return err
8919		}
8920	}
8921
8922	return nil
8923}
8924
8925type awsRestjson1_serializeOpUpdateModel struct {
8926}
8927
8928func (*awsRestjson1_serializeOpUpdateModel) ID() string {
8929	return "OperationSerializer"
8930}
8931
8932func (m *awsRestjson1_serializeOpUpdateModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
8933	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
8934) {
8935	request, ok := in.Request.(*smithyhttp.Request)
8936	if !ok {
8937		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
8938	}
8939
8940	input, ok := in.Parameters.(*UpdateModelInput)
8941	_ = input
8942	if !ok {
8943		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
8944	}
8945
8946	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}")
8947	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
8948	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
8949	request.Method = "PATCH"
8950	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
8951	if err != nil {
8952		return out, metadata, &smithy.SerializationError{Err: err}
8953	}
8954
8955	if err := awsRestjson1_serializeOpHttpBindingsUpdateModelInput(input, restEncoder); err != nil {
8956		return out, metadata, &smithy.SerializationError{Err: err}
8957	}
8958
8959	restEncoder.SetHeader("Content-Type").String("application/json")
8960
8961	jsonEncoder := smithyjson.NewEncoder()
8962	if err := awsRestjson1_serializeOpDocumentUpdateModelInput(input, jsonEncoder.Value); err != nil {
8963		return out, metadata, &smithy.SerializationError{Err: err}
8964	}
8965
8966	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
8967		return out, metadata, &smithy.SerializationError{Err: err}
8968	}
8969
8970	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
8971		return out, metadata, &smithy.SerializationError{Err: err}
8972	}
8973	in.Request = request
8974
8975	return next.HandleSerialize(ctx, in)
8976}
8977func awsRestjson1_serializeOpHttpBindingsUpdateModelInput(v *UpdateModelInput, encoder *httpbinding.Encoder) error {
8978	if v == nil {
8979		return fmt.Errorf("unsupported serialization of nil %T", v)
8980	}
8981
8982	if v.ModelName == nil || len(*v.ModelName) == 0 {
8983		return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")}
8984	}
8985	if v.ModelName != nil {
8986		if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil {
8987			return err
8988		}
8989	}
8990
8991	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
8992		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
8993	}
8994	if v.RestApiId != nil {
8995		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
8996			return err
8997		}
8998	}
8999
9000	return nil
9001}
9002
9003func awsRestjson1_serializeOpDocumentUpdateModelInput(v *UpdateModelInput, value smithyjson.Value) error {
9004	object := value.Object()
9005	defer object.Close()
9006
9007	if v.PatchOperations != nil {
9008		ok := object.Key("patchOperations")
9009		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9010			return err
9011		}
9012	}
9013
9014	return nil
9015}
9016
9017type awsRestjson1_serializeOpUpdateRequestValidator struct {
9018}
9019
9020func (*awsRestjson1_serializeOpUpdateRequestValidator) ID() string {
9021	return "OperationSerializer"
9022}
9023
9024func (m *awsRestjson1_serializeOpUpdateRequestValidator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9025	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9026) {
9027	request, ok := in.Request.(*smithyhttp.Request)
9028	if !ok {
9029		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9030	}
9031
9032	input, ok := in.Parameters.(*UpdateRequestValidatorInput)
9033	_ = input
9034	if !ok {
9035		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9036	}
9037
9038	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}")
9039	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9040	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9041	request.Method = "PATCH"
9042	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9043	if err != nil {
9044		return out, metadata, &smithy.SerializationError{Err: err}
9045	}
9046
9047	if err := awsRestjson1_serializeOpHttpBindingsUpdateRequestValidatorInput(input, restEncoder); err != nil {
9048		return out, metadata, &smithy.SerializationError{Err: err}
9049	}
9050
9051	restEncoder.SetHeader("Content-Type").String("application/json")
9052
9053	jsonEncoder := smithyjson.NewEncoder()
9054	if err := awsRestjson1_serializeOpDocumentUpdateRequestValidatorInput(input, jsonEncoder.Value); err != nil {
9055		return out, metadata, &smithy.SerializationError{Err: err}
9056	}
9057
9058	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9059		return out, metadata, &smithy.SerializationError{Err: err}
9060	}
9061
9062	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9063		return out, metadata, &smithy.SerializationError{Err: err}
9064	}
9065	in.Request = request
9066
9067	return next.HandleSerialize(ctx, in)
9068}
9069func awsRestjson1_serializeOpHttpBindingsUpdateRequestValidatorInput(v *UpdateRequestValidatorInput, encoder *httpbinding.Encoder) error {
9070	if v == nil {
9071		return fmt.Errorf("unsupported serialization of nil %T", v)
9072	}
9073
9074	if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 {
9075		return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")}
9076	}
9077	if v.RequestValidatorId != nil {
9078		if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil {
9079			return err
9080		}
9081	}
9082
9083	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
9084		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
9085	}
9086	if v.RestApiId != nil {
9087		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
9088			return err
9089		}
9090	}
9091
9092	return nil
9093}
9094
9095func awsRestjson1_serializeOpDocumentUpdateRequestValidatorInput(v *UpdateRequestValidatorInput, value smithyjson.Value) error {
9096	object := value.Object()
9097	defer object.Close()
9098
9099	if v.PatchOperations != nil {
9100		ok := object.Key("patchOperations")
9101		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9102			return err
9103		}
9104	}
9105
9106	return nil
9107}
9108
9109type awsRestjson1_serializeOpUpdateResource struct {
9110}
9111
9112func (*awsRestjson1_serializeOpUpdateResource) ID() string {
9113	return "OperationSerializer"
9114}
9115
9116func (m *awsRestjson1_serializeOpUpdateResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9117	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9118) {
9119	request, ok := in.Request.(*smithyhttp.Request)
9120	if !ok {
9121		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9122	}
9123
9124	input, ok := in.Parameters.(*UpdateResourceInput)
9125	_ = input
9126	if !ok {
9127		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9128	}
9129
9130	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}")
9131	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9132	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9133	request.Method = "PATCH"
9134	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9135	if err != nil {
9136		return out, metadata, &smithy.SerializationError{Err: err}
9137	}
9138
9139	if err := awsRestjson1_serializeOpHttpBindingsUpdateResourceInput(input, restEncoder); err != nil {
9140		return out, metadata, &smithy.SerializationError{Err: err}
9141	}
9142
9143	restEncoder.SetHeader("Content-Type").String("application/json")
9144
9145	jsonEncoder := smithyjson.NewEncoder()
9146	if err := awsRestjson1_serializeOpDocumentUpdateResourceInput(input, jsonEncoder.Value); err != nil {
9147		return out, metadata, &smithy.SerializationError{Err: err}
9148	}
9149
9150	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9151		return out, metadata, &smithy.SerializationError{Err: err}
9152	}
9153
9154	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9155		return out, metadata, &smithy.SerializationError{Err: err}
9156	}
9157	in.Request = request
9158
9159	return next.HandleSerialize(ctx, in)
9160}
9161func awsRestjson1_serializeOpHttpBindingsUpdateResourceInput(v *UpdateResourceInput, encoder *httpbinding.Encoder) error {
9162	if v == nil {
9163		return fmt.Errorf("unsupported serialization of nil %T", v)
9164	}
9165
9166	if v.ResourceId == nil || len(*v.ResourceId) == 0 {
9167		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")}
9168	}
9169	if v.ResourceId != nil {
9170		if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil {
9171			return err
9172		}
9173	}
9174
9175	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
9176		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
9177	}
9178	if v.RestApiId != nil {
9179		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
9180			return err
9181		}
9182	}
9183
9184	return nil
9185}
9186
9187func awsRestjson1_serializeOpDocumentUpdateResourceInput(v *UpdateResourceInput, value smithyjson.Value) error {
9188	object := value.Object()
9189	defer object.Close()
9190
9191	if v.PatchOperations != nil {
9192		ok := object.Key("patchOperations")
9193		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9194			return err
9195		}
9196	}
9197
9198	return nil
9199}
9200
9201type awsRestjson1_serializeOpUpdateRestApi struct {
9202}
9203
9204func (*awsRestjson1_serializeOpUpdateRestApi) ID() string {
9205	return "OperationSerializer"
9206}
9207
9208func (m *awsRestjson1_serializeOpUpdateRestApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9209	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9210) {
9211	request, ok := in.Request.(*smithyhttp.Request)
9212	if !ok {
9213		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9214	}
9215
9216	input, ok := in.Parameters.(*UpdateRestApiInput)
9217	_ = input
9218	if !ok {
9219		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9220	}
9221
9222	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}")
9223	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9224	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9225	request.Method = "PATCH"
9226	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9227	if err != nil {
9228		return out, metadata, &smithy.SerializationError{Err: err}
9229	}
9230
9231	if err := awsRestjson1_serializeOpHttpBindingsUpdateRestApiInput(input, restEncoder); err != nil {
9232		return out, metadata, &smithy.SerializationError{Err: err}
9233	}
9234
9235	restEncoder.SetHeader("Content-Type").String("application/json")
9236
9237	jsonEncoder := smithyjson.NewEncoder()
9238	if err := awsRestjson1_serializeOpDocumentUpdateRestApiInput(input, jsonEncoder.Value); err != nil {
9239		return out, metadata, &smithy.SerializationError{Err: err}
9240	}
9241
9242	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9243		return out, metadata, &smithy.SerializationError{Err: err}
9244	}
9245
9246	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9247		return out, metadata, &smithy.SerializationError{Err: err}
9248	}
9249	in.Request = request
9250
9251	return next.HandleSerialize(ctx, in)
9252}
9253func awsRestjson1_serializeOpHttpBindingsUpdateRestApiInput(v *UpdateRestApiInput, encoder *httpbinding.Encoder) error {
9254	if v == nil {
9255		return fmt.Errorf("unsupported serialization of nil %T", v)
9256	}
9257
9258	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
9259		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
9260	}
9261	if v.RestApiId != nil {
9262		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
9263			return err
9264		}
9265	}
9266
9267	return nil
9268}
9269
9270func awsRestjson1_serializeOpDocumentUpdateRestApiInput(v *UpdateRestApiInput, value smithyjson.Value) error {
9271	object := value.Object()
9272	defer object.Close()
9273
9274	if v.PatchOperations != nil {
9275		ok := object.Key("patchOperations")
9276		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9277			return err
9278		}
9279	}
9280
9281	return nil
9282}
9283
9284type awsRestjson1_serializeOpUpdateStage struct {
9285}
9286
9287func (*awsRestjson1_serializeOpUpdateStage) ID() string {
9288	return "OperationSerializer"
9289}
9290
9291func (m *awsRestjson1_serializeOpUpdateStage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9292	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9293) {
9294	request, ok := in.Request.(*smithyhttp.Request)
9295	if !ok {
9296		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9297	}
9298
9299	input, ok := in.Parameters.(*UpdateStageInput)
9300	_ = input
9301	if !ok {
9302		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9303	}
9304
9305	opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}")
9306	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9307	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9308	request.Method = "PATCH"
9309	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9310	if err != nil {
9311		return out, metadata, &smithy.SerializationError{Err: err}
9312	}
9313
9314	if err := awsRestjson1_serializeOpHttpBindingsUpdateStageInput(input, restEncoder); err != nil {
9315		return out, metadata, &smithy.SerializationError{Err: err}
9316	}
9317
9318	restEncoder.SetHeader("Content-Type").String("application/json")
9319
9320	jsonEncoder := smithyjson.NewEncoder()
9321	if err := awsRestjson1_serializeOpDocumentUpdateStageInput(input, jsonEncoder.Value); err != nil {
9322		return out, metadata, &smithy.SerializationError{Err: err}
9323	}
9324
9325	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9326		return out, metadata, &smithy.SerializationError{Err: err}
9327	}
9328
9329	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9330		return out, metadata, &smithy.SerializationError{Err: err}
9331	}
9332	in.Request = request
9333
9334	return next.HandleSerialize(ctx, in)
9335}
9336func awsRestjson1_serializeOpHttpBindingsUpdateStageInput(v *UpdateStageInput, encoder *httpbinding.Encoder) error {
9337	if v == nil {
9338		return fmt.Errorf("unsupported serialization of nil %T", v)
9339	}
9340
9341	if v.RestApiId == nil || len(*v.RestApiId) == 0 {
9342		return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")}
9343	}
9344	if v.RestApiId != nil {
9345		if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil {
9346			return err
9347		}
9348	}
9349
9350	if v.StageName == nil || len(*v.StageName) == 0 {
9351		return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")}
9352	}
9353	if v.StageName != nil {
9354		if err := encoder.SetURI("stageName").String(*v.StageName); err != nil {
9355			return err
9356		}
9357	}
9358
9359	return nil
9360}
9361
9362func awsRestjson1_serializeOpDocumentUpdateStageInput(v *UpdateStageInput, value smithyjson.Value) error {
9363	object := value.Object()
9364	defer object.Close()
9365
9366	if v.PatchOperations != nil {
9367		ok := object.Key("patchOperations")
9368		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9369			return err
9370		}
9371	}
9372
9373	return nil
9374}
9375
9376type awsRestjson1_serializeOpUpdateUsage struct {
9377}
9378
9379func (*awsRestjson1_serializeOpUpdateUsage) ID() string {
9380	return "OperationSerializer"
9381}
9382
9383func (m *awsRestjson1_serializeOpUpdateUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9384	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9385) {
9386	request, ok := in.Request.(*smithyhttp.Request)
9387	if !ok {
9388		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9389	}
9390
9391	input, ok := in.Parameters.(*UpdateUsageInput)
9392	_ = input
9393	if !ok {
9394		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9395	}
9396
9397	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}/usage")
9398	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9399	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9400	request.Method = "PATCH"
9401	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9402	if err != nil {
9403		return out, metadata, &smithy.SerializationError{Err: err}
9404	}
9405
9406	if err := awsRestjson1_serializeOpHttpBindingsUpdateUsageInput(input, restEncoder); err != nil {
9407		return out, metadata, &smithy.SerializationError{Err: err}
9408	}
9409
9410	restEncoder.SetHeader("Content-Type").String("application/json")
9411
9412	jsonEncoder := smithyjson.NewEncoder()
9413	if err := awsRestjson1_serializeOpDocumentUpdateUsageInput(input, jsonEncoder.Value); err != nil {
9414		return out, metadata, &smithy.SerializationError{Err: err}
9415	}
9416
9417	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9418		return out, metadata, &smithy.SerializationError{Err: err}
9419	}
9420
9421	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9422		return out, metadata, &smithy.SerializationError{Err: err}
9423	}
9424	in.Request = request
9425
9426	return next.HandleSerialize(ctx, in)
9427}
9428func awsRestjson1_serializeOpHttpBindingsUpdateUsageInput(v *UpdateUsageInput, encoder *httpbinding.Encoder) error {
9429	if v == nil {
9430		return fmt.Errorf("unsupported serialization of nil %T", v)
9431	}
9432
9433	if v.KeyId == nil || len(*v.KeyId) == 0 {
9434		return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")}
9435	}
9436	if v.KeyId != nil {
9437		if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil {
9438			return err
9439		}
9440	}
9441
9442	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
9443		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
9444	}
9445	if v.UsagePlanId != nil {
9446		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
9447			return err
9448		}
9449	}
9450
9451	return nil
9452}
9453
9454func awsRestjson1_serializeOpDocumentUpdateUsageInput(v *UpdateUsageInput, value smithyjson.Value) error {
9455	object := value.Object()
9456	defer object.Close()
9457
9458	if v.PatchOperations != nil {
9459		ok := object.Key("patchOperations")
9460		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9461			return err
9462		}
9463	}
9464
9465	return nil
9466}
9467
9468type awsRestjson1_serializeOpUpdateUsagePlan struct {
9469}
9470
9471func (*awsRestjson1_serializeOpUpdateUsagePlan) ID() string {
9472	return "OperationSerializer"
9473}
9474
9475func (m *awsRestjson1_serializeOpUpdateUsagePlan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9476	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9477) {
9478	request, ok := in.Request.(*smithyhttp.Request)
9479	if !ok {
9480		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9481	}
9482
9483	input, ok := in.Parameters.(*UpdateUsagePlanInput)
9484	_ = input
9485	if !ok {
9486		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9487	}
9488
9489	opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}")
9490	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9491	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9492	request.Method = "PATCH"
9493	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9494	if err != nil {
9495		return out, metadata, &smithy.SerializationError{Err: err}
9496	}
9497
9498	if err := awsRestjson1_serializeOpHttpBindingsUpdateUsagePlanInput(input, restEncoder); err != nil {
9499		return out, metadata, &smithy.SerializationError{Err: err}
9500	}
9501
9502	restEncoder.SetHeader("Content-Type").String("application/json")
9503
9504	jsonEncoder := smithyjson.NewEncoder()
9505	if err := awsRestjson1_serializeOpDocumentUpdateUsagePlanInput(input, jsonEncoder.Value); err != nil {
9506		return out, metadata, &smithy.SerializationError{Err: err}
9507	}
9508
9509	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9510		return out, metadata, &smithy.SerializationError{Err: err}
9511	}
9512
9513	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9514		return out, metadata, &smithy.SerializationError{Err: err}
9515	}
9516	in.Request = request
9517
9518	return next.HandleSerialize(ctx, in)
9519}
9520func awsRestjson1_serializeOpHttpBindingsUpdateUsagePlanInput(v *UpdateUsagePlanInput, encoder *httpbinding.Encoder) error {
9521	if v == nil {
9522		return fmt.Errorf("unsupported serialization of nil %T", v)
9523	}
9524
9525	if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 {
9526		return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")}
9527	}
9528	if v.UsagePlanId != nil {
9529		if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil {
9530			return err
9531		}
9532	}
9533
9534	return nil
9535}
9536
9537func awsRestjson1_serializeOpDocumentUpdateUsagePlanInput(v *UpdateUsagePlanInput, value smithyjson.Value) error {
9538	object := value.Object()
9539	defer object.Close()
9540
9541	if v.PatchOperations != nil {
9542		ok := object.Key("patchOperations")
9543		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9544			return err
9545		}
9546	}
9547
9548	return nil
9549}
9550
9551type awsRestjson1_serializeOpUpdateVpcLink struct {
9552}
9553
9554func (*awsRestjson1_serializeOpUpdateVpcLink) ID() string {
9555	return "OperationSerializer"
9556}
9557
9558func (m *awsRestjson1_serializeOpUpdateVpcLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
9559	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
9560) {
9561	request, ok := in.Request.(*smithyhttp.Request)
9562	if !ok {
9563		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
9564	}
9565
9566	input, ok := in.Parameters.(*UpdateVpcLinkInput)
9567	_ = input
9568	if !ok {
9569		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
9570	}
9571
9572	opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}")
9573	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
9574	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
9575	request.Method = "PATCH"
9576	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
9577	if err != nil {
9578		return out, metadata, &smithy.SerializationError{Err: err}
9579	}
9580
9581	if err := awsRestjson1_serializeOpHttpBindingsUpdateVpcLinkInput(input, restEncoder); err != nil {
9582		return out, metadata, &smithy.SerializationError{Err: err}
9583	}
9584
9585	restEncoder.SetHeader("Content-Type").String("application/json")
9586
9587	jsonEncoder := smithyjson.NewEncoder()
9588	if err := awsRestjson1_serializeOpDocumentUpdateVpcLinkInput(input, jsonEncoder.Value); err != nil {
9589		return out, metadata, &smithy.SerializationError{Err: err}
9590	}
9591
9592	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
9593		return out, metadata, &smithy.SerializationError{Err: err}
9594	}
9595
9596	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
9597		return out, metadata, &smithy.SerializationError{Err: err}
9598	}
9599	in.Request = request
9600
9601	return next.HandleSerialize(ctx, in)
9602}
9603func awsRestjson1_serializeOpHttpBindingsUpdateVpcLinkInput(v *UpdateVpcLinkInput, encoder *httpbinding.Encoder) error {
9604	if v == nil {
9605		return fmt.Errorf("unsupported serialization of nil %T", v)
9606	}
9607
9608	if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 {
9609		return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")}
9610	}
9611	if v.VpcLinkId != nil {
9612		if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil {
9613			return err
9614		}
9615	}
9616
9617	return nil
9618}
9619
9620func awsRestjson1_serializeOpDocumentUpdateVpcLinkInput(v *UpdateVpcLinkInput, value smithyjson.Value) error {
9621	object := value.Object()
9622	defer object.Close()
9623
9624	if v.PatchOperations != nil {
9625		ok := object.Key("patchOperations")
9626		if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil {
9627			return err
9628		}
9629	}
9630
9631	return nil
9632}
9633
9634func awsRestjson1_serializeDocumentApiStage(v *types.ApiStage, value smithyjson.Value) error {
9635	object := value.Object()
9636	defer object.Close()
9637
9638	if v.ApiId != nil {
9639		ok := object.Key("apiId")
9640		ok.String(*v.ApiId)
9641	}
9642
9643	if v.Stage != nil {
9644		ok := object.Key("stage")
9645		ok.String(*v.Stage)
9646	}
9647
9648	if v.Throttle != nil {
9649		ok := object.Key("throttle")
9650		if err := awsRestjson1_serializeDocumentMapOfApiStageThrottleSettings(v.Throttle, ok); err != nil {
9651			return err
9652		}
9653	}
9654
9655	return nil
9656}
9657
9658func awsRestjson1_serializeDocumentCanarySettings(v *types.CanarySettings, value smithyjson.Value) error {
9659	object := value.Object()
9660	defer object.Close()
9661
9662	if v.DeploymentId != nil {
9663		ok := object.Key("deploymentId")
9664		ok.String(*v.DeploymentId)
9665	}
9666
9667	if v.PercentTraffic != 0 {
9668		ok := object.Key("percentTraffic")
9669		ok.Double(v.PercentTraffic)
9670	}
9671
9672	if v.StageVariableOverrides != nil {
9673		ok := object.Key("stageVariableOverrides")
9674		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariableOverrides, ok); err != nil {
9675			return err
9676		}
9677	}
9678
9679	if v.UseStageCache {
9680		ok := object.Key("useStageCache")
9681		ok.Boolean(v.UseStageCache)
9682	}
9683
9684	return nil
9685}
9686
9687func awsRestjson1_serializeDocumentDeploymentCanarySettings(v *types.DeploymentCanarySettings, value smithyjson.Value) error {
9688	object := value.Object()
9689	defer object.Close()
9690
9691	if v.PercentTraffic != 0 {
9692		ok := object.Key("percentTraffic")
9693		ok.Double(v.PercentTraffic)
9694	}
9695
9696	if v.StageVariableOverrides != nil {
9697		ok := object.Key("stageVariableOverrides")
9698		if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariableOverrides, ok); err != nil {
9699			return err
9700		}
9701	}
9702
9703	if v.UseStageCache {
9704		ok := object.Key("useStageCache")
9705		ok.Boolean(v.UseStageCache)
9706	}
9707
9708	return nil
9709}
9710
9711func awsRestjson1_serializeDocumentDocumentationPartLocation(v *types.DocumentationPartLocation, value smithyjson.Value) error {
9712	object := value.Object()
9713	defer object.Close()
9714
9715	if v.Method != nil {
9716		ok := object.Key("method")
9717		ok.String(*v.Method)
9718	}
9719
9720	if v.Name != nil {
9721		ok := object.Key("name")
9722		ok.String(*v.Name)
9723	}
9724
9725	if v.Path != nil {
9726		ok := object.Key("path")
9727		ok.String(*v.Path)
9728	}
9729
9730	if v.StatusCode != nil {
9731		ok := object.Key("statusCode")
9732		ok.String(*v.StatusCode)
9733	}
9734
9735	if len(v.Type) > 0 {
9736		ok := object.Key("type")
9737		ok.String(string(v.Type))
9738	}
9739
9740	return nil
9741}
9742
9743func awsRestjson1_serializeDocumentEndpointConfiguration(v *types.EndpointConfiguration, value smithyjson.Value) error {
9744	object := value.Object()
9745	defer object.Close()
9746
9747	if v.Types != nil {
9748		ok := object.Key("types")
9749		if err := awsRestjson1_serializeDocumentListOfEndpointType(v.Types, ok); err != nil {
9750			return err
9751		}
9752	}
9753
9754	if v.VpcEndpointIds != nil {
9755		ok := object.Key("vpcEndpointIds")
9756		if err := awsRestjson1_serializeDocumentListOfString(v.VpcEndpointIds, ok); err != nil {
9757			return err
9758		}
9759	}
9760
9761	return nil
9762}
9763
9764func awsRestjson1_serializeDocumentListOfApiStage(v []types.ApiStage, value smithyjson.Value) error {
9765	array := value.Array()
9766	defer array.Close()
9767
9768	for i := range v {
9769		av := array.Value()
9770		if err := awsRestjson1_serializeDocumentApiStage(&v[i], av); err != nil {
9771			return err
9772		}
9773	}
9774	return nil
9775}
9776
9777func awsRestjson1_serializeDocumentListOfARNs(v []string, value smithyjson.Value) error {
9778	array := value.Array()
9779	defer array.Close()
9780
9781	for i := range v {
9782		av := array.Value()
9783		av.String(v[i])
9784	}
9785	return nil
9786}
9787
9788func awsRestjson1_serializeDocumentListOfEndpointType(v []types.EndpointType, value smithyjson.Value) error {
9789	array := value.Array()
9790	defer array.Close()
9791
9792	for i := range v {
9793		av := array.Value()
9794		av.String(string(v[i]))
9795	}
9796	return nil
9797}
9798
9799func awsRestjson1_serializeDocumentListOfPatchOperation(v []types.PatchOperation, value smithyjson.Value) error {
9800	array := value.Array()
9801	defer array.Close()
9802
9803	for i := range v {
9804		av := array.Value()
9805		if err := awsRestjson1_serializeDocumentPatchOperation(&v[i], av); err != nil {
9806			return err
9807		}
9808	}
9809	return nil
9810}
9811
9812func awsRestjson1_serializeDocumentListOfStageKeys(v []types.StageKey, value smithyjson.Value) error {
9813	array := value.Array()
9814	defer array.Close()
9815
9816	for i := range v {
9817		av := array.Value()
9818		if err := awsRestjson1_serializeDocumentStageKey(&v[i], av); err != nil {
9819			return err
9820		}
9821	}
9822	return nil
9823}
9824
9825func awsRestjson1_serializeDocumentListOfString(v []string, value smithyjson.Value) error {
9826	array := value.Array()
9827	defer array.Close()
9828
9829	for i := range v {
9830		av := array.Value()
9831		av.String(v[i])
9832	}
9833	return nil
9834}
9835
9836func awsRestjson1_serializeDocumentMapOfApiStageThrottleSettings(v map[string]types.ThrottleSettings, value smithyjson.Value) error {
9837	object := value.Object()
9838	defer object.Close()
9839
9840	for key := range v {
9841		om := object.Key(key)
9842		mapVar := v[key]
9843		if err := awsRestjson1_serializeDocumentThrottleSettings(&mapVar, om); err != nil {
9844			return err
9845		}
9846	}
9847	return nil
9848}
9849
9850func awsRestjson1_serializeDocumentMapOfStringToBoolean(v map[string]bool, value smithyjson.Value) error {
9851	object := value.Object()
9852	defer object.Close()
9853
9854	for key := range v {
9855		om := object.Key(key)
9856		om.Boolean(v[key])
9857	}
9858	return nil
9859}
9860
9861func awsRestjson1_serializeDocumentMapOfStringToList(v map[string][]string, value smithyjson.Value) error {
9862	object := value.Object()
9863	defer object.Close()
9864
9865	for key := range v {
9866		om := object.Key(key)
9867		if vv := v[key]; vv == nil {
9868			continue
9869		}
9870		if err := awsRestjson1_serializeDocumentListOfString(v[key], om); err != nil {
9871			return err
9872		}
9873	}
9874	return nil
9875}
9876
9877func awsRestjson1_serializeDocumentMapOfStringToString(v map[string]string, value smithyjson.Value) error {
9878	object := value.Object()
9879	defer object.Close()
9880
9881	for key := range v {
9882		om := object.Key(key)
9883		om.String(v[key])
9884	}
9885	return nil
9886}
9887
9888func awsRestjson1_serializeDocumentMutualTlsAuthenticationInput(v *types.MutualTlsAuthenticationInput, value smithyjson.Value) error {
9889	object := value.Object()
9890	defer object.Close()
9891
9892	if v.TruststoreUri != nil {
9893		ok := object.Key("truststoreUri")
9894		ok.String(*v.TruststoreUri)
9895	}
9896
9897	if v.TruststoreVersion != nil {
9898		ok := object.Key("truststoreVersion")
9899		ok.String(*v.TruststoreVersion)
9900	}
9901
9902	return nil
9903}
9904
9905func awsRestjson1_serializeDocumentPatchOperation(v *types.PatchOperation, value smithyjson.Value) error {
9906	object := value.Object()
9907	defer object.Close()
9908
9909	if v.From != nil {
9910		ok := object.Key("from")
9911		ok.String(*v.From)
9912	}
9913
9914	if len(v.Op) > 0 {
9915		ok := object.Key("op")
9916		ok.String(string(v.Op))
9917	}
9918
9919	if v.Path != nil {
9920		ok := object.Key("path")
9921		ok.String(*v.Path)
9922	}
9923
9924	if v.Value != nil {
9925		ok := object.Key("value")
9926		ok.String(*v.Value)
9927	}
9928
9929	return nil
9930}
9931
9932func awsRestjson1_serializeDocumentQuotaSettings(v *types.QuotaSettings, value smithyjson.Value) error {
9933	object := value.Object()
9934	defer object.Close()
9935
9936	if v.Limit != 0 {
9937		ok := object.Key("limit")
9938		ok.Integer(v.Limit)
9939	}
9940
9941	if v.Offset != 0 {
9942		ok := object.Key("offset")
9943		ok.Integer(v.Offset)
9944	}
9945
9946	if len(v.Period) > 0 {
9947		ok := object.Key("period")
9948		ok.String(string(v.Period))
9949	}
9950
9951	return nil
9952}
9953
9954func awsRestjson1_serializeDocumentStageKey(v *types.StageKey, value smithyjson.Value) error {
9955	object := value.Object()
9956	defer object.Close()
9957
9958	if v.RestApiId != nil {
9959		ok := object.Key("restApiId")
9960		ok.String(*v.RestApiId)
9961	}
9962
9963	if v.StageName != nil {
9964		ok := object.Key("stageName")
9965		ok.String(*v.StageName)
9966	}
9967
9968	return nil
9969}
9970
9971func awsRestjson1_serializeDocumentThrottleSettings(v *types.ThrottleSettings, value smithyjson.Value) error {
9972	object := value.Object()
9973	defer object.Close()
9974
9975	if v.BurstLimit != 0 {
9976		ok := object.Key("burstLimit")
9977		ok.Integer(v.BurstLimit)
9978	}
9979
9980	if v.RateLimit != 0 {
9981		ok := object.Key("rateLimit")
9982		ok.Double(v.RateLimit)
9983	}
9984
9985	return nil
9986}
9987
9988func awsRestjson1_serializeDocumentTlsConfig(v *types.TlsConfig, value smithyjson.Value) error {
9989	object := value.Object()
9990	defer object.Close()
9991
9992	if v.InsecureSkipVerification {
9993		ok := object.Key("insecureSkipVerification")
9994		ok.Boolean(v.InsecureSkipVerification)
9995	}
9996
9997	return nil
9998}
9999