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