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