1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package amplify
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/amplify/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	smithytime "github.com/aws/smithy-go/time"
15	smithyhttp "github.com/aws/smithy-go/transport/http"
16)
17
18type awsRestjson1_serializeOpCreateApp struct {
19}
20
21func (*awsRestjson1_serializeOpCreateApp) ID() string {
22	return "OperationSerializer"
23}
24
25func (m *awsRestjson1_serializeOpCreateApp) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
26	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
27) {
28	request, ok := in.Request.(*smithyhttp.Request)
29	if !ok {
30		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
31	}
32
33	input, ok := in.Parameters.(*CreateAppInput)
34	_ = input
35	if !ok {
36		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
37	}
38
39	opPath, opQuery := httpbinding.SplitURI("/apps")
40	request.URL.Path = opPath
41	if len(request.URL.RawQuery) > 0 {
42		request.URL.RawQuery = "&" + opQuery
43	} else {
44		request.URL.RawQuery = opQuery
45	}
46
47	request.Method = "POST"
48	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
49	if err != nil {
50		return out, metadata, &smithy.SerializationError{Err: err}
51	}
52
53	restEncoder.SetHeader("Content-Type").String("application/json")
54
55	jsonEncoder := smithyjson.NewEncoder()
56	if err := awsRestjson1_serializeOpDocumentCreateAppInput(input, jsonEncoder.Value); err != nil {
57		return out, metadata, &smithy.SerializationError{Err: err}
58	}
59
60	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
61		return out, metadata, &smithy.SerializationError{Err: err}
62	}
63
64	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
65		return out, metadata, &smithy.SerializationError{Err: err}
66	}
67	in.Request = request
68
69	return next.HandleSerialize(ctx, in)
70}
71func awsRestjson1_serializeOpHttpBindingsCreateAppInput(v *CreateAppInput, encoder *httpbinding.Encoder) error {
72	if v == nil {
73		return fmt.Errorf("unsupported serialization of nil %T", v)
74	}
75
76	return nil
77}
78
79func awsRestjson1_serializeOpDocumentCreateAppInput(v *CreateAppInput, value smithyjson.Value) error {
80	object := value.Object()
81	defer object.Close()
82
83	if v.AccessToken != nil {
84		ok := object.Key("accessToken")
85		ok.String(*v.AccessToken)
86	}
87
88	if v.AutoBranchCreationConfig != nil {
89		ok := object.Key("autoBranchCreationConfig")
90		if err := awsRestjson1_serializeDocumentAutoBranchCreationConfig(v.AutoBranchCreationConfig, ok); err != nil {
91			return err
92		}
93	}
94
95	if v.AutoBranchCreationPatterns != nil {
96		ok := object.Key("autoBranchCreationPatterns")
97		if err := awsRestjson1_serializeDocumentAutoBranchCreationPatterns(v.AutoBranchCreationPatterns, ok); err != nil {
98			return err
99		}
100	}
101
102	if v.BasicAuthCredentials != nil {
103		ok := object.Key("basicAuthCredentials")
104		ok.String(*v.BasicAuthCredentials)
105	}
106
107	if v.BuildSpec != nil {
108		ok := object.Key("buildSpec")
109		ok.String(*v.BuildSpec)
110	}
111
112	if v.CustomHeaders != nil {
113		ok := object.Key("customHeaders")
114		ok.String(*v.CustomHeaders)
115	}
116
117	if v.CustomRules != nil {
118		ok := object.Key("customRules")
119		if err := awsRestjson1_serializeDocumentCustomRules(v.CustomRules, ok); err != nil {
120			return err
121		}
122	}
123
124	if v.Description != nil {
125		ok := object.Key("description")
126		ok.String(*v.Description)
127	}
128
129	if v.EnableAutoBranchCreation != nil {
130		ok := object.Key("enableAutoBranchCreation")
131		ok.Boolean(*v.EnableAutoBranchCreation)
132	}
133
134	if v.EnableBasicAuth != nil {
135		ok := object.Key("enableBasicAuth")
136		ok.Boolean(*v.EnableBasicAuth)
137	}
138
139	if v.EnableBranchAutoBuild != nil {
140		ok := object.Key("enableBranchAutoBuild")
141		ok.Boolean(*v.EnableBranchAutoBuild)
142	}
143
144	if v.EnableBranchAutoDeletion != nil {
145		ok := object.Key("enableBranchAutoDeletion")
146		ok.Boolean(*v.EnableBranchAutoDeletion)
147	}
148
149	if v.EnvironmentVariables != nil {
150		ok := object.Key("environmentVariables")
151		if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil {
152			return err
153		}
154	}
155
156	if v.IamServiceRoleArn != nil {
157		ok := object.Key("iamServiceRoleArn")
158		ok.String(*v.IamServiceRoleArn)
159	}
160
161	if v.Name != nil {
162		ok := object.Key("name")
163		ok.String(*v.Name)
164	}
165
166	if v.OauthToken != nil {
167		ok := object.Key("oauthToken")
168		ok.String(*v.OauthToken)
169	}
170
171	if len(v.Platform) > 0 {
172		ok := object.Key("platform")
173		ok.String(string(v.Platform))
174	}
175
176	if v.Repository != nil {
177		ok := object.Key("repository")
178		ok.String(*v.Repository)
179	}
180
181	if v.Tags != nil {
182		ok := object.Key("tags")
183		if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
184			return err
185		}
186	}
187
188	return nil
189}
190
191type awsRestjson1_serializeOpCreateBackendEnvironment struct {
192}
193
194func (*awsRestjson1_serializeOpCreateBackendEnvironment) ID() string {
195	return "OperationSerializer"
196}
197
198func (m *awsRestjson1_serializeOpCreateBackendEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
199	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
200) {
201	request, ok := in.Request.(*smithyhttp.Request)
202	if !ok {
203		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
204	}
205
206	input, ok := in.Parameters.(*CreateBackendEnvironmentInput)
207	_ = input
208	if !ok {
209		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
210	}
211
212	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/backendenvironments")
213	request.URL.Path = opPath
214	if len(request.URL.RawQuery) > 0 {
215		request.URL.RawQuery = "&" + opQuery
216	} else {
217		request.URL.RawQuery = opQuery
218	}
219
220	request.Method = "POST"
221	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
222	if err != nil {
223		return out, metadata, &smithy.SerializationError{Err: err}
224	}
225
226	if err := awsRestjson1_serializeOpHttpBindingsCreateBackendEnvironmentInput(input, restEncoder); err != nil {
227		return out, metadata, &smithy.SerializationError{Err: err}
228	}
229
230	restEncoder.SetHeader("Content-Type").String("application/json")
231
232	jsonEncoder := smithyjson.NewEncoder()
233	if err := awsRestjson1_serializeOpDocumentCreateBackendEnvironmentInput(input, jsonEncoder.Value); err != nil {
234		return out, metadata, &smithy.SerializationError{Err: err}
235	}
236
237	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
238		return out, metadata, &smithy.SerializationError{Err: err}
239	}
240
241	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
242		return out, metadata, &smithy.SerializationError{Err: err}
243	}
244	in.Request = request
245
246	return next.HandleSerialize(ctx, in)
247}
248func awsRestjson1_serializeOpHttpBindingsCreateBackendEnvironmentInput(v *CreateBackendEnvironmentInput, encoder *httpbinding.Encoder) error {
249	if v == nil {
250		return fmt.Errorf("unsupported serialization of nil %T", v)
251	}
252
253	if v.AppId == nil || len(*v.AppId) == 0 {
254		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
255	}
256	if v.AppId != nil {
257		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
258			return err
259		}
260	}
261
262	return nil
263}
264
265func awsRestjson1_serializeOpDocumentCreateBackendEnvironmentInput(v *CreateBackendEnvironmentInput, value smithyjson.Value) error {
266	object := value.Object()
267	defer object.Close()
268
269	if v.DeploymentArtifacts != nil {
270		ok := object.Key("deploymentArtifacts")
271		ok.String(*v.DeploymentArtifacts)
272	}
273
274	if v.EnvironmentName != nil {
275		ok := object.Key("environmentName")
276		ok.String(*v.EnvironmentName)
277	}
278
279	if v.StackName != nil {
280		ok := object.Key("stackName")
281		ok.String(*v.StackName)
282	}
283
284	return nil
285}
286
287type awsRestjson1_serializeOpCreateBranch struct {
288}
289
290func (*awsRestjson1_serializeOpCreateBranch) ID() string {
291	return "OperationSerializer"
292}
293
294func (m *awsRestjson1_serializeOpCreateBranch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
295	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
296) {
297	request, ok := in.Request.(*smithyhttp.Request)
298	if !ok {
299		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
300	}
301
302	input, ok := in.Parameters.(*CreateBranchInput)
303	_ = input
304	if !ok {
305		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
306	}
307
308	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches")
309	request.URL.Path = opPath
310	if len(request.URL.RawQuery) > 0 {
311		request.URL.RawQuery = "&" + opQuery
312	} else {
313		request.URL.RawQuery = opQuery
314	}
315
316	request.Method = "POST"
317	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
318	if err != nil {
319		return out, metadata, &smithy.SerializationError{Err: err}
320	}
321
322	if err := awsRestjson1_serializeOpHttpBindingsCreateBranchInput(input, restEncoder); err != nil {
323		return out, metadata, &smithy.SerializationError{Err: err}
324	}
325
326	restEncoder.SetHeader("Content-Type").String("application/json")
327
328	jsonEncoder := smithyjson.NewEncoder()
329	if err := awsRestjson1_serializeOpDocumentCreateBranchInput(input, jsonEncoder.Value); err != nil {
330		return out, metadata, &smithy.SerializationError{Err: err}
331	}
332
333	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
334		return out, metadata, &smithy.SerializationError{Err: err}
335	}
336
337	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
338		return out, metadata, &smithy.SerializationError{Err: err}
339	}
340	in.Request = request
341
342	return next.HandleSerialize(ctx, in)
343}
344func awsRestjson1_serializeOpHttpBindingsCreateBranchInput(v *CreateBranchInput, encoder *httpbinding.Encoder) error {
345	if v == nil {
346		return fmt.Errorf("unsupported serialization of nil %T", v)
347	}
348
349	if v.AppId == nil || len(*v.AppId) == 0 {
350		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
351	}
352	if v.AppId != nil {
353		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
354			return err
355		}
356	}
357
358	return nil
359}
360
361func awsRestjson1_serializeOpDocumentCreateBranchInput(v *CreateBranchInput, value smithyjson.Value) error {
362	object := value.Object()
363	defer object.Close()
364
365	if v.BackendEnvironmentArn != nil {
366		ok := object.Key("backendEnvironmentArn")
367		ok.String(*v.BackendEnvironmentArn)
368	}
369
370	if v.BasicAuthCredentials != nil {
371		ok := object.Key("basicAuthCredentials")
372		ok.String(*v.BasicAuthCredentials)
373	}
374
375	if v.BranchName != nil {
376		ok := object.Key("branchName")
377		ok.String(*v.BranchName)
378	}
379
380	if v.BuildSpec != nil {
381		ok := object.Key("buildSpec")
382		ok.String(*v.BuildSpec)
383	}
384
385	if v.Description != nil {
386		ok := object.Key("description")
387		ok.String(*v.Description)
388	}
389
390	if v.DisplayName != nil {
391		ok := object.Key("displayName")
392		ok.String(*v.DisplayName)
393	}
394
395	if v.EnableAutoBuild != nil {
396		ok := object.Key("enableAutoBuild")
397		ok.Boolean(*v.EnableAutoBuild)
398	}
399
400	if v.EnableBasicAuth != nil {
401		ok := object.Key("enableBasicAuth")
402		ok.Boolean(*v.EnableBasicAuth)
403	}
404
405	if v.EnableNotification != nil {
406		ok := object.Key("enableNotification")
407		ok.Boolean(*v.EnableNotification)
408	}
409
410	if v.EnablePerformanceMode != nil {
411		ok := object.Key("enablePerformanceMode")
412		ok.Boolean(*v.EnablePerformanceMode)
413	}
414
415	if v.EnablePullRequestPreview != nil {
416		ok := object.Key("enablePullRequestPreview")
417		ok.Boolean(*v.EnablePullRequestPreview)
418	}
419
420	if v.EnvironmentVariables != nil {
421		ok := object.Key("environmentVariables")
422		if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil {
423			return err
424		}
425	}
426
427	if v.Framework != nil {
428		ok := object.Key("framework")
429		ok.String(*v.Framework)
430	}
431
432	if v.PullRequestEnvironmentName != nil {
433		ok := object.Key("pullRequestEnvironmentName")
434		ok.String(*v.PullRequestEnvironmentName)
435	}
436
437	if len(v.Stage) > 0 {
438		ok := object.Key("stage")
439		ok.String(string(v.Stage))
440	}
441
442	if v.Tags != nil {
443		ok := object.Key("tags")
444		if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
445			return err
446		}
447	}
448
449	if v.Ttl != nil {
450		ok := object.Key("ttl")
451		ok.String(*v.Ttl)
452	}
453
454	return nil
455}
456
457type awsRestjson1_serializeOpCreateDeployment struct {
458}
459
460func (*awsRestjson1_serializeOpCreateDeployment) ID() string {
461	return "OperationSerializer"
462}
463
464func (m *awsRestjson1_serializeOpCreateDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
465	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
466) {
467	request, ok := in.Request.(*smithyhttp.Request)
468	if !ok {
469		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
470	}
471
472	input, ok := in.Parameters.(*CreateDeploymentInput)
473	_ = input
474	if !ok {
475		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
476	}
477
478	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/deployments")
479	request.URL.Path = opPath
480	if len(request.URL.RawQuery) > 0 {
481		request.URL.RawQuery = "&" + opQuery
482	} else {
483		request.URL.RawQuery = opQuery
484	}
485
486	request.Method = "POST"
487	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
488	if err != nil {
489		return out, metadata, &smithy.SerializationError{Err: err}
490	}
491
492	if err := awsRestjson1_serializeOpHttpBindingsCreateDeploymentInput(input, restEncoder); err != nil {
493		return out, metadata, &smithy.SerializationError{Err: err}
494	}
495
496	restEncoder.SetHeader("Content-Type").String("application/json")
497
498	jsonEncoder := smithyjson.NewEncoder()
499	if err := awsRestjson1_serializeOpDocumentCreateDeploymentInput(input, jsonEncoder.Value); err != nil {
500		return out, metadata, &smithy.SerializationError{Err: err}
501	}
502
503	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
504		return out, metadata, &smithy.SerializationError{Err: err}
505	}
506
507	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
508		return out, metadata, &smithy.SerializationError{Err: err}
509	}
510	in.Request = request
511
512	return next.HandleSerialize(ctx, in)
513}
514func awsRestjson1_serializeOpHttpBindingsCreateDeploymentInput(v *CreateDeploymentInput, encoder *httpbinding.Encoder) error {
515	if v == nil {
516		return fmt.Errorf("unsupported serialization of nil %T", v)
517	}
518
519	if v.AppId == nil || len(*v.AppId) == 0 {
520		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
521	}
522	if v.AppId != nil {
523		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
524			return err
525		}
526	}
527
528	if v.BranchName == nil || len(*v.BranchName) == 0 {
529		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
530	}
531	if v.BranchName != nil {
532		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
533			return err
534		}
535	}
536
537	return nil
538}
539
540func awsRestjson1_serializeOpDocumentCreateDeploymentInput(v *CreateDeploymentInput, value smithyjson.Value) error {
541	object := value.Object()
542	defer object.Close()
543
544	if v.FileMap != nil {
545		ok := object.Key("fileMap")
546		if err := awsRestjson1_serializeDocumentFileMap(v.FileMap, ok); err != nil {
547			return err
548		}
549	}
550
551	return nil
552}
553
554type awsRestjson1_serializeOpCreateDomainAssociation struct {
555}
556
557func (*awsRestjson1_serializeOpCreateDomainAssociation) ID() string {
558	return "OperationSerializer"
559}
560
561func (m *awsRestjson1_serializeOpCreateDomainAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
562	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
563) {
564	request, ok := in.Request.(*smithyhttp.Request)
565	if !ok {
566		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
567	}
568
569	input, ok := in.Parameters.(*CreateDomainAssociationInput)
570	_ = input
571	if !ok {
572		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
573	}
574
575	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/domains")
576	request.URL.Path = opPath
577	if len(request.URL.RawQuery) > 0 {
578		request.URL.RawQuery = "&" + opQuery
579	} else {
580		request.URL.RawQuery = opQuery
581	}
582
583	request.Method = "POST"
584	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
585	if err != nil {
586		return out, metadata, &smithy.SerializationError{Err: err}
587	}
588
589	if err := awsRestjson1_serializeOpHttpBindingsCreateDomainAssociationInput(input, restEncoder); err != nil {
590		return out, metadata, &smithy.SerializationError{Err: err}
591	}
592
593	restEncoder.SetHeader("Content-Type").String("application/json")
594
595	jsonEncoder := smithyjson.NewEncoder()
596	if err := awsRestjson1_serializeOpDocumentCreateDomainAssociationInput(input, jsonEncoder.Value); err != nil {
597		return out, metadata, &smithy.SerializationError{Err: err}
598	}
599
600	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
601		return out, metadata, &smithy.SerializationError{Err: err}
602	}
603
604	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
605		return out, metadata, &smithy.SerializationError{Err: err}
606	}
607	in.Request = request
608
609	return next.HandleSerialize(ctx, in)
610}
611func awsRestjson1_serializeOpHttpBindingsCreateDomainAssociationInput(v *CreateDomainAssociationInput, encoder *httpbinding.Encoder) error {
612	if v == nil {
613		return fmt.Errorf("unsupported serialization of nil %T", v)
614	}
615
616	if v.AppId == nil || len(*v.AppId) == 0 {
617		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
618	}
619	if v.AppId != nil {
620		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
621			return err
622		}
623	}
624
625	return nil
626}
627
628func awsRestjson1_serializeOpDocumentCreateDomainAssociationInput(v *CreateDomainAssociationInput, value smithyjson.Value) error {
629	object := value.Object()
630	defer object.Close()
631
632	if v.AutoSubDomainCreationPatterns != nil {
633		ok := object.Key("autoSubDomainCreationPatterns")
634		if err := awsRestjson1_serializeDocumentAutoSubDomainCreationPatterns(v.AutoSubDomainCreationPatterns, ok); err != nil {
635			return err
636		}
637	}
638
639	if v.AutoSubDomainIAMRole != nil {
640		ok := object.Key("autoSubDomainIAMRole")
641		ok.String(*v.AutoSubDomainIAMRole)
642	}
643
644	if v.DomainName != nil {
645		ok := object.Key("domainName")
646		ok.String(*v.DomainName)
647	}
648
649	if v.EnableAutoSubDomain != nil {
650		ok := object.Key("enableAutoSubDomain")
651		ok.Boolean(*v.EnableAutoSubDomain)
652	}
653
654	if v.SubDomainSettings != nil {
655		ok := object.Key("subDomainSettings")
656		if err := awsRestjson1_serializeDocumentSubDomainSettings(v.SubDomainSettings, ok); err != nil {
657			return err
658		}
659	}
660
661	return nil
662}
663
664type awsRestjson1_serializeOpCreateWebhook struct {
665}
666
667func (*awsRestjson1_serializeOpCreateWebhook) ID() string {
668	return "OperationSerializer"
669}
670
671func (m *awsRestjson1_serializeOpCreateWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
672	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
673) {
674	request, ok := in.Request.(*smithyhttp.Request)
675	if !ok {
676		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
677	}
678
679	input, ok := in.Parameters.(*CreateWebhookInput)
680	_ = input
681	if !ok {
682		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
683	}
684
685	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/webhooks")
686	request.URL.Path = opPath
687	if len(request.URL.RawQuery) > 0 {
688		request.URL.RawQuery = "&" + opQuery
689	} else {
690		request.URL.RawQuery = opQuery
691	}
692
693	request.Method = "POST"
694	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
695	if err != nil {
696		return out, metadata, &smithy.SerializationError{Err: err}
697	}
698
699	if err := awsRestjson1_serializeOpHttpBindingsCreateWebhookInput(input, restEncoder); err != nil {
700		return out, metadata, &smithy.SerializationError{Err: err}
701	}
702
703	restEncoder.SetHeader("Content-Type").String("application/json")
704
705	jsonEncoder := smithyjson.NewEncoder()
706	if err := awsRestjson1_serializeOpDocumentCreateWebhookInput(input, jsonEncoder.Value); err != nil {
707		return out, metadata, &smithy.SerializationError{Err: err}
708	}
709
710	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
711		return out, metadata, &smithy.SerializationError{Err: err}
712	}
713
714	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
715		return out, metadata, &smithy.SerializationError{Err: err}
716	}
717	in.Request = request
718
719	return next.HandleSerialize(ctx, in)
720}
721func awsRestjson1_serializeOpHttpBindingsCreateWebhookInput(v *CreateWebhookInput, encoder *httpbinding.Encoder) error {
722	if v == nil {
723		return fmt.Errorf("unsupported serialization of nil %T", v)
724	}
725
726	if v.AppId == nil || len(*v.AppId) == 0 {
727		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
728	}
729	if v.AppId != nil {
730		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
731			return err
732		}
733	}
734
735	return nil
736}
737
738func awsRestjson1_serializeOpDocumentCreateWebhookInput(v *CreateWebhookInput, value smithyjson.Value) error {
739	object := value.Object()
740	defer object.Close()
741
742	if v.BranchName != nil {
743		ok := object.Key("branchName")
744		ok.String(*v.BranchName)
745	}
746
747	if v.Description != nil {
748		ok := object.Key("description")
749		ok.String(*v.Description)
750	}
751
752	return nil
753}
754
755type awsRestjson1_serializeOpDeleteApp struct {
756}
757
758func (*awsRestjson1_serializeOpDeleteApp) ID() string {
759	return "OperationSerializer"
760}
761
762func (m *awsRestjson1_serializeOpDeleteApp) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
763	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
764) {
765	request, ok := in.Request.(*smithyhttp.Request)
766	if !ok {
767		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
768	}
769
770	input, ok := in.Parameters.(*DeleteAppInput)
771	_ = input
772	if !ok {
773		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
774	}
775
776	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}")
777	request.URL.Path = opPath
778	if len(request.URL.RawQuery) > 0 {
779		request.URL.RawQuery = "&" + opQuery
780	} else {
781		request.URL.RawQuery = opQuery
782	}
783
784	request.Method = "DELETE"
785	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
786	if err != nil {
787		return out, metadata, &smithy.SerializationError{Err: err}
788	}
789
790	if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInput(input, restEncoder); err != nil {
791		return out, metadata, &smithy.SerializationError{Err: err}
792	}
793
794	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
795		return out, metadata, &smithy.SerializationError{Err: err}
796	}
797	in.Request = request
798
799	return next.HandleSerialize(ctx, in)
800}
801func awsRestjson1_serializeOpHttpBindingsDeleteAppInput(v *DeleteAppInput, encoder *httpbinding.Encoder) error {
802	if v == nil {
803		return fmt.Errorf("unsupported serialization of nil %T", v)
804	}
805
806	if v.AppId == nil || len(*v.AppId) == 0 {
807		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
808	}
809	if v.AppId != nil {
810		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
811			return err
812		}
813	}
814
815	return nil
816}
817
818type awsRestjson1_serializeOpDeleteBackendEnvironment struct {
819}
820
821func (*awsRestjson1_serializeOpDeleteBackendEnvironment) ID() string {
822	return "OperationSerializer"
823}
824
825func (m *awsRestjson1_serializeOpDeleteBackendEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
826	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
827) {
828	request, ok := in.Request.(*smithyhttp.Request)
829	if !ok {
830		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
831	}
832
833	input, ok := in.Parameters.(*DeleteBackendEnvironmentInput)
834	_ = input
835	if !ok {
836		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
837	}
838
839	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/backendenvironments/{environmentName}")
840	request.URL.Path = opPath
841	if len(request.URL.RawQuery) > 0 {
842		request.URL.RawQuery = "&" + opQuery
843	} else {
844		request.URL.RawQuery = opQuery
845	}
846
847	request.Method = "DELETE"
848	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
849	if err != nil {
850		return out, metadata, &smithy.SerializationError{Err: err}
851	}
852
853	if err := awsRestjson1_serializeOpHttpBindingsDeleteBackendEnvironmentInput(input, restEncoder); err != nil {
854		return out, metadata, &smithy.SerializationError{Err: err}
855	}
856
857	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
858		return out, metadata, &smithy.SerializationError{Err: err}
859	}
860	in.Request = request
861
862	return next.HandleSerialize(ctx, in)
863}
864func awsRestjson1_serializeOpHttpBindingsDeleteBackendEnvironmentInput(v *DeleteBackendEnvironmentInput, encoder *httpbinding.Encoder) error {
865	if v == nil {
866		return fmt.Errorf("unsupported serialization of nil %T", v)
867	}
868
869	if v.AppId == nil || len(*v.AppId) == 0 {
870		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
871	}
872	if v.AppId != nil {
873		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
874			return err
875		}
876	}
877
878	if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 {
879		return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")}
880	}
881	if v.EnvironmentName != nil {
882		if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil {
883			return err
884		}
885	}
886
887	return nil
888}
889
890type awsRestjson1_serializeOpDeleteBranch struct {
891}
892
893func (*awsRestjson1_serializeOpDeleteBranch) ID() string {
894	return "OperationSerializer"
895}
896
897func (m *awsRestjson1_serializeOpDeleteBranch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
898	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
899) {
900	request, ok := in.Request.(*smithyhttp.Request)
901	if !ok {
902		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
903	}
904
905	input, ok := in.Parameters.(*DeleteBranchInput)
906	_ = input
907	if !ok {
908		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
909	}
910
911	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}")
912	request.URL.Path = opPath
913	if len(request.URL.RawQuery) > 0 {
914		request.URL.RawQuery = "&" + opQuery
915	} else {
916		request.URL.RawQuery = opQuery
917	}
918
919	request.Method = "DELETE"
920	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
921	if err != nil {
922		return out, metadata, &smithy.SerializationError{Err: err}
923	}
924
925	if err := awsRestjson1_serializeOpHttpBindingsDeleteBranchInput(input, restEncoder); err != nil {
926		return out, metadata, &smithy.SerializationError{Err: err}
927	}
928
929	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
930		return out, metadata, &smithy.SerializationError{Err: err}
931	}
932	in.Request = request
933
934	return next.HandleSerialize(ctx, in)
935}
936func awsRestjson1_serializeOpHttpBindingsDeleteBranchInput(v *DeleteBranchInput, encoder *httpbinding.Encoder) error {
937	if v == nil {
938		return fmt.Errorf("unsupported serialization of nil %T", v)
939	}
940
941	if v.AppId == nil || len(*v.AppId) == 0 {
942		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
943	}
944	if v.AppId != nil {
945		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
946			return err
947		}
948	}
949
950	if v.BranchName == nil || len(*v.BranchName) == 0 {
951		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
952	}
953	if v.BranchName != nil {
954		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
955			return err
956		}
957	}
958
959	return nil
960}
961
962type awsRestjson1_serializeOpDeleteDomainAssociation struct {
963}
964
965func (*awsRestjson1_serializeOpDeleteDomainAssociation) ID() string {
966	return "OperationSerializer"
967}
968
969func (m *awsRestjson1_serializeOpDeleteDomainAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
970	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
971) {
972	request, ok := in.Request.(*smithyhttp.Request)
973	if !ok {
974		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
975	}
976
977	input, ok := in.Parameters.(*DeleteDomainAssociationInput)
978	_ = input
979	if !ok {
980		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
981	}
982
983	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/domains/{domainName}")
984	request.URL.Path = opPath
985	if len(request.URL.RawQuery) > 0 {
986		request.URL.RawQuery = "&" + opQuery
987	} else {
988		request.URL.RawQuery = opQuery
989	}
990
991	request.Method = "DELETE"
992	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
993	if err != nil {
994		return out, metadata, &smithy.SerializationError{Err: err}
995	}
996
997	if err := awsRestjson1_serializeOpHttpBindingsDeleteDomainAssociationInput(input, restEncoder); err != nil {
998		return out, metadata, &smithy.SerializationError{Err: err}
999	}
1000
1001	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1002		return out, metadata, &smithy.SerializationError{Err: err}
1003	}
1004	in.Request = request
1005
1006	return next.HandleSerialize(ctx, in)
1007}
1008func awsRestjson1_serializeOpHttpBindingsDeleteDomainAssociationInput(v *DeleteDomainAssociationInput, encoder *httpbinding.Encoder) error {
1009	if v == nil {
1010		return fmt.Errorf("unsupported serialization of nil %T", v)
1011	}
1012
1013	if v.AppId == nil || len(*v.AppId) == 0 {
1014		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1015	}
1016	if v.AppId != nil {
1017		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1018			return err
1019		}
1020	}
1021
1022	if v.DomainName == nil || len(*v.DomainName) == 0 {
1023		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
1024	}
1025	if v.DomainName != nil {
1026		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
1027			return err
1028		}
1029	}
1030
1031	return nil
1032}
1033
1034type awsRestjson1_serializeOpDeleteJob struct {
1035}
1036
1037func (*awsRestjson1_serializeOpDeleteJob) ID() string {
1038	return "OperationSerializer"
1039}
1040
1041func (m *awsRestjson1_serializeOpDeleteJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1042	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1043) {
1044	request, ok := in.Request.(*smithyhttp.Request)
1045	if !ok {
1046		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1047	}
1048
1049	input, ok := in.Parameters.(*DeleteJobInput)
1050	_ = input
1051	if !ok {
1052		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1053	}
1054
1055	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs/{jobId}")
1056	request.URL.Path = opPath
1057	if len(request.URL.RawQuery) > 0 {
1058		request.URL.RawQuery = "&" + opQuery
1059	} else {
1060		request.URL.RawQuery = opQuery
1061	}
1062
1063	request.Method = "DELETE"
1064	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1065	if err != nil {
1066		return out, metadata, &smithy.SerializationError{Err: err}
1067	}
1068
1069	if err := awsRestjson1_serializeOpHttpBindingsDeleteJobInput(input, restEncoder); err != nil {
1070		return out, metadata, &smithy.SerializationError{Err: err}
1071	}
1072
1073	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1074		return out, metadata, &smithy.SerializationError{Err: err}
1075	}
1076	in.Request = request
1077
1078	return next.HandleSerialize(ctx, in)
1079}
1080func awsRestjson1_serializeOpHttpBindingsDeleteJobInput(v *DeleteJobInput, encoder *httpbinding.Encoder) error {
1081	if v == nil {
1082		return fmt.Errorf("unsupported serialization of nil %T", v)
1083	}
1084
1085	if v.AppId == nil || len(*v.AppId) == 0 {
1086		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1087	}
1088	if v.AppId != nil {
1089		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1090			return err
1091		}
1092	}
1093
1094	if v.BranchName == nil || len(*v.BranchName) == 0 {
1095		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
1096	}
1097	if v.BranchName != nil {
1098		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
1099			return err
1100		}
1101	}
1102
1103	if v.JobId == nil || len(*v.JobId) == 0 {
1104		return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")}
1105	}
1106	if v.JobId != nil {
1107		if err := encoder.SetURI("jobId").String(*v.JobId); err != nil {
1108			return err
1109		}
1110	}
1111
1112	return nil
1113}
1114
1115type awsRestjson1_serializeOpDeleteWebhook struct {
1116}
1117
1118func (*awsRestjson1_serializeOpDeleteWebhook) ID() string {
1119	return "OperationSerializer"
1120}
1121
1122func (m *awsRestjson1_serializeOpDeleteWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1123	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1124) {
1125	request, ok := in.Request.(*smithyhttp.Request)
1126	if !ok {
1127		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1128	}
1129
1130	input, ok := in.Parameters.(*DeleteWebhookInput)
1131	_ = input
1132	if !ok {
1133		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1134	}
1135
1136	opPath, opQuery := httpbinding.SplitURI("/webhooks/{webhookId}")
1137	request.URL.Path = opPath
1138	if len(request.URL.RawQuery) > 0 {
1139		request.URL.RawQuery = "&" + opQuery
1140	} else {
1141		request.URL.RawQuery = opQuery
1142	}
1143
1144	request.Method = "DELETE"
1145	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1146	if err != nil {
1147		return out, metadata, &smithy.SerializationError{Err: err}
1148	}
1149
1150	if err := awsRestjson1_serializeOpHttpBindingsDeleteWebhookInput(input, restEncoder); err != nil {
1151		return out, metadata, &smithy.SerializationError{Err: err}
1152	}
1153
1154	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1155		return out, metadata, &smithy.SerializationError{Err: err}
1156	}
1157	in.Request = request
1158
1159	return next.HandleSerialize(ctx, in)
1160}
1161func awsRestjson1_serializeOpHttpBindingsDeleteWebhookInput(v *DeleteWebhookInput, encoder *httpbinding.Encoder) error {
1162	if v == nil {
1163		return fmt.Errorf("unsupported serialization of nil %T", v)
1164	}
1165
1166	if v.WebhookId == nil || len(*v.WebhookId) == 0 {
1167		return &smithy.SerializationError{Err: fmt.Errorf("input member webhookId must not be empty")}
1168	}
1169	if v.WebhookId != nil {
1170		if err := encoder.SetURI("webhookId").String(*v.WebhookId); err != nil {
1171			return err
1172		}
1173	}
1174
1175	return nil
1176}
1177
1178type awsRestjson1_serializeOpGenerateAccessLogs struct {
1179}
1180
1181func (*awsRestjson1_serializeOpGenerateAccessLogs) ID() string {
1182	return "OperationSerializer"
1183}
1184
1185func (m *awsRestjson1_serializeOpGenerateAccessLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1186	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1187) {
1188	request, ok := in.Request.(*smithyhttp.Request)
1189	if !ok {
1190		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1191	}
1192
1193	input, ok := in.Parameters.(*GenerateAccessLogsInput)
1194	_ = input
1195	if !ok {
1196		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1197	}
1198
1199	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/accesslogs")
1200	request.URL.Path = opPath
1201	if len(request.URL.RawQuery) > 0 {
1202		request.URL.RawQuery = "&" + opQuery
1203	} else {
1204		request.URL.RawQuery = opQuery
1205	}
1206
1207	request.Method = "POST"
1208	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1209	if err != nil {
1210		return out, metadata, &smithy.SerializationError{Err: err}
1211	}
1212
1213	if err := awsRestjson1_serializeOpHttpBindingsGenerateAccessLogsInput(input, restEncoder); err != nil {
1214		return out, metadata, &smithy.SerializationError{Err: err}
1215	}
1216
1217	restEncoder.SetHeader("Content-Type").String("application/json")
1218
1219	jsonEncoder := smithyjson.NewEncoder()
1220	if err := awsRestjson1_serializeOpDocumentGenerateAccessLogsInput(input, jsonEncoder.Value); err != nil {
1221		return out, metadata, &smithy.SerializationError{Err: err}
1222	}
1223
1224	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1225		return out, metadata, &smithy.SerializationError{Err: err}
1226	}
1227
1228	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1229		return out, metadata, &smithy.SerializationError{Err: err}
1230	}
1231	in.Request = request
1232
1233	return next.HandleSerialize(ctx, in)
1234}
1235func awsRestjson1_serializeOpHttpBindingsGenerateAccessLogsInput(v *GenerateAccessLogsInput, encoder *httpbinding.Encoder) error {
1236	if v == nil {
1237		return fmt.Errorf("unsupported serialization of nil %T", v)
1238	}
1239
1240	if v.AppId == nil || len(*v.AppId) == 0 {
1241		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1242	}
1243	if v.AppId != nil {
1244		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1245			return err
1246		}
1247	}
1248
1249	return nil
1250}
1251
1252func awsRestjson1_serializeOpDocumentGenerateAccessLogsInput(v *GenerateAccessLogsInput, value smithyjson.Value) error {
1253	object := value.Object()
1254	defer object.Close()
1255
1256	if v.DomainName != nil {
1257		ok := object.Key("domainName")
1258		ok.String(*v.DomainName)
1259	}
1260
1261	if v.EndTime != nil {
1262		ok := object.Key("endTime")
1263		ok.Double(smithytime.FormatEpochSeconds(*v.EndTime))
1264	}
1265
1266	if v.StartTime != nil {
1267		ok := object.Key("startTime")
1268		ok.Double(smithytime.FormatEpochSeconds(*v.StartTime))
1269	}
1270
1271	return nil
1272}
1273
1274type awsRestjson1_serializeOpGetApp struct {
1275}
1276
1277func (*awsRestjson1_serializeOpGetApp) ID() string {
1278	return "OperationSerializer"
1279}
1280
1281func (m *awsRestjson1_serializeOpGetApp) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1282	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1283) {
1284	request, ok := in.Request.(*smithyhttp.Request)
1285	if !ok {
1286		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1287	}
1288
1289	input, ok := in.Parameters.(*GetAppInput)
1290	_ = input
1291	if !ok {
1292		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1293	}
1294
1295	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}")
1296	request.URL.Path = opPath
1297	if len(request.URL.RawQuery) > 0 {
1298		request.URL.RawQuery = "&" + opQuery
1299	} else {
1300		request.URL.RawQuery = opQuery
1301	}
1302
1303	request.Method = "GET"
1304	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1305	if err != nil {
1306		return out, metadata, &smithy.SerializationError{Err: err}
1307	}
1308
1309	if err := awsRestjson1_serializeOpHttpBindingsGetAppInput(input, restEncoder); err != nil {
1310		return out, metadata, &smithy.SerializationError{Err: err}
1311	}
1312
1313	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1314		return out, metadata, &smithy.SerializationError{Err: err}
1315	}
1316	in.Request = request
1317
1318	return next.HandleSerialize(ctx, in)
1319}
1320func awsRestjson1_serializeOpHttpBindingsGetAppInput(v *GetAppInput, encoder *httpbinding.Encoder) error {
1321	if v == nil {
1322		return fmt.Errorf("unsupported serialization of nil %T", v)
1323	}
1324
1325	if v.AppId == nil || len(*v.AppId) == 0 {
1326		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1327	}
1328	if v.AppId != nil {
1329		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1330			return err
1331		}
1332	}
1333
1334	return nil
1335}
1336
1337type awsRestjson1_serializeOpGetArtifactUrl struct {
1338}
1339
1340func (*awsRestjson1_serializeOpGetArtifactUrl) ID() string {
1341	return "OperationSerializer"
1342}
1343
1344func (m *awsRestjson1_serializeOpGetArtifactUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1345	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1346) {
1347	request, ok := in.Request.(*smithyhttp.Request)
1348	if !ok {
1349		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1350	}
1351
1352	input, ok := in.Parameters.(*GetArtifactUrlInput)
1353	_ = input
1354	if !ok {
1355		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1356	}
1357
1358	opPath, opQuery := httpbinding.SplitURI("/artifacts/{artifactId}")
1359	request.URL.Path = opPath
1360	if len(request.URL.RawQuery) > 0 {
1361		request.URL.RawQuery = "&" + opQuery
1362	} else {
1363		request.URL.RawQuery = opQuery
1364	}
1365
1366	request.Method = "GET"
1367	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1368	if err != nil {
1369		return out, metadata, &smithy.SerializationError{Err: err}
1370	}
1371
1372	if err := awsRestjson1_serializeOpHttpBindingsGetArtifactUrlInput(input, restEncoder); err != nil {
1373		return out, metadata, &smithy.SerializationError{Err: err}
1374	}
1375
1376	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1377		return out, metadata, &smithy.SerializationError{Err: err}
1378	}
1379	in.Request = request
1380
1381	return next.HandleSerialize(ctx, in)
1382}
1383func awsRestjson1_serializeOpHttpBindingsGetArtifactUrlInput(v *GetArtifactUrlInput, encoder *httpbinding.Encoder) error {
1384	if v == nil {
1385		return fmt.Errorf("unsupported serialization of nil %T", v)
1386	}
1387
1388	if v.ArtifactId == nil || len(*v.ArtifactId) == 0 {
1389		return &smithy.SerializationError{Err: fmt.Errorf("input member artifactId must not be empty")}
1390	}
1391	if v.ArtifactId != nil {
1392		if err := encoder.SetURI("artifactId").String(*v.ArtifactId); err != nil {
1393			return err
1394		}
1395	}
1396
1397	return nil
1398}
1399
1400type awsRestjson1_serializeOpGetBackendEnvironment struct {
1401}
1402
1403func (*awsRestjson1_serializeOpGetBackendEnvironment) ID() string {
1404	return "OperationSerializer"
1405}
1406
1407func (m *awsRestjson1_serializeOpGetBackendEnvironment) 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.(*GetBackendEnvironmentInput)
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("/apps/{appId}/backendenvironments/{environmentName}")
1422	request.URL.Path = opPath
1423	if len(request.URL.RawQuery) > 0 {
1424		request.URL.RawQuery = "&" + opQuery
1425	} else {
1426		request.URL.RawQuery = opQuery
1427	}
1428
1429	request.Method = "GET"
1430	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1431	if err != nil {
1432		return out, metadata, &smithy.SerializationError{Err: err}
1433	}
1434
1435	if err := awsRestjson1_serializeOpHttpBindingsGetBackendEnvironmentInput(input, restEncoder); err != nil {
1436		return out, metadata, &smithy.SerializationError{Err: err}
1437	}
1438
1439	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1440		return out, metadata, &smithy.SerializationError{Err: err}
1441	}
1442	in.Request = request
1443
1444	return next.HandleSerialize(ctx, in)
1445}
1446func awsRestjson1_serializeOpHttpBindingsGetBackendEnvironmentInput(v *GetBackendEnvironmentInput, encoder *httpbinding.Encoder) error {
1447	if v == nil {
1448		return fmt.Errorf("unsupported serialization of nil %T", v)
1449	}
1450
1451	if v.AppId == nil || len(*v.AppId) == 0 {
1452		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1453	}
1454	if v.AppId != nil {
1455		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1456			return err
1457		}
1458	}
1459
1460	if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 {
1461		return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")}
1462	}
1463	if v.EnvironmentName != nil {
1464		if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil {
1465			return err
1466		}
1467	}
1468
1469	return nil
1470}
1471
1472type awsRestjson1_serializeOpGetBranch struct {
1473}
1474
1475func (*awsRestjson1_serializeOpGetBranch) ID() string {
1476	return "OperationSerializer"
1477}
1478
1479func (m *awsRestjson1_serializeOpGetBranch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1480	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1481) {
1482	request, ok := in.Request.(*smithyhttp.Request)
1483	if !ok {
1484		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1485	}
1486
1487	input, ok := in.Parameters.(*GetBranchInput)
1488	_ = input
1489	if !ok {
1490		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1491	}
1492
1493	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}")
1494	request.URL.Path = opPath
1495	if len(request.URL.RawQuery) > 0 {
1496		request.URL.RawQuery = "&" + opQuery
1497	} else {
1498		request.URL.RawQuery = opQuery
1499	}
1500
1501	request.Method = "GET"
1502	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1503	if err != nil {
1504		return out, metadata, &smithy.SerializationError{Err: err}
1505	}
1506
1507	if err := awsRestjson1_serializeOpHttpBindingsGetBranchInput(input, restEncoder); err != nil {
1508		return out, metadata, &smithy.SerializationError{Err: err}
1509	}
1510
1511	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1512		return out, metadata, &smithy.SerializationError{Err: err}
1513	}
1514	in.Request = request
1515
1516	return next.HandleSerialize(ctx, in)
1517}
1518func awsRestjson1_serializeOpHttpBindingsGetBranchInput(v *GetBranchInput, encoder *httpbinding.Encoder) error {
1519	if v == nil {
1520		return fmt.Errorf("unsupported serialization of nil %T", v)
1521	}
1522
1523	if v.AppId == nil || len(*v.AppId) == 0 {
1524		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1525	}
1526	if v.AppId != nil {
1527		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1528			return err
1529		}
1530	}
1531
1532	if v.BranchName == nil || len(*v.BranchName) == 0 {
1533		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
1534	}
1535	if v.BranchName != nil {
1536		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
1537			return err
1538		}
1539	}
1540
1541	return nil
1542}
1543
1544type awsRestjson1_serializeOpGetDomainAssociation struct {
1545}
1546
1547func (*awsRestjson1_serializeOpGetDomainAssociation) ID() string {
1548	return "OperationSerializer"
1549}
1550
1551func (m *awsRestjson1_serializeOpGetDomainAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1552	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1553) {
1554	request, ok := in.Request.(*smithyhttp.Request)
1555	if !ok {
1556		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1557	}
1558
1559	input, ok := in.Parameters.(*GetDomainAssociationInput)
1560	_ = input
1561	if !ok {
1562		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1563	}
1564
1565	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/domains/{domainName}")
1566	request.URL.Path = opPath
1567	if len(request.URL.RawQuery) > 0 {
1568		request.URL.RawQuery = "&" + opQuery
1569	} else {
1570		request.URL.RawQuery = opQuery
1571	}
1572
1573	request.Method = "GET"
1574	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1575	if err != nil {
1576		return out, metadata, &smithy.SerializationError{Err: err}
1577	}
1578
1579	if err := awsRestjson1_serializeOpHttpBindingsGetDomainAssociationInput(input, restEncoder); err != nil {
1580		return out, metadata, &smithy.SerializationError{Err: err}
1581	}
1582
1583	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1584		return out, metadata, &smithy.SerializationError{Err: err}
1585	}
1586	in.Request = request
1587
1588	return next.HandleSerialize(ctx, in)
1589}
1590func awsRestjson1_serializeOpHttpBindingsGetDomainAssociationInput(v *GetDomainAssociationInput, encoder *httpbinding.Encoder) error {
1591	if v == nil {
1592		return fmt.Errorf("unsupported serialization of nil %T", v)
1593	}
1594
1595	if v.AppId == nil || len(*v.AppId) == 0 {
1596		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1597	}
1598	if v.AppId != nil {
1599		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1600			return err
1601		}
1602	}
1603
1604	if v.DomainName == nil || len(*v.DomainName) == 0 {
1605		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
1606	}
1607	if v.DomainName != nil {
1608		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
1609			return err
1610		}
1611	}
1612
1613	return nil
1614}
1615
1616type awsRestjson1_serializeOpGetJob struct {
1617}
1618
1619func (*awsRestjson1_serializeOpGetJob) ID() string {
1620	return "OperationSerializer"
1621}
1622
1623func (m *awsRestjson1_serializeOpGetJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1624	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1625) {
1626	request, ok := in.Request.(*smithyhttp.Request)
1627	if !ok {
1628		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1629	}
1630
1631	input, ok := in.Parameters.(*GetJobInput)
1632	_ = input
1633	if !ok {
1634		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1635	}
1636
1637	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs/{jobId}")
1638	request.URL.Path = opPath
1639	if len(request.URL.RawQuery) > 0 {
1640		request.URL.RawQuery = "&" + opQuery
1641	} else {
1642		request.URL.RawQuery = opQuery
1643	}
1644
1645	request.Method = "GET"
1646	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1647	if err != nil {
1648		return out, metadata, &smithy.SerializationError{Err: err}
1649	}
1650
1651	if err := awsRestjson1_serializeOpHttpBindingsGetJobInput(input, restEncoder); err != nil {
1652		return out, metadata, &smithy.SerializationError{Err: err}
1653	}
1654
1655	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1656		return out, metadata, &smithy.SerializationError{Err: err}
1657	}
1658	in.Request = request
1659
1660	return next.HandleSerialize(ctx, in)
1661}
1662func awsRestjson1_serializeOpHttpBindingsGetJobInput(v *GetJobInput, encoder *httpbinding.Encoder) error {
1663	if v == nil {
1664		return fmt.Errorf("unsupported serialization of nil %T", v)
1665	}
1666
1667	if v.AppId == nil || len(*v.AppId) == 0 {
1668		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1669	}
1670	if v.AppId != nil {
1671		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1672			return err
1673		}
1674	}
1675
1676	if v.BranchName == nil || len(*v.BranchName) == 0 {
1677		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
1678	}
1679	if v.BranchName != nil {
1680		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
1681			return err
1682		}
1683	}
1684
1685	if v.JobId == nil || len(*v.JobId) == 0 {
1686		return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")}
1687	}
1688	if v.JobId != nil {
1689		if err := encoder.SetURI("jobId").String(*v.JobId); err != nil {
1690			return err
1691		}
1692	}
1693
1694	return nil
1695}
1696
1697type awsRestjson1_serializeOpGetWebhook struct {
1698}
1699
1700func (*awsRestjson1_serializeOpGetWebhook) ID() string {
1701	return "OperationSerializer"
1702}
1703
1704func (m *awsRestjson1_serializeOpGetWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1705	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1706) {
1707	request, ok := in.Request.(*smithyhttp.Request)
1708	if !ok {
1709		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1710	}
1711
1712	input, ok := in.Parameters.(*GetWebhookInput)
1713	_ = input
1714	if !ok {
1715		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1716	}
1717
1718	opPath, opQuery := httpbinding.SplitURI("/webhooks/{webhookId}")
1719	request.URL.Path = opPath
1720	if len(request.URL.RawQuery) > 0 {
1721		request.URL.RawQuery = "&" + opQuery
1722	} else {
1723		request.URL.RawQuery = opQuery
1724	}
1725
1726	request.Method = "GET"
1727	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1728	if err != nil {
1729		return out, metadata, &smithy.SerializationError{Err: err}
1730	}
1731
1732	if err := awsRestjson1_serializeOpHttpBindingsGetWebhookInput(input, restEncoder); err != nil {
1733		return out, metadata, &smithy.SerializationError{Err: err}
1734	}
1735
1736	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1737		return out, metadata, &smithy.SerializationError{Err: err}
1738	}
1739	in.Request = request
1740
1741	return next.HandleSerialize(ctx, in)
1742}
1743func awsRestjson1_serializeOpHttpBindingsGetWebhookInput(v *GetWebhookInput, encoder *httpbinding.Encoder) error {
1744	if v == nil {
1745		return fmt.Errorf("unsupported serialization of nil %T", v)
1746	}
1747
1748	if v.WebhookId == nil || len(*v.WebhookId) == 0 {
1749		return &smithy.SerializationError{Err: fmt.Errorf("input member webhookId must not be empty")}
1750	}
1751	if v.WebhookId != nil {
1752		if err := encoder.SetURI("webhookId").String(*v.WebhookId); err != nil {
1753			return err
1754		}
1755	}
1756
1757	return nil
1758}
1759
1760type awsRestjson1_serializeOpListApps struct {
1761}
1762
1763func (*awsRestjson1_serializeOpListApps) ID() string {
1764	return "OperationSerializer"
1765}
1766
1767func (m *awsRestjson1_serializeOpListApps) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1768	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1769) {
1770	request, ok := in.Request.(*smithyhttp.Request)
1771	if !ok {
1772		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1773	}
1774
1775	input, ok := in.Parameters.(*ListAppsInput)
1776	_ = input
1777	if !ok {
1778		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1779	}
1780
1781	opPath, opQuery := httpbinding.SplitURI("/apps")
1782	request.URL.Path = opPath
1783	if len(request.URL.RawQuery) > 0 {
1784		request.URL.RawQuery = "&" + opQuery
1785	} else {
1786		request.URL.RawQuery = opQuery
1787	}
1788
1789	request.Method = "GET"
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_serializeOpHttpBindingsListAppsInput(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_serializeOpHttpBindingsListAppsInput(v *ListAppsInput, encoder *httpbinding.Encoder) error {
1807	if v == nil {
1808		return fmt.Errorf("unsupported serialization of nil %T", v)
1809	}
1810
1811	if v.MaxResults != 0 {
1812		encoder.SetQuery("maxResults").Integer(v.MaxResults)
1813	}
1814
1815	if v.NextToken != nil {
1816		encoder.SetQuery("nextToken").String(*v.NextToken)
1817	}
1818
1819	return nil
1820}
1821
1822type awsRestjson1_serializeOpListArtifacts struct {
1823}
1824
1825func (*awsRestjson1_serializeOpListArtifacts) ID() string {
1826	return "OperationSerializer"
1827}
1828
1829func (m *awsRestjson1_serializeOpListArtifacts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1830	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1831) {
1832	request, ok := in.Request.(*smithyhttp.Request)
1833	if !ok {
1834		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1835	}
1836
1837	input, ok := in.Parameters.(*ListArtifactsInput)
1838	_ = input
1839	if !ok {
1840		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1841	}
1842
1843	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs/{jobId}/artifacts")
1844	request.URL.Path = opPath
1845	if len(request.URL.RawQuery) > 0 {
1846		request.URL.RawQuery = "&" + opQuery
1847	} else {
1848		request.URL.RawQuery = opQuery
1849	}
1850
1851	request.Method = "GET"
1852	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1853	if err != nil {
1854		return out, metadata, &smithy.SerializationError{Err: err}
1855	}
1856
1857	if err := awsRestjson1_serializeOpHttpBindingsListArtifactsInput(input, restEncoder); err != nil {
1858		return out, metadata, &smithy.SerializationError{Err: err}
1859	}
1860
1861	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1862		return out, metadata, &smithy.SerializationError{Err: err}
1863	}
1864	in.Request = request
1865
1866	return next.HandleSerialize(ctx, in)
1867}
1868func awsRestjson1_serializeOpHttpBindingsListArtifactsInput(v *ListArtifactsInput, encoder *httpbinding.Encoder) error {
1869	if v == nil {
1870		return fmt.Errorf("unsupported serialization of nil %T", v)
1871	}
1872
1873	if v.AppId == nil || len(*v.AppId) == 0 {
1874		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1875	}
1876	if v.AppId != nil {
1877		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1878			return err
1879		}
1880	}
1881
1882	if v.BranchName == nil || len(*v.BranchName) == 0 {
1883		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
1884	}
1885	if v.BranchName != nil {
1886		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
1887			return err
1888		}
1889	}
1890
1891	if v.JobId == nil || len(*v.JobId) == 0 {
1892		return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")}
1893	}
1894	if v.JobId != nil {
1895		if err := encoder.SetURI("jobId").String(*v.JobId); err != nil {
1896			return err
1897		}
1898	}
1899
1900	if v.MaxResults != 0 {
1901		encoder.SetQuery("maxResults").Integer(v.MaxResults)
1902	}
1903
1904	if v.NextToken != nil {
1905		encoder.SetQuery("nextToken").String(*v.NextToken)
1906	}
1907
1908	return nil
1909}
1910
1911type awsRestjson1_serializeOpListBackendEnvironments struct {
1912}
1913
1914func (*awsRestjson1_serializeOpListBackendEnvironments) ID() string {
1915	return "OperationSerializer"
1916}
1917
1918func (m *awsRestjson1_serializeOpListBackendEnvironments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1919	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1920) {
1921	request, ok := in.Request.(*smithyhttp.Request)
1922	if !ok {
1923		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1924	}
1925
1926	input, ok := in.Parameters.(*ListBackendEnvironmentsInput)
1927	_ = input
1928	if !ok {
1929		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1930	}
1931
1932	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/backendenvironments")
1933	request.URL.Path = opPath
1934	if len(request.URL.RawQuery) > 0 {
1935		request.URL.RawQuery = "&" + opQuery
1936	} else {
1937		request.URL.RawQuery = opQuery
1938	}
1939
1940	request.Method = "GET"
1941	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1942	if err != nil {
1943		return out, metadata, &smithy.SerializationError{Err: err}
1944	}
1945
1946	if err := awsRestjson1_serializeOpHttpBindingsListBackendEnvironmentsInput(input, restEncoder); err != nil {
1947		return out, metadata, &smithy.SerializationError{Err: err}
1948	}
1949
1950	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1951		return out, metadata, &smithy.SerializationError{Err: err}
1952	}
1953	in.Request = request
1954
1955	return next.HandleSerialize(ctx, in)
1956}
1957func awsRestjson1_serializeOpHttpBindingsListBackendEnvironmentsInput(v *ListBackendEnvironmentsInput, encoder *httpbinding.Encoder) error {
1958	if v == nil {
1959		return fmt.Errorf("unsupported serialization of nil %T", v)
1960	}
1961
1962	if v.AppId == nil || len(*v.AppId) == 0 {
1963		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
1964	}
1965	if v.AppId != nil {
1966		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
1967			return err
1968		}
1969	}
1970
1971	if v.EnvironmentName != nil {
1972		encoder.SetQuery("environmentName").String(*v.EnvironmentName)
1973	}
1974
1975	if v.MaxResults != 0 {
1976		encoder.SetQuery("maxResults").Integer(v.MaxResults)
1977	}
1978
1979	if v.NextToken != nil {
1980		encoder.SetQuery("nextToken").String(*v.NextToken)
1981	}
1982
1983	return nil
1984}
1985
1986type awsRestjson1_serializeOpListBranches struct {
1987}
1988
1989func (*awsRestjson1_serializeOpListBranches) ID() string {
1990	return "OperationSerializer"
1991}
1992
1993func (m *awsRestjson1_serializeOpListBranches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1994	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1995) {
1996	request, ok := in.Request.(*smithyhttp.Request)
1997	if !ok {
1998		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1999	}
2000
2001	input, ok := in.Parameters.(*ListBranchesInput)
2002	_ = input
2003	if !ok {
2004		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2005	}
2006
2007	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches")
2008	request.URL.Path = opPath
2009	if len(request.URL.RawQuery) > 0 {
2010		request.URL.RawQuery = "&" + opQuery
2011	} else {
2012		request.URL.RawQuery = opQuery
2013	}
2014
2015	request.Method = "GET"
2016	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2017	if err != nil {
2018		return out, metadata, &smithy.SerializationError{Err: err}
2019	}
2020
2021	if err := awsRestjson1_serializeOpHttpBindingsListBranchesInput(input, restEncoder); err != nil {
2022		return out, metadata, &smithy.SerializationError{Err: err}
2023	}
2024
2025	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2026		return out, metadata, &smithy.SerializationError{Err: err}
2027	}
2028	in.Request = request
2029
2030	return next.HandleSerialize(ctx, in)
2031}
2032func awsRestjson1_serializeOpHttpBindingsListBranchesInput(v *ListBranchesInput, encoder *httpbinding.Encoder) error {
2033	if v == nil {
2034		return fmt.Errorf("unsupported serialization of nil %T", v)
2035	}
2036
2037	if v.AppId == nil || len(*v.AppId) == 0 {
2038		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2039	}
2040	if v.AppId != nil {
2041		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2042			return err
2043		}
2044	}
2045
2046	if v.MaxResults != 0 {
2047		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2048	}
2049
2050	if v.NextToken != nil {
2051		encoder.SetQuery("nextToken").String(*v.NextToken)
2052	}
2053
2054	return nil
2055}
2056
2057type awsRestjson1_serializeOpListDomainAssociations struct {
2058}
2059
2060func (*awsRestjson1_serializeOpListDomainAssociations) ID() string {
2061	return "OperationSerializer"
2062}
2063
2064func (m *awsRestjson1_serializeOpListDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2065	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2066) {
2067	request, ok := in.Request.(*smithyhttp.Request)
2068	if !ok {
2069		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2070	}
2071
2072	input, ok := in.Parameters.(*ListDomainAssociationsInput)
2073	_ = input
2074	if !ok {
2075		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2076	}
2077
2078	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/domains")
2079	request.URL.Path = opPath
2080	if len(request.URL.RawQuery) > 0 {
2081		request.URL.RawQuery = "&" + opQuery
2082	} else {
2083		request.URL.RawQuery = opQuery
2084	}
2085
2086	request.Method = "GET"
2087	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2088	if err != nil {
2089		return out, metadata, &smithy.SerializationError{Err: err}
2090	}
2091
2092	if err := awsRestjson1_serializeOpHttpBindingsListDomainAssociationsInput(input, restEncoder); err != nil {
2093		return out, metadata, &smithy.SerializationError{Err: err}
2094	}
2095
2096	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2097		return out, metadata, &smithy.SerializationError{Err: err}
2098	}
2099	in.Request = request
2100
2101	return next.HandleSerialize(ctx, in)
2102}
2103func awsRestjson1_serializeOpHttpBindingsListDomainAssociationsInput(v *ListDomainAssociationsInput, encoder *httpbinding.Encoder) error {
2104	if v == nil {
2105		return fmt.Errorf("unsupported serialization of nil %T", v)
2106	}
2107
2108	if v.AppId == nil || len(*v.AppId) == 0 {
2109		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2110	}
2111	if v.AppId != nil {
2112		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2113			return err
2114		}
2115	}
2116
2117	if v.MaxResults != 0 {
2118		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2119	}
2120
2121	if v.NextToken != nil {
2122		encoder.SetQuery("nextToken").String(*v.NextToken)
2123	}
2124
2125	return nil
2126}
2127
2128type awsRestjson1_serializeOpListJobs struct {
2129}
2130
2131func (*awsRestjson1_serializeOpListJobs) ID() string {
2132	return "OperationSerializer"
2133}
2134
2135func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2136	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2137) {
2138	request, ok := in.Request.(*smithyhttp.Request)
2139	if !ok {
2140		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2141	}
2142
2143	input, ok := in.Parameters.(*ListJobsInput)
2144	_ = input
2145	if !ok {
2146		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2147	}
2148
2149	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs")
2150	request.URL.Path = opPath
2151	if len(request.URL.RawQuery) > 0 {
2152		request.URL.RawQuery = "&" + opQuery
2153	} else {
2154		request.URL.RawQuery = opQuery
2155	}
2156
2157	request.Method = "GET"
2158	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2159	if err != nil {
2160		return out, metadata, &smithy.SerializationError{Err: err}
2161	}
2162
2163	if err := awsRestjson1_serializeOpHttpBindingsListJobsInput(input, restEncoder); err != nil {
2164		return out, metadata, &smithy.SerializationError{Err: err}
2165	}
2166
2167	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2168		return out, metadata, &smithy.SerializationError{Err: err}
2169	}
2170	in.Request = request
2171
2172	return next.HandleSerialize(ctx, in)
2173}
2174func awsRestjson1_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder *httpbinding.Encoder) error {
2175	if v == nil {
2176		return fmt.Errorf("unsupported serialization of nil %T", v)
2177	}
2178
2179	if v.AppId == nil || len(*v.AppId) == 0 {
2180		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2181	}
2182	if v.AppId != nil {
2183		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2184			return err
2185		}
2186	}
2187
2188	if v.BranchName == nil || len(*v.BranchName) == 0 {
2189		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
2190	}
2191	if v.BranchName != nil {
2192		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
2193			return err
2194		}
2195	}
2196
2197	if v.MaxResults != 0 {
2198		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2199	}
2200
2201	if v.NextToken != nil {
2202		encoder.SetQuery("nextToken").String(*v.NextToken)
2203	}
2204
2205	return nil
2206}
2207
2208type awsRestjson1_serializeOpListTagsForResource struct {
2209}
2210
2211func (*awsRestjson1_serializeOpListTagsForResource) ID() string {
2212	return "OperationSerializer"
2213}
2214
2215func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2216	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2217) {
2218	request, ok := in.Request.(*smithyhttp.Request)
2219	if !ok {
2220		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2221	}
2222
2223	input, ok := in.Parameters.(*ListTagsForResourceInput)
2224	_ = input
2225	if !ok {
2226		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2227	}
2228
2229	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
2230	request.URL.Path = opPath
2231	if len(request.URL.RawQuery) > 0 {
2232		request.URL.RawQuery = "&" + opQuery
2233	} else {
2234		request.URL.RawQuery = opQuery
2235	}
2236
2237	request.Method = "GET"
2238	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2239	if err != nil {
2240		return out, metadata, &smithy.SerializationError{Err: err}
2241	}
2242
2243	if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
2244		return out, metadata, &smithy.SerializationError{Err: err}
2245	}
2246
2247	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2248		return out, metadata, &smithy.SerializationError{Err: err}
2249	}
2250	in.Request = request
2251
2252	return next.HandleSerialize(ctx, in)
2253}
2254func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
2255	if v == nil {
2256		return fmt.Errorf("unsupported serialization of nil %T", v)
2257	}
2258
2259	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
2260		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
2261	}
2262	if v.ResourceArn != nil {
2263		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
2264			return err
2265		}
2266	}
2267
2268	return nil
2269}
2270
2271type awsRestjson1_serializeOpListWebhooks struct {
2272}
2273
2274func (*awsRestjson1_serializeOpListWebhooks) ID() string {
2275	return "OperationSerializer"
2276}
2277
2278func (m *awsRestjson1_serializeOpListWebhooks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2279	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2280) {
2281	request, ok := in.Request.(*smithyhttp.Request)
2282	if !ok {
2283		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2284	}
2285
2286	input, ok := in.Parameters.(*ListWebhooksInput)
2287	_ = input
2288	if !ok {
2289		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2290	}
2291
2292	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/webhooks")
2293	request.URL.Path = opPath
2294	if len(request.URL.RawQuery) > 0 {
2295		request.URL.RawQuery = "&" + opQuery
2296	} else {
2297		request.URL.RawQuery = opQuery
2298	}
2299
2300	request.Method = "GET"
2301	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2302	if err != nil {
2303		return out, metadata, &smithy.SerializationError{Err: err}
2304	}
2305
2306	if err := awsRestjson1_serializeOpHttpBindingsListWebhooksInput(input, restEncoder); err != nil {
2307		return out, metadata, &smithy.SerializationError{Err: err}
2308	}
2309
2310	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2311		return out, metadata, &smithy.SerializationError{Err: err}
2312	}
2313	in.Request = request
2314
2315	return next.HandleSerialize(ctx, in)
2316}
2317func awsRestjson1_serializeOpHttpBindingsListWebhooksInput(v *ListWebhooksInput, encoder *httpbinding.Encoder) error {
2318	if v == nil {
2319		return fmt.Errorf("unsupported serialization of nil %T", v)
2320	}
2321
2322	if v.AppId == nil || len(*v.AppId) == 0 {
2323		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2324	}
2325	if v.AppId != nil {
2326		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2327			return err
2328		}
2329	}
2330
2331	if v.MaxResults != 0 {
2332		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2333	}
2334
2335	if v.NextToken != nil {
2336		encoder.SetQuery("nextToken").String(*v.NextToken)
2337	}
2338
2339	return nil
2340}
2341
2342type awsRestjson1_serializeOpStartDeployment struct {
2343}
2344
2345func (*awsRestjson1_serializeOpStartDeployment) ID() string {
2346	return "OperationSerializer"
2347}
2348
2349func (m *awsRestjson1_serializeOpStartDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2350	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2351) {
2352	request, ok := in.Request.(*smithyhttp.Request)
2353	if !ok {
2354		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2355	}
2356
2357	input, ok := in.Parameters.(*StartDeploymentInput)
2358	_ = input
2359	if !ok {
2360		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2361	}
2362
2363	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/deployments/start")
2364	request.URL.Path = opPath
2365	if len(request.URL.RawQuery) > 0 {
2366		request.URL.RawQuery = "&" + opQuery
2367	} else {
2368		request.URL.RawQuery = opQuery
2369	}
2370
2371	request.Method = "POST"
2372	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2373	if err != nil {
2374		return out, metadata, &smithy.SerializationError{Err: err}
2375	}
2376
2377	if err := awsRestjson1_serializeOpHttpBindingsStartDeploymentInput(input, restEncoder); err != nil {
2378		return out, metadata, &smithy.SerializationError{Err: err}
2379	}
2380
2381	restEncoder.SetHeader("Content-Type").String("application/json")
2382
2383	jsonEncoder := smithyjson.NewEncoder()
2384	if err := awsRestjson1_serializeOpDocumentStartDeploymentInput(input, jsonEncoder.Value); err != nil {
2385		return out, metadata, &smithy.SerializationError{Err: err}
2386	}
2387
2388	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2389		return out, metadata, &smithy.SerializationError{Err: err}
2390	}
2391
2392	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2393		return out, metadata, &smithy.SerializationError{Err: err}
2394	}
2395	in.Request = request
2396
2397	return next.HandleSerialize(ctx, in)
2398}
2399func awsRestjson1_serializeOpHttpBindingsStartDeploymentInput(v *StartDeploymentInput, encoder *httpbinding.Encoder) error {
2400	if v == nil {
2401		return fmt.Errorf("unsupported serialization of nil %T", v)
2402	}
2403
2404	if v.AppId == nil || len(*v.AppId) == 0 {
2405		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2406	}
2407	if v.AppId != nil {
2408		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2409			return err
2410		}
2411	}
2412
2413	if v.BranchName == nil || len(*v.BranchName) == 0 {
2414		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
2415	}
2416	if v.BranchName != nil {
2417		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
2418			return err
2419		}
2420	}
2421
2422	return nil
2423}
2424
2425func awsRestjson1_serializeOpDocumentStartDeploymentInput(v *StartDeploymentInput, value smithyjson.Value) error {
2426	object := value.Object()
2427	defer object.Close()
2428
2429	if v.JobId != nil {
2430		ok := object.Key("jobId")
2431		ok.String(*v.JobId)
2432	}
2433
2434	if v.SourceUrl != nil {
2435		ok := object.Key("sourceUrl")
2436		ok.String(*v.SourceUrl)
2437	}
2438
2439	return nil
2440}
2441
2442type awsRestjson1_serializeOpStartJob struct {
2443}
2444
2445func (*awsRestjson1_serializeOpStartJob) ID() string {
2446	return "OperationSerializer"
2447}
2448
2449func (m *awsRestjson1_serializeOpStartJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2450	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2451) {
2452	request, ok := in.Request.(*smithyhttp.Request)
2453	if !ok {
2454		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2455	}
2456
2457	input, ok := in.Parameters.(*StartJobInput)
2458	_ = input
2459	if !ok {
2460		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2461	}
2462
2463	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs")
2464	request.URL.Path = opPath
2465	if len(request.URL.RawQuery) > 0 {
2466		request.URL.RawQuery = "&" + opQuery
2467	} else {
2468		request.URL.RawQuery = opQuery
2469	}
2470
2471	request.Method = "POST"
2472	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2473	if err != nil {
2474		return out, metadata, &smithy.SerializationError{Err: err}
2475	}
2476
2477	if err := awsRestjson1_serializeOpHttpBindingsStartJobInput(input, restEncoder); err != nil {
2478		return out, metadata, &smithy.SerializationError{Err: err}
2479	}
2480
2481	restEncoder.SetHeader("Content-Type").String("application/json")
2482
2483	jsonEncoder := smithyjson.NewEncoder()
2484	if err := awsRestjson1_serializeOpDocumentStartJobInput(input, jsonEncoder.Value); err != nil {
2485		return out, metadata, &smithy.SerializationError{Err: err}
2486	}
2487
2488	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2489		return out, metadata, &smithy.SerializationError{Err: err}
2490	}
2491
2492	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2493		return out, metadata, &smithy.SerializationError{Err: err}
2494	}
2495	in.Request = request
2496
2497	return next.HandleSerialize(ctx, in)
2498}
2499func awsRestjson1_serializeOpHttpBindingsStartJobInput(v *StartJobInput, encoder *httpbinding.Encoder) error {
2500	if v == nil {
2501		return fmt.Errorf("unsupported serialization of nil %T", v)
2502	}
2503
2504	if v.AppId == nil || len(*v.AppId) == 0 {
2505		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2506	}
2507	if v.AppId != nil {
2508		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2509			return err
2510		}
2511	}
2512
2513	if v.BranchName == nil || len(*v.BranchName) == 0 {
2514		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
2515	}
2516	if v.BranchName != nil {
2517		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
2518			return err
2519		}
2520	}
2521
2522	return nil
2523}
2524
2525func awsRestjson1_serializeOpDocumentStartJobInput(v *StartJobInput, value smithyjson.Value) error {
2526	object := value.Object()
2527	defer object.Close()
2528
2529	if v.CommitId != nil {
2530		ok := object.Key("commitId")
2531		ok.String(*v.CommitId)
2532	}
2533
2534	if v.CommitMessage != nil {
2535		ok := object.Key("commitMessage")
2536		ok.String(*v.CommitMessage)
2537	}
2538
2539	if v.CommitTime != nil {
2540		ok := object.Key("commitTime")
2541		ok.Double(smithytime.FormatEpochSeconds(*v.CommitTime))
2542	}
2543
2544	if v.JobId != nil {
2545		ok := object.Key("jobId")
2546		ok.String(*v.JobId)
2547	}
2548
2549	if v.JobReason != nil {
2550		ok := object.Key("jobReason")
2551		ok.String(*v.JobReason)
2552	}
2553
2554	if len(v.JobType) > 0 {
2555		ok := object.Key("jobType")
2556		ok.String(string(v.JobType))
2557	}
2558
2559	return nil
2560}
2561
2562type awsRestjson1_serializeOpStopJob struct {
2563}
2564
2565func (*awsRestjson1_serializeOpStopJob) ID() string {
2566	return "OperationSerializer"
2567}
2568
2569func (m *awsRestjson1_serializeOpStopJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2570	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2571) {
2572	request, ok := in.Request.(*smithyhttp.Request)
2573	if !ok {
2574		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2575	}
2576
2577	input, ok := in.Parameters.(*StopJobInput)
2578	_ = input
2579	if !ok {
2580		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2581	}
2582
2583	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop")
2584	request.URL.Path = opPath
2585	if len(request.URL.RawQuery) > 0 {
2586		request.URL.RawQuery = "&" + opQuery
2587	} else {
2588		request.URL.RawQuery = opQuery
2589	}
2590
2591	request.Method = "DELETE"
2592	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2593	if err != nil {
2594		return out, metadata, &smithy.SerializationError{Err: err}
2595	}
2596
2597	if err := awsRestjson1_serializeOpHttpBindingsStopJobInput(input, restEncoder); err != nil {
2598		return out, metadata, &smithy.SerializationError{Err: err}
2599	}
2600
2601	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2602		return out, metadata, &smithy.SerializationError{Err: err}
2603	}
2604	in.Request = request
2605
2606	return next.HandleSerialize(ctx, in)
2607}
2608func awsRestjson1_serializeOpHttpBindingsStopJobInput(v *StopJobInput, encoder *httpbinding.Encoder) error {
2609	if v == nil {
2610		return fmt.Errorf("unsupported serialization of nil %T", v)
2611	}
2612
2613	if v.AppId == nil || len(*v.AppId) == 0 {
2614		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2615	}
2616	if v.AppId != nil {
2617		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2618			return err
2619		}
2620	}
2621
2622	if v.BranchName == nil || len(*v.BranchName) == 0 {
2623		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
2624	}
2625	if v.BranchName != nil {
2626		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
2627			return err
2628		}
2629	}
2630
2631	if v.JobId == nil || len(*v.JobId) == 0 {
2632		return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")}
2633	}
2634	if v.JobId != nil {
2635		if err := encoder.SetURI("jobId").String(*v.JobId); err != nil {
2636			return err
2637		}
2638	}
2639
2640	return nil
2641}
2642
2643type awsRestjson1_serializeOpTagResource struct {
2644}
2645
2646func (*awsRestjson1_serializeOpTagResource) ID() string {
2647	return "OperationSerializer"
2648}
2649
2650func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2651	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2652) {
2653	request, ok := in.Request.(*smithyhttp.Request)
2654	if !ok {
2655		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2656	}
2657
2658	input, ok := in.Parameters.(*TagResourceInput)
2659	_ = input
2660	if !ok {
2661		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2662	}
2663
2664	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
2665	request.URL.Path = opPath
2666	if len(request.URL.RawQuery) > 0 {
2667		request.URL.RawQuery = "&" + opQuery
2668	} else {
2669		request.URL.RawQuery = opQuery
2670	}
2671
2672	request.Method = "POST"
2673	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2674	if err != nil {
2675		return out, metadata, &smithy.SerializationError{Err: err}
2676	}
2677
2678	if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
2679		return out, metadata, &smithy.SerializationError{Err: err}
2680	}
2681
2682	restEncoder.SetHeader("Content-Type").String("application/json")
2683
2684	jsonEncoder := smithyjson.NewEncoder()
2685	if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
2686		return out, metadata, &smithy.SerializationError{Err: err}
2687	}
2688
2689	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2690		return out, metadata, &smithy.SerializationError{Err: err}
2691	}
2692
2693	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2694		return out, metadata, &smithy.SerializationError{Err: err}
2695	}
2696	in.Request = request
2697
2698	return next.HandleSerialize(ctx, in)
2699}
2700func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
2701	if v == nil {
2702		return fmt.Errorf("unsupported serialization of nil %T", v)
2703	}
2704
2705	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
2706		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
2707	}
2708	if v.ResourceArn != nil {
2709		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
2710			return err
2711		}
2712	}
2713
2714	return nil
2715}
2716
2717func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
2718	object := value.Object()
2719	defer object.Close()
2720
2721	if v.Tags != nil {
2722		ok := object.Key("tags")
2723		if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
2724			return err
2725		}
2726	}
2727
2728	return nil
2729}
2730
2731type awsRestjson1_serializeOpUntagResource struct {
2732}
2733
2734func (*awsRestjson1_serializeOpUntagResource) ID() string {
2735	return "OperationSerializer"
2736}
2737
2738func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2739	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2740) {
2741	request, ok := in.Request.(*smithyhttp.Request)
2742	if !ok {
2743		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2744	}
2745
2746	input, ok := in.Parameters.(*UntagResourceInput)
2747	_ = input
2748	if !ok {
2749		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2750	}
2751
2752	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
2753	request.URL.Path = opPath
2754	if len(request.URL.RawQuery) > 0 {
2755		request.URL.RawQuery = "&" + opQuery
2756	} else {
2757		request.URL.RawQuery = opQuery
2758	}
2759
2760	request.Method = "DELETE"
2761	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2762	if err != nil {
2763		return out, metadata, &smithy.SerializationError{Err: err}
2764	}
2765
2766	if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
2767		return out, metadata, &smithy.SerializationError{Err: err}
2768	}
2769
2770	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2771		return out, metadata, &smithy.SerializationError{Err: err}
2772	}
2773	in.Request = request
2774
2775	return next.HandleSerialize(ctx, in)
2776}
2777func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
2778	if v == nil {
2779		return fmt.Errorf("unsupported serialization of nil %T", v)
2780	}
2781
2782	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
2783		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
2784	}
2785	if v.ResourceArn != nil {
2786		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
2787			return err
2788		}
2789	}
2790
2791	if v.TagKeys != nil {
2792		for i := range v.TagKeys {
2793			encoder.AddQuery("tagKeys").String(v.TagKeys[i])
2794		}
2795	}
2796
2797	return nil
2798}
2799
2800type awsRestjson1_serializeOpUpdateApp struct {
2801}
2802
2803func (*awsRestjson1_serializeOpUpdateApp) ID() string {
2804	return "OperationSerializer"
2805}
2806
2807func (m *awsRestjson1_serializeOpUpdateApp) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2808	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2809) {
2810	request, ok := in.Request.(*smithyhttp.Request)
2811	if !ok {
2812		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2813	}
2814
2815	input, ok := in.Parameters.(*UpdateAppInput)
2816	_ = input
2817	if !ok {
2818		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2819	}
2820
2821	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}")
2822	request.URL.Path = opPath
2823	if len(request.URL.RawQuery) > 0 {
2824		request.URL.RawQuery = "&" + opQuery
2825	} else {
2826		request.URL.RawQuery = opQuery
2827	}
2828
2829	request.Method = "POST"
2830	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2831	if err != nil {
2832		return out, metadata, &smithy.SerializationError{Err: err}
2833	}
2834
2835	if err := awsRestjson1_serializeOpHttpBindingsUpdateAppInput(input, restEncoder); err != nil {
2836		return out, metadata, &smithy.SerializationError{Err: err}
2837	}
2838
2839	restEncoder.SetHeader("Content-Type").String("application/json")
2840
2841	jsonEncoder := smithyjson.NewEncoder()
2842	if err := awsRestjson1_serializeOpDocumentUpdateAppInput(input, jsonEncoder.Value); err != nil {
2843		return out, metadata, &smithy.SerializationError{Err: err}
2844	}
2845
2846	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2847		return out, metadata, &smithy.SerializationError{Err: err}
2848	}
2849
2850	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2851		return out, metadata, &smithy.SerializationError{Err: err}
2852	}
2853	in.Request = request
2854
2855	return next.HandleSerialize(ctx, in)
2856}
2857func awsRestjson1_serializeOpHttpBindingsUpdateAppInput(v *UpdateAppInput, encoder *httpbinding.Encoder) error {
2858	if v == nil {
2859		return fmt.Errorf("unsupported serialization of nil %T", v)
2860	}
2861
2862	if v.AppId == nil || len(*v.AppId) == 0 {
2863		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
2864	}
2865	if v.AppId != nil {
2866		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
2867			return err
2868		}
2869	}
2870
2871	return nil
2872}
2873
2874func awsRestjson1_serializeOpDocumentUpdateAppInput(v *UpdateAppInput, value smithyjson.Value) error {
2875	object := value.Object()
2876	defer object.Close()
2877
2878	if v.AccessToken != nil {
2879		ok := object.Key("accessToken")
2880		ok.String(*v.AccessToken)
2881	}
2882
2883	if v.AutoBranchCreationConfig != nil {
2884		ok := object.Key("autoBranchCreationConfig")
2885		if err := awsRestjson1_serializeDocumentAutoBranchCreationConfig(v.AutoBranchCreationConfig, ok); err != nil {
2886			return err
2887		}
2888	}
2889
2890	if v.AutoBranchCreationPatterns != nil {
2891		ok := object.Key("autoBranchCreationPatterns")
2892		if err := awsRestjson1_serializeDocumentAutoBranchCreationPatterns(v.AutoBranchCreationPatterns, ok); err != nil {
2893			return err
2894		}
2895	}
2896
2897	if v.BasicAuthCredentials != nil {
2898		ok := object.Key("basicAuthCredentials")
2899		ok.String(*v.BasicAuthCredentials)
2900	}
2901
2902	if v.BuildSpec != nil {
2903		ok := object.Key("buildSpec")
2904		ok.String(*v.BuildSpec)
2905	}
2906
2907	if v.CustomHeaders != nil {
2908		ok := object.Key("customHeaders")
2909		ok.String(*v.CustomHeaders)
2910	}
2911
2912	if v.CustomRules != nil {
2913		ok := object.Key("customRules")
2914		if err := awsRestjson1_serializeDocumentCustomRules(v.CustomRules, ok); err != nil {
2915			return err
2916		}
2917	}
2918
2919	if v.Description != nil {
2920		ok := object.Key("description")
2921		ok.String(*v.Description)
2922	}
2923
2924	if v.EnableAutoBranchCreation != nil {
2925		ok := object.Key("enableAutoBranchCreation")
2926		ok.Boolean(*v.EnableAutoBranchCreation)
2927	}
2928
2929	if v.EnableBasicAuth != nil {
2930		ok := object.Key("enableBasicAuth")
2931		ok.Boolean(*v.EnableBasicAuth)
2932	}
2933
2934	if v.EnableBranchAutoBuild != nil {
2935		ok := object.Key("enableBranchAutoBuild")
2936		ok.Boolean(*v.EnableBranchAutoBuild)
2937	}
2938
2939	if v.EnableBranchAutoDeletion != nil {
2940		ok := object.Key("enableBranchAutoDeletion")
2941		ok.Boolean(*v.EnableBranchAutoDeletion)
2942	}
2943
2944	if v.EnvironmentVariables != nil {
2945		ok := object.Key("environmentVariables")
2946		if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil {
2947			return err
2948		}
2949	}
2950
2951	if v.IamServiceRoleArn != nil {
2952		ok := object.Key("iamServiceRoleArn")
2953		ok.String(*v.IamServiceRoleArn)
2954	}
2955
2956	if v.Name != nil {
2957		ok := object.Key("name")
2958		ok.String(*v.Name)
2959	}
2960
2961	if v.OauthToken != nil {
2962		ok := object.Key("oauthToken")
2963		ok.String(*v.OauthToken)
2964	}
2965
2966	if len(v.Platform) > 0 {
2967		ok := object.Key("platform")
2968		ok.String(string(v.Platform))
2969	}
2970
2971	if v.Repository != nil {
2972		ok := object.Key("repository")
2973		ok.String(*v.Repository)
2974	}
2975
2976	return nil
2977}
2978
2979type awsRestjson1_serializeOpUpdateBranch struct {
2980}
2981
2982func (*awsRestjson1_serializeOpUpdateBranch) ID() string {
2983	return "OperationSerializer"
2984}
2985
2986func (m *awsRestjson1_serializeOpUpdateBranch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2987	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2988) {
2989	request, ok := in.Request.(*smithyhttp.Request)
2990	if !ok {
2991		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2992	}
2993
2994	input, ok := in.Parameters.(*UpdateBranchInput)
2995	_ = input
2996	if !ok {
2997		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2998	}
2999
3000	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/branches/{branchName}")
3001	request.URL.Path = opPath
3002	if len(request.URL.RawQuery) > 0 {
3003		request.URL.RawQuery = "&" + opQuery
3004	} else {
3005		request.URL.RawQuery = opQuery
3006	}
3007
3008	request.Method = "POST"
3009	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3010	if err != nil {
3011		return out, metadata, &smithy.SerializationError{Err: err}
3012	}
3013
3014	if err := awsRestjson1_serializeOpHttpBindingsUpdateBranchInput(input, restEncoder); err != nil {
3015		return out, metadata, &smithy.SerializationError{Err: err}
3016	}
3017
3018	restEncoder.SetHeader("Content-Type").String("application/json")
3019
3020	jsonEncoder := smithyjson.NewEncoder()
3021	if err := awsRestjson1_serializeOpDocumentUpdateBranchInput(input, jsonEncoder.Value); err != nil {
3022		return out, metadata, &smithy.SerializationError{Err: err}
3023	}
3024
3025	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3026		return out, metadata, &smithy.SerializationError{Err: err}
3027	}
3028
3029	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3030		return out, metadata, &smithy.SerializationError{Err: err}
3031	}
3032	in.Request = request
3033
3034	return next.HandleSerialize(ctx, in)
3035}
3036func awsRestjson1_serializeOpHttpBindingsUpdateBranchInput(v *UpdateBranchInput, encoder *httpbinding.Encoder) error {
3037	if v == nil {
3038		return fmt.Errorf("unsupported serialization of nil %T", v)
3039	}
3040
3041	if v.AppId == nil || len(*v.AppId) == 0 {
3042		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
3043	}
3044	if v.AppId != nil {
3045		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
3046			return err
3047		}
3048	}
3049
3050	if v.BranchName == nil || len(*v.BranchName) == 0 {
3051		return &smithy.SerializationError{Err: fmt.Errorf("input member branchName must not be empty")}
3052	}
3053	if v.BranchName != nil {
3054		if err := encoder.SetURI("branchName").String(*v.BranchName); err != nil {
3055			return err
3056		}
3057	}
3058
3059	return nil
3060}
3061
3062func awsRestjson1_serializeOpDocumentUpdateBranchInput(v *UpdateBranchInput, value smithyjson.Value) error {
3063	object := value.Object()
3064	defer object.Close()
3065
3066	if v.BackendEnvironmentArn != nil {
3067		ok := object.Key("backendEnvironmentArn")
3068		ok.String(*v.BackendEnvironmentArn)
3069	}
3070
3071	if v.BasicAuthCredentials != nil {
3072		ok := object.Key("basicAuthCredentials")
3073		ok.String(*v.BasicAuthCredentials)
3074	}
3075
3076	if v.BuildSpec != nil {
3077		ok := object.Key("buildSpec")
3078		ok.String(*v.BuildSpec)
3079	}
3080
3081	if v.Description != nil {
3082		ok := object.Key("description")
3083		ok.String(*v.Description)
3084	}
3085
3086	if v.DisplayName != nil {
3087		ok := object.Key("displayName")
3088		ok.String(*v.DisplayName)
3089	}
3090
3091	if v.EnableAutoBuild != nil {
3092		ok := object.Key("enableAutoBuild")
3093		ok.Boolean(*v.EnableAutoBuild)
3094	}
3095
3096	if v.EnableBasicAuth != nil {
3097		ok := object.Key("enableBasicAuth")
3098		ok.Boolean(*v.EnableBasicAuth)
3099	}
3100
3101	if v.EnableNotification != nil {
3102		ok := object.Key("enableNotification")
3103		ok.Boolean(*v.EnableNotification)
3104	}
3105
3106	if v.EnablePerformanceMode != nil {
3107		ok := object.Key("enablePerformanceMode")
3108		ok.Boolean(*v.EnablePerformanceMode)
3109	}
3110
3111	if v.EnablePullRequestPreview != nil {
3112		ok := object.Key("enablePullRequestPreview")
3113		ok.Boolean(*v.EnablePullRequestPreview)
3114	}
3115
3116	if v.EnvironmentVariables != nil {
3117		ok := object.Key("environmentVariables")
3118		if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil {
3119			return err
3120		}
3121	}
3122
3123	if v.Framework != nil {
3124		ok := object.Key("framework")
3125		ok.String(*v.Framework)
3126	}
3127
3128	if v.PullRequestEnvironmentName != nil {
3129		ok := object.Key("pullRequestEnvironmentName")
3130		ok.String(*v.PullRequestEnvironmentName)
3131	}
3132
3133	if len(v.Stage) > 0 {
3134		ok := object.Key("stage")
3135		ok.String(string(v.Stage))
3136	}
3137
3138	if v.Ttl != nil {
3139		ok := object.Key("ttl")
3140		ok.String(*v.Ttl)
3141	}
3142
3143	return nil
3144}
3145
3146type awsRestjson1_serializeOpUpdateDomainAssociation struct {
3147}
3148
3149func (*awsRestjson1_serializeOpUpdateDomainAssociation) ID() string {
3150	return "OperationSerializer"
3151}
3152
3153func (m *awsRestjson1_serializeOpUpdateDomainAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3154	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3155) {
3156	request, ok := in.Request.(*smithyhttp.Request)
3157	if !ok {
3158		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3159	}
3160
3161	input, ok := in.Parameters.(*UpdateDomainAssociationInput)
3162	_ = input
3163	if !ok {
3164		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3165	}
3166
3167	opPath, opQuery := httpbinding.SplitURI("/apps/{appId}/domains/{domainName}")
3168	request.URL.Path = opPath
3169	if len(request.URL.RawQuery) > 0 {
3170		request.URL.RawQuery = "&" + opQuery
3171	} else {
3172		request.URL.RawQuery = opQuery
3173	}
3174
3175	request.Method = "POST"
3176	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3177	if err != nil {
3178		return out, metadata, &smithy.SerializationError{Err: err}
3179	}
3180
3181	if err := awsRestjson1_serializeOpHttpBindingsUpdateDomainAssociationInput(input, restEncoder); err != nil {
3182		return out, metadata, &smithy.SerializationError{Err: err}
3183	}
3184
3185	restEncoder.SetHeader("Content-Type").String("application/json")
3186
3187	jsonEncoder := smithyjson.NewEncoder()
3188	if err := awsRestjson1_serializeOpDocumentUpdateDomainAssociationInput(input, jsonEncoder.Value); err != nil {
3189		return out, metadata, &smithy.SerializationError{Err: err}
3190	}
3191
3192	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3193		return out, metadata, &smithy.SerializationError{Err: err}
3194	}
3195
3196	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3197		return out, metadata, &smithy.SerializationError{Err: err}
3198	}
3199	in.Request = request
3200
3201	return next.HandleSerialize(ctx, in)
3202}
3203func awsRestjson1_serializeOpHttpBindingsUpdateDomainAssociationInput(v *UpdateDomainAssociationInput, encoder *httpbinding.Encoder) error {
3204	if v == nil {
3205		return fmt.Errorf("unsupported serialization of nil %T", v)
3206	}
3207
3208	if v.AppId == nil || len(*v.AppId) == 0 {
3209		return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")}
3210	}
3211	if v.AppId != nil {
3212		if err := encoder.SetURI("appId").String(*v.AppId); err != nil {
3213			return err
3214		}
3215	}
3216
3217	if v.DomainName == nil || len(*v.DomainName) == 0 {
3218		return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")}
3219	}
3220	if v.DomainName != nil {
3221		if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil {
3222			return err
3223		}
3224	}
3225
3226	return nil
3227}
3228
3229func awsRestjson1_serializeOpDocumentUpdateDomainAssociationInput(v *UpdateDomainAssociationInput, value smithyjson.Value) error {
3230	object := value.Object()
3231	defer object.Close()
3232
3233	if v.AutoSubDomainCreationPatterns != nil {
3234		ok := object.Key("autoSubDomainCreationPatterns")
3235		if err := awsRestjson1_serializeDocumentAutoSubDomainCreationPatterns(v.AutoSubDomainCreationPatterns, ok); err != nil {
3236			return err
3237		}
3238	}
3239
3240	if v.AutoSubDomainIAMRole != nil {
3241		ok := object.Key("autoSubDomainIAMRole")
3242		ok.String(*v.AutoSubDomainIAMRole)
3243	}
3244
3245	if v.EnableAutoSubDomain != nil {
3246		ok := object.Key("enableAutoSubDomain")
3247		ok.Boolean(*v.EnableAutoSubDomain)
3248	}
3249
3250	if v.SubDomainSettings != nil {
3251		ok := object.Key("subDomainSettings")
3252		if err := awsRestjson1_serializeDocumentSubDomainSettings(v.SubDomainSettings, ok); err != nil {
3253			return err
3254		}
3255	}
3256
3257	return nil
3258}
3259
3260type awsRestjson1_serializeOpUpdateWebhook struct {
3261}
3262
3263func (*awsRestjson1_serializeOpUpdateWebhook) ID() string {
3264	return "OperationSerializer"
3265}
3266
3267func (m *awsRestjson1_serializeOpUpdateWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3268	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3269) {
3270	request, ok := in.Request.(*smithyhttp.Request)
3271	if !ok {
3272		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3273	}
3274
3275	input, ok := in.Parameters.(*UpdateWebhookInput)
3276	_ = input
3277	if !ok {
3278		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3279	}
3280
3281	opPath, opQuery := httpbinding.SplitURI("/webhooks/{webhookId}")
3282	request.URL.Path = opPath
3283	if len(request.URL.RawQuery) > 0 {
3284		request.URL.RawQuery = "&" + opQuery
3285	} else {
3286		request.URL.RawQuery = opQuery
3287	}
3288
3289	request.Method = "POST"
3290	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3291	if err != nil {
3292		return out, metadata, &smithy.SerializationError{Err: err}
3293	}
3294
3295	if err := awsRestjson1_serializeOpHttpBindingsUpdateWebhookInput(input, restEncoder); err != nil {
3296		return out, metadata, &smithy.SerializationError{Err: err}
3297	}
3298
3299	restEncoder.SetHeader("Content-Type").String("application/json")
3300
3301	jsonEncoder := smithyjson.NewEncoder()
3302	if err := awsRestjson1_serializeOpDocumentUpdateWebhookInput(input, jsonEncoder.Value); err != nil {
3303		return out, metadata, &smithy.SerializationError{Err: err}
3304	}
3305
3306	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3307		return out, metadata, &smithy.SerializationError{Err: err}
3308	}
3309
3310	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3311		return out, metadata, &smithy.SerializationError{Err: err}
3312	}
3313	in.Request = request
3314
3315	return next.HandleSerialize(ctx, in)
3316}
3317func awsRestjson1_serializeOpHttpBindingsUpdateWebhookInput(v *UpdateWebhookInput, encoder *httpbinding.Encoder) error {
3318	if v == nil {
3319		return fmt.Errorf("unsupported serialization of nil %T", v)
3320	}
3321
3322	if v.WebhookId == nil || len(*v.WebhookId) == 0 {
3323		return &smithy.SerializationError{Err: fmt.Errorf("input member webhookId must not be empty")}
3324	}
3325	if v.WebhookId != nil {
3326		if err := encoder.SetURI("webhookId").String(*v.WebhookId); err != nil {
3327			return err
3328		}
3329	}
3330
3331	return nil
3332}
3333
3334func awsRestjson1_serializeOpDocumentUpdateWebhookInput(v *UpdateWebhookInput, value smithyjson.Value) error {
3335	object := value.Object()
3336	defer object.Close()
3337
3338	if v.BranchName != nil {
3339		ok := object.Key("branchName")
3340		ok.String(*v.BranchName)
3341	}
3342
3343	if v.Description != nil {
3344		ok := object.Key("description")
3345		ok.String(*v.Description)
3346	}
3347
3348	return nil
3349}
3350
3351func awsRestjson1_serializeDocumentAutoBranchCreationConfig(v *types.AutoBranchCreationConfig, value smithyjson.Value) error {
3352	object := value.Object()
3353	defer object.Close()
3354
3355	if v.BasicAuthCredentials != nil {
3356		ok := object.Key("basicAuthCredentials")
3357		ok.String(*v.BasicAuthCredentials)
3358	}
3359
3360	if v.BuildSpec != nil {
3361		ok := object.Key("buildSpec")
3362		ok.String(*v.BuildSpec)
3363	}
3364
3365	if v.EnableAutoBuild != nil {
3366		ok := object.Key("enableAutoBuild")
3367		ok.Boolean(*v.EnableAutoBuild)
3368	}
3369
3370	if v.EnableBasicAuth != nil {
3371		ok := object.Key("enableBasicAuth")
3372		ok.Boolean(*v.EnableBasicAuth)
3373	}
3374
3375	if v.EnablePerformanceMode != nil {
3376		ok := object.Key("enablePerformanceMode")
3377		ok.Boolean(*v.EnablePerformanceMode)
3378	}
3379
3380	if v.EnablePullRequestPreview != nil {
3381		ok := object.Key("enablePullRequestPreview")
3382		ok.Boolean(*v.EnablePullRequestPreview)
3383	}
3384
3385	if v.EnvironmentVariables != nil {
3386		ok := object.Key("environmentVariables")
3387		if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil {
3388			return err
3389		}
3390	}
3391
3392	if v.Framework != nil {
3393		ok := object.Key("framework")
3394		ok.String(*v.Framework)
3395	}
3396
3397	if v.PullRequestEnvironmentName != nil {
3398		ok := object.Key("pullRequestEnvironmentName")
3399		ok.String(*v.PullRequestEnvironmentName)
3400	}
3401
3402	if len(v.Stage) > 0 {
3403		ok := object.Key("stage")
3404		ok.String(string(v.Stage))
3405	}
3406
3407	return nil
3408}
3409
3410func awsRestjson1_serializeDocumentAutoBranchCreationPatterns(v []string, value smithyjson.Value) error {
3411	array := value.Array()
3412	defer array.Close()
3413
3414	for i := range v {
3415		av := array.Value()
3416		av.String(v[i])
3417	}
3418	return nil
3419}
3420
3421func awsRestjson1_serializeDocumentAutoSubDomainCreationPatterns(v []string, value smithyjson.Value) error {
3422	array := value.Array()
3423	defer array.Close()
3424
3425	for i := range v {
3426		av := array.Value()
3427		av.String(v[i])
3428	}
3429	return nil
3430}
3431
3432func awsRestjson1_serializeDocumentCustomRule(v *types.CustomRule, value smithyjson.Value) error {
3433	object := value.Object()
3434	defer object.Close()
3435
3436	if v.Condition != nil {
3437		ok := object.Key("condition")
3438		ok.String(*v.Condition)
3439	}
3440
3441	if v.Source != nil {
3442		ok := object.Key("source")
3443		ok.String(*v.Source)
3444	}
3445
3446	if v.Status != nil {
3447		ok := object.Key("status")
3448		ok.String(*v.Status)
3449	}
3450
3451	if v.Target != nil {
3452		ok := object.Key("target")
3453		ok.String(*v.Target)
3454	}
3455
3456	return nil
3457}
3458
3459func awsRestjson1_serializeDocumentCustomRules(v []types.CustomRule, value smithyjson.Value) error {
3460	array := value.Array()
3461	defer array.Close()
3462
3463	for i := range v {
3464		av := array.Value()
3465		if err := awsRestjson1_serializeDocumentCustomRule(&v[i], av); err != nil {
3466			return err
3467		}
3468	}
3469	return nil
3470}
3471
3472func awsRestjson1_serializeDocumentEnvironmentVariables(v map[string]string, value smithyjson.Value) error {
3473	object := value.Object()
3474	defer object.Close()
3475
3476	for key := range v {
3477		om := object.Key(key)
3478		om.String(v[key])
3479	}
3480	return nil
3481}
3482
3483func awsRestjson1_serializeDocumentFileMap(v map[string]string, value smithyjson.Value) error {
3484	object := value.Object()
3485	defer object.Close()
3486
3487	for key := range v {
3488		om := object.Key(key)
3489		om.String(v[key])
3490	}
3491	return nil
3492}
3493
3494func awsRestjson1_serializeDocumentSubDomainSetting(v *types.SubDomainSetting, value smithyjson.Value) error {
3495	object := value.Object()
3496	defer object.Close()
3497
3498	if v.BranchName != nil {
3499		ok := object.Key("branchName")
3500		ok.String(*v.BranchName)
3501	}
3502
3503	if v.Prefix != nil {
3504		ok := object.Key("prefix")
3505		ok.String(*v.Prefix)
3506	}
3507
3508	return nil
3509}
3510
3511func awsRestjson1_serializeDocumentSubDomainSettings(v []types.SubDomainSetting, value smithyjson.Value) error {
3512	array := value.Array()
3513	defer array.Close()
3514
3515	for i := range v {
3516		av := array.Value()
3517		if err := awsRestjson1_serializeDocumentSubDomainSetting(&v[i], av); err != nil {
3518			return err
3519		}
3520	}
3521	return nil
3522}
3523
3524func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error {
3525	object := value.Object()
3526	defer object.Close()
3527
3528	for key := range v {
3529		om := object.Key(key)
3530		om.String(v[key])
3531	}
3532	return nil
3533}
3534