1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package schemas
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_serializeOpCreateDiscoverer struct {
17}
18
19func (*awsRestjson1_serializeOpCreateDiscoverer) ID() string {
20	return "OperationSerializer"
21}
22
23func (m *awsRestjson1_serializeOpCreateDiscoverer) 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.(*CreateDiscovererInput)
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("/v1/discoverers")
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 = "POST"
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	restEncoder.SetHeader("Content-Type").String("application/json")
52
53	jsonEncoder := smithyjson.NewEncoder()
54	if err := awsRestjson1_serializeOpDocumentCreateDiscovererInput(input, jsonEncoder.Value); err != nil {
55		return out, metadata, &smithy.SerializationError{Err: err}
56	}
57
58	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
59		return out, metadata, &smithy.SerializationError{Err: err}
60	}
61
62	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
63		return out, metadata, &smithy.SerializationError{Err: err}
64	}
65	in.Request = request
66
67	return next.HandleSerialize(ctx, in)
68}
69func awsRestjson1_serializeOpHttpBindingsCreateDiscovererInput(v *CreateDiscovererInput, encoder *httpbinding.Encoder) error {
70	if v == nil {
71		return fmt.Errorf("unsupported serialization of nil %T", v)
72	}
73
74	return nil
75}
76
77func awsRestjson1_serializeOpDocumentCreateDiscovererInput(v *CreateDiscovererInput, value smithyjson.Value) error {
78	object := value.Object()
79	defer object.Close()
80
81	if v.Description != nil {
82		ok := object.Key("Description")
83		ok.String(*v.Description)
84	}
85
86	if v.SourceArn != nil {
87		ok := object.Key("SourceArn")
88		ok.String(*v.SourceArn)
89	}
90
91	if v.Tags != nil {
92		ok := object.Key("tags")
93		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
94			return err
95		}
96	}
97
98	return nil
99}
100
101type awsRestjson1_serializeOpCreateRegistry struct {
102}
103
104func (*awsRestjson1_serializeOpCreateRegistry) ID() string {
105	return "OperationSerializer"
106}
107
108func (m *awsRestjson1_serializeOpCreateRegistry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
109	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
110) {
111	request, ok := in.Request.(*smithyhttp.Request)
112	if !ok {
113		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
114	}
115
116	input, ok := in.Parameters.(*CreateRegistryInput)
117	_ = input
118	if !ok {
119		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
120	}
121
122	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}")
123	request.URL.Path = opPath
124	if len(request.URL.RawQuery) > 0 {
125		request.URL.RawQuery = "&" + opQuery
126	} else {
127		request.URL.RawQuery = opQuery
128	}
129
130	request.Method = "POST"
131	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
132	if err != nil {
133		return out, metadata, &smithy.SerializationError{Err: err}
134	}
135
136	if err := awsRestjson1_serializeOpHttpBindingsCreateRegistryInput(input, restEncoder); err != nil {
137		return out, metadata, &smithy.SerializationError{Err: err}
138	}
139
140	restEncoder.SetHeader("Content-Type").String("application/json")
141
142	jsonEncoder := smithyjson.NewEncoder()
143	if err := awsRestjson1_serializeOpDocumentCreateRegistryInput(input, jsonEncoder.Value); err != nil {
144		return out, metadata, &smithy.SerializationError{Err: err}
145	}
146
147	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
148		return out, metadata, &smithy.SerializationError{Err: err}
149	}
150
151	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
152		return out, metadata, &smithy.SerializationError{Err: err}
153	}
154	in.Request = request
155
156	return next.HandleSerialize(ctx, in)
157}
158func awsRestjson1_serializeOpHttpBindingsCreateRegistryInput(v *CreateRegistryInput, encoder *httpbinding.Encoder) error {
159	if v == nil {
160		return fmt.Errorf("unsupported serialization of nil %T", v)
161	}
162
163	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
164		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
165	}
166	if v.RegistryName != nil {
167		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
168			return err
169		}
170	}
171
172	return nil
173}
174
175func awsRestjson1_serializeOpDocumentCreateRegistryInput(v *CreateRegistryInput, value smithyjson.Value) error {
176	object := value.Object()
177	defer object.Close()
178
179	if v.Description != nil {
180		ok := object.Key("Description")
181		ok.String(*v.Description)
182	}
183
184	if v.Tags != nil {
185		ok := object.Key("tags")
186		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
187			return err
188		}
189	}
190
191	return nil
192}
193
194type awsRestjson1_serializeOpCreateSchema struct {
195}
196
197func (*awsRestjson1_serializeOpCreateSchema) ID() string {
198	return "OperationSerializer"
199}
200
201func (m *awsRestjson1_serializeOpCreateSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
202	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
203) {
204	request, ok := in.Request.(*smithyhttp.Request)
205	if !ok {
206		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
207	}
208
209	input, ok := in.Parameters.(*CreateSchemaInput)
210	_ = input
211	if !ok {
212		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
213	}
214
215	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}")
216	request.URL.Path = opPath
217	if len(request.URL.RawQuery) > 0 {
218		request.URL.RawQuery = "&" + opQuery
219	} else {
220		request.URL.RawQuery = opQuery
221	}
222
223	request.Method = "POST"
224	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
225	if err != nil {
226		return out, metadata, &smithy.SerializationError{Err: err}
227	}
228
229	if err := awsRestjson1_serializeOpHttpBindingsCreateSchemaInput(input, restEncoder); err != nil {
230		return out, metadata, &smithy.SerializationError{Err: err}
231	}
232
233	restEncoder.SetHeader("Content-Type").String("application/json")
234
235	jsonEncoder := smithyjson.NewEncoder()
236	if err := awsRestjson1_serializeOpDocumentCreateSchemaInput(input, jsonEncoder.Value); err != nil {
237		return out, metadata, &smithy.SerializationError{Err: err}
238	}
239
240	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
241		return out, metadata, &smithy.SerializationError{Err: err}
242	}
243
244	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
245		return out, metadata, &smithy.SerializationError{Err: err}
246	}
247	in.Request = request
248
249	return next.HandleSerialize(ctx, in)
250}
251func awsRestjson1_serializeOpHttpBindingsCreateSchemaInput(v *CreateSchemaInput, encoder *httpbinding.Encoder) error {
252	if v == nil {
253		return fmt.Errorf("unsupported serialization of nil %T", v)
254	}
255
256	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
257		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
258	}
259	if v.RegistryName != nil {
260		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
261			return err
262		}
263	}
264
265	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
266		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
267	}
268	if v.SchemaName != nil {
269		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
270			return err
271		}
272	}
273
274	return nil
275}
276
277func awsRestjson1_serializeOpDocumentCreateSchemaInput(v *CreateSchemaInput, value smithyjson.Value) error {
278	object := value.Object()
279	defer object.Close()
280
281	if v.Content != nil {
282		ok := object.Key("Content")
283		ok.String(*v.Content)
284	}
285
286	if v.Description != nil {
287		ok := object.Key("Description")
288		ok.String(*v.Description)
289	}
290
291	if v.Tags != nil {
292		ok := object.Key("tags")
293		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
294			return err
295		}
296	}
297
298	if len(v.Type) > 0 {
299		ok := object.Key("Type")
300		ok.String(string(v.Type))
301	}
302
303	return nil
304}
305
306type awsRestjson1_serializeOpDeleteDiscoverer struct {
307}
308
309func (*awsRestjson1_serializeOpDeleteDiscoverer) ID() string {
310	return "OperationSerializer"
311}
312
313func (m *awsRestjson1_serializeOpDeleteDiscoverer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
314	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
315) {
316	request, ok := in.Request.(*smithyhttp.Request)
317	if !ok {
318		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
319	}
320
321	input, ok := in.Parameters.(*DeleteDiscovererInput)
322	_ = input
323	if !ok {
324		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
325	}
326
327	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers/id/{DiscovererId}")
328	request.URL.Path = opPath
329	if len(request.URL.RawQuery) > 0 {
330		request.URL.RawQuery = "&" + opQuery
331	} else {
332		request.URL.RawQuery = opQuery
333	}
334
335	request.Method = "DELETE"
336	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
337	if err != nil {
338		return out, metadata, &smithy.SerializationError{Err: err}
339	}
340
341	if err := awsRestjson1_serializeOpHttpBindingsDeleteDiscovererInput(input, restEncoder); err != nil {
342		return out, metadata, &smithy.SerializationError{Err: err}
343	}
344
345	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
346		return out, metadata, &smithy.SerializationError{Err: err}
347	}
348	in.Request = request
349
350	return next.HandleSerialize(ctx, in)
351}
352func awsRestjson1_serializeOpHttpBindingsDeleteDiscovererInput(v *DeleteDiscovererInput, encoder *httpbinding.Encoder) error {
353	if v == nil {
354		return fmt.Errorf("unsupported serialization of nil %T", v)
355	}
356
357	if v.DiscovererId == nil || len(*v.DiscovererId) == 0 {
358		return &smithy.SerializationError{Err: fmt.Errorf("input member DiscovererId must not be empty")}
359	}
360	if v.DiscovererId != nil {
361		if err := encoder.SetURI("DiscovererId").String(*v.DiscovererId); err != nil {
362			return err
363		}
364	}
365
366	return nil
367}
368
369type awsRestjson1_serializeOpDeleteRegistry struct {
370}
371
372func (*awsRestjson1_serializeOpDeleteRegistry) ID() string {
373	return "OperationSerializer"
374}
375
376func (m *awsRestjson1_serializeOpDeleteRegistry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
377	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
378) {
379	request, ok := in.Request.(*smithyhttp.Request)
380	if !ok {
381		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
382	}
383
384	input, ok := in.Parameters.(*DeleteRegistryInput)
385	_ = input
386	if !ok {
387		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
388	}
389
390	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}")
391	request.URL.Path = opPath
392	if len(request.URL.RawQuery) > 0 {
393		request.URL.RawQuery = "&" + opQuery
394	} else {
395		request.URL.RawQuery = opQuery
396	}
397
398	request.Method = "DELETE"
399	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
400	if err != nil {
401		return out, metadata, &smithy.SerializationError{Err: err}
402	}
403
404	if err := awsRestjson1_serializeOpHttpBindingsDeleteRegistryInput(input, restEncoder); err != nil {
405		return out, metadata, &smithy.SerializationError{Err: err}
406	}
407
408	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
409		return out, metadata, &smithy.SerializationError{Err: err}
410	}
411	in.Request = request
412
413	return next.HandleSerialize(ctx, in)
414}
415func awsRestjson1_serializeOpHttpBindingsDeleteRegistryInput(v *DeleteRegistryInput, encoder *httpbinding.Encoder) error {
416	if v == nil {
417		return fmt.Errorf("unsupported serialization of nil %T", v)
418	}
419
420	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
421		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
422	}
423	if v.RegistryName != nil {
424		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
425			return err
426		}
427	}
428
429	return nil
430}
431
432type awsRestjson1_serializeOpDeleteResourcePolicy struct {
433}
434
435func (*awsRestjson1_serializeOpDeleteResourcePolicy) ID() string {
436	return "OperationSerializer"
437}
438
439func (m *awsRestjson1_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
440	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
441) {
442	request, ok := in.Request.(*smithyhttp.Request)
443	if !ok {
444		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
445	}
446
447	input, ok := in.Parameters.(*DeleteResourcePolicyInput)
448	_ = input
449	if !ok {
450		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
451	}
452
453	opPath, opQuery := httpbinding.SplitURI("/v1/policy")
454	request.URL.Path = opPath
455	if len(request.URL.RawQuery) > 0 {
456		request.URL.RawQuery = "&" + opQuery
457	} else {
458		request.URL.RawQuery = opQuery
459	}
460
461	request.Method = "DELETE"
462	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
463	if err != nil {
464		return out, metadata, &smithy.SerializationError{Err: err}
465	}
466
467	if err := awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(input, restEncoder); err != nil {
468		return out, metadata, &smithy.SerializationError{Err: err}
469	}
470
471	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
472		return out, metadata, &smithy.SerializationError{Err: err}
473	}
474	in.Request = request
475
476	return next.HandleSerialize(ctx, in)
477}
478func awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, encoder *httpbinding.Encoder) error {
479	if v == nil {
480		return fmt.Errorf("unsupported serialization of nil %T", v)
481	}
482
483	if v.RegistryName != nil {
484		encoder.SetQuery("registryName").String(*v.RegistryName)
485	}
486
487	return nil
488}
489
490type awsRestjson1_serializeOpDeleteSchema struct {
491}
492
493func (*awsRestjson1_serializeOpDeleteSchema) ID() string {
494	return "OperationSerializer"
495}
496
497func (m *awsRestjson1_serializeOpDeleteSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
498	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
499) {
500	request, ok := in.Request.(*smithyhttp.Request)
501	if !ok {
502		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
503	}
504
505	input, ok := in.Parameters.(*DeleteSchemaInput)
506	_ = input
507	if !ok {
508		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
509	}
510
511	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}")
512	request.URL.Path = opPath
513	if len(request.URL.RawQuery) > 0 {
514		request.URL.RawQuery = "&" + opQuery
515	} else {
516		request.URL.RawQuery = opQuery
517	}
518
519	request.Method = "DELETE"
520	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
521	if err != nil {
522		return out, metadata, &smithy.SerializationError{Err: err}
523	}
524
525	if err := awsRestjson1_serializeOpHttpBindingsDeleteSchemaInput(input, restEncoder); err != nil {
526		return out, metadata, &smithy.SerializationError{Err: err}
527	}
528
529	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
530		return out, metadata, &smithy.SerializationError{Err: err}
531	}
532	in.Request = request
533
534	return next.HandleSerialize(ctx, in)
535}
536func awsRestjson1_serializeOpHttpBindingsDeleteSchemaInput(v *DeleteSchemaInput, encoder *httpbinding.Encoder) error {
537	if v == nil {
538		return fmt.Errorf("unsupported serialization of nil %T", v)
539	}
540
541	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
542		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
543	}
544	if v.RegistryName != nil {
545		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
546			return err
547		}
548	}
549
550	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
551		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
552	}
553	if v.SchemaName != nil {
554		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
555			return err
556		}
557	}
558
559	return nil
560}
561
562type awsRestjson1_serializeOpDeleteSchemaVersion struct {
563}
564
565func (*awsRestjson1_serializeOpDeleteSchemaVersion) ID() string {
566	return "OperationSerializer"
567}
568
569func (m *awsRestjson1_serializeOpDeleteSchemaVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
570	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
571) {
572	request, ok := in.Request.(*smithyhttp.Request)
573	if !ok {
574		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
575	}
576
577	input, ok := in.Parameters.(*DeleteSchemaVersionInput)
578	_ = input
579	if !ok {
580		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
581	}
582
583	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/version/{SchemaVersion}")
584	request.URL.Path = opPath
585	if len(request.URL.RawQuery) > 0 {
586		request.URL.RawQuery = "&" + opQuery
587	} else {
588		request.URL.RawQuery = opQuery
589	}
590
591	request.Method = "DELETE"
592	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
593	if err != nil {
594		return out, metadata, &smithy.SerializationError{Err: err}
595	}
596
597	if err := awsRestjson1_serializeOpHttpBindingsDeleteSchemaVersionInput(input, restEncoder); err != nil {
598		return out, metadata, &smithy.SerializationError{Err: err}
599	}
600
601	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
602		return out, metadata, &smithy.SerializationError{Err: err}
603	}
604	in.Request = request
605
606	return next.HandleSerialize(ctx, in)
607}
608func awsRestjson1_serializeOpHttpBindingsDeleteSchemaVersionInput(v *DeleteSchemaVersionInput, encoder *httpbinding.Encoder) error {
609	if v == nil {
610		return fmt.Errorf("unsupported serialization of nil %T", v)
611	}
612
613	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
614		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
615	}
616	if v.RegistryName != nil {
617		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
618			return err
619		}
620	}
621
622	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
623		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
624	}
625	if v.SchemaName != nil {
626		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
627			return err
628		}
629	}
630
631	if v.SchemaVersion == nil || len(*v.SchemaVersion) == 0 {
632		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaVersion must not be empty")}
633	}
634	if v.SchemaVersion != nil {
635		if err := encoder.SetURI("SchemaVersion").String(*v.SchemaVersion); err != nil {
636			return err
637		}
638	}
639
640	return nil
641}
642
643type awsRestjson1_serializeOpDescribeCodeBinding struct {
644}
645
646func (*awsRestjson1_serializeOpDescribeCodeBinding) ID() string {
647	return "OperationSerializer"
648}
649
650func (m *awsRestjson1_serializeOpDescribeCodeBinding) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
651	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
652) {
653	request, ok := in.Request.(*smithyhttp.Request)
654	if !ok {
655		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
656	}
657
658	input, ok := in.Parameters.(*DescribeCodeBindingInput)
659	_ = input
660	if !ok {
661		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
662	}
663
664	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}")
665	request.URL.Path = opPath
666	if len(request.URL.RawQuery) > 0 {
667		request.URL.RawQuery = "&" + opQuery
668	} else {
669		request.URL.RawQuery = opQuery
670	}
671
672	request.Method = "GET"
673	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
674	if err != nil {
675		return out, metadata, &smithy.SerializationError{Err: err}
676	}
677
678	if err := awsRestjson1_serializeOpHttpBindingsDescribeCodeBindingInput(input, restEncoder); err != nil {
679		return out, metadata, &smithy.SerializationError{Err: err}
680	}
681
682	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
683		return out, metadata, &smithy.SerializationError{Err: err}
684	}
685	in.Request = request
686
687	return next.HandleSerialize(ctx, in)
688}
689func awsRestjson1_serializeOpHttpBindingsDescribeCodeBindingInput(v *DescribeCodeBindingInput, encoder *httpbinding.Encoder) error {
690	if v == nil {
691		return fmt.Errorf("unsupported serialization of nil %T", v)
692	}
693
694	if v.Language == nil || len(*v.Language) == 0 {
695		return &smithy.SerializationError{Err: fmt.Errorf("input member Language must not be empty")}
696	}
697	if v.Language != nil {
698		if err := encoder.SetURI("Language").String(*v.Language); err != nil {
699			return err
700		}
701	}
702
703	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
704		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
705	}
706	if v.RegistryName != nil {
707		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
708			return err
709		}
710	}
711
712	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
713		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
714	}
715	if v.SchemaName != nil {
716		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
717			return err
718		}
719	}
720
721	if v.SchemaVersion != nil {
722		encoder.SetQuery("schemaVersion").String(*v.SchemaVersion)
723	}
724
725	return nil
726}
727
728type awsRestjson1_serializeOpDescribeDiscoverer struct {
729}
730
731func (*awsRestjson1_serializeOpDescribeDiscoverer) ID() string {
732	return "OperationSerializer"
733}
734
735func (m *awsRestjson1_serializeOpDescribeDiscoverer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
736	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
737) {
738	request, ok := in.Request.(*smithyhttp.Request)
739	if !ok {
740		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
741	}
742
743	input, ok := in.Parameters.(*DescribeDiscovererInput)
744	_ = input
745	if !ok {
746		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
747	}
748
749	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers/id/{DiscovererId}")
750	request.URL.Path = opPath
751	if len(request.URL.RawQuery) > 0 {
752		request.URL.RawQuery = "&" + opQuery
753	} else {
754		request.URL.RawQuery = opQuery
755	}
756
757	request.Method = "GET"
758	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
759	if err != nil {
760		return out, metadata, &smithy.SerializationError{Err: err}
761	}
762
763	if err := awsRestjson1_serializeOpHttpBindingsDescribeDiscovererInput(input, restEncoder); err != nil {
764		return out, metadata, &smithy.SerializationError{Err: err}
765	}
766
767	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
768		return out, metadata, &smithy.SerializationError{Err: err}
769	}
770	in.Request = request
771
772	return next.HandleSerialize(ctx, in)
773}
774func awsRestjson1_serializeOpHttpBindingsDescribeDiscovererInput(v *DescribeDiscovererInput, encoder *httpbinding.Encoder) error {
775	if v == nil {
776		return fmt.Errorf("unsupported serialization of nil %T", v)
777	}
778
779	if v.DiscovererId == nil || len(*v.DiscovererId) == 0 {
780		return &smithy.SerializationError{Err: fmt.Errorf("input member DiscovererId must not be empty")}
781	}
782	if v.DiscovererId != nil {
783		if err := encoder.SetURI("DiscovererId").String(*v.DiscovererId); err != nil {
784			return err
785		}
786	}
787
788	return nil
789}
790
791type awsRestjson1_serializeOpDescribeRegistry struct {
792}
793
794func (*awsRestjson1_serializeOpDescribeRegistry) ID() string {
795	return "OperationSerializer"
796}
797
798func (m *awsRestjson1_serializeOpDescribeRegistry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
799	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
800) {
801	request, ok := in.Request.(*smithyhttp.Request)
802	if !ok {
803		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
804	}
805
806	input, ok := in.Parameters.(*DescribeRegistryInput)
807	_ = input
808	if !ok {
809		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
810	}
811
812	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}")
813	request.URL.Path = opPath
814	if len(request.URL.RawQuery) > 0 {
815		request.URL.RawQuery = "&" + opQuery
816	} else {
817		request.URL.RawQuery = opQuery
818	}
819
820	request.Method = "GET"
821	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
822	if err != nil {
823		return out, metadata, &smithy.SerializationError{Err: err}
824	}
825
826	if err := awsRestjson1_serializeOpHttpBindingsDescribeRegistryInput(input, restEncoder); err != nil {
827		return out, metadata, &smithy.SerializationError{Err: err}
828	}
829
830	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
831		return out, metadata, &smithy.SerializationError{Err: err}
832	}
833	in.Request = request
834
835	return next.HandleSerialize(ctx, in)
836}
837func awsRestjson1_serializeOpHttpBindingsDescribeRegistryInput(v *DescribeRegistryInput, encoder *httpbinding.Encoder) error {
838	if v == nil {
839		return fmt.Errorf("unsupported serialization of nil %T", v)
840	}
841
842	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
843		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
844	}
845	if v.RegistryName != nil {
846		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
847			return err
848		}
849	}
850
851	return nil
852}
853
854type awsRestjson1_serializeOpDescribeSchema struct {
855}
856
857func (*awsRestjson1_serializeOpDescribeSchema) ID() string {
858	return "OperationSerializer"
859}
860
861func (m *awsRestjson1_serializeOpDescribeSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
862	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
863) {
864	request, ok := in.Request.(*smithyhttp.Request)
865	if !ok {
866		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
867	}
868
869	input, ok := in.Parameters.(*DescribeSchemaInput)
870	_ = input
871	if !ok {
872		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
873	}
874
875	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}")
876	request.URL.Path = opPath
877	if len(request.URL.RawQuery) > 0 {
878		request.URL.RawQuery = "&" + opQuery
879	} else {
880		request.URL.RawQuery = opQuery
881	}
882
883	request.Method = "GET"
884	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
885	if err != nil {
886		return out, metadata, &smithy.SerializationError{Err: err}
887	}
888
889	if err := awsRestjson1_serializeOpHttpBindingsDescribeSchemaInput(input, restEncoder); err != nil {
890		return out, metadata, &smithy.SerializationError{Err: err}
891	}
892
893	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
894		return out, metadata, &smithy.SerializationError{Err: err}
895	}
896	in.Request = request
897
898	return next.HandleSerialize(ctx, in)
899}
900func awsRestjson1_serializeOpHttpBindingsDescribeSchemaInput(v *DescribeSchemaInput, encoder *httpbinding.Encoder) error {
901	if v == nil {
902		return fmt.Errorf("unsupported serialization of nil %T", v)
903	}
904
905	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
906		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
907	}
908	if v.RegistryName != nil {
909		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
910			return err
911		}
912	}
913
914	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
915		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
916	}
917	if v.SchemaName != nil {
918		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
919			return err
920		}
921	}
922
923	if v.SchemaVersion != nil {
924		encoder.SetQuery("schemaVersion").String(*v.SchemaVersion)
925	}
926
927	return nil
928}
929
930type awsRestjson1_serializeOpExportSchema struct {
931}
932
933func (*awsRestjson1_serializeOpExportSchema) ID() string {
934	return "OperationSerializer"
935}
936
937func (m *awsRestjson1_serializeOpExportSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
938	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
939) {
940	request, ok := in.Request.(*smithyhttp.Request)
941	if !ok {
942		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
943	}
944
945	input, ok := in.Parameters.(*ExportSchemaInput)
946	_ = input
947	if !ok {
948		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
949	}
950
951	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/export")
952	request.URL.Path = opPath
953	if len(request.URL.RawQuery) > 0 {
954		request.URL.RawQuery = "&" + opQuery
955	} else {
956		request.URL.RawQuery = opQuery
957	}
958
959	request.Method = "GET"
960	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
961	if err != nil {
962		return out, metadata, &smithy.SerializationError{Err: err}
963	}
964
965	if err := awsRestjson1_serializeOpHttpBindingsExportSchemaInput(input, restEncoder); err != nil {
966		return out, metadata, &smithy.SerializationError{Err: err}
967	}
968
969	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
970		return out, metadata, &smithy.SerializationError{Err: err}
971	}
972	in.Request = request
973
974	return next.HandleSerialize(ctx, in)
975}
976func awsRestjson1_serializeOpHttpBindingsExportSchemaInput(v *ExportSchemaInput, encoder *httpbinding.Encoder) error {
977	if v == nil {
978		return fmt.Errorf("unsupported serialization of nil %T", v)
979	}
980
981	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
982		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
983	}
984	if v.RegistryName != nil {
985		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
986			return err
987		}
988	}
989
990	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
991		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
992	}
993	if v.SchemaName != nil {
994		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
995			return err
996		}
997	}
998
999	if v.SchemaVersion != nil {
1000		encoder.SetQuery("schemaVersion").String(*v.SchemaVersion)
1001	}
1002
1003	if v.Type != nil {
1004		encoder.SetQuery("type").String(*v.Type)
1005	}
1006
1007	return nil
1008}
1009
1010type awsRestjson1_serializeOpGetCodeBindingSource struct {
1011}
1012
1013func (*awsRestjson1_serializeOpGetCodeBindingSource) ID() string {
1014	return "OperationSerializer"
1015}
1016
1017func (m *awsRestjson1_serializeOpGetCodeBindingSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1018	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1019) {
1020	request, ok := in.Request.(*smithyhttp.Request)
1021	if !ok {
1022		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1023	}
1024
1025	input, ok := in.Parameters.(*GetCodeBindingSourceInput)
1026	_ = input
1027	if !ok {
1028		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1029	}
1030
1031	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}/source")
1032	request.URL.Path = opPath
1033	if len(request.URL.RawQuery) > 0 {
1034		request.URL.RawQuery = "&" + opQuery
1035	} else {
1036		request.URL.RawQuery = opQuery
1037	}
1038
1039	request.Method = "GET"
1040	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1041	if err != nil {
1042		return out, metadata, &smithy.SerializationError{Err: err}
1043	}
1044
1045	if err := awsRestjson1_serializeOpHttpBindingsGetCodeBindingSourceInput(input, restEncoder); err != nil {
1046		return out, metadata, &smithy.SerializationError{Err: err}
1047	}
1048
1049	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1050		return out, metadata, &smithy.SerializationError{Err: err}
1051	}
1052	in.Request = request
1053
1054	return next.HandleSerialize(ctx, in)
1055}
1056func awsRestjson1_serializeOpHttpBindingsGetCodeBindingSourceInput(v *GetCodeBindingSourceInput, encoder *httpbinding.Encoder) error {
1057	if v == nil {
1058		return fmt.Errorf("unsupported serialization of nil %T", v)
1059	}
1060
1061	if v.Language == nil || len(*v.Language) == 0 {
1062		return &smithy.SerializationError{Err: fmt.Errorf("input member Language must not be empty")}
1063	}
1064	if v.Language != nil {
1065		if err := encoder.SetURI("Language").String(*v.Language); err != nil {
1066			return err
1067		}
1068	}
1069
1070	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
1071		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
1072	}
1073	if v.RegistryName != nil {
1074		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
1075			return err
1076		}
1077	}
1078
1079	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
1080		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
1081	}
1082	if v.SchemaName != nil {
1083		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
1084			return err
1085		}
1086	}
1087
1088	if v.SchemaVersion != nil {
1089		encoder.SetQuery("schemaVersion").String(*v.SchemaVersion)
1090	}
1091
1092	return nil
1093}
1094
1095type awsRestjson1_serializeOpGetDiscoveredSchema struct {
1096}
1097
1098func (*awsRestjson1_serializeOpGetDiscoveredSchema) ID() string {
1099	return "OperationSerializer"
1100}
1101
1102func (m *awsRestjson1_serializeOpGetDiscoveredSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1103	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1104) {
1105	request, ok := in.Request.(*smithyhttp.Request)
1106	if !ok {
1107		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1108	}
1109
1110	input, ok := in.Parameters.(*GetDiscoveredSchemaInput)
1111	_ = input
1112	if !ok {
1113		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1114	}
1115
1116	opPath, opQuery := httpbinding.SplitURI("/v1/discover")
1117	request.URL.Path = opPath
1118	if len(request.URL.RawQuery) > 0 {
1119		request.URL.RawQuery = "&" + opQuery
1120	} else {
1121		request.URL.RawQuery = opQuery
1122	}
1123
1124	request.Method = "POST"
1125	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1126	if err != nil {
1127		return out, metadata, &smithy.SerializationError{Err: err}
1128	}
1129
1130	restEncoder.SetHeader("Content-Type").String("application/json")
1131
1132	jsonEncoder := smithyjson.NewEncoder()
1133	if err := awsRestjson1_serializeOpDocumentGetDiscoveredSchemaInput(input, jsonEncoder.Value); err != nil {
1134		return out, metadata, &smithy.SerializationError{Err: err}
1135	}
1136
1137	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1138		return out, metadata, &smithy.SerializationError{Err: err}
1139	}
1140
1141	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1142		return out, metadata, &smithy.SerializationError{Err: err}
1143	}
1144	in.Request = request
1145
1146	return next.HandleSerialize(ctx, in)
1147}
1148func awsRestjson1_serializeOpHttpBindingsGetDiscoveredSchemaInput(v *GetDiscoveredSchemaInput, encoder *httpbinding.Encoder) error {
1149	if v == nil {
1150		return fmt.Errorf("unsupported serialization of nil %T", v)
1151	}
1152
1153	return nil
1154}
1155
1156func awsRestjson1_serializeOpDocumentGetDiscoveredSchemaInput(v *GetDiscoveredSchemaInput, value smithyjson.Value) error {
1157	object := value.Object()
1158	defer object.Close()
1159
1160	if v.Events != nil {
1161		ok := object.Key("Events")
1162		if err := awsRestjson1_serializeDocument__listOfGetDiscoveredSchemaVersionItemInput(v.Events, ok); err != nil {
1163			return err
1164		}
1165	}
1166
1167	if len(v.Type) > 0 {
1168		ok := object.Key("Type")
1169		ok.String(string(v.Type))
1170	}
1171
1172	return nil
1173}
1174
1175type awsRestjson1_serializeOpGetResourcePolicy struct {
1176}
1177
1178func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string {
1179	return "OperationSerializer"
1180}
1181
1182func (m *awsRestjson1_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1183	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1184) {
1185	request, ok := in.Request.(*smithyhttp.Request)
1186	if !ok {
1187		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1188	}
1189
1190	input, ok := in.Parameters.(*GetResourcePolicyInput)
1191	_ = input
1192	if !ok {
1193		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1194	}
1195
1196	opPath, opQuery := httpbinding.SplitURI("/v1/policy")
1197	request.URL.Path = opPath
1198	if len(request.URL.RawQuery) > 0 {
1199		request.URL.RawQuery = "&" + opQuery
1200	} else {
1201		request.URL.RawQuery = opQuery
1202	}
1203
1204	request.Method = "GET"
1205	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1206	if err != nil {
1207		return out, metadata, &smithy.SerializationError{Err: err}
1208	}
1209
1210	if err := awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(input, restEncoder); err != nil {
1211		return out, metadata, &smithy.SerializationError{Err: err}
1212	}
1213
1214	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1215		return out, metadata, &smithy.SerializationError{Err: err}
1216	}
1217	in.Request = request
1218
1219	return next.HandleSerialize(ctx, in)
1220}
1221func awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, encoder *httpbinding.Encoder) error {
1222	if v == nil {
1223		return fmt.Errorf("unsupported serialization of nil %T", v)
1224	}
1225
1226	if v.RegistryName != nil {
1227		encoder.SetQuery("registryName").String(*v.RegistryName)
1228	}
1229
1230	return nil
1231}
1232
1233type awsRestjson1_serializeOpListDiscoverers struct {
1234}
1235
1236func (*awsRestjson1_serializeOpListDiscoverers) ID() string {
1237	return "OperationSerializer"
1238}
1239
1240func (m *awsRestjson1_serializeOpListDiscoverers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1241	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1242) {
1243	request, ok := in.Request.(*smithyhttp.Request)
1244	if !ok {
1245		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1246	}
1247
1248	input, ok := in.Parameters.(*ListDiscoverersInput)
1249	_ = input
1250	if !ok {
1251		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1252	}
1253
1254	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers")
1255	request.URL.Path = opPath
1256	if len(request.URL.RawQuery) > 0 {
1257		request.URL.RawQuery = "&" + opQuery
1258	} else {
1259		request.URL.RawQuery = opQuery
1260	}
1261
1262	request.Method = "GET"
1263	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1264	if err != nil {
1265		return out, metadata, &smithy.SerializationError{Err: err}
1266	}
1267
1268	if err := awsRestjson1_serializeOpHttpBindingsListDiscoverersInput(input, restEncoder); err != nil {
1269		return out, metadata, &smithy.SerializationError{Err: err}
1270	}
1271
1272	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1273		return out, metadata, &smithy.SerializationError{Err: err}
1274	}
1275	in.Request = request
1276
1277	return next.HandleSerialize(ctx, in)
1278}
1279func awsRestjson1_serializeOpHttpBindingsListDiscoverersInput(v *ListDiscoverersInput, encoder *httpbinding.Encoder) error {
1280	if v == nil {
1281		return fmt.Errorf("unsupported serialization of nil %T", v)
1282	}
1283
1284	if v.DiscovererIdPrefix != nil {
1285		encoder.SetQuery("discovererIdPrefix").String(*v.DiscovererIdPrefix)
1286	}
1287
1288	if v.Limit != 0 {
1289		encoder.SetQuery("limit").Integer(v.Limit)
1290	}
1291
1292	if v.NextToken != nil {
1293		encoder.SetQuery("nextToken").String(*v.NextToken)
1294	}
1295
1296	if v.SourceArnPrefix != nil {
1297		encoder.SetQuery("sourceArnPrefix").String(*v.SourceArnPrefix)
1298	}
1299
1300	return nil
1301}
1302
1303type awsRestjson1_serializeOpListRegistries struct {
1304}
1305
1306func (*awsRestjson1_serializeOpListRegistries) ID() string {
1307	return "OperationSerializer"
1308}
1309
1310func (m *awsRestjson1_serializeOpListRegistries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1311	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1312) {
1313	request, ok := in.Request.(*smithyhttp.Request)
1314	if !ok {
1315		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1316	}
1317
1318	input, ok := in.Parameters.(*ListRegistriesInput)
1319	_ = input
1320	if !ok {
1321		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1322	}
1323
1324	opPath, opQuery := httpbinding.SplitURI("/v1/registries")
1325	request.URL.Path = opPath
1326	if len(request.URL.RawQuery) > 0 {
1327		request.URL.RawQuery = "&" + opQuery
1328	} else {
1329		request.URL.RawQuery = opQuery
1330	}
1331
1332	request.Method = "GET"
1333	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1334	if err != nil {
1335		return out, metadata, &smithy.SerializationError{Err: err}
1336	}
1337
1338	if err := awsRestjson1_serializeOpHttpBindingsListRegistriesInput(input, restEncoder); err != nil {
1339		return out, metadata, &smithy.SerializationError{Err: err}
1340	}
1341
1342	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1343		return out, metadata, &smithy.SerializationError{Err: err}
1344	}
1345	in.Request = request
1346
1347	return next.HandleSerialize(ctx, in)
1348}
1349func awsRestjson1_serializeOpHttpBindingsListRegistriesInput(v *ListRegistriesInput, encoder *httpbinding.Encoder) error {
1350	if v == nil {
1351		return fmt.Errorf("unsupported serialization of nil %T", v)
1352	}
1353
1354	if v.Limit != 0 {
1355		encoder.SetQuery("limit").Integer(v.Limit)
1356	}
1357
1358	if v.NextToken != nil {
1359		encoder.SetQuery("nextToken").String(*v.NextToken)
1360	}
1361
1362	if v.RegistryNamePrefix != nil {
1363		encoder.SetQuery("registryNamePrefix").String(*v.RegistryNamePrefix)
1364	}
1365
1366	if v.Scope != nil {
1367		encoder.SetQuery("scope").String(*v.Scope)
1368	}
1369
1370	return nil
1371}
1372
1373type awsRestjson1_serializeOpListSchemas struct {
1374}
1375
1376func (*awsRestjson1_serializeOpListSchemas) ID() string {
1377	return "OperationSerializer"
1378}
1379
1380func (m *awsRestjson1_serializeOpListSchemas) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1381	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1382) {
1383	request, ok := in.Request.(*smithyhttp.Request)
1384	if !ok {
1385		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1386	}
1387
1388	input, ok := in.Parameters.(*ListSchemasInput)
1389	_ = input
1390	if !ok {
1391		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1392	}
1393
1394	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas")
1395	request.URL.Path = opPath
1396	if len(request.URL.RawQuery) > 0 {
1397		request.URL.RawQuery = "&" + opQuery
1398	} else {
1399		request.URL.RawQuery = opQuery
1400	}
1401
1402	request.Method = "GET"
1403	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1404	if err != nil {
1405		return out, metadata, &smithy.SerializationError{Err: err}
1406	}
1407
1408	if err := awsRestjson1_serializeOpHttpBindingsListSchemasInput(input, restEncoder); err != nil {
1409		return out, metadata, &smithy.SerializationError{Err: err}
1410	}
1411
1412	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1413		return out, metadata, &smithy.SerializationError{Err: err}
1414	}
1415	in.Request = request
1416
1417	return next.HandleSerialize(ctx, in)
1418}
1419func awsRestjson1_serializeOpHttpBindingsListSchemasInput(v *ListSchemasInput, encoder *httpbinding.Encoder) error {
1420	if v == nil {
1421		return fmt.Errorf("unsupported serialization of nil %T", v)
1422	}
1423
1424	if v.Limit != 0 {
1425		encoder.SetQuery("limit").Integer(v.Limit)
1426	}
1427
1428	if v.NextToken != nil {
1429		encoder.SetQuery("nextToken").String(*v.NextToken)
1430	}
1431
1432	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
1433		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
1434	}
1435	if v.RegistryName != nil {
1436		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
1437			return err
1438		}
1439	}
1440
1441	if v.SchemaNamePrefix != nil {
1442		encoder.SetQuery("schemaNamePrefix").String(*v.SchemaNamePrefix)
1443	}
1444
1445	return nil
1446}
1447
1448type awsRestjson1_serializeOpListSchemaVersions struct {
1449}
1450
1451func (*awsRestjson1_serializeOpListSchemaVersions) ID() string {
1452	return "OperationSerializer"
1453}
1454
1455func (m *awsRestjson1_serializeOpListSchemaVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1456	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1457) {
1458	request, ok := in.Request.(*smithyhttp.Request)
1459	if !ok {
1460		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1461	}
1462
1463	input, ok := in.Parameters.(*ListSchemaVersionsInput)
1464	_ = input
1465	if !ok {
1466		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1467	}
1468
1469	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/versions")
1470	request.URL.Path = opPath
1471	if len(request.URL.RawQuery) > 0 {
1472		request.URL.RawQuery = "&" + opQuery
1473	} else {
1474		request.URL.RawQuery = opQuery
1475	}
1476
1477	request.Method = "GET"
1478	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1479	if err != nil {
1480		return out, metadata, &smithy.SerializationError{Err: err}
1481	}
1482
1483	if err := awsRestjson1_serializeOpHttpBindingsListSchemaVersionsInput(input, restEncoder); err != nil {
1484		return out, metadata, &smithy.SerializationError{Err: err}
1485	}
1486
1487	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1488		return out, metadata, &smithy.SerializationError{Err: err}
1489	}
1490	in.Request = request
1491
1492	return next.HandleSerialize(ctx, in)
1493}
1494func awsRestjson1_serializeOpHttpBindingsListSchemaVersionsInput(v *ListSchemaVersionsInput, encoder *httpbinding.Encoder) error {
1495	if v == nil {
1496		return fmt.Errorf("unsupported serialization of nil %T", v)
1497	}
1498
1499	if v.Limit != 0 {
1500		encoder.SetQuery("limit").Integer(v.Limit)
1501	}
1502
1503	if v.NextToken != nil {
1504		encoder.SetQuery("nextToken").String(*v.NextToken)
1505	}
1506
1507	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
1508		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
1509	}
1510	if v.RegistryName != nil {
1511		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
1512			return err
1513		}
1514	}
1515
1516	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
1517		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
1518	}
1519	if v.SchemaName != nil {
1520		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
1521			return err
1522		}
1523	}
1524
1525	return nil
1526}
1527
1528type awsRestjson1_serializeOpListTagsForResource struct {
1529}
1530
1531func (*awsRestjson1_serializeOpListTagsForResource) ID() string {
1532	return "OperationSerializer"
1533}
1534
1535func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1536	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1537) {
1538	request, ok := in.Request.(*smithyhttp.Request)
1539	if !ok {
1540		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1541	}
1542
1543	input, ok := in.Parameters.(*ListTagsForResourceInput)
1544	_ = input
1545	if !ok {
1546		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1547	}
1548
1549	opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}")
1550	request.URL.Path = opPath
1551	if len(request.URL.RawQuery) > 0 {
1552		request.URL.RawQuery = "&" + opQuery
1553	} else {
1554		request.URL.RawQuery = opQuery
1555	}
1556
1557	request.Method = "GET"
1558	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1559	if err != nil {
1560		return out, metadata, &smithy.SerializationError{Err: err}
1561	}
1562
1563	if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
1564		return out, metadata, &smithy.SerializationError{Err: err}
1565	}
1566
1567	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1568		return out, metadata, &smithy.SerializationError{Err: err}
1569	}
1570	in.Request = request
1571
1572	return next.HandleSerialize(ctx, in)
1573}
1574func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
1575	if v == nil {
1576		return fmt.Errorf("unsupported serialization of nil %T", v)
1577	}
1578
1579	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
1580		return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")}
1581	}
1582	if v.ResourceArn != nil {
1583		if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil {
1584			return err
1585		}
1586	}
1587
1588	return nil
1589}
1590
1591type awsRestjson1_serializeOpPutCodeBinding struct {
1592}
1593
1594func (*awsRestjson1_serializeOpPutCodeBinding) ID() string {
1595	return "OperationSerializer"
1596}
1597
1598func (m *awsRestjson1_serializeOpPutCodeBinding) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1599	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1600) {
1601	request, ok := in.Request.(*smithyhttp.Request)
1602	if !ok {
1603		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1604	}
1605
1606	input, ok := in.Parameters.(*PutCodeBindingInput)
1607	_ = input
1608	if !ok {
1609		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1610	}
1611
1612	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}/language/{Language}")
1613	request.URL.Path = opPath
1614	if len(request.URL.RawQuery) > 0 {
1615		request.URL.RawQuery = "&" + opQuery
1616	} else {
1617		request.URL.RawQuery = opQuery
1618	}
1619
1620	request.Method = "POST"
1621	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1622	if err != nil {
1623		return out, metadata, &smithy.SerializationError{Err: err}
1624	}
1625
1626	if err := awsRestjson1_serializeOpHttpBindingsPutCodeBindingInput(input, restEncoder); err != nil {
1627		return out, metadata, &smithy.SerializationError{Err: err}
1628	}
1629
1630	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1631		return out, metadata, &smithy.SerializationError{Err: err}
1632	}
1633	in.Request = request
1634
1635	return next.HandleSerialize(ctx, in)
1636}
1637func awsRestjson1_serializeOpHttpBindingsPutCodeBindingInput(v *PutCodeBindingInput, encoder *httpbinding.Encoder) error {
1638	if v == nil {
1639		return fmt.Errorf("unsupported serialization of nil %T", v)
1640	}
1641
1642	if v.Language == nil || len(*v.Language) == 0 {
1643		return &smithy.SerializationError{Err: fmt.Errorf("input member Language must not be empty")}
1644	}
1645	if v.Language != nil {
1646		if err := encoder.SetURI("Language").String(*v.Language); err != nil {
1647			return err
1648		}
1649	}
1650
1651	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
1652		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
1653	}
1654	if v.RegistryName != nil {
1655		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
1656			return err
1657		}
1658	}
1659
1660	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
1661		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
1662	}
1663	if v.SchemaName != nil {
1664		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
1665			return err
1666		}
1667	}
1668
1669	if v.SchemaVersion != nil {
1670		encoder.SetQuery("schemaVersion").String(*v.SchemaVersion)
1671	}
1672
1673	return nil
1674}
1675
1676type awsRestjson1_serializeOpPutResourcePolicy struct {
1677}
1678
1679func (*awsRestjson1_serializeOpPutResourcePolicy) ID() string {
1680	return "OperationSerializer"
1681}
1682
1683func (m *awsRestjson1_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1684	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1685) {
1686	request, ok := in.Request.(*smithyhttp.Request)
1687	if !ok {
1688		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1689	}
1690
1691	input, ok := in.Parameters.(*PutResourcePolicyInput)
1692	_ = input
1693	if !ok {
1694		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1695	}
1696
1697	opPath, opQuery := httpbinding.SplitURI("/v1/policy")
1698	request.URL.Path = opPath
1699	if len(request.URL.RawQuery) > 0 {
1700		request.URL.RawQuery = "&" + opQuery
1701	} else {
1702		request.URL.RawQuery = opQuery
1703	}
1704
1705	request.Method = "PUT"
1706	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1707	if err != nil {
1708		return out, metadata, &smithy.SerializationError{Err: err}
1709	}
1710
1711	if err := awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(input, restEncoder); err != nil {
1712		return out, metadata, &smithy.SerializationError{Err: err}
1713	}
1714
1715	restEncoder.SetHeader("Content-Type").String("application/json")
1716
1717	jsonEncoder := smithyjson.NewEncoder()
1718	if err := awsRestjson1_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil {
1719		return out, metadata, &smithy.SerializationError{Err: err}
1720	}
1721
1722	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
1723		return out, metadata, &smithy.SerializationError{Err: err}
1724	}
1725
1726	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1727		return out, metadata, &smithy.SerializationError{Err: err}
1728	}
1729	in.Request = request
1730
1731	return next.HandleSerialize(ctx, in)
1732}
1733func awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(v *PutResourcePolicyInput, encoder *httpbinding.Encoder) error {
1734	if v == nil {
1735		return fmt.Errorf("unsupported serialization of nil %T", v)
1736	}
1737
1738	if v.RegistryName != nil {
1739		encoder.SetQuery("registryName").String(*v.RegistryName)
1740	}
1741
1742	return nil
1743}
1744
1745func awsRestjson1_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error {
1746	object := value.Object()
1747	defer object.Close()
1748
1749	if v.Policy != nil {
1750		ok := object.Key("Policy")
1751		ok.String(*v.Policy)
1752	}
1753
1754	if v.RevisionId != nil {
1755		ok := object.Key("RevisionId")
1756		ok.String(*v.RevisionId)
1757	}
1758
1759	return nil
1760}
1761
1762type awsRestjson1_serializeOpSearchSchemas struct {
1763}
1764
1765func (*awsRestjson1_serializeOpSearchSchemas) ID() string {
1766	return "OperationSerializer"
1767}
1768
1769func (m *awsRestjson1_serializeOpSearchSchemas) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1770	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1771) {
1772	request, ok := in.Request.(*smithyhttp.Request)
1773	if !ok {
1774		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1775	}
1776
1777	input, ok := in.Parameters.(*SearchSchemasInput)
1778	_ = input
1779	if !ok {
1780		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1781	}
1782
1783	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/search")
1784	request.URL.Path = opPath
1785	if len(request.URL.RawQuery) > 0 {
1786		request.URL.RawQuery = "&" + opQuery
1787	} else {
1788		request.URL.RawQuery = opQuery
1789	}
1790
1791	request.Method = "GET"
1792	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1793	if err != nil {
1794		return out, metadata, &smithy.SerializationError{Err: err}
1795	}
1796
1797	if err := awsRestjson1_serializeOpHttpBindingsSearchSchemasInput(input, restEncoder); err != nil {
1798		return out, metadata, &smithy.SerializationError{Err: err}
1799	}
1800
1801	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1802		return out, metadata, &smithy.SerializationError{Err: err}
1803	}
1804	in.Request = request
1805
1806	return next.HandleSerialize(ctx, in)
1807}
1808func awsRestjson1_serializeOpHttpBindingsSearchSchemasInput(v *SearchSchemasInput, encoder *httpbinding.Encoder) error {
1809	if v == nil {
1810		return fmt.Errorf("unsupported serialization of nil %T", v)
1811	}
1812
1813	if v.Keywords != nil {
1814		encoder.SetQuery("keywords").String(*v.Keywords)
1815	}
1816
1817	if v.Limit != 0 {
1818		encoder.SetQuery("limit").Integer(v.Limit)
1819	}
1820
1821	if v.NextToken != nil {
1822		encoder.SetQuery("nextToken").String(*v.NextToken)
1823	}
1824
1825	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
1826		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
1827	}
1828	if v.RegistryName != nil {
1829		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
1830			return err
1831		}
1832	}
1833
1834	return nil
1835}
1836
1837type awsRestjson1_serializeOpStartDiscoverer struct {
1838}
1839
1840func (*awsRestjson1_serializeOpStartDiscoverer) ID() string {
1841	return "OperationSerializer"
1842}
1843
1844func (m *awsRestjson1_serializeOpStartDiscoverer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1845	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1846) {
1847	request, ok := in.Request.(*smithyhttp.Request)
1848	if !ok {
1849		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1850	}
1851
1852	input, ok := in.Parameters.(*StartDiscovererInput)
1853	_ = input
1854	if !ok {
1855		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1856	}
1857
1858	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers/id/{DiscovererId}/start")
1859	request.URL.Path = opPath
1860	if len(request.URL.RawQuery) > 0 {
1861		request.URL.RawQuery = "&" + opQuery
1862	} else {
1863		request.URL.RawQuery = opQuery
1864	}
1865
1866	request.Method = "POST"
1867	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1868	if err != nil {
1869		return out, metadata, &smithy.SerializationError{Err: err}
1870	}
1871
1872	if err := awsRestjson1_serializeOpHttpBindingsStartDiscovererInput(input, restEncoder); err != nil {
1873		return out, metadata, &smithy.SerializationError{Err: err}
1874	}
1875
1876	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1877		return out, metadata, &smithy.SerializationError{Err: err}
1878	}
1879	in.Request = request
1880
1881	return next.HandleSerialize(ctx, in)
1882}
1883func awsRestjson1_serializeOpHttpBindingsStartDiscovererInput(v *StartDiscovererInput, encoder *httpbinding.Encoder) error {
1884	if v == nil {
1885		return fmt.Errorf("unsupported serialization of nil %T", v)
1886	}
1887
1888	if v.DiscovererId == nil || len(*v.DiscovererId) == 0 {
1889		return &smithy.SerializationError{Err: fmt.Errorf("input member DiscovererId must not be empty")}
1890	}
1891	if v.DiscovererId != nil {
1892		if err := encoder.SetURI("DiscovererId").String(*v.DiscovererId); err != nil {
1893			return err
1894		}
1895	}
1896
1897	return nil
1898}
1899
1900type awsRestjson1_serializeOpStopDiscoverer struct {
1901}
1902
1903func (*awsRestjson1_serializeOpStopDiscoverer) ID() string {
1904	return "OperationSerializer"
1905}
1906
1907func (m *awsRestjson1_serializeOpStopDiscoverer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1908	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1909) {
1910	request, ok := in.Request.(*smithyhttp.Request)
1911	if !ok {
1912		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1913	}
1914
1915	input, ok := in.Parameters.(*StopDiscovererInput)
1916	_ = input
1917	if !ok {
1918		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1919	}
1920
1921	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers/id/{DiscovererId}/stop")
1922	request.URL.Path = opPath
1923	if len(request.URL.RawQuery) > 0 {
1924		request.URL.RawQuery = "&" + opQuery
1925	} else {
1926		request.URL.RawQuery = opQuery
1927	}
1928
1929	request.Method = "POST"
1930	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1931	if err != nil {
1932		return out, metadata, &smithy.SerializationError{Err: err}
1933	}
1934
1935	if err := awsRestjson1_serializeOpHttpBindingsStopDiscovererInput(input, restEncoder); err != nil {
1936		return out, metadata, &smithy.SerializationError{Err: err}
1937	}
1938
1939	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1940		return out, metadata, &smithy.SerializationError{Err: err}
1941	}
1942	in.Request = request
1943
1944	return next.HandleSerialize(ctx, in)
1945}
1946func awsRestjson1_serializeOpHttpBindingsStopDiscovererInput(v *StopDiscovererInput, encoder *httpbinding.Encoder) error {
1947	if v == nil {
1948		return fmt.Errorf("unsupported serialization of nil %T", v)
1949	}
1950
1951	if v.DiscovererId == nil || len(*v.DiscovererId) == 0 {
1952		return &smithy.SerializationError{Err: fmt.Errorf("input member DiscovererId must not be empty")}
1953	}
1954	if v.DiscovererId != nil {
1955		if err := encoder.SetURI("DiscovererId").String(*v.DiscovererId); err != nil {
1956			return err
1957		}
1958	}
1959
1960	return nil
1961}
1962
1963type awsRestjson1_serializeOpTagResource struct {
1964}
1965
1966func (*awsRestjson1_serializeOpTagResource) ID() string {
1967	return "OperationSerializer"
1968}
1969
1970func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1971	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1972) {
1973	request, ok := in.Request.(*smithyhttp.Request)
1974	if !ok {
1975		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1976	}
1977
1978	input, ok := in.Parameters.(*TagResourceInput)
1979	_ = input
1980	if !ok {
1981		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1982	}
1983
1984	opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}")
1985	request.URL.Path = opPath
1986	if len(request.URL.RawQuery) > 0 {
1987		request.URL.RawQuery = "&" + opQuery
1988	} else {
1989		request.URL.RawQuery = opQuery
1990	}
1991
1992	request.Method = "POST"
1993	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1994	if err != nil {
1995		return out, metadata, &smithy.SerializationError{Err: err}
1996	}
1997
1998	if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
1999		return out, metadata, &smithy.SerializationError{Err: err}
2000	}
2001
2002	restEncoder.SetHeader("Content-Type").String("application/json")
2003
2004	jsonEncoder := smithyjson.NewEncoder()
2005	if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
2006		return out, metadata, &smithy.SerializationError{Err: err}
2007	}
2008
2009	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2010		return out, metadata, &smithy.SerializationError{Err: err}
2011	}
2012
2013	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2014		return out, metadata, &smithy.SerializationError{Err: err}
2015	}
2016	in.Request = request
2017
2018	return next.HandleSerialize(ctx, in)
2019}
2020func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
2021	if v == nil {
2022		return fmt.Errorf("unsupported serialization of nil %T", v)
2023	}
2024
2025	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
2026		return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")}
2027	}
2028	if v.ResourceArn != nil {
2029		if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil {
2030			return err
2031		}
2032	}
2033
2034	return nil
2035}
2036
2037func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
2038	object := value.Object()
2039	defer object.Close()
2040
2041	if v.Tags != nil {
2042		ok := object.Key("tags")
2043		if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
2044			return err
2045		}
2046	}
2047
2048	return nil
2049}
2050
2051type awsRestjson1_serializeOpUntagResource struct {
2052}
2053
2054func (*awsRestjson1_serializeOpUntagResource) ID() string {
2055	return "OperationSerializer"
2056}
2057
2058func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2059	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2060) {
2061	request, ok := in.Request.(*smithyhttp.Request)
2062	if !ok {
2063		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2064	}
2065
2066	input, ok := in.Parameters.(*UntagResourceInput)
2067	_ = input
2068	if !ok {
2069		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2070	}
2071
2072	opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}")
2073	request.URL.Path = opPath
2074	if len(request.URL.RawQuery) > 0 {
2075		request.URL.RawQuery = "&" + opQuery
2076	} else {
2077		request.URL.RawQuery = opQuery
2078	}
2079
2080	request.Method = "DELETE"
2081	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2082	if err != nil {
2083		return out, metadata, &smithy.SerializationError{Err: err}
2084	}
2085
2086	if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
2087		return out, metadata, &smithy.SerializationError{Err: err}
2088	}
2089
2090	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2091		return out, metadata, &smithy.SerializationError{Err: err}
2092	}
2093	in.Request = request
2094
2095	return next.HandleSerialize(ctx, in)
2096}
2097func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
2098	if v == nil {
2099		return fmt.Errorf("unsupported serialization of nil %T", v)
2100	}
2101
2102	if v.ResourceArn == nil || len(*v.ResourceArn) == 0 {
2103		return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")}
2104	}
2105	if v.ResourceArn != nil {
2106		if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil {
2107			return err
2108		}
2109	}
2110
2111	if v.TagKeys != nil {
2112		for i := range v.TagKeys {
2113			encoder.AddQuery("tagKeys").String(v.TagKeys[i])
2114		}
2115	}
2116
2117	return nil
2118}
2119
2120type awsRestjson1_serializeOpUpdateDiscoverer struct {
2121}
2122
2123func (*awsRestjson1_serializeOpUpdateDiscoverer) ID() string {
2124	return "OperationSerializer"
2125}
2126
2127func (m *awsRestjson1_serializeOpUpdateDiscoverer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2128	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2129) {
2130	request, ok := in.Request.(*smithyhttp.Request)
2131	if !ok {
2132		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2133	}
2134
2135	input, ok := in.Parameters.(*UpdateDiscovererInput)
2136	_ = input
2137	if !ok {
2138		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2139	}
2140
2141	opPath, opQuery := httpbinding.SplitURI("/v1/discoverers/id/{DiscovererId}")
2142	request.URL.Path = opPath
2143	if len(request.URL.RawQuery) > 0 {
2144		request.URL.RawQuery = "&" + opQuery
2145	} else {
2146		request.URL.RawQuery = opQuery
2147	}
2148
2149	request.Method = "PUT"
2150	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2151	if err != nil {
2152		return out, metadata, &smithy.SerializationError{Err: err}
2153	}
2154
2155	if err := awsRestjson1_serializeOpHttpBindingsUpdateDiscovererInput(input, restEncoder); err != nil {
2156		return out, metadata, &smithy.SerializationError{Err: err}
2157	}
2158
2159	restEncoder.SetHeader("Content-Type").String("application/json")
2160
2161	jsonEncoder := smithyjson.NewEncoder()
2162	if err := awsRestjson1_serializeOpDocumentUpdateDiscovererInput(input, jsonEncoder.Value); err != nil {
2163		return out, metadata, &smithy.SerializationError{Err: err}
2164	}
2165
2166	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); 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_serializeOpHttpBindingsUpdateDiscovererInput(v *UpdateDiscovererInput, encoder *httpbinding.Encoder) error {
2178	if v == nil {
2179		return fmt.Errorf("unsupported serialization of nil %T", v)
2180	}
2181
2182	if v.DiscovererId == nil || len(*v.DiscovererId) == 0 {
2183		return &smithy.SerializationError{Err: fmt.Errorf("input member DiscovererId must not be empty")}
2184	}
2185	if v.DiscovererId != nil {
2186		if err := encoder.SetURI("DiscovererId").String(*v.DiscovererId); err != nil {
2187			return err
2188		}
2189	}
2190
2191	return nil
2192}
2193
2194func awsRestjson1_serializeOpDocumentUpdateDiscovererInput(v *UpdateDiscovererInput, value smithyjson.Value) error {
2195	object := value.Object()
2196	defer object.Close()
2197
2198	if v.Description != nil {
2199		ok := object.Key("Description")
2200		ok.String(*v.Description)
2201	}
2202
2203	return nil
2204}
2205
2206type awsRestjson1_serializeOpUpdateRegistry struct {
2207}
2208
2209func (*awsRestjson1_serializeOpUpdateRegistry) ID() string {
2210	return "OperationSerializer"
2211}
2212
2213func (m *awsRestjson1_serializeOpUpdateRegistry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2214	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2215) {
2216	request, ok := in.Request.(*smithyhttp.Request)
2217	if !ok {
2218		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2219	}
2220
2221	input, ok := in.Parameters.(*UpdateRegistryInput)
2222	_ = input
2223	if !ok {
2224		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2225	}
2226
2227	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}")
2228	request.URL.Path = opPath
2229	if len(request.URL.RawQuery) > 0 {
2230		request.URL.RawQuery = "&" + opQuery
2231	} else {
2232		request.URL.RawQuery = opQuery
2233	}
2234
2235	request.Method = "PUT"
2236	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2237	if err != nil {
2238		return out, metadata, &smithy.SerializationError{Err: err}
2239	}
2240
2241	if err := awsRestjson1_serializeOpHttpBindingsUpdateRegistryInput(input, restEncoder); err != nil {
2242		return out, metadata, &smithy.SerializationError{Err: err}
2243	}
2244
2245	restEncoder.SetHeader("Content-Type").String("application/json")
2246
2247	jsonEncoder := smithyjson.NewEncoder()
2248	if err := awsRestjson1_serializeOpDocumentUpdateRegistryInput(input, jsonEncoder.Value); err != nil {
2249		return out, metadata, &smithy.SerializationError{Err: err}
2250	}
2251
2252	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2253		return out, metadata, &smithy.SerializationError{Err: err}
2254	}
2255
2256	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2257		return out, metadata, &smithy.SerializationError{Err: err}
2258	}
2259	in.Request = request
2260
2261	return next.HandleSerialize(ctx, in)
2262}
2263func awsRestjson1_serializeOpHttpBindingsUpdateRegistryInput(v *UpdateRegistryInput, encoder *httpbinding.Encoder) error {
2264	if v == nil {
2265		return fmt.Errorf("unsupported serialization of nil %T", v)
2266	}
2267
2268	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
2269		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
2270	}
2271	if v.RegistryName != nil {
2272		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
2273			return err
2274		}
2275	}
2276
2277	return nil
2278}
2279
2280func awsRestjson1_serializeOpDocumentUpdateRegistryInput(v *UpdateRegistryInput, value smithyjson.Value) error {
2281	object := value.Object()
2282	defer object.Close()
2283
2284	if v.Description != nil {
2285		ok := object.Key("Description")
2286		ok.String(*v.Description)
2287	}
2288
2289	return nil
2290}
2291
2292type awsRestjson1_serializeOpUpdateSchema struct {
2293}
2294
2295func (*awsRestjson1_serializeOpUpdateSchema) ID() string {
2296	return "OperationSerializer"
2297}
2298
2299func (m *awsRestjson1_serializeOpUpdateSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2300	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2301) {
2302	request, ok := in.Request.(*smithyhttp.Request)
2303	if !ok {
2304		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2305	}
2306
2307	input, ok := in.Parameters.(*UpdateSchemaInput)
2308	_ = input
2309	if !ok {
2310		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2311	}
2312
2313	opPath, opQuery := httpbinding.SplitURI("/v1/registries/name/{RegistryName}/schemas/name/{SchemaName}")
2314	request.URL.Path = opPath
2315	if len(request.URL.RawQuery) > 0 {
2316		request.URL.RawQuery = "&" + opQuery
2317	} else {
2318		request.URL.RawQuery = opQuery
2319	}
2320
2321	request.Method = "PUT"
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_serializeOpHttpBindingsUpdateSchemaInput(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_serializeOpDocumentUpdateSchemaInput(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_serializeOpHttpBindingsUpdateSchemaInput(v *UpdateSchemaInput, encoder *httpbinding.Encoder) error {
2350	if v == nil {
2351		return fmt.Errorf("unsupported serialization of nil %T", v)
2352	}
2353
2354	if v.RegistryName == nil || len(*v.RegistryName) == 0 {
2355		return &smithy.SerializationError{Err: fmt.Errorf("input member RegistryName must not be empty")}
2356	}
2357	if v.RegistryName != nil {
2358		if err := encoder.SetURI("RegistryName").String(*v.RegistryName); err != nil {
2359			return err
2360		}
2361	}
2362
2363	if v.SchemaName == nil || len(*v.SchemaName) == 0 {
2364		return &smithy.SerializationError{Err: fmt.Errorf("input member SchemaName must not be empty")}
2365	}
2366	if v.SchemaName != nil {
2367		if err := encoder.SetURI("SchemaName").String(*v.SchemaName); err != nil {
2368			return err
2369		}
2370	}
2371
2372	return nil
2373}
2374
2375func awsRestjson1_serializeOpDocumentUpdateSchemaInput(v *UpdateSchemaInput, value smithyjson.Value) error {
2376	object := value.Object()
2377	defer object.Close()
2378
2379	if v.ClientTokenId != nil {
2380		ok := object.Key("ClientTokenId")
2381		ok.String(*v.ClientTokenId)
2382	}
2383
2384	if v.Content != nil {
2385		ok := object.Key("Content")
2386		ok.String(*v.Content)
2387	}
2388
2389	if v.Description != nil {
2390		ok := object.Key("Description")
2391		ok.String(*v.Description)
2392	}
2393
2394	if len(v.Type) > 0 {
2395		ok := object.Key("Type")
2396		ok.String(string(v.Type))
2397	}
2398
2399	return nil
2400}
2401
2402func awsRestjson1_serializeDocument__listOfGetDiscoveredSchemaVersionItemInput(v []string, value smithyjson.Value) error {
2403	array := value.Array()
2404	defer array.Close()
2405
2406	for i := range v {
2407		av := array.Value()
2408		av.String(v[i])
2409	}
2410	return nil
2411}
2412
2413func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error {
2414	object := value.Object()
2415	defer object.Close()
2416
2417	for key := range v {
2418		om := object.Key(key)
2419		om.String(v[key])
2420	}
2421	return nil
2422}
2423