1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package lexmodelsv2
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/lexmodelsv2/types"
10	smithy "github.com/aws/smithy-go"
11	"github.com/aws/smithy-go/encoding/httpbinding"
12	smithyjson "github.com/aws/smithy-go/encoding/json"
13	"github.com/aws/smithy-go/middleware"
14	smithyhttp "github.com/aws/smithy-go/transport/http"
15)
16
17type awsRestjson1_serializeOpBuildBotLocale struct {
18}
19
20func (*awsRestjson1_serializeOpBuildBotLocale) ID() string {
21	return "OperationSerializer"
22}
23
24func (m *awsRestjson1_serializeOpBuildBotLocale) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
25	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
26) {
27	request, ok := in.Request.(*smithyhttp.Request)
28	if !ok {
29		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
30	}
31
32	input, ok := in.Parameters.(*BuildBotLocaleInput)
33	_ = input
34	if !ok {
35		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
36	}
37
38	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}")
39	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
40	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
41	request.Method = "POST"
42	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
43	if err != nil {
44		return out, metadata, &smithy.SerializationError{Err: err}
45	}
46
47	if err := awsRestjson1_serializeOpHttpBindingsBuildBotLocaleInput(input, restEncoder); err != nil {
48		return out, metadata, &smithy.SerializationError{Err: err}
49	}
50
51	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
52		return out, metadata, &smithy.SerializationError{Err: err}
53	}
54	in.Request = request
55
56	return next.HandleSerialize(ctx, in)
57}
58func awsRestjson1_serializeOpHttpBindingsBuildBotLocaleInput(v *BuildBotLocaleInput, encoder *httpbinding.Encoder) error {
59	if v == nil {
60		return fmt.Errorf("unsupported serialization of nil %T", v)
61	}
62
63	if v.BotId == nil || len(*v.BotId) == 0 {
64		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
65	}
66	if v.BotId != nil {
67		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
68			return err
69		}
70	}
71
72	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
73		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
74	}
75	if v.BotVersion != nil {
76		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
77			return err
78		}
79	}
80
81	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
82		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
83	}
84	if v.LocaleId != nil {
85		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
86			return err
87		}
88	}
89
90	return nil
91}
92
93type awsRestjson1_serializeOpCreateBot struct {
94}
95
96func (*awsRestjson1_serializeOpCreateBot) ID() string {
97	return "OperationSerializer"
98}
99
100func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
101	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
102) {
103	request, ok := in.Request.(*smithyhttp.Request)
104	if !ok {
105		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
106	}
107
108	input, ok := in.Parameters.(*CreateBotInput)
109	_ = input
110	if !ok {
111		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
112	}
113
114	opPath, opQuery := httpbinding.SplitURI("/bots")
115	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
116	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
117	request.Method = "PUT"
118	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
119	if err != nil {
120		return out, metadata, &smithy.SerializationError{Err: err}
121	}
122
123	restEncoder.SetHeader("Content-Type").String("application/json")
124
125	jsonEncoder := smithyjson.NewEncoder()
126	if err := awsRestjson1_serializeOpDocumentCreateBotInput(input, jsonEncoder.Value); err != nil {
127		return out, metadata, &smithy.SerializationError{Err: err}
128	}
129
130	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
131		return out, metadata, &smithy.SerializationError{Err: err}
132	}
133
134	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
135		return out, metadata, &smithy.SerializationError{Err: err}
136	}
137	in.Request = request
138
139	return next.HandleSerialize(ctx, in)
140}
141func awsRestjson1_serializeOpHttpBindingsCreateBotInput(v *CreateBotInput, encoder *httpbinding.Encoder) error {
142	if v == nil {
143		return fmt.Errorf("unsupported serialization of nil %T", v)
144	}
145
146	return nil
147}
148
149func awsRestjson1_serializeOpDocumentCreateBotInput(v *CreateBotInput, value smithyjson.Value) error {
150	object := value.Object()
151	defer object.Close()
152
153	if v.BotName != nil {
154		ok := object.Key("botName")
155		ok.String(*v.BotName)
156	}
157
158	if v.BotTags != nil {
159		ok := object.Key("botTags")
160		if err := awsRestjson1_serializeDocumentTagMap(v.BotTags, ok); err != nil {
161			return err
162		}
163	}
164
165	if v.DataPrivacy != nil {
166		ok := object.Key("dataPrivacy")
167		if err := awsRestjson1_serializeDocumentDataPrivacy(v.DataPrivacy, ok); err != nil {
168			return err
169		}
170	}
171
172	if v.Description != nil {
173		ok := object.Key("description")
174		ok.String(*v.Description)
175	}
176
177	if v.IdleSessionTTLInSeconds != nil {
178		ok := object.Key("idleSessionTTLInSeconds")
179		ok.Integer(*v.IdleSessionTTLInSeconds)
180	}
181
182	if v.RoleArn != nil {
183		ok := object.Key("roleArn")
184		ok.String(*v.RoleArn)
185	}
186
187	if v.TestBotAliasTags != nil {
188		ok := object.Key("testBotAliasTags")
189		if err := awsRestjson1_serializeDocumentTagMap(v.TestBotAliasTags, ok); err != nil {
190			return err
191		}
192	}
193
194	return nil
195}
196
197type awsRestjson1_serializeOpCreateBotAlias struct {
198}
199
200func (*awsRestjson1_serializeOpCreateBotAlias) ID() string {
201	return "OperationSerializer"
202}
203
204func (m *awsRestjson1_serializeOpCreateBotAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
205	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
206) {
207	request, ok := in.Request.(*smithyhttp.Request)
208	if !ok {
209		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
210	}
211
212	input, ok := in.Parameters.(*CreateBotAliasInput)
213	_ = input
214	if !ok {
215		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
216	}
217
218	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botaliases")
219	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
220	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
221	request.Method = "PUT"
222	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
223	if err != nil {
224		return out, metadata, &smithy.SerializationError{Err: err}
225	}
226
227	if err := awsRestjson1_serializeOpHttpBindingsCreateBotAliasInput(input, restEncoder); err != nil {
228		return out, metadata, &smithy.SerializationError{Err: err}
229	}
230
231	restEncoder.SetHeader("Content-Type").String("application/json")
232
233	jsonEncoder := smithyjson.NewEncoder()
234	if err := awsRestjson1_serializeOpDocumentCreateBotAliasInput(input, jsonEncoder.Value); err != nil {
235		return out, metadata, &smithy.SerializationError{Err: err}
236	}
237
238	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
239		return out, metadata, &smithy.SerializationError{Err: err}
240	}
241
242	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
243		return out, metadata, &smithy.SerializationError{Err: err}
244	}
245	in.Request = request
246
247	return next.HandleSerialize(ctx, in)
248}
249func awsRestjson1_serializeOpHttpBindingsCreateBotAliasInput(v *CreateBotAliasInput, encoder *httpbinding.Encoder) error {
250	if v == nil {
251		return fmt.Errorf("unsupported serialization of nil %T", v)
252	}
253
254	if v.BotId == nil || len(*v.BotId) == 0 {
255		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
256	}
257	if v.BotId != nil {
258		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
259			return err
260		}
261	}
262
263	return nil
264}
265
266func awsRestjson1_serializeOpDocumentCreateBotAliasInput(v *CreateBotAliasInput, value smithyjson.Value) error {
267	object := value.Object()
268	defer object.Close()
269
270	if v.BotAliasLocaleSettings != nil {
271		ok := object.Key("botAliasLocaleSettings")
272		if err := awsRestjson1_serializeDocumentBotAliasLocaleSettingsMap(v.BotAliasLocaleSettings, ok); err != nil {
273			return err
274		}
275	}
276
277	if v.BotAliasName != nil {
278		ok := object.Key("botAliasName")
279		ok.String(*v.BotAliasName)
280	}
281
282	if v.BotVersion != nil {
283		ok := object.Key("botVersion")
284		ok.String(*v.BotVersion)
285	}
286
287	if v.ConversationLogSettings != nil {
288		ok := object.Key("conversationLogSettings")
289		if err := awsRestjson1_serializeDocumentConversationLogSettings(v.ConversationLogSettings, ok); err != nil {
290			return err
291		}
292	}
293
294	if v.Description != nil {
295		ok := object.Key("description")
296		ok.String(*v.Description)
297	}
298
299	if v.SentimentAnalysisSettings != nil {
300		ok := object.Key("sentimentAnalysisSettings")
301		if err := awsRestjson1_serializeDocumentSentimentAnalysisSettings(v.SentimentAnalysisSettings, ok); err != nil {
302			return err
303		}
304	}
305
306	if v.Tags != nil {
307		ok := object.Key("tags")
308		if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
309			return err
310		}
311	}
312
313	return nil
314}
315
316type awsRestjson1_serializeOpCreateBotLocale struct {
317}
318
319func (*awsRestjson1_serializeOpCreateBotLocale) ID() string {
320	return "OperationSerializer"
321}
322
323func (m *awsRestjson1_serializeOpCreateBotLocale) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
324	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
325) {
326	request, ok := in.Request.(*smithyhttp.Request)
327	if !ok {
328		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
329	}
330
331	input, ok := in.Parameters.(*CreateBotLocaleInput)
332	_ = input
333	if !ok {
334		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
335	}
336
337	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales")
338	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
339	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
340	request.Method = "PUT"
341	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
342	if err != nil {
343		return out, metadata, &smithy.SerializationError{Err: err}
344	}
345
346	if err := awsRestjson1_serializeOpHttpBindingsCreateBotLocaleInput(input, restEncoder); err != nil {
347		return out, metadata, &smithy.SerializationError{Err: err}
348	}
349
350	restEncoder.SetHeader("Content-Type").String("application/json")
351
352	jsonEncoder := smithyjson.NewEncoder()
353	if err := awsRestjson1_serializeOpDocumentCreateBotLocaleInput(input, jsonEncoder.Value); err != nil {
354		return out, metadata, &smithy.SerializationError{Err: err}
355	}
356
357	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
358		return out, metadata, &smithy.SerializationError{Err: err}
359	}
360
361	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
362		return out, metadata, &smithy.SerializationError{Err: err}
363	}
364	in.Request = request
365
366	return next.HandleSerialize(ctx, in)
367}
368func awsRestjson1_serializeOpHttpBindingsCreateBotLocaleInput(v *CreateBotLocaleInput, encoder *httpbinding.Encoder) error {
369	if v == nil {
370		return fmt.Errorf("unsupported serialization of nil %T", v)
371	}
372
373	if v.BotId == nil || len(*v.BotId) == 0 {
374		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
375	}
376	if v.BotId != nil {
377		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
378			return err
379		}
380	}
381
382	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
383		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
384	}
385	if v.BotVersion != nil {
386		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
387			return err
388		}
389	}
390
391	return nil
392}
393
394func awsRestjson1_serializeOpDocumentCreateBotLocaleInput(v *CreateBotLocaleInput, value smithyjson.Value) error {
395	object := value.Object()
396	defer object.Close()
397
398	if v.Description != nil {
399		ok := object.Key("description")
400		ok.String(*v.Description)
401	}
402
403	if v.LocaleId != nil {
404		ok := object.Key("localeId")
405		ok.String(*v.LocaleId)
406	}
407
408	if v.NluIntentConfidenceThreshold != nil {
409		ok := object.Key("nluIntentConfidenceThreshold")
410		ok.Double(*v.NluIntentConfidenceThreshold)
411	}
412
413	if v.VoiceSettings != nil {
414		ok := object.Key("voiceSettings")
415		if err := awsRestjson1_serializeDocumentVoiceSettings(v.VoiceSettings, ok); err != nil {
416			return err
417		}
418	}
419
420	return nil
421}
422
423type awsRestjson1_serializeOpCreateBotVersion struct {
424}
425
426func (*awsRestjson1_serializeOpCreateBotVersion) ID() string {
427	return "OperationSerializer"
428}
429
430func (m *awsRestjson1_serializeOpCreateBotVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
431	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
432) {
433	request, ok := in.Request.(*smithyhttp.Request)
434	if !ok {
435		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
436	}
437
438	input, ok := in.Parameters.(*CreateBotVersionInput)
439	_ = input
440	if !ok {
441		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
442	}
443
444	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions")
445	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
446	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
447	request.Method = "PUT"
448	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
449	if err != nil {
450		return out, metadata, &smithy.SerializationError{Err: err}
451	}
452
453	if err := awsRestjson1_serializeOpHttpBindingsCreateBotVersionInput(input, restEncoder); err != nil {
454		return out, metadata, &smithy.SerializationError{Err: err}
455	}
456
457	restEncoder.SetHeader("Content-Type").String("application/json")
458
459	jsonEncoder := smithyjson.NewEncoder()
460	if err := awsRestjson1_serializeOpDocumentCreateBotVersionInput(input, jsonEncoder.Value); err != nil {
461		return out, metadata, &smithy.SerializationError{Err: err}
462	}
463
464	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
465		return out, metadata, &smithy.SerializationError{Err: err}
466	}
467
468	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
469		return out, metadata, &smithy.SerializationError{Err: err}
470	}
471	in.Request = request
472
473	return next.HandleSerialize(ctx, in)
474}
475func awsRestjson1_serializeOpHttpBindingsCreateBotVersionInput(v *CreateBotVersionInput, encoder *httpbinding.Encoder) error {
476	if v == nil {
477		return fmt.Errorf("unsupported serialization of nil %T", v)
478	}
479
480	if v.BotId == nil || len(*v.BotId) == 0 {
481		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
482	}
483	if v.BotId != nil {
484		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
485			return err
486		}
487	}
488
489	return nil
490}
491
492func awsRestjson1_serializeOpDocumentCreateBotVersionInput(v *CreateBotVersionInput, value smithyjson.Value) error {
493	object := value.Object()
494	defer object.Close()
495
496	if v.BotVersionLocaleSpecification != nil {
497		ok := object.Key("botVersionLocaleSpecification")
498		if err := awsRestjson1_serializeDocumentBotVersionLocaleSpecification(v.BotVersionLocaleSpecification, ok); err != nil {
499			return err
500		}
501	}
502
503	if v.Description != nil {
504		ok := object.Key("description")
505		ok.String(*v.Description)
506	}
507
508	return nil
509}
510
511type awsRestjson1_serializeOpCreateIntent struct {
512}
513
514func (*awsRestjson1_serializeOpCreateIntent) ID() string {
515	return "OperationSerializer"
516}
517
518func (m *awsRestjson1_serializeOpCreateIntent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
519	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
520) {
521	request, ok := in.Request.(*smithyhttp.Request)
522	if !ok {
523		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
524	}
525
526	input, ok := in.Parameters.(*CreateIntentInput)
527	_ = input
528	if !ok {
529		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
530	}
531
532	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents")
533	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
534	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
535	request.Method = "PUT"
536	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
537	if err != nil {
538		return out, metadata, &smithy.SerializationError{Err: err}
539	}
540
541	if err := awsRestjson1_serializeOpHttpBindingsCreateIntentInput(input, restEncoder); err != nil {
542		return out, metadata, &smithy.SerializationError{Err: err}
543	}
544
545	restEncoder.SetHeader("Content-Type").String("application/json")
546
547	jsonEncoder := smithyjson.NewEncoder()
548	if err := awsRestjson1_serializeOpDocumentCreateIntentInput(input, jsonEncoder.Value); err != nil {
549		return out, metadata, &smithy.SerializationError{Err: err}
550	}
551
552	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
553		return out, metadata, &smithy.SerializationError{Err: err}
554	}
555
556	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
557		return out, metadata, &smithy.SerializationError{Err: err}
558	}
559	in.Request = request
560
561	return next.HandleSerialize(ctx, in)
562}
563func awsRestjson1_serializeOpHttpBindingsCreateIntentInput(v *CreateIntentInput, encoder *httpbinding.Encoder) error {
564	if v == nil {
565		return fmt.Errorf("unsupported serialization of nil %T", v)
566	}
567
568	if v.BotId == nil || len(*v.BotId) == 0 {
569		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
570	}
571	if v.BotId != nil {
572		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
573			return err
574		}
575	}
576
577	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
578		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
579	}
580	if v.BotVersion != nil {
581		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
582			return err
583		}
584	}
585
586	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
587		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
588	}
589	if v.LocaleId != nil {
590		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
591			return err
592		}
593	}
594
595	return nil
596}
597
598func awsRestjson1_serializeOpDocumentCreateIntentInput(v *CreateIntentInput, value smithyjson.Value) error {
599	object := value.Object()
600	defer object.Close()
601
602	if v.Description != nil {
603		ok := object.Key("description")
604		ok.String(*v.Description)
605	}
606
607	if v.DialogCodeHook != nil {
608		ok := object.Key("dialogCodeHook")
609		if err := awsRestjson1_serializeDocumentDialogCodeHookSettings(v.DialogCodeHook, ok); err != nil {
610			return err
611		}
612	}
613
614	if v.FulfillmentCodeHook != nil {
615		ok := object.Key("fulfillmentCodeHook")
616		if err := awsRestjson1_serializeDocumentFulfillmentCodeHookSettings(v.FulfillmentCodeHook, ok); err != nil {
617			return err
618		}
619	}
620
621	if v.InputContexts != nil {
622		ok := object.Key("inputContexts")
623		if err := awsRestjson1_serializeDocumentInputContextsList(v.InputContexts, ok); err != nil {
624			return err
625		}
626	}
627
628	if v.IntentClosingSetting != nil {
629		ok := object.Key("intentClosingSetting")
630		if err := awsRestjson1_serializeDocumentIntentClosingSetting(v.IntentClosingSetting, ok); err != nil {
631			return err
632		}
633	}
634
635	if v.IntentConfirmationSetting != nil {
636		ok := object.Key("intentConfirmationSetting")
637		if err := awsRestjson1_serializeDocumentIntentConfirmationSetting(v.IntentConfirmationSetting, ok); err != nil {
638			return err
639		}
640	}
641
642	if v.IntentName != nil {
643		ok := object.Key("intentName")
644		ok.String(*v.IntentName)
645	}
646
647	if v.KendraConfiguration != nil {
648		ok := object.Key("kendraConfiguration")
649		if err := awsRestjson1_serializeDocumentKendraConfiguration(v.KendraConfiguration, ok); err != nil {
650			return err
651		}
652	}
653
654	if v.OutputContexts != nil {
655		ok := object.Key("outputContexts")
656		if err := awsRestjson1_serializeDocumentOutputContextsList(v.OutputContexts, ok); err != nil {
657			return err
658		}
659	}
660
661	if v.ParentIntentSignature != nil {
662		ok := object.Key("parentIntentSignature")
663		ok.String(*v.ParentIntentSignature)
664	}
665
666	if v.SampleUtterances != nil {
667		ok := object.Key("sampleUtterances")
668		if err := awsRestjson1_serializeDocumentSampleUtterancesList(v.SampleUtterances, ok); err != nil {
669			return err
670		}
671	}
672
673	return nil
674}
675
676type awsRestjson1_serializeOpCreateSlot struct {
677}
678
679func (*awsRestjson1_serializeOpCreateSlot) ID() string {
680	return "OperationSerializer"
681}
682
683func (m *awsRestjson1_serializeOpCreateSlot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
684	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
685) {
686	request, ok := in.Request.(*smithyhttp.Request)
687	if !ok {
688		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
689	}
690
691	input, ok := in.Parameters.(*CreateSlotInput)
692	_ = input
693	if !ok {
694		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
695	}
696
697	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots")
698	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
699	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
700	request.Method = "PUT"
701	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
702	if err != nil {
703		return out, metadata, &smithy.SerializationError{Err: err}
704	}
705
706	if err := awsRestjson1_serializeOpHttpBindingsCreateSlotInput(input, restEncoder); err != nil {
707		return out, metadata, &smithy.SerializationError{Err: err}
708	}
709
710	restEncoder.SetHeader("Content-Type").String("application/json")
711
712	jsonEncoder := smithyjson.NewEncoder()
713	if err := awsRestjson1_serializeOpDocumentCreateSlotInput(input, jsonEncoder.Value); err != nil {
714		return out, metadata, &smithy.SerializationError{Err: err}
715	}
716
717	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
718		return out, metadata, &smithy.SerializationError{Err: err}
719	}
720
721	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
722		return out, metadata, &smithy.SerializationError{Err: err}
723	}
724	in.Request = request
725
726	return next.HandleSerialize(ctx, in)
727}
728func awsRestjson1_serializeOpHttpBindingsCreateSlotInput(v *CreateSlotInput, encoder *httpbinding.Encoder) error {
729	if v == nil {
730		return fmt.Errorf("unsupported serialization of nil %T", v)
731	}
732
733	if v.BotId == nil || len(*v.BotId) == 0 {
734		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
735	}
736	if v.BotId != nil {
737		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
738			return err
739		}
740	}
741
742	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
743		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
744	}
745	if v.BotVersion != nil {
746		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
747			return err
748		}
749	}
750
751	if v.IntentId == nil || len(*v.IntentId) == 0 {
752		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
753	}
754	if v.IntentId != nil {
755		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
756			return err
757		}
758	}
759
760	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
761		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
762	}
763	if v.LocaleId != nil {
764		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
765			return err
766		}
767	}
768
769	return nil
770}
771
772func awsRestjson1_serializeOpDocumentCreateSlotInput(v *CreateSlotInput, value smithyjson.Value) error {
773	object := value.Object()
774	defer object.Close()
775
776	if v.Description != nil {
777		ok := object.Key("description")
778		ok.String(*v.Description)
779	}
780
781	if v.ObfuscationSetting != nil {
782		ok := object.Key("obfuscationSetting")
783		if err := awsRestjson1_serializeDocumentObfuscationSetting(v.ObfuscationSetting, ok); err != nil {
784			return err
785		}
786	}
787
788	if v.SlotName != nil {
789		ok := object.Key("slotName")
790		ok.String(*v.SlotName)
791	}
792
793	if v.SlotTypeId != nil {
794		ok := object.Key("slotTypeId")
795		ok.String(*v.SlotTypeId)
796	}
797
798	if v.ValueElicitationSetting != nil {
799		ok := object.Key("valueElicitationSetting")
800		if err := awsRestjson1_serializeDocumentSlotValueElicitationSetting(v.ValueElicitationSetting, ok); err != nil {
801			return err
802		}
803	}
804
805	return nil
806}
807
808type awsRestjson1_serializeOpCreateSlotType struct {
809}
810
811func (*awsRestjson1_serializeOpCreateSlotType) ID() string {
812	return "OperationSerializer"
813}
814
815func (m *awsRestjson1_serializeOpCreateSlotType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
816	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
817) {
818	request, ok := in.Request.(*smithyhttp.Request)
819	if !ok {
820		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
821	}
822
823	input, ok := in.Parameters.(*CreateSlotTypeInput)
824	_ = input
825	if !ok {
826		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
827	}
828
829	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes")
830	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
831	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
832	request.Method = "PUT"
833	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
834	if err != nil {
835		return out, metadata, &smithy.SerializationError{Err: err}
836	}
837
838	if err := awsRestjson1_serializeOpHttpBindingsCreateSlotTypeInput(input, restEncoder); err != nil {
839		return out, metadata, &smithy.SerializationError{Err: err}
840	}
841
842	restEncoder.SetHeader("Content-Type").String("application/json")
843
844	jsonEncoder := smithyjson.NewEncoder()
845	if err := awsRestjson1_serializeOpDocumentCreateSlotTypeInput(input, jsonEncoder.Value); err != nil {
846		return out, metadata, &smithy.SerializationError{Err: err}
847	}
848
849	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
850		return out, metadata, &smithy.SerializationError{Err: err}
851	}
852
853	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
854		return out, metadata, &smithy.SerializationError{Err: err}
855	}
856	in.Request = request
857
858	return next.HandleSerialize(ctx, in)
859}
860func awsRestjson1_serializeOpHttpBindingsCreateSlotTypeInput(v *CreateSlotTypeInput, encoder *httpbinding.Encoder) error {
861	if v == nil {
862		return fmt.Errorf("unsupported serialization of nil %T", v)
863	}
864
865	if v.BotId == nil || len(*v.BotId) == 0 {
866		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
867	}
868	if v.BotId != nil {
869		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
870			return err
871		}
872	}
873
874	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
875		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
876	}
877	if v.BotVersion != nil {
878		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
879			return err
880		}
881	}
882
883	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
884		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
885	}
886	if v.LocaleId != nil {
887		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
888			return err
889		}
890	}
891
892	return nil
893}
894
895func awsRestjson1_serializeOpDocumentCreateSlotTypeInput(v *CreateSlotTypeInput, value smithyjson.Value) error {
896	object := value.Object()
897	defer object.Close()
898
899	if v.Description != nil {
900		ok := object.Key("description")
901		ok.String(*v.Description)
902	}
903
904	if v.ParentSlotTypeSignature != nil {
905		ok := object.Key("parentSlotTypeSignature")
906		ok.String(*v.ParentSlotTypeSignature)
907	}
908
909	if v.SlotTypeName != nil {
910		ok := object.Key("slotTypeName")
911		ok.String(*v.SlotTypeName)
912	}
913
914	if v.SlotTypeValues != nil {
915		ok := object.Key("slotTypeValues")
916		if err := awsRestjson1_serializeDocumentSlotTypeValues(v.SlotTypeValues, ok); err != nil {
917			return err
918		}
919	}
920
921	if v.ValueSelectionSetting != nil {
922		ok := object.Key("valueSelectionSetting")
923		if err := awsRestjson1_serializeDocumentSlotValueSelectionSetting(v.ValueSelectionSetting, ok); err != nil {
924			return err
925		}
926	}
927
928	return nil
929}
930
931type awsRestjson1_serializeOpDeleteBot struct {
932}
933
934func (*awsRestjson1_serializeOpDeleteBot) ID() string {
935	return "OperationSerializer"
936}
937
938func (m *awsRestjson1_serializeOpDeleteBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
939	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
940) {
941	request, ok := in.Request.(*smithyhttp.Request)
942	if !ok {
943		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
944	}
945
946	input, ok := in.Parameters.(*DeleteBotInput)
947	_ = input
948	if !ok {
949		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
950	}
951
952	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}")
953	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
954	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
955	request.Method = "DELETE"
956	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
957	if err != nil {
958		return out, metadata, &smithy.SerializationError{Err: err}
959	}
960
961	if err := awsRestjson1_serializeOpHttpBindingsDeleteBotInput(input, restEncoder); err != nil {
962		return out, metadata, &smithy.SerializationError{Err: err}
963	}
964
965	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
966		return out, metadata, &smithy.SerializationError{Err: err}
967	}
968	in.Request = request
969
970	return next.HandleSerialize(ctx, in)
971}
972func awsRestjson1_serializeOpHttpBindingsDeleteBotInput(v *DeleteBotInput, encoder *httpbinding.Encoder) error {
973	if v == nil {
974		return fmt.Errorf("unsupported serialization of nil %T", v)
975	}
976
977	if v.BotId == nil || len(*v.BotId) == 0 {
978		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
979	}
980	if v.BotId != nil {
981		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
982			return err
983		}
984	}
985
986	if v.SkipResourceInUseCheck {
987		encoder.SetQuery("skipResourceInUseCheck").Boolean(v.SkipResourceInUseCheck)
988	}
989
990	return nil
991}
992
993type awsRestjson1_serializeOpDeleteBotAlias struct {
994}
995
996func (*awsRestjson1_serializeOpDeleteBotAlias) ID() string {
997	return "OperationSerializer"
998}
999
1000func (m *awsRestjson1_serializeOpDeleteBotAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1001	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1002) {
1003	request, ok := in.Request.(*smithyhttp.Request)
1004	if !ok {
1005		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1006	}
1007
1008	input, ok := in.Parameters.(*DeleteBotAliasInput)
1009	_ = input
1010	if !ok {
1011		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1012	}
1013
1014	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botaliases/{botAliasId}")
1015	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1016	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1017	request.Method = "DELETE"
1018	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1019	if err != nil {
1020		return out, metadata, &smithy.SerializationError{Err: err}
1021	}
1022
1023	if err := awsRestjson1_serializeOpHttpBindingsDeleteBotAliasInput(input, restEncoder); err != nil {
1024		return out, metadata, &smithy.SerializationError{Err: err}
1025	}
1026
1027	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1028		return out, metadata, &smithy.SerializationError{Err: err}
1029	}
1030	in.Request = request
1031
1032	return next.HandleSerialize(ctx, in)
1033}
1034func awsRestjson1_serializeOpHttpBindingsDeleteBotAliasInput(v *DeleteBotAliasInput, encoder *httpbinding.Encoder) error {
1035	if v == nil {
1036		return fmt.Errorf("unsupported serialization of nil %T", v)
1037	}
1038
1039	if v.BotAliasId == nil || len(*v.BotAliasId) == 0 {
1040		return &smithy.SerializationError{Err: fmt.Errorf("input member botAliasId must not be empty")}
1041	}
1042	if v.BotAliasId != nil {
1043		if err := encoder.SetURI("botAliasId").String(*v.BotAliasId); err != nil {
1044			return err
1045		}
1046	}
1047
1048	if v.BotId == nil || len(*v.BotId) == 0 {
1049		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1050	}
1051	if v.BotId != nil {
1052		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1053			return err
1054		}
1055	}
1056
1057	if v.SkipResourceInUseCheck {
1058		encoder.SetQuery("skipResourceInUseCheck").Boolean(v.SkipResourceInUseCheck)
1059	}
1060
1061	return nil
1062}
1063
1064type awsRestjson1_serializeOpDeleteBotLocale struct {
1065}
1066
1067func (*awsRestjson1_serializeOpDeleteBotLocale) ID() string {
1068	return "OperationSerializer"
1069}
1070
1071func (m *awsRestjson1_serializeOpDeleteBotLocale) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1072	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1073) {
1074	request, ok := in.Request.(*smithyhttp.Request)
1075	if !ok {
1076		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1077	}
1078
1079	input, ok := in.Parameters.(*DeleteBotLocaleInput)
1080	_ = input
1081	if !ok {
1082		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1083	}
1084
1085	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}")
1086	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1087	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1088	request.Method = "DELETE"
1089	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1090	if err != nil {
1091		return out, metadata, &smithy.SerializationError{Err: err}
1092	}
1093
1094	if err := awsRestjson1_serializeOpHttpBindingsDeleteBotLocaleInput(input, restEncoder); err != nil {
1095		return out, metadata, &smithy.SerializationError{Err: err}
1096	}
1097
1098	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1099		return out, metadata, &smithy.SerializationError{Err: err}
1100	}
1101	in.Request = request
1102
1103	return next.HandleSerialize(ctx, in)
1104}
1105func awsRestjson1_serializeOpHttpBindingsDeleteBotLocaleInput(v *DeleteBotLocaleInput, encoder *httpbinding.Encoder) error {
1106	if v == nil {
1107		return fmt.Errorf("unsupported serialization of nil %T", v)
1108	}
1109
1110	if v.BotId == nil || len(*v.BotId) == 0 {
1111		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1112	}
1113	if v.BotId != nil {
1114		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1115			return err
1116		}
1117	}
1118
1119	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1120		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1121	}
1122	if v.BotVersion != nil {
1123		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1124			return err
1125		}
1126	}
1127
1128	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1129		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1130	}
1131	if v.LocaleId != nil {
1132		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1133			return err
1134		}
1135	}
1136
1137	return nil
1138}
1139
1140type awsRestjson1_serializeOpDeleteBotVersion struct {
1141}
1142
1143func (*awsRestjson1_serializeOpDeleteBotVersion) ID() string {
1144	return "OperationSerializer"
1145}
1146
1147func (m *awsRestjson1_serializeOpDeleteBotVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1148	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1149) {
1150	request, ok := in.Request.(*smithyhttp.Request)
1151	if !ok {
1152		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1153	}
1154
1155	input, ok := in.Parameters.(*DeleteBotVersionInput)
1156	_ = input
1157	if !ok {
1158		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1159	}
1160
1161	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}")
1162	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1163	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1164	request.Method = "DELETE"
1165	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1166	if err != nil {
1167		return out, metadata, &smithy.SerializationError{Err: err}
1168	}
1169
1170	if err := awsRestjson1_serializeOpHttpBindingsDeleteBotVersionInput(input, restEncoder); err != nil {
1171		return out, metadata, &smithy.SerializationError{Err: err}
1172	}
1173
1174	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1175		return out, metadata, &smithy.SerializationError{Err: err}
1176	}
1177	in.Request = request
1178
1179	return next.HandleSerialize(ctx, in)
1180}
1181func awsRestjson1_serializeOpHttpBindingsDeleteBotVersionInput(v *DeleteBotVersionInput, encoder *httpbinding.Encoder) error {
1182	if v == nil {
1183		return fmt.Errorf("unsupported serialization of nil %T", v)
1184	}
1185
1186	if v.BotId == nil || len(*v.BotId) == 0 {
1187		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1188	}
1189	if v.BotId != nil {
1190		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1191			return err
1192		}
1193	}
1194
1195	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1196		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1197	}
1198	if v.BotVersion != nil {
1199		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1200			return err
1201		}
1202	}
1203
1204	if v.SkipResourceInUseCheck {
1205		encoder.SetQuery("skipResourceInUseCheck").Boolean(v.SkipResourceInUseCheck)
1206	}
1207
1208	return nil
1209}
1210
1211type awsRestjson1_serializeOpDeleteIntent struct {
1212}
1213
1214func (*awsRestjson1_serializeOpDeleteIntent) ID() string {
1215	return "OperationSerializer"
1216}
1217
1218func (m *awsRestjson1_serializeOpDeleteIntent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1219	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1220) {
1221	request, ok := in.Request.(*smithyhttp.Request)
1222	if !ok {
1223		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1224	}
1225
1226	input, ok := in.Parameters.(*DeleteIntentInput)
1227	_ = input
1228	if !ok {
1229		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1230	}
1231
1232	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}")
1233	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1234	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1235	request.Method = "DELETE"
1236	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1237	if err != nil {
1238		return out, metadata, &smithy.SerializationError{Err: err}
1239	}
1240
1241	if err := awsRestjson1_serializeOpHttpBindingsDeleteIntentInput(input, restEncoder); err != nil {
1242		return out, metadata, &smithy.SerializationError{Err: err}
1243	}
1244
1245	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1246		return out, metadata, &smithy.SerializationError{Err: err}
1247	}
1248	in.Request = request
1249
1250	return next.HandleSerialize(ctx, in)
1251}
1252func awsRestjson1_serializeOpHttpBindingsDeleteIntentInput(v *DeleteIntentInput, encoder *httpbinding.Encoder) error {
1253	if v == nil {
1254		return fmt.Errorf("unsupported serialization of nil %T", v)
1255	}
1256
1257	if v.BotId == nil || len(*v.BotId) == 0 {
1258		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1259	}
1260	if v.BotId != nil {
1261		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1262			return err
1263		}
1264	}
1265
1266	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1267		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1268	}
1269	if v.BotVersion != nil {
1270		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1271			return err
1272		}
1273	}
1274
1275	if v.IntentId == nil || len(*v.IntentId) == 0 {
1276		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
1277	}
1278	if v.IntentId != nil {
1279		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
1280			return err
1281		}
1282	}
1283
1284	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1285		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1286	}
1287	if v.LocaleId != nil {
1288		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1289			return err
1290		}
1291	}
1292
1293	return nil
1294}
1295
1296type awsRestjson1_serializeOpDeleteSlot struct {
1297}
1298
1299func (*awsRestjson1_serializeOpDeleteSlot) ID() string {
1300	return "OperationSerializer"
1301}
1302
1303func (m *awsRestjson1_serializeOpDeleteSlot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1304	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1305) {
1306	request, ok := in.Request.(*smithyhttp.Request)
1307	if !ok {
1308		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1309	}
1310
1311	input, ok := in.Parameters.(*DeleteSlotInput)
1312	_ = input
1313	if !ok {
1314		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1315	}
1316
1317	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots/{slotId}")
1318	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1319	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1320	request.Method = "DELETE"
1321	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1322	if err != nil {
1323		return out, metadata, &smithy.SerializationError{Err: err}
1324	}
1325
1326	if err := awsRestjson1_serializeOpHttpBindingsDeleteSlotInput(input, restEncoder); err != nil {
1327		return out, metadata, &smithy.SerializationError{Err: err}
1328	}
1329
1330	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1331		return out, metadata, &smithy.SerializationError{Err: err}
1332	}
1333	in.Request = request
1334
1335	return next.HandleSerialize(ctx, in)
1336}
1337func awsRestjson1_serializeOpHttpBindingsDeleteSlotInput(v *DeleteSlotInput, encoder *httpbinding.Encoder) error {
1338	if v == nil {
1339		return fmt.Errorf("unsupported serialization of nil %T", v)
1340	}
1341
1342	if v.BotId == nil || len(*v.BotId) == 0 {
1343		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1344	}
1345	if v.BotId != nil {
1346		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1347			return err
1348		}
1349	}
1350
1351	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1352		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1353	}
1354	if v.BotVersion != nil {
1355		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1356			return err
1357		}
1358	}
1359
1360	if v.IntentId == nil || len(*v.IntentId) == 0 {
1361		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
1362	}
1363	if v.IntentId != nil {
1364		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
1365			return err
1366		}
1367	}
1368
1369	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1370		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1371	}
1372	if v.LocaleId != nil {
1373		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1374			return err
1375		}
1376	}
1377
1378	if v.SlotId == nil || len(*v.SlotId) == 0 {
1379		return &smithy.SerializationError{Err: fmt.Errorf("input member slotId must not be empty")}
1380	}
1381	if v.SlotId != nil {
1382		if err := encoder.SetURI("slotId").String(*v.SlotId); err != nil {
1383			return err
1384		}
1385	}
1386
1387	return nil
1388}
1389
1390type awsRestjson1_serializeOpDeleteSlotType struct {
1391}
1392
1393func (*awsRestjson1_serializeOpDeleteSlotType) ID() string {
1394	return "OperationSerializer"
1395}
1396
1397func (m *awsRestjson1_serializeOpDeleteSlotType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1398	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1399) {
1400	request, ok := in.Request.(*smithyhttp.Request)
1401	if !ok {
1402		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1403	}
1404
1405	input, ok := in.Parameters.(*DeleteSlotTypeInput)
1406	_ = input
1407	if !ok {
1408		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1409	}
1410
1411	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes/{slotTypeId}")
1412	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1413	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1414	request.Method = "DELETE"
1415	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1416	if err != nil {
1417		return out, metadata, &smithy.SerializationError{Err: err}
1418	}
1419
1420	if err := awsRestjson1_serializeOpHttpBindingsDeleteSlotTypeInput(input, restEncoder); err != nil {
1421		return out, metadata, &smithy.SerializationError{Err: err}
1422	}
1423
1424	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1425		return out, metadata, &smithy.SerializationError{Err: err}
1426	}
1427	in.Request = request
1428
1429	return next.HandleSerialize(ctx, in)
1430}
1431func awsRestjson1_serializeOpHttpBindingsDeleteSlotTypeInput(v *DeleteSlotTypeInput, encoder *httpbinding.Encoder) error {
1432	if v == nil {
1433		return fmt.Errorf("unsupported serialization of nil %T", v)
1434	}
1435
1436	if v.BotId == nil || len(*v.BotId) == 0 {
1437		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1438	}
1439	if v.BotId != nil {
1440		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1441			return err
1442		}
1443	}
1444
1445	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1446		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1447	}
1448	if v.BotVersion != nil {
1449		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1450			return err
1451		}
1452	}
1453
1454	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1455		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1456	}
1457	if v.LocaleId != nil {
1458		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1459			return err
1460		}
1461	}
1462
1463	if v.SkipResourceInUseCheck {
1464		encoder.SetQuery("skipResourceInUseCheck").Boolean(v.SkipResourceInUseCheck)
1465	}
1466
1467	if v.SlotTypeId == nil || len(*v.SlotTypeId) == 0 {
1468		return &smithy.SerializationError{Err: fmt.Errorf("input member slotTypeId must not be empty")}
1469	}
1470	if v.SlotTypeId != nil {
1471		if err := encoder.SetURI("slotTypeId").String(*v.SlotTypeId); err != nil {
1472			return err
1473		}
1474	}
1475
1476	return nil
1477}
1478
1479type awsRestjson1_serializeOpDescribeBot struct {
1480}
1481
1482func (*awsRestjson1_serializeOpDescribeBot) ID() string {
1483	return "OperationSerializer"
1484}
1485
1486func (m *awsRestjson1_serializeOpDescribeBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1487	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1488) {
1489	request, ok := in.Request.(*smithyhttp.Request)
1490	if !ok {
1491		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1492	}
1493
1494	input, ok := in.Parameters.(*DescribeBotInput)
1495	_ = input
1496	if !ok {
1497		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1498	}
1499
1500	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}")
1501	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1502	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1503	request.Method = "GET"
1504	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1505	if err != nil {
1506		return out, metadata, &smithy.SerializationError{Err: err}
1507	}
1508
1509	if err := awsRestjson1_serializeOpHttpBindingsDescribeBotInput(input, restEncoder); err != nil {
1510		return out, metadata, &smithy.SerializationError{Err: err}
1511	}
1512
1513	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1514		return out, metadata, &smithy.SerializationError{Err: err}
1515	}
1516	in.Request = request
1517
1518	return next.HandleSerialize(ctx, in)
1519}
1520func awsRestjson1_serializeOpHttpBindingsDescribeBotInput(v *DescribeBotInput, encoder *httpbinding.Encoder) error {
1521	if v == nil {
1522		return fmt.Errorf("unsupported serialization of nil %T", v)
1523	}
1524
1525	if v.BotId == nil || len(*v.BotId) == 0 {
1526		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1527	}
1528	if v.BotId != nil {
1529		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1530			return err
1531		}
1532	}
1533
1534	return nil
1535}
1536
1537type awsRestjson1_serializeOpDescribeBotAlias struct {
1538}
1539
1540func (*awsRestjson1_serializeOpDescribeBotAlias) ID() string {
1541	return "OperationSerializer"
1542}
1543
1544func (m *awsRestjson1_serializeOpDescribeBotAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1545	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1546) {
1547	request, ok := in.Request.(*smithyhttp.Request)
1548	if !ok {
1549		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1550	}
1551
1552	input, ok := in.Parameters.(*DescribeBotAliasInput)
1553	_ = input
1554	if !ok {
1555		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1556	}
1557
1558	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botaliases/{botAliasId}")
1559	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1560	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1561	request.Method = "GET"
1562	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1563	if err != nil {
1564		return out, metadata, &smithy.SerializationError{Err: err}
1565	}
1566
1567	if err := awsRestjson1_serializeOpHttpBindingsDescribeBotAliasInput(input, restEncoder); err != nil {
1568		return out, metadata, &smithy.SerializationError{Err: err}
1569	}
1570
1571	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1572		return out, metadata, &smithy.SerializationError{Err: err}
1573	}
1574	in.Request = request
1575
1576	return next.HandleSerialize(ctx, in)
1577}
1578func awsRestjson1_serializeOpHttpBindingsDescribeBotAliasInput(v *DescribeBotAliasInput, encoder *httpbinding.Encoder) error {
1579	if v == nil {
1580		return fmt.Errorf("unsupported serialization of nil %T", v)
1581	}
1582
1583	if v.BotAliasId == nil || len(*v.BotAliasId) == 0 {
1584		return &smithy.SerializationError{Err: fmt.Errorf("input member botAliasId must not be empty")}
1585	}
1586	if v.BotAliasId != nil {
1587		if err := encoder.SetURI("botAliasId").String(*v.BotAliasId); err != nil {
1588			return err
1589		}
1590	}
1591
1592	if v.BotId == nil || len(*v.BotId) == 0 {
1593		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1594	}
1595	if v.BotId != nil {
1596		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1597			return err
1598		}
1599	}
1600
1601	return nil
1602}
1603
1604type awsRestjson1_serializeOpDescribeBotLocale struct {
1605}
1606
1607func (*awsRestjson1_serializeOpDescribeBotLocale) ID() string {
1608	return "OperationSerializer"
1609}
1610
1611func (m *awsRestjson1_serializeOpDescribeBotLocale) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1612	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1613) {
1614	request, ok := in.Request.(*smithyhttp.Request)
1615	if !ok {
1616		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1617	}
1618
1619	input, ok := in.Parameters.(*DescribeBotLocaleInput)
1620	_ = input
1621	if !ok {
1622		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1623	}
1624
1625	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}")
1626	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1627	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1628	request.Method = "GET"
1629	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1630	if err != nil {
1631		return out, metadata, &smithy.SerializationError{Err: err}
1632	}
1633
1634	if err := awsRestjson1_serializeOpHttpBindingsDescribeBotLocaleInput(input, restEncoder); err != nil {
1635		return out, metadata, &smithy.SerializationError{Err: err}
1636	}
1637
1638	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1639		return out, metadata, &smithy.SerializationError{Err: err}
1640	}
1641	in.Request = request
1642
1643	return next.HandleSerialize(ctx, in)
1644}
1645func awsRestjson1_serializeOpHttpBindingsDescribeBotLocaleInput(v *DescribeBotLocaleInput, encoder *httpbinding.Encoder) error {
1646	if v == nil {
1647		return fmt.Errorf("unsupported serialization of nil %T", v)
1648	}
1649
1650	if v.BotId == nil || len(*v.BotId) == 0 {
1651		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1652	}
1653	if v.BotId != nil {
1654		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1655			return err
1656		}
1657	}
1658
1659	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1660		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1661	}
1662	if v.BotVersion != nil {
1663		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1664			return err
1665		}
1666	}
1667
1668	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1669		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1670	}
1671	if v.LocaleId != nil {
1672		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1673			return err
1674		}
1675	}
1676
1677	return nil
1678}
1679
1680type awsRestjson1_serializeOpDescribeBotVersion struct {
1681}
1682
1683func (*awsRestjson1_serializeOpDescribeBotVersion) ID() string {
1684	return "OperationSerializer"
1685}
1686
1687func (m *awsRestjson1_serializeOpDescribeBotVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1688	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1689) {
1690	request, ok := in.Request.(*smithyhttp.Request)
1691	if !ok {
1692		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1693	}
1694
1695	input, ok := in.Parameters.(*DescribeBotVersionInput)
1696	_ = input
1697	if !ok {
1698		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1699	}
1700
1701	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}")
1702	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1703	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1704	request.Method = "GET"
1705	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1706	if err != nil {
1707		return out, metadata, &smithy.SerializationError{Err: err}
1708	}
1709
1710	if err := awsRestjson1_serializeOpHttpBindingsDescribeBotVersionInput(input, restEncoder); err != nil {
1711		return out, metadata, &smithy.SerializationError{Err: err}
1712	}
1713
1714	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1715		return out, metadata, &smithy.SerializationError{Err: err}
1716	}
1717	in.Request = request
1718
1719	return next.HandleSerialize(ctx, in)
1720}
1721func awsRestjson1_serializeOpHttpBindingsDescribeBotVersionInput(v *DescribeBotVersionInput, encoder *httpbinding.Encoder) error {
1722	if v == nil {
1723		return fmt.Errorf("unsupported serialization of nil %T", v)
1724	}
1725
1726	if v.BotId == nil || len(*v.BotId) == 0 {
1727		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1728	}
1729	if v.BotId != nil {
1730		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1731			return err
1732		}
1733	}
1734
1735	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1736		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1737	}
1738	if v.BotVersion != nil {
1739		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1740			return err
1741		}
1742	}
1743
1744	return nil
1745}
1746
1747type awsRestjson1_serializeOpDescribeIntent struct {
1748}
1749
1750func (*awsRestjson1_serializeOpDescribeIntent) ID() string {
1751	return "OperationSerializer"
1752}
1753
1754func (m *awsRestjson1_serializeOpDescribeIntent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1755	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1756) {
1757	request, ok := in.Request.(*smithyhttp.Request)
1758	if !ok {
1759		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1760	}
1761
1762	input, ok := in.Parameters.(*DescribeIntentInput)
1763	_ = input
1764	if !ok {
1765		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1766	}
1767
1768	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}")
1769	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1770	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1771	request.Method = "GET"
1772	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1773	if err != nil {
1774		return out, metadata, &smithy.SerializationError{Err: err}
1775	}
1776
1777	if err := awsRestjson1_serializeOpHttpBindingsDescribeIntentInput(input, restEncoder); err != nil {
1778		return out, metadata, &smithy.SerializationError{Err: err}
1779	}
1780
1781	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1782		return out, metadata, &smithy.SerializationError{Err: err}
1783	}
1784	in.Request = request
1785
1786	return next.HandleSerialize(ctx, in)
1787}
1788func awsRestjson1_serializeOpHttpBindingsDescribeIntentInput(v *DescribeIntentInput, encoder *httpbinding.Encoder) error {
1789	if v == nil {
1790		return fmt.Errorf("unsupported serialization of nil %T", v)
1791	}
1792
1793	if v.BotId == nil || len(*v.BotId) == 0 {
1794		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1795	}
1796	if v.BotId != nil {
1797		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1798			return err
1799		}
1800	}
1801
1802	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1803		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1804	}
1805	if v.BotVersion != nil {
1806		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1807			return err
1808		}
1809	}
1810
1811	if v.IntentId == nil || len(*v.IntentId) == 0 {
1812		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
1813	}
1814	if v.IntentId != nil {
1815		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
1816			return err
1817		}
1818	}
1819
1820	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1821		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1822	}
1823	if v.LocaleId != nil {
1824		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1825			return err
1826		}
1827	}
1828
1829	return nil
1830}
1831
1832type awsRestjson1_serializeOpDescribeSlot struct {
1833}
1834
1835func (*awsRestjson1_serializeOpDescribeSlot) ID() string {
1836	return "OperationSerializer"
1837}
1838
1839func (m *awsRestjson1_serializeOpDescribeSlot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1840	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1841) {
1842	request, ok := in.Request.(*smithyhttp.Request)
1843	if !ok {
1844		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1845	}
1846
1847	input, ok := in.Parameters.(*DescribeSlotInput)
1848	_ = input
1849	if !ok {
1850		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1851	}
1852
1853	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots/{slotId}")
1854	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1855	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1856	request.Method = "GET"
1857	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1858	if err != nil {
1859		return out, metadata, &smithy.SerializationError{Err: err}
1860	}
1861
1862	if err := awsRestjson1_serializeOpHttpBindingsDescribeSlotInput(input, restEncoder); err != nil {
1863		return out, metadata, &smithy.SerializationError{Err: err}
1864	}
1865
1866	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1867		return out, metadata, &smithy.SerializationError{Err: err}
1868	}
1869	in.Request = request
1870
1871	return next.HandleSerialize(ctx, in)
1872}
1873func awsRestjson1_serializeOpHttpBindingsDescribeSlotInput(v *DescribeSlotInput, encoder *httpbinding.Encoder) error {
1874	if v == nil {
1875		return fmt.Errorf("unsupported serialization of nil %T", v)
1876	}
1877
1878	if v.BotId == nil || len(*v.BotId) == 0 {
1879		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1880	}
1881	if v.BotId != nil {
1882		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1883			return err
1884		}
1885	}
1886
1887	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1888		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1889	}
1890	if v.BotVersion != nil {
1891		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1892			return err
1893		}
1894	}
1895
1896	if v.IntentId == nil || len(*v.IntentId) == 0 {
1897		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
1898	}
1899	if v.IntentId != nil {
1900		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
1901			return err
1902		}
1903	}
1904
1905	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1906		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1907	}
1908	if v.LocaleId != nil {
1909		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1910			return err
1911		}
1912	}
1913
1914	if v.SlotId == nil || len(*v.SlotId) == 0 {
1915		return &smithy.SerializationError{Err: fmt.Errorf("input member slotId must not be empty")}
1916	}
1917	if v.SlotId != nil {
1918		if err := encoder.SetURI("slotId").String(*v.SlotId); err != nil {
1919			return err
1920		}
1921	}
1922
1923	return nil
1924}
1925
1926type awsRestjson1_serializeOpDescribeSlotType struct {
1927}
1928
1929func (*awsRestjson1_serializeOpDescribeSlotType) ID() string {
1930	return "OperationSerializer"
1931}
1932
1933func (m *awsRestjson1_serializeOpDescribeSlotType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1934	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1935) {
1936	request, ok := in.Request.(*smithyhttp.Request)
1937	if !ok {
1938		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1939	}
1940
1941	input, ok := in.Parameters.(*DescribeSlotTypeInput)
1942	_ = input
1943	if !ok {
1944		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1945	}
1946
1947	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes/{slotTypeId}")
1948	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1949	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1950	request.Method = "GET"
1951	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1952	if err != nil {
1953		return out, metadata, &smithy.SerializationError{Err: err}
1954	}
1955
1956	if err := awsRestjson1_serializeOpHttpBindingsDescribeSlotTypeInput(input, restEncoder); err != nil {
1957		return out, metadata, &smithy.SerializationError{Err: err}
1958	}
1959
1960	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1961		return out, metadata, &smithy.SerializationError{Err: err}
1962	}
1963	in.Request = request
1964
1965	return next.HandleSerialize(ctx, in)
1966}
1967func awsRestjson1_serializeOpHttpBindingsDescribeSlotTypeInput(v *DescribeSlotTypeInput, encoder *httpbinding.Encoder) error {
1968	if v == nil {
1969		return fmt.Errorf("unsupported serialization of nil %T", v)
1970	}
1971
1972	if v.BotId == nil || len(*v.BotId) == 0 {
1973		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
1974	}
1975	if v.BotId != nil {
1976		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
1977			return err
1978		}
1979	}
1980
1981	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
1982		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
1983	}
1984	if v.BotVersion != nil {
1985		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
1986			return err
1987		}
1988	}
1989
1990	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
1991		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
1992	}
1993	if v.LocaleId != nil {
1994		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
1995			return err
1996		}
1997	}
1998
1999	if v.SlotTypeId == nil || len(*v.SlotTypeId) == 0 {
2000		return &smithy.SerializationError{Err: fmt.Errorf("input member slotTypeId must not be empty")}
2001	}
2002	if v.SlotTypeId != nil {
2003		if err := encoder.SetURI("slotTypeId").String(*v.SlotTypeId); err != nil {
2004			return err
2005		}
2006	}
2007
2008	return nil
2009}
2010
2011type awsRestjson1_serializeOpListBotAliases struct {
2012}
2013
2014func (*awsRestjson1_serializeOpListBotAliases) ID() string {
2015	return "OperationSerializer"
2016}
2017
2018func (m *awsRestjson1_serializeOpListBotAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2019	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2020) {
2021	request, ok := in.Request.(*smithyhttp.Request)
2022	if !ok {
2023		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2024	}
2025
2026	input, ok := in.Parameters.(*ListBotAliasesInput)
2027	_ = input
2028	if !ok {
2029		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2030	}
2031
2032	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botaliases")
2033	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2034	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2035	request.Method = "POST"
2036	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2037	if err != nil {
2038		return out, metadata, &smithy.SerializationError{Err: err}
2039	}
2040
2041	if err := awsRestjson1_serializeOpHttpBindingsListBotAliasesInput(input, restEncoder); err != nil {
2042		return out, metadata, &smithy.SerializationError{Err: err}
2043	}
2044
2045	restEncoder.SetHeader("Content-Type").String("application/json")
2046
2047	jsonEncoder := smithyjson.NewEncoder()
2048	if err := awsRestjson1_serializeOpDocumentListBotAliasesInput(input, jsonEncoder.Value); err != nil {
2049		return out, metadata, &smithy.SerializationError{Err: err}
2050	}
2051
2052	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2053		return out, metadata, &smithy.SerializationError{Err: err}
2054	}
2055
2056	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2057		return out, metadata, &smithy.SerializationError{Err: err}
2058	}
2059	in.Request = request
2060
2061	return next.HandleSerialize(ctx, in)
2062}
2063func awsRestjson1_serializeOpHttpBindingsListBotAliasesInput(v *ListBotAliasesInput, encoder *httpbinding.Encoder) error {
2064	if v == nil {
2065		return fmt.Errorf("unsupported serialization of nil %T", v)
2066	}
2067
2068	if v.BotId == nil || len(*v.BotId) == 0 {
2069		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2070	}
2071	if v.BotId != nil {
2072		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2073			return err
2074		}
2075	}
2076
2077	return nil
2078}
2079
2080func awsRestjson1_serializeOpDocumentListBotAliasesInput(v *ListBotAliasesInput, value smithyjson.Value) error {
2081	object := value.Object()
2082	defer object.Close()
2083
2084	if v.MaxResults != nil {
2085		ok := object.Key("maxResults")
2086		ok.Integer(*v.MaxResults)
2087	}
2088
2089	if v.NextToken != nil {
2090		ok := object.Key("nextToken")
2091		ok.String(*v.NextToken)
2092	}
2093
2094	return nil
2095}
2096
2097type awsRestjson1_serializeOpListBotLocales struct {
2098}
2099
2100func (*awsRestjson1_serializeOpListBotLocales) ID() string {
2101	return "OperationSerializer"
2102}
2103
2104func (m *awsRestjson1_serializeOpListBotLocales) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2105	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2106) {
2107	request, ok := in.Request.(*smithyhttp.Request)
2108	if !ok {
2109		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2110	}
2111
2112	input, ok := in.Parameters.(*ListBotLocalesInput)
2113	_ = input
2114	if !ok {
2115		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2116	}
2117
2118	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales")
2119	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2120	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2121	request.Method = "POST"
2122	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2123	if err != nil {
2124		return out, metadata, &smithy.SerializationError{Err: err}
2125	}
2126
2127	if err := awsRestjson1_serializeOpHttpBindingsListBotLocalesInput(input, restEncoder); err != nil {
2128		return out, metadata, &smithy.SerializationError{Err: err}
2129	}
2130
2131	restEncoder.SetHeader("Content-Type").String("application/json")
2132
2133	jsonEncoder := smithyjson.NewEncoder()
2134	if err := awsRestjson1_serializeOpDocumentListBotLocalesInput(input, jsonEncoder.Value); err != nil {
2135		return out, metadata, &smithy.SerializationError{Err: err}
2136	}
2137
2138	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2139		return out, metadata, &smithy.SerializationError{Err: err}
2140	}
2141
2142	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2143		return out, metadata, &smithy.SerializationError{Err: err}
2144	}
2145	in.Request = request
2146
2147	return next.HandleSerialize(ctx, in)
2148}
2149func awsRestjson1_serializeOpHttpBindingsListBotLocalesInput(v *ListBotLocalesInput, encoder *httpbinding.Encoder) error {
2150	if v == nil {
2151		return fmt.Errorf("unsupported serialization of nil %T", v)
2152	}
2153
2154	if v.BotId == nil || len(*v.BotId) == 0 {
2155		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2156	}
2157	if v.BotId != nil {
2158		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2159			return err
2160		}
2161	}
2162
2163	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
2164		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
2165	}
2166	if v.BotVersion != nil {
2167		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
2168			return err
2169		}
2170	}
2171
2172	return nil
2173}
2174
2175func awsRestjson1_serializeOpDocumentListBotLocalesInput(v *ListBotLocalesInput, value smithyjson.Value) error {
2176	object := value.Object()
2177	defer object.Close()
2178
2179	if v.Filters != nil {
2180		ok := object.Key("filters")
2181		if err := awsRestjson1_serializeDocumentBotLocaleFilters(v.Filters, ok); err != nil {
2182			return err
2183		}
2184	}
2185
2186	if v.MaxResults != nil {
2187		ok := object.Key("maxResults")
2188		ok.Integer(*v.MaxResults)
2189	}
2190
2191	if v.NextToken != nil {
2192		ok := object.Key("nextToken")
2193		ok.String(*v.NextToken)
2194	}
2195
2196	if v.SortBy != nil {
2197		ok := object.Key("sortBy")
2198		if err := awsRestjson1_serializeDocumentBotLocaleSortBy(v.SortBy, ok); err != nil {
2199			return err
2200		}
2201	}
2202
2203	return nil
2204}
2205
2206type awsRestjson1_serializeOpListBots struct {
2207}
2208
2209func (*awsRestjson1_serializeOpListBots) ID() string {
2210	return "OperationSerializer"
2211}
2212
2213func (m *awsRestjson1_serializeOpListBots) 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.(*ListBotsInput)
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("/bots")
2228	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2229	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2230	request.Method = "POST"
2231	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2232	if err != nil {
2233		return out, metadata, &smithy.SerializationError{Err: err}
2234	}
2235
2236	restEncoder.SetHeader("Content-Type").String("application/json")
2237
2238	jsonEncoder := smithyjson.NewEncoder()
2239	if err := awsRestjson1_serializeOpDocumentListBotsInput(input, jsonEncoder.Value); err != nil {
2240		return out, metadata, &smithy.SerializationError{Err: err}
2241	}
2242
2243	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2244		return out, metadata, &smithy.SerializationError{Err: err}
2245	}
2246
2247	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2248		return out, metadata, &smithy.SerializationError{Err: err}
2249	}
2250	in.Request = request
2251
2252	return next.HandleSerialize(ctx, in)
2253}
2254func awsRestjson1_serializeOpHttpBindingsListBotsInput(v *ListBotsInput, encoder *httpbinding.Encoder) error {
2255	if v == nil {
2256		return fmt.Errorf("unsupported serialization of nil %T", v)
2257	}
2258
2259	return nil
2260}
2261
2262func awsRestjson1_serializeOpDocumentListBotsInput(v *ListBotsInput, value smithyjson.Value) error {
2263	object := value.Object()
2264	defer object.Close()
2265
2266	if v.Filters != nil {
2267		ok := object.Key("filters")
2268		if err := awsRestjson1_serializeDocumentBotFilters(v.Filters, ok); err != nil {
2269			return err
2270		}
2271	}
2272
2273	if v.MaxResults != nil {
2274		ok := object.Key("maxResults")
2275		ok.Integer(*v.MaxResults)
2276	}
2277
2278	if v.NextToken != nil {
2279		ok := object.Key("nextToken")
2280		ok.String(*v.NextToken)
2281	}
2282
2283	if v.SortBy != nil {
2284		ok := object.Key("sortBy")
2285		if err := awsRestjson1_serializeDocumentBotSortBy(v.SortBy, ok); err != nil {
2286			return err
2287		}
2288	}
2289
2290	return nil
2291}
2292
2293type awsRestjson1_serializeOpListBotVersions struct {
2294}
2295
2296func (*awsRestjson1_serializeOpListBotVersions) ID() string {
2297	return "OperationSerializer"
2298}
2299
2300func (m *awsRestjson1_serializeOpListBotVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2301	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2302) {
2303	request, ok := in.Request.(*smithyhttp.Request)
2304	if !ok {
2305		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2306	}
2307
2308	input, ok := in.Parameters.(*ListBotVersionsInput)
2309	_ = input
2310	if !ok {
2311		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2312	}
2313
2314	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions")
2315	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2316	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2317	request.Method = "POST"
2318	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2319	if err != nil {
2320		return out, metadata, &smithy.SerializationError{Err: err}
2321	}
2322
2323	if err := awsRestjson1_serializeOpHttpBindingsListBotVersionsInput(input, restEncoder); err != nil {
2324		return out, metadata, &smithy.SerializationError{Err: err}
2325	}
2326
2327	restEncoder.SetHeader("Content-Type").String("application/json")
2328
2329	jsonEncoder := smithyjson.NewEncoder()
2330	if err := awsRestjson1_serializeOpDocumentListBotVersionsInput(input, jsonEncoder.Value); err != nil {
2331		return out, metadata, &smithy.SerializationError{Err: err}
2332	}
2333
2334	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2335		return out, metadata, &smithy.SerializationError{Err: err}
2336	}
2337
2338	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2339		return out, metadata, &smithy.SerializationError{Err: err}
2340	}
2341	in.Request = request
2342
2343	return next.HandleSerialize(ctx, in)
2344}
2345func awsRestjson1_serializeOpHttpBindingsListBotVersionsInput(v *ListBotVersionsInput, encoder *httpbinding.Encoder) error {
2346	if v == nil {
2347		return fmt.Errorf("unsupported serialization of nil %T", v)
2348	}
2349
2350	if v.BotId == nil || len(*v.BotId) == 0 {
2351		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2352	}
2353	if v.BotId != nil {
2354		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2355			return err
2356		}
2357	}
2358
2359	return nil
2360}
2361
2362func awsRestjson1_serializeOpDocumentListBotVersionsInput(v *ListBotVersionsInput, value smithyjson.Value) error {
2363	object := value.Object()
2364	defer object.Close()
2365
2366	if v.MaxResults != nil {
2367		ok := object.Key("maxResults")
2368		ok.Integer(*v.MaxResults)
2369	}
2370
2371	if v.NextToken != nil {
2372		ok := object.Key("nextToken")
2373		ok.String(*v.NextToken)
2374	}
2375
2376	if v.SortBy != nil {
2377		ok := object.Key("sortBy")
2378		if err := awsRestjson1_serializeDocumentBotVersionSortBy(v.SortBy, ok); err != nil {
2379			return err
2380		}
2381	}
2382
2383	return nil
2384}
2385
2386type awsRestjson1_serializeOpListBuiltInIntents struct {
2387}
2388
2389func (*awsRestjson1_serializeOpListBuiltInIntents) ID() string {
2390	return "OperationSerializer"
2391}
2392
2393func (m *awsRestjson1_serializeOpListBuiltInIntents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2394	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2395) {
2396	request, ok := in.Request.(*smithyhttp.Request)
2397	if !ok {
2398		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2399	}
2400
2401	input, ok := in.Parameters.(*ListBuiltInIntentsInput)
2402	_ = input
2403	if !ok {
2404		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2405	}
2406
2407	opPath, opQuery := httpbinding.SplitURI("/builtins/locales/{localeId}/intents")
2408	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2409	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2410	request.Method = "POST"
2411	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2412	if err != nil {
2413		return out, metadata, &smithy.SerializationError{Err: err}
2414	}
2415
2416	if err := awsRestjson1_serializeOpHttpBindingsListBuiltInIntentsInput(input, restEncoder); err != nil {
2417		return out, metadata, &smithy.SerializationError{Err: err}
2418	}
2419
2420	restEncoder.SetHeader("Content-Type").String("application/json")
2421
2422	jsonEncoder := smithyjson.NewEncoder()
2423	if err := awsRestjson1_serializeOpDocumentListBuiltInIntentsInput(input, jsonEncoder.Value); err != nil {
2424		return out, metadata, &smithy.SerializationError{Err: err}
2425	}
2426
2427	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2428		return out, metadata, &smithy.SerializationError{Err: err}
2429	}
2430
2431	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2432		return out, metadata, &smithy.SerializationError{Err: err}
2433	}
2434	in.Request = request
2435
2436	return next.HandleSerialize(ctx, in)
2437}
2438func awsRestjson1_serializeOpHttpBindingsListBuiltInIntentsInput(v *ListBuiltInIntentsInput, encoder *httpbinding.Encoder) error {
2439	if v == nil {
2440		return fmt.Errorf("unsupported serialization of nil %T", v)
2441	}
2442
2443	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
2444		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
2445	}
2446	if v.LocaleId != nil {
2447		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
2448			return err
2449		}
2450	}
2451
2452	return nil
2453}
2454
2455func awsRestjson1_serializeOpDocumentListBuiltInIntentsInput(v *ListBuiltInIntentsInput, value smithyjson.Value) error {
2456	object := value.Object()
2457	defer object.Close()
2458
2459	if v.MaxResults != nil {
2460		ok := object.Key("maxResults")
2461		ok.Integer(*v.MaxResults)
2462	}
2463
2464	if v.NextToken != nil {
2465		ok := object.Key("nextToken")
2466		ok.String(*v.NextToken)
2467	}
2468
2469	if v.SortBy != nil {
2470		ok := object.Key("sortBy")
2471		if err := awsRestjson1_serializeDocumentBuiltInIntentSortBy(v.SortBy, ok); err != nil {
2472			return err
2473		}
2474	}
2475
2476	return nil
2477}
2478
2479type awsRestjson1_serializeOpListBuiltInSlotTypes struct {
2480}
2481
2482func (*awsRestjson1_serializeOpListBuiltInSlotTypes) ID() string {
2483	return "OperationSerializer"
2484}
2485
2486func (m *awsRestjson1_serializeOpListBuiltInSlotTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2487	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2488) {
2489	request, ok := in.Request.(*smithyhttp.Request)
2490	if !ok {
2491		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2492	}
2493
2494	input, ok := in.Parameters.(*ListBuiltInSlotTypesInput)
2495	_ = input
2496	if !ok {
2497		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2498	}
2499
2500	opPath, opQuery := httpbinding.SplitURI("/builtins/locales/{localeId}/slottypes")
2501	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2502	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2503	request.Method = "POST"
2504	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2505	if err != nil {
2506		return out, metadata, &smithy.SerializationError{Err: err}
2507	}
2508
2509	if err := awsRestjson1_serializeOpHttpBindingsListBuiltInSlotTypesInput(input, restEncoder); err != nil {
2510		return out, metadata, &smithy.SerializationError{Err: err}
2511	}
2512
2513	restEncoder.SetHeader("Content-Type").String("application/json")
2514
2515	jsonEncoder := smithyjson.NewEncoder()
2516	if err := awsRestjson1_serializeOpDocumentListBuiltInSlotTypesInput(input, jsonEncoder.Value); err != nil {
2517		return out, metadata, &smithy.SerializationError{Err: err}
2518	}
2519
2520	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2521		return out, metadata, &smithy.SerializationError{Err: err}
2522	}
2523
2524	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2525		return out, metadata, &smithy.SerializationError{Err: err}
2526	}
2527	in.Request = request
2528
2529	return next.HandleSerialize(ctx, in)
2530}
2531func awsRestjson1_serializeOpHttpBindingsListBuiltInSlotTypesInput(v *ListBuiltInSlotTypesInput, encoder *httpbinding.Encoder) error {
2532	if v == nil {
2533		return fmt.Errorf("unsupported serialization of nil %T", v)
2534	}
2535
2536	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
2537		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
2538	}
2539	if v.LocaleId != nil {
2540		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
2541			return err
2542		}
2543	}
2544
2545	return nil
2546}
2547
2548func awsRestjson1_serializeOpDocumentListBuiltInSlotTypesInput(v *ListBuiltInSlotTypesInput, value smithyjson.Value) error {
2549	object := value.Object()
2550	defer object.Close()
2551
2552	if v.MaxResults != nil {
2553		ok := object.Key("maxResults")
2554		ok.Integer(*v.MaxResults)
2555	}
2556
2557	if v.NextToken != nil {
2558		ok := object.Key("nextToken")
2559		ok.String(*v.NextToken)
2560	}
2561
2562	if v.SortBy != nil {
2563		ok := object.Key("sortBy")
2564		if err := awsRestjson1_serializeDocumentBuiltInSlotTypeSortBy(v.SortBy, ok); err != nil {
2565			return err
2566		}
2567	}
2568
2569	return nil
2570}
2571
2572type awsRestjson1_serializeOpListIntents struct {
2573}
2574
2575func (*awsRestjson1_serializeOpListIntents) ID() string {
2576	return "OperationSerializer"
2577}
2578
2579func (m *awsRestjson1_serializeOpListIntents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2580	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2581) {
2582	request, ok := in.Request.(*smithyhttp.Request)
2583	if !ok {
2584		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2585	}
2586
2587	input, ok := in.Parameters.(*ListIntentsInput)
2588	_ = input
2589	if !ok {
2590		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2591	}
2592
2593	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents")
2594	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2595	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2596	request.Method = "POST"
2597	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2598	if err != nil {
2599		return out, metadata, &smithy.SerializationError{Err: err}
2600	}
2601
2602	if err := awsRestjson1_serializeOpHttpBindingsListIntentsInput(input, restEncoder); err != nil {
2603		return out, metadata, &smithy.SerializationError{Err: err}
2604	}
2605
2606	restEncoder.SetHeader("Content-Type").String("application/json")
2607
2608	jsonEncoder := smithyjson.NewEncoder()
2609	if err := awsRestjson1_serializeOpDocumentListIntentsInput(input, jsonEncoder.Value); err != nil {
2610		return out, metadata, &smithy.SerializationError{Err: err}
2611	}
2612
2613	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2614		return out, metadata, &smithy.SerializationError{Err: err}
2615	}
2616
2617	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2618		return out, metadata, &smithy.SerializationError{Err: err}
2619	}
2620	in.Request = request
2621
2622	return next.HandleSerialize(ctx, in)
2623}
2624func awsRestjson1_serializeOpHttpBindingsListIntentsInput(v *ListIntentsInput, encoder *httpbinding.Encoder) error {
2625	if v == nil {
2626		return fmt.Errorf("unsupported serialization of nil %T", v)
2627	}
2628
2629	if v.BotId == nil || len(*v.BotId) == 0 {
2630		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2631	}
2632	if v.BotId != nil {
2633		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2634			return err
2635		}
2636	}
2637
2638	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
2639		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
2640	}
2641	if v.BotVersion != nil {
2642		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
2643			return err
2644		}
2645	}
2646
2647	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
2648		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
2649	}
2650	if v.LocaleId != nil {
2651		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
2652			return err
2653		}
2654	}
2655
2656	return nil
2657}
2658
2659func awsRestjson1_serializeOpDocumentListIntentsInput(v *ListIntentsInput, value smithyjson.Value) error {
2660	object := value.Object()
2661	defer object.Close()
2662
2663	if v.Filters != nil {
2664		ok := object.Key("filters")
2665		if err := awsRestjson1_serializeDocumentIntentFilters(v.Filters, ok); err != nil {
2666			return err
2667		}
2668	}
2669
2670	if v.MaxResults != nil {
2671		ok := object.Key("maxResults")
2672		ok.Integer(*v.MaxResults)
2673	}
2674
2675	if v.NextToken != nil {
2676		ok := object.Key("nextToken")
2677		ok.String(*v.NextToken)
2678	}
2679
2680	if v.SortBy != nil {
2681		ok := object.Key("sortBy")
2682		if err := awsRestjson1_serializeDocumentIntentSortBy(v.SortBy, ok); err != nil {
2683			return err
2684		}
2685	}
2686
2687	return nil
2688}
2689
2690type awsRestjson1_serializeOpListSlots struct {
2691}
2692
2693func (*awsRestjson1_serializeOpListSlots) ID() string {
2694	return "OperationSerializer"
2695}
2696
2697func (m *awsRestjson1_serializeOpListSlots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2698	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2699) {
2700	request, ok := in.Request.(*smithyhttp.Request)
2701	if !ok {
2702		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2703	}
2704
2705	input, ok := in.Parameters.(*ListSlotsInput)
2706	_ = input
2707	if !ok {
2708		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2709	}
2710
2711	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots")
2712	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2713	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2714	request.Method = "POST"
2715	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2716	if err != nil {
2717		return out, metadata, &smithy.SerializationError{Err: err}
2718	}
2719
2720	if err := awsRestjson1_serializeOpHttpBindingsListSlotsInput(input, restEncoder); err != nil {
2721		return out, metadata, &smithy.SerializationError{Err: err}
2722	}
2723
2724	restEncoder.SetHeader("Content-Type").String("application/json")
2725
2726	jsonEncoder := smithyjson.NewEncoder()
2727	if err := awsRestjson1_serializeOpDocumentListSlotsInput(input, jsonEncoder.Value); err != nil {
2728		return out, metadata, &smithy.SerializationError{Err: err}
2729	}
2730
2731	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2732		return out, metadata, &smithy.SerializationError{Err: err}
2733	}
2734
2735	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2736		return out, metadata, &smithy.SerializationError{Err: err}
2737	}
2738	in.Request = request
2739
2740	return next.HandleSerialize(ctx, in)
2741}
2742func awsRestjson1_serializeOpHttpBindingsListSlotsInput(v *ListSlotsInput, encoder *httpbinding.Encoder) error {
2743	if v == nil {
2744		return fmt.Errorf("unsupported serialization of nil %T", v)
2745	}
2746
2747	if v.BotId == nil || len(*v.BotId) == 0 {
2748		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2749	}
2750	if v.BotId != nil {
2751		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2752			return err
2753		}
2754	}
2755
2756	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
2757		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
2758	}
2759	if v.BotVersion != nil {
2760		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
2761			return err
2762		}
2763	}
2764
2765	if v.IntentId == nil || len(*v.IntentId) == 0 {
2766		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
2767	}
2768	if v.IntentId != nil {
2769		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
2770			return err
2771		}
2772	}
2773
2774	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
2775		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
2776	}
2777	if v.LocaleId != nil {
2778		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
2779			return err
2780		}
2781	}
2782
2783	return nil
2784}
2785
2786func awsRestjson1_serializeOpDocumentListSlotsInput(v *ListSlotsInput, value smithyjson.Value) error {
2787	object := value.Object()
2788	defer object.Close()
2789
2790	if v.Filters != nil {
2791		ok := object.Key("filters")
2792		if err := awsRestjson1_serializeDocumentSlotFilters(v.Filters, ok); err != nil {
2793			return err
2794		}
2795	}
2796
2797	if v.MaxResults != nil {
2798		ok := object.Key("maxResults")
2799		ok.Integer(*v.MaxResults)
2800	}
2801
2802	if v.NextToken != nil {
2803		ok := object.Key("nextToken")
2804		ok.String(*v.NextToken)
2805	}
2806
2807	if v.SortBy != nil {
2808		ok := object.Key("sortBy")
2809		if err := awsRestjson1_serializeDocumentSlotSortBy(v.SortBy, ok); err != nil {
2810			return err
2811		}
2812	}
2813
2814	return nil
2815}
2816
2817type awsRestjson1_serializeOpListSlotTypes struct {
2818}
2819
2820func (*awsRestjson1_serializeOpListSlotTypes) ID() string {
2821	return "OperationSerializer"
2822}
2823
2824func (m *awsRestjson1_serializeOpListSlotTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2825	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2826) {
2827	request, ok := in.Request.(*smithyhttp.Request)
2828	if !ok {
2829		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2830	}
2831
2832	input, ok := in.Parameters.(*ListSlotTypesInput)
2833	_ = input
2834	if !ok {
2835		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2836	}
2837
2838	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes")
2839	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2840	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2841	request.Method = "POST"
2842	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2843	if err != nil {
2844		return out, metadata, &smithy.SerializationError{Err: err}
2845	}
2846
2847	if err := awsRestjson1_serializeOpHttpBindingsListSlotTypesInput(input, restEncoder); err != nil {
2848		return out, metadata, &smithy.SerializationError{Err: err}
2849	}
2850
2851	restEncoder.SetHeader("Content-Type").String("application/json")
2852
2853	jsonEncoder := smithyjson.NewEncoder()
2854	if err := awsRestjson1_serializeOpDocumentListSlotTypesInput(input, jsonEncoder.Value); err != nil {
2855		return out, metadata, &smithy.SerializationError{Err: err}
2856	}
2857
2858	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
2859		return out, metadata, &smithy.SerializationError{Err: err}
2860	}
2861
2862	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2863		return out, metadata, &smithy.SerializationError{Err: err}
2864	}
2865	in.Request = request
2866
2867	return next.HandleSerialize(ctx, in)
2868}
2869func awsRestjson1_serializeOpHttpBindingsListSlotTypesInput(v *ListSlotTypesInput, encoder *httpbinding.Encoder) error {
2870	if v == nil {
2871		return fmt.Errorf("unsupported serialization of nil %T", v)
2872	}
2873
2874	if v.BotId == nil || len(*v.BotId) == 0 {
2875		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
2876	}
2877	if v.BotId != nil {
2878		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
2879			return err
2880		}
2881	}
2882
2883	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
2884		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
2885	}
2886	if v.BotVersion != nil {
2887		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
2888			return err
2889		}
2890	}
2891
2892	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
2893		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
2894	}
2895	if v.LocaleId != nil {
2896		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
2897			return err
2898		}
2899	}
2900
2901	return nil
2902}
2903
2904func awsRestjson1_serializeOpDocumentListSlotTypesInput(v *ListSlotTypesInput, value smithyjson.Value) error {
2905	object := value.Object()
2906	defer object.Close()
2907
2908	if v.Filters != nil {
2909		ok := object.Key("filters")
2910		if err := awsRestjson1_serializeDocumentSlotTypeFilters(v.Filters, ok); err != nil {
2911			return err
2912		}
2913	}
2914
2915	if v.MaxResults != nil {
2916		ok := object.Key("maxResults")
2917		ok.Integer(*v.MaxResults)
2918	}
2919
2920	if v.NextToken != nil {
2921		ok := object.Key("nextToken")
2922		ok.String(*v.NextToken)
2923	}
2924
2925	if v.SortBy != nil {
2926		ok := object.Key("sortBy")
2927		if err := awsRestjson1_serializeDocumentSlotTypeSortBy(v.SortBy, ok); err != nil {
2928			return err
2929		}
2930	}
2931
2932	return nil
2933}
2934
2935type awsRestjson1_serializeOpListTagsForResource struct {
2936}
2937
2938func (*awsRestjson1_serializeOpListTagsForResource) ID() string {
2939	return "OperationSerializer"
2940}
2941
2942func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2943	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2944) {
2945	request, ok := in.Request.(*smithyhttp.Request)
2946	if !ok {
2947		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2948	}
2949
2950	input, ok := in.Parameters.(*ListTagsForResourceInput)
2951	_ = input
2952	if !ok {
2953		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2954	}
2955
2956	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceARN}")
2957	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2958	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2959	request.Method = "GET"
2960	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2961	if err != nil {
2962		return out, metadata, &smithy.SerializationError{Err: err}
2963	}
2964
2965	if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
2966		return out, metadata, &smithy.SerializationError{Err: err}
2967	}
2968
2969	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2970		return out, metadata, &smithy.SerializationError{Err: err}
2971	}
2972	in.Request = request
2973
2974	return next.HandleSerialize(ctx, in)
2975}
2976func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
2977	if v == nil {
2978		return fmt.Errorf("unsupported serialization of nil %T", v)
2979	}
2980
2981	if v.ResourceARN == nil || len(*v.ResourceARN) == 0 {
2982		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceARN must not be empty")}
2983	}
2984	if v.ResourceARN != nil {
2985		if err := encoder.SetURI("resourceARN").String(*v.ResourceARN); err != nil {
2986			return err
2987		}
2988	}
2989
2990	return nil
2991}
2992
2993type awsRestjson1_serializeOpTagResource struct {
2994}
2995
2996func (*awsRestjson1_serializeOpTagResource) ID() string {
2997	return "OperationSerializer"
2998}
2999
3000func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3001	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3002) {
3003	request, ok := in.Request.(*smithyhttp.Request)
3004	if !ok {
3005		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3006	}
3007
3008	input, ok := in.Parameters.(*TagResourceInput)
3009	_ = input
3010	if !ok {
3011		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3012	}
3013
3014	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceARN}")
3015	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3016	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3017	request.Method = "POST"
3018	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3019	if err != nil {
3020		return out, metadata, &smithy.SerializationError{Err: err}
3021	}
3022
3023	if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
3024		return out, metadata, &smithy.SerializationError{Err: err}
3025	}
3026
3027	restEncoder.SetHeader("Content-Type").String("application/json")
3028
3029	jsonEncoder := smithyjson.NewEncoder()
3030	if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
3031		return out, metadata, &smithy.SerializationError{Err: err}
3032	}
3033
3034	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3035		return out, metadata, &smithy.SerializationError{Err: err}
3036	}
3037
3038	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3039		return out, metadata, &smithy.SerializationError{Err: err}
3040	}
3041	in.Request = request
3042
3043	return next.HandleSerialize(ctx, in)
3044}
3045func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
3046	if v == nil {
3047		return fmt.Errorf("unsupported serialization of nil %T", v)
3048	}
3049
3050	if v.ResourceARN == nil || len(*v.ResourceARN) == 0 {
3051		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceARN must not be empty")}
3052	}
3053	if v.ResourceARN != nil {
3054		if err := encoder.SetURI("resourceARN").String(*v.ResourceARN); err != nil {
3055			return err
3056		}
3057	}
3058
3059	return nil
3060}
3061
3062func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
3063	object := value.Object()
3064	defer object.Close()
3065
3066	if v.Tags != nil {
3067		ok := object.Key("tags")
3068		if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil {
3069			return err
3070		}
3071	}
3072
3073	return nil
3074}
3075
3076type awsRestjson1_serializeOpUntagResource struct {
3077}
3078
3079func (*awsRestjson1_serializeOpUntagResource) ID() string {
3080	return "OperationSerializer"
3081}
3082
3083func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3084	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3085) {
3086	request, ok := in.Request.(*smithyhttp.Request)
3087	if !ok {
3088		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3089	}
3090
3091	input, ok := in.Parameters.(*UntagResourceInput)
3092	_ = input
3093	if !ok {
3094		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3095	}
3096
3097	opPath, opQuery := httpbinding.SplitURI("/tags/{resourceARN}")
3098	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3099	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3100	request.Method = "DELETE"
3101	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3102	if err != nil {
3103		return out, metadata, &smithy.SerializationError{Err: err}
3104	}
3105
3106	if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
3107		return out, metadata, &smithy.SerializationError{Err: err}
3108	}
3109
3110	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3111		return out, metadata, &smithy.SerializationError{Err: err}
3112	}
3113	in.Request = request
3114
3115	return next.HandleSerialize(ctx, in)
3116}
3117func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
3118	if v == nil {
3119		return fmt.Errorf("unsupported serialization of nil %T", v)
3120	}
3121
3122	if v.ResourceARN == nil || len(*v.ResourceARN) == 0 {
3123		return &smithy.SerializationError{Err: fmt.Errorf("input member resourceARN must not be empty")}
3124	}
3125	if v.ResourceARN != nil {
3126		if err := encoder.SetURI("resourceARN").String(*v.ResourceARN); err != nil {
3127			return err
3128		}
3129	}
3130
3131	if v.TagKeys != nil {
3132		for i := range v.TagKeys {
3133			encoder.AddQuery("tagKeys").String(v.TagKeys[i])
3134		}
3135	}
3136
3137	return nil
3138}
3139
3140type awsRestjson1_serializeOpUpdateBot struct {
3141}
3142
3143func (*awsRestjson1_serializeOpUpdateBot) ID() string {
3144	return "OperationSerializer"
3145}
3146
3147func (m *awsRestjson1_serializeOpUpdateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3148	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3149) {
3150	request, ok := in.Request.(*smithyhttp.Request)
3151	if !ok {
3152		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3153	}
3154
3155	input, ok := in.Parameters.(*UpdateBotInput)
3156	_ = input
3157	if !ok {
3158		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3159	}
3160
3161	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}")
3162	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3163	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3164	request.Method = "PUT"
3165	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3166	if err != nil {
3167		return out, metadata, &smithy.SerializationError{Err: err}
3168	}
3169
3170	if err := awsRestjson1_serializeOpHttpBindingsUpdateBotInput(input, restEncoder); err != nil {
3171		return out, metadata, &smithy.SerializationError{Err: err}
3172	}
3173
3174	restEncoder.SetHeader("Content-Type").String("application/json")
3175
3176	jsonEncoder := smithyjson.NewEncoder()
3177	if err := awsRestjson1_serializeOpDocumentUpdateBotInput(input, jsonEncoder.Value); err != nil {
3178		return out, metadata, &smithy.SerializationError{Err: err}
3179	}
3180
3181	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3182		return out, metadata, &smithy.SerializationError{Err: err}
3183	}
3184
3185	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3186		return out, metadata, &smithy.SerializationError{Err: err}
3187	}
3188	in.Request = request
3189
3190	return next.HandleSerialize(ctx, in)
3191}
3192func awsRestjson1_serializeOpHttpBindingsUpdateBotInput(v *UpdateBotInput, encoder *httpbinding.Encoder) error {
3193	if v == nil {
3194		return fmt.Errorf("unsupported serialization of nil %T", v)
3195	}
3196
3197	if v.BotId == nil || len(*v.BotId) == 0 {
3198		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3199	}
3200	if v.BotId != nil {
3201		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3202			return err
3203		}
3204	}
3205
3206	return nil
3207}
3208
3209func awsRestjson1_serializeOpDocumentUpdateBotInput(v *UpdateBotInput, value smithyjson.Value) error {
3210	object := value.Object()
3211	defer object.Close()
3212
3213	if v.BotName != nil {
3214		ok := object.Key("botName")
3215		ok.String(*v.BotName)
3216	}
3217
3218	if v.DataPrivacy != nil {
3219		ok := object.Key("dataPrivacy")
3220		if err := awsRestjson1_serializeDocumentDataPrivacy(v.DataPrivacy, ok); err != nil {
3221			return err
3222		}
3223	}
3224
3225	if v.Description != nil {
3226		ok := object.Key("description")
3227		ok.String(*v.Description)
3228	}
3229
3230	if v.IdleSessionTTLInSeconds != nil {
3231		ok := object.Key("idleSessionTTLInSeconds")
3232		ok.Integer(*v.IdleSessionTTLInSeconds)
3233	}
3234
3235	if v.RoleArn != nil {
3236		ok := object.Key("roleArn")
3237		ok.String(*v.RoleArn)
3238	}
3239
3240	return nil
3241}
3242
3243type awsRestjson1_serializeOpUpdateBotAlias struct {
3244}
3245
3246func (*awsRestjson1_serializeOpUpdateBotAlias) ID() string {
3247	return "OperationSerializer"
3248}
3249
3250func (m *awsRestjson1_serializeOpUpdateBotAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3251	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3252) {
3253	request, ok := in.Request.(*smithyhttp.Request)
3254	if !ok {
3255		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3256	}
3257
3258	input, ok := in.Parameters.(*UpdateBotAliasInput)
3259	_ = input
3260	if !ok {
3261		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3262	}
3263
3264	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botaliases/{botAliasId}")
3265	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3266	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3267	request.Method = "PUT"
3268	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3269	if err != nil {
3270		return out, metadata, &smithy.SerializationError{Err: err}
3271	}
3272
3273	if err := awsRestjson1_serializeOpHttpBindingsUpdateBotAliasInput(input, restEncoder); err != nil {
3274		return out, metadata, &smithy.SerializationError{Err: err}
3275	}
3276
3277	restEncoder.SetHeader("Content-Type").String("application/json")
3278
3279	jsonEncoder := smithyjson.NewEncoder()
3280	if err := awsRestjson1_serializeOpDocumentUpdateBotAliasInput(input, jsonEncoder.Value); err != nil {
3281		return out, metadata, &smithy.SerializationError{Err: err}
3282	}
3283
3284	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3285		return out, metadata, &smithy.SerializationError{Err: err}
3286	}
3287
3288	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3289		return out, metadata, &smithy.SerializationError{Err: err}
3290	}
3291	in.Request = request
3292
3293	return next.HandleSerialize(ctx, in)
3294}
3295func awsRestjson1_serializeOpHttpBindingsUpdateBotAliasInput(v *UpdateBotAliasInput, encoder *httpbinding.Encoder) error {
3296	if v == nil {
3297		return fmt.Errorf("unsupported serialization of nil %T", v)
3298	}
3299
3300	if v.BotAliasId == nil || len(*v.BotAliasId) == 0 {
3301		return &smithy.SerializationError{Err: fmt.Errorf("input member botAliasId must not be empty")}
3302	}
3303	if v.BotAliasId != nil {
3304		if err := encoder.SetURI("botAliasId").String(*v.BotAliasId); err != nil {
3305			return err
3306		}
3307	}
3308
3309	if v.BotId == nil || len(*v.BotId) == 0 {
3310		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3311	}
3312	if v.BotId != nil {
3313		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3314			return err
3315		}
3316	}
3317
3318	return nil
3319}
3320
3321func awsRestjson1_serializeOpDocumentUpdateBotAliasInput(v *UpdateBotAliasInput, value smithyjson.Value) error {
3322	object := value.Object()
3323	defer object.Close()
3324
3325	if v.BotAliasLocaleSettings != nil {
3326		ok := object.Key("botAliasLocaleSettings")
3327		if err := awsRestjson1_serializeDocumentBotAliasLocaleSettingsMap(v.BotAliasLocaleSettings, ok); err != nil {
3328			return err
3329		}
3330	}
3331
3332	if v.BotAliasName != nil {
3333		ok := object.Key("botAliasName")
3334		ok.String(*v.BotAliasName)
3335	}
3336
3337	if v.BotVersion != nil {
3338		ok := object.Key("botVersion")
3339		ok.String(*v.BotVersion)
3340	}
3341
3342	if v.ConversationLogSettings != nil {
3343		ok := object.Key("conversationLogSettings")
3344		if err := awsRestjson1_serializeDocumentConversationLogSettings(v.ConversationLogSettings, ok); err != nil {
3345			return err
3346		}
3347	}
3348
3349	if v.Description != nil {
3350		ok := object.Key("description")
3351		ok.String(*v.Description)
3352	}
3353
3354	if v.SentimentAnalysisSettings != nil {
3355		ok := object.Key("sentimentAnalysisSettings")
3356		if err := awsRestjson1_serializeDocumentSentimentAnalysisSettings(v.SentimentAnalysisSettings, ok); err != nil {
3357			return err
3358		}
3359	}
3360
3361	return nil
3362}
3363
3364type awsRestjson1_serializeOpUpdateBotLocale struct {
3365}
3366
3367func (*awsRestjson1_serializeOpUpdateBotLocale) ID() string {
3368	return "OperationSerializer"
3369}
3370
3371func (m *awsRestjson1_serializeOpUpdateBotLocale) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3372	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3373) {
3374	request, ok := in.Request.(*smithyhttp.Request)
3375	if !ok {
3376		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3377	}
3378
3379	input, ok := in.Parameters.(*UpdateBotLocaleInput)
3380	_ = input
3381	if !ok {
3382		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3383	}
3384
3385	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}")
3386	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3387	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3388	request.Method = "PUT"
3389	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3390	if err != nil {
3391		return out, metadata, &smithy.SerializationError{Err: err}
3392	}
3393
3394	if err := awsRestjson1_serializeOpHttpBindingsUpdateBotLocaleInput(input, restEncoder); err != nil {
3395		return out, metadata, &smithy.SerializationError{Err: err}
3396	}
3397
3398	restEncoder.SetHeader("Content-Type").String("application/json")
3399
3400	jsonEncoder := smithyjson.NewEncoder()
3401	if err := awsRestjson1_serializeOpDocumentUpdateBotLocaleInput(input, jsonEncoder.Value); err != nil {
3402		return out, metadata, &smithy.SerializationError{Err: err}
3403	}
3404
3405	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3406		return out, metadata, &smithy.SerializationError{Err: err}
3407	}
3408
3409	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3410		return out, metadata, &smithy.SerializationError{Err: err}
3411	}
3412	in.Request = request
3413
3414	return next.HandleSerialize(ctx, in)
3415}
3416func awsRestjson1_serializeOpHttpBindingsUpdateBotLocaleInput(v *UpdateBotLocaleInput, encoder *httpbinding.Encoder) error {
3417	if v == nil {
3418		return fmt.Errorf("unsupported serialization of nil %T", v)
3419	}
3420
3421	if v.BotId == nil || len(*v.BotId) == 0 {
3422		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3423	}
3424	if v.BotId != nil {
3425		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3426			return err
3427		}
3428	}
3429
3430	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
3431		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
3432	}
3433	if v.BotVersion != nil {
3434		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
3435			return err
3436		}
3437	}
3438
3439	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
3440		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
3441	}
3442	if v.LocaleId != nil {
3443		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
3444			return err
3445		}
3446	}
3447
3448	return nil
3449}
3450
3451func awsRestjson1_serializeOpDocumentUpdateBotLocaleInput(v *UpdateBotLocaleInput, value smithyjson.Value) error {
3452	object := value.Object()
3453	defer object.Close()
3454
3455	if v.Description != nil {
3456		ok := object.Key("description")
3457		ok.String(*v.Description)
3458	}
3459
3460	if v.NluIntentConfidenceThreshold != nil {
3461		ok := object.Key("nluIntentConfidenceThreshold")
3462		ok.Double(*v.NluIntentConfidenceThreshold)
3463	}
3464
3465	if v.VoiceSettings != nil {
3466		ok := object.Key("voiceSettings")
3467		if err := awsRestjson1_serializeDocumentVoiceSettings(v.VoiceSettings, ok); err != nil {
3468			return err
3469		}
3470	}
3471
3472	return nil
3473}
3474
3475type awsRestjson1_serializeOpUpdateIntent struct {
3476}
3477
3478func (*awsRestjson1_serializeOpUpdateIntent) ID() string {
3479	return "OperationSerializer"
3480}
3481
3482func (m *awsRestjson1_serializeOpUpdateIntent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3483	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3484) {
3485	request, ok := in.Request.(*smithyhttp.Request)
3486	if !ok {
3487		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3488	}
3489
3490	input, ok := in.Parameters.(*UpdateIntentInput)
3491	_ = input
3492	if !ok {
3493		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3494	}
3495
3496	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}")
3497	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3498	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3499	request.Method = "PUT"
3500	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3501	if err != nil {
3502		return out, metadata, &smithy.SerializationError{Err: err}
3503	}
3504
3505	if err := awsRestjson1_serializeOpHttpBindingsUpdateIntentInput(input, restEncoder); err != nil {
3506		return out, metadata, &smithy.SerializationError{Err: err}
3507	}
3508
3509	restEncoder.SetHeader("Content-Type").String("application/json")
3510
3511	jsonEncoder := smithyjson.NewEncoder()
3512	if err := awsRestjson1_serializeOpDocumentUpdateIntentInput(input, jsonEncoder.Value); err != nil {
3513		return out, metadata, &smithy.SerializationError{Err: err}
3514	}
3515
3516	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3517		return out, metadata, &smithy.SerializationError{Err: err}
3518	}
3519
3520	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3521		return out, metadata, &smithy.SerializationError{Err: err}
3522	}
3523	in.Request = request
3524
3525	return next.HandleSerialize(ctx, in)
3526}
3527func awsRestjson1_serializeOpHttpBindingsUpdateIntentInput(v *UpdateIntentInput, encoder *httpbinding.Encoder) error {
3528	if v == nil {
3529		return fmt.Errorf("unsupported serialization of nil %T", v)
3530	}
3531
3532	if v.BotId == nil || len(*v.BotId) == 0 {
3533		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3534	}
3535	if v.BotId != nil {
3536		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3537			return err
3538		}
3539	}
3540
3541	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
3542		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
3543	}
3544	if v.BotVersion != nil {
3545		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
3546			return err
3547		}
3548	}
3549
3550	if v.IntentId == nil || len(*v.IntentId) == 0 {
3551		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
3552	}
3553	if v.IntentId != nil {
3554		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
3555			return err
3556		}
3557	}
3558
3559	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
3560		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
3561	}
3562	if v.LocaleId != nil {
3563		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
3564			return err
3565		}
3566	}
3567
3568	return nil
3569}
3570
3571func awsRestjson1_serializeOpDocumentUpdateIntentInput(v *UpdateIntentInput, value smithyjson.Value) error {
3572	object := value.Object()
3573	defer object.Close()
3574
3575	if v.Description != nil {
3576		ok := object.Key("description")
3577		ok.String(*v.Description)
3578	}
3579
3580	if v.DialogCodeHook != nil {
3581		ok := object.Key("dialogCodeHook")
3582		if err := awsRestjson1_serializeDocumentDialogCodeHookSettings(v.DialogCodeHook, ok); err != nil {
3583			return err
3584		}
3585	}
3586
3587	if v.FulfillmentCodeHook != nil {
3588		ok := object.Key("fulfillmentCodeHook")
3589		if err := awsRestjson1_serializeDocumentFulfillmentCodeHookSettings(v.FulfillmentCodeHook, ok); err != nil {
3590			return err
3591		}
3592	}
3593
3594	if v.InputContexts != nil {
3595		ok := object.Key("inputContexts")
3596		if err := awsRestjson1_serializeDocumentInputContextsList(v.InputContexts, ok); err != nil {
3597			return err
3598		}
3599	}
3600
3601	if v.IntentClosingSetting != nil {
3602		ok := object.Key("intentClosingSetting")
3603		if err := awsRestjson1_serializeDocumentIntentClosingSetting(v.IntentClosingSetting, ok); err != nil {
3604			return err
3605		}
3606	}
3607
3608	if v.IntentConfirmationSetting != nil {
3609		ok := object.Key("intentConfirmationSetting")
3610		if err := awsRestjson1_serializeDocumentIntentConfirmationSetting(v.IntentConfirmationSetting, ok); err != nil {
3611			return err
3612		}
3613	}
3614
3615	if v.IntentName != nil {
3616		ok := object.Key("intentName")
3617		ok.String(*v.IntentName)
3618	}
3619
3620	if v.KendraConfiguration != nil {
3621		ok := object.Key("kendraConfiguration")
3622		if err := awsRestjson1_serializeDocumentKendraConfiguration(v.KendraConfiguration, ok); err != nil {
3623			return err
3624		}
3625	}
3626
3627	if v.OutputContexts != nil {
3628		ok := object.Key("outputContexts")
3629		if err := awsRestjson1_serializeDocumentOutputContextsList(v.OutputContexts, ok); err != nil {
3630			return err
3631		}
3632	}
3633
3634	if v.ParentIntentSignature != nil {
3635		ok := object.Key("parentIntentSignature")
3636		ok.String(*v.ParentIntentSignature)
3637	}
3638
3639	if v.SampleUtterances != nil {
3640		ok := object.Key("sampleUtterances")
3641		if err := awsRestjson1_serializeDocumentSampleUtterancesList(v.SampleUtterances, ok); err != nil {
3642			return err
3643		}
3644	}
3645
3646	if v.SlotPriorities != nil {
3647		ok := object.Key("slotPriorities")
3648		if err := awsRestjson1_serializeDocumentSlotPrioritiesList(v.SlotPriorities, ok); err != nil {
3649			return err
3650		}
3651	}
3652
3653	return nil
3654}
3655
3656type awsRestjson1_serializeOpUpdateSlot struct {
3657}
3658
3659func (*awsRestjson1_serializeOpUpdateSlot) ID() string {
3660	return "OperationSerializer"
3661}
3662
3663func (m *awsRestjson1_serializeOpUpdateSlot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3664	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3665) {
3666	request, ok := in.Request.(*smithyhttp.Request)
3667	if !ok {
3668		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3669	}
3670
3671	input, ok := in.Parameters.(*UpdateSlotInput)
3672	_ = input
3673	if !ok {
3674		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3675	}
3676
3677	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/intents/{intentId}/slots/{slotId}")
3678	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3679	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3680	request.Method = "PUT"
3681	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3682	if err != nil {
3683		return out, metadata, &smithy.SerializationError{Err: err}
3684	}
3685
3686	if err := awsRestjson1_serializeOpHttpBindingsUpdateSlotInput(input, restEncoder); err != nil {
3687		return out, metadata, &smithy.SerializationError{Err: err}
3688	}
3689
3690	restEncoder.SetHeader("Content-Type").String("application/json")
3691
3692	jsonEncoder := smithyjson.NewEncoder()
3693	if err := awsRestjson1_serializeOpDocumentUpdateSlotInput(input, jsonEncoder.Value); err != nil {
3694		return out, metadata, &smithy.SerializationError{Err: err}
3695	}
3696
3697	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3698		return out, metadata, &smithy.SerializationError{Err: err}
3699	}
3700
3701	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3702		return out, metadata, &smithy.SerializationError{Err: err}
3703	}
3704	in.Request = request
3705
3706	return next.HandleSerialize(ctx, in)
3707}
3708func awsRestjson1_serializeOpHttpBindingsUpdateSlotInput(v *UpdateSlotInput, encoder *httpbinding.Encoder) error {
3709	if v == nil {
3710		return fmt.Errorf("unsupported serialization of nil %T", v)
3711	}
3712
3713	if v.BotId == nil || len(*v.BotId) == 0 {
3714		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3715	}
3716	if v.BotId != nil {
3717		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3718			return err
3719		}
3720	}
3721
3722	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
3723		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
3724	}
3725	if v.BotVersion != nil {
3726		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
3727			return err
3728		}
3729	}
3730
3731	if v.IntentId == nil || len(*v.IntentId) == 0 {
3732		return &smithy.SerializationError{Err: fmt.Errorf("input member intentId must not be empty")}
3733	}
3734	if v.IntentId != nil {
3735		if err := encoder.SetURI("intentId").String(*v.IntentId); err != nil {
3736			return err
3737		}
3738	}
3739
3740	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
3741		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
3742	}
3743	if v.LocaleId != nil {
3744		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
3745			return err
3746		}
3747	}
3748
3749	if v.SlotId == nil || len(*v.SlotId) == 0 {
3750		return &smithy.SerializationError{Err: fmt.Errorf("input member slotId must not be empty")}
3751	}
3752	if v.SlotId != nil {
3753		if err := encoder.SetURI("slotId").String(*v.SlotId); err != nil {
3754			return err
3755		}
3756	}
3757
3758	return nil
3759}
3760
3761func awsRestjson1_serializeOpDocumentUpdateSlotInput(v *UpdateSlotInput, value smithyjson.Value) error {
3762	object := value.Object()
3763	defer object.Close()
3764
3765	if v.Description != nil {
3766		ok := object.Key("description")
3767		ok.String(*v.Description)
3768	}
3769
3770	if v.ObfuscationSetting != nil {
3771		ok := object.Key("obfuscationSetting")
3772		if err := awsRestjson1_serializeDocumentObfuscationSetting(v.ObfuscationSetting, ok); err != nil {
3773			return err
3774		}
3775	}
3776
3777	if v.SlotName != nil {
3778		ok := object.Key("slotName")
3779		ok.String(*v.SlotName)
3780	}
3781
3782	if v.SlotTypeId != nil {
3783		ok := object.Key("slotTypeId")
3784		ok.String(*v.SlotTypeId)
3785	}
3786
3787	if v.ValueElicitationSetting != nil {
3788		ok := object.Key("valueElicitationSetting")
3789		if err := awsRestjson1_serializeDocumentSlotValueElicitationSetting(v.ValueElicitationSetting, ok); err != nil {
3790			return err
3791		}
3792	}
3793
3794	return nil
3795}
3796
3797type awsRestjson1_serializeOpUpdateSlotType struct {
3798}
3799
3800func (*awsRestjson1_serializeOpUpdateSlotType) ID() string {
3801	return "OperationSerializer"
3802}
3803
3804func (m *awsRestjson1_serializeOpUpdateSlotType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3805	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3806) {
3807	request, ok := in.Request.(*smithyhttp.Request)
3808	if !ok {
3809		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3810	}
3811
3812	input, ok := in.Parameters.(*UpdateSlotTypeInput)
3813	_ = input
3814	if !ok {
3815		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3816	}
3817
3818	opPath, opQuery := httpbinding.SplitURI("/bots/{botId}/botversions/{botVersion}/botlocales/{localeId}/slottypes/{slotTypeId}")
3819	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3820	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3821	request.Method = "PUT"
3822	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3823	if err != nil {
3824		return out, metadata, &smithy.SerializationError{Err: err}
3825	}
3826
3827	if err := awsRestjson1_serializeOpHttpBindingsUpdateSlotTypeInput(input, restEncoder); err != nil {
3828		return out, metadata, &smithy.SerializationError{Err: err}
3829	}
3830
3831	restEncoder.SetHeader("Content-Type").String("application/json")
3832
3833	jsonEncoder := smithyjson.NewEncoder()
3834	if err := awsRestjson1_serializeOpDocumentUpdateSlotTypeInput(input, jsonEncoder.Value); err != nil {
3835		return out, metadata, &smithy.SerializationError{Err: err}
3836	}
3837
3838	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
3839		return out, metadata, &smithy.SerializationError{Err: err}
3840	}
3841
3842	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3843		return out, metadata, &smithy.SerializationError{Err: err}
3844	}
3845	in.Request = request
3846
3847	return next.HandleSerialize(ctx, in)
3848}
3849func awsRestjson1_serializeOpHttpBindingsUpdateSlotTypeInput(v *UpdateSlotTypeInput, encoder *httpbinding.Encoder) error {
3850	if v == nil {
3851		return fmt.Errorf("unsupported serialization of nil %T", v)
3852	}
3853
3854	if v.BotId == nil || len(*v.BotId) == 0 {
3855		return &smithy.SerializationError{Err: fmt.Errorf("input member botId must not be empty")}
3856	}
3857	if v.BotId != nil {
3858		if err := encoder.SetURI("botId").String(*v.BotId); err != nil {
3859			return err
3860		}
3861	}
3862
3863	if v.BotVersion == nil || len(*v.BotVersion) == 0 {
3864		return &smithy.SerializationError{Err: fmt.Errorf("input member botVersion must not be empty")}
3865	}
3866	if v.BotVersion != nil {
3867		if err := encoder.SetURI("botVersion").String(*v.BotVersion); err != nil {
3868			return err
3869		}
3870	}
3871
3872	if v.LocaleId == nil || len(*v.LocaleId) == 0 {
3873		return &smithy.SerializationError{Err: fmt.Errorf("input member localeId must not be empty")}
3874	}
3875	if v.LocaleId != nil {
3876		if err := encoder.SetURI("localeId").String(*v.LocaleId); err != nil {
3877			return err
3878		}
3879	}
3880
3881	if v.SlotTypeId == nil || len(*v.SlotTypeId) == 0 {
3882		return &smithy.SerializationError{Err: fmt.Errorf("input member slotTypeId must not be empty")}
3883	}
3884	if v.SlotTypeId != nil {
3885		if err := encoder.SetURI("slotTypeId").String(*v.SlotTypeId); err != nil {
3886			return err
3887		}
3888	}
3889
3890	return nil
3891}
3892
3893func awsRestjson1_serializeOpDocumentUpdateSlotTypeInput(v *UpdateSlotTypeInput, value smithyjson.Value) error {
3894	object := value.Object()
3895	defer object.Close()
3896
3897	if v.Description != nil {
3898		ok := object.Key("description")
3899		ok.String(*v.Description)
3900	}
3901
3902	if v.ParentSlotTypeSignature != nil {
3903		ok := object.Key("parentSlotTypeSignature")
3904		ok.String(*v.ParentSlotTypeSignature)
3905	}
3906
3907	if v.SlotTypeName != nil {
3908		ok := object.Key("slotTypeName")
3909		ok.String(*v.SlotTypeName)
3910	}
3911
3912	if v.SlotTypeValues != nil {
3913		ok := object.Key("slotTypeValues")
3914		if err := awsRestjson1_serializeDocumentSlotTypeValues(v.SlotTypeValues, ok); err != nil {
3915			return err
3916		}
3917	}
3918
3919	if v.ValueSelectionSetting != nil {
3920		ok := object.Key("valueSelectionSetting")
3921		if err := awsRestjson1_serializeDocumentSlotValueSelectionSetting(v.ValueSelectionSetting, ok); err != nil {
3922			return err
3923		}
3924	}
3925
3926	return nil
3927}
3928
3929func awsRestjson1_serializeDocumentAudioLogDestination(v *types.AudioLogDestination, value smithyjson.Value) error {
3930	object := value.Object()
3931	defer object.Close()
3932
3933	if v.S3Bucket != nil {
3934		ok := object.Key("s3Bucket")
3935		if err := awsRestjson1_serializeDocumentS3BucketLogDestination(v.S3Bucket, ok); err != nil {
3936			return err
3937		}
3938	}
3939
3940	return nil
3941}
3942
3943func awsRestjson1_serializeDocumentAudioLogSetting(v *types.AudioLogSetting, value smithyjson.Value) error {
3944	object := value.Object()
3945	defer object.Close()
3946
3947	if v.Destination != nil {
3948		ok := object.Key("destination")
3949		if err := awsRestjson1_serializeDocumentAudioLogDestination(v.Destination, ok); err != nil {
3950			return err
3951		}
3952	}
3953
3954	{
3955		ok := object.Key("enabled")
3956		ok.Boolean(v.Enabled)
3957	}
3958
3959	return nil
3960}
3961
3962func awsRestjson1_serializeDocumentAudioLogSettingsList(v []types.AudioLogSetting, value smithyjson.Value) error {
3963	array := value.Array()
3964	defer array.Close()
3965
3966	for i := range v {
3967		av := array.Value()
3968		if err := awsRestjson1_serializeDocumentAudioLogSetting(&v[i], av); err != nil {
3969			return err
3970		}
3971	}
3972	return nil
3973}
3974
3975func awsRestjson1_serializeDocumentBotAliasLocaleSettings(v *types.BotAliasLocaleSettings, value smithyjson.Value) error {
3976	object := value.Object()
3977	defer object.Close()
3978
3979	if v.CodeHookSpecification != nil {
3980		ok := object.Key("codeHookSpecification")
3981		if err := awsRestjson1_serializeDocumentCodeHookSpecification(v.CodeHookSpecification, ok); err != nil {
3982			return err
3983		}
3984	}
3985
3986	{
3987		ok := object.Key("enabled")
3988		ok.Boolean(v.Enabled)
3989	}
3990
3991	return nil
3992}
3993
3994func awsRestjson1_serializeDocumentBotAliasLocaleSettingsMap(v map[string]types.BotAliasLocaleSettings, value smithyjson.Value) error {
3995	object := value.Object()
3996	defer object.Close()
3997
3998	for key := range v {
3999		om := object.Key(key)
4000		mapVar := v[key]
4001		if err := awsRestjson1_serializeDocumentBotAliasLocaleSettings(&mapVar, om); err != nil {
4002			return err
4003		}
4004	}
4005	return nil
4006}
4007
4008func awsRestjson1_serializeDocumentBotFilter(v *types.BotFilter, value smithyjson.Value) error {
4009	object := value.Object()
4010	defer object.Close()
4011
4012	if len(v.Name) > 0 {
4013		ok := object.Key("name")
4014		ok.String(string(v.Name))
4015	}
4016
4017	if len(v.Operator) > 0 {
4018		ok := object.Key("operator")
4019		ok.String(string(v.Operator))
4020	}
4021
4022	if v.Values != nil {
4023		ok := object.Key("values")
4024		if err := awsRestjson1_serializeDocumentFilterValues(v.Values, ok); err != nil {
4025			return err
4026		}
4027	}
4028
4029	return nil
4030}
4031
4032func awsRestjson1_serializeDocumentBotFilters(v []types.BotFilter, value smithyjson.Value) error {
4033	array := value.Array()
4034	defer array.Close()
4035
4036	for i := range v {
4037		av := array.Value()
4038		if err := awsRestjson1_serializeDocumentBotFilter(&v[i], av); err != nil {
4039			return err
4040		}
4041	}
4042	return nil
4043}
4044
4045func awsRestjson1_serializeDocumentBotLocaleFilter(v *types.BotLocaleFilter, value smithyjson.Value) error {
4046	object := value.Object()
4047	defer object.Close()
4048
4049	if len(v.Name) > 0 {
4050		ok := object.Key("name")
4051		ok.String(string(v.Name))
4052	}
4053
4054	if len(v.Operator) > 0 {
4055		ok := object.Key("operator")
4056		ok.String(string(v.Operator))
4057	}
4058
4059	if v.Values != nil {
4060		ok := object.Key("values")
4061		if err := awsRestjson1_serializeDocumentFilterValues(v.Values, ok); err != nil {
4062			return err
4063		}
4064	}
4065
4066	return nil
4067}
4068
4069func awsRestjson1_serializeDocumentBotLocaleFilters(v []types.BotLocaleFilter, value smithyjson.Value) error {
4070	array := value.Array()
4071	defer array.Close()
4072
4073	for i := range v {
4074		av := array.Value()
4075		if err := awsRestjson1_serializeDocumentBotLocaleFilter(&v[i], av); err != nil {
4076			return err
4077		}
4078	}
4079	return nil
4080}
4081
4082func awsRestjson1_serializeDocumentBotLocaleSortBy(v *types.BotLocaleSortBy, value smithyjson.Value) error {
4083	object := value.Object()
4084	defer object.Close()
4085
4086	if len(v.Attribute) > 0 {
4087		ok := object.Key("attribute")
4088		ok.String(string(v.Attribute))
4089	}
4090
4091	if len(v.Order) > 0 {
4092		ok := object.Key("order")
4093		ok.String(string(v.Order))
4094	}
4095
4096	return nil
4097}
4098
4099func awsRestjson1_serializeDocumentBotSortBy(v *types.BotSortBy, value smithyjson.Value) error {
4100	object := value.Object()
4101	defer object.Close()
4102
4103	if len(v.Attribute) > 0 {
4104		ok := object.Key("attribute")
4105		ok.String(string(v.Attribute))
4106	}
4107
4108	if len(v.Order) > 0 {
4109		ok := object.Key("order")
4110		ok.String(string(v.Order))
4111	}
4112
4113	return nil
4114}
4115
4116func awsRestjson1_serializeDocumentBotVersionLocaleDetails(v *types.BotVersionLocaleDetails, value smithyjson.Value) error {
4117	object := value.Object()
4118	defer object.Close()
4119
4120	if v.SourceBotVersion != nil {
4121		ok := object.Key("sourceBotVersion")
4122		ok.String(*v.SourceBotVersion)
4123	}
4124
4125	return nil
4126}
4127
4128func awsRestjson1_serializeDocumentBotVersionLocaleSpecification(v map[string]types.BotVersionLocaleDetails, value smithyjson.Value) error {
4129	object := value.Object()
4130	defer object.Close()
4131
4132	for key := range v {
4133		om := object.Key(key)
4134		mapVar := v[key]
4135		if err := awsRestjson1_serializeDocumentBotVersionLocaleDetails(&mapVar, om); err != nil {
4136			return err
4137		}
4138	}
4139	return nil
4140}
4141
4142func awsRestjson1_serializeDocumentBotVersionSortBy(v *types.BotVersionSortBy, value smithyjson.Value) error {
4143	object := value.Object()
4144	defer object.Close()
4145
4146	if len(v.Attribute) > 0 {
4147		ok := object.Key("attribute")
4148		ok.String(string(v.Attribute))
4149	}
4150
4151	if len(v.Order) > 0 {
4152		ok := object.Key("order")
4153		ok.String(string(v.Order))
4154	}
4155
4156	return nil
4157}
4158
4159func awsRestjson1_serializeDocumentBuiltInIntentSortBy(v *types.BuiltInIntentSortBy, value smithyjson.Value) error {
4160	object := value.Object()
4161	defer object.Close()
4162
4163	if len(v.Attribute) > 0 {
4164		ok := object.Key("attribute")
4165		ok.String(string(v.Attribute))
4166	}
4167
4168	if len(v.Order) > 0 {
4169		ok := object.Key("order")
4170		ok.String(string(v.Order))
4171	}
4172
4173	return nil
4174}
4175
4176func awsRestjson1_serializeDocumentBuiltInSlotTypeSortBy(v *types.BuiltInSlotTypeSortBy, value smithyjson.Value) error {
4177	object := value.Object()
4178	defer object.Close()
4179
4180	if len(v.Attribute) > 0 {
4181		ok := object.Key("attribute")
4182		ok.String(string(v.Attribute))
4183	}
4184
4185	if len(v.Order) > 0 {
4186		ok := object.Key("order")
4187		ok.String(string(v.Order))
4188	}
4189
4190	return nil
4191}
4192
4193func awsRestjson1_serializeDocumentButton(v *types.Button, value smithyjson.Value) error {
4194	object := value.Object()
4195	defer object.Close()
4196
4197	if v.Text != nil {
4198		ok := object.Key("text")
4199		ok.String(*v.Text)
4200	}
4201
4202	if v.Value != nil {
4203		ok := object.Key("value")
4204		ok.String(*v.Value)
4205	}
4206
4207	return nil
4208}
4209
4210func awsRestjson1_serializeDocumentButtonsList(v []types.Button, value smithyjson.Value) error {
4211	array := value.Array()
4212	defer array.Close()
4213
4214	for i := range v {
4215		av := array.Value()
4216		if err := awsRestjson1_serializeDocumentButton(&v[i], av); err != nil {
4217			return err
4218		}
4219	}
4220	return nil
4221}
4222
4223func awsRestjson1_serializeDocumentCloudWatchLogGroupLogDestination(v *types.CloudWatchLogGroupLogDestination, value smithyjson.Value) error {
4224	object := value.Object()
4225	defer object.Close()
4226
4227	if v.CloudWatchLogGroupArn != nil {
4228		ok := object.Key("cloudWatchLogGroupArn")
4229		ok.String(*v.CloudWatchLogGroupArn)
4230	}
4231
4232	if v.LogPrefix != nil {
4233		ok := object.Key("logPrefix")
4234		ok.String(*v.LogPrefix)
4235	}
4236
4237	return nil
4238}
4239
4240func awsRestjson1_serializeDocumentCodeHookSpecification(v *types.CodeHookSpecification, value smithyjson.Value) error {
4241	object := value.Object()
4242	defer object.Close()
4243
4244	if v.LambdaCodeHook != nil {
4245		ok := object.Key("lambdaCodeHook")
4246		if err := awsRestjson1_serializeDocumentLambdaCodeHook(v.LambdaCodeHook, ok); err != nil {
4247			return err
4248		}
4249	}
4250
4251	return nil
4252}
4253
4254func awsRestjson1_serializeDocumentConversationLogSettings(v *types.ConversationLogSettings, value smithyjson.Value) error {
4255	object := value.Object()
4256	defer object.Close()
4257
4258	if v.AudioLogSettings != nil {
4259		ok := object.Key("audioLogSettings")
4260		if err := awsRestjson1_serializeDocumentAudioLogSettingsList(v.AudioLogSettings, ok); err != nil {
4261			return err
4262		}
4263	}
4264
4265	if v.TextLogSettings != nil {
4266		ok := object.Key("textLogSettings")
4267		if err := awsRestjson1_serializeDocumentTextLogSettingsList(v.TextLogSettings, ok); err != nil {
4268			return err
4269		}
4270	}
4271
4272	return nil
4273}
4274
4275func awsRestjson1_serializeDocumentCustomPayload(v *types.CustomPayload, value smithyjson.Value) error {
4276	object := value.Object()
4277	defer object.Close()
4278
4279	if v.Value != nil {
4280		ok := object.Key("value")
4281		ok.String(*v.Value)
4282	}
4283
4284	return nil
4285}
4286
4287func awsRestjson1_serializeDocumentDataPrivacy(v *types.DataPrivacy, value smithyjson.Value) error {
4288	object := value.Object()
4289	defer object.Close()
4290
4291	{
4292		ok := object.Key("childDirected")
4293		ok.Boolean(v.ChildDirected)
4294	}
4295
4296	return nil
4297}
4298
4299func awsRestjson1_serializeDocumentDialogCodeHookSettings(v *types.DialogCodeHookSettings, value smithyjson.Value) error {
4300	object := value.Object()
4301	defer object.Close()
4302
4303	{
4304		ok := object.Key("enabled")
4305		ok.Boolean(v.Enabled)
4306	}
4307
4308	return nil
4309}
4310
4311func awsRestjson1_serializeDocumentFilterValues(v []string, value smithyjson.Value) error {
4312	array := value.Array()
4313	defer array.Close()
4314
4315	for i := range v {
4316		av := array.Value()
4317		av.String(v[i])
4318	}
4319	return nil
4320}
4321
4322func awsRestjson1_serializeDocumentFulfillmentCodeHookSettings(v *types.FulfillmentCodeHookSettings, value smithyjson.Value) error {
4323	object := value.Object()
4324	defer object.Close()
4325
4326	{
4327		ok := object.Key("enabled")
4328		ok.Boolean(v.Enabled)
4329	}
4330
4331	return nil
4332}
4333
4334func awsRestjson1_serializeDocumentImageResponseCard(v *types.ImageResponseCard, value smithyjson.Value) error {
4335	object := value.Object()
4336	defer object.Close()
4337
4338	if v.Buttons != nil {
4339		ok := object.Key("buttons")
4340		if err := awsRestjson1_serializeDocumentButtonsList(v.Buttons, ok); err != nil {
4341			return err
4342		}
4343	}
4344
4345	if v.ImageUrl != nil {
4346		ok := object.Key("imageUrl")
4347		ok.String(*v.ImageUrl)
4348	}
4349
4350	if v.Subtitle != nil {
4351		ok := object.Key("subtitle")
4352		ok.String(*v.Subtitle)
4353	}
4354
4355	if v.Title != nil {
4356		ok := object.Key("title")
4357		ok.String(*v.Title)
4358	}
4359
4360	return nil
4361}
4362
4363func awsRestjson1_serializeDocumentInputContext(v *types.InputContext, value smithyjson.Value) error {
4364	object := value.Object()
4365	defer object.Close()
4366
4367	if v.Name != nil {
4368		ok := object.Key("name")
4369		ok.String(*v.Name)
4370	}
4371
4372	return nil
4373}
4374
4375func awsRestjson1_serializeDocumentInputContextsList(v []types.InputContext, value smithyjson.Value) error {
4376	array := value.Array()
4377	defer array.Close()
4378
4379	for i := range v {
4380		av := array.Value()
4381		if err := awsRestjson1_serializeDocumentInputContext(&v[i], av); err != nil {
4382			return err
4383		}
4384	}
4385	return nil
4386}
4387
4388func awsRestjson1_serializeDocumentIntentClosingSetting(v *types.IntentClosingSetting, value smithyjson.Value) error {
4389	object := value.Object()
4390	defer object.Close()
4391
4392	if v.ClosingResponse != nil {
4393		ok := object.Key("closingResponse")
4394		if err := awsRestjson1_serializeDocumentResponseSpecification(v.ClosingResponse, ok); err != nil {
4395			return err
4396		}
4397	}
4398
4399	return nil
4400}
4401
4402func awsRestjson1_serializeDocumentIntentConfirmationSetting(v *types.IntentConfirmationSetting, value smithyjson.Value) error {
4403	object := value.Object()
4404	defer object.Close()
4405
4406	if v.DeclinationResponse != nil {
4407		ok := object.Key("declinationResponse")
4408		if err := awsRestjson1_serializeDocumentResponseSpecification(v.DeclinationResponse, ok); err != nil {
4409			return err
4410		}
4411	}
4412
4413	if v.PromptSpecification != nil {
4414		ok := object.Key("promptSpecification")
4415		if err := awsRestjson1_serializeDocumentPromptSpecification(v.PromptSpecification, ok); err != nil {
4416			return err
4417		}
4418	}
4419
4420	return nil
4421}
4422
4423func awsRestjson1_serializeDocumentIntentFilter(v *types.IntentFilter, value smithyjson.Value) error {
4424	object := value.Object()
4425	defer object.Close()
4426
4427	if len(v.Name) > 0 {
4428		ok := object.Key("name")
4429		ok.String(string(v.Name))
4430	}
4431
4432	if len(v.Operator) > 0 {
4433		ok := object.Key("operator")
4434		ok.String(string(v.Operator))
4435	}
4436
4437	if v.Values != nil {
4438		ok := object.Key("values")
4439		if err := awsRestjson1_serializeDocumentFilterValues(v.Values, ok); err != nil {
4440			return err
4441		}
4442	}
4443
4444	return nil
4445}
4446
4447func awsRestjson1_serializeDocumentIntentFilters(v []types.IntentFilter, value smithyjson.Value) error {
4448	array := value.Array()
4449	defer array.Close()
4450
4451	for i := range v {
4452		av := array.Value()
4453		if err := awsRestjson1_serializeDocumentIntentFilter(&v[i], av); err != nil {
4454			return err
4455		}
4456	}
4457	return nil
4458}
4459
4460func awsRestjson1_serializeDocumentIntentSortBy(v *types.IntentSortBy, value smithyjson.Value) error {
4461	object := value.Object()
4462	defer object.Close()
4463
4464	if len(v.Attribute) > 0 {
4465		ok := object.Key("attribute")
4466		ok.String(string(v.Attribute))
4467	}
4468
4469	if len(v.Order) > 0 {
4470		ok := object.Key("order")
4471		ok.String(string(v.Order))
4472	}
4473
4474	return nil
4475}
4476
4477func awsRestjson1_serializeDocumentKendraConfiguration(v *types.KendraConfiguration, value smithyjson.Value) error {
4478	object := value.Object()
4479	defer object.Close()
4480
4481	if v.KendraIndex != nil {
4482		ok := object.Key("kendraIndex")
4483		ok.String(*v.KendraIndex)
4484	}
4485
4486	if v.QueryFilterString != nil {
4487		ok := object.Key("queryFilterString")
4488		ok.String(*v.QueryFilterString)
4489	}
4490
4491	if v.QueryFilterStringEnabled {
4492		ok := object.Key("queryFilterStringEnabled")
4493		ok.Boolean(v.QueryFilterStringEnabled)
4494	}
4495
4496	return nil
4497}
4498
4499func awsRestjson1_serializeDocumentLambdaCodeHook(v *types.LambdaCodeHook, value smithyjson.Value) error {
4500	object := value.Object()
4501	defer object.Close()
4502
4503	if v.CodeHookInterfaceVersion != nil {
4504		ok := object.Key("codeHookInterfaceVersion")
4505		ok.String(*v.CodeHookInterfaceVersion)
4506	}
4507
4508	if v.LambdaARN != nil {
4509		ok := object.Key("lambdaARN")
4510		ok.String(*v.LambdaARN)
4511	}
4512
4513	return nil
4514}
4515
4516func awsRestjson1_serializeDocumentMessage(v *types.Message, value smithyjson.Value) error {
4517	object := value.Object()
4518	defer object.Close()
4519
4520	if v.CustomPayload != nil {
4521		ok := object.Key("customPayload")
4522		if err := awsRestjson1_serializeDocumentCustomPayload(v.CustomPayload, ok); err != nil {
4523			return err
4524		}
4525	}
4526
4527	if v.ImageResponseCard != nil {
4528		ok := object.Key("imageResponseCard")
4529		if err := awsRestjson1_serializeDocumentImageResponseCard(v.ImageResponseCard, ok); err != nil {
4530			return err
4531		}
4532	}
4533
4534	if v.PlainTextMessage != nil {
4535		ok := object.Key("plainTextMessage")
4536		if err := awsRestjson1_serializeDocumentPlainTextMessage(v.PlainTextMessage, ok); err != nil {
4537			return err
4538		}
4539	}
4540
4541	if v.SsmlMessage != nil {
4542		ok := object.Key("ssmlMessage")
4543		if err := awsRestjson1_serializeDocumentSSMLMessage(v.SsmlMessage, ok); err != nil {
4544			return err
4545		}
4546	}
4547
4548	return nil
4549}
4550
4551func awsRestjson1_serializeDocumentMessageGroup(v *types.MessageGroup, value smithyjson.Value) error {
4552	object := value.Object()
4553	defer object.Close()
4554
4555	if v.Message != nil {
4556		ok := object.Key("message")
4557		if err := awsRestjson1_serializeDocumentMessage(v.Message, ok); err != nil {
4558			return err
4559		}
4560	}
4561
4562	if v.Variations != nil {
4563		ok := object.Key("variations")
4564		if err := awsRestjson1_serializeDocumentMessageVariationsList(v.Variations, ok); err != nil {
4565			return err
4566		}
4567	}
4568
4569	return nil
4570}
4571
4572func awsRestjson1_serializeDocumentMessageGroupsList(v []types.MessageGroup, value smithyjson.Value) error {
4573	array := value.Array()
4574	defer array.Close()
4575
4576	for i := range v {
4577		av := array.Value()
4578		if err := awsRestjson1_serializeDocumentMessageGroup(&v[i], av); err != nil {
4579			return err
4580		}
4581	}
4582	return nil
4583}
4584
4585func awsRestjson1_serializeDocumentMessageVariationsList(v []types.Message, value smithyjson.Value) error {
4586	array := value.Array()
4587	defer array.Close()
4588
4589	for i := range v {
4590		av := array.Value()
4591		if err := awsRestjson1_serializeDocumentMessage(&v[i], av); err != nil {
4592			return err
4593		}
4594	}
4595	return nil
4596}
4597
4598func awsRestjson1_serializeDocumentObfuscationSetting(v *types.ObfuscationSetting, value smithyjson.Value) error {
4599	object := value.Object()
4600	defer object.Close()
4601
4602	if len(v.ObfuscationSettingType) > 0 {
4603		ok := object.Key("obfuscationSettingType")
4604		ok.String(string(v.ObfuscationSettingType))
4605	}
4606
4607	return nil
4608}
4609
4610func awsRestjson1_serializeDocumentOutputContext(v *types.OutputContext, value smithyjson.Value) error {
4611	object := value.Object()
4612	defer object.Close()
4613
4614	if v.Name != nil {
4615		ok := object.Key("name")
4616		ok.String(*v.Name)
4617	}
4618
4619	if v.TimeToLiveInSeconds != nil {
4620		ok := object.Key("timeToLiveInSeconds")
4621		ok.Integer(*v.TimeToLiveInSeconds)
4622	}
4623
4624	if v.TurnsToLive != nil {
4625		ok := object.Key("turnsToLive")
4626		ok.Integer(*v.TurnsToLive)
4627	}
4628
4629	return nil
4630}
4631
4632func awsRestjson1_serializeDocumentOutputContextsList(v []types.OutputContext, value smithyjson.Value) error {
4633	array := value.Array()
4634	defer array.Close()
4635
4636	for i := range v {
4637		av := array.Value()
4638		if err := awsRestjson1_serializeDocumentOutputContext(&v[i], av); err != nil {
4639			return err
4640		}
4641	}
4642	return nil
4643}
4644
4645func awsRestjson1_serializeDocumentPlainTextMessage(v *types.PlainTextMessage, value smithyjson.Value) error {
4646	object := value.Object()
4647	defer object.Close()
4648
4649	if v.Value != nil {
4650		ok := object.Key("value")
4651		ok.String(*v.Value)
4652	}
4653
4654	return nil
4655}
4656
4657func awsRestjson1_serializeDocumentPromptSpecification(v *types.PromptSpecification, value smithyjson.Value) error {
4658	object := value.Object()
4659	defer object.Close()
4660
4661	if v.AllowInterrupt != nil {
4662		ok := object.Key("allowInterrupt")
4663		ok.Boolean(*v.AllowInterrupt)
4664	}
4665
4666	if v.MaxRetries != nil {
4667		ok := object.Key("maxRetries")
4668		ok.Integer(*v.MaxRetries)
4669	}
4670
4671	if v.MessageGroups != nil {
4672		ok := object.Key("messageGroups")
4673		if err := awsRestjson1_serializeDocumentMessageGroupsList(v.MessageGroups, ok); err != nil {
4674			return err
4675		}
4676	}
4677
4678	return nil
4679}
4680
4681func awsRestjson1_serializeDocumentResponseSpecification(v *types.ResponseSpecification, value smithyjson.Value) error {
4682	object := value.Object()
4683	defer object.Close()
4684
4685	if v.AllowInterrupt != nil {
4686		ok := object.Key("allowInterrupt")
4687		ok.Boolean(*v.AllowInterrupt)
4688	}
4689
4690	if v.MessageGroups != nil {
4691		ok := object.Key("messageGroups")
4692		if err := awsRestjson1_serializeDocumentMessageGroupsList(v.MessageGroups, ok); err != nil {
4693			return err
4694		}
4695	}
4696
4697	return nil
4698}
4699
4700func awsRestjson1_serializeDocumentS3BucketLogDestination(v *types.S3BucketLogDestination, value smithyjson.Value) error {
4701	object := value.Object()
4702	defer object.Close()
4703
4704	if v.KmsKeyArn != nil {
4705		ok := object.Key("kmsKeyArn")
4706		ok.String(*v.KmsKeyArn)
4707	}
4708
4709	if v.LogPrefix != nil {
4710		ok := object.Key("logPrefix")
4711		ok.String(*v.LogPrefix)
4712	}
4713
4714	if v.S3BucketArn != nil {
4715		ok := object.Key("s3BucketArn")
4716		ok.String(*v.S3BucketArn)
4717	}
4718
4719	return nil
4720}
4721
4722func awsRestjson1_serializeDocumentSampleUtterance(v *types.SampleUtterance, value smithyjson.Value) error {
4723	object := value.Object()
4724	defer object.Close()
4725
4726	if v.Utterance != nil {
4727		ok := object.Key("utterance")
4728		ok.String(*v.Utterance)
4729	}
4730
4731	return nil
4732}
4733
4734func awsRestjson1_serializeDocumentSampleUtterancesList(v []types.SampleUtterance, value smithyjson.Value) error {
4735	array := value.Array()
4736	defer array.Close()
4737
4738	for i := range v {
4739		av := array.Value()
4740		if err := awsRestjson1_serializeDocumentSampleUtterance(&v[i], av); err != nil {
4741			return err
4742		}
4743	}
4744	return nil
4745}
4746
4747func awsRestjson1_serializeDocumentSampleValue(v *types.SampleValue, value smithyjson.Value) error {
4748	object := value.Object()
4749	defer object.Close()
4750
4751	if v.Value != nil {
4752		ok := object.Key("value")
4753		ok.String(*v.Value)
4754	}
4755
4756	return nil
4757}
4758
4759func awsRestjson1_serializeDocumentSentimentAnalysisSettings(v *types.SentimentAnalysisSettings, value smithyjson.Value) error {
4760	object := value.Object()
4761	defer object.Close()
4762
4763	{
4764		ok := object.Key("detectSentiment")
4765		ok.Boolean(v.DetectSentiment)
4766	}
4767
4768	return nil
4769}
4770
4771func awsRestjson1_serializeDocumentSlotDefaultValue(v *types.SlotDefaultValue, value smithyjson.Value) error {
4772	object := value.Object()
4773	defer object.Close()
4774
4775	if v.DefaultValue != nil {
4776		ok := object.Key("defaultValue")
4777		ok.String(*v.DefaultValue)
4778	}
4779
4780	return nil
4781}
4782
4783func awsRestjson1_serializeDocumentSlotDefaultValueList(v []types.SlotDefaultValue, value smithyjson.Value) error {
4784	array := value.Array()
4785	defer array.Close()
4786
4787	for i := range v {
4788		av := array.Value()
4789		if err := awsRestjson1_serializeDocumentSlotDefaultValue(&v[i], av); err != nil {
4790			return err
4791		}
4792	}
4793	return nil
4794}
4795
4796func awsRestjson1_serializeDocumentSlotDefaultValueSpecification(v *types.SlotDefaultValueSpecification, value smithyjson.Value) error {
4797	object := value.Object()
4798	defer object.Close()
4799
4800	if v.DefaultValueList != nil {
4801		ok := object.Key("defaultValueList")
4802		if err := awsRestjson1_serializeDocumentSlotDefaultValueList(v.DefaultValueList, ok); err != nil {
4803			return err
4804		}
4805	}
4806
4807	return nil
4808}
4809
4810func awsRestjson1_serializeDocumentSlotFilter(v *types.SlotFilter, value smithyjson.Value) error {
4811	object := value.Object()
4812	defer object.Close()
4813
4814	if len(v.Name) > 0 {
4815		ok := object.Key("name")
4816		ok.String(string(v.Name))
4817	}
4818
4819	if len(v.Operator) > 0 {
4820		ok := object.Key("operator")
4821		ok.String(string(v.Operator))
4822	}
4823
4824	if v.Values != nil {
4825		ok := object.Key("values")
4826		if err := awsRestjson1_serializeDocumentFilterValues(v.Values, ok); err != nil {
4827			return err
4828		}
4829	}
4830
4831	return nil
4832}
4833
4834func awsRestjson1_serializeDocumentSlotFilters(v []types.SlotFilter, value smithyjson.Value) error {
4835	array := value.Array()
4836	defer array.Close()
4837
4838	for i := range v {
4839		av := array.Value()
4840		if err := awsRestjson1_serializeDocumentSlotFilter(&v[i], av); err != nil {
4841			return err
4842		}
4843	}
4844	return nil
4845}
4846
4847func awsRestjson1_serializeDocumentSlotPrioritiesList(v []types.SlotPriority, value smithyjson.Value) error {
4848	array := value.Array()
4849	defer array.Close()
4850
4851	for i := range v {
4852		av := array.Value()
4853		if err := awsRestjson1_serializeDocumentSlotPriority(&v[i], av); err != nil {
4854			return err
4855		}
4856	}
4857	return nil
4858}
4859
4860func awsRestjson1_serializeDocumentSlotPriority(v *types.SlotPriority, value smithyjson.Value) error {
4861	object := value.Object()
4862	defer object.Close()
4863
4864	if v.Priority != nil {
4865		ok := object.Key("priority")
4866		ok.Integer(*v.Priority)
4867	}
4868
4869	if v.SlotId != nil {
4870		ok := object.Key("slotId")
4871		ok.String(*v.SlotId)
4872	}
4873
4874	return nil
4875}
4876
4877func awsRestjson1_serializeDocumentSlotSortBy(v *types.SlotSortBy, value smithyjson.Value) error {
4878	object := value.Object()
4879	defer object.Close()
4880
4881	if len(v.Attribute) > 0 {
4882		ok := object.Key("attribute")
4883		ok.String(string(v.Attribute))
4884	}
4885
4886	if len(v.Order) > 0 {
4887		ok := object.Key("order")
4888		ok.String(string(v.Order))
4889	}
4890
4891	return nil
4892}
4893
4894func awsRestjson1_serializeDocumentSlotTypeFilter(v *types.SlotTypeFilter, value smithyjson.Value) error {
4895	object := value.Object()
4896	defer object.Close()
4897
4898	if len(v.Name) > 0 {
4899		ok := object.Key("name")
4900		ok.String(string(v.Name))
4901	}
4902
4903	if len(v.Operator) > 0 {
4904		ok := object.Key("operator")
4905		ok.String(string(v.Operator))
4906	}
4907
4908	if v.Values != nil {
4909		ok := object.Key("values")
4910		if err := awsRestjson1_serializeDocumentFilterValues(v.Values, ok); err != nil {
4911			return err
4912		}
4913	}
4914
4915	return nil
4916}
4917
4918func awsRestjson1_serializeDocumentSlotTypeFilters(v []types.SlotTypeFilter, value smithyjson.Value) error {
4919	array := value.Array()
4920	defer array.Close()
4921
4922	for i := range v {
4923		av := array.Value()
4924		if err := awsRestjson1_serializeDocumentSlotTypeFilter(&v[i], av); err != nil {
4925			return err
4926		}
4927	}
4928	return nil
4929}
4930
4931func awsRestjson1_serializeDocumentSlotTypeSortBy(v *types.SlotTypeSortBy, value smithyjson.Value) error {
4932	object := value.Object()
4933	defer object.Close()
4934
4935	if len(v.Attribute) > 0 {
4936		ok := object.Key("attribute")
4937		ok.String(string(v.Attribute))
4938	}
4939
4940	if len(v.Order) > 0 {
4941		ok := object.Key("order")
4942		ok.String(string(v.Order))
4943	}
4944
4945	return nil
4946}
4947
4948func awsRestjson1_serializeDocumentSlotTypeValue(v *types.SlotTypeValue, value smithyjson.Value) error {
4949	object := value.Object()
4950	defer object.Close()
4951
4952	if v.SampleValue != nil {
4953		ok := object.Key("sampleValue")
4954		if err := awsRestjson1_serializeDocumentSampleValue(v.SampleValue, ok); err != nil {
4955			return err
4956		}
4957	}
4958
4959	if v.Synonyms != nil {
4960		ok := object.Key("synonyms")
4961		if err := awsRestjson1_serializeDocumentSynonymList(v.Synonyms, ok); err != nil {
4962			return err
4963		}
4964	}
4965
4966	return nil
4967}
4968
4969func awsRestjson1_serializeDocumentSlotTypeValues(v []types.SlotTypeValue, value smithyjson.Value) error {
4970	array := value.Array()
4971	defer array.Close()
4972
4973	for i := range v {
4974		av := array.Value()
4975		if err := awsRestjson1_serializeDocumentSlotTypeValue(&v[i], av); err != nil {
4976			return err
4977		}
4978	}
4979	return nil
4980}
4981
4982func awsRestjson1_serializeDocumentSlotValueElicitationSetting(v *types.SlotValueElicitationSetting, value smithyjson.Value) error {
4983	object := value.Object()
4984	defer object.Close()
4985
4986	if v.DefaultValueSpecification != nil {
4987		ok := object.Key("defaultValueSpecification")
4988		if err := awsRestjson1_serializeDocumentSlotDefaultValueSpecification(v.DefaultValueSpecification, ok); err != nil {
4989			return err
4990		}
4991	}
4992
4993	if v.PromptSpecification != nil {
4994		ok := object.Key("promptSpecification")
4995		if err := awsRestjson1_serializeDocumentPromptSpecification(v.PromptSpecification, ok); err != nil {
4996			return err
4997		}
4998	}
4999
5000	if v.SampleUtterances != nil {
5001		ok := object.Key("sampleUtterances")
5002		if err := awsRestjson1_serializeDocumentSampleUtterancesList(v.SampleUtterances, ok); err != nil {
5003			return err
5004		}
5005	}
5006
5007	if len(v.SlotConstraint) > 0 {
5008		ok := object.Key("slotConstraint")
5009		ok.String(string(v.SlotConstraint))
5010	}
5011
5012	if v.WaitAndContinueSpecification != nil {
5013		ok := object.Key("waitAndContinueSpecification")
5014		if err := awsRestjson1_serializeDocumentWaitAndContinueSpecification(v.WaitAndContinueSpecification, ok); err != nil {
5015			return err
5016		}
5017	}
5018
5019	return nil
5020}
5021
5022func awsRestjson1_serializeDocumentSlotValueRegexFilter(v *types.SlotValueRegexFilter, value smithyjson.Value) error {
5023	object := value.Object()
5024	defer object.Close()
5025
5026	if v.Pattern != nil {
5027		ok := object.Key("pattern")
5028		ok.String(*v.Pattern)
5029	}
5030
5031	return nil
5032}
5033
5034func awsRestjson1_serializeDocumentSlotValueSelectionSetting(v *types.SlotValueSelectionSetting, value smithyjson.Value) error {
5035	object := value.Object()
5036	defer object.Close()
5037
5038	if v.RegexFilter != nil {
5039		ok := object.Key("regexFilter")
5040		if err := awsRestjson1_serializeDocumentSlotValueRegexFilter(v.RegexFilter, ok); err != nil {
5041			return err
5042		}
5043	}
5044
5045	if len(v.ResolutionStrategy) > 0 {
5046		ok := object.Key("resolutionStrategy")
5047		ok.String(string(v.ResolutionStrategy))
5048	}
5049
5050	return nil
5051}
5052
5053func awsRestjson1_serializeDocumentSSMLMessage(v *types.SSMLMessage, value smithyjson.Value) error {
5054	object := value.Object()
5055	defer object.Close()
5056
5057	if v.Value != nil {
5058		ok := object.Key("value")
5059		ok.String(*v.Value)
5060	}
5061
5062	return nil
5063}
5064
5065func awsRestjson1_serializeDocumentStillWaitingResponseSpecification(v *types.StillWaitingResponseSpecification, value smithyjson.Value) error {
5066	object := value.Object()
5067	defer object.Close()
5068
5069	if v.AllowInterrupt != nil {
5070		ok := object.Key("allowInterrupt")
5071		ok.Boolean(*v.AllowInterrupt)
5072	}
5073
5074	if v.FrequencyInSeconds != nil {
5075		ok := object.Key("frequencyInSeconds")
5076		ok.Integer(*v.FrequencyInSeconds)
5077	}
5078
5079	if v.MessageGroups != nil {
5080		ok := object.Key("messageGroups")
5081		if err := awsRestjson1_serializeDocumentMessageGroupsList(v.MessageGroups, ok); err != nil {
5082			return err
5083		}
5084	}
5085
5086	if v.TimeoutInSeconds != nil {
5087		ok := object.Key("timeoutInSeconds")
5088		ok.Integer(*v.TimeoutInSeconds)
5089	}
5090
5091	return nil
5092}
5093
5094func awsRestjson1_serializeDocumentSynonymList(v []types.SampleValue, value smithyjson.Value) error {
5095	array := value.Array()
5096	defer array.Close()
5097
5098	for i := range v {
5099		av := array.Value()
5100		if err := awsRestjson1_serializeDocumentSampleValue(&v[i], av); err != nil {
5101			return err
5102		}
5103	}
5104	return nil
5105}
5106
5107func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error {
5108	object := value.Object()
5109	defer object.Close()
5110
5111	for key := range v {
5112		om := object.Key(key)
5113		om.String(v[key])
5114	}
5115	return nil
5116}
5117
5118func awsRestjson1_serializeDocumentTextLogDestination(v *types.TextLogDestination, value smithyjson.Value) error {
5119	object := value.Object()
5120	defer object.Close()
5121
5122	if v.CloudWatch != nil {
5123		ok := object.Key("cloudWatch")
5124		if err := awsRestjson1_serializeDocumentCloudWatchLogGroupLogDestination(v.CloudWatch, ok); err != nil {
5125			return err
5126		}
5127	}
5128
5129	return nil
5130}
5131
5132func awsRestjson1_serializeDocumentTextLogSetting(v *types.TextLogSetting, value smithyjson.Value) error {
5133	object := value.Object()
5134	defer object.Close()
5135
5136	if v.Destination != nil {
5137		ok := object.Key("destination")
5138		if err := awsRestjson1_serializeDocumentTextLogDestination(v.Destination, ok); err != nil {
5139			return err
5140		}
5141	}
5142
5143	{
5144		ok := object.Key("enabled")
5145		ok.Boolean(v.Enabled)
5146	}
5147
5148	return nil
5149}
5150
5151func awsRestjson1_serializeDocumentTextLogSettingsList(v []types.TextLogSetting, value smithyjson.Value) error {
5152	array := value.Array()
5153	defer array.Close()
5154
5155	for i := range v {
5156		av := array.Value()
5157		if err := awsRestjson1_serializeDocumentTextLogSetting(&v[i], av); err != nil {
5158			return err
5159		}
5160	}
5161	return nil
5162}
5163
5164func awsRestjson1_serializeDocumentVoiceSettings(v *types.VoiceSettings, value smithyjson.Value) error {
5165	object := value.Object()
5166	defer object.Close()
5167
5168	if v.VoiceId != nil {
5169		ok := object.Key("voiceId")
5170		ok.String(*v.VoiceId)
5171	}
5172
5173	return nil
5174}
5175
5176func awsRestjson1_serializeDocumentWaitAndContinueSpecification(v *types.WaitAndContinueSpecification, value smithyjson.Value) error {
5177	object := value.Object()
5178	defer object.Close()
5179
5180	if v.ContinueResponse != nil {
5181		ok := object.Key("continueResponse")
5182		if err := awsRestjson1_serializeDocumentResponseSpecification(v.ContinueResponse, ok); err != nil {
5183			return err
5184		}
5185	}
5186
5187	if v.StillWaitingResponse != nil {
5188		ok := object.Key("stillWaitingResponse")
5189		if err := awsRestjson1_serializeDocumentStillWaitingResponseSpecification(v.StillWaitingResponse, ok); err != nil {
5190			return err
5191		}
5192	}
5193
5194	if v.WaitingResponse != nil {
5195		ok := object.Key("waitingResponse")
5196		if err := awsRestjson1_serializeDocumentResponseSpecification(v.WaitingResponse, ok); err != nil {
5197			return err
5198		}
5199	}
5200
5201	return nil
5202}
5203