1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package servicecatalogappregistry
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	smithy "github.com/aws/smithy-go"
10	"github.com/aws/smithy-go/encoding/httpbinding"
11	smithyjson "github.com/aws/smithy-go/encoding/json"
12	"github.com/aws/smithy-go/middleware"
13	smithyhttp "github.com/aws/smithy-go/transport/http"
14)
15
16type awsRestjson1_serializeOpAssociateAttributeGroup struct {
17}
18
19func (*awsRestjson1_serializeOpAssociateAttributeGroup) ID() string {
20	return "OperationSerializer"
21}
22
23func (m *awsRestjson1_serializeOpAssociateAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
24	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
25) {
26	request, ok := in.Request.(*smithyhttp.Request)
27	if !ok {
28		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
29	}
30
31	input, ok := in.Parameters.(*AssociateAttributeGroupInput)
32	_ = input
33	if !ok {
34		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
35	}
36
37	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/attribute-groups/{attributeGroup}")
38	request.URL.Path = opPath
39	if len(request.URL.RawQuery) > 0 {
40		request.URL.RawQuery = "&" + opQuery
41	} else {
42		request.URL.RawQuery = opQuery
43	}
44
45	request.Method = "PUT"
46	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
47	if err != nil {
48		return out, metadata, &smithy.SerializationError{Err: err}
49	}
50
51	if err := awsRestjson1_serializeOpHttpBindingsAssociateAttributeGroupInput(input, restEncoder); err != nil {
52		return out, metadata, &smithy.SerializationError{Err: err}
53	}
54
55	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
56		return out, metadata, &smithy.SerializationError{Err: err}
57	}
58	in.Request = request
59
60	return next.HandleSerialize(ctx, in)
61}
62func awsRestjson1_serializeOpHttpBindingsAssociateAttributeGroupInput(v *AssociateAttributeGroupInput, encoder *httpbinding.Encoder) error {
63	if v == nil {
64		return fmt.Errorf("unsupported serialization of nil %T", v)
65	}
66
67	if v.Application == nil || len(*v.Application) == 0 {
68		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
69	}
70	if v.Application != nil {
71		if err := encoder.SetURI("application").String(*v.Application); err != nil {
72			return err
73		}
74	}
75
76	if v.AttributeGroup == nil || len(*v.AttributeGroup) == 0 {
77		return &smithy.SerializationError{Err: fmt.Errorf("input member attributeGroup must not be empty")}
78	}
79	if v.AttributeGroup != nil {
80		if err := encoder.SetURI("attributeGroup").String(*v.AttributeGroup); err != nil {
81			return err
82		}
83	}
84
85	return nil
86}
87
88type awsRestjson1_serializeOpAssociateResource struct {
89}
90
91func (*awsRestjson1_serializeOpAssociateResource) ID() string {
92	return "OperationSerializer"
93}
94
95func (m *awsRestjson1_serializeOpAssociateResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
96	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
97) {
98	request, ok := in.Request.(*smithyhttp.Request)
99	if !ok {
100		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
101	}
102
103	input, ok := in.Parameters.(*AssociateResourceInput)
104	_ = input
105	if !ok {
106		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
107	}
108
109	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/resources/{resourceType}/{resource}")
110	request.URL.Path = opPath
111	if len(request.URL.RawQuery) > 0 {
112		request.URL.RawQuery = "&" + opQuery
113	} else {
114		request.URL.RawQuery = opQuery
115	}
116
117	request.Method = "PUT"
118	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
119	if err != nil {
120		return out, metadata, &smithy.SerializationError{Err: err}
121	}
122
123	if err := awsRestjson1_serializeOpHttpBindingsAssociateResourceInput(input, restEncoder); err != nil {
124		return out, metadata, &smithy.SerializationError{Err: err}
125	}
126
127	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
128		return out, metadata, &smithy.SerializationError{Err: err}
129	}
130	in.Request = request
131
132	return next.HandleSerialize(ctx, in)
133}
134func awsRestjson1_serializeOpHttpBindingsAssociateResourceInput(v *AssociateResourceInput, encoder *httpbinding.Encoder) error {
135	if v == nil {
136		return fmt.Errorf("unsupported serialization of nil %T", v)
137	}
138
139	if v.Application == nil || len(*v.Application) == 0 {
140		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
141	}
142	if v.Application != nil {
143		if err := encoder.SetURI("application").String(*v.Application); err != nil {
144			return err
145		}
146	}
147
148	if v.Resource == nil || len(*v.Resource) == 0 {
149		return &smithy.SerializationError{Err: fmt.Errorf("input member resource must not be empty")}
150	}
151	if v.Resource != nil {
152		if err := encoder.SetURI("resource").String(*v.Resource); err != nil {
153			return err
154		}
155	}
156
157	if len(v.ResourceType) == 0 {
158		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceType must not be empty")}
159	}
160	if len(v.ResourceType) > 0 {
161		if err := encoder.SetURI("resourceType").String(string(v.ResourceType)); err != nil {
162			return err
163		}
164	}
165
166	return nil
167}
168
169type awsRestjson1_serializeOpCreateApplication struct {
170}
171
172func (*awsRestjson1_serializeOpCreateApplication) ID() string {
173	return "OperationSerializer"
174}
175
176func (m *awsRestjson1_serializeOpCreateApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
177	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
178) {
179	request, ok := in.Request.(*smithyhttp.Request)
180	if !ok {
181		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
182	}
183
184	input, ok := in.Parameters.(*CreateApplicationInput)
185	_ = input
186	if !ok {
187		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
188	}
189
190	opPath, opQuery := httpbinding.SplitURI("/applications")
191	request.URL.Path = opPath
192	if len(request.URL.RawQuery) > 0 {
193		request.URL.RawQuery = "&" + opQuery
194	} else {
195		request.URL.RawQuery = opQuery
196	}
197
198	request.Method = "POST"
199	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
200	if err != nil {
201		return out, metadata, &smithy.SerializationError{Err: err}
202	}
203
204	restEncoder.SetHeader("Content-Type").String("application/json")
205
206	jsonEncoder := smithyjson.NewEncoder()
207	if err := awsRestjson1_serializeOpDocumentCreateApplicationInput(input, jsonEncoder.Value); err != nil {
208		return out, metadata, &smithy.SerializationError{Err: err}
209	}
210
211	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
212		return out, metadata, &smithy.SerializationError{Err: err}
213	}
214
215	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
216		return out, metadata, &smithy.SerializationError{Err: err}
217	}
218	in.Request = request
219
220	return next.HandleSerialize(ctx, in)
221}
222func awsRestjson1_serializeOpHttpBindingsCreateApplicationInput(v *CreateApplicationInput, encoder *httpbinding.Encoder) error {
223	if v == nil {
224		return fmt.Errorf("unsupported serialization of nil %T", v)
225	}
226
227	return nil
228}
229
230func awsRestjson1_serializeOpDocumentCreateApplicationInput(v *CreateApplicationInput, value smithyjson.Value) error {
231	object := value.Object()
232	defer object.Close()
233
234	if v.ClientToken != nil {
235		ok := object.Key("clientToken")
236		ok.String(*v.ClientToken)
237	}
238
239	if v.Description != nil {
240		ok := object.Key("description")
241		ok.String(*v.Description)
242	}
243
244	if v.Name != nil {
245		ok := object.Key("name")
246		ok.String(*v.Name)
247	}
248
249	if v.Tags != nil {
250		ok := object.Key("tags")
251		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
252			return err
253		}
254	}
255
256	return nil
257}
258
259type awsRestjson1_serializeOpCreateAttributeGroup struct {
260}
261
262func (*awsRestjson1_serializeOpCreateAttributeGroup) ID() string {
263	return "OperationSerializer"
264}
265
266func (m *awsRestjson1_serializeOpCreateAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
267	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
268) {
269	request, ok := in.Request.(*smithyhttp.Request)
270	if !ok {
271		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
272	}
273
274	input, ok := in.Parameters.(*CreateAttributeGroupInput)
275	_ = input
276	if !ok {
277		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
278	}
279
280	opPath, opQuery := httpbinding.SplitURI("/attribute-groups")
281	request.URL.Path = opPath
282	if len(request.URL.RawQuery) > 0 {
283		request.URL.RawQuery = "&" + opQuery
284	} else {
285		request.URL.RawQuery = opQuery
286	}
287
288	request.Method = "POST"
289	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
290	if err != nil {
291		return out, metadata, &smithy.SerializationError{Err: err}
292	}
293
294	restEncoder.SetHeader("Content-Type").String("application/json")
295
296	jsonEncoder := smithyjson.NewEncoder()
297	if err := awsRestjson1_serializeOpDocumentCreateAttributeGroupInput(input, jsonEncoder.Value); err != nil {
298		return out, metadata, &smithy.SerializationError{Err: err}
299	}
300
301	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
302		return out, metadata, &smithy.SerializationError{Err: err}
303	}
304
305	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
306		return out, metadata, &smithy.SerializationError{Err: err}
307	}
308	in.Request = request
309
310	return next.HandleSerialize(ctx, in)
311}
312func awsRestjson1_serializeOpHttpBindingsCreateAttributeGroupInput(v *CreateAttributeGroupInput, encoder *httpbinding.Encoder) error {
313	if v == nil {
314		return fmt.Errorf("unsupported serialization of nil %T", v)
315	}
316
317	return nil
318}
319
320func awsRestjson1_serializeOpDocumentCreateAttributeGroupInput(v *CreateAttributeGroupInput, value smithyjson.Value) error {
321	object := value.Object()
322	defer object.Close()
323
324	if v.Attributes != nil {
325		ok := object.Key("attributes")
326		ok.String(*v.Attributes)
327	}
328
329	if v.ClientToken != nil {
330		ok := object.Key("clientToken")
331		ok.String(*v.ClientToken)
332	}
333
334	if v.Description != nil {
335		ok := object.Key("description")
336		ok.String(*v.Description)
337	}
338
339	if v.Name != nil {
340		ok := object.Key("name")
341		ok.String(*v.Name)
342	}
343
344	if v.Tags != nil {
345		ok := object.Key("tags")
346		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
347			return err
348		}
349	}
350
351	return nil
352}
353
354type awsRestjson1_serializeOpDeleteApplication struct {
355}
356
357func (*awsRestjson1_serializeOpDeleteApplication) ID() string {
358	return "OperationSerializer"
359}
360
361func (m *awsRestjson1_serializeOpDeleteApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
362	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
363) {
364	request, ok := in.Request.(*smithyhttp.Request)
365	if !ok {
366		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
367	}
368
369	input, ok := in.Parameters.(*DeleteApplicationInput)
370	_ = input
371	if !ok {
372		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
373	}
374
375	opPath, opQuery := httpbinding.SplitURI("/applications/{application}")
376	request.URL.Path = opPath
377	if len(request.URL.RawQuery) > 0 {
378		request.URL.RawQuery = "&" + opQuery
379	} else {
380		request.URL.RawQuery = opQuery
381	}
382
383	request.Method = "DELETE"
384	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
385	if err != nil {
386		return out, metadata, &smithy.SerializationError{Err: err}
387	}
388
389	if err := awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(input, restEncoder); err != nil {
390		return out, metadata, &smithy.SerializationError{Err: err}
391	}
392
393	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
394		return out, metadata, &smithy.SerializationError{Err: err}
395	}
396	in.Request = request
397
398	return next.HandleSerialize(ctx, in)
399}
400func awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(v *DeleteApplicationInput, encoder *httpbinding.Encoder) error {
401	if v == nil {
402		return fmt.Errorf("unsupported serialization of nil %T", v)
403	}
404
405	if v.Application == nil || len(*v.Application) == 0 {
406		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
407	}
408	if v.Application != nil {
409		if err := encoder.SetURI("application").String(*v.Application); err != nil {
410			return err
411		}
412	}
413
414	return nil
415}
416
417type awsRestjson1_serializeOpDeleteAttributeGroup struct {
418}
419
420func (*awsRestjson1_serializeOpDeleteAttributeGroup) ID() string {
421	return "OperationSerializer"
422}
423
424func (m *awsRestjson1_serializeOpDeleteAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
425	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
426) {
427	request, ok := in.Request.(*smithyhttp.Request)
428	if !ok {
429		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
430	}
431
432	input, ok := in.Parameters.(*DeleteAttributeGroupInput)
433	_ = input
434	if !ok {
435		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
436	}
437
438	opPath, opQuery := httpbinding.SplitURI("/attribute-groups/{attributeGroup}")
439	request.URL.Path = opPath
440	if len(request.URL.RawQuery) > 0 {
441		request.URL.RawQuery = "&" + opQuery
442	} else {
443		request.URL.RawQuery = opQuery
444	}
445
446	request.Method = "DELETE"
447	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
448	if err != nil {
449		return out, metadata, &smithy.SerializationError{Err: err}
450	}
451
452	if err := awsRestjson1_serializeOpHttpBindingsDeleteAttributeGroupInput(input, restEncoder); err != nil {
453		return out, metadata, &smithy.SerializationError{Err: err}
454	}
455
456	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
457		return out, metadata, &smithy.SerializationError{Err: err}
458	}
459	in.Request = request
460
461	return next.HandleSerialize(ctx, in)
462}
463func awsRestjson1_serializeOpHttpBindingsDeleteAttributeGroupInput(v *DeleteAttributeGroupInput, encoder *httpbinding.Encoder) error {
464	if v == nil {
465		return fmt.Errorf("unsupported serialization of nil %T", v)
466	}
467
468	if v.AttributeGroup == nil || len(*v.AttributeGroup) == 0 {
469		return &smithy.SerializationError{Err: fmt.Errorf("input member attributeGroup must not be empty")}
470	}
471	if v.AttributeGroup != nil {
472		if err := encoder.SetURI("attributeGroup").String(*v.AttributeGroup); err != nil {
473			return err
474		}
475	}
476
477	return nil
478}
479
480type awsRestjson1_serializeOpDisassociateAttributeGroup struct {
481}
482
483func (*awsRestjson1_serializeOpDisassociateAttributeGroup) ID() string {
484	return "OperationSerializer"
485}
486
487func (m *awsRestjson1_serializeOpDisassociateAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
488	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
489) {
490	request, ok := in.Request.(*smithyhttp.Request)
491	if !ok {
492		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
493	}
494
495	input, ok := in.Parameters.(*DisassociateAttributeGroupInput)
496	_ = input
497	if !ok {
498		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
499	}
500
501	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/attribute-groups/{attributeGroup}")
502	request.URL.Path = opPath
503	if len(request.URL.RawQuery) > 0 {
504		request.URL.RawQuery = "&" + opQuery
505	} else {
506		request.URL.RawQuery = opQuery
507	}
508
509	request.Method = "DELETE"
510	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
511	if err != nil {
512		return out, metadata, &smithy.SerializationError{Err: err}
513	}
514
515	if err := awsRestjson1_serializeOpHttpBindingsDisassociateAttributeGroupInput(input, restEncoder); err != nil {
516		return out, metadata, &smithy.SerializationError{Err: err}
517	}
518
519	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
520		return out, metadata, &smithy.SerializationError{Err: err}
521	}
522	in.Request = request
523
524	return next.HandleSerialize(ctx, in)
525}
526func awsRestjson1_serializeOpHttpBindingsDisassociateAttributeGroupInput(v *DisassociateAttributeGroupInput, encoder *httpbinding.Encoder) error {
527	if v == nil {
528		return fmt.Errorf("unsupported serialization of nil %T", v)
529	}
530
531	if v.Application == nil || len(*v.Application) == 0 {
532		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
533	}
534	if v.Application != nil {
535		if err := encoder.SetURI("application").String(*v.Application); err != nil {
536			return err
537		}
538	}
539
540	if v.AttributeGroup == nil || len(*v.AttributeGroup) == 0 {
541		return &smithy.SerializationError{Err: fmt.Errorf("input member attributeGroup must not be empty")}
542	}
543	if v.AttributeGroup != nil {
544		if err := encoder.SetURI("attributeGroup").String(*v.AttributeGroup); err != nil {
545			return err
546		}
547	}
548
549	return nil
550}
551
552type awsRestjson1_serializeOpDisassociateResource struct {
553}
554
555func (*awsRestjson1_serializeOpDisassociateResource) ID() string {
556	return "OperationSerializer"
557}
558
559func (m *awsRestjson1_serializeOpDisassociateResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
560	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
561) {
562	request, ok := in.Request.(*smithyhttp.Request)
563	if !ok {
564		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
565	}
566
567	input, ok := in.Parameters.(*DisassociateResourceInput)
568	_ = input
569	if !ok {
570		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
571	}
572
573	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/resources/{resourceType}/{resource}")
574	request.URL.Path = opPath
575	if len(request.URL.RawQuery) > 0 {
576		request.URL.RawQuery = "&" + opQuery
577	} else {
578		request.URL.RawQuery = opQuery
579	}
580
581	request.Method = "DELETE"
582	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
583	if err != nil {
584		return out, metadata, &smithy.SerializationError{Err: err}
585	}
586
587	if err := awsRestjson1_serializeOpHttpBindingsDisassociateResourceInput(input, restEncoder); err != nil {
588		return out, metadata, &smithy.SerializationError{Err: err}
589	}
590
591	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
592		return out, metadata, &smithy.SerializationError{Err: err}
593	}
594	in.Request = request
595
596	return next.HandleSerialize(ctx, in)
597}
598func awsRestjson1_serializeOpHttpBindingsDisassociateResourceInput(v *DisassociateResourceInput, encoder *httpbinding.Encoder) error {
599	if v == nil {
600		return fmt.Errorf("unsupported serialization of nil %T", v)
601	}
602
603	if v.Application == nil || len(*v.Application) == 0 {
604		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
605	}
606	if v.Application != nil {
607		if err := encoder.SetURI("application").String(*v.Application); err != nil {
608			return err
609		}
610	}
611
612	if v.Resource == nil || len(*v.Resource) == 0 {
613		return &smithy.SerializationError{Err: fmt.Errorf("input member resource must not be empty")}
614	}
615	if v.Resource != nil {
616		if err := encoder.SetURI("resource").String(*v.Resource); err != nil {
617			return err
618		}
619	}
620
621	if len(v.ResourceType) == 0 {
622		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceType must not be empty")}
623	}
624	if len(v.ResourceType) > 0 {
625		if err := encoder.SetURI("resourceType").String(string(v.ResourceType)); err != nil {
626			return err
627		}
628	}
629
630	return nil
631}
632
633type awsRestjson1_serializeOpGetApplication struct {
634}
635
636func (*awsRestjson1_serializeOpGetApplication) ID() string {
637	return "OperationSerializer"
638}
639
640func (m *awsRestjson1_serializeOpGetApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
641	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
642) {
643	request, ok := in.Request.(*smithyhttp.Request)
644	if !ok {
645		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
646	}
647
648	input, ok := in.Parameters.(*GetApplicationInput)
649	_ = input
650	if !ok {
651		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
652	}
653
654	opPath, opQuery := httpbinding.SplitURI("/applications/{application}")
655	request.URL.Path = opPath
656	if len(request.URL.RawQuery) > 0 {
657		request.URL.RawQuery = "&" + opQuery
658	} else {
659		request.URL.RawQuery = opQuery
660	}
661
662	request.Method = "GET"
663	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
664	if err != nil {
665		return out, metadata, &smithy.SerializationError{Err: err}
666	}
667
668	if err := awsRestjson1_serializeOpHttpBindingsGetApplicationInput(input, restEncoder); err != nil {
669		return out, metadata, &smithy.SerializationError{Err: err}
670	}
671
672	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
673		return out, metadata, &smithy.SerializationError{Err: err}
674	}
675	in.Request = request
676
677	return next.HandleSerialize(ctx, in)
678}
679func awsRestjson1_serializeOpHttpBindingsGetApplicationInput(v *GetApplicationInput, encoder *httpbinding.Encoder) error {
680	if v == nil {
681		return fmt.Errorf("unsupported serialization of nil %T", v)
682	}
683
684	if v.Application == nil || len(*v.Application) == 0 {
685		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
686	}
687	if v.Application != nil {
688		if err := encoder.SetURI("application").String(*v.Application); err != nil {
689			return err
690		}
691	}
692
693	return nil
694}
695
696type awsRestjson1_serializeOpGetAttributeGroup struct {
697}
698
699func (*awsRestjson1_serializeOpGetAttributeGroup) ID() string {
700	return "OperationSerializer"
701}
702
703func (m *awsRestjson1_serializeOpGetAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
704	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
705) {
706	request, ok := in.Request.(*smithyhttp.Request)
707	if !ok {
708		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
709	}
710
711	input, ok := in.Parameters.(*GetAttributeGroupInput)
712	_ = input
713	if !ok {
714		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
715	}
716
717	opPath, opQuery := httpbinding.SplitURI("/attribute-groups/{attributeGroup}")
718	request.URL.Path = opPath
719	if len(request.URL.RawQuery) > 0 {
720		request.URL.RawQuery = "&" + opQuery
721	} else {
722		request.URL.RawQuery = opQuery
723	}
724
725	request.Method = "GET"
726	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
727	if err != nil {
728		return out, metadata, &smithy.SerializationError{Err: err}
729	}
730
731	if err := awsRestjson1_serializeOpHttpBindingsGetAttributeGroupInput(input, restEncoder); err != nil {
732		return out, metadata, &smithy.SerializationError{Err: err}
733	}
734
735	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
736		return out, metadata, &smithy.SerializationError{Err: err}
737	}
738	in.Request = request
739
740	return next.HandleSerialize(ctx, in)
741}
742func awsRestjson1_serializeOpHttpBindingsGetAttributeGroupInput(v *GetAttributeGroupInput, encoder *httpbinding.Encoder) error {
743	if v == nil {
744		return fmt.Errorf("unsupported serialization of nil %T", v)
745	}
746
747	if v.AttributeGroup == nil || len(*v.AttributeGroup) == 0 {
748		return &smithy.SerializationError{Err: fmt.Errorf("input member attributeGroup must not be empty")}
749	}
750	if v.AttributeGroup != nil {
751		if err := encoder.SetURI("attributeGroup").String(*v.AttributeGroup); err != nil {
752			return err
753		}
754	}
755
756	return nil
757}
758
759type awsRestjson1_serializeOpListApplications struct {
760}
761
762func (*awsRestjson1_serializeOpListApplications) ID() string {
763	return "OperationSerializer"
764}
765
766func (m *awsRestjson1_serializeOpListApplications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
767	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
768) {
769	request, ok := in.Request.(*smithyhttp.Request)
770	if !ok {
771		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
772	}
773
774	input, ok := in.Parameters.(*ListApplicationsInput)
775	_ = input
776	if !ok {
777		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
778	}
779
780	opPath, opQuery := httpbinding.SplitURI("/applications")
781	request.URL.Path = opPath
782	if len(request.URL.RawQuery) > 0 {
783		request.URL.RawQuery = "&" + opQuery
784	} else {
785		request.URL.RawQuery = opQuery
786	}
787
788	request.Method = "GET"
789	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
790	if err != nil {
791		return out, metadata, &smithy.SerializationError{Err: err}
792	}
793
794	if err := awsRestjson1_serializeOpHttpBindingsListApplicationsInput(input, restEncoder); err != nil {
795		return out, metadata, &smithy.SerializationError{Err: err}
796	}
797
798	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
799		return out, metadata, &smithy.SerializationError{Err: err}
800	}
801	in.Request = request
802
803	return next.HandleSerialize(ctx, in)
804}
805func awsRestjson1_serializeOpHttpBindingsListApplicationsInput(v *ListApplicationsInput, encoder *httpbinding.Encoder) error {
806	if v == nil {
807		return fmt.Errorf("unsupported serialization of nil %T", v)
808	}
809
810	if v.MaxResults != 0 {
811		encoder.SetQuery("maxResults").Integer(v.MaxResults)
812	}
813
814	if v.NextToken != nil {
815		encoder.SetQuery("nextToken").String(*v.NextToken)
816	}
817
818	return nil
819}
820
821type awsRestjson1_serializeOpListAssociatedAttributeGroups struct {
822}
823
824func (*awsRestjson1_serializeOpListAssociatedAttributeGroups) ID() string {
825	return "OperationSerializer"
826}
827
828func (m *awsRestjson1_serializeOpListAssociatedAttributeGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
829	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
830) {
831	request, ok := in.Request.(*smithyhttp.Request)
832	if !ok {
833		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
834	}
835
836	input, ok := in.Parameters.(*ListAssociatedAttributeGroupsInput)
837	_ = input
838	if !ok {
839		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
840	}
841
842	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/attribute-groups")
843	request.URL.Path = opPath
844	if len(request.URL.RawQuery) > 0 {
845		request.URL.RawQuery = "&" + opQuery
846	} else {
847		request.URL.RawQuery = opQuery
848	}
849
850	request.Method = "GET"
851	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
852	if err != nil {
853		return out, metadata, &smithy.SerializationError{Err: err}
854	}
855
856	if err := awsRestjson1_serializeOpHttpBindingsListAssociatedAttributeGroupsInput(input, restEncoder); err != nil {
857		return out, metadata, &smithy.SerializationError{Err: err}
858	}
859
860	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
861		return out, metadata, &smithy.SerializationError{Err: err}
862	}
863	in.Request = request
864
865	return next.HandleSerialize(ctx, in)
866}
867func awsRestjson1_serializeOpHttpBindingsListAssociatedAttributeGroupsInput(v *ListAssociatedAttributeGroupsInput, encoder *httpbinding.Encoder) error {
868	if v == nil {
869		return fmt.Errorf("unsupported serialization of nil %T", v)
870	}
871
872	if v.Application == nil || len(*v.Application) == 0 {
873		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
874	}
875	if v.Application != nil {
876		if err := encoder.SetURI("application").String(*v.Application); err != nil {
877			return err
878		}
879	}
880
881	if v.MaxResults != 0 {
882		encoder.SetQuery("maxResults").Integer(v.MaxResults)
883	}
884
885	if v.NextToken != nil {
886		encoder.SetQuery("nextToken").String(*v.NextToken)
887	}
888
889	return nil
890}
891
892type awsRestjson1_serializeOpListAssociatedResources struct {
893}
894
895func (*awsRestjson1_serializeOpListAssociatedResources) ID() string {
896	return "OperationSerializer"
897}
898
899func (m *awsRestjson1_serializeOpListAssociatedResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
900	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
901) {
902	request, ok := in.Request.(*smithyhttp.Request)
903	if !ok {
904		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
905	}
906
907	input, ok := in.Parameters.(*ListAssociatedResourcesInput)
908	_ = input
909	if !ok {
910		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
911	}
912
913	opPath, opQuery := httpbinding.SplitURI("/applications/{application}/resources")
914	request.URL.Path = opPath
915	if len(request.URL.RawQuery) > 0 {
916		request.URL.RawQuery = "&" + opQuery
917	} else {
918		request.URL.RawQuery = opQuery
919	}
920
921	request.Method = "GET"
922	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
923	if err != nil {
924		return out, metadata, &smithy.SerializationError{Err: err}
925	}
926
927	if err := awsRestjson1_serializeOpHttpBindingsListAssociatedResourcesInput(input, restEncoder); err != nil {
928		return out, metadata, &smithy.SerializationError{Err: err}
929	}
930
931	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
932		return out, metadata, &smithy.SerializationError{Err: err}
933	}
934	in.Request = request
935
936	return next.HandleSerialize(ctx, in)
937}
938func awsRestjson1_serializeOpHttpBindingsListAssociatedResourcesInput(v *ListAssociatedResourcesInput, encoder *httpbinding.Encoder) error {
939	if v == nil {
940		return fmt.Errorf("unsupported serialization of nil %T", v)
941	}
942
943	if v.Application == nil || len(*v.Application) == 0 {
944		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
945	}
946	if v.Application != nil {
947		if err := encoder.SetURI("application").String(*v.Application); err != nil {
948			return err
949		}
950	}
951
952	if v.MaxResults != 0 {
953		encoder.SetQuery("maxResults").Integer(v.MaxResults)
954	}
955
956	if v.NextToken != nil {
957		encoder.SetQuery("nextToken").String(*v.NextToken)
958	}
959
960	return nil
961}
962
963type awsRestjson1_serializeOpListAttributeGroups struct {
964}
965
966func (*awsRestjson1_serializeOpListAttributeGroups) ID() string {
967	return "OperationSerializer"
968}
969
970func (m *awsRestjson1_serializeOpListAttributeGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
971	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
972) {
973	request, ok := in.Request.(*smithyhttp.Request)
974	if !ok {
975		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
976	}
977
978	input, ok := in.Parameters.(*ListAttributeGroupsInput)
979	_ = input
980	if !ok {
981		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
982	}
983
984	opPath, opQuery := httpbinding.SplitURI("/attribute-groups")
985	request.URL.Path = opPath
986	if len(request.URL.RawQuery) > 0 {
987		request.URL.RawQuery = "&" + opQuery
988	} else {
989		request.URL.RawQuery = opQuery
990	}
991
992	request.Method = "GET"
993	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
994	if err != nil {
995		return out, metadata, &smithy.SerializationError{Err: err}
996	}
997
998	if err := awsRestjson1_serializeOpHttpBindingsListAttributeGroupsInput(input, restEncoder); err != nil {
999		return out, metadata, &smithy.SerializationError{Err: err}
1000	}
1001
1002	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1003		return out, metadata, &smithy.SerializationError{Err: err}
1004	}
1005	in.Request = request
1006
1007	return next.HandleSerialize(ctx, in)
1008}
1009func awsRestjson1_serializeOpHttpBindingsListAttributeGroupsInput(v *ListAttributeGroupsInput, encoder *httpbinding.Encoder) error {
1010	if v == nil {
1011		return fmt.Errorf("unsupported serialization of nil %T", v)
1012	}
1013
1014	if v.MaxResults != 0 {
1015		encoder.SetQuery("maxResults").Integer(v.MaxResults)
1016	}
1017
1018	if v.NextToken != nil {
1019		encoder.SetQuery("nextToken").String(*v.NextToken)
1020	}
1021
1022	return nil
1023}
1024
1025type awsRestjson1_serializeOpListTagsForResource struct {
1026}
1027
1028func (*awsRestjson1_serializeOpListTagsForResource) ID() string {
1029	return "OperationSerializer"
1030}
1031
1032func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1033	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1034) {
1035	request, ok := in.Request.(*smithyhttp.Request)
1036	if !ok {
1037		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1038	}
1039
1040	input, ok := in.Parameters.(*ListTagsForResourceInput)
1041	_ = input
1042	if !ok {
1043		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1044	}
1045
1046	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
1047	request.URL.Path = opPath
1048	if len(request.URL.RawQuery) > 0 {
1049		request.URL.RawQuery = "&" + opQuery
1050	} else {
1051		request.URL.RawQuery = opQuery
1052	}
1053
1054	request.Method = "GET"
1055	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1056	if err != nil {
1057		return out, metadata, &smithy.SerializationError{Err: err}
1058	}
1059
1060	if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
1061		return out, metadata, &smithy.SerializationError{Err: err}
1062	}
1063
1064	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1065		return out, metadata, &smithy.SerializationError{Err: err}
1066	}
1067	in.Request = request
1068
1069	return next.HandleSerialize(ctx, in)
1070}
1071func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
1072	if v == nil {
1073		return fmt.Errorf("unsupported serialization of nil %T", v)
1074	}
1075
1076	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
1077		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
1078	}
1079	if v.ResourceArn != nil {
1080		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
1081			return err
1082		}
1083	}
1084
1085	return nil
1086}
1087
1088type awsRestjson1_serializeOpSyncResource struct {
1089}
1090
1091func (*awsRestjson1_serializeOpSyncResource) ID() string {
1092	return "OperationSerializer"
1093}
1094
1095func (m *awsRestjson1_serializeOpSyncResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1096	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1097) {
1098	request, ok := in.Request.(*smithyhttp.Request)
1099	if !ok {
1100		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1101	}
1102
1103	input, ok := in.Parameters.(*SyncResourceInput)
1104	_ = input
1105	if !ok {
1106		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1107	}
1108
1109	opPath, opQuery := httpbinding.SplitURI("/sync/{resourceType}/{resource}")
1110	request.URL.Path = opPath
1111	if len(request.URL.RawQuery) > 0 {
1112		request.URL.RawQuery = "&" + opQuery
1113	} else {
1114		request.URL.RawQuery = opQuery
1115	}
1116
1117	request.Method = "POST"
1118	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1119	if err != nil {
1120		return out, metadata, &smithy.SerializationError{Err: err}
1121	}
1122
1123	if err := awsRestjson1_serializeOpHttpBindingsSyncResourceInput(input, restEncoder); err != nil {
1124		return out, metadata, &smithy.SerializationError{Err: err}
1125	}
1126
1127	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1128		return out, metadata, &smithy.SerializationError{Err: err}
1129	}
1130	in.Request = request
1131
1132	return next.HandleSerialize(ctx, in)
1133}
1134func awsRestjson1_serializeOpHttpBindingsSyncResourceInput(v *SyncResourceInput, encoder *httpbinding.Encoder) error {
1135	if v == nil {
1136		return fmt.Errorf("unsupported serialization of nil %T", v)
1137	}
1138
1139	if v.Resource == nil || len(*v.Resource) == 0 {
1140		return &smithy.SerializationError{Err: fmt.Errorf("input member resource must not be empty")}
1141	}
1142	if v.Resource != nil {
1143		if err := encoder.SetURI("resource").String(*v.Resource); err != nil {
1144			return err
1145		}
1146	}
1147
1148	if len(v.ResourceType) == 0 {
1149		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceType must not be empty")}
1150	}
1151	if len(v.ResourceType) > 0 {
1152		if err := encoder.SetURI("resourceType").String(string(v.ResourceType)); err != nil {
1153			return err
1154		}
1155	}
1156
1157	return nil
1158}
1159
1160type awsRestjson1_serializeOpTagResource struct {
1161}
1162
1163func (*awsRestjson1_serializeOpTagResource) ID() string {
1164	return "OperationSerializer"
1165}
1166
1167func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1168	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1169) {
1170	request, ok := in.Request.(*smithyhttp.Request)
1171	if !ok {
1172		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1173	}
1174
1175	input, ok := in.Parameters.(*TagResourceInput)
1176	_ = input
1177	if !ok {
1178		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1179	}
1180
1181	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
1182	request.URL.Path = opPath
1183	if len(request.URL.RawQuery) > 0 {
1184		request.URL.RawQuery = "&" + opQuery
1185	} else {
1186		request.URL.RawQuery = opQuery
1187	}
1188
1189	request.Method = "POST"
1190	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1191	if err != nil {
1192		return out, metadata, &smithy.SerializationError{Err: err}
1193	}
1194
1195	if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
1196		return out, metadata, &smithy.SerializationError{Err: err}
1197	}
1198
1199	restEncoder.SetHeader("Content-Type").String("application/json")
1200
1201	jsonEncoder := smithyjson.NewEncoder()
1202	if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
1203		return out, metadata, &smithy.SerializationError{Err: err}
1204	}
1205
1206	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1207		return out, metadata, &smithy.SerializationError{Err: err}
1208	}
1209
1210	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1211		return out, metadata, &smithy.SerializationError{Err: err}
1212	}
1213	in.Request = request
1214
1215	return next.HandleSerialize(ctx, in)
1216}
1217func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
1218	if v == nil {
1219		return fmt.Errorf("unsupported serialization of nil %T", v)
1220	}
1221
1222	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
1223		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
1224	}
1225	if v.ResourceArn != nil {
1226		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
1227			return err
1228		}
1229	}
1230
1231	return nil
1232}
1233
1234func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
1235	object := value.Object()
1236	defer object.Close()
1237
1238	if v.Tags != nil {
1239		ok := object.Key("tags")
1240		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
1241			return err
1242		}
1243	}
1244
1245	return nil
1246}
1247
1248type awsRestjson1_serializeOpUntagResource struct {
1249}
1250
1251func (*awsRestjson1_serializeOpUntagResource) ID() string {
1252	return "OperationSerializer"
1253}
1254
1255func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1256	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1257) {
1258	request, ok := in.Request.(*smithyhttp.Request)
1259	if !ok {
1260		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1261	}
1262
1263	input, ok := in.Parameters.(*UntagResourceInput)
1264	_ = input
1265	if !ok {
1266		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1267	}
1268
1269	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}")
1270	request.URL.Path = opPath
1271	if len(request.URL.RawQuery) > 0 {
1272		request.URL.RawQuery = "&" + opQuery
1273	} else {
1274		request.URL.RawQuery = opQuery
1275	}
1276
1277	request.Method = "DELETE"
1278	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1279	if err != nil {
1280		return out, metadata, &smithy.SerializationError{Err: err}
1281	}
1282
1283	if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
1284		return out, metadata, &smithy.SerializationError{Err: err}
1285	}
1286
1287	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1288		return out, metadata, &smithy.SerializationError{Err: err}
1289	}
1290	in.Request = request
1291
1292	return next.HandleSerialize(ctx, in)
1293}
1294func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
1295	if v == nil {
1296		return fmt.Errorf("unsupported serialization of nil %T", v)
1297	}
1298
1299	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
1300		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")}
1301	}
1302	if v.ResourceArn != nil {
1303		if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil {
1304			return err
1305		}
1306	}
1307
1308	if v.TagKeys != nil {
1309		for i := range v.TagKeys {
1310			encoder.AddQuery("tagKeys").String(v.TagKeys[i])
1311		}
1312	}
1313
1314	return nil
1315}
1316
1317type awsRestjson1_serializeOpUpdateApplication struct {
1318}
1319
1320func (*awsRestjson1_serializeOpUpdateApplication) ID() string {
1321	return "OperationSerializer"
1322}
1323
1324func (m *awsRestjson1_serializeOpUpdateApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1325	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1326) {
1327	request, ok := in.Request.(*smithyhttp.Request)
1328	if !ok {
1329		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1330	}
1331
1332	input, ok := in.Parameters.(*UpdateApplicationInput)
1333	_ = input
1334	if !ok {
1335		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1336	}
1337
1338	opPath, opQuery := httpbinding.SplitURI("/applications/{application}")
1339	request.URL.Path = opPath
1340	if len(request.URL.RawQuery) > 0 {
1341		request.URL.RawQuery = "&" + opQuery
1342	} else {
1343		request.URL.RawQuery = opQuery
1344	}
1345
1346	request.Method = "PATCH"
1347	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1348	if err != nil {
1349		return out, metadata, &smithy.SerializationError{Err: err}
1350	}
1351
1352	if err := awsRestjson1_serializeOpHttpBindingsUpdateApplicationInput(input, restEncoder); err != nil {
1353		return out, metadata, &smithy.SerializationError{Err: err}
1354	}
1355
1356	restEncoder.SetHeader("Content-Type").String("application/json")
1357
1358	jsonEncoder := smithyjson.NewEncoder()
1359	if err := awsRestjson1_serializeOpDocumentUpdateApplicationInput(input, jsonEncoder.Value); err != nil {
1360		return out, metadata, &smithy.SerializationError{Err: err}
1361	}
1362
1363	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1364		return out, metadata, &smithy.SerializationError{Err: err}
1365	}
1366
1367	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1368		return out, metadata, &smithy.SerializationError{Err: err}
1369	}
1370	in.Request = request
1371
1372	return next.HandleSerialize(ctx, in)
1373}
1374func awsRestjson1_serializeOpHttpBindingsUpdateApplicationInput(v *UpdateApplicationInput, encoder *httpbinding.Encoder) error {
1375	if v == nil {
1376		return fmt.Errorf("unsupported serialization of nil %T", v)
1377	}
1378
1379	if v.Application == nil || len(*v.Application) == 0 {
1380		return &smithy.SerializationError{Err: fmt.Errorf("input member application must not be empty")}
1381	}
1382	if v.Application != nil {
1383		if err := encoder.SetURI("application").String(*v.Application); err != nil {
1384			return err
1385		}
1386	}
1387
1388	return nil
1389}
1390
1391func awsRestjson1_serializeOpDocumentUpdateApplicationInput(v *UpdateApplicationInput, value smithyjson.Value) error {
1392	object := value.Object()
1393	defer object.Close()
1394
1395	if v.Description != nil {
1396		ok := object.Key("description")
1397		ok.String(*v.Description)
1398	}
1399
1400	if v.Name != nil {
1401		ok := object.Key("name")
1402		ok.String(*v.Name)
1403	}
1404
1405	return nil
1406}
1407
1408type awsRestjson1_serializeOpUpdateAttributeGroup struct {
1409}
1410
1411func (*awsRestjson1_serializeOpUpdateAttributeGroup) ID() string {
1412	return "OperationSerializer"
1413}
1414
1415func (m *awsRestjson1_serializeOpUpdateAttributeGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1416	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1417) {
1418	request, ok := in.Request.(*smithyhttp.Request)
1419	if !ok {
1420		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1421	}
1422
1423	input, ok := in.Parameters.(*UpdateAttributeGroupInput)
1424	_ = input
1425	if !ok {
1426		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1427	}
1428
1429	opPath, opQuery := httpbinding.SplitURI("/attribute-groups/{attributeGroup}")
1430	request.URL.Path = opPath
1431	if len(request.URL.RawQuery) > 0 {
1432		request.URL.RawQuery = "&" + opQuery
1433	} else {
1434		request.URL.RawQuery = opQuery
1435	}
1436
1437	request.Method = "PATCH"
1438	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1439	if err != nil {
1440		return out, metadata, &smithy.SerializationError{Err: err}
1441	}
1442
1443	if err := awsRestjson1_serializeOpHttpBindingsUpdateAttributeGroupInput(input, restEncoder); err != nil {
1444		return out, metadata, &smithy.SerializationError{Err: err}
1445	}
1446
1447	restEncoder.SetHeader("Content-Type").String("application/json")
1448
1449	jsonEncoder := smithyjson.NewEncoder()
1450	if err := awsRestjson1_serializeOpDocumentUpdateAttributeGroupInput(input, jsonEncoder.Value); err != nil {
1451		return out, metadata, &smithy.SerializationError{Err: err}
1452	}
1453
1454	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1455		return out, metadata, &smithy.SerializationError{Err: err}
1456	}
1457
1458	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1459		return out, metadata, &smithy.SerializationError{Err: err}
1460	}
1461	in.Request = request
1462
1463	return next.HandleSerialize(ctx, in)
1464}
1465func awsRestjson1_serializeOpHttpBindingsUpdateAttributeGroupInput(v *UpdateAttributeGroupInput, encoder *httpbinding.Encoder) error {
1466	if v == nil {
1467		return fmt.Errorf("unsupported serialization of nil %T", v)
1468	}
1469
1470	if v.AttributeGroup == nil || len(*v.AttributeGroup) == 0 {
1471		return &smithy.SerializationError{Err: fmt.Errorf("input member attributeGroup must not be empty")}
1472	}
1473	if v.AttributeGroup != nil {
1474		if err := encoder.SetURI("attributeGroup").String(*v.AttributeGroup); err != nil {
1475			return err
1476		}
1477	}
1478
1479	return nil
1480}
1481
1482func awsRestjson1_serializeOpDocumentUpdateAttributeGroupInput(v *UpdateAttributeGroupInput, value smithyjson.Value) error {
1483	object := value.Object()
1484	defer object.Close()
1485
1486	if v.Attributes != nil {
1487		ok := object.Key("attributes")
1488		ok.String(*v.Attributes)
1489	}
1490
1491	if v.Description != nil {
1492		ok := object.Key("description")
1493		ok.String(*v.Description)
1494	}
1495
1496	if v.Name != nil {
1497		ok := object.Key("name")
1498		ok.String(*v.Name)
1499	}
1500
1501	return nil
1502}
1503
1504func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error {
1505	object := value.Object()
1506	defer object.Close()
1507
1508	for key := range v {
1509		om := object.Key(key)
1510		om.String(v[key])
1511	}
1512	return nil
1513}
1514