1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package cloudfront
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/cloudfront/types"
10	smithy "github.com/aws/smithy-go"
11	"github.com/aws/smithy-go/encoding/httpbinding"
12	smithyxml "github.com/aws/smithy-go/encoding/xml"
13	"github.com/aws/smithy-go/middleware"
14	smithyhttp "github.com/aws/smithy-go/transport/http"
15)
16
17type awsRestxml_serializeOpCreateCachePolicy struct {
18}
19
20func (*awsRestxml_serializeOpCreateCachePolicy) ID() string {
21	return "OperationSerializer"
22}
23
24func (m *awsRestxml_serializeOpCreateCachePolicy) 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.(*CreateCachePolicyInput)
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("/2020-05-31/cache-policy")
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 input.CachePolicyConfig != nil {
48		if !restEncoder.HasHeader("Content-Type") {
49			restEncoder.SetHeader("Content-Type").String("application/xml")
50		}
51
52		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
53		payloadRootAttr := []smithyxml.Attr{}
54		payloadRoot := smithyxml.StartElement{
55			Name: smithyxml.Name{
56				Local: "CachePolicyConfig",
57			},
58			Attr: payloadRootAttr,
59		}
60		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
61		if err := awsRestxml_serializeDocumentCachePolicyConfig(input.CachePolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
62			return out, metadata, &smithy.SerializationError{Err: err}
63		}
64		payload := bytes.NewReader(xmlEncoder.Bytes())
65		if request, err = request.SetStream(payload); err != nil {
66			return out, metadata, &smithy.SerializationError{Err: err}
67		}
68	}
69
70	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
71		return out, metadata, &smithy.SerializationError{Err: err}
72	}
73	in.Request = request
74
75	return next.HandleSerialize(ctx, in)
76}
77func awsRestxml_serializeOpHttpBindingsCreateCachePolicyInput(v *CreateCachePolicyInput, encoder *httpbinding.Encoder) error {
78	if v == nil {
79		return fmt.Errorf("unsupported serialization of nil %T", v)
80	}
81
82	return nil
83}
84
85type awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity struct {
86}
87
88func (*awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity) ID() string {
89	return "OperationSerializer"
90}
91
92func (m *awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
93	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
94) {
95	request, ok := in.Request.(*smithyhttp.Request)
96	if !ok {
97		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
98	}
99
100	input, ok := in.Parameters.(*CreateCloudFrontOriginAccessIdentityInput)
101	_ = input
102	if !ok {
103		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
104	}
105
106	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront")
107	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
108	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
109	request.Method = "POST"
110	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
111	if err != nil {
112		return out, metadata, &smithy.SerializationError{Err: err}
113	}
114
115	if input.CloudFrontOriginAccessIdentityConfig != nil {
116		if !restEncoder.HasHeader("Content-Type") {
117			restEncoder.SetHeader("Content-Type").String("application/xml")
118		}
119
120		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
121		payloadRootAttr := []smithyxml.Attr{}
122		payloadRoot := smithyxml.StartElement{
123			Name: smithyxml.Name{
124				Local: "CloudFrontOriginAccessIdentityConfig",
125			},
126			Attr: payloadRootAttr,
127		}
128		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
129		if err := awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
130			return out, metadata, &smithy.SerializationError{Err: err}
131		}
132		payload := bytes.NewReader(xmlEncoder.Bytes())
133		if request, err = request.SetStream(payload); err != nil {
134			return out, metadata, &smithy.SerializationError{Err: err}
135		}
136	}
137
138	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
139		return out, metadata, &smithy.SerializationError{Err: err}
140	}
141	in.Request = request
142
143	return next.HandleSerialize(ctx, in)
144}
145func awsRestxml_serializeOpHttpBindingsCreateCloudFrontOriginAccessIdentityInput(v *CreateCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error {
146	if v == nil {
147		return fmt.Errorf("unsupported serialization of nil %T", v)
148	}
149
150	return nil
151}
152
153type awsRestxml_serializeOpCreateDistribution struct {
154}
155
156func (*awsRestxml_serializeOpCreateDistribution) ID() string {
157	return "OperationSerializer"
158}
159
160func (m *awsRestxml_serializeOpCreateDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
161	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
162) {
163	request, ok := in.Request.(*smithyhttp.Request)
164	if !ok {
165		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
166	}
167
168	input, ok := in.Parameters.(*CreateDistributionInput)
169	_ = input
170	if !ok {
171		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
172	}
173
174	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution")
175	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
176	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
177	request.Method = "POST"
178	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
179	if err != nil {
180		return out, metadata, &smithy.SerializationError{Err: err}
181	}
182
183	if input.DistributionConfig != nil {
184		if !restEncoder.HasHeader("Content-Type") {
185			restEncoder.SetHeader("Content-Type").String("application/xml")
186		}
187
188		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
189		payloadRootAttr := []smithyxml.Attr{}
190		payloadRoot := smithyxml.StartElement{
191			Name: smithyxml.Name{
192				Local: "DistributionConfig",
193			},
194			Attr: payloadRootAttr,
195		}
196		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
197		if err := awsRestxml_serializeDocumentDistributionConfig(input.DistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
198			return out, metadata, &smithy.SerializationError{Err: err}
199		}
200		payload := bytes.NewReader(xmlEncoder.Bytes())
201		if request, err = request.SetStream(payload); err != nil {
202			return out, metadata, &smithy.SerializationError{Err: err}
203		}
204	}
205
206	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
207		return out, metadata, &smithy.SerializationError{Err: err}
208	}
209	in.Request = request
210
211	return next.HandleSerialize(ctx, in)
212}
213func awsRestxml_serializeOpHttpBindingsCreateDistributionInput(v *CreateDistributionInput, encoder *httpbinding.Encoder) error {
214	if v == nil {
215		return fmt.Errorf("unsupported serialization of nil %T", v)
216	}
217
218	return nil
219}
220
221type awsRestxml_serializeOpCreateDistributionWithTags struct {
222}
223
224func (*awsRestxml_serializeOpCreateDistributionWithTags) ID() string {
225	return "OperationSerializer"
226}
227
228func (m *awsRestxml_serializeOpCreateDistributionWithTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
229	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
230) {
231	request, ok := in.Request.(*smithyhttp.Request)
232	if !ok {
233		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
234	}
235
236	input, ok := in.Parameters.(*CreateDistributionWithTagsInput)
237	_ = input
238	if !ok {
239		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
240	}
241
242	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution?WithTags")
243	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
244	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
245	request.Method = "POST"
246	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
247	if err != nil {
248		return out, metadata, &smithy.SerializationError{Err: err}
249	}
250
251	if input.DistributionConfigWithTags != nil {
252		if !restEncoder.HasHeader("Content-Type") {
253			restEncoder.SetHeader("Content-Type").String("application/xml")
254		}
255
256		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
257		payloadRootAttr := []smithyxml.Attr{}
258		payloadRoot := smithyxml.StartElement{
259			Name: smithyxml.Name{
260				Local: "DistributionConfigWithTags",
261			},
262			Attr: payloadRootAttr,
263		}
264		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
265		if err := awsRestxml_serializeDocumentDistributionConfigWithTags(input.DistributionConfigWithTags, xmlEncoder.RootElement(payloadRoot)); err != nil {
266			return out, metadata, &smithy.SerializationError{Err: err}
267		}
268		payload := bytes.NewReader(xmlEncoder.Bytes())
269		if request, err = request.SetStream(payload); err != nil {
270			return out, metadata, &smithy.SerializationError{Err: err}
271		}
272	}
273
274	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
275		return out, metadata, &smithy.SerializationError{Err: err}
276	}
277	in.Request = request
278
279	return next.HandleSerialize(ctx, in)
280}
281func awsRestxml_serializeOpHttpBindingsCreateDistributionWithTagsInput(v *CreateDistributionWithTagsInput, encoder *httpbinding.Encoder) error {
282	if v == nil {
283		return fmt.Errorf("unsupported serialization of nil %T", v)
284	}
285
286	return nil
287}
288
289type awsRestxml_serializeOpCreateFieldLevelEncryptionConfig struct {
290}
291
292func (*awsRestxml_serializeOpCreateFieldLevelEncryptionConfig) ID() string {
293	return "OperationSerializer"
294}
295
296func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
297	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
298) {
299	request, ok := in.Request.(*smithyhttp.Request)
300	if !ok {
301		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
302	}
303
304	input, ok := in.Parameters.(*CreateFieldLevelEncryptionConfigInput)
305	_ = input
306	if !ok {
307		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
308	}
309
310	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption")
311	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
312	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
313	request.Method = "POST"
314	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
315	if err != nil {
316		return out, metadata, &smithy.SerializationError{Err: err}
317	}
318
319	if input.FieldLevelEncryptionConfig != nil {
320		if !restEncoder.HasHeader("Content-Type") {
321			restEncoder.SetHeader("Content-Type").String("application/xml")
322		}
323
324		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
325		payloadRootAttr := []smithyxml.Attr{}
326		payloadRoot := smithyxml.StartElement{
327			Name: smithyxml.Name{
328				Local: "FieldLevelEncryptionConfig",
329			},
330			Attr: payloadRootAttr,
331		}
332		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
333		if err := awsRestxml_serializeDocumentFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
334			return out, metadata, &smithy.SerializationError{Err: err}
335		}
336		payload := bytes.NewReader(xmlEncoder.Bytes())
337		if request, err = request.SetStream(payload); err != nil {
338			return out, metadata, &smithy.SerializationError{Err: err}
339		}
340	}
341
342	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
343		return out, metadata, &smithy.SerializationError{Err: err}
344	}
345	in.Request = request
346
347	return next.HandleSerialize(ctx, in)
348}
349func awsRestxml_serializeOpHttpBindingsCreateFieldLevelEncryptionConfigInput(v *CreateFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error {
350	if v == nil {
351		return fmt.Errorf("unsupported serialization of nil %T", v)
352	}
353
354	return nil
355}
356
357type awsRestxml_serializeOpCreateFieldLevelEncryptionProfile struct {
358}
359
360func (*awsRestxml_serializeOpCreateFieldLevelEncryptionProfile) ID() string {
361	return "OperationSerializer"
362}
363
364func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
365	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
366) {
367	request, ok := in.Request.(*smithyhttp.Request)
368	if !ok {
369		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
370	}
371
372	input, ok := in.Parameters.(*CreateFieldLevelEncryptionProfileInput)
373	_ = input
374	if !ok {
375		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
376	}
377
378	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile")
379	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
380	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
381	request.Method = "POST"
382	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
383	if err != nil {
384		return out, metadata, &smithy.SerializationError{Err: err}
385	}
386
387	if input.FieldLevelEncryptionProfileConfig != nil {
388		if !restEncoder.HasHeader("Content-Type") {
389			restEncoder.SetHeader("Content-Type").String("application/xml")
390		}
391
392		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
393		payloadRootAttr := []smithyxml.Attr{}
394		payloadRoot := smithyxml.StartElement{
395			Name: smithyxml.Name{
396				Local: "FieldLevelEncryptionProfileConfig",
397			},
398			Attr: payloadRootAttr,
399		}
400		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
401		if err := awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
402			return out, metadata, &smithy.SerializationError{Err: err}
403		}
404		payload := bytes.NewReader(xmlEncoder.Bytes())
405		if request, err = request.SetStream(payload); err != nil {
406			return out, metadata, &smithy.SerializationError{Err: err}
407		}
408	}
409
410	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
411		return out, metadata, &smithy.SerializationError{Err: err}
412	}
413	in.Request = request
414
415	return next.HandleSerialize(ctx, in)
416}
417func awsRestxml_serializeOpHttpBindingsCreateFieldLevelEncryptionProfileInput(v *CreateFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error {
418	if v == nil {
419		return fmt.Errorf("unsupported serialization of nil %T", v)
420	}
421
422	return nil
423}
424
425type awsRestxml_serializeOpCreateInvalidation struct {
426}
427
428func (*awsRestxml_serializeOpCreateInvalidation) ID() string {
429	return "OperationSerializer"
430}
431
432func (m *awsRestxml_serializeOpCreateInvalidation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
433	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
434) {
435	request, ok := in.Request.(*smithyhttp.Request)
436	if !ok {
437		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
438	}
439
440	input, ok := in.Parameters.(*CreateInvalidationInput)
441	_ = input
442	if !ok {
443		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
444	}
445
446	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation")
447	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
448	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
449	request.Method = "POST"
450	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
451	if err != nil {
452		return out, metadata, &smithy.SerializationError{Err: err}
453	}
454
455	if err := awsRestxml_serializeOpHttpBindingsCreateInvalidationInput(input, restEncoder); err != nil {
456		return out, metadata, &smithy.SerializationError{Err: err}
457	}
458
459	if input.InvalidationBatch != nil {
460		if !restEncoder.HasHeader("Content-Type") {
461			restEncoder.SetHeader("Content-Type").String("application/xml")
462		}
463
464		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
465		payloadRootAttr := []smithyxml.Attr{}
466		payloadRoot := smithyxml.StartElement{
467			Name: smithyxml.Name{
468				Local: "InvalidationBatch",
469			},
470			Attr: payloadRootAttr,
471		}
472		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
473		if err := awsRestxml_serializeDocumentInvalidationBatch(input.InvalidationBatch, xmlEncoder.RootElement(payloadRoot)); err != nil {
474			return out, metadata, &smithy.SerializationError{Err: err}
475		}
476		payload := bytes.NewReader(xmlEncoder.Bytes())
477		if request, err = request.SetStream(payload); err != nil {
478			return out, metadata, &smithy.SerializationError{Err: err}
479		}
480	}
481
482	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
483		return out, metadata, &smithy.SerializationError{Err: err}
484	}
485	in.Request = request
486
487	return next.HandleSerialize(ctx, in)
488}
489func awsRestxml_serializeOpHttpBindingsCreateInvalidationInput(v *CreateInvalidationInput, encoder *httpbinding.Encoder) error {
490	if v == nil {
491		return fmt.Errorf("unsupported serialization of nil %T", v)
492	}
493
494	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
495		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
496	}
497	if v.DistributionId != nil {
498		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
499			return err
500		}
501	}
502
503	return nil
504}
505
506type awsRestxml_serializeOpCreateKeyGroup struct {
507}
508
509func (*awsRestxml_serializeOpCreateKeyGroup) ID() string {
510	return "OperationSerializer"
511}
512
513func (m *awsRestxml_serializeOpCreateKeyGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
514	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
515) {
516	request, ok := in.Request.(*smithyhttp.Request)
517	if !ok {
518		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
519	}
520
521	input, ok := in.Parameters.(*CreateKeyGroupInput)
522	_ = input
523	if !ok {
524		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
525	}
526
527	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group")
528	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
529	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
530	request.Method = "POST"
531	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
532	if err != nil {
533		return out, metadata, &smithy.SerializationError{Err: err}
534	}
535
536	if input.KeyGroupConfig != nil {
537		if !restEncoder.HasHeader("Content-Type") {
538			restEncoder.SetHeader("Content-Type").String("application/xml")
539		}
540
541		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
542		payloadRootAttr := []smithyxml.Attr{}
543		payloadRoot := smithyxml.StartElement{
544			Name: smithyxml.Name{
545				Local: "KeyGroupConfig",
546			},
547			Attr: payloadRootAttr,
548		}
549		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
550		if err := awsRestxml_serializeDocumentKeyGroupConfig(input.KeyGroupConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
551			return out, metadata, &smithy.SerializationError{Err: err}
552		}
553		payload := bytes.NewReader(xmlEncoder.Bytes())
554		if request, err = request.SetStream(payload); err != nil {
555			return out, metadata, &smithy.SerializationError{Err: err}
556		}
557	}
558
559	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
560		return out, metadata, &smithy.SerializationError{Err: err}
561	}
562	in.Request = request
563
564	return next.HandleSerialize(ctx, in)
565}
566func awsRestxml_serializeOpHttpBindingsCreateKeyGroupInput(v *CreateKeyGroupInput, encoder *httpbinding.Encoder) error {
567	if v == nil {
568		return fmt.Errorf("unsupported serialization of nil %T", v)
569	}
570
571	return nil
572}
573
574type awsRestxml_serializeOpCreateMonitoringSubscription struct {
575}
576
577func (*awsRestxml_serializeOpCreateMonitoringSubscription) ID() string {
578	return "OperationSerializer"
579}
580
581func (m *awsRestxml_serializeOpCreateMonitoringSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
582	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
583) {
584	request, ok := in.Request.(*smithyhttp.Request)
585	if !ok {
586		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
587	}
588
589	input, ok := in.Parameters.(*CreateMonitoringSubscriptionInput)
590	_ = input
591	if !ok {
592		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
593	}
594
595	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription")
596	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
597	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
598	request.Method = "POST"
599	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
600	if err != nil {
601		return out, metadata, &smithy.SerializationError{Err: err}
602	}
603
604	if err := awsRestxml_serializeOpHttpBindingsCreateMonitoringSubscriptionInput(input, restEncoder); err != nil {
605		return out, metadata, &smithy.SerializationError{Err: err}
606	}
607
608	if input.MonitoringSubscription != nil {
609		if !restEncoder.HasHeader("Content-Type") {
610			restEncoder.SetHeader("Content-Type").String("application/xml")
611		}
612
613		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
614		payloadRootAttr := []smithyxml.Attr{}
615		payloadRoot := smithyxml.StartElement{
616			Name: smithyxml.Name{
617				Local: "MonitoringSubscription",
618			},
619			Attr: payloadRootAttr,
620		}
621		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
622		if err := awsRestxml_serializeDocumentMonitoringSubscription(input.MonitoringSubscription, xmlEncoder.RootElement(payloadRoot)); err != nil {
623			return out, metadata, &smithy.SerializationError{Err: err}
624		}
625		payload := bytes.NewReader(xmlEncoder.Bytes())
626		if request, err = request.SetStream(payload); err != nil {
627			return out, metadata, &smithy.SerializationError{Err: err}
628		}
629	}
630
631	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
632		return out, metadata, &smithy.SerializationError{Err: err}
633	}
634	in.Request = request
635
636	return next.HandleSerialize(ctx, in)
637}
638func awsRestxml_serializeOpHttpBindingsCreateMonitoringSubscriptionInput(v *CreateMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error {
639	if v == nil {
640		return fmt.Errorf("unsupported serialization of nil %T", v)
641	}
642
643	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
644		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
645	}
646	if v.DistributionId != nil {
647		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
648			return err
649		}
650	}
651
652	return nil
653}
654
655type awsRestxml_serializeOpCreateOriginRequestPolicy struct {
656}
657
658func (*awsRestxml_serializeOpCreateOriginRequestPolicy) ID() string {
659	return "OperationSerializer"
660}
661
662func (m *awsRestxml_serializeOpCreateOriginRequestPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
663	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
664) {
665	request, ok := in.Request.(*smithyhttp.Request)
666	if !ok {
667		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
668	}
669
670	input, ok := in.Parameters.(*CreateOriginRequestPolicyInput)
671	_ = input
672	if !ok {
673		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
674	}
675
676	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy")
677	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
678	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
679	request.Method = "POST"
680	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
681	if err != nil {
682		return out, metadata, &smithy.SerializationError{Err: err}
683	}
684
685	if input.OriginRequestPolicyConfig != nil {
686		if !restEncoder.HasHeader("Content-Type") {
687			restEncoder.SetHeader("Content-Type").String("application/xml")
688		}
689
690		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
691		payloadRootAttr := []smithyxml.Attr{}
692		payloadRoot := smithyxml.StartElement{
693			Name: smithyxml.Name{
694				Local: "OriginRequestPolicyConfig",
695			},
696			Attr: payloadRootAttr,
697		}
698		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
699		if err := awsRestxml_serializeDocumentOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
700			return out, metadata, &smithy.SerializationError{Err: err}
701		}
702		payload := bytes.NewReader(xmlEncoder.Bytes())
703		if request, err = request.SetStream(payload); err != nil {
704			return out, metadata, &smithy.SerializationError{Err: err}
705		}
706	}
707
708	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
709		return out, metadata, &smithy.SerializationError{Err: err}
710	}
711	in.Request = request
712
713	return next.HandleSerialize(ctx, in)
714}
715func awsRestxml_serializeOpHttpBindingsCreateOriginRequestPolicyInput(v *CreateOriginRequestPolicyInput, encoder *httpbinding.Encoder) error {
716	if v == nil {
717		return fmt.Errorf("unsupported serialization of nil %T", v)
718	}
719
720	return nil
721}
722
723type awsRestxml_serializeOpCreatePublicKey struct {
724}
725
726func (*awsRestxml_serializeOpCreatePublicKey) ID() string {
727	return "OperationSerializer"
728}
729
730func (m *awsRestxml_serializeOpCreatePublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
731	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
732) {
733	request, ok := in.Request.(*smithyhttp.Request)
734	if !ok {
735		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
736	}
737
738	input, ok := in.Parameters.(*CreatePublicKeyInput)
739	_ = input
740	if !ok {
741		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
742	}
743
744	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key")
745	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
746	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
747	request.Method = "POST"
748	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
749	if err != nil {
750		return out, metadata, &smithy.SerializationError{Err: err}
751	}
752
753	if input.PublicKeyConfig != nil {
754		if !restEncoder.HasHeader("Content-Type") {
755			restEncoder.SetHeader("Content-Type").String("application/xml")
756		}
757
758		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
759		payloadRootAttr := []smithyxml.Attr{}
760		payloadRoot := smithyxml.StartElement{
761			Name: smithyxml.Name{
762				Local: "PublicKeyConfig",
763			},
764			Attr: payloadRootAttr,
765		}
766		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
767		if err := awsRestxml_serializeDocumentPublicKeyConfig(input.PublicKeyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
768			return out, metadata, &smithy.SerializationError{Err: err}
769		}
770		payload := bytes.NewReader(xmlEncoder.Bytes())
771		if request, err = request.SetStream(payload); err != nil {
772			return out, metadata, &smithy.SerializationError{Err: err}
773		}
774	}
775
776	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
777		return out, metadata, &smithy.SerializationError{Err: err}
778	}
779	in.Request = request
780
781	return next.HandleSerialize(ctx, in)
782}
783func awsRestxml_serializeOpHttpBindingsCreatePublicKeyInput(v *CreatePublicKeyInput, encoder *httpbinding.Encoder) error {
784	if v == nil {
785		return fmt.Errorf("unsupported serialization of nil %T", v)
786	}
787
788	return nil
789}
790
791type awsRestxml_serializeOpCreateRealtimeLogConfig struct {
792}
793
794func (*awsRestxml_serializeOpCreateRealtimeLogConfig) ID() string {
795	return "OperationSerializer"
796}
797
798func (m *awsRestxml_serializeOpCreateRealtimeLogConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
799	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
800) {
801	request, ok := in.Request.(*smithyhttp.Request)
802	if !ok {
803		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
804	}
805
806	input, ok := in.Parameters.(*CreateRealtimeLogConfigInput)
807	_ = input
808	if !ok {
809		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
810	}
811
812	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config")
813	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
814	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
815	request.Method = "POST"
816	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
817	if err != nil {
818		return out, metadata, &smithy.SerializationError{Err: err}
819	}
820
821	restEncoder.SetHeader("Content-Type").String("application/xml")
822
823	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
824	rootAttr := []smithyxml.Attr{}
825	root := smithyxml.StartElement{
826		Name: smithyxml.Name{
827			Local: "CreateRealtimeLogConfigRequest",
828		},
829		Attr: rootAttr,
830	}
831	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
832	if err := awsRestxml_serializeOpDocumentCreateRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
833		return out, metadata, &smithy.SerializationError{Err: err}
834	}
835	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
836		return out, metadata, &smithy.SerializationError{Err: err}
837	}
838
839	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
840		return out, metadata, &smithy.SerializationError{Err: err}
841	}
842	in.Request = request
843
844	return next.HandleSerialize(ctx, in)
845}
846func awsRestxml_serializeOpHttpBindingsCreateRealtimeLogConfigInput(v *CreateRealtimeLogConfigInput, encoder *httpbinding.Encoder) error {
847	if v == nil {
848		return fmt.Errorf("unsupported serialization of nil %T", v)
849	}
850
851	return nil
852}
853
854func awsRestxml_serializeOpDocumentCreateRealtimeLogConfigInput(v *CreateRealtimeLogConfigInput, value smithyxml.Value) error {
855	defer value.Close()
856	if v.EndPoints != nil {
857		rootAttr := []smithyxml.Attr{}
858		root := smithyxml.StartElement{
859			Name: smithyxml.Name{
860				Local: "EndPoints",
861			},
862			Attr: rootAttr,
863		}
864		el := value.MemberElement(root)
865		if err := awsRestxml_serializeDocumentEndPointList(v.EndPoints, el); err != nil {
866			return err
867		}
868	}
869	if v.Fields != nil {
870		rootAttr := []smithyxml.Attr{}
871		root := smithyxml.StartElement{
872			Name: smithyxml.Name{
873				Local: "Fields",
874			},
875			Attr: rootAttr,
876		}
877		el := value.MemberElement(root)
878		if err := awsRestxml_serializeDocumentFieldList(v.Fields, el); err != nil {
879			return err
880		}
881	}
882	if v.Name != nil {
883		rootAttr := []smithyxml.Attr{}
884		root := smithyxml.StartElement{
885			Name: smithyxml.Name{
886				Local: "Name",
887			},
888			Attr: rootAttr,
889		}
890		el := value.MemberElement(root)
891		el.String(*v.Name)
892	}
893	if v.SamplingRate != nil {
894		rootAttr := []smithyxml.Attr{}
895		root := smithyxml.StartElement{
896			Name: smithyxml.Name{
897				Local: "SamplingRate",
898			},
899			Attr: rootAttr,
900		}
901		el := value.MemberElement(root)
902		el.Long(*v.SamplingRate)
903	}
904	return nil
905}
906
907type awsRestxml_serializeOpCreateStreamingDistribution struct {
908}
909
910func (*awsRestxml_serializeOpCreateStreamingDistribution) ID() string {
911	return "OperationSerializer"
912}
913
914func (m *awsRestxml_serializeOpCreateStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
915	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
916) {
917	request, ok := in.Request.(*smithyhttp.Request)
918	if !ok {
919		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
920	}
921
922	input, ok := in.Parameters.(*CreateStreamingDistributionInput)
923	_ = input
924	if !ok {
925		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
926	}
927
928	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution")
929	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
930	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
931	request.Method = "POST"
932	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
933	if err != nil {
934		return out, metadata, &smithy.SerializationError{Err: err}
935	}
936
937	if input.StreamingDistributionConfig != nil {
938		if !restEncoder.HasHeader("Content-Type") {
939			restEncoder.SetHeader("Content-Type").String("application/xml")
940		}
941
942		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
943		payloadRootAttr := []smithyxml.Attr{}
944		payloadRoot := smithyxml.StartElement{
945			Name: smithyxml.Name{
946				Local: "StreamingDistributionConfig",
947			},
948			Attr: payloadRootAttr,
949		}
950		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
951		if err := awsRestxml_serializeDocumentStreamingDistributionConfig(input.StreamingDistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
952			return out, metadata, &smithy.SerializationError{Err: err}
953		}
954		payload := bytes.NewReader(xmlEncoder.Bytes())
955		if request, err = request.SetStream(payload); err != nil {
956			return out, metadata, &smithy.SerializationError{Err: err}
957		}
958	}
959
960	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
961		return out, metadata, &smithy.SerializationError{Err: err}
962	}
963	in.Request = request
964
965	return next.HandleSerialize(ctx, in)
966}
967func awsRestxml_serializeOpHttpBindingsCreateStreamingDistributionInput(v *CreateStreamingDistributionInput, encoder *httpbinding.Encoder) error {
968	if v == nil {
969		return fmt.Errorf("unsupported serialization of nil %T", v)
970	}
971
972	return nil
973}
974
975type awsRestxml_serializeOpCreateStreamingDistributionWithTags struct {
976}
977
978func (*awsRestxml_serializeOpCreateStreamingDistributionWithTags) ID() string {
979	return "OperationSerializer"
980}
981
982func (m *awsRestxml_serializeOpCreateStreamingDistributionWithTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
983	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
984) {
985	request, ok := in.Request.(*smithyhttp.Request)
986	if !ok {
987		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
988	}
989
990	input, ok := in.Parameters.(*CreateStreamingDistributionWithTagsInput)
991	_ = input
992	if !ok {
993		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
994	}
995
996	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution?WithTags")
997	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
998	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
999	request.Method = "POST"
1000	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1001	if err != nil {
1002		return out, metadata, &smithy.SerializationError{Err: err}
1003	}
1004
1005	if input.StreamingDistributionConfigWithTags != nil {
1006		if !restEncoder.HasHeader("Content-Type") {
1007			restEncoder.SetHeader("Content-Type").String("application/xml")
1008		}
1009
1010		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
1011		payloadRootAttr := []smithyxml.Attr{}
1012		payloadRoot := smithyxml.StartElement{
1013			Name: smithyxml.Name{
1014				Local: "StreamingDistributionConfigWithTags",
1015			},
1016			Attr: payloadRootAttr,
1017		}
1018		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
1019		if err := awsRestxml_serializeDocumentStreamingDistributionConfigWithTags(input.StreamingDistributionConfigWithTags, xmlEncoder.RootElement(payloadRoot)); err != nil {
1020			return out, metadata, &smithy.SerializationError{Err: err}
1021		}
1022		payload := bytes.NewReader(xmlEncoder.Bytes())
1023		if request, err = request.SetStream(payload); err != nil {
1024			return out, metadata, &smithy.SerializationError{Err: err}
1025		}
1026	}
1027
1028	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1029		return out, metadata, &smithy.SerializationError{Err: err}
1030	}
1031	in.Request = request
1032
1033	return next.HandleSerialize(ctx, in)
1034}
1035func awsRestxml_serializeOpHttpBindingsCreateStreamingDistributionWithTagsInput(v *CreateStreamingDistributionWithTagsInput, encoder *httpbinding.Encoder) error {
1036	if v == nil {
1037		return fmt.Errorf("unsupported serialization of nil %T", v)
1038	}
1039
1040	return nil
1041}
1042
1043type awsRestxml_serializeOpDeleteCachePolicy struct {
1044}
1045
1046func (*awsRestxml_serializeOpDeleteCachePolicy) ID() string {
1047	return "OperationSerializer"
1048}
1049
1050func (m *awsRestxml_serializeOpDeleteCachePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1051	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1052) {
1053	request, ok := in.Request.(*smithyhttp.Request)
1054	if !ok {
1055		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1056	}
1057
1058	input, ok := in.Parameters.(*DeleteCachePolicyInput)
1059	_ = input
1060	if !ok {
1061		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1062	}
1063
1064	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}")
1065	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1066	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1067	request.Method = "DELETE"
1068	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1069	if err != nil {
1070		return out, metadata, &smithy.SerializationError{Err: err}
1071	}
1072
1073	if err := awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(input, restEncoder); err != nil {
1074		return out, metadata, &smithy.SerializationError{Err: err}
1075	}
1076
1077	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1078		return out, metadata, &smithy.SerializationError{Err: err}
1079	}
1080	in.Request = request
1081
1082	return next.HandleSerialize(ctx, in)
1083}
1084func awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(v *DeleteCachePolicyInput, encoder *httpbinding.Encoder) error {
1085	if v == nil {
1086		return fmt.Errorf("unsupported serialization of nil %T", v)
1087	}
1088
1089	if v.Id == nil || len(*v.Id) == 0 {
1090		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1091	}
1092	if v.Id != nil {
1093		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1094			return err
1095		}
1096	}
1097
1098	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1099		locationName := "If-Match"
1100		encoder.SetHeader(locationName).String(*v.IfMatch)
1101	}
1102
1103	return nil
1104}
1105
1106type awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity struct {
1107}
1108
1109func (*awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) ID() string {
1110	return "OperationSerializer"
1111}
1112
1113func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1114	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1115) {
1116	request, ok := in.Request.(*smithyhttp.Request)
1117	if !ok {
1118		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1119	}
1120
1121	input, ok := in.Parameters.(*DeleteCloudFrontOriginAccessIdentityInput)
1122	_ = input
1123	if !ok {
1124		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1125	}
1126
1127	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}")
1128	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1129	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1130	request.Method = "DELETE"
1131	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1132	if err != nil {
1133		return out, metadata, &smithy.SerializationError{Err: err}
1134	}
1135
1136	if err := awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil {
1137		return out, metadata, &smithy.SerializationError{Err: err}
1138	}
1139
1140	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1141		return out, metadata, &smithy.SerializationError{Err: err}
1142	}
1143	in.Request = request
1144
1145	return next.HandleSerialize(ctx, in)
1146}
1147func awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(v *DeleteCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error {
1148	if v == nil {
1149		return fmt.Errorf("unsupported serialization of nil %T", v)
1150	}
1151
1152	if v.Id == nil || len(*v.Id) == 0 {
1153		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1154	}
1155	if v.Id != nil {
1156		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1157			return err
1158		}
1159	}
1160
1161	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1162		locationName := "If-Match"
1163		encoder.SetHeader(locationName).String(*v.IfMatch)
1164	}
1165
1166	return nil
1167}
1168
1169type awsRestxml_serializeOpDeleteDistribution struct {
1170}
1171
1172func (*awsRestxml_serializeOpDeleteDistribution) ID() string {
1173	return "OperationSerializer"
1174}
1175
1176func (m *awsRestxml_serializeOpDeleteDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1177	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1178) {
1179	request, ok := in.Request.(*smithyhttp.Request)
1180	if !ok {
1181		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1182	}
1183
1184	input, ok := in.Parameters.(*DeleteDistributionInput)
1185	_ = input
1186	if !ok {
1187		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1188	}
1189
1190	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}")
1191	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1192	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1193	request.Method = "DELETE"
1194	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1195	if err != nil {
1196		return out, metadata, &smithy.SerializationError{Err: err}
1197	}
1198
1199	if err := awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(input, restEncoder); err != nil {
1200		return out, metadata, &smithy.SerializationError{Err: err}
1201	}
1202
1203	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1204		return out, metadata, &smithy.SerializationError{Err: err}
1205	}
1206	in.Request = request
1207
1208	return next.HandleSerialize(ctx, in)
1209}
1210func awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(v *DeleteDistributionInput, encoder *httpbinding.Encoder) error {
1211	if v == nil {
1212		return fmt.Errorf("unsupported serialization of nil %T", v)
1213	}
1214
1215	if v.Id == nil || len(*v.Id) == 0 {
1216		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1217	}
1218	if v.Id != nil {
1219		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1220			return err
1221		}
1222	}
1223
1224	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1225		locationName := "If-Match"
1226		encoder.SetHeader(locationName).String(*v.IfMatch)
1227	}
1228
1229	return nil
1230}
1231
1232type awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig struct {
1233}
1234
1235func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) ID() string {
1236	return "OperationSerializer"
1237}
1238
1239func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1240	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1241) {
1242	request, ok := in.Request.(*smithyhttp.Request)
1243	if !ok {
1244		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1245	}
1246
1247	input, ok := in.Parameters.(*DeleteFieldLevelEncryptionConfigInput)
1248	_ = input
1249	if !ok {
1250		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1251	}
1252
1253	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}")
1254	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1255	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1256	request.Method = "DELETE"
1257	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1258	if err != nil {
1259		return out, metadata, &smithy.SerializationError{Err: err}
1260	}
1261
1262	if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(input, restEncoder); err != nil {
1263		return out, metadata, &smithy.SerializationError{Err: err}
1264	}
1265
1266	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1267		return out, metadata, &smithy.SerializationError{Err: err}
1268	}
1269	in.Request = request
1270
1271	return next.HandleSerialize(ctx, in)
1272}
1273func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(v *DeleteFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error {
1274	if v == nil {
1275		return fmt.Errorf("unsupported serialization of nil %T", v)
1276	}
1277
1278	if v.Id == nil || len(*v.Id) == 0 {
1279		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1280	}
1281	if v.Id != nil {
1282		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1283			return err
1284		}
1285	}
1286
1287	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1288		locationName := "If-Match"
1289		encoder.SetHeader(locationName).String(*v.IfMatch)
1290	}
1291
1292	return nil
1293}
1294
1295type awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile struct {
1296}
1297
1298func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) ID() string {
1299	return "OperationSerializer"
1300}
1301
1302func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1303	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1304) {
1305	request, ok := in.Request.(*smithyhttp.Request)
1306	if !ok {
1307		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1308	}
1309
1310	input, ok := in.Parameters.(*DeleteFieldLevelEncryptionProfileInput)
1311	_ = input
1312	if !ok {
1313		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1314	}
1315
1316	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}")
1317	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1318	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1319	request.Method = "DELETE"
1320	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1321	if err != nil {
1322		return out, metadata, &smithy.SerializationError{Err: err}
1323	}
1324
1325	if err := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(input, restEncoder); err != nil {
1326		return out, metadata, &smithy.SerializationError{Err: err}
1327	}
1328
1329	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1330		return out, metadata, &smithy.SerializationError{Err: err}
1331	}
1332	in.Request = request
1333
1334	return next.HandleSerialize(ctx, in)
1335}
1336func awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(v *DeleteFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error {
1337	if v == nil {
1338		return fmt.Errorf("unsupported serialization of nil %T", v)
1339	}
1340
1341	if v.Id == nil || len(*v.Id) == 0 {
1342		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1343	}
1344	if v.Id != nil {
1345		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1346			return err
1347		}
1348	}
1349
1350	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1351		locationName := "If-Match"
1352		encoder.SetHeader(locationName).String(*v.IfMatch)
1353	}
1354
1355	return nil
1356}
1357
1358type awsRestxml_serializeOpDeleteKeyGroup struct {
1359}
1360
1361func (*awsRestxml_serializeOpDeleteKeyGroup) ID() string {
1362	return "OperationSerializer"
1363}
1364
1365func (m *awsRestxml_serializeOpDeleteKeyGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1366	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1367) {
1368	request, ok := in.Request.(*smithyhttp.Request)
1369	if !ok {
1370		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1371	}
1372
1373	input, ok := in.Parameters.(*DeleteKeyGroupInput)
1374	_ = input
1375	if !ok {
1376		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1377	}
1378
1379	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}")
1380	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1381	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1382	request.Method = "DELETE"
1383	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1384	if err != nil {
1385		return out, metadata, &smithy.SerializationError{Err: err}
1386	}
1387
1388	if err := awsRestxml_serializeOpHttpBindingsDeleteKeyGroupInput(input, restEncoder); err != nil {
1389		return out, metadata, &smithy.SerializationError{Err: err}
1390	}
1391
1392	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1393		return out, metadata, &smithy.SerializationError{Err: err}
1394	}
1395	in.Request = request
1396
1397	return next.HandleSerialize(ctx, in)
1398}
1399func awsRestxml_serializeOpHttpBindingsDeleteKeyGroupInput(v *DeleteKeyGroupInput, encoder *httpbinding.Encoder) error {
1400	if v == nil {
1401		return fmt.Errorf("unsupported serialization of nil %T", v)
1402	}
1403
1404	if v.Id == nil || len(*v.Id) == 0 {
1405		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1406	}
1407	if v.Id != nil {
1408		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1409			return err
1410		}
1411	}
1412
1413	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1414		locationName := "If-Match"
1415		encoder.SetHeader(locationName).String(*v.IfMatch)
1416	}
1417
1418	return nil
1419}
1420
1421type awsRestxml_serializeOpDeleteMonitoringSubscription struct {
1422}
1423
1424func (*awsRestxml_serializeOpDeleteMonitoringSubscription) ID() string {
1425	return "OperationSerializer"
1426}
1427
1428func (m *awsRestxml_serializeOpDeleteMonitoringSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1429	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1430) {
1431	request, ok := in.Request.(*smithyhttp.Request)
1432	if !ok {
1433		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1434	}
1435
1436	input, ok := in.Parameters.(*DeleteMonitoringSubscriptionInput)
1437	_ = input
1438	if !ok {
1439		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1440	}
1441
1442	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription")
1443	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1444	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1445	request.Method = "DELETE"
1446	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1447	if err != nil {
1448		return out, metadata, &smithy.SerializationError{Err: err}
1449	}
1450
1451	if err := awsRestxml_serializeOpHttpBindingsDeleteMonitoringSubscriptionInput(input, restEncoder); err != nil {
1452		return out, metadata, &smithy.SerializationError{Err: err}
1453	}
1454
1455	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1456		return out, metadata, &smithy.SerializationError{Err: err}
1457	}
1458	in.Request = request
1459
1460	return next.HandleSerialize(ctx, in)
1461}
1462func awsRestxml_serializeOpHttpBindingsDeleteMonitoringSubscriptionInput(v *DeleteMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error {
1463	if v == nil {
1464		return fmt.Errorf("unsupported serialization of nil %T", v)
1465	}
1466
1467	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
1468		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
1469	}
1470	if v.DistributionId != nil {
1471		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
1472			return err
1473		}
1474	}
1475
1476	return nil
1477}
1478
1479type awsRestxml_serializeOpDeleteOriginRequestPolicy struct {
1480}
1481
1482func (*awsRestxml_serializeOpDeleteOriginRequestPolicy) ID() string {
1483	return "OperationSerializer"
1484}
1485
1486func (m *awsRestxml_serializeOpDeleteOriginRequestPolicy) 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.(*DeleteOriginRequestPolicyInput)
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("/2020-05-31/origin-request-policy/{Id}")
1501	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1502	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1503	request.Method = "DELETE"
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 := awsRestxml_serializeOpHttpBindingsDeleteOriginRequestPolicyInput(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 awsRestxml_serializeOpHttpBindingsDeleteOriginRequestPolicyInput(v *DeleteOriginRequestPolicyInput, encoder *httpbinding.Encoder) error {
1521	if v == nil {
1522		return fmt.Errorf("unsupported serialization of nil %T", v)
1523	}
1524
1525	if v.Id == nil || len(*v.Id) == 0 {
1526		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1527	}
1528	if v.Id != nil {
1529		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1530			return err
1531		}
1532	}
1533
1534	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1535		locationName := "If-Match"
1536		encoder.SetHeader(locationName).String(*v.IfMatch)
1537	}
1538
1539	return nil
1540}
1541
1542type awsRestxml_serializeOpDeletePublicKey struct {
1543}
1544
1545func (*awsRestxml_serializeOpDeletePublicKey) ID() string {
1546	return "OperationSerializer"
1547}
1548
1549func (m *awsRestxml_serializeOpDeletePublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1550	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1551) {
1552	request, ok := in.Request.(*smithyhttp.Request)
1553	if !ok {
1554		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1555	}
1556
1557	input, ok := in.Parameters.(*DeletePublicKeyInput)
1558	_ = input
1559	if !ok {
1560		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1561	}
1562
1563	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}")
1564	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1565	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1566	request.Method = "DELETE"
1567	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1568	if err != nil {
1569		return out, metadata, &smithy.SerializationError{Err: err}
1570	}
1571
1572	if err := awsRestxml_serializeOpHttpBindingsDeletePublicKeyInput(input, restEncoder); err != nil {
1573		return out, metadata, &smithy.SerializationError{Err: err}
1574	}
1575
1576	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1577		return out, metadata, &smithy.SerializationError{Err: err}
1578	}
1579	in.Request = request
1580
1581	return next.HandleSerialize(ctx, in)
1582}
1583func awsRestxml_serializeOpHttpBindingsDeletePublicKeyInput(v *DeletePublicKeyInput, encoder *httpbinding.Encoder) error {
1584	if v == nil {
1585		return fmt.Errorf("unsupported serialization of nil %T", v)
1586	}
1587
1588	if v.Id == nil || len(*v.Id) == 0 {
1589		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1590	}
1591	if v.Id != nil {
1592		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1593			return err
1594		}
1595	}
1596
1597	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1598		locationName := "If-Match"
1599		encoder.SetHeader(locationName).String(*v.IfMatch)
1600	}
1601
1602	return nil
1603}
1604
1605type awsRestxml_serializeOpDeleteRealtimeLogConfig struct {
1606}
1607
1608func (*awsRestxml_serializeOpDeleteRealtimeLogConfig) ID() string {
1609	return "OperationSerializer"
1610}
1611
1612func (m *awsRestxml_serializeOpDeleteRealtimeLogConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1613	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1614) {
1615	request, ok := in.Request.(*smithyhttp.Request)
1616	if !ok {
1617		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1618	}
1619
1620	input, ok := in.Parameters.(*DeleteRealtimeLogConfigInput)
1621	_ = input
1622	if !ok {
1623		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1624	}
1625
1626	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/delete-realtime-log-config")
1627	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1628	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1629	request.Method = "POST"
1630	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1631	if err != nil {
1632		return out, metadata, &smithy.SerializationError{Err: err}
1633	}
1634
1635	restEncoder.SetHeader("Content-Type").String("application/xml")
1636
1637	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
1638	rootAttr := []smithyxml.Attr{}
1639	root := smithyxml.StartElement{
1640		Name: smithyxml.Name{
1641			Local: "DeleteRealtimeLogConfigRequest",
1642		},
1643		Attr: rootAttr,
1644	}
1645	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
1646	if err := awsRestxml_serializeOpDocumentDeleteRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
1647		return out, metadata, &smithy.SerializationError{Err: err}
1648	}
1649	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
1650		return out, metadata, &smithy.SerializationError{Err: err}
1651	}
1652
1653	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1654		return out, metadata, &smithy.SerializationError{Err: err}
1655	}
1656	in.Request = request
1657
1658	return next.HandleSerialize(ctx, in)
1659}
1660func awsRestxml_serializeOpHttpBindingsDeleteRealtimeLogConfigInput(v *DeleteRealtimeLogConfigInput, encoder *httpbinding.Encoder) error {
1661	if v == nil {
1662		return fmt.Errorf("unsupported serialization of nil %T", v)
1663	}
1664
1665	return nil
1666}
1667
1668func awsRestxml_serializeOpDocumentDeleteRealtimeLogConfigInput(v *DeleteRealtimeLogConfigInput, value smithyxml.Value) error {
1669	defer value.Close()
1670	if v.ARN != nil {
1671		rootAttr := []smithyxml.Attr{}
1672		root := smithyxml.StartElement{
1673			Name: smithyxml.Name{
1674				Local: "ARN",
1675			},
1676			Attr: rootAttr,
1677		}
1678		el := value.MemberElement(root)
1679		el.String(*v.ARN)
1680	}
1681	if v.Name != nil {
1682		rootAttr := []smithyxml.Attr{}
1683		root := smithyxml.StartElement{
1684			Name: smithyxml.Name{
1685				Local: "Name",
1686			},
1687			Attr: rootAttr,
1688		}
1689		el := value.MemberElement(root)
1690		el.String(*v.Name)
1691	}
1692	return nil
1693}
1694
1695type awsRestxml_serializeOpDeleteStreamingDistribution struct {
1696}
1697
1698func (*awsRestxml_serializeOpDeleteStreamingDistribution) ID() string {
1699	return "OperationSerializer"
1700}
1701
1702func (m *awsRestxml_serializeOpDeleteStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1703	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1704) {
1705	request, ok := in.Request.(*smithyhttp.Request)
1706	if !ok {
1707		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1708	}
1709
1710	input, ok := in.Parameters.(*DeleteStreamingDistributionInput)
1711	_ = input
1712	if !ok {
1713		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1714	}
1715
1716	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}")
1717	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1718	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1719	request.Method = "DELETE"
1720	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1721	if err != nil {
1722		return out, metadata, &smithy.SerializationError{Err: err}
1723	}
1724
1725	if err := awsRestxml_serializeOpHttpBindingsDeleteStreamingDistributionInput(input, restEncoder); err != nil {
1726		return out, metadata, &smithy.SerializationError{Err: err}
1727	}
1728
1729	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1730		return out, metadata, &smithy.SerializationError{Err: err}
1731	}
1732	in.Request = request
1733
1734	return next.HandleSerialize(ctx, in)
1735}
1736func awsRestxml_serializeOpHttpBindingsDeleteStreamingDistributionInput(v *DeleteStreamingDistributionInput, encoder *httpbinding.Encoder) error {
1737	if v == nil {
1738		return fmt.Errorf("unsupported serialization of nil %T", v)
1739	}
1740
1741	if v.Id == nil || len(*v.Id) == 0 {
1742		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1743	}
1744	if v.Id != nil {
1745		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1746			return err
1747		}
1748	}
1749
1750	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
1751		locationName := "If-Match"
1752		encoder.SetHeader(locationName).String(*v.IfMatch)
1753	}
1754
1755	return nil
1756}
1757
1758type awsRestxml_serializeOpGetCachePolicy struct {
1759}
1760
1761func (*awsRestxml_serializeOpGetCachePolicy) ID() string {
1762	return "OperationSerializer"
1763}
1764
1765func (m *awsRestxml_serializeOpGetCachePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1766	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1767) {
1768	request, ok := in.Request.(*smithyhttp.Request)
1769	if !ok {
1770		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1771	}
1772
1773	input, ok := in.Parameters.(*GetCachePolicyInput)
1774	_ = input
1775	if !ok {
1776		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1777	}
1778
1779	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}")
1780	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1781	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1782	request.Method = "GET"
1783	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1784	if err != nil {
1785		return out, metadata, &smithy.SerializationError{Err: err}
1786	}
1787
1788	if err := awsRestxml_serializeOpHttpBindingsGetCachePolicyInput(input, restEncoder); err != nil {
1789		return out, metadata, &smithy.SerializationError{Err: err}
1790	}
1791
1792	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1793		return out, metadata, &smithy.SerializationError{Err: err}
1794	}
1795	in.Request = request
1796
1797	return next.HandleSerialize(ctx, in)
1798}
1799func awsRestxml_serializeOpHttpBindingsGetCachePolicyInput(v *GetCachePolicyInput, encoder *httpbinding.Encoder) error {
1800	if v == nil {
1801		return fmt.Errorf("unsupported serialization of nil %T", v)
1802	}
1803
1804	if v.Id == nil || len(*v.Id) == 0 {
1805		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1806	}
1807	if v.Id != nil {
1808		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1809			return err
1810		}
1811	}
1812
1813	return nil
1814}
1815
1816type awsRestxml_serializeOpGetCachePolicyConfig struct {
1817}
1818
1819func (*awsRestxml_serializeOpGetCachePolicyConfig) ID() string {
1820	return "OperationSerializer"
1821}
1822
1823func (m *awsRestxml_serializeOpGetCachePolicyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1824	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1825) {
1826	request, ok := in.Request.(*smithyhttp.Request)
1827	if !ok {
1828		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1829	}
1830
1831	input, ok := in.Parameters.(*GetCachePolicyConfigInput)
1832	_ = input
1833	if !ok {
1834		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1835	}
1836
1837	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}/config")
1838	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1839	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1840	request.Method = "GET"
1841	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1842	if err != nil {
1843		return out, metadata, &smithy.SerializationError{Err: err}
1844	}
1845
1846	if err := awsRestxml_serializeOpHttpBindingsGetCachePolicyConfigInput(input, restEncoder); err != nil {
1847		return out, metadata, &smithy.SerializationError{Err: err}
1848	}
1849
1850	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1851		return out, metadata, &smithy.SerializationError{Err: err}
1852	}
1853	in.Request = request
1854
1855	return next.HandleSerialize(ctx, in)
1856}
1857func awsRestxml_serializeOpHttpBindingsGetCachePolicyConfigInput(v *GetCachePolicyConfigInput, encoder *httpbinding.Encoder) error {
1858	if v == nil {
1859		return fmt.Errorf("unsupported serialization of nil %T", v)
1860	}
1861
1862	if v.Id == nil || len(*v.Id) == 0 {
1863		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1864	}
1865	if v.Id != nil {
1866		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1867			return err
1868		}
1869	}
1870
1871	return nil
1872}
1873
1874type awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity struct {
1875}
1876
1877func (*awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity) ID() string {
1878	return "OperationSerializer"
1879}
1880
1881func (m *awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1882	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1883) {
1884	request, ok := in.Request.(*smithyhttp.Request)
1885	if !ok {
1886		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1887	}
1888
1889	input, ok := in.Parameters.(*GetCloudFrontOriginAccessIdentityInput)
1890	_ = input
1891	if !ok {
1892		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1893	}
1894
1895	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}")
1896	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1897	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1898	request.Method = "GET"
1899	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1900	if err != nil {
1901		return out, metadata, &smithy.SerializationError{Err: err}
1902	}
1903
1904	if err := awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil {
1905		return out, metadata, &smithy.SerializationError{Err: err}
1906	}
1907
1908	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1909		return out, metadata, &smithy.SerializationError{Err: err}
1910	}
1911	in.Request = request
1912
1913	return next.HandleSerialize(ctx, in)
1914}
1915func awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityInput(v *GetCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error {
1916	if v == nil {
1917		return fmt.Errorf("unsupported serialization of nil %T", v)
1918	}
1919
1920	if v.Id == nil || len(*v.Id) == 0 {
1921		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1922	}
1923	if v.Id != nil {
1924		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1925			return err
1926		}
1927	}
1928
1929	return nil
1930}
1931
1932type awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig struct {
1933}
1934
1935func (*awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig) ID() string {
1936	return "OperationSerializer"
1937}
1938
1939func (m *awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1940	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1941) {
1942	request, ok := in.Request.(*smithyhttp.Request)
1943	if !ok {
1944		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1945	}
1946
1947	input, ok := in.Parameters.(*GetCloudFrontOriginAccessIdentityConfigInput)
1948	_ = input
1949	if !ok {
1950		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1951	}
1952
1953	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}/config")
1954	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1955	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1956	request.Method = "GET"
1957	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1958	if err != nil {
1959		return out, metadata, &smithy.SerializationError{Err: err}
1960	}
1961
1962	if err := awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigInput(input, restEncoder); err != nil {
1963		return out, metadata, &smithy.SerializationError{Err: err}
1964	}
1965
1966	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1967		return out, metadata, &smithy.SerializationError{Err: err}
1968	}
1969	in.Request = request
1970
1971	return next.HandleSerialize(ctx, in)
1972}
1973func awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigInput(v *GetCloudFrontOriginAccessIdentityConfigInput, encoder *httpbinding.Encoder) error {
1974	if v == nil {
1975		return fmt.Errorf("unsupported serialization of nil %T", v)
1976	}
1977
1978	if v.Id == nil || len(*v.Id) == 0 {
1979		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
1980	}
1981	if v.Id != nil {
1982		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
1983			return err
1984		}
1985	}
1986
1987	return nil
1988}
1989
1990type awsRestxml_serializeOpGetDistribution struct {
1991}
1992
1993func (*awsRestxml_serializeOpGetDistribution) ID() string {
1994	return "OperationSerializer"
1995}
1996
1997func (m *awsRestxml_serializeOpGetDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1998	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1999) {
2000	request, ok := in.Request.(*smithyhttp.Request)
2001	if !ok {
2002		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2003	}
2004
2005	input, ok := in.Parameters.(*GetDistributionInput)
2006	_ = input
2007	if !ok {
2008		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2009	}
2010
2011	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}")
2012	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2013	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2014	request.Method = "GET"
2015	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2016	if err != nil {
2017		return out, metadata, &smithy.SerializationError{Err: err}
2018	}
2019
2020	if err := awsRestxml_serializeOpHttpBindingsGetDistributionInput(input, restEncoder); err != nil {
2021		return out, metadata, &smithy.SerializationError{Err: err}
2022	}
2023
2024	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2025		return out, metadata, &smithy.SerializationError{Err: err}
2026	}
2027	in.Request = request
2028
2029	return next.HandleSerialize(ctx, in)
2030}
2031func awsRestxml_serializeOpHttpBindingsGetDistributionInput(v *GetDistributionInput, encoder *httpbinding.Encoder) error {
2032	if v == nil {
2033		return fmt.Errorf("unsupported serialization of nil %T", v)
2034	}
2035
2036	if v.Id == nil || len(*v.Id) == 0 {
2037		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2038	}
2039	if v.Id != nil {
2040		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2041			return err
2042		}
2043	}
2044
2045	return nil
2046}
2047
2048type awsRestxml_serializeOpGetDistributionConfig struct {
2049}
2050
2051func (*awsRestxml_serializeOpGetDistributionConfig) ID() string {
2052	return "OperationSerializer"
2053}
2054
2055func (m *awsRestxml_serializeOpGetDistributionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2056	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2057) {
2058	request, ok := in.Request.(*smithyhttp.Request)
2059	if !ok {
2060		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2061	}
2062
2063	input, ok := in.Parameters.(*GetDistributionConfigInput)
2064	_ = input
2065	if !ok {
2066		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2067	}
2068
2069	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}/config")
2070	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2071	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2072	request.Method = "GET"
2073	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2074	if err != nil {
2075		return out, metadata, &smithy.SerializationError{Err: err}
2076	}
2077
2078	if err := awsRestxml_serializeOpHttpBindingsGetDistributionConfigInput(input, restEncoder); err != nil {
2079		return out, metadata, &smithy.SerializationError{Err: err}
2080	}
2081
2082	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2083		return out, metadata, &smithy.SerializationError{Err: err}
2084	}
2085	in.Request = request
2086
2087	return next.HandleSerialize(ctx, in)
2088}
2089func awsRestxml_serializeOpHttpBindingsGetDistributionConfigInput(v *GetDistributionConfigInput, encoder *httpbinding.Encoder) error {
2090	if v == nil {
2091		return fmt.Errorf("unsupported serialization of nil %T", v)
2092	}
2093
2094	if v.Id == nil || len(*v.Id) == 0 {
2095		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2096	}
2097	if v.Id != nil {
2098		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2099			return err
2100		}
2101	}
2102
2103	return nil
2104}
2105
2106type awsRestxml_serializeOpGetFieldLevelEncryption struct {
2107}
2108
2109func (*awsRestxml_serializeOpGetFieldLevelEncryption) ID() string {
2110	return "OperationSerializer"
2111}
2112
2113func (m *awsRestxml_serializeOpGetFieldLevelEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2114	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2115) {
2116	request, ok := in.Request.(*smithyhttp.Request)
2117	if !ok {
2118		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2119	}
2120
2121	input, ok := in.Parameters.(*GetFieldLevelEncryptionInput)
2122	_ = input
2123	if !ok {
2124		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2125	}
2126
2127	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}")
2128	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2129	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2130	request.Method = "GET"
2131	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2132	if err != nil {
2133		return out, metadata, &smithy.SerializationError{Err: err}
2134	}
2135
2136	if err := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionInput(input, restEncoder); err != nil {
2137		return out, metadata, &smithy.SerializationError{Err: err}
2138	}
2139
2140	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2141		return out, metadata, &smithy.SerializationError{Err: err}
2142	}
2143	in.Request = request
2144
2145	return next.HandleSerialize(ctx, in)
2146}
2147func awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionInput(v *GetFieldLevelEncryptionInput, encoder *httpbinding.Encoder) error {
2148	if v == nil {
2149		return fmt.Errorf("unsupported serialization of nil %T", v)
2150	}
2151
2152	if v.Id == nil || len(*v.Id) == 0 {
2153		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2154	}
2155	if v.Id != nil {
2156		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2157			return err
2158		}
2159	}
2160
2161	return nil
2162}
2163
2164type awsRestxml_serializeOpGetFieldLevelEncryptionConfig struct {
2165}
2166
2167func (*awsRestxml_serializeOpGetFieldLevelEncryptionConfig) ID() string {
2168	return "OperationSerializer"
2169}
2170
2171func (m *awsRestxml_serializeOpGetFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2172	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2173) {
2174	request, ok := in.Request.(*smithyhttp.Request)
2175	if !ok {
2176		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2177	}
2178
2179	input, ok := in.Parameters.(*GetFieldLevelEncryptionConfigInput)
2180	_ = input
2181	if !ok {
2182		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2183	}
2184
2185	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}/config")
2186	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2187	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2188	request.Method = "GET"
2189	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2190	if err != nil {
2191		return out, metadata, &smithy.SerializationError{Err: err}
2192	}
2193
2194	if err := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionConfigInput(input, restEncoder); err != nil {
2195		return out, metadata, &smithy.SerializationError{Err: err}
2196	}
2197
2198	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2199		return out, metadata, &smithy.SerializationError{Err: err}
2200	}
2201	in.Request = request
2202
2203	return next.HandleSerialize(ctx, in)
2204}
2205func awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionConfigInput(v *GetFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error {
2206	if v == nil {
2207		return fmt.Errorf("unsupported serialization of nil %T", v)
2208	}
2209
2210	if v.Id == nil || len(*v.Id) == 0 {
2211		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2212	}
2213	if v.Id != nil {
2214		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2215			return err
2216		}
2217	}
2218
2219	return nil
2220}
2221
2222type awsRestxml_serializeOpGetFieldLevelEncryptionProfile struct {
2223}
2224
2225func (*awsRestxml_serializeOpGetFieldLevelEncryptionProfile) ID() string {
2226	return "OperationSerializer"
2227}
2228
2229func (m *awsRestxml_serializeOpGetFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2230	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2231) {
2232	request, ok := in.Request.(*smithyhttp.Request)
2233	if !ok {
2234		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2235	}
2236
2237	input, ok := in.Parameters.(*GetFieldLevelEncryptionProfileInput)
2238	_ = input
2239	if !ok {
2240		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2241	}
2242
2243	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}")
2244	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2245	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2246	request.Method = "GET"
2247	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2248	if err != nil {
2249		return out, metadata, &smithy.SerializationError{Err: err}
2250	}
2251
2252	if err := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileInput(input, restEncoder); err != nil {
2253		return out, metadata, &smithy.SerializationError{Err: err}
2254	}
2255
2256	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2257		return out, metadata, &smithy.SerializationError{Err: err}
2258	}
2259	in.Request = request
2260
2261	return next.HandleSerialize(ctx, in)
2262}
2263func awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileInput(v *GetFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error {
2264	if v == nil {
2265		return fmt.Errorf("unsupported serialization of nil %T", v)
2266	}
2267
2268	if v.Id == nil || len(*v.Id) == 0 {
2269		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2270	}
2271	if v.Id != nil {
2272		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2273			return err
2274		}
2275	}
2276
2277	return nil
2278}
2279
2280type awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig struct {
2281}
2282
2283func (*awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig) ID() string {
2284	return "OperationSerializer"
2285}
2286
2287func (m *awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2288	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2289) {
2290	request, ok := in.Request.(*smithyhttp.Request)
2291	if !ok {
2292		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2293	}
2294
2295	input, ok := in.Parameters.(*GetFieldLevelEncryptionProfileConfigInput)
2296	_ = input
2297	if !ok {
2298		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2299	}
2300
2301	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}/config")
2302	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2303	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2304	request.Method = "GET"
2305	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2306	if err != nil {
2307		return out, metadata, &smithy.SerializationError{Err: err}
2308	}
2309
2310	if err := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigInput(input, restEncoder); err != nil {
2311		return out, metadata, &smithy.SerializationError{Err: err}
2312	}
2313
2314	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2315		return out, metadata, &smithy.SerializationError{Err: err}
2316	}
2317	in.Request = request
2318
2319	return next.HandleSerialize(ctx, in)
2320}
2321func awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigInput(v *GetFieldLevelEncryptionProfileConfigInput, encoder *httpbinding.Encoder) error {
2322	if v == nil {
2323		return fmt.Errorf("unsupported serialization of nil %T", v)
2324	}
2325
2326	if v.Id == nil || len(*v.Id) == 0 {
2327		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2328	}
2329	if v.Id != nil {
2330		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2331			return err
2332		}
2333	}
2334
2335	return nil
2336}
2337
2338type awsRestxml_serializeOpGetInvalidation struct {
2339}
2340
2341func (*awsRestxml_serializeOpGetInvalidation) ID() string {
2342	return "OperationSerializer"
2343}
2344
2345func (m *awsRestxml_serializeOpGetInvalidation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2346	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2347) {
2348	request, ok := in.Request.(*smithyhttp.Request)
2349	if !ok {
2350		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2351	}
2352
2353	input, ok := in.Parameters.(*GetInvalidationInput)
2354	_ = input
2355	if !ok {
2356		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2357	}
2358
2359	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation/{Id}")
2360	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2361	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2362	request.Method = "GET"
2363	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2364	if err != nil {
2365		return out, metadata, &smithy.SerializationError{Err: err}
2366	}
2367
2368	if err := awsRestxml_serializeOpHttpBindingsGetInvalidationInput(input, restEncoder); err != nil {
2369		return out, metadata, &smithy.SerializationError{Err: err}
2370	}
2371
2372	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2373		return out, metadata, &smithy.SerializationError{Err: err}
2374	}
2375	in.Request = request
2376
2377	return next.HandleSerialize(ctx, in)
2378}
2379func awsRestxml_serializeOpHttpBindingsGetInvalidationInput(v *GetInvalidationInput, encoder *httpbinding.Encoder) error {
2380	if v == nil {
2381		return fmt.Errorf("unsupported serialization of nil %T", v)
2382	}
2383
2384	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
2385		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
2386	}
2387	if v.DistributionId != nil {
2388		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
2389			return err
2390		}
2391	}
2392
2393	if v.Id == nil || len(*v.Id) == 0 {
2394		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2395	}
2396	if v.Id != nil {
2397		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2398			return err
2399		}
2400	}
2401
2402	return nil
2403}
2404
2405type awsRestxml_serializeOpGetKeyGroup struct {
2406}
2407
2408func (*awsRestxml_serializeOpGetKeyGroup) ID() string {
2409	return "OperationSerializer"
2410}
2411
2412func (m *awsRestxml_serializeOpGetKeyGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2413	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2414) {
2415	request, ok := in.Request.(*smithyhttp.Request)
2416	if !ok {
2417		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2418	}
2419
2420	input, ok := in.Parameters.(*GetKeyGroupInput)
2421	_ = input
2422	if !ok {
2423		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2424	}
2425
2426	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}")
2427	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2428	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2429	request.Method = "GET"
2430	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2431	if err != nil {
2432		return out, metadata, &smithy.SerializationError{Err: err}
2433	}
2434
2435	if err := awsRestxml_serializeOpHttpBindingsGetKeyGroupInput(input, restEncoder); err != nil {
2436		return out, metadata, &smithy.SerializationError{Err: err}
2437	}
2438
2439	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2440		return out, metadata, &smithy.SerializationError{Err: err}
2441	}
2442	in.Request = request
2443
2444	return next.HandleSerialize(ctx, in)
2445}
2446func awsRestxml_serializeOpHttpBindingsGetKeyGroupInput(v *GetKeyGroupInput, encoder *httpbinding.Encoder) error {
2447	if v == nil {
2448		return fmt.Errorf("unsupported serialization of nil %T", v)
2449	}
2450
2451	if v.Id == nil || len(*v.Id) == 0 {
2452		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2453	}
2454	if v.Id != nil {
2455		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2456			return err
2457		}
2458	}
2459
2460	return nil
2461}
2462
2463type awsRestxml_serializeOpGetKeyGroupConfig struct {
2464}
2465
2466func (*awsRestxml_serializeOpGetKeyGroupConfig) ID() string {
2467	return "OperationSerializer"
2468}
2469
2470func (m *awsRestxml_serializeOpGetKeyGroupConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2471	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2472) {
2473	request, ok := in.Request.(*smithyhttp.Request)
2474	if !ok {
2475		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2476	}
2477
2478	input, ok := in.Parameters.(*GetKeyGroupConfigInput)
2479	_ = input
2480	if !ok {
2481		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2482	}
2483
2484	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}/config")
2485	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2486	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2487	request.Method = "GET"
2488	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2489	if err != nil {
2490		return out, metadata, &smithy.SerializationError{Err: err}
2491	}
2492
2493	if err := awsRestxml_serializeOpHttpBindingsGetKeyGroupConfigInput(input, restEncoder); err != nil {
2494		return out, metadata, &smithy.SerializationError{Err: err}
2495	}
2496
2497	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2498		return out, metadata, &smithy.SerializationError{Err: err}
2499	}
2500	in.Request = request
2501
2502	return next.HandleSerialize(ctx, in)
2503}
2504func awsRestxml_serializeOpHttpBindingsGetKeyGroupConfigInput(v *GetKeyGroupConfigInput, encoder *httpbinding.Encoder) error {
2505	if v == nil {
2506		return fmt.Errorf("unsupported serialization of nil %T", v)
2507	}
2508
2509	if v.Id == nil || len(*v.Id) == 0 {
2510		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2511	}
2512	if v.Id != nil {
2513		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2514			return err
2515		}
2516	}
2517
2518	return nil
2519}
2520
2521type awsRestxml_serializeOpGetMonitoringSubscription struct {
2522}
2523
2524func (*awsRestxml_serializeOpGetMonitoringSubscription) ID() string {
2525	return "OperationSerializer"
2526}
2527
2528func (m *awsRestxml_serializeOpGetMonitoringSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2529	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2530) {
2531	request, ok := in.Request.(*smithyhttp.Request)
2532	if !ok {
2533		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2534	}
2535
2536	input, ok := in.Parameters.(*GetMonitoringSubscriptionInput)
2537	_ = input
2538	if !ok {
2539		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2540	}
2541
2542	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription")
2543	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2544	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2545	request.Method = "GET"
2546	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2547	if err != nil {
2548		return out, metadata, &smithy.SerializationError{Err: err}
2549	}
2550
2551	if err := awsRestxml_serializeOpHttpBindingsGetMonitoringSubscriptionInput(input, restEncoder); err != nil {
2552		return out, metadata, &smithy.SerializationError{Err: err}
2553	}
2554
2555	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2556		return out, metadata, &smithy.SerializationError{Err: err}
2557	}
2558	in.Request = request
2559
2560	return next.HandleSerialize(ctx, in)
2561}
2562func awsRestxml_serializeOpHttpBindingsGetMonitoringSubscriptionInput(v *GetMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error {
2563	if v == nil {
2564		return fmt.Errorf("unsupported serialization of nil %T", v)
2565	}
2566
2567	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
2568		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
2569	}
2570	if v.DistributionId != nil {
2571		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
2572			return err
2573		}
2574	}
2575
2576	return nil
2577}
2578
2579type awsRestxml_serializeOpGetOriginRequestPolicy struct {
2580}
2581
2582func (*awsRestxml_serializeOpGetOriginRequestPolicy) ID() string {
2583	return "OperationSerializer"
2584}
2585
2586func (m *awsRestxml_serializeOpGetOriginRequestPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2587	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2588) {
2589	request, ok := in.Request.(*smithyhttp.Request)
2590	if !ok {
2591		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2592	}
2593
2594	input, ok := in.Parameters.(*GetOriginRequestPolicyInput)
2595	_ = input
2596	if !ok {
2597		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2598	}
2599
2600	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}")
2601	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2602	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2603	request.Method = "GET"
2604	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2605	if err != nil {
2606		return out, metadata, &smithy.SerializationError{Err: err}
2607	}
2608
2609	if err := awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyInput(input, restEncoder); err != nil {
2610		return out, metadata, &smithy.SerializationError{Err: err}
2611	}
2612
2613	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2614		return out, metadata, &smithy.SerializationError{Err: err}
2615	}
2616	in.Request = request
2617
2618	return next.HandleSerialize(ctx, in)
2619}
2620func awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyInput(v *GetOriginRequestPolicyInput, encoder *httpbinding.Encoder) error {
2621	if v == nil {
2622		return fmt.Errorf("unsupported serialization of nil %T", v)
2623	}
2624
2625	if v.Id == nil || len(*v.Id) == 0 {
2626		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2627	}
2628	if v.Id != nil {
2629		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2630			return err
2631		}
2632	}
2633
2634	return nil
2635}
2636
2637type awsRestxml_serializeOpGetOriginRequestPolicyConfig struct {
2638}
2639
2640func (*awsRestxml_serializeOpGetOriginRequestPolicyConfig) ID() string {
2641	return "OperationSerializer"
2642}
2643
2644func (m *awsRestxml_serializeOpGetOriginRequestPolicyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2645	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2646) {
2647	request, ok := in.Request.(*smithyhttp.Request)
2648	if !ok {
2649		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2650	}
2651
2652	input, ok := in.Parameters.(*GetOriginRequestPolicyConfigInput)
2653	_ = input
2654	if !ok {
2655		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2656	}
2657
2658	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}/config")
2659	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2660	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2661	request.Method = "GET"
2662	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2663	if err != nil {
2664		return out, metadata, &smithy.SerializationError{Err: err}
2665	}
2666
2667	if err := awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyConfigInput(input, restEncoder); err != nil {
2668		return out, metadata, &smithy.SerializationError{Err: err}
2669	}
2670
2671	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2672		return out, metadata, &smithy.SerializationError{Err: err}
2673	}
2674	in.Request = request
2675
2676	return next.HandleSerialize(ctx, in)
2677}
2678func awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyConfigInput(v *GetOriginRequestPolicyConfigInput, encoder *httpbinding.Encoder) error {
2679	if v == nil {
2680		return fmt.Errorf("unsupported serialization of nil %T", v)
2681	}
2682
2683	if v.Id == nil || len(*v.Id) == 0 {
2684		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2685	}
2686	if v.Id != nil {
2687		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2688			return err
2689		}
2690	}
2691
2692	return nil
2693}
2694
2695type awsRestxml_serializeOpGetPublicKey struct {
2696}
2697
2698func (*awsRestxml_serializeOpGetPublicKey) ID() string {
2699	return "OperationSerializer"
2700}
2701
2702func (m *awsRestxml_serializeOpGetPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2703	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2704) {
2705	request, ok := in.Request.(*smithyhttp.Request)
2706	if !ok {
2707		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2708	}
2709
2710	input, ok := in.Parameters.(*GetPublicKeyInput)
2711	_ = input
2712	if !ok {
2713		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2714	}
2715
2716	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}")
2717	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2718	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2719	request.Method = "GET"
2720	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2721	if err != nil {
2722		return out, metadata, &smithy.SerializationError{Err: err}
2723	}
2724
2725	if err := awsRestxml_serializeOpHttpBindingsGetPublicKeyInput(input, restEncoder); err != nil {
2726		return out, metadata, &smithy.SerializationError{Err: err}
2727	}
2728
2729	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2730		return out, metadata, &smithy.SerializationError{Err: err}
2731	}
2732	in.Request = request
2733
2734	return next.HandleSerialize(ctx, in)
2735}
2736func awsRestxml_serializeOpHttpBindingsGetPublicKeyInput(v *GetPublicKeyInput, encoder *httpbinding.Encoder) error {
2737	if v == nil {
2738		return fmt.Errorf("unsupported serialization of nil %T", v)
2739	}
2740
2741	if v.Id == nil || len(*v.Id) == 0 {
2742		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2743	}
2744	if v.Id != nil {
2745		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2746			return err
2747		}
2748	}
2749
2750	return nil
2751}
2752
2753type awsRestxml_serializeOpGetPublicKeyConfig struct {
2754}
2755
2756func (*awsRestxml_serializeOpGetPublicKeyConfig) ID() string {
2757	return "OperationSerializer"
2758}
2759
2760func (m *awsRestxml_serializeOpGetPublicKeyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2761	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2762) {
2763	request, ok := in.Request.(*smithyhttp.Request)
2764	if !ok {
2765		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2766	}
2767
2768	input, ok := in.Parameters.(*GetPublicKeyConfigInput)
2769	_ = input
2770	if !ok {
2771		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2772	}
2773
2774	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}/config")
2775	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2776	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2777	request.Method = "GET"
2778	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2779	if err != nil {
2780		return out, metadata, &smithy.SerializationError{Err: err}
2781	}
2782
2783	if err := awsRestxml_serializeOpHttpBindingsGetPublicKeyConfigInput(input, restEncoder); err != nil {
2784		return out, metadata, &smithy.SerializationError{Err: err}
2785	}
2786
2787	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2788		return out, metadata, &smithy.SerializationError{Err: err}
2789	}
2790	in.Request = request
2791
2792	return next.HandleSerialize(ctx, in)
2793}
2794func awsRestxml_serializeOpHttpBindingsGetPublicKeyConfigInput(v *GetPublicKeyConfigInput, encoder *httpbinding.Encoder) error {
2795	if v == nil {
2796		return fmt.Errorf("unsupported serialization of nil %T", v)
2797	}
2798
2799	if v.Id == nil || len(*v.Id) == 0 {
2800		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2801	}
2802	if v.Id != nil {
2803		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2804			return err
2805		}
2806	}
2807
2808	return nil
2809}
2810
2811type awsRestxml_serializeOpGetRealtimeLogConfig struct {
2812}
2813
2814func (*awsRestxml_serializeOpGetRealtimeLogConfig) ID() string {
2815	return "OperationSerializer"
2816}
2817
2818func (m *awsRestxml_serializeOpGetRealtimeLogConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2819	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2820) {
2821	request, ok := in.Request.(*smithyhttp.Request)
2822	if !ok {
2823		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2824	}
2825
2826	input, ok := in.Parameters.(*GetRealtimeLogConfigInput)
2827	_ = input
2828	if !ok {
2829		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2830	}
2831
2832	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/get-realtime-log-config")
2833	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2834	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2835	request.Method = "POST"
2836	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2837	if err != nil {
2838		return out, metadata, &smithy.SerializationError{Err: err}
2839	}
2840
2841	restEncoder.SetHeader("Content-Type").String("application/xml")
2842
2843	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
2844	rootAttr := []smithyxml.Attr{}
2845	root := smithyxml.StartElement{
2846		Name: smithyxml.Name{
2847			Local: "GetRealtimeLogConfigRequest",
2848		},
2849		Attr: rootAttr,
2850	}
2851	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
2852	if err := awsRestxml_serializeOpDocumentGetRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
2853		return out, metadata, &smithy.SerializationError{Err: err}
2854	}
2855	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
2856		return out, metadata, &smithy.SerializationError{Err: err}
2857	}
2858
2859	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2860		return out, metadata, &smithy.SerializationError{Err: err}
2861	}
2862	in.Request = request
2863
2864	return next.HandleSerialize(ctx, in)
2865}
2866func awsRestxml_serializeOpHttpBindingsGetRealtimeLogConfigInput(v *GetRealtimeLogConfigInput, encoder *httpbinding.Encoder) error {
2867	if v == nil {
2868		return fmt.Errorf("unsupported serialization of nil %T", v)
2869	}
2870
2871	return nil
2872}
2873
2874func awsRestxml_serializeOpDocumentGetRealtimeLogConfigInput(v *GetRealtimeLogConfigInput, value smithyxml.Value) error {
2875	defer value.Close()
2876	if v.ARN != nil {
2877		rootAttr := []smithyxml.Attr{}
2878		root := smithyxml.StartElement{
2879			Name: smithyxml.Name{
2880				Local: "ARN",
2881			},
2882			Attr: rootAttr,
2883		}
2884		el := value.MemberElement(root)
2885		el.String(*v.ARN)
2886	}
2887	if v.Name != nil {
2888		rootAttr := []smithyxml.Attr{}
2889		root := smithyxml.StartElement{
2890			Name: smithyxml.Name{
2891				Local: "Name",
2892			},
2893			Attr: rootAttr,
2894		}
2895		el := value.MemberElement(root)
2896		el.String(*v.Name)
2897	}
2898	return nil
2899}
2900
2901type awsRestxml_serializeOpGetStreamingDistribution struct {
2902}
2903
2904func (*awsRestxml_serializeOpGetStreamingDistribution) ID() string {
2905	return "OperationSerializer"
2906}
2907
2908func (m *awsRestxml_serializeOpGetStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2909	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2910) {
2911	request, ok := in.Request.(*smithyhttp.Request)
2912	if !ok {
2913		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2914	}
2915
2916	input, ok := in.Parameters.(*GetStreamingDistributionInput)
2917	_ = input
2918	if !ok {
2919		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2920	}
2921
2922	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}")
2923	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2924	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2925	request.Method = "GET"
2926	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2927	if err != nil {
2928		return out, metadata, &smithy.SerializationError{Err: err}
2929	}
2930
2931	if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(input, restEncoder); err != nil {
2932		return out, metadata, &smithy.SerializationError{Err: err}
2933	}
2934
2935	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2936		return out, metadata, &smithy.SerializationError{Err: err}
2937	}
2938	in.Request = request
2939
2940	return next.HandleSerialize(ctx, in)
2941}
2942func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(v *GetStreamingDistributionInput, encoder *httpbinding.Encoder) error {
2943	if v == nil {
2944		return fmt.Errorf("unsupported serialization of nil %T", v)
2945	}
2946
2947	if v.Id == nil || len(*v.Id) == 0 {
2948		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
2949	}
2950	if v.Id != nil {
2951		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
2952			return err
2953		}
2954	}
2955
2956	return nil
2957}
2958
2959type awsRestxml_serializeOpGetStreamingDistributionConfig struct {
2960}
2961
2962func (*awsRestxml_serializeOpGetStreamingDistributionConfig) ID() string {
2963	return "OperationSerializer"
2964}
2965
2966func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2967	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2968) {
2969	request, ok := in.Request.(*smithyhttp.Request)
2970	if !ok {
2971		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2972	}
2973
2974	input, ok := in.Parameters.(*GetStreamingDistributionConfigInput)
2975	_ = input
2976	if !ok {
2977		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2978	}
2979
2980	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config")
2981	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2982	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2983	request.Method = "GET"
2984	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2985	if err != nil {
2986		return out, metadata, &smithy.SerializationError{Err: err}
2987	}
2988
2989	if err := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(input, restEncoder); err != nil {
2990		return out, metadata, &smithy.SerializationError{Err: err}
2991	}
2992
2993	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2994		return out, metadata, &smithy.SerializationError{Err: err}
2995	}
2996	in.Request = request
2997
2998	return next.HandleSerialize(ctx, in)
2999}
3000func awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(v *GetStreamingDistributionConfigInput, encoder *httpbinding.Encoder) error {
3001	if v == nil {
3002		return fmt.Errorf("unsupported serialization of nil %T", v)
3003	}
3004
3005	if v.Id == nil || len(*v.Id) == 0 {
3006		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
3007	}
3008	if v.Id != nil {
3009		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
3010			return err
3011		}
3012	}
3013
3014	return nil
3015}
3016
3017type awsRestxml_serializeOpListCachePolicies struct {
3018}
3019
3020func (*awsRestxml_serializeOpListCachePolicies) ID() string {
3021	return "OperationSerializer"
3022}
3023
3024func (m *awsRestxml_serializeOpListCachePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3025	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3026) {
3027	request, ok := in.Request.(*smithyhttp.Request)
3028	if !ok {
3029		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3030	}
3031
3032	input, ok := in.Parameters.(*ListCachePoliciesInput)
3033	_ = input
3034	if !ok {
3035		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3036	}
3037
3038	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy")
3039	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3040	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3041	request.Method = "GET"
3042	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3043	if err != nil {
3044		return out, metadata, &smithy.SerializationError{Err: err}
3045	}
3046
3047	if err := awsRestxml_serializeOpHttpBindingsListCachePoliciesInput(input, restEncoder); err != nil {
3048		return out, metadata, &smithy.SerializationError{Err: err}
3049	}
3050
3051	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3052		return out, metadata, &smithy.SerializationError{Err: err}
3053	}
3054	in.Request = request
3055
3056	return next.HandleSerialize(ctx, in)
3057}
3058func awsRestxml_serializeOpHttpBindingsListCachePoliciesInput(v *ListCachePoliciesInput, encoder *httpbinding.Encoder) error {
3059	if v == nil {
3060		return fmt.Errorf("unsupported serialization of nil %T", v)
3061	}
3062
3063	if v.Marker != nil {
3064		encoder.SetQuery("Marker").String(*v.Marker)
3065	}
3066
3067	if v.MaxItems != nil {
3068		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3069	}
3070
3071	if len(v.Type) > 0 {
3072		encoder.SetQuery("Type").String(string(v.Type))
3073	}
3074
3075	return nil
3076}
3077
3078type awsRestxml_serializeOpListCloudFrontOriginAccessIdentities struct {
3079}
3080
3081func (*awsRestxml_serializeOpListCloudFrontOriginAccessIdentities) ID() string {
3082	return "OperationSerializer"
3083}
3084
3085func (m *awsRestxml_serializeOpListCloudFrontOriginAccessIdentities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3086	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3087) {
3088	request, ok := in.Request.(*smithyhttp.Request)
3089	if !ok {
3090		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3091	}
3092
3093	input, ok := in.Parameters.(*ListCloudFrontOriginAccessIdentitiesInput)
3094	_ = input
3095	if !ok {
3096		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3097	}
3098
3099	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront")
3100	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3101	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3102	request.Method = "GET"
3103	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3104	if err != nil {
3105		return out, metadata, &smithy.SerializationError{Err: err}
3106	}
3107
3108	if err := awsRestxml_serializeOpHttpBindingsListCloudFrontOriginAccessIdentitiesInput(input, restEncoder); err != nil {
3109		return out, metadata, &smithy.SerializationError{Err: err}
3110	}
3111
3112	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3113		return out, metadata, &smithy.SerializationError{Err: err}
3114	}
3115	in.Request = request
3116
3117	return next.HandleSerialize(ctx, in)
3118}
3119func awsRestxml_serializeOpHttpBindingsListCloudFrontOriginAccessIdentitiesInput(v *ListCloudFrontOriginAccessIdentitiesInput, encoder *httpbinding.Encoder) error {
3120	if v == nil {
3121		return fmt.Errorf("unsupported serialization of nil %T", v)
3122	}
3123
3124	if v.Marker != nil {
3125		encoder.SetQuery("Marker").String(*v.Marker)
3126	}
3127
3128	if v.MaxItems != nil {
3129		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3130	}
3131
3132	return nil
3133}
3134
3135type awsRestxml_serializeOpListDistributions struct {
3136}
3137
3138func (*awsRestxml_serializeOpListDistributions) ID() string {
3139	return "OperationSerializer"
3140}
3141
3142func (m *awsRestxml_serializeOpListDistributions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3143	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3144) {
3145	request, ok := in.Request.(*smithyhttp.Request)
3146	if !ok {
3147		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3148	}
3149
3150	input, ok := in.Parameters.(*ListDistributionsInput)
3151	_ = input
3152	if !ok {
3153		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3154	}
3155
3156	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution")
3157	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3158	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3159	request.Method = "GET"
3160	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3161	if err != nil {
3162		return out, metadata, &smithy.SerializationError{Err: err}
3163	}
3164
3165	if err := awsRestxml_serializeOpHttpBindingsListDistributionsInput(input, restEncoder); err != nil {
3166		return out, metadata, &smithy.SerializationError{Err: err}
3167	}
3168
3169	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3170		return out, metadata, &smithy.SerializationError{Err: err}
3171	}
3172	in.Request = request
3173
3174	return next.HandleSerialize(ctx, in)
3175}
3176func awsRestxml_serializeOpHttpBindingsListDistributionsInput(v *ListDistributionsInput, encoder *httpbinding.Encoder) error {
3177	if v == nil {
3178		return fmt.Errorf("unsupported serialization of nil %T", v)
3179	}
3180
3181	if v.Marker != nil {
3182		encoder.SetQuery("Marker").String(*v.Marker)
3183	}
3184
3185	if v.MaxItems != nil {
3186		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3187	}
3188
3189	return nil
3190}
3191
3192type awsRestxml_serializeOpListDistributionsByCachePolicyId struct {
3193}
3194
3195func (*awsRestxml_serializeOpListDistributionsByCachePolicyId) ID() string {
3196	return "OperationSerializer"
3197}
3198
3199func (m *awsRestxml_serializeOpListDistributionsByCachePolicyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3200	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3201) {
3202	request, ok := in.Request.(*smithyhttp.Request)
3203	if !ok {
3204		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3205	}
3206
3207	input, ok := in.Parameters.(*ListDistributionsByCachePolicyIdInput)
3208	_ = input
3209	if !ok {
3210		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3211	}
3212
3213	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByCachePolicyId/{CachePolicyId}")
3214	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3215	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3216	request.Method = "GET"
3217	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3218	if err != nil {
3219		return out, metadata, &smithy.SerializationError{Err: err}
3220	}
3221
3222	if err := awsRestxml_serializeOpHttpBindingsListDistributionsByCachePolicyIdInput(input, restEncoder); err != nil {
3223		return out, metadata, &smithy.SerializationError{Err: err}
3224	}
3225
3226	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3227		return out, metadata, &smithy.SerializationError{Err: err}
3228	}
3229	in.Request = request
3230
3231	return next.HandleSerialize(ctx, in)
3232}
3233func awsRestxml_serializeOpHttpBindingsListDistributionsByCachePolicyIdInput(v *ListDistributionsByCachePolicyIdInput, encoder *httpbinding.Encoder) error {
3234	if v == nil {
3235		return fmt.Errorf("unsupported serialization of nil %T", v)
3236	}
3237
3238	if v.CachePolicyId == nil || len(*v.CachePolicyId) == 0 {
3239		return &smithy.SerializationError{Err: fmt.Errorf("input member CachePolicyId must not be empty")}
3240	}
3241	if v.CachePolicyId != nil {
3242		if err := encoder.SetURI("CachePolicyId").String(*v.CachePolicyId); err != nil {
3243			return err
3244		}
3245	}
3246
3247	if v.Marker != nil {
3248		encoder.SetQuery("Marker").String(*v.Marker)
3249	}
3250
3251	if v.MaxItems != nil {
3252		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3253	}
3254
3255	return nil
3256}
3257
3258type awsRestxml_serializeOpListDistributionsByKeyGroup struct {
3259}
3260
3261func (*awsRestxml_serializeOpListDistributionsByKeyGroup) ID() string {
3262	return "OperationSerializer"
3263}
3264
3265func (m *awsRestxml_serializeOpListDistributionsByKeyGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3266	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3267) {
3268	request, ok := in.Request.(*smithyhttp.Request)
3269	if !ok {
3270		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3271	}
3272
3273	input, ok := in.Parameters.(*ListDistributionsByKeyGroupInput)
3274	_ = input
3275	if !ok {
3276		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3277	}
3278
3279	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByKeyGroupId/{KeyGroupId}")
3280	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3281	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3282	request.Method = "GET"
3283	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3284	if err != nil {
3285		return out, metadata, &smithy.SerializationError{Err: err}
3286	}
3287
3288	if err := awsRestxml_serializeOpHttpBindingsListDistributionsByKeyGroupInput(input, restEncoder); err != nil {
3289		return out, metadata, &smithy.SerializationError{Err: err}
3290	}
3291
3292	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3293		return out, metadata, &smithy.SerializationError{Err: err}
3294	}
3295	in.Request = request
3296
3297	return next.HandleSerialize(ctx, in)
3298}
3299func awsRestxml_serializeOpHttpBindingsListDistributionsByKeyGroupInput(v *ListDistributionsByKeyGroupInput, encoder *httpbinding.Encoder) error {
3300	if v == nil {
3301		return fmt.Errorf("unsupported serialization of nil %T", v)
3302	}
3303
3304	if v.KeyGroupId == nil || len(*v.KeyGroupId) == 0 {
3305		return &smithy.SerializationError{Err: fmt.Errorf("input member KeyGroupId must not be empty")}
3306	}
3307	if v.KeyGroupId != nil {
3308		if err := encoder.SetURI("KeyGroupId").String(*v.KeyGroupId); err != nil {
3309			return err
3310		}
3311	}
3312
3313	if v.Marker != nil {
3314		encoder.SetQuery("Marker").String(*v.Marker)
3315	}
3316
3317	if v.MaxItems != nil {
3318		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3319	}
3320
3321	return nil
3322}
3323
3324type awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId struct {
3325}
3326
3327func (*awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId) ID() string {
3328	return "OperationSerializer"
3329}
3330
3331func (m *awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3332	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3333) {
3334	request, ok := in.Request.(*smithyhttp.Request)
3335	if !ok {
3336		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3337	}
3338
3339	input, ok := in.Parameters.(*ListDistributionsByOriginRequestPolicyIdInput)
3340	_ = input
3341	if !ok {
3342		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3343	}
3344
3345	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByOriginRequestPolicyId/{OriginRequestPolicyId}")
3346	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3347	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3348	request.Method = "GET"
3349	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3350	if err != nil {
3351		return out, metadata, &smithy.SerializationError{Err: err}
3352	}
3353
3354	if err := awsRestxml_serializeOpHttpBindingsListDistributionsByOriginRequestPolicyIdInput(input, restEncoder); err != nil {
3355		return out, metadata, &smithy.SerializationError{Err: err}
3356	}
3357
3358	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3359		return out, metadata, &smithy.SerializationError{Err: err}
3360	}
3361	in.Request = request
3362
3363	return next.HandleSerialize(ctx, in)
3364}
3365func awsRestxml_serializeOpHttpBindingsListDistributionsByOriginRequestPolicyIdInput(v *ListDistributionsByOriginRequestPolicyIdInput, encoder *httpbinding.Encoder) error {
3366	if v == nil {
3367		return fmt.Errorf("unsupported serialization of nil %T", v)
3368	}
3369
3370	if v.Marker != nil {
3371		encoder.SetQuery("Marker").String(*v.Marker)
3372	}
3373
3374	if v.MaxItems != nil {
3375		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3376	}
3377
3378	if v.OriginRequestPolicyId == nil || len(*v.OriginRequestPolicyId) == 0 {
3379		return &smithy.SerializationError{Err: fmt.Errorf("input member OriginRequestPolicyId must not be empty")}
3380	}
3381	if v.OriginRequestPolicyId != nil {
3382		if err := encoder.SetURI("OriginRequestPolicyId").String(*v.OriginRequestPolicyId); err != nil {
3383			return err
3384		}
3385	}
3386
3387	return nil
3388}
3389
3390type awsRestxml_serializeOpListDistributionsByRealtimeLogConfig struct {
3391}
3392
3393func (*awsRestxml_serializeOpListDistributionsByRealtimeLogConfig) ID() string {
3394	return "OperationSerializer"
3395}
3396
3397func (m *awsRestxml_serializeOpListDistributionsByRealtimeLogConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3398	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3399) {
3400	request, ok := in.Request.(*smithyhttp.Request)
3401	if !ok {
3402		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3403	}
3404
3405	input, ok := in.Parameters.(*ListDistributionsByRealtimeLogConfigInput)
3406	_ = input
3407	if !ok {
3408		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3409	}
3410
3411	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByRealtimeLogConfig")
3412	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3413	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3414	request.Method = "POST"
3415	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3416	if err != nil {
3417		return out, metadata, &smithy.SerializationError{Err: err}
3418	}
3419
3420	restEncoder.SetHeader("Content-Type").String("application/xml")
3421
3422	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3423	rootAttr := []smithyxml.Attr{}
3424	root := smithyxml.StartElement{
3425		Name: smithyxml.Name{
3426			Local: "ListDistributionsByRealtimeLogConfigRequest",
3427		},
3428		Attr: rootAttr,
3429	}
3430	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
3431	if err := awsRestxml_serializeOpDocumentListDistributionsByRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
3432		return out, metadata, &smithy.SerializationError{Err: err}
3433	}
3434	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
3435		return out, metadata, &smithy.SerializationError{Err: err}
3436	}
3437
3438	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3439		return out, metadata, &smithy.SerializationError{Err: err}
3440	}
3441	in.Request = request
3442
3443	return next.HandleSerialize(ctx, in)
3444}
3445func awsRestxml_serializeOpHttpBindingsListDistributionsByRealtimeLogConfigInput(v *ListDistributionsByRealtimeLogConfigInput, encoder *httpbinding.Encoder) error {
3446	if v == nil {
3447		return fmt.Errorf("unsupported serialization of nil %T", v)
3448	}
3449
3450	return nil
3451}
3452
3453func awsRestxml_serializeOpDocumentListDistributionsByRealtimeLogConfigInput(v *ListDistributionsByRealtimeLogConfigInput, value smithyxml.Value) error {
3454	defer value.Close()
3455	if v.Marker != nil {
3456		rootAttr := []smithyxml.Attr{}
3457		root := smithyxml.StartElement{
3458			Name: smithyxml.Name{
3459				Local: "Marker",
3460			},
3461			Attr: rootAttr,
3462		}
3463		el := value.MemberElement(root)
3464		el.String(*v.Marker)
3465	}
3466	if v.MaxItems != nil {
3467		rootAttr := []smithyxml.Attr{}
3468		root := smithyxml.StartElement{
3469			Name: smithyxml.Name{
3470				Local: "MaxItems",
3471			},
3472			Attr: rootAttr,
3473		}
3474		el := value.MemberElement(root)
3475		el.Integer(*v.MaxItems)
3476	}
3477	if v.RealtimeLogConfigArn != nil {
3478		rootAttr := []smithyxml.Attr{}
3479		root := smithyxml.StartElement{
3480			Name: smithyxml.Name{
3481				Local: "RealtimeLogConfigArn",
3482			},
3483			Attr: rootAttr,
3484		}
3485		el := value.MemberElement(root)
3486		el.String(*v.RealtimeLogConfigArn)
3487	}
3488	if v.RealtimeLogConfigName != nil {
3489		rootAttr := []smithyxml.Attr{}
3490		root := smithyxml.StartElement{
3491			Name: smithyxml.Name{
3492				Local: "RealtimeLogConfigName",
3493			},
3494			Attr: rootAttr,
3495		}
3496		el := value.MemberElement(root)
3497		el.String(*v.RealtimeLogConfigName)
3498	}
3499	return nil
3500}
3501
3502type awsRestxml_serializeOpListDistributionsByWebACLId struct {
3503}
3504
3505func (*awsRestxml_serializeOpListDistributionsByWebACLId) ID() string {
3506	return "OperationSerializer"
3507}
3508
3509func (m *awsRestxml_serializeOpListDistributionsByWebACLId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3510	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3511) {
3512	request, ok := in.Request.(*smithyhttp.Request)
3513	if !ok {
3514		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3515	}
3516
3517	input, ok := in.Parameters.(*ListDistributionsByWebACLIdInput)
3518	_ = input
3519	if !ok {
3520		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3521	}
3522
3523	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByWebACLId/{WebACLId}")
3524	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3525	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3526	request.Method = "GET"
3527	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3528	if err != nil {
3529		return out, metadata, &smithy.SerializationError{Err: err}
3530	}
3531
3532	if err := awsRestxml_serializeOpHttpBindingsListDistributionsByWebACLIdInput(input, restEncoder); err != nil {
3533		return out, metadata, &smithy.SerializationError{Err: err}
3534	}
3535
3536	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3537		return out, metadata, &smithy.SerializationError{Err: err}
3538	}
3539	in.Request = request
3540
3541	return next.HandleSerialize(ctx, in)
3542}
3543func awsRestxml_serializeOpHttpBindingsListDistributionsByWebACLIdInput(v *ListDistributionsByWebACLIdInput, encoder *httpbinding.Encoder) error {
3544	if v == nil {
3545		return fmt.Errorf("unsupported serialization of nil %T", v)
3546	}
3547
3548	if v.Marker != nil {
3549		encoder.SetQuery("Marker").String(*v.Marker)
3550	}
3551
3552	if v.MaxItems != nil {
3553		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3554	}
3555
3556	if v.WebACLId == nil || len(*v.WebACLId) == 0 {
3557		return &smithy.SerializationError{Err: fmt.Errorf("input member WebACLId must not be empty")}
3558	}
3559	if v.WebACLId != nil {
3560		if err := encoder.SetURI("WebACLId").String(*v.WebACLId); err != nil {
3561			return err
3562		}
3563	}
3564
3565	return nil
3566}
3567
3568type awsRestxml_serializeOpListFieldLevelEncryptionConfigs struct {
3569}
3570
3571func (*awsRestxml_serializeOpListFieldLevelEncryptionConfigs) ID() string {
3572	return "OperationSerializer"
3573}
3574
3575func (m *awsRestxml_serializeOpListFieldLevelEncryptionConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3576	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3577) {
3578	request, ok := in.Request.(*smithyhttp.Request)
3579	if !ok {
3580		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3581	}
3582
3583	input, ok := in.Parameters.(*ListFieldLevelEncryptionConfigsInput)
3584	_ = input
3585	if !ok {
3586		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3587	}
3588
3589	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption")
3590	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3591	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3592	request.Method = "GET"
3593	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3594	if err != nil {
3595		return out, metadata, &smithy.SerializationError{Err: err}
3596	}
3597
3598	if err := awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionConfigsInput(input, restEncoder); err != nil {
3599		return out, metadata, &smithy.SerializationError{Err: err}
3600	}
3601
3602	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3603		return out, metadata, &smithy.SerializationError{Err: err}
3604	}
3605	in.Request = request
3606
3607	return next.HandleSerialize(ctx, in)
3608}
3609func awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionConfigsInput(v *ListFieldLevelEncryptionConfigsInput, encoder *httpbinding.Encoder) error {
3610	if v == nil {
3611		return fmt.Errorf("unsupported serialization of nil %T", v)
3612	}
3613
3614	if v.Marker != nil {
3615		encoder.SetQuery("Marker").String(*v.Marker)
3616	}
3617
3618	if v.MaxItems != nil {
3619		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3620	}
3621
3622	return nil
3623}
3624
3625type awsRestxml_serializeOpListFieldLevelEncryptionProfiles struct {
3626}
3627
3628func (*awsRestxml_serializeOpListFieldLevelEncryptionProfiles) ID() string {
3629	return "OperationSerializer"
3630}
3631
3632func (m *awsRestxml_serializeOpListFieldLevelEncryptionProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3633	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3634) {
3635	request, ok := in.Request.(*smithyhttp.Request)
3636	if !ok {
3637		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3638	}
3639
3640	input, ok := in.Parameters.(*ListFieldLevelEncryptionProfilesInput)
3641	_ = input
3642	if !ok {
3643		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3644	}
3645
3646	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile")
3647	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3648	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3649	request.Method = "GET"
3650	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3651	if err != nil {
3652		return out, metadata, &smithy.SerializationError{Err: err}
3653	}
3654
3655	if err := awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionProfilesInput(input, restEncoder); err != nil {
3656		return out, metadata, &smithy.SerializationError{Err: err}
3657	}
3658
3659	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3660		return out, metadata, &smithy.SerializationError{Err: err}
3661	}
3662	in.Request = request
3663
3664	return next.HandleSerialize(ctx, in)
3665}
3666func awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionProfilesInput(v *ListFieldLevelEncryptionProfilesInput, encoder *httpbinding.Encoder) error {
3667	if v == nil {
3668		return fmt.Errorf("unsupported serialization of nil %T", v)
3669	}
3670
3671	if v.Marker != nil {
3672		encoder.SetQuery("Marker").String(*v.Marker)
3673	}
3674
3675	if v.MaxItems != nil {
3676		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3677	}
3678
3679	return nil
3680}
3681
3682type awsRestxml_serializeOpListInvalidations struct {
3683}
3684
3685func (*awsRestxml_serializeOpListInvalidations) ID() string {
3686	return "OperationSerializer"
3687}
3688
3689func (m *awsRestxml_serializeOpListInvalidations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3690	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3691) {
3692	request, ok := in.Request.(*smithyhttp.Request)
3693	if !ok {
3694		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3695	}
3696
3697	input, ok := in.Parameters.(*ListInvalidationsInput)
3698	_ = input
3699	if !ok {
3700		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3701	}
3702
3703	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation")
3704	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3705	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3706	request.Method = "GET"
3707	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3708	if err != nil {
3709		return out, metadata, &smithy.SerializationError{Err: err}
3710	}
3711
3712	if err := awsRestxml_serializeOpHttpBindingsListInvalidationsInput(input, restEncoder); err != nil {
3713		return out, metadata, &smithy.SerializationError{Err: err}
3714	}
3715
3716	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3717		return out, metadata, &smithy.SerializationError{Err: err}
3718	}
3719	in.Request = request
3720
3721	return next.HandleSerialize(ctx, in)
3722}
3723func awsRestxml_serializeOpHttpBindingsListInvalidationsInput(v *ListInvalidationsInput, encoder *httpbinding.Encoder) error {
3724	if v == nil {
3725		return fmt.Errorf("unsupported serialization of nil %T", v)
3726	}
3727
3728	if v.DistributionId == nil || len(*v.DistributionId) == 0 {
3729		return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")}
3730	}
3731	if v.DistributionId != nil {
3732		if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil {
3733			return err
3734		}
3735	}
3736
3737	if v.Marker != nil {
3738		encoder.SetQuery("Marker").String(*v.Marker)
3739	}
3740
3741	if v.MaxItems != nil {
3742		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3743	}
3744
3745	return nil
3746}
3747
3748type awsRestxml_serializeOpListKeyGroups struct {
3749}
3750
3751func (*awsRestxml_serializeOpListKeyGroups) ID() string {
3752	return "OperationSerializer"
3753}
3754
3755func (m *awsRestxml_serializeOpListKeyGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3756	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3757) {
3758	request, ok := in.Request.(*smithyhttp.Request)
3759	if !ok {
3760		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3761	}
3762
3763	input, ok := in.Parameters.(*ListKeyGroupsInput)
3764	_ = input
3765	if !ok {
3766		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3767	}
3768
3769	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group")
3770	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3771	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3772	request.Method = "GET"
3773	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3774	if err != nil {
3775		return out, metadata, &smithy.SerializationError{Err: err}
3776	}
3777
3778	if err := awsRestxml_serializeOpHttpBindingsListKeyGroupsInput(input, restEncoder); err != nil {
3779		return out, metadata, &smithy.SerializationError{Err: err}
3780	}
3781
3782	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3783		return out, metadata, &smithy.SerializationError{Err: err}
3784	}
3785	in.Request = request
3786
3787	return next.HandleSerialize(ctx, in)
3788}
3789func awsRestxml_serializeOpHttpBindingsListKeyGroupsInput(v *ListKeyGroupsInput, encoder *httpbinding.Encoder) error {
3790	if v == nil {
3791		return fmt.Errorf("unsupported serialization of nil %T", v)
3792	}
3793
3794	if v.Marker != nil {
3795		encoder.SetQuery("Marker").String(*v.Marker)
3796	}
3797
3798	if v.MaxItems != nil {
3799		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3800	}
3801
3802	return nil
3803}
3804
3805type awsRestxml_serializeOpListOriginRequestPolicies struct {
3806}
3807
3808func (*awsRestxml_serializeOpListOriginRequestPolicies) ID() string {
3809	return "OperationSerializer"
3810}
3811
3812func (m *awsRestxml_serializeOpListOriginRequestPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3813	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3814) {
3815	request, ok := in.Request.(*smithyhttp.Request)
3816	if !ok {
3817		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3818	}
3819
3820	input, ok := in.Parameters.(*ListOriginRequestPoliciesInput)
3821	_ = input
3822	if !ok {
3823		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3824	}
3825
3826	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy")
3827	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3828	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3829	request.Method = "GET"
3830	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3831	if err != nil {
3832		return out, metadata, &smithy.SerializationError{Err: err}
3833	}
3834
3835	if err := awsRestxml_serializeOpHttpBindingsListOriginRequestPoliciesInput(input, restEncoder); err != nil {
3836		return out, metadata, &smithy.SerializationError{Err: err}
3837	}
3838
3839	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3840		return out, metadata, &smithy.SerializationError{Err: err}
3841	}
3842	in.Request = request
3843
3844	return next.HandleSerialize(ctx, in)
3845}
3846func awsRestxml_serializeOpHttpBindingsListOriginRequestPoliciesInput(v *ListOriginRequestPoliciesInput, encoder *httpbinding.Encoder) error {
3847	if v == nil {
3848		return fmt.Errorf("unsupported serialization of nil %T", v)
3849	}
3850
3851	if v.Marker != nil {
3852		encoder.SetQuery("Marker").String(*v.Marker)
3853	}
3854
3855	if v.MaxItems != nil {
3856		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3857	}
3858
3859	if len(v.Type) > 0 {
3860		encoder.SetQuery("Type").String(string(v.Type))
3861	}
3862
3863	return nil
3864}
3865
3866type awsRestxml_serializeOpListPublicKeys struct {
3867}
3868
3869func (*awsRestxml_serializeOpListPublicKeys) ID() string {
3870	return "OperationSerializer"
3871}
3872
3873func (m *awsRestxml_serializeOpListPublicKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3874	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3875) {
3876	request, ok := in.Request.(*smithyhttp.Request)
3877	if !ok {
3878		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3879	}
3880
3881	input, ok := in.Parameters.(*ListPublicKeysInput)
3882	_ = input
3883	if !ok {
3884		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3885	}
3886
3887	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key")
3888	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3889	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3890	request.Method = "GET"
3891	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3892	if err != nil {
3893		return out, metadata, &smithy.SerializationError{Err: err}
3894	}
3895
3896	if err := awsRestxml_serializeOpHttpBindingsListPublicKeysInput(input, restEncoder); err != nil {
3897		return out, metadata, &smithy.SerializationError{Err: err}
3898	}
3899
3900	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3901		return out, metadata, &smithy.SerializationError{Err: err}
3902	}
3903	in.Request = request
3904
3905	return next.HandleSerialize(ctx, in)
3906}
3907func awsRestxml_serializeOpHttpBindingsListPublicKeysInput(v *ListPublicKeysInput, encoder *httpbinding.Encoder) error {
3908	if v == nil {
3909		return fmt.Errorf("unsupported serialization of nil %T", v)
3910	}
3911
3912	if v.Marker != nil {
3913		encoder.SetQuery("Marker").String(*v.Marker)
3914	}
3915
3916	if v.MaxItems != nil {
3917		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3918	}
3919
3920	return nil
3921}
3922
3923type awsRestxml_serializeOpListRealtimeLogConfigs struct {
3924}
3925
3926func (*awsRestxml_serializeOpListRealtimeLogConfigs) ID() string {
3927	return "OperationSerializer"
3928}
3929
3930func (m *awsRestxml_serializeOpListRealtimeLogConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3931	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3932) {
3933	request, ok := in.Request.(*smithyhttp.Request)
3934	if !ok {
3935		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3936	}
3937
3938	input, ok := in.Parameters.(*ListRealtimeLogConfigsInput)
3939	_ = input
3940	if !ok {
3941		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3942	}
3943
3944	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config")
3945	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3946	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3947	request.Method = "GET"
3948	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3949	if err != nil {
3950		return out, metadata, &smithy.SerializationError{Err: err}
3951	}
3952
3953	if err := awsRestxml_serializeOpHttpBindingsListRealtimeLogConfigsInput(input, restEncoder); err != nil {
3954		return out, metadata, &smithy.SerializationError{Err: err}
3955	}
3956
3957	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3958		return out, metadata, &smithy.SerializationError{Err: err}
3959	}
3960	in.Request = request
3961
3962	return next.HandleSerialize(ctx, in)
3963}
3964func awsRestxml_serializeOpHttpBindingsListRealtimeLogConfigsInput(v *ListRealtimeLogConfigsInput, encoder *httpbinding.Encoder) error {
3965	if v == nil {
3966		return fmt.Errorf("unsupported serialization of nil %T", v)
3967	}
3968
3969	if v.Marker != nil {
3970		encoder.SetQuery("Marker").String(*v.Marker)
3971	}
3972
3973	if v.MaxItems != nil {
3974		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
3975	}
3976
3977	return nil
3978}
3979
3980type awsRestxml_serializeOpListStreamingDistributions struct {
3981}
3982
3983func (*awsRestxml_serializeOpListStreamingDistributions) ID() string {
3984	return "OperationSerializer"
3985}
3986
3987func (m *awsRestxml_serializeOpListStreamingDistributions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3988	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3989) {
3990	request, ok := in.Request.(*smithyhttp.Request)
3991	if !ok {
3992		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3993	}
3994
3995	input, ok := in.Parameters.(*ListStreamingDistributionsInput)
3996	_ = input
3997	if !ok {
3998		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3999	}
4000
4001	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution")
4002	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4003	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4004	request.Method = "GET"
4005	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4006	if err != nil {
4007		return out, metadata, &smithy.SerializationError{Err: err}
4008	}
4009
4010	if err := awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(input, restEncoder); err != nil {
4011		return out, metadata, &smithy.SerializationError{Err: err}
4012	}
4013
4014	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4015		return out, metadata, &smithy.SerializationError{Err: err}
4016	}
4017	in.Request = request
4018
4019	return next.HandleSerialize(ctx, in)
4020}
4021func awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(v *ListStreamingDistributionsInput, encoder *httpbinding.Encoder) error {
4022	if v == nil {
4023		return fmt.Errorf("unsupported serialization of nil %T", v)
4024	}
4025
4026	if v.Marker != nil {
4027		encoder.SetQuery("Marker").String(*v.Marker)
4028	}
4029
4030	if v.MaxItems != nil {
4031		encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
4032	}
4033
4034	return nil
4035}
4036
4037type awsRestxml_serializeOpListTagsForResource struct {
4038}
4039
4040func (*awsRestxml_serializeOpListTagsForResource) ID() string {
4041	return "OperationSerializer"
4042}
4043
4044func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4045	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4046) {
4047	request, ok := in.Request.(*smithyhttp.Request)
4048	if !ok {
4049		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4050	}
4051
4052	input, ok := in.Parameters.(*ListTagsForResourceInput)
4053	_ = input
4054	if !ok {
4055		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4056	}
4057
4058	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/tagging")
4059	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4060	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4061	request.Method = "GET"
4062	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4063	if err != nil {
4064		return out, metadata, &smithy.SerializationError{Err: err}
4065	}
4066
4067	if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
4068		return out, metadata, &smithy.SerializationError{Err: err}
4069	}
4070
4071	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4072		return out, metadata, &smithy.SerializationError{Err: err}
4073	}
4074	in.Request = request
4075
4076	return next.HandleSerialize(ctx, in)
4077}
4078func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
4079	if v == nil {
4080		return fmt.Errorf("unsupported serialization of nil %T", v)
4081	}
4082
4083	if v.Resource != nil {
4084		encoder.SetQuery("Resource").String(*v.Resource)
4085	}
4086
4087	return nil
4088}
4089
4090type awsRestxml_serializeOpTagResource struct {
4091}
4092
4093func (*awsRestxml_serializeOpTagResource) ID() string {
4094	return "OperationSerializer"
4095}
4096
4097func (m *awsRestxml_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4098	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4099) {
4100	request, ok := in.Request.(*smithyhttp.Request)
4101	if !ok {
4102		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4103	}
4104
4105	input, ok := in.Parameters.(*TagResourceInput)
4106	_ = input
4107	if !ok {
4108		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4109	}
4110
4111	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/tagging?Operation=Tag")
4112	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4113	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4114	request.Method = "POST"
4115	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4116	if err != nil {
4117		return out, metadata, &smithy.SerializationError{Err: err}
4118	}
4119
4120	if err := awsRestxml_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
4121		return out, metadata, &smithy.SerializationError{Err: err}
4122	}
4123
4124	if input.Tags != nil {
4125		if !restEncoder.HasHeader("Content-Type") {
4126			restEncoder.SetHeader("Content-Type").String("application/xml")
4127		}
4128
4129		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4130		payloadRootAttr := []smithyxml.Attr{}
4131		payloadRoot := smithyxml.StartElement{
4132			Name: smithyxml.Name{
4133				Local: "Tags",
4134			},
4135			Attr: payloadRootAttr,
4136		}
4137		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4138		if err := awsRestxml_serializeDocumentTags(input.Tags, xmlEncoder.RootElement(payloadRoot)); err != nil {
4139			return out, metadata, &smithy.SerializationError{Err: err}
4140		}
4141		payload := bytes.NewReader(xmlEncoder.Bytes())
4142		if request, err = request.SetStream(payload); err != nil {
4143			return out, metadata, &smithy.SerializationError{Err: err}
4144		}
4145	}
4146
4147	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4148		return out, metadata, &smithy.SerializationError{Err: err}
4149	}
4150	in.Request = request
4151
4152	return next.HandleSerialize(ctx, in)
4153}
4154func awsRestxml_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
4155	if v == nil {
4156		return fmt.Errorf("unsupported serialization of nil %T", v)
4157	}
4158
4159	if v.Resource != nil {
4160		encoder.SetQuery("Resource").String(*v.Resource)
4161	}
4162
4163	return nil
4164}
4165
4166type awsRestxml_serializeOpUntagResource struct {
4167}
4168
4169func (*awsRestxml_serializeOpUntagResource) ID() string {
4170	return "OperationSerializer"
4171}
4172
4173func (m *awsRestxml_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4174	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4175) {
4176	request, ok := in.Request.(*smithyhttp.Request)
4177	if !ok {
4178		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4179	}
4180
4181	input, ok := in.Parameters.(*UntagResourceInput)
4182	_ = input
4183	if !ok {
4184		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4185	}
4186
4187	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/tagging?Operation=Untag")
4188	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4189	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4190	request.Method = "POST"
4191	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4192	if err != nil {
4193		return out, metadata, &smithy.SerializationError{Err: err}
4194	}
4195
4196	if err := awsRestxml_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
4197		return out, metadata, &smithy.SerializationError{Err: err}
4198	}
4199
4200	if input.TagKeys != nil {
4201		if !restEncoder.HasHeader("Content-Type") {
4202			restEncoder.SetHeader("Content-Type").String("application/xml")
4203		}
4204
4205		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4206		payloadRootAttr := []smithyxml.Attr{}
4207		payloadRoot := smithyxml.StartElement{
4208			Name: smithyxml.Name{
4209				Local: "TagKeys",
4210			},
4211			Attr: payloadRootAttr,
4212		}
4213		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4214		if err := awsRestxml_serializeDocumentTagKeys(input.TagKeys, xmlEncoder.RootElement(payloadRoot)); err != nil {
4215			return out, metadata, &smithy.SerializationError{Err: err}
4216		}
4217		payload := bytes.NewReader(xmlEncoder.Bytes())
4218		if request, err = request.SetStream(payload); err != nil {
4219			return out, metadata, &smithy.SerializationError{Err: err}
4220		}
4221	}
4222
4223	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4224		return out, metadata, &smithy.SerializationError{Err: err}
4225	}
4226	in.Request = request
4227
4228	return next.HandleSerialize(ctx, in)
4229}
4230func awsRestxml_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
4231	if v == nil {
4232		return fmt.Errorf("unsupported serialization of nil %T", v)
4233	}
4234
4235	if v.Resource != nil {
4236		encoder.SetQuery("Resource").String(*v.Resource)
4237	}
4238
4239	return nil
4240}
4241
4242type awsRestxml_serializeOpUpdateCachePolicy struct {
4243}
4244
4245func (*awsRestxml_serializeOpUpdateCachePolicy) ID() string {
4246	return "OperationSerializer"
4247}
4248
4249func (m *awsRestxml_serializeOpUpdateCachePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4250	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4251) {
4252	request, ok := in.Request.(*smithyhttp.Request)
4253	if !ok {
4254		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4255	}
4256
4257	input, ok := in.Parameters.(*UpdateCachePolicyInput)
4258	_ = input
4259	if !ok {
4260		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4261	}
4262
4263	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}")
4264	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4265	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4266	request.Method = "PUT"
4267	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4268	if err != nil {
4269		return out, metadata, &smithy.SerializationError{Err: err}
4270	}
4271
4272	if err := awsRestxml_serializeOpHttpBindingsUpdateCachePolicyInput(input, restEncoder); err != nil {
4273		return out, metadata, &smithy.SerializationError{Err: err}
4274	}
4275
4276	if input.CachePolicyConfig != nil {
4277		if !restEncoder.HasHeader("Content-Type") {
4278			restEncoder.SetHeader("Content-Type").String("application/xml")
4279		}
4280
4281		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4282		payloadRootAttr := []smithyxml.Attr{}
4283		payloadRoot := smithyxml.StartElement{
4284			Name: smithyxml.Name{
4285				Local: "CachePolicyConfig",
4286			},
4287			Attr: payloadRootAttr,
4288		}
4289		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4290		if err := awsRestxml_serializeDocumentCachePolicyConfig(input.CachePolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4291			return out, metadata, &smithy.SerializationError{Err: err}
4292		}
4293		payload := bytes.NewReader(xmlEncoder.Bytes())
4294		if request, err = request.SetStream(payload); err != nil {
4295			return out, metadata, &smithy.SerializationError{Err: err}
4296		}
4297	}
4298
4299	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4300		return out, metadata, &smithy.SerializationError{Err: err}
4301	}
4302	in.Request = request
4303
4304	return next.HandleSerialize(ctx, in)
4305}
4306func awsRestxml_serializeOpHttpBindingsUpdateCachePolicyInput(v *UpdateCachePolicyInput, encoder *httpbinding.Encoder) error {
4307	if v == nil {
4308		return fmt.Errorf("unsupported serialization of nil %T", v)
4309	}
4310
4311	if v.Id == nil || len(*v.Id) == 0 {
4312		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4313	}
4314	if v.Id != nil {
4315		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4316			return err
4317		}
4318	}
4319
4320	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4321		locationName := "If-Match"
4322		encoder.SetHeader(locationName).String(*v.IfMatch)
4323	}
4324
4325	return nil
4326}
4327
4328type awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity struct {
4329}
4330
4331func (*awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity) ID() string {
4332	return "OperationSerializer"
4333}
4334
4335func (m *awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4336	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4337) {
4338	request, ok := in.Request.(*smithyhttp.Request)
4339	if !ok {
4340		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4341	}
4342
4343	input, ok := in.Parameters.(*UpdateCloudFrontOriginAccessIdentityInput)
4344	_ = input
4345	if !ok {
4346		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4347	}
4348
4349	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}/config")
4350	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4351	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4352	request.Method = "PUT"
4353	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4354	if err != nil {
4355		return out, metadata, &smithy.SerializationError{Err: err}
4356	}
4357
4358	if err := awsRestxml_serializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil {
4359		return out, metadata, &smithy.SerializationError{Err: err}
4360	}
4361
4362	if input.CloudFrontOriginAccessIdentityConfig != nil {
4363		if !restEncoder.HasHeader("Content-Type") {
4364			restEncoder.SetHeader("Content-Type").String("application/xml")
4365		}
4366
4367		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4368		payloadRootAttr := []smithyxml.Attr{}
4369		payloadRoot := smithyxml.StartElement{
4370			Name: smithyxml.Name{
4371				Local: "CloudFrontOriginAccessIdentityConfig",
4372			},
4373			Attr: payloadRootAttr,
4374		}
4375		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4376		if err := awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4377			return out, metadata, &smithy.SerializationError{Err: err}
4378		}
4379		payload := bytes.NewReader(xmlEncoder.Bytes())
4380		if request, err = request.SetStream(payload); err != nil {
4381			return out, metadata, &smithy.SerializationError{Err: err}
4382		}
4383	}
4384
4385	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4386		return out, metadata, &smithy.SerializationError{Err: err}
4387	}
4388	in.Request = request
4389
4390	return next.HandleSerialize(ctx, in)
4391}
4392func awsRestxml_serializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityInput(v *UpdateCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error {
4393	if v == nil {
4394		return fmt.Errorf("unsupported serialization of nil %T", v)
4395	}
4396
4397	if v.Id == nil || len(*v.Id) == 0 {
4398		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4399	}
4400	if v.Id != nil {
4401		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4402			return err
4403		}
4404	}
4405
4406	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4407		locationName := "If-Match"
4408		encoder.SetHeader(locationName).String(*v.IfMatch)
4409	}
4410
4411	return nil
4412}
4413
4414type awsRestxml_serializeOpUpdateDistribution struct {
4415}
4416
4417func (*awsRestxml_serializeOpUpdateDistribution) ID() string {
4418	return "OperationSerializer"
4419}
4420
4421func (m *awsRestxml_serializeOpUpdateDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4422	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4423) {
4424	request, ok := in.Request.(*smithyhttp.Request)
4425	if !ok {
4426		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4427	}
4428
4429	input, ok := in.Parameters.(*UpdateDistributionInput)
4430	_ = input
4431	if !ok {
4432		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4433	}
4434
4435	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}/config")
4436	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4437	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4438	request.Method = "PUT"
4439	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4440	if err != nil {
4441		return out, metadata, &smithy.SerializationError{Err: err}
4442	}
4443
4444	if err := awsRestxml_serializeOpHttpBindingsUpdateDistributionInput(input, restEncoder); err != nil {
4445		return out, metadata, &smithy.SerializationError{Err: err}
4446	}
4447
4448	if input.DistributionConfig != nil {
4449		if !restEncoder.HasHeader("Content-Type") {
4450			restEncoder.SetHeader("Content-Type").String("application/xml")
4451		}
4452
4453		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4454		payloadRootAttr := []smithyxml.Attr{}
4455		payloadRoot := smithyxml.StartElement{
4456			Name: smithyxml.Name{
4457				Local: "DistributionConfig",
4458			},
4459			Attr: payloadRootAttr,
4460		}
4461		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4462		if err := awsRestxml_serializeDocumentDistributionConfig(input.DistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4463			return out, metadata, &smithy.SerializationError{Err: err}
4464		}
4465		payload := bytes.NewReader(xmlEncoder.Bytes())
4466		if request, err = request.SetStream(payload); err != nil {
4467			return out, metadata, &smithy.SerializationError{Err: err}
4468		}
4469	}
4470
4471	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4472		return out, metadata, &smithy.SerializationError{Err: err}
4473	}
4474	in.Request = request
4475
4476	return next.HandleSerialize(ctx, in)
4477}
4478func awsRestxml_serializeOpHttpBindingsUpdateDistributionInput(v *UpdateDistributionInput, encoder *httpbinding.Encoder) error {
4479	if v == nil {
4480		return fmt.Errorf("unsupported serialization of nil %T", v)
4481	}
4482
4483	if v.Id == nil || len(*v.Id) == 0 {
4484		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4485	}
4486	if v.Id != nil {
4487		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4488			return err
4489		}
4490	}
4491
4492	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4493		locationName := "If-Match"
4494		encoder.SetHeader(locationName).String(*v.IfMatch)
4495	}
4496
4497	return nil
4498}
4499
4500type awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig struct {
4501}
4502
4503func (*awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig) ID() string {
4504	return "OperationSerializer"
4505}
4506
4507func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4508	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4509) {
4510	request, ok := in.Request.(*smithyhttp.Request)
4511	if !ok {
4512		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4513	}
4514
4515	input, ok := in.Parameters.(*UpdateFieldLevelEncryptionConfigInput)
4516	_ = input
4517	if !ok {
4518		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4519	}
4520
4521	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}/config")
4522	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4523	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4524	request.Method = "PUT"
4525	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4526	if err != nil {
4527		return out, metadata, &smithy.SerializationError{Err: err}
4528	}
4529
4530	if err := awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionConfigInput(input, restEncoder); err != nil {
4531		return out, metadata, &smithy.SerializationError{Err: err}
4532	}
4533
4534	if input.FieldLevelEncryptionConfig != nil {
4535		if !restEncoder.HasHeader("Content-Type") {
4536			restEncoder.SetHeader("Content-Type").String("application/xml")
4537		}
4538
4539		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4540		payloadRootAttr := []smithyxml.Attr{}
4541		payloadRoot := smithyxml.StartElement{
4542			Name: smithyxml.Name{
4543				Local: "FieldLevelEncryptionConfig",
4544			},
4545			Attr: payloadRootAttr,
4546		}
4547		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4548		if err := awsRestxml_serializeDocumentFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4549			return out, metadata, &smithy.SerializationError{Err: err}
4550		}
4551		payload := bytes.NewReader(xmlEncoder.Bytes())
4552		if request, err = request.SetStream(payload); err != nil {
4553			return out, metadata, &smithy.SerializationError{Err: err}
4554		}
4555	}
4556
4557	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4558		return out, metadata, &smithy.SerializationError{Err: err}
4559	}
4560	in.Request = request
4561
4562	return next.HandleSerialize(ctx, in)
4563}
4564func awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionConfigInput(v *UpdateFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error {
4565	if v == nil {
4566		return fmt.Errorf("unsupported serialization of nil %T", v)
4567	}
4568
4569	if v.Id == nil || len(*v.Id) == 0 {
4570		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4571	}
4572	if v.Id != nil {
4573		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4574			return err
4575		}
4576	}
4577
4578	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4579		locationName := "If-Match"
4580		encoder.SetHeader(locationName).String(*v.IfMatch)
4581	}
4582
4583	return nil
4584}
4585
4586type awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile struct {
4587}
4588
4589func (*awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile) ID() string {
4590	return "OperationSerializer"
4591}
4592
4593func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4594	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4595) {
4596	request, ok := in.Request.(*smithyhttp.Request)
4597	if !ok {
4598		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4599	}
4600
4601	input, ok := in.Parameters.(*UpdateFieldLevelEncryptionProfileInput)
4602	_ = input
4603	if !ok {
4604		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4605	}
4606
4607	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}/config")
4608	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4609	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4610	request.Method = "PUT"
4611	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4612	if err != nil {
4613		return out, metadata, &smithy.SerializationError{Err: err}
4614	}
4615
4616	if err := awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionProfileInput(input, restEncoder); err != nil {
4617		return out, metadata, &smithy.SerializationError{Err: err}
4618	}
4619
4620	if input.FieldLevelEncryptionProfileConfig != nil {
4621		if !restEncoder.HasHeader("Content-Type") {
4622			restEncoder.SetHeader("Content-Type").String("application/xml")
4623		}
4624
4625		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4626		payloadRootAttr := []smithyxml.Attr{}
4627		payloadRoot := smithyxml.StartElement{
4628			Name: smithyxml.Name{
4629				Local: "FieldLevelEncryptionProfileConfig",
4630			},
4631			Attr: payloadRootAttr,
4632		}
4633		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4634		if err := awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4635			return out, metadata, &smithy.SerializationError{Err: err}
4636		}
4637		payload := bytes.NewReader(xmlEncoder.Bytes())
4638		if request, err = request.SetStream(payload); err != nil {
4639			return out, metadata, &smithy.SerializationError{Err: err}
4640		}
4641	}
4642
4643	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4644		return out, metadata, &smithy.SerializationError{Err: err}
4645	}
4646	in.Request = request
4647
4648	return next.HandleSerialize(ctx, in)
4649}
4650func awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionProfileInput(v *UpdateFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error {
4651	if v == nil {
4652		return fmt.Errorf("unsupported serialization of nil %T", v)
4653	}
4654
4655	if v.Id == nil || len(*v.Id) == 0 {
4656		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4657	}
4658	if v.Id != nil {
4659		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4660			return err
4661		}
4662	}
4663
4664	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4665		locationName := "If-Match"
4666		encoder.SetHeader(locationName).String(*v.IfMatch)
4667	}
4668
4669	return nil
4670}
4671
4672type awsRestxml_serializeOpUpdateKeyGroup struct {
4673}
4674
4675func (*awsRestxml_serializeOpUpdateKeyGroup) ID() string {
4676	return "OperationSerializer"
4677}
4678
4679func (m *awsRestxml_serializeOpUpdateKeyGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4680	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4681) {
4682	request, ok := in.Request.(*smithyhttp.Request)
4683	if !ok {
4684		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4685	}
4686
4687	input, ok := in.Parameters.(*UpdateKeyGroupInput)
4688	_ = input
4689	if !ok {
4690		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4691	}
4692
4693	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}")
4694	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4695	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4696	request.Method = "PUT"
4697	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4698	if err != nil {
4699		return out, metadata, &smithy.SerializationError{Err: err}
4700	}
4701
4702	if err := awsRestxml_serializeOpHttpBindingsUpdateKeyGroupInput(input, restEncoder); err != nil {
4703		return out, metadata, &smithy.SerializationError{Err: err}
4704	}
4705
4706	if input.KeyGroupConfig != nil {
4707		if !restEncoder.HasHeader("Content-Type") {
4708			restEncoder.SetHeader("Content-Type").String("application/xml")
4709		}
4710
4711		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4712		payloadRootAttr := []smithyxml.Attr{}
4713		payloadRoot := smithyxml.StartElement{
4714			Name: smithyxml.Name{
4715				Local: "KeyGroupConfig",
4716			},
4717			Attr: payloadRootAttr,
4718		}
4719		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4720		if err := awsRestxml_serializeDocumentKeyGroupConfig(input.KeyGroupConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4721			return out, metadata, &smithy.SerializationError{Err: err}
4722		}
4723		payload := bytes.NewReader(xmlEncoder.Bytes())
4724		if request, err = request.SetStream(payload); err != nil {
4725			return out, metadata, &smithy.SerializationError{Err: err}
4726		}
4727	}
4728
4729	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4730		return out, metadata, &smithy.SerializationError{Err: err}
4731	}
4732	in.Request = request
4733
4734	return next.HandleSerialize(ctx, in)
4735}
4736func awsRestxml_serializeOpHttpBindingsUpdateKeyGroupInput(v *UpdateKeyGroupInput, encoder *httpbinding.Encoder) error {
4737	if v == nil {
4738		return fmt.Errorf("unsupported serialization of nil %T", v)
4739	}
4740
4741	if v.Id == nil || len(*v.Id) == 0 {
4742		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4743	}
4744	if v.Id != nil {
4745		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4746			return err
4747		}
4748	}
4749
4750	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4751		locationName := "If-Match"
4752		encoder.SetHeader(locationName).String(*v.IfMatch)
4753	}
4754
4755	return nil
4756}
4757
4758type awsRestxml_serializeOpUpdateOriginRequestPolicy struct {
4759}
4760
4761func (*awsRestxml_serializeOpUpdateOriginRequestPolicy) ID() string {
4762	return "OperationSerializer"
4763}
4764
4765func (m *awsRestxml_serializeOpUpdateOriginRequestPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4766	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4767) {
4768	request, ok := in.Request.(*smithyhttp.Request)
4769	if !ok {
4770		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4771	}
4772
4773	input, ok := in.Parameters.(*UpdateOriginRequestPolicyInput)
4774	_ = input
4775	if !ok {
4776		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4777	}
4778
4779	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}")
4780	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4781	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4782	request.Method = "PUT"
4783	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4784	if err != nil {
4785		return out, metadata, &smithy.SerializationError{Err: err}
4786	}
4787
4788	if err := awsRestxml_serializeOpHttpBindingsUpdateOriginRequestPolicyInput(input, restEncoder); err != nil {
4789		return out, metadata, &smithy.SerializationError{Err: err}
4790	}
4791
4792	if input.OriginRequestPolicyConfig != nil {
4793		if !restEncoder.HasHeader("Content-Type") {
4794			restEncoder.SetHeader("Content-Type").String("application/xml")
4795		}
4796
4797		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4798		payloadRootAttr := []smithyxml.Attr{}
4799		payloadRoot := smithyxml.StartElement{
4800			Name: smithyxml.Name{
4801				Local: "OriginRequestPolicyConfig",
4802			},
4803			Attr: payloadRootAttr,
4804		}
4805		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4806		if err := awsRestxml_serializeDocumentOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4807			return out, metadata, &smithy.SerializationError{Err: err}
4808		}
4809		payload := bytes.NewReader(xmlEncoder.Bytes())
4810		if request, err = request.SetStream(payload); err != nil {
4811			return out, metadata, &smithy.SerializationError{Err: err}
4812		}
4813	}
4814
4815	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4816		return out, metadata, &smithy.SerializationError{Err: err}
4817	}
4818	in.Request = request
4819
4820	return next.HandleSerialize(ctx, in)
4821}
4822func awsRestxml_serializeOpHttpBindingsUpdateOriginRequestPolicyInput(v *UpdateOriginRequestPolicyInput, encoder *httpbinding.Encoder) error {
4823	if v == nil {
4824		return fmt.Errorf("unsupported serialization of nil %T", v)
4825	}
4826
4827	if v.Id == nil || len(*v.Id) == 0 {
4828		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4829	}
4830	if v.Id != nil {
4831		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4832			return err
4833		}
4834	}
4835
4836	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4837		locationName := "If-Match"
4838		encoder.SetHeader(locationName).String(*v.IfMatch)
4839	}
4840
4841	return nil
4842}
4843
4844type awsRestxml_serializeOpUpdatePublicKey struct {
4845}
4846
4847func (*awsRestxml_serializeOpUpdatePublicKey) ID() string {
4848	return "OperationSerializer"
4849}
4850
4851func (m *awsRestxml_serializeOpUpdatePublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4852	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4853) {
4854	request, ok := in.Request.(*smithyhttp.Request)
4855	if !ok {
4856		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4857	}
4858
4859	input, ok := in.Parameters.(*UpdatePublicKeyInput)
4860	_ = input
4861	if !ok {
4862		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4863	}
4864
4865	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}/config")
4866	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4867	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4868	request.Method = "PUT"
4869	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4870	if err != nil {
4871		return out, metadata, &smithy.SerializationError{Err: err}
4872	}
4873
4874	if err := awsRestxml_serializeOpHttpBindingsUpdatePublicKeyInput(input, restEncoder); err != nil {
4875		return out, metadata, &smithy.SerializationError{Err: err}
4876	}
4877
4878	if input.PublicKeyConfig != nil {
4879		if !restEncoder.HasHeader("Content-Type") {
4880			restEncoder.SetHeader("Content-Type").String("application/xml")
4881		}
4882
4883		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4884		payloadRootAttr := []smithyxml.Attr{}
4885		payloadRoot := smithyxml.StartElement{
4886			Name: smithyxml.Name{
4887				Local: "PublicKeyConfig",
4888			},
4889			Attr: payloadRootAttr,
4890		}
4891		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4892		if err := awsRestxml_serializeDocumentPublicKeyConfig(input.PublicKeyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
4893			return out, metadata, &smithy.SerializationError{Err: err}
4894		}
4895		payload := bytes.NewReader(xmlEncoder.Bytes())
4896		if request, err = request.SetStream(payload); err != nil {
4897			return out, metadata, &smithy.SerializationError{Err: err}
4898		}
4899	}
4900
4901	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4902		return out, metadata, &smithy.SerializationError{Err: err}
4903	}
4904	in.Request = request
4905
4906	return next.HandleSerialize(ctx, in)
4907}
4908func awsRestxml_serializeOpHttpBindingsUpdatePublicKeyInput(v *UpdatePublicKeyInput, encoder *httpbinding.Encoder) error {
4909	if v == nil {
4910		return fmt.Errorf("unsupported serialization of nil %T", v)
4911	}
4912
4913	if v.Id == nil || len(*v.Id) == 0 {
4914		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
4915	}
4916	if v.Id != nil {
4917		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
4918			return err
4919		}
4920	}
4921
4922	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
4923		locationName := "If-Match"
4924		encoder.SetHeader(locationName).String(*v.IfMatch)
4925	}
4926
4927	return nil
4928}
4929
4930type awsRestxml_serializeOpUpdateRealtimeLogConfig struct {
4931}
4932
4933func (*awsRestxml_serializeOpUpdateRealtimeLogConfig) ID() string {
4934	return "OperationSerializer"
4935}
4936
4937func (m *awsRestxml_serializeOpUpdateRealtimeLogConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
4938	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
4939) {
4940	request, ok := in.Request.(*smithyhttp.Request)
4941	if !ok {
4942		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
4943	}
4944
4945	input, ok := in.Parameters.(*UpdateRealtimeLogConfigInput)
4946	_ = input
4947	if !ok {
4948		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
4949	}
4950
4951	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config")
4952	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
4953	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
4954	request.Method = "PUT"
4955	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
4956	if err != nil {
4957		return out, metadata, &smithy.SerializationError{Err: err}
4958	}
4959
4960	restEncoder.SetHeader("Content-Type").String("application/xml")
4961
4962	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
4963	rootAttr := []smithyxml.Attr{}
4964	root := smithyxml.StartElement{
4965		Name: smithyxml.Name{
4966			Local: "UpdateRealtimeLogConfigRequest",
4967		},
4968		Attr: rootAttr,
4969	}
4970	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
4971	if err := awsRestxml_serializeOpDocumentUpdateRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
4972		return out, metadata, &smithy.SerializationError{Err: err}
4973	}
4974	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
4975		return out, metadata, &smithy.SerializationError{Err: err}
4976	}
4977
4978	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
4979		return out, metadata, &smithy.SerializationError{Err: err}
4980	}
4981	in.Request = request
4982
4983	return next.HandleSerialize(ctx, in)
4984}
4985func awsRestxml_serializeOpHttpBindingsUpdateRealtimeLogConfigInput(v *UpdateRealtimeLogConfigInput, encoder *httpbinding.Encoder) error {
4986	if v == nil {
4987		return fmt.Errorf("unsupported serialization of nil %T", v)
4988	}
4989
4990	return nil
4991}
4992
4993func awsRestxml_serializeOpDocumentUpdateRealtimeLogConfigInput(v *UpdateRealtimeLogConfigInput, value smithyxml.Value) error {
4994	defer value.Close()
4995	if v.ARN != nil {
4996		rootAttr := []smithyxml.Attr{}
4997		root := smithyxml.StartElement{
4998			Name: smithyxml.Name{
4999				Local: "ARN",
5000			},
5001			Attr: rootAttr,
5002		}
5003		el := value.MemberElement(root)
5004		el.String(*v.ARN)
5005	}
5006	if v.EndPoints != nil {
5007		rootAttr := []smithyxml.Attr{}
5008		root := smithyxml.StartElement{
5009			Name: smithyxml.Name{
5010				Local: "EndPoints",
5011			},
5012			Attr: rootAttr,
5013		}
5014		el := value.MemberElement(root)
5015		if err := awsRestxml_serializeDocumentEndPointList(v.EndPoints, el); err != nil {
5016			return err
5017		}
5018	}
5019	if v.Fields != nil {
5020		rootAttr := []smithyxml.Attr{}
5021		root := smithyxml.StartElement{
5022			Name: smithyxml.Name{
5023				Local: "Fields",
5024			},
5025			Attr: rootAttr,
5026		}
5027		el := value.MemberElement(root)
5028		if err := awsRestxml_serializeDocumentFieldList(v.Fields, el); err != nil {
5029			return err
5030		}
5031	}
5032	if v.Name != nil {
5033		rootAttr := []smithyxml.Attr{}
5034		root := smithyxml.StartElement{
5035			Name: smithyxml.Name{
5036				Local: "Name",
5037			},
5038			Attr: rootAttr,
5039		}
5040		el := value.MemberElement(root)
5041		el.String(*v.Name)
5042	}
5043	if v.SamplingRate != nil {
5044		rootAttr := []smithyxml.Attr{}
5045		root := smithyxml.StartElement{
5046			Name: smithyxml.Name{
5047				Local: "SamplingRate",
5048			},
5049			Attr: rootAttr,
5050		}
5051		el := value.MemberElement(root)
5052		el.Long(*v.SamplingRate)
5053	}
5054	return nil
5055}
5056
5057type awsRestxml_serializeOpUpdateStreamingDistribution struct {
5058}
5059
5060func (*awsRestxml_serializeOpUpdateStreamingDistribution) ID() string {
5061	return "OperationSerializer"
5062}
5063
5064func (m *awsRestxml_serializeOpUpdateStreamingDistribution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
5065	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
5066) {
5067	request, ok := in.Request.(*smithyhttp.Request)
5068	if !ok {
5069		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
5070	}
5071
5072	input, ok := in.Parameters.(*UpdateStreamingDistributionInput)
5073	_ = input
5074	if !ok {
5075		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
5076	}
5077
5078	opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config")
5079	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
5080	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
5081	request.Method = "PUT"
5082	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
5083	if err != nil {
5084		return out, metadata, &smithy.SerializationError{Err: err}
5085	}
5086
5087	if err := awsRestxml_serializeOpHttpBindingsUpdateStreamingDistributionInput(input, restEncoder); err != nil {
5088		return out, metadata, &smithy.SerializationError{Err: err}
5089	}
5090
5091	if input.StreamingDistributionConfig != nil {
5092		if !restEncoder.HasHeader("Content-Type") {
5093			restEncoder.SetHeader("Content-Type").String("application/xml")
5094		}
5095
5096		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
5097		payloadRootAttr := []smithyxml.Attr{}
5098		payloadRoot := smithyxml.StartElement{
5099			Name: smithyxml.Name{
5100				Local: "StreamingDistributionConfig",
5101			},
5102			Attr: payloadRootAttr,
5103		}
5104		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/"))
5105		if err := awsRestxml_serializeDocumentStreamingDistributionConfig(input.StreamingDistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil {
5106			return out, metadata, &smithy.SerializationError{Err: err}
5107		}
5108		payload := bytes.NewReader(xmlEncoder.Bytes())
5109		if request, err = request.SetStream(payload); err != nil {
5110			return out, metadata, &smithy.SerializationError{Err: err}
5111		}
5112	}
5113
5114	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
5115		return out, metadata, &smithy.SerializationError{Err: err}
5116	}
5117	in.Request = request
5118
5119	return next.HandleSerialize(ctx, in)
5120}
5121func awsRestxml_serializeOpHttpBindingsUpdateStreamingDistributionInput(v *UpdateStreamingDistributionInput, encoder *httpbinding.Encoder) error {
5122	if v == nil {
5123		return fmt.Errorf("unsupported serialization of nil %T", v)
5124	}
5125
5126	if v.Id == nil || len(*v.Id) == 0 {
5127		return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
5128	}
5129	if v.Id != nil {
5130		if err := encoder.SetURI("Id").String(*v.Id); err != nil {
5131			return err
5132		}
5133	}
5134
5135	if v.IfMatch != nil && len(*v.IfMatch) > 0 {
5136		locationName := "If-Match"
5137		encoder.SetHeader(locationName).String(*v.IfMatch)
5138	}
5139
5140	return nil
5141}
5142
5143func awsRestxml_serializeDocumentAliases(v *types.Aliases, value smithyxml.Value) error {
5144	defer value.Close()
5145	if v.Items != nil {
5146		rootAttr := []smithyxml.Attr{}
5147		root := smithyxml.StartElement{
5148			Name: smithyxml.Name{
5149				Local: "Items",
5150			},
5151			Attr: rootAttr,
5152		}
5153		el := value.MemberElement(root)
5154		if err := awsRestxml_serializeDocumentAliasList(v.Items, el); err != nil {
5155			return err
5156		}
5157	}
5158	if v.Quantity != nil {
5159		rootAttr := []smithyxml.Attr{}
5160		root := smithyxml.StartElement{
5161			Name: smithyxml.Name{
5162				Local: "Quantity",
5163			},
5164			Attr: rootAttr,
5165		}
5166		el := value.MemberElement(root)
5167		el.Integer(*v.Quantity)
5168	}
5169	return nil
5170}
5171
5172func awsRestxml_serializeDocumentAliasList(v []string, value smithyxml.Value) error {
5173	var array *smithyxml.Array
5174	if !value.IsFlattened() {
5175		defer value.Close()
5176	}
5177	customMemberNameAttr := []smithyxml.Attr{}
5178	customMemberName := smithyxml.StartElement{
5179		Name: smithyxml.Name{
5180			Local: "CNAME",
5181		},
5182		Attr: customMemberNameAttr,
5183	}
5184	array = value.ArrayWithCustomName(customMemberName)
5185	for i := range v {
5186		am := array.Member()
5187		am.String(v[i])
5188	}
5189	return nil
5190}
5191
5192func awsRestxml_serializeDocumentAllowedMethods(v *types.AllowedMethods, value smithyxml.Value) error {
5193	defer value.Close()
5194	if v.CachedMethods != nil {
5195		rootAttr := []smithyxml.Attr{}
5196		root := smithyxml.StartElement{
5197			Name: smithyxml.Name{
5198				Local: "CachedMethods",
5199			},
5200			Attr: rootAttr,
5201		}
5202		el := value.MemberElement(root)
5203		if err := awsRestxml_serializeDocumentCachedMethods(v.CachedMethods, el); err != nil {
5204			return err
5205		}
5206	}
5207	if v.Items != nil {
5208		rootAttr := []smithyxml.Attr{}
5209		root := smithyxml.StartElement{
5210			Name: smithyxml.Name{
5211				Local: "Items",
5212			},
5213			Attr: rootAttr,
5214		}
5215		el := value.MemberElement(root)
5216		if err := awsRestxml_serializeDocumentMethodsList(v.Items, el); err != nil {
5217			return err
5218		}
5219	}
5220	if v.Quantity != nil {
5221		rootAttr := []smithyxml.Attr{}
5222		root := smithyxml.StartElement{
5223			Name: smithyxml.Name{
5224				Local: "Quantity",
5225			},
5226			Attr: rootAttr,
5227		}
5228		el := value.MemberElement(root)
5229		el.Integer(*v.Quantity)
5230	}
5231	return nil
5232}
5233
5234func awsRestxml_serializeDocumentAwsAccountNumberList(v []string, value smithyxml.Value) error {
5235	var array *smithyxml.Array
5236	if !value.IsFlattened() {
5237		defer value.Close()
5238	}
5239	customMemberNameAttr := []smithyxml.Attr{}
5240	customMemberName := smithyxml.StartElement{
5241		Name: smithyxml.Name{
5242			Local: "AwsAccountNumber",
5243		},
5244		Attr: customMemberNameAttr,
5245	}
5246	array = value.ArrayWithCustomName(customMemberName)
5247	for i := range v {
5248		am := array.Member()
5249		am.String(v[i])
5250	}
5251	return nil
5252}
5253
5254func awsRestxml_serializeDocumentCacheBehavior(v *types.CacheBehavior, value smithyxml.Value) error {
5255	defer value.Close()
5256	if v.AllowedMethods != nil {
5257		rootAttr := []smithyxml.Attr{}
5258		root := smithyxml.StartElement{
5259			Name: smithyxml.Name{
5260				Local: "AllowedMethods",
5261			},
5262			Attr: rootAttr,
5263		}
5264		el := value.MemberElement(root)
5265		if err := awsRestxml_serializeDocumentAllowedMethods(v.AllowedMethods, el); err != nil {
5266			return err
5267		}
5268	}
5269	if v.CachePolicyId != nil {
5270		rootAttr := []smithyxml.Attr{}
5271		root := smithyxml.StartElement{
5272			Name: smithyxml.Name{
5273				Local: "CachePolicyId",
5274			},
5275			Attr: rootAttr,
5276		}
5277		el := value.MemberElement(root)
5278		el.String(*v.CachePolicyId)
5279	}
5280	if v.Compress != nil {
5281		rootAttr := []smithyxml.Attr{}
5282		root := smithyxml.StartElement{
5283			Name: smithyxml.Name{
5284				Local: "Compress",
5285			},
5286			Attr: rootAttr,
5287		}
5288		el := value.MemberElement(root)
5289		el.Boolean(*v.Compress)
5290	}
5291	if v.DefaultTTL != nil {
5292		rootAttr := []smithyxml.Attr{}
5293		root := smithyxml.StartElement{
5294			Name: smithyxml.Name{
5295				Local: "DefaultTTL",
5296			},
5297			Attr: rootAttr,
5298		}
5299		el := value.MemberElement(root)
5300		el.Long(*v.DefaultTTL)
5301	}
5302	if v.FieldLevelEncryptionId != nil {
5303		rootAttr := []smithyxml.Attr{}
5304		root := smithyxml.StartElement{
5305			Name: smithyxml.Name{
5306				Local: "FieldLevelEncryptionId",
5307			},
5308			Attr: rootAttr,
5309		}
5310		el := value.MemberElement(root)
5311		el.String(*v.FieldLevelEncryptionId)
5312	}
5313	if v.ForwardedValues != nil {
5314		rootAttr := []smithyxml.Attr{}
5315		root := smithyxml.StartElement{
5316			Name: smithyxml.Name{
5317				Local: "ForwardedValues",
5318			},
5319			Attr: rootAttr,
5320		}
5321		el := value.MemberElement(root)
5322		if err := awsRestxml_serializeDocumentForwardedValues(v.ForwardedValues, el); err != nil {
5323			return err
5324		}
5325	}
5326	if v.LambdaFunctionAssociations != nil {
5327		rootAttr := []smithyxml.Attr{}
5328		root := smithyxml.StartElement{
5329			Name: smithyxml.Name{
5330				Local: "LambdaFunctionAssociations",
5331			},
5332			Attr: rootAttr,
5333		}
5334		el := value.MemberElement(root)
5335		if err := awsRestxml_serializeDocumentLambdaFunctionAssociations(v.LambdaFunctionAssociations, el); err != nil {
5336			return err
5337		}
5338	}
5339	if v.MaxTTL != nil {
5340		rootAttr := []smithyxml.Attr{}
5341		root := smithyxml.StartElement{
5342			Name: smithyxml.Name{
5343				Local: "MaxTTL",
5344			},
5345			Attr: rootAttr,
5346		}
5347		el := value.MemberElement(root)
5348		el.Long(*v.MaxTTL)
5349	}
5350	if v.MinTTL != nil {
5351		rootAttr := []smithyxml.Attr{}
5352		root := smithyxml.StartElement{
5353			Name: smithyxml.Name{
5354				Local: "MinTTL",
5355			},
5356			Attr: rootAttr,
5357		}
5358		el := value.MemberElement(root)
5359		el.Long(*v.MinTTL)
5360	}
5361	if v.OriginRequestPolicyId != nil {
5362		rootAttr := []smithyxml.Attr{}
5363		root := smithyxml.StartElement{
5364			Name: smithyxml.Name{
5365				Local: "OriginRequestPolicyId",
5366			},
5367			Attr: rootAttr,
5368		}
5369		el := value.MemberElement(root)
5370		el.String(*v.OriginRequestPolicyId)
5371	}
5372	if v.PathPattern != nil {
5373		rootAttr := []smithyxml.Attr{}
5374		root := smithyxml.StartElement{
5375			Name: smithyxml.Name{
5376				Local: "PathPattern",
5377			},
5378			Attr: rootAttr,
5379		}
5380		el := value.MemberElement(root)
5381		el.String(*v.PathPattern)
5382	}
5383	if v.RealtimeLogConfigArn != nil {
5384		rootAttr := []smithyxml.Attr{}
5385		root := smithyxml.StartElement{
5386			Name: smithyxml.Name{
5387				Local: "RealtimeLogConfigArn",
5388			},
5389			Attr: rootAttr,
5390		}
5391		el := value.MemberElement(root)
5392		el.String(*v.RealtimeLogConfigArn)
5393	}
5394	if v.SmoothStreaming != nil {
5395		rootAttr := []smithyxml.Attr{}
5396		root := smithyxml.StartElement{
5397			Name: smithyxml.Name{
5398				Local: "SmoothStreaming",
5399			},
5400			Attr: rootAttr,
5401		}
5402		el := value.MemberElement(root)
5403		el.Boolean(*v.SmoothStreaming)
5404	}
5405	if v.TargetOriginId != nil {
5406		rootAttr := []smithyxml.Attr{}
5407		root := smithyxml.StartElement{
5408			Name: smithyxml.Name{
5409				Local: "TargetOriginId",
5410			},
5411			Attr: rootAttr,
5412		}
5413		el := value.MemberElement(root)
5414		el.String(*v.TargetOriginId)
5415	}
5416	if v.TrustedKeyGroups != nil {
5417		rootAttr := []smithyxml.Attr{}
5418		root := smithyxml.StartElement{
5419			Name: smithyxml.Name{
5420				Local: "TrustedKeyGroups",
5421			},
5422			Attr: rootAttr,
5423		}
5424		el := value.MemberElement(root)
5425		if err := awsRestxml_serializeDocumentTrustedKeyGroups(v.TrustedKeyGroups, el); err != nil {
5426			return err
5427		}
5428	}
5429	if v.TrustedSigners != nil {
5430		rootAttr := []smithyxml.Attr{}
5431		root := smithyxml.StartElement{
5432			Name: smithyxml.Name{
5433				Local: "TrustedSigners",
5434			},
5435			Attr: rootAttr,
5436		}
5437		el := value.MemberElement(root)
5438		if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil {
5439			return err
5440		}
5441	}
5442	if len(v.ViewerProtocolPolicy) > 0 {
5443		rootAttr := []smithyxml.Attr{}
5444		root := smithyxml.StartElement{
5445			Name: smithyxml.Name{
5446				Local: "ViewerProtocolPolicy",
5447			},
5448			Attr: rootAttr,
5449		}
5450		el := value.MemberElement(root)
5451		el.String(string(v.ViewerProtocolPolicy))
5452	}
5453	return nil
5454}
5455
5456func awsRestxml_serializeDocumentCacheBehaviorList(v []types.CacheBehavior, value smithyxml.Value) error {
5457	var array *smithyxml.Array
5458	if !value.IsFlattened() {
5459		defer value.Close()
5460	}
5461	customMemberNameAttr := []smithyxml.Attr{}
5462	customMemberName := smithyxml.StartElement{
5463		Name: smithyxml.Name{
5464			Local: "CacheBehavior",
5465		},
5466		Attr: customMemberNameAttr,
5467	}
5468	array = value.ArrayWithCustomName(customMemberName)
5469	for i := range v {
5470		am := array.Member()
5471		if err := awsRestxml_serializeDocumentCacheBehavior(&v[i], am); err != nil {
5472			return err
5473		}
5474	}
5475	return nil
5476}
5477
5478func awsRestxml_serializeDocumentCacheBehaviors(v *types.CacheBehaviors, value smithyxml.Value) error {
5479	defer value.Close()
5480	if v.Items != nil {
5481		rootAttr := []smithyxml.Attr{}
5482		root := smithyxml.StartElement{
5483			Name: smithyxml.Name{
5484				Local: "Items",
5485			},
5486			Attr: rootAttr,
5487		}
5488		el := value.MemberElement(root)
5489		if err := awsRestxml_serializeDocumentCacheBehaviorList(v.Items, el); err != nil {
5490			return err
5491		}
5492	}
5493	if v.Quantity != nil {
5494		rootAttr := []smithyxml.Attr{}
5495		root := smithyxml.StartElement{
5496			Name: smithyxml.Name{
5497				Local: "Quantity",
5498			},
5499			Attr: rootAttr,
5500		}
5501		el := value.MemberElement(root)
5502		el.Integer(*v.Quantity)
5503	}
5504	return nil
5505}
5506
5507func awsRestxml_serializeDocumentCachedMethods(v *types.CachedMethods, value smithyxml.Value) error {
5508	defer value.Close()
5509	if v.Items != nil {
5510		rootAttr := []smithyxml.Attr{}
5511		root := smithyxml.StartElement{
5512			Name: smithyxml.Name{
5513				Local: "Items",
5514			},
5515			Attr: rootAttr,
5516		}
5517		el := value.MemberElement(root)
5518		if err := awsRestxml_serializeDocumentMethodsList(v.Items, el); err != nil {
5519			return err
5520		}
5521	}
5522	if v.Quantity != nil {
5523		rootAttr := []smithyxml.Attr{}
5524		root := smithyxml.StartElement{
5525			Name: smithyxml.Name{
5526				Local: "Quantity",
5527			},
5528			Attr: rootAttr,
5529		}
5530		el := value.MemberElement(root)
5531		el.Integer(*v.Quantity)
5532	}
5533	return nil
5534}
5535
5536func awsRestxml_serializeDocumentCachePolicyConfig(v *types.CachePolicyConfig, value smithyxml.Value) error {
5537	defer value.Close()
5538	if v.Comment != nil {
5539		rootAttr := []smithyxml.Attr{}
5540		root := smithyxml.StartElement{
5541			Name: smithyxml.Name{
5542				Local: "Comment",
5543			},
5544			Attr: rootAttr,
5545		}
5546		el := value.MemberElement(root)
5547		el.String(*v.Comment)
5548	}
5549	if v.DefaultTTL != nil {
5550		rootAttr := []smithyxml.Attr{}
5551		root := smithyxml.StartElement{
5552			Name: smithyxml.Name{
5553				Local: "DefaultTTL",
5554			},
5555			Attr: rootAttr,
5556		}
5557		el := value.MemberElement(root)
5558		el.Long(*v.DefaultTTL)
5559	}
5560	if v.MaxTTL != nil {
5561		rootAttr := []smithyxml.Attr{}
5562		root := smithyxml.StartElement{
5563			Name: smithyxml.Name{
5564				Local: "MaxTTL",
5565			},
5566			Attr: rootAttr,
5567		}
5568		el := value.MemberElement(root)
5569		el.Long(*v.MaxTTL)
5570	}
5571	if v.MinTTL != nil {
5572		rootAttr := []smithyxml.Attr{}
5573		root := smithyxml.StartElement{
5574			Name: smithyxml.Name{
5575				Local: "MinTTL",
5576			},
5577			Attr: rootAttr,
5578		}
5579		el := value.MemberElement(root)
5580		el.Long(*v.MinTTL)
5581	}
5582	if v.Name != nil {
5583		rootAttr := []smithyxml.Attr{}
5584		root := smithyxml.StartElement{
5585			Name: smithyxml.Name{
5586				Local: "Name",
5587			},
5588			Attr: rootAttr,
5589		}
5590		el := value.MemberElement(root)
5591		el.String(*v.Name)
5592	}
5593	if v.ParametersInCacheKeyAndForwardedToOrigin != nil {
5594		rootAttr := []smithyxml.Attr{}
5595		root := smithyxml.StartElement{
5596			Name: smithyxml.Name{
5597				Local: "ParametersInCacheKeyAndForwardedToOrigin",
5598			},
5599			Attr: rootAttr,
5600		}
5601		el := value.MemberElement(root)
5602		if err := awsRestxml_serializeDocumentParametersInCacheKeyAndForwardedToOrigin(v.ParametersInCacheKeyAndForwardedToOrigin, el); err != nil {
5603			return err
5604		}
5605	}
5606	return nil
5607}
5608
5609func awsRestxml_serializeDocumentCachePolicyCookiesConfig(v *types.CachePolicyCookiesConfig, value smithyxml.Value) error {
5610	defer value.Close()
5611	if len(v.CookieBehavior) > 0 {
5612		rootAttr := []smithyxml.Attr{}
5613		root := smithyxml.StartElement{
5614			Name: smithyxml.Name{
5615				Local: "CookieBehavior",
5616			},
5617			Attr: rootAttr,
5618		}
5619		el := value.MemberElement(root)
5620		el.String(string(v.CookieBehavior))
5621	}
5622	if v.Cookies != nil {
5623		rootAttr := []smithyxml.Attr{}
5624		root := smithyxml.StartElement{
5625			Name: smithyxml.Name{
5626				Local: "Cookies",
5627			},
5628			Attr: rootAttr,
5629		}
5630		el := value.MemberElement(root)
5631		if err := awsRestxml_serializeDocumentCookieNames(v.Cookies, el); err != nil {
5632			return err
5633		}
5634	}
5635	return nil
5636}
5637
5638func awsRestxml_serializeDocumentCachePolicyHeadersConfig(v *types.CachePolicyHeadersConfig, value smithyxml.Value) error {
5639	defer value.Close()
5640	if len(v.HeaderBehavior) > 0 {
5641		rootAttr := []smithyxml.Attr{}
5642		root := smithyxml.StartElement{
5643			Name: smithyxml.Name{
5644				Local: "HeaderBehavior",
5645			},
5646			Attr: rootAttr,
5647		}
5648		el := value.MemberElement(root)
5649		el.String(string(v.HeaderBehavior))
5650	}
5651	if v.Headers != nil {
5652		rootAttr := []smithyxml.Attr{}
5653		root := smithyxml.StartElement{
5654			Name: smithyxml.Name{
5655				Local: "Headers",
5656			},
5657			Attr: rootAttr,
5658		}
5659		el := value.MemberElement(root)
5660		if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil {
5661			return err
5662		}
5663	}
5664	return nil
5665}
5666
5667func awsRestxml_serializeDocumentCachePolicyQueryStringsConfig(v *types.CachePolicyQueryStringsConfig, value smithyxml.Value) error {
5668	defer value.Close()
5669	if len(v.QueryStringBehavior) > 0 {
5670		rootAttr := []smithyxml.Attr{}
5671		root := smithyxml.StartElement{
5672			Name: smithyxml.Name{
5673				Local: "QueryStringBehavior",
5674			},
5675			Attr: rootAttr,
5676		}
5677		el := value.MemberElement(root)
5678		el.String(string(v.QueryStringBehavior))
5679	}
5680	if v.QueryStrings != nil {
5681		rootAttr := []smithyxml.Attr{}
5682		root := smithyxml.StartElement{
5683			Name: smithyxml.Name{
5684				Local: "QueryStrings",
5685			},
5686			Attr: rootAttr,
5687		}
5688		el := value.MemberElement(root)
5689		if err := awsRestxml_serializeDocumentQueryStringNames(v.QueryStrings, el); err != nil {
5690			return err
5691		}
5692	}
5693	return nil
5694}
5695
5696func awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(v *types.CloudFrontOriginAccessIdentityConfig, value smithyxml.Value) error {
5697	defer value.Close()
5698	if v.CallerReference != nil {
5699		rootAttr := []smithyxml.Attr{}
5700		root := smithyxml.StartElement{
5701			Name: smithyxml.Name{
5702				Local: "CallerReference",
5703			},
5704			Attr: rootAttr,
5705		}
5706		el := value.MemberElement(root)
5707		el.String(*v.CallerReference)
5708	}
5709	if v.Comment != nil {
5710		rootAttr := []smithyxml.Attr{}
5711		root := smithyxml.StartElement{
5712			Name: smithyxml.Name{
5713				Local: "Comment",
5714			},
5715			Attr: rootAttr,
5716		}
5717		el := value.MemberElement(root)
5718		el.String(*v.Comment)
5719	}
5720	return nil
5721}
5722
5723func awsRestxml_serializeDocumentContentTypeProfile(v *types.ContentTypeProfile, value smithyxml.Value) error {
5724	defer value.Close()
5725	if v.ContentType != nil {
5726		rootAttr := []smithyxml.Attr{}
5727		root := smithyxml.StartElement{
5728			Name: smithyxml.Name{
5729				Local: "ContentType",
5730			},
5731			Attr: rootAttr,
5732		}
5733		el := value.MemberElement(root)
5734		el.String(*v.ContentType)
5735	}
5736	if len(v.Format) > 0 {
5737		rootAttr := []smithyxml.Attr{}
5738		root := smithyxml.StartElement{
5739			Name: smithyxml.Name{
5740				Local: "Format",
5741			},
5742			Attr: rootAttr,
5743		}
5744		el := value.MemberElement(root)
5745		el.String(string(v.Format))
5746	}
5747	if v.ProfileId != nil {
5748		rootAttr := []smithyxml.Attr{}
5749		root := smithyxml.StartElement{
5750			Name: smithyxml.Name{
5751				Local: "ProfileId",
5752			},
5753			Attr: rootAttr,
5754		}
5755		el := value.MemberElement(root)
5756		el.String(*v.ProfileId)
5757	}
5758	return nil
5759}
5760
5761func awsRestxml_serializeDocumentContentTypeProfileConfig(v *types.ContentTypeProfileConfig, value smithyxml.Value) error {
5762	defer value.Close()
5763	if v.ContentTypeProfiles != nil {
5764		rootAttr := []smithyxml.Attr{}
5765		root := smithyxml.StartElement{
5766			Name: smithyxml.Name{
5767				Local: "ContentTypeProfiles",
5768			},
5769			Attr: rootAttr,
5770		}
5771		el := value.MemberElement(root)
5772		if err := awsRestxml_serializeDocumentContentTypeProfiles(v.ContentTypeProfiles, el); err != nil {
5773			return err
5774		}
5775	}
5776	if v.ForwardWhenContentTypeIsUnknown != nil {
5777		rootAttr := []smithyxml.Attr{}
5778		root := smithyxml.StartElement{
5779			Name: smithyxml.Name{
5780				Local: "ForwardWhenContentTypeIsUnknown",
5781			},
5782			Attr: rootAttr,
5783		}
5784		el := value.MemberElement(root)
5785		el.Boolean(*v.ForwardWhenContentTypeIsUnknown)
5786	}
5787	return nil
5788}
5789
5790func awsRestxml_serializeDocumentContentTypeProfileList(v []types.ContentTypeProfile, value smithyxml.Value) error {
5791	var array *smithyxml.Array
5792	if !value.IsFlattened() {
5793		defer value.Close()
5794	}
5795	customMemberNameAttr := []smithyxml.Attr{}
5796	customMemberName := smithyxml.StartElement{
5797		Name: smithyxml.Name{
5798			Local: "ContentTypeProfile",
5799		},
5800		Attr: customMemberNameAttr,
5801	}
5802	array = value.ArrayWithCustomName(customMemberName)
5803	for i := range v {
5804		am := array.Member()
5805		if err := awsRestxml_serializeDocumentContentTypeProfile(&v[i], am); err != nil {
5806			return err
5807		}
5808	}
5809	return nil
5810}
5811
5812func awsRestxml_serializeDocumentContentTypeProfiles(v *types.ContentTypeProfiles, value smithyxml.Value) error {
5813	defer value.Close()
5814	if v.Items != nil {
5815		rootAttr := []smithyxml.Attr{}
5816		root := smithyxml.StartElement{
5817			Name: smithyxml.Name{
5818				Local: "Items",
5819			},
5820			Attr: rootAttr,
5821		}
5822		el := value.MemberElement(root)
5823		if err := awsRestxml_serializeDocumentContentTypeProfileList(v.Items, el); err != nil {
5824			return err
5825		}
5826	}
5827	if v.Quantity != nil {
5828		rootAttr := []smithyxml.Attr{}
5829		root := smithyxml.StartElement{
5830			Name: smithyxml.Name{
5831				Local: "Quantity",
5832			},
5833			Attr: rootAttr,
5834		}
5835		el := value.MemberElement(root)
5836		el.Integer(*v.Quantity)
5837	}
5838	return nil
5839}
5840
5841func awsRestxml_serializeDocumentCookieNameList(v []string, value smithyxml.Value) error {
5842	var array *smithyxml.Array
5843	if !value.IsFlattened() {
5844		defer value.Close()
5845	}
5846	customMemberNameAttr := []smithyxml.Attr{}
5847	customMemberName := smithyxml.StartElement{
5848		Name: smithyxml.Name{
5849			Local: "Name",
5850		},
5851		Attr: customMemberNameAttr,
5852	}
5853	array = value.ArrayWithCustomName(customMemberName)
5854	for i := range v {
5855		am := array.Member()
5856		am.String(v[i])
5857	}
5858	return nil
5859}
5860
5861func awsRestxml_serializeDocumentCookieNames(v *types.CookieNames, value smithyxml.Value) error {
5862	defer value.Close()
5863	if v.Items != nil {
5864		rootAttr := []smithyxml.Attr{}
5865		root := smithyxml.StartElement{
5866			Name: smithyxml.Name{
5867				Local: "Items",
5868			},
5869			Attr: rootAttr,
5870		}
5871		el := value.MemberElement(root)
5872		if err := awsRestxml_serializeDocumentCookieNameList(v.Items, el); err != nil {
5873			return err
5874		}
5875	}
5876	if v.Quantity != nil {
5877		rootAttr := []smithyxml.Attr{}
5878		root := smithyxml.StartElement{
5879			Name: smithyxml.Name{
5880				Local: "Quantity",
5881			},
5882			Attr: rootAttr,
5883		}
5884		el := value.MemberElement(root)
5885		el.Integer(*v.Quantity)
5886	}
5887	return nil
5888}
5889
5890func awsRestxml_serializeDocumentCookiePreference(v *types.CookiePreference, value smithyxml.Value) error {
5891	defer value.Close()
5892	if len(v.Forward) > 0 {
5893		rootAttr := []smithyxml.Attr{}
5894		root := smithyxml.StartElement{
5895			Name: smithyxml.Name{
5896				Local: "Forward",
5897			},
5898			Attr: rootAttr,
5899		}
5900		el := value.MemberElement(root)
5901		el.String(string(v.Forward))
5902	}
5903	if v.WhitelistedNames != nil {
5904		rootAttr := []smithyxml.Attr{}
5905		root := smithyxml.StartElement{
5906			Name: smithyxml.Name{
5907				Local: "WhitelistedNames",
5908			},
5909			Attr: rootAttr,
5910		}
5911		el := value.MemberElement(root)
5912		if err := awsRestxml_serializeDocumentCookieNames(v.WhitelistedNames, el); err != nil {
5913			return err
5914		}
5915	}
5916	return nil
5917}
5918
5919func awsRestxml_serializeDocumentCustomErrorResponse(v *types.CustomErrorResponse, value smithyxml.Value) error {
5920	defer value.Close()
5921	if v.ErrorCachingMinTTL != nil {
5922		rootAttr := []smithyxml.Attr{}
5923		root := smithyxml.StartElement{
5924			Name: smithyxml.Name{
5925				Local: "ErrorCachingMinTTL",
5926			},
5927			Attr: rootAttr,
5928		}
5929		el := value.MemberElement(root)
5930		el.Long(*v.ErrorCachingMinTTL)
5931	}
5932	if v.ErrorCode != nil {
5933		rootAttr := []smithyxml.Attr{}
5934		root := smithyxml.StartElement{
5935			Name: smithyxml.Name{
5936				Local: "ErrorCode",
5937			},
5938			Attr: rootAttr,
5939		}
5940		el := value.MemberElement(root)
5941		el.Integer(*v.ErrorCode)
5942	}
5943	if v.ResponseCode != nil {
5944		rootAttr := []smithyxml.Attr{}
5945		root := smithyxml.StartElement{
5946			Name: smithyxml.Name{
5947				Local: "ResponseCode",
5948			},
5949			Attr: rootAttr,
5950		}
5951		el := value.MemberElement(root)
5952		el.String(*v.ResponseCode)
5953	}
5954	if v.ResponsePagePath != nil {
5955		rootAttr := []smithyxml.Attr{}
5956		root := smithyxml.StartElement{
5957			Name: smithyxml.Name{
5958				Local: "ResponsePagePath",
5959			},
5960			Attr: rootAttr,
5961		}
5962		el := value.MemberElement(root)
5963		el.String(*v.ResponsePagePath)
5964	}
5965	return nil
5966}
5967
5968func awsRestxml_serializeDocumentCustomErrorResponseList(v []types.CustomErrorResponse, value smithyxml.Value) error {
5969	var array *smithyxml.Array
5970	if !value.IsFlattened() {
5971		defer value.Close()
5972	}
5973	customMemberNameAttr := []smithyxml.Attr{}
5974	customMemberName := smithyxml.StartElement{
5975		Name: smithyxml.Name{
5976			Local: "CustomErrorResponse",
5977		},
5978		Attr: customMemberNameAttr,
5979	}
5980	array = value.ArrayWithCustomName(customMemberName)
5981	for i := range v {
5982		am := array.Member()
5983		if err := awsRestxml_serializeDocumentCustomErrorResponse(&v[i], am); err != nil {
5984			return err
5985		}
5986	}
5987	return nil
5988}
5989
5990func awsRestxml_serializeDocumentCustomErrorResponses(v *types.CustomErrorResponses, value smithyxml.Value) error {
5991	defer value.Close()
5992	if v.Items != nil {
5993		rootAttr := []smithyxml.Attr{}
5994		root := smithyxml.StartElement{
5995			Name: smithyxml.Name{
5996				Local: "Items",
5997			},
5998			Attr: rootAttr,
5999		}
6000		el := value.MemberElement(root)
6001		if err := awsRestxml_serializeDocumentCustomErrorResponseList(v.Items, el); err != nil {
6002			return err
6003		}
6004	}
6005	if v.Quantity != nil {
6006		rootAttr := []smithyxml.Attr{}
6007		root := smithyxml.StartElement{
6008			Name: smithyxml.Name{
6009				Local: "Quantity",
6010			},
6011			Attr: rootAttr,
6012		}
6013		el := value.MemberElement(root)
6014		el.Integer(*v.Quantity)
6015	}
6016	return nil
6017}
6018
6019func awsRestxml_serializeDocumentCustomHeaders(v *types.CustomHeaders, value smithyxml.Value) error {
6020	defer value.Close()
6021	if v.Items != nil {
6022		rootAttr := []smithyxml.Attr{}
6023		root := smithyxml.StartElement{
6024			Name: smithyxml.Name{
6025				Local: "Items",
6026			},
6027			Attr: rootAttr,
6028		}
6029		el := value.MemberElement(root)
6030		if err := awsRestxml_serializeDocumentOriginCustomHeadersList(v.Items, el); err != nil {
6031			return err
6032		}
6033	}
6034	if v.Quantity != nil {
6035		rootAttr := []smithyxml.Attr{}
6036		root := smithyxml.StartElement{
6037			Name: smithyxml.Name{
6038				Local: "Quantity",
6039			},
6040			Attr: rootAttr,
6041		}
6042		el := value.MemberElement(root)
6043		el.Integer(*v.Quantity)
6044	}
6045	return nil
6046}
6047
6048func awsRestxml_serializeDocumentCustomOriginConfig(v *types.CustomOriginConfig, value smithyxml.Value) error {
6049	defer value.Close()
6050	if v.HTTPPort != nil {
6051		rootAttr := []smithyxml.Attr{}
6052		root := smithyxml.StartElement{
6053			Name: smithyxml.Name{
6054				Local: "HTTPPort",
6055			},
6056			Attr: rootAttr,
6057		}
6058		el := value.MemberElement(root)
6059		el.Integer(*v.HTTPPort)
6060	}
6061	if v.HTTPSPort != nil {
6062		rootAttr := []smithyxml.Attr{}
6063		root := smithyxml.StartElement{
6064			Name: smithyxml.Name{
6065				Local: "HTTPSPort",
6066			},
6067			Attr: rootAttr,
6068		}
6069		el := value.MemberElement(root)
6070		el.Integer(*v.HTTPSPort)
6071	}
6072	if v.OriginKeepaliveTimeout != nil {
6073		rootAttr := []smithyxml.Attr{}
6074		root := smithyxml.StartElement{
6075			Name: smithyxml.Name{
6076				Local: "OriginKeepaliveTimeout",
6077			},
6078			Attr: rootAttr,
6079		}
6080		el := value.MemberElement(root)
6081		el.Integer(*v.OriginKeepaliveTimeout)
6082	}
6083	if len(v.OriginProtocolPolicy) > 0 {
6084		rootAttr := []smithyxml.Attr{}
6085		root := smithyxml.StartElement{
6086			Name: smithyxml.Name{
6087				Local: "OriginProtocolPolicy",
6088			},
6089			Attr: rootAttr,
6090		}
6091		el := value.MemberElement(root)
6092		el.String(string(v.OriginProtocolPolicy))
6093	}
6094	if v.OriginReadTimeout != nil {
6095		rootAttr := []smithyxml.Attr{}
6096		root := smithyxml.StartElement{
6097			Name: smithyxml.Name{
6098				Local: "OriginReadTimeout",
6099			},
6100			Attr: rootAttr,
6101		}
6102		el := value.MemberElement(root)
6103		el.Integer(*v.OriginReadTimeout)
6104	}
6105	if v.OriginSslProtocols != nil {
6106		rootAttr := []smithyxml.Attr{}
6107		root := smithyxml.StartElement{
6108			Name: smithyxml.Name{
6109				Local: "OriginSslProtocols",
6110			},
6111			Attr: rootAttr,
6112		}
6113		el := value.MemberElement(root)
6114		if err := awsRestxml_serializeDocumentOriginSslProtocols(v.OriginSslProtocols, el); err != nil {
6115			return err
6116		}
6117	}
6118	return nil
6119}
6120
6121func awsRestxml_serializeDocumentDefaultCacheBehavior(v *types.DefaultCacheBehavior, value smithyxml.Value) error {
6122	defer value.Close()
6123	if v.AllowedMethods != nil {
6124		rootAttr := []smithyxml.Attr{}
6125		root := smithyxml.StartElement{
6126			Name: smithyxml.Name{
6127				Local: "AllowedMethods",
6128			},
6129			Attr: rootAttr,
6130		}
6131		el := value.MemberElement(root)
6132		if err := awsRestxml_serializeDocumentAllowedMethods(v.AllowedMethods, el); err != nil {
6133			return err
6134		}
6135	}
6136	if v.CachePolicyId != nil {
6137		rootAttr := []smithyxml.Attr{}
6138		root := smithyxml.StartElement{
6139			Name: smithyxml.Name{
6140				Local: "CachePolicyId",
6141			},
6142			Attr: rootAttr,
6143		}
6144		el := value.MemberElement(root)
6145		el.String(*v.CachePolicyId)
6146	}
6147	if v.Compress != nil {
6148		rootAttr := []smithyxml.Attr{}
6149		root := smithyxml.StartElement{
6150			Name: smithyxml.Name{
6151				Local: "Compress",
6152			},
6153			Attr: rootAttr,
6154		}
6155		el := value.MemberElement(root)
6156		el.Boolean(*v.Compress)
6157	}
6158	if v.DefaultTTL != nil {
6159		rootAttr := []smithyxml.Attr{}
6160		root := smithyxml.StartElement{
6161			Name: smithyxml.Name{
6162				Local: "DefaultTTL",
6163			},
6164			Attr: rootAttr,
6165		}
6166		el := value.MemberElement(root)
6167		el.Long(*v.DefaultTTL)
6168	}
6169	if v.FieldLevelEncryptionId != nil {
6170		rootAttr := []smithyxml.Attr{}
6171		root := smithyxml.StartElement{
6172			Name: smithyxml.Name{
6173				Local: "FieldLevelEncryptionId",
6174			},
6175			Attr: rootAttr,
6176		}
6177		el := value.MemberElement(root)
6178		el.String(*v.FieldLevelEncryptionId)
6179	}
6180	if v.ForwardedValues != nil {
6181		rootAttr := []smithyxml.Attr{}
6182		root := smithyxml.StartElement{
6183			Name: smithyxml.Name{
6184				Local: "ForwardedValues",
6185			},
6186			Attr: rootAttr,
6187		}
6188		el := value.MemberElement(root)
6189		if err := awsRestxml_serializeDocumentForwardedValues(v.ForwardedValues, el); err != nil {
6190			return err
6191		}
6192	}
6193	if v.LambdaFunctionAssociations != nil {
6194		rootAttr := []smithyxml.Attr{}
6195		root := smithyxml.StartElement{
6196			Name: smithyxml.Name{
6197				Local: "LambdaFunctionAssociations",
6198			},
6199			Attr: rootAttr,
6200		}
6201		el := value.MemberElement(root)
6202		if err := awsRestxml_serializeDocumentLambdaFunctionAssociations(v.LambdaFunctionAssociations, el); err != nil {
6203			return err
6204		}
6205	}
6206	if v.MaxTTL != nil {
6207		rootAttr := []smithyxml.Attr{}
6208		root := smithyxml.StartElement{
6209			Name: smithyxml.Name{
6210				Local: "MaxTTL",
6211			},
6212			Attr: rootAttr,
6213		}
6214		el := value.MemberElement(root)
6215		el.Long(*v.MaxTTL)
6216	}
6217	if v.MinTTL != nil {
6218		rootAttr := []smithyxml.Attr{}
6219		root := smithyxml.StartElement{
6220			Name: smithyxml.Name{
6221				Local: "MinTTL",
6222			},
6223			Attr: rootAttr,
6224		}
6225		el := value.MemberElement(root)
6226		el.Long(*v.MinTTL)
6227	}
6228	if v.OriginRequestPolicyId != nil {
6229		rootAttr := []smithyxml.Attr{}
6230		root := smithyxml.StartElement{
6231			Name: smithyxml.Name{
6232				Local: "OriginRequestPolicyId",
6233			},
6234			Attr: rootAttr,
6235		}
6236		el := value.MemberElement(root)
6237		el.String(*v.OriginRequestPolicyId)
6238	}
6239	if v.RealtimeLogConfigArn != nil {
6240		rootAttr := []smithyxml.Attr{}
6241		root := smithyxml.StartElement{
6242			Name: smithyxml.Name{
6243				Local: "RealtimeLogConfigArn",
6244			},
6245			Attr: rootAttr,
6246		}
6247		el := value.MemberElement(root)
6248		el.String(*v.RealtimeLogConfigArn)
6249	}
6250	if v.SmoothStreaming != nil {
6251		rootAttr := []smithyxml.Attr{}
6252		root := smithyxml.StartElement{
6253			Name: smithyxml.Name{
6254				Local: "SmoothStreaming",
6255			},
6256			Attr: rootAttr,
6257		}
6258		el := value.MemberElement(root)
6259		el.Boolean(*v.SmoothStreaming)
6260	}
6261	if v.TargetOriginId != nil {
6262		rootAttr := []smithyxml.Attr{}
6263		root := smithyxml.StartElement{
6264			Name: smithyxml.Name{
6265				Local: "TargetOriginId",
6266			},
6267			Attr: rootAttr,
6268		}
6269		el := value.MemberElement(root)
6270		el.String(*v.TargetOriginId)
6271	}
6272	if v.TrustedKeyGroups != nil {
6273		rootAttr := []smithyxml.Attr{}
6274		root := smithyxml.StartElement{
6275			Name: smithyxml.Name{
6276				Local: "TrustedKeyGroups",
6277			},
6278			Attr: rootAttr,
6279		}
6280		el := value.MemberElement(root)
6281		if err := awsRestxml_serializeDocumentTrustedKeyGroups(v.TrustedKeyGroups, el); err != nil {
6282			return err
6283		}
6284	}
6285	if v.TrustedSigners != nil {
6286		rootAttr := []smithyxml.Attr{}
6287		root := smithyxml.StartElement{
6288			Name: smithyxml.Name{
6289				Local: "TrustedSigners",
6290			},
6291			Attr: rootAttr,
6292		}
6293		el := value.MemberElement(root)
6294		if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil {
6295			return err
6296		}
6297	}
6298	if len(v.ViewerProtocolPolicy) > 0 {
6299		rootAttr := []smithyxml.Attr{}
6300		root := smithyxml.StartElement{
6301			Name: smithyxml.Name{
6302				Local: "ViewerProtocolPolicy",
6303			},
6304			Attr: rootAttr,
6305		}
6306		el := value.MemberElement(root)
6307		el.String(string(v.ViewerProtocolPolicy))
6308	}
6309	return nil
6310}
6311
6312func awsRestxml_serializeDocumentDistributionConfig(v *types.DistributionConfig, value smithyxml.Value) error {
6313	defer value.Close()
6314	if v.Aliases != nil {
6315		rootAttr := []smithyxml.Attr{}
6316		root := smithyxml.StartElement{
6317			Name: smithyxml.Name{
6318				Local: "Aliases",
6319			},
6320			Attr: rootAttr,
6321		}
6322		el := value.MemberElement(root)
6323		if err := awsRestxml_serializeDocumentAliases(v.Aliases, el); err != nil {
6324			return err
6325		}
6326	}
6327	if v.CacheBehaviors != nil {
6328		rootAttr := []smithyxml.Attr{}
6329		root := smithyxml.StartElement{
6330			Name: smithyxml.Name{
6331				Local: "CacheBehaviors",
6332			},
6333			Attr: rootAttr,
6334		}
6335		el := value.MemberElement(root)
6336		if err := awsRestxml_serializeDocumentCacheBehaviors(v.CacheBehaviors, el); err != nil {
6337			return err
6338		}
6339	}
6340	if v.CallerReference != nil {
6341		rootAttr := []smithyxml.Attr{}
6342		root := smithyxml.StartElement{
6343			Name: smithyxml.Name{
6344				Local: "CallerReference",
6345			},
6346			Attr: rootAttr,
6347		}
6348		el := value.MemberElement(root)
6349		el.String(*v.CallerReference)
6350	}
6351	if v.Comment != nil {
6352		rootAttr := []smithyxml.Attr{}
6353		root := smithyxml.StartElement{
6354			Name: smithyxml.Name{
6355				Local: "Comment",
6356			},
6357			Attr: rootAttr,
6358		}
6359		el := value.MemberElement(root)
6360		el.String(*v.Comment)
6361	}
6362	if v.CustomErrorResponses != nil {
6363		rootAttr := []smithyxml.Attr{}
6364		root := smithyxml.StartElement{
6365			Name: smithyxml.Name{
6366				Local: "CustomErrorResponses",
6367			},
6368			Attr: rootAttr,
6369		}
6370		el := value.MemberElement(root)
6371		if err := awsRestxml_serializeDocumentCustomErrorResponses(v.CustomErrorResponses, el); err != nil {
6372			return err
6373		}
6374	}
6375	if v.DefaultCacheBehavior != nil {
6376		rootAttr := []smithyxml.Attr{}
6377		root := smithyxml.StartElement{
6378			Name: smithyxml.Name{
6379				Local: "DefaultCacheBehavior",
6380			},
6381			Attr: rootAttr,
6382		}
6383		el := value.MemberElement(root)
6384		if err := awsRestxml_serializeDocumentDefaultCacheBehavior(v.DefaultCacheBehavior, el); err != nil {
6385			return err
6386		}
6387	}
6388	if v.DefaultRootObject != nil {
6389		rootAttr := []smithyxml.Attr{}
6390		root := smithyxml.StartElement{
6391			Name: smithyxml.Name{
6392				Local: "DefaultRootObject",
6393			},
6394			Attr: rootAttr,
6395		}
6396		el := value.MemberElement(root)
6397		el.String(*v.DefaultRootObject)
6398	}
6399	if v.Enabled != nil {
6400		rootAttr := []smithyxml.Attr{}
6401		root := smithyxml.StartElement{
6402			Name: smithyxml.Name{
6403				Local: "Enabled",
6404			},
6405			Attr: rootAttr,
6406		}
6407		el := value.MemberElement(root)
6408		el.Boolean(*v.Enabled)
6409	}
6410	if len(v.HttpVersion) > 0 {
6411		rootAttr := []smithyxml.Attr{}
6412		root := smithyxml.StartElement{
6413			Name: smithyxml.Name{
6414				Local: "HttpVersion",
6415			},
6416			Attr: rootAttr,
6417		}
6418		el := value.MemberElement(root)
6419		el.String(string(v.HttpVersion))
6420	}
6421	if v.IsIPV6Enabled != nil {
6422		rootAttr := []smithyxml.Attr{}
6423		root := smithyxml.StartElement{
6424			Name: smithyxml.Name{
6425				Local: "IsIPV6Enabled",
6426			},
6427			Attr: rootAttr,
6428		}
6429		el := value.MemberElement(root)
6430		el.Boolean(*v.IsIPV6Enabled)
6431	}
6432	if v.Logging != nil {
6433		rootAttr := []smithyxml.Attr{}
6434		root := smithyxml.StartElement{
6435			Name: smithyxml.Name{
6436				Local: "Logging",
6437			},
6438			Attr: rootAttr,
6439		}
6440		el := value.MemberElement(root)
6441		if err := awsRestxml_serializeDocumentLoggingConfig(v.Logging, el); err != nil {
6442			return err
6443		}
6444	}
6445	if v.OriginGroups != nil {
6446		rootAttr := []smithyxml.Attr{}
6447		root := smithyxml.StartElement{
6448			Name: smithyxml.Name{
6449				Local: "OriginGroups",
6450			},
6451			Attr: rootAttr,
6452		}
6453		el := value.MemberElement(root)
6454		if err := awsRestxml_serializeDocumentOriginGroups(v.OriginGroups, el); err != nil {
6455			return err
6456		}
6457	}
6458	if v.Origins != nil {
6459		rootAttr := []smithyxml.Attr{}
6460		root := smithyxml.StartElement{
6461			Name: smithyxml.Name{
6462				Local: "Origins",
6463			},
6464			Attr: rootAttr,
6465		}
6466		el := value.MemberElement(root)
6467		if err := awsRestxml_serializeDocumentOrigins(v.Origins, el); err != nil {
6468			return err
6469		}
6470	}
6471	if len(v.PriceClass) > 0 {
6472		rootAttr := []smithyxml.Attr{}
6473		root := smithyxml.StartElement{
6474			Name: smithyxml.Name{
6475				Local: "PriceClass",
6476			},
6477			Attr: rootAttr,
6478		}
6479		el := value.MemberElement(root)
6480		el.String(string(v.PriceClass))
6481	}
6482	if v.Restrictions != nil {
6483		rootAttr := []smithyxml.Attr{}
6484		root := smithyxml.StartElement{
6485			Name: smithyxml.Name{
6486				Local: "Restrictions",
6487			},
6488			Attr: rootAttr,
6489		}
6490		el := value.MemberElement(root)
6491		if err := awsRestxml_serializeDocumentRestrictions(v.Restrictions, el); err != nil {
6492			return err
6493		}
6494	}
6495	if v.ViewerCertificate != nil {
6496		rootAttr := []smithyxml.Attr{}
6497		root := smithyxml.StartElement{
6498			Name: smithyxml.Name{
6499				Local: "ViewerCertificate",
6500			},
6501			Attr: rootAttr,
6502		}
6503		el := value.MemberElement(root)
6504		if err := awsRestxml_serializeDocumentViewerCertificate(v.ViewerCertificate, el); err != nil {
6505			return err
6506		}
6507	}
6508	if v.WebACLId != nil {
6509		rootAttr := []smithyxml.Attr{}
6510		root := smithyxml.StartElement{
6511			Name: smithyxml.Name{
6512				Local: "WebACLId",
6513			},
6514			Attr: rootAttr,
6515		}
6516		el := value.MemberElement(root)
6517		el.String(*v.WebACLId)
6518	}
6519	return nil
6520}
6521
6522func awsRestxml_serializeDocumentDistributionConfigWithTags(v *types.DistributionConfigWithTags, value smithyxml.Value) error {
6523	defer value.Close()
6524	if v.DistributionConfig != nil {
6525		rootAttr := []smithyxml.Attr{}
6526		root := smithyxml.StartElement{
6527			Name: smithyxml.Name{
6528				Local: "DistributionConfig",
6529			},
6530			Attr: rootAttr,
6531		}
6532		el := value.MemberElement(root)
6533		if err := awsRestxml_serializeDocumentDistributionConfig(v.DistributionConfig, el); err != nil {
6534			return err
6535		}
6536	}
6537	if v.Tags != nil {
6538		rootAttr := []smithyxml.Attr{}
6539		root := smithyxml.StartElement{
6540			Name: smithyxml.Name{
6541				Local: "Tags",
6542			},
6543			Attr: rootAttr,
6544		}
6545		el := value.MemberElement(root)
6546		if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil {
6547			return err
6548		}
6549	}
6550	return nil
6551}
6552
6553func awsRestxml_serializeDocumentEncryptionEntities(v *types.EncryptionEntities, value smithyxml.Value) error {
6554	defer value.Close()
6555	if v.Items != nil {
6556		rootAttr := []smithyxml.Attr{}
6557		root := smithyxml.StartElement{
6558			Name: smithyxml.Name{
6559				Local: "Items",
6560			},
6561			Attr: rootAttr,
6562		}
6563		el := value.MemberElement(root)
6564		if err := awsRestxml_serializeDocumentEncryptionEntityList(v.Items, el); err != nil {
6565			return err
6566		}
6567	}
6568	if v.Quantity != nil {
6569		rootAttr := []smithyxml.Attr{}
6570		root := smithyxml.StartElement{
6571			Name: smithyxml.Name{
6572				Local: "Quantity",
6573			},
6574			Attr: rootAttr,
6575		}
6576		el := value.MemberElement(root)
6577		el.Integer(*v.Quantity)
6578	}
6579	return nil
6580}
6581
6582func awsRestxml_serializeDocumentEncryptionEntity(v *types.EncryptionEntity, value smithyxml.Value) error {
6583	defer value.Close()
6584	if v.FieldPatterns != nil {
6585		rootAttr := []smithyxml.Attr{}
6586		root := smithyxml.StartElement{
6587			Name: smithyxml.Name{
6588				Local: "FieldPatterns",
6589			},
6590			Attr: rootAttr,
6591		}
6592		el := value.MemberElement(root)
6593		if err := awsRestxml_serializeDocumentFieldPatterns(v.FieldPatterns, el); err != nil {
6594			return err
6595		}
6596	}
6597	if v.ProviderId != nil {
6598		rootAttr := []smithyxml.Attr{}
6599		root := smithyxml.StartElement{
6600			Name: smithyxml.Name{
6601				Local: "ProviderId",
6602			},
6603			Attr: rootAttr,
6604		}
6605		el := value.MemberElement(root)
6606		el.String(*v.ProviderId)
6607	}
6608	if v.PublicKeyId != nil {
6609		rootAttr := []smithyxml.Attr{}
6610		root := smithyxml.StartElement{
6611			Name: smithyxml.Name{
6612				Local: "PublicKeyId",
6613			},
6614			Attr: rootAttr,
6615		}
6616		el := value.MemberElement(root)
6617		el.String(*v.PublicKeyId)
6618	}
6619	return nil
6620}
6621
6622func awsRestxml_serializeDocumentEncryptionEntityList(v []types.EncryptionEntity, value smithyxml.Value) error {
6623	var array *smithyxml.Array
6624	if !value.IsFlattened() {
6625		defer value.Close()
6626	}
6627	customMemberNameAttr := []smithyxml.Attr{}
6628	customMemberName := smithyxml.StartElement{
6629		Name: smithyxml.Name{
6630			Local: "EncryptionEntity",
6631		},
6632		Attr: customMemberNameAttr,
6633	}
6634	array = value.ArrayWithCustomName(customMemberName)
6635	for i := range v {
6636		am := array.Member()
6637		if err := awsRestxml_serializeDocumentEncryptionEntity(&v[i], am); err != nil {
6638			return err
6639		}
6640	}
6641	return nil
6642}
6643
6644func awsRestxml_serializeDocumentEndPoint(v *types.EndPoint, value smithyxml.Value) error {
6645	defer value.Close()
6646	if v.KinesisStreamConfig != nil {
6647		rootAttr := []smithyxml.Attr{}
6648		root := smithyxml.StartElement{
6649			Name: smithyxml.Name{
6650				Local: "KinesisStreamConfig",
6651			},
6652			Attr: rootAttr,
6653		}
6654		el := value.MemberElement(root)
6655		if err := awsRestxml_serializeDocumentKinesisStreamConfig(v.KinesisStreamConfig, el); err != nil {
6656			return err
6657		}
6658	}
6659	if v.StreamType != nil {
6660		rootAttr := []smithyxml.Attr{}
6661		root := smithyxml.StartElement{
6662			Name: smithyxml.Name{
6663				Local: "StreamType",
6664			},
6665			Attr: rootAttr,
6666		}
6667		el := value.MemberElement(root)
6668		el.String(*v.StreamType)
6669	}
6670	return nil
6671}
6672
6673func awsRestxml_serializeDocumentEndPointList(v []types.EndPoint, value smithyxml.Value) error {
6674	var array *smithyxml.Array
6675	if !value.IsFlattened() {
6676		defer value.Close()
6677	}
6678	array = value.Array()
6679	for i := range v {
6680		am := array.Member()
6681		if err := awsRestxml_serializeDocumentEndPoint(&v[i], am); err != nil {
6682			return err
6683		}
6684	}
6685	return nil
6686}
6687
6688func awsRestxml_serializeDocumentFieldLevelEncryptionConfig(v *types.FieldLevelEncryptionConfig, value smithyxml.Value) error {
6689	defer value.Close()
6690	if v.CallerReference != nil {
6691		rootAttr := []smithyxml.Attr{}
6692		root := smithyxml.StartElement{
6693			Name: smithyxml.Name{
6694				Local: "CallerReference",
6695			},
6696			Attr: rootAttr,
6697		}
6698		el := value.MemberElement(root)
6699		el.String(*v.CallerReference)
6700	}
6701	if v.Comment != nil {
6702		rootAttr := []smithyxml.Attr{}
6703		root := smithyxml.StartElement{
6704			Name: smithyxml.Name{
6705				Local: "Comment",
6706			},
6707			Attr: rootAttr,
6708		}
6709		el := value.MemberElement(root)
6710		el.String(*v.Comment)
6711	}
6712	if v.ContentTypeProfileConfig != nil {
6713		rootAttr := []smithyxml.Attr{}
6714		root := smithyxml.StartElement{
6715			Name: smithyxml.Name{
6716				Local: "ContentTypeProfileConfig",
6717			},
6718			Attr: rootAttr,
6719		}
6720		el := value.MemberElement(root)
6721		if err := awsRestxml_serializeDocumentContentTypeProfileConfig(v.ContentTypeProfileConfig, el); err != nil {
6722			return err
6723		}
6724	}
6725	if v.QueryArgProfileConfig != nil {
6726		rootAttr := []smithyxml.Attr{}
6727		root := smithyxml.StartElement{
6728			Name: smithyxml.Name{
6729				Local: "QueryArgProfileConfig",
6730			},
6731			Attr: rootAttr,
6732		}
6733		el := value.MemberElement(root)
6734		if err := awsRestxml_serializeDocumentQueryArgProfileConfig(v.QueryArgProfileConfig, el); err != nil {
6735			return err
6736		}
6737	}
6738	return nil
6739}
6740
6741func awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(v *types.FieldLevelEncryptionProfileConfig, value smithyxml.Value) error {
6742	defer value.Close()
6743	if v.CallerReference != nil {
6744		rootAttr := []smithyxml.Attr{}
6745		root := smithyxml.StartElement{
6746			Name: smithyxml.Name{
6747				Local: "CallerReference",
6748			},
6749			Attr: rootAttr,
6750		}
6751		el := value.MemberElement(root)
6752		el.String(*v.CallerReference)
6753	}
6754	if v.Comment != nil {
6755		rootAttr := []smithyxml.Attr{}
6756		root := smithyxml.StartElement{
6757			Name: smithyxml.Name{
6758				Local: "Comment",
6759			},
6760			Attr: rootAttr,
6761		}
6762		el := value.MemberElement(root)
6763		el.String(*v.Comment)
6764	}
6765	if v.EncryptionEntities != nil {
6766		rootAttr := []smithyxml.Attr{}
6767		root := smithyxml.StartElement{
6768			Name: smithyxml.Name{
6769				Local: "EncryptionEntities",
6770			},
6771			Attr: rootAttr,
6772		}
6773		el := value.MemberElement(root)
6774		if err := awsRestxml_serializeDocumentEncryptionEntities(v.EncryptionEntities, el); err != nil {
6775			return err
6776		}
6777	}
6778	if v.Name != nil {
6779		rootAttr := []smithyxml.Attr{}
6780		root := smithyxml.StartElement{
6781			Name: smithyxml.Name{
6782				Local: "Name",
6783			},
6784			Attr: rootAttr,
6785		}
6786		el := value.MemberElement(root)
6787		el.String(*v.Name)
6788	}
6789	return nil
6790}
6791
6792func awsRestxml_serializeDocumentFieldList(v []string, value smithyxml.Value) error {
6793	var array *smithyxml.Array
6794	if !value.IsFlattened() {
6795		defer value.Close()
6796	}
6797	customMemberNameAttr := []smithyxml.Attr{}
6798	customMemberName := smithyxml.StartElement{
6799		Name: smithyxml.Name{
6800			Local: "Field",
6801		},
6802		Attr: customMemberNameAttr,
6803	}
6804	array = value.ArrayWithCustomName(customMemberName)
6805	for i := range v {
6806		am := array.Member()
6807		am.String(v[i])
6808	}
6809	return nil
6810}
6811
6812func awsRestxml_serializeDocumentFieldPatternList(v []string, value smithyxml.Value) error {
6813	var array *smithyxml.Array
6814	if !value.IsFlattened() {
6815		defer value.Close()
6816	}
6817	customMemberNameAttr := []smithyxml.Attr{}
6818	customMemberName := smithyxml.StartElement{
6819		Name: smithyxml.Name{
6820			Local: "FieldPattern",
6821		},
6822		Attr: customMemberNameAttr,
6823	}
6824	array = value.ArrayWithCustomName(customMemberName)
6825	for i := range v {
6826		am := array.Member()
6827		am.String(v[i])
6828	}
6829	return nil
6830}
6831
6832func awsRestxml_serializeDocumentFieldPatterns(v *types.FieldPatterns, value smithyxml.Value) error {
6833	defer value.Close()
6834	if v.Items != nil {
6835		rootAttr := []smithyxml.Attr{}
6836		root := smithyxml.StartElement{
6837			Name: smithyxml.Name{
6838				Local: "Items",
6839			},
6840			Attr: rootAttr,
6841		}
6842		el := value.MemberElement(root)
6843		if err := awsRestxml_serializeDocumentFieldPatternList(v.Items, el); err != nil {
6844			return err
6845		}
6846	}
6847	if v.Quantity != nil {
6848		rootAttr := []smithyxml.Attr{}
6849		root := smithyxml.StartElement{
6850			Name: smithyxml.Name{
6851				Local: "Quantity",
6852			},
6853			Attr: rootAttr,
6854		}
6855		el := value.MemberElement(root)
6856		el.Integer(*v.Quantity)
6857	}
6858	return nil
6859}
6860
6861func awsRestxml_serializeDocumentForwardedValues(v *types.ForwardedValues, value smithyxml.Value) error {
6862	defer value.Close()
6863	if v.Cookies != nil {
6864		rootAttr := []smithyxml.Attr{}
6865		root := smithyxml.StartElement{
6866			Name: smithyxml.Name{
6867				Local: "Cookies",
6868			},
6869			Attr: rootAttr,
6870		}
6871		el := value.MemberElement(root)
6872		if err := awsRestxml_serializeDocumentCookiePreference(v.Cookies, el); err != nil {
6873			return err
6874		}
6875	}
6876	if v.Headers != nil {
6877		rootAttr := []smithyxml.Attr{}
6878		root := smithyxml.StartElement{
6879			Name: smithyxml.Name{
6880				Local: "Headers",
6881			},
6882			Attr: rootAttr,
6883		}
6884		el := value.MemberElement(root)
6885		if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil {
6886			return err
6887		}
6888	}
6889	if v.QueryString != nil {
6890		rootAttr := []smithyxml.Attr{}
6891		root := smithyxml.StartElement{
6892			Name: smithyxml.Name{
6893				Local: "QueryString",
6894			},
6895			Attr: rootAttr,
6896		}
6897		el := value.MemberElement(root)
6898		el.Boolean(*v.QueryString)
6899	}
6900	if v.QueryStringCacheKeys != nil {
6901		rootAttr := []smithyxml.Attr{}
6902		root := smithyxml.StartElement{
6903			Name: smithyxml.Name{
6904				Local: "QueryStringCacheKeys",
6905			},
6906			Attr: rootAttr,
6907		}
6908		el := value.MemberElement(root)
6909		if err := awsRestxml_serializeDocumentQueryStringCacheKeys(v.QueryStringCacheKeys, el); err != nil {
6910			return err
6911		}
6912	}
6913	return nil
6914}
6915
6916func awsRestxml_serializeDocumentGeoRestriction(v *types.GeoRestriction, value smithyxml.Value) error {
6917	defer value.Close()
6918	if v.Items != nil {
6919		rootAttr := []smithyxml.Attr{}
6920		root := smithyxml.StartElement{
6921			Name: smithyxml.Name{
6922				Local: "Items",
6923			},
6924			Attr: rootAttr,
6925		}
6926		el := value.MemberElement(root)
6927		if err := awsRestxml_serializeDocumentLocationList(v.Items, el); err != nil {
6928			return err
6929		}
6930	}
6931	if v.Quantity != nil {
6932		rootAttr := []smithyxml.Attr{}
6933		root := smithyxml.StartElement{
6934			Name: smithyxml.Name{
6935				Local: "Quantity",
6936			},
6937			Attr: rootAttr,
6938		}
6939		el := value.MemberElement(root)
6940		el.Integer(*v.Quantity)
6941	}
6942	if len(v.RestrictionType) > 0 {
6943		rootAttr := []smithyxml.Attr{}
6944		root := smithyxml.StartElement{
6945			Name: smithyxml.Name{
6946				Local: "RestrictionType",
6947			},
6948			Attr: rootAttr,
6949		}
6950		el := value.MemberElement(root)
6951		el.String(string(v.RestrictionType))
6952	}
6953	return nil
6954}
6955
6956func awsRestxml_serializeDocumentHeaderList(v []string, value smithyxml.Value) error {
6957	var array *smithyxml.Array
6958	if !value.IsFlattened() {
6959		defer value.Close()
6960	}
6961	customMemberNameAttr := []smithyxml.Attr{}
6962	customMemberName := smithyxml.StartElement{
6963		Name: smithyxml.Name{
6964			Local: "Name",
6965		},
6966		Attr: customMemberNameAttr,
6967	}
6968	array = value.ArrayWithCustomName(customMemberName)
6969	for i := range v {
6970		am := array.Member()
6971		am.String(v[i])
6972	}
6973	return nil
6974}
6975
6976func awsRestxml_serializeDocumentHeaders(v *types.Headers, value smithyxml.Value) error {
6977	defer value.Close()
6978	if v.Items != nil {
6979		rootAttr := []smithyxml.Attr{}
6980		root := smithyxml.StartElement{
6981			Name: smithyxml.Name{
6982				Local: "Items",
6983			},
6984			Attr: rootAttr,
6985		}
6986		el := value.MemberElement(root)
6987		if err := awsRestxml_serializeDocumentHeaderList(v.Items, el); err != nil {
6988			return err
6989		}
6990	}
6991	if v.Quantity != nil {
6992		rootAttr := []smithyxml.Attr{}
6993		root := smithyxml.StartElement{
6994			Name: smithyxml.Name{
6995				Local: "Quantity",
6996			},
6997			Attr: rootAttr,
6998		}
6999		el := value.MemberElement(root)
7000		el.Integer(*v.Quantity)
7001	}
7002	return nil
7003}
7004
7005func awsRestxml_serializeDocumentInvalidationBatch(v *types.InvalidationBatch, value smithyxml.Value) error {
7006	defer value.Close()
7007	if v.CallerReference != nil {
7008		rootAttr := []smithyxml.Attr{}
7009		root := smithyxml.StartElement{
7010			Name: smithyxml.Name{
7011				Local: "CallerReference",
7012			},
7013			Attr: rootAttr,
7014		}
7015		el := value.MemberElement(root)
7016		el.String(*v.CallerReference)
7017	}
7018	if v.Paths != nil {
7019		rootAttr := []smithyxml.Attr{}
7020		root := smithyxml.StartElement{
7021			Name: smithyxml.Name{
7022				Local: "Paths",
7023			},
7024			Attr: rootAttr,
7025		}
7026		el := value.MemberElement(root)
7027		if err := awsRestxml_serializeDocumentPaths(v.Paths, el); err != nil {
7028			return err
7029		}
7030	}
7031	return nil
7032}
7033
7034func awsRestxml_serializeDocumentKeyGroupConfig(v *types.KeyGroupConfig, value smithyxml.Value) error {
7035	defer value.Close()
7036	if v.Comment != nil {
7037		rootAttr := []smithyxml.Attr{}
7038		root := smithyxml.StartElement{
7039			Name: smithyxml.Name{
7040				Local: "Comment",
7041			},
7042			Attr: rootAttr,
7043		}
7044		el := value.MemberElement(root)
7045		el.String(*v.Comment)
7046	}
7047	if v.Items != nil {
7048		rootAttr := []smithyxml.Attr{}
7049		root := smithyxml.StartElement{
7050			Name: smithyxml.Name{
7051				Local: "Items",
7052			},
7053			Attr: rootAttr,
7054		}
7055		el := value.MemberElement(root)
7056		if err := awsRestxml_serializeDocumentPublicKeyIdList(v.Items, el); err != nil {
7057			return err
7058		}
7059	}
7060	if v.Name != nil {
7061		rootAttr := []smithyxml.Attr{}
7062		root := smithyxml.StartElement{
7063			Name: smithyxml.Name{
7064				Local: "Name",
7065			},
7066			Attr: rootAttr,
7067		}
7068		el := value.MemberElement(root)
7069		el.String(*v.Name)
7070	}
7071	return nil
7072}
7073
7074func awsRestxml_serializeDocumentKinesisStreamConfig(v *types.KinesisStreamConfig, value smithyxml.Value) error {
7075	defer value.Close()
7076	if v.RoleARN != nil {
7077		rootAttr := []smithyxml.Attr{}
7078		root := smithyxml.StartElement{
7079			Name: smithyxml.Name{
7080				Local: "RoleARN",
7081			},
7082			Attr: rootAttr,
7083		}
7084		el := value.MemberElement(root)
7085		el.String(*v.RoleARN)
7086	}
7087	if v.StreamARN != nil {
7088		rootAttr := []smithyxml.Attr{}
7089		root := smithyxml.StartElement{
7090			Name: smithyxml.Name{
7091				Local: "StreamARN",
7092			},
7093			Attr: rootAttr,
7094		}
7095		el := value.MemberElement(root)
7096		el.String(*v.StreamARN)
7097	}
7098	return nil
7099}
7100
7101func awsRestxml_serializeDocumentLambdaFunctionAssociation(v *types.LambdaFunctionAssociation, value smithyxml.Value) error {
7102	defer value.Close()
7103	if len(v.EventType) > 0 {
7104		rootAttr := []smithyxml.Attr{}
7105		root := smithyxml.StartElement{
7106			Name: smithyxml.Name{
7107				Local: "EventType",
7108			},
7109			Attr: rootAttr,
7110		}
7111		el := value.MemberElement(root)
7112		el.String(string(v.EventType))
7113	}
7114	if v.IncludeBody != nil {
7115		rootAttr := []smithyxml.Attr{}
7116		root := smithyxml.StartElement{
7117			Name: smithyxml.Name{
7118				Local: "IncludeBody",
7119			},
7120			Attr: rootAttr,
7121		}
7122		el := value.MemberElement(root)
7123		el.Boolean(*v.IncludeBody)
7124	}
7125	if v.LambdaFunctionARN != nil {
7126		rootAttr := []smithyxml.Attr{}
7127		root := smithyxml.StartElement{
7128			Name: smithyxml.Name{
7129				Local: "LambdaFunctionARN",
7130			},
7131			Attr: rootAttr,
7132		}
7133		el := value.MemberElement(root)
7134		el.String(*v.LambdaFunctionARN)
7135	}
7136	return nil
7137}
7138
7139func awsRestxml_serializeDocumentLambdaFunctionAssociationList(v []types.LambdaFunctionAssociation, value smithyxml.Value) error {
7140	var array *smithyxml.Array
7141	if !value.IsFlattened() {
7142		defer value.Close()
7143	}
7144	customMemberNameAttr := []smithyxml.Attr{}
7145	customMemberName := smithyxml.StartElement{
7146		Name: smithyxml.Name{
7147			Local: "LambdaFunctionAssociation",
7148		},
7149		Attr: customMemberNameAttr,
7150	}
7151	array = value.ArrayWithCustomName(customMemberName)
7152	for i := range v {
7153		am := array.Member()
7154		if err := awsRestxml_serializeDocumentLambdaFunctionAssociation(&v[i], am); err != nil {
7155			return err
7156		}
7157	}
7158	return nil
7159}
7160
7161func awsRestxml_serializeDocumentLambdaFunctionAssociations(v *types.LambdaFunctionAssociations, value smithyxml.Value) error {
7162	defer value.Close()
7163	if v.Items != nil {
7164		rootAttr := []smithyxml.Attr{}
7165		root := smithyxml.StartElement{
7166			Name: smithyxml.Name{
7167				Local: "Items",
7168			},
7169			Attr: rootAttr,
7170		}
7171		el := value.MemberElement(root)
7172		if err := awsRestxml_serializeDocumentLambdaFunctionAssociationList(v.Items, el); err != nil {
7173			return err
7174		}
7175	}
7176	if v.Quantity != nil {
7177		rootAttr := []smithyxml.Attr{}
7178		root := smithyxml.StartElement{
7179			Name: smithyxml.Name{
7180				Local: "Quantity",
7181			},
7182			Attr: rootAttr,
7183		}
7184		el := value.MemberElement(root)
7185		el.Integer(*v.Quantity)
7186	}
7187	return nil
7188}
7189
7190func awsRestxml_serializeDocumentLocationList(v []string, value smithyxml.Value) error {
7191	var array *smithyxml.Array
7192	if !value.IsFlattened() {
7193		defer value.Close()
7194	}
7195	customMemberNameAttr := []smithyxml.Attr{}
7196	customMemberName := smithyxml.StartElement{
7197		Name: smithyxml.Name{
7198			Local: "Location",
7199		},
7200		Attr: customMemberNameAttr,
7201	}
7202	array = value.ArrayWithCustomName(customMemberName)
7203	for i := range v {
7204		am := array.Member()
7205		am.String(v[i])
7206	}
7207	return nil
7208}
7209
7210func awsRestxml_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyxml.Value) error {
7211	defer value.Close()
7212	if v.Bucket != nil {
7213		rootAttr := []smithyxml.Attr{}
7214		root := smithyxml.StartElement{
7215			Name: smithyxml.Name{
7216				Local: "Bucket",
7217			},
7218			Attr: rootAttr,
7219		}
7220		el := value.MemberElement(root)
7221		el.String(*v.Bucket)
7222	}
7223	if v.Enabled != nil {
7224		rootAttr := []smithyxml.Attr{}
7225		root := smithyxml.StartElement{
7226			Name: smithyxml.Name{
7227				Local: "Enabled",
7228			},
7229			Attr: rootAttr,
7230		}
7231		el := value.MemberElement(root)
7232		el.Boolean(*v.Enabled)
7233	}
7234	if v.IncludeCookies != nil {
7235		rootAttr := []smithyxml.Attr{}
7236		root := smithyxml.StartElement{
7237			Name: smithyxml.Name{
7238				Local: "IncludeCookies",
7239			},
7240			Attr: rootAttr,
7241		}
7242		el := value.MemberElement(root)
7243		el.Boolean(*v.IncludeCookies)
7244	}
7245	if v.Prefix != nil {
7246		rootAttr := []smithyxml.Attr{}
7247		root := smithyxml.StartElement{
7248			Name: smithyxml.Name{
7249				Local: "Prefix",
7250			},
7251			Attr: rootAttr,
7252		}
7253		el := value.MemberElement(root)
7254		el.String(*v.Prefix)
7255	}
7256	return nil
7257}
7258
7259func awsRestxml_serializeDocumentMethodsList(v []types.Method, value smithyxml.Value) error {
7260	var array *smithyxml.Array
7261	if !value.IsFlattened() {
7262		defer value.Close()
7263	}
7264	customMemberNameAttr := []smithyxml.Attr{}
7265	customMemberName := smithyxml.StartElement{
7266		Name: smithyxml.Name{
7267			Local: "Method",
7268		},
7269		Attr: customMemberNameAttr,
7270	}
7271	array = value.ArrayWithCustomName(customMemberName)
7272	for i := range v {
7273		am := array.Member()
7274		am.String(string(v[i]))
7275	}
7276	return nil
7277}
7278
7279func awsRestxml_serializeDocumentMonitoringSubscription(v *types.MonitoringSubscription, value smithyxml.Value) error {
7280	defer value.Close()
7281	if v.RealtimeMetricsSubscriptionConfig != nil {
7282		rootAttr := []smithyxml.Attr{}
7283		root := smithyxml.StartElement{
7284			Name: smithyxml.Name{
7285				Local: "RealtimeMetricsSubscriptionConfig",
7286			},
7287			Attr: rootAttr,
7288		}
7289		el := value.MemberElement(root)
7290		if err := awsRestxml_serializeDocumentRealtimeMetricsSubscriptionConfig(v.RealtimeMetricsSubscriptionConfig, el); err != nil {
7291			return err
7292		}
7293	}
7294	return nil
7295}
7296
7297func awsRestxml_serializeDocumentOrigin(v *types.Origin, value smithyxml.Value) error {
7298	defer value.Close()
7299	if v.ConnectionAttempts != nil {
7300		rootAttr := []smithyxml.Attr{}
7301		root := smithyxml.StartElement{
7302			Name: smithyxml.Name{
7303				Local: "ConnectionAttempts",
7304			},
7305			Attr: rootAttr,
7306		}
7307		el := value.MemberElement(root)
7308		el.Integer(*v.ConnectionAttempts)
7309	}
7310	if v.ConnectionTimeout != nil {
7311		rootAttr := []smithyxml.Attr{}
7312		root := smithyxml.StartElement{
7313			Name: smithyxml.Name{
7314				Local: "ConnectionTimeout",
7315			},
7316			Attr: rootAttr,
7317		}
7318		el := value.MemberElement(root)
7319		el.Integer(*v.ConnectionTimeout)
7320	}
7321	if v.CustomHeaders != nil {
7322		rootAttr := []smithyxml.Attr{}
7323		root := smithyxml.StartElement{
7324			Name: smithyxml.Name{
7325				Local: "CustomHeaders",
7326			},
7327			Attr: rootAttr,
7328		}
7329		el := value.MemberElement(root)
7330		if err := awsRestxml_serializeDocumentCustomHeaders(v.CustomHeaders, el); err != nil {
7331			return err
7332		}
7333	}
7334	if v.CustomOriginConfig != nil {
7335		rootAttr := []smithyxml.Attr{}
7336		root := smithyxml.StartElement{
7337			Name: smithyxml.Name{
7338				Local: "CustomOriginConfig",
7339			},
7340			Attr: rootAttr,
7341		}
7342		el := value.MemberElement(root)
7343		if err := awsRestxml_serializeDocumentCustomOriginConfig(v.CustomOriginConfig, el); err != nil {
7344			return err
7345		}
7346	}
7347	if v.DomainName != nil {
7348		rootAttr := []smithyxml.Attr{}
7349		root := smithyxml.StartElement{
7350			Name: smithyxml.Name{
7351				Local: "DomainName",
7352			},
7353			Attr: rootAttr,
7354		}
7355		el := value.MemberElement(root)
7356		el.String(*v.DomainName)
7357	}
7358	if v.Id != nil {
7359		rootAttr := []smithyxml.Attr{}
7360		root := smithyxml.StartElement{
7361			Name: smithyxml.Name{
7362				Local: "Id",
7363			},
7364			Attr: rootAttr,
7365		}
7366		el := value.MemberElement(root)
7367		el.String(*v.Id)
7368	}
7369	if v.OriginPath != nil {
7370		rootAttr := []smithyxml.Attr{}
7371		root := smithyxml.StartElement{
7372			Name: smithyxml.Name{
7373				Local: "OriginPath",
7374			},
7375			Attr: rootAttr,
7376		}
7377		el := value.MemberElement(root)
7378		el.String(*v.OriginPath)
7379	}
7380	if v.OriginShield != nil {
7381		rootAttr := []smithyxml.Attr{}
7382		root := smithyxml.StartElement{
7383			Name: smithyxml.Name{
7384				Local: "OriginShield",
7385			},
7386			Attr: rootAttr,
7387		}
7388		el := value.MemberElement(root)
7389		if err := awsRestxml_serializeDocumentOriginShield(v.OriginShield, el); err != nil {
7390			return err
7391		}
7392	}
7393	if v.S3OriginConfig != nil {
7394		rootAttr := []smithyxml.Attr{}
7395		root := smithyxml.StartElement{
7396			Name: smithyxml.Name{
7397				Local: "S3OriginConfig",
7398			},
7399			Attr: rootAttr,
7400		}
7401		el := value.MemberElement(root)
7402		if err := awsRestxml_serializeDocumentS3OriginConfig(v.S3OriginConfig, el); err != nil {
7403			return err
7404		}
7405	}
7406	return nil
7407}
7408
7409func awsRestxml_serializeDocumentOriginCustomHeader(v *types.OriginCustomHeader, value smithyxml.Value) error {
7410	defer value.Close()
7411	if v.HeaderName != nil {
7412		rootAttr := []smithyxml.Attr{}
7413		root := smithyxml.StartElement{
7414			Name: smithyxml.Name{
7415				Local: "HeaderName",
7416			},
7417			Attr: rootAttr,
7418		}
7419		el := value.MemberElement(root)
7420		el.String(*v.HeaderName)
7421	}
7422	if v.HeaderValue != nil {
7423		rootAttr := []smithyxml.Attr{}
7424		root := smithyxml.StartElement{
7425			Name: smithyxml.Name{
7426				Local: "HeaderValue",
7427			},
7428			Attr: rootAttr,
7429		}
7430		el := value.MemberElement(root)
7431		el.String(*v.HeaderValue)
7432	}
7433	return nil
7434}
7435
7436func awsRestxml_serializeDocumentOriginCustomHeadersList(v []types.OriginCustomHeader, value smithyxml.Value) error {
7437	var array *smithyxml.Array
7438	if !value.IsFlattened() {
7439		defer value.Close()
7440	}
7441	customMemberNameAttr := []smithyxml.Attr{}
7442	customMemberName := smithyxml.StartElement{
7443		Name: smithyxml.Name{
7444			Local: "OriginCustomHeader",
7445		},
7446		Attr: customMemberNameAttr,
7447	}
7448	array = value.ArrayWithCustomName(customMemberName)
7449	for i := range v {
7450		am := array.Member()
7451		if err := awsRestxml_serializeDocumentOriginCustomHeader(&v[i], am); err != nil {
7452			return err
7453		}
7454	}
7455	return nil
7456}
7457
7458func awsRestxml_serializeDocumentOriginGroup(v *types.OriginGroup, value smithyxml.Value) error {
7459	defer value.Close()
7460	if v.FailoverCriteria != nil {
7461		rootAttr := []smithyxml.Attr{}
7462		root := smithyxml.StartElement{
7463			Name: smithyxml.Name{
7464				Local: "FailoverCriteria",
7465			},
7466			Attr: rootAttr,
7467		}
7468		el := value.MemberElement(root)
7469		if err := awsRestxml_serializeDocumentOriginGroupFailoverCriteria(v.FailoverCriteria, el); err != nil {
7470			return err
7471		}
7472	}
7473	if v.Id != nil {
7474		rootAttr := []smithyxml.Attr{}
7475		root := smithyxml.StartElement{
7476			Name: smithyxml.Name{
7477				Local: "Id",
7478			},
7479			Attr: rootAttr,
7480		}
7481		el := value.MemberElement(root)
7482		el.String(*v.Id)
7483	}
7484	if v.Members != nil {
7485		rootAttr := []smithyxml.Attr{}
7486		root := smithyxml.StartElement{
7487			Name: smithyxml.Name{
7488				Local: "Members",
7489			},
7490			Attr: rootAttr,
7491		}
7492		el := value.MemberElement(root)
7493		if err := awsRestxml_serializeDocumentOriginGroupMembers(v.Members, el); err != nil {
7494			return err
7495		}
7496	}
7497	return nil
7498}
7499
7500func awsRestxml_serializeDocumentOriginGroupFailoverCriteria(v *types.OriginGroupFailoverCriteria, value smithyxml.Value) error {
7501	defer value.Close()
7502	if v.StatusCodes != nil {
7503		rootAttr := []smithyxml.Attr{}
7504		root := smithyxml.StartElement{
7505			Name: smithyxml.Name{
7506				Local: "StatusCodes",
7507			},
7508			Attr: rootAttr,
7509		}
7510		el := value.MemberElement(root)
7511		if err := awsRestxml_serializeDocumentStatusCodes(v.StatusCodes, el); err != nil {
7512			return err
7513		}
7514	}
7515	return nil
7516}
7517
7518func awsRestxml_serializeDocumentOriginGroupList(v []types.OriginGroup, value smithyxml.Value) error {
7519	var array *smithyxml.Array
7520	if !value.IsFlattened() {
7521		defer value.Close()
7522	}
7523	customMemberNameAttr := []smithyxml.Attr{}
7524	customMemberName := smithyxml.StartElement{
7525		Name: smithyxml.Name{
7526			Local: "OriginGroup",
7527		},
7528		Attr: customMemberNameAttr,
7529	}
7530	array = value.ArrayWithCustomName(customMemberName)
7531	for i := range v {
7532		am := array.Member()
7533		if err := awsRestxml_serializeDocumentOriginGroup(&v[i], am); err != nil {
7534			return err
7535		}
7536	}
7537	return nil
7538}
7539
7540func awsRestxml_serializeDocumentOriginGroupMember(v *types.OriginGroupMember, value smithyxml.Value) error {
7541	defer value.Close()
7542	if v.OriginId != nil {
7543		rootAttr := []smithyxml.Attr{}
7544		root := smithyxml.StartElement{
7545			Name: smithyxml.Name{
7546				Local: "OriginId",
7547			},
7548			Attr: rootAttr,
7549		}
7550		el := value.MemberElement(root)
7551		el.String(*v.OriginId)
7552	}
7553	return nil
7554}
7555
7556func awsRestxml_serializeDocumentOriginGroupMemberList(v []types.OriginGroupMember, value smithyxml.Value) error {
7557	var array *smithyxml.Array
7558	if !value.IsFlattened() {
7559		defer value.Close()
7560	}
7561	customMemberNameAttr := []smithyxml.Attr{}
7562	customMemberName := smithyxml.StartElement{
7563		Name: smithyxml.Name{
7564			Local: "OriginGroupMember",
7565		},
7566		Attr: customMemberNameAttr,
7567	}
7568	array = value.ArrayWithCustomName(customMemberName)
7569	for i := range v {
7570		am := array.Member()
7571		if err := awsRestxml_serializeDocumentOriginGroupMember(&v[i], am); err != nil {
7572			return err
7573		}
7574	}
7575	return nil
7576}
7577
7578func awsRestxml_serializeDocumentOriginGroupMembers(v *types.OriginGroupMembers, value smithyxml.Value) error {
7579	defer value.Close()
7580	if v.Items != nil {
7581		rootAttr := []smithyxml.Attr{}
7582		root := smithyxml.StartElement{
7583			Name: smithyxml.Name{
7584				Local: "Items",
7585			},
7586			Attr: rootAttr,
7587		}
7588		el := value.MemberElement(root)
7589		if err := awsRestxml_serializeDocumentOriginGroupMemberList(v.Items, el); err != nil {
7590			return err
7591		}
7592	}
7593	if v.Quantity != nil {
7594		rootAttr := []smithyxml.Attr{}
7595		root := smithyxml.StartElement{
7596			Name: smithyxml.Name{
7597				Local: "Quantity",
7598			},
7599			Attr: rootAttr,
7600		}
7601		el := value.MemberElement(root)
7602		el.Integer(*v.Quantity)
7603	}
7604	return nil
7605}
7606
7607func awsRestxml_serializeDocumentOriginGroups(v *types.OriginGroups, value smithyxml.Value) error {
7608	defer value.Close()
7609	if v.Items != nil {
7610		rootAttr := []smithyxml.Attr{}
7611		root := smithyxml.StartElement{
7612			Name: smithyxml.Name{
7613				Local: "Items",
7614			},
7615			Attr: rootAttr,
7616		}
7617		el := value.MemberElement(root)
7618		if err := awsRestxml_serializeDocumentOriginGroupList(v.Items, el); err != nil {
7619			return err
7620		}
7621	}
7622	if v.Quantity != nil {
7623		rootAttr := []smithyxml.Attr{}
7624		root := smithyxml.StartElement{
7625			Name: smithyxml.Name{
7626				Local: "Quantity",
7627			},
7628			Attr: rootAttr,
7629		}
7630		el := value.MemberElement(root)
7631		el.Integer(*v.Quantity)
7632	}
7633	return nil
7634}
7635
7636func awsRestxml_serializeDocumentOriginList(v []types.Origin, value smithyxml.Value) error {
7637	var array *smithyxml.Array
7638	if !value.IsFlattened() {
7639		defer value.Close()
7640	}
7641	customMemberNameAttr := []smithyxml.Attr{}
7642	customMemberName := smithyxml.StartElement{
7643		Name: smithyxml.Name{
7644			Local: "Origin",
7645		},
7646		Attr: customMemberNameAttr,
7647	}
7648	array = value.ArrayWithCustomName(customMemberName)
7649	for i := range v {
7650		am := array.Member()
7651		if err := awsRestxml_serializeDocumentOrigin(&v[i], am); err != nil {
7652			return err
7653		}
7654	}
7655	return nil
7656}
7657
7658func awsRestxml_serializeDocumentOriginRequestPolicyConfig(v *types.OriginRequestPolicyConfig, value smithyxml.Value) error {
7659	defer value.Close()
7660	if v.Comment != nil {
7661		rootAttr := []smithyxml.Attr{}
7662		root := smithyxml.StartElement{
7663			Name: smithyxml.Name{
7664				Local: "Comment",
7665			},
7666			Attr: rootAttr,
7667		}
7668		el := value.MemberElement(root)
7669		el.String(*v.Comment)
7670	}
7671	if v.CookiesConfig != nil {
7672		rootAttr := []smithyxml.Attr{}
7673		root := smithyxml.StartElement{
7674			Name: smithyxml.Name{
7675				Local: "CookiesConfig",
7676			},
7677			Attr: rootAttr,
7678		}
7679		el := value.MemberElement(root)
7680		if err := awsRestxml_serializeDocumentOriginRequestPolicyCookiesConfig(v.CookiesConfig, el); err != nil {
7681			return err
7682		}
7683	}
7684	if v.HeadersConfig != nil {
7685		rootAttr := []smithyxml.Attr{}
7686		root := smithyxml.StartElement{
7687			Name: smithyxml.Name{
7688				Local: "HeadersConfig",
7689			},
7690			Attr: rootAttr,
7691		}
7692		el := value.MemberElement(root)
7693		if err := awsRestxml_serializeDocumentOriginRequestPolicyHeadersConfig(v.HeadersConfig, el); err != nil {
7694			return err
7695		}
7696	}
7697	if v.Name != nil {
7698		rootAttr := []smithyxml.Attr{}
7699		root := smithyxml.StartElement{
7700			Name: smithyxml.Name{
7701				Local: "Name",
7702			},
7703			Attr: rootAttr,
7704		}
7705		el := value.MemberElement(root)
7706		el.String(*v.Name)
7707	}
7708	if v.QueryStringsConfig != nil {
7709		rootAttr := []smithyxml.Attr{}
7710		root := smithyxml.StartElement{
7711			Name: smithyxml.Name{
7712				Local: "QueryStringsConfig",
7713			},
7714			Attr: rootAttr,
7715		}
7716		el := value.MemberElement(root)
7717		if err := awsRestxml_serializeDocumentOriginRequestPolicyQueryStringsConfig(v.QueryStringsConfig, el); err != nil {
7718			return err
7719		}
7720	}
7721	return nil
7722}
7723
7724func awsRestxml_serializeDocumentOriginRequestPolicyCookiesConfig(v *types.OriginRequestPolicyCookiesConfig, value smithyxml.Value) error {
7725	defer value.Close()
7726	if len(v.CookieBehavior) > 0 {
7727		rootAttr := []smithyxml.Attr{}
7728		root := smithyxml.StartElement{
7729			Name: smithyxml.Name{
7730				Local: "CookieBehavior",
7731			},
7732			Attr: rootAttr,
7733		}
7734		el := value.MemberElement(root)
7735		el.String(string(v.CookieBehavior))
7736	}
7737	if v.Cookies != nil {
7738		rootAttr := []smithyxml.Attr{}
7739		root := smithyxml.StartElement{
7740			Name: smithyxml.Name{
7741				Local: "Cookies",
7742			},
7743			Attr: rootAttr,
7744		}
7745		el := value.MemberElement(root)
7746		if err := awsRestxml_serializeDocumentCookieNames(v.Cookies, el); err != nil {
7747			return err
7748		}
7749	}
7750	return nil
7751}
7752
7753func awsRestxml_serializeDocumentOriginRequestPolicyHeadersConfig(v *types.OriginRequestPolicyHeadersConfig, value smithyxml.Value) error {
7754	defer value.Close()
7755	if len(v.HeaderBehavior) > 0 {
7756		rootAttr := []smithyxml.Attr{}
7757		root := smithyxml.StartElement{
7758			Name: smithyxml.Name{
7759				Local: "HeaderBehavior",
7760			},
7761			Attr: rootAttr,
7762		}
7763		el := value.MemberElement(root)
7764		el.String(string(v.HeaderBehavior))
7765	}
7766	if v.Headers != nil {
7767		rootAttr := []smithyxml.Attr{}
7768		root := smithyxml.StartElement{
7769			Name: smithyxml.Name{
7770				Local: "Headers",
7771			},
7772			Attr: rootAttr,
7773		}
7774		el := value.MemberElement(root)
7775		if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil {
7776			return err
7777		}
7778	}
7779	return nil
7780}
7781
7782func awsRestxml_serializeDocumentOriginRequestPolicyQueryStringsConfig(v *types.OriginRequestPolicyQueryStringsConfig, value smithyxml.Value) error {
7783	defer value.Close()
7784	if len(v.QueryStringBehavior) > 0 {
7785		rootAttr := []smithyxml.Attr{}
7786		root := smithyxml.StartElement{
7787			Name: smithyxml.Name{
7788				Local: "QueryStringBehavior",
7789			},
7790			Attr: rootAttr,
7791		}
7792		el := value.MemberElement(root)
7793		el.String(string(v.QueryStringBehavior))
7794	}
7795	if v.QueryStrings != nil {
7796		rootAttr := []smithyxml.Attr{}
7797		root := smithyxml.StartElement{
7798			Name: smithyxml.Name{
7799				Local: "QueryStrings",
7800			},
7801			Attr: rootAttr,
7802		}
7803		el := value.MemberElement(root)
7804		if err := awsRestxml_serializeDocumentQueryStringNames(v.QueryStrings, el); err != nil {
7805			return err
7806		}
7807	}
7808	return nil
7809}
7810
7811func awsRestxml_serializeDocumentOrigins(v *types.Origins, value smithyxml.Value) error {
7812	defer value.Close()
7813	if v.Items != nil {
7814		rootAttr := []smithyxml.Attr{}
7815		root := smithyxml.StartElement{
7816			Name: smithyxml.Name{
7817				Local: "Items",
7818			},
7819			Attr: rootAttr,
7820		}
7821		el := value.MemberElement(root)
7822		if err := awsRestxml_serializeDocumentOriginList(v.Items, el); err != nil {
7823			return err
7824		}
7825	}
7826	if v.Quantity != nil {
7827		rootAttr := []smithyxml.Attr{}
7828		root := smithyxml.StartElement{
7829			Name: smithyxml.Name{
7830				Local: "Quantity",
7831			},
7832			Attr: rootAttr,
7833		}
7834		el := value.MemberElement(root)
7835		el.Integer(*v.Quantity)
7836	}
7837	return nil
7838}
7839
7840func awsRestxml_serializeDocumentOriginShield(v *types.OriginShield, value smithyxml.Value) error {
7841	defer value.Close()
7842	if v.Enabled != nil {
7843		rootAttr := []smithyxml.Attr{}
7844		root := smithyxml.StartElement{
7845			Name: smithyxml.Name{
7846				Local: "Enabled",
7847			},
7848			Attr: rootAttr,
7849		}
7850		el := value.MemberElement(root)
7851		el.Boolean(*v.Enabled)
7852	}
7853	if v.OriginShieldRegion != nil {
7854		rootAttr := []smithyxml.Attr{}
7855		root := smithyxml.StartElement{
7856			Name: smithyxml.Name{
7857				Local: "OriginShieldRegion",
7858			},
7859			Attr: rootAttr,
7860		}
7861		el := value.MemberElement(root)
7862		el.String(*v.OriginShieldRegion)
7863	}
7864	return nil
7865}
7866
7867func awsRestxml_serializeDocumentOriginSslProtocols(v *types.OriginSslProtocols, value smithyxml.Value) error {
7868	defer value.Close()
7869	if v.Items != nil {
7870		rootAttr := []smithyxml.Attr{}
7871		root := smithyxml.StartElement{
7872			Name: smithyxml.Name{
7873				Local: "Items",
7874			},
7875			Attr: rootAttr,
7876		}
7877		el := value.MemberElement(root)
7878		if err := awsRestxml_serializeDocumentSslProtocolsList(v.Items, el); err != nil {
7879			return err
7880		}
7881	}
7882	if v.Quantity != nil {
7883		rootAttr := []smithyxml.Attr{}
7884		root := smithyxml.StartElement{
7885			Name: smithyxml.Name{
7886				Local: "Quantity",
7887			},
7888			Attr: rootAttr,
7889		}
7890		el := value.MemberElement(root)
7891		el.Integer(*v.Quantity)
7892	}
7893	return nil
7894}
7895
7896func awsRestxml_serializeDocumentParametersInCacheKeyAndForwardedToOrigin(v *types.ParametersInCacheKeyAndForwardedToOrigin, value smithyxml.Value) error {
7897	defer value.Close()
7898	if v.CookiesConfig != nil {
7899		rootAttr := []smithyxml.Attr{}
7900		root := smithyxml.StartElement{
7901			Name: smithyxml.Name{
7902				Local: "CookiesConfig",
7903			},
7904			Attr: rootAttr,
7905		}
7906		el := value.MemberElement(root)
7907		if err := awsRestxml_serializeDocumentCachePolicyCookiesConfig(v.CookiesConfig, el); err != nil {
7908			return err
7909		}
7910	}
7911	if v.EnableAcceptEncodingBrotli != nil {
7912		rootAttr := []smithyxml.Attr{}
7913		root := smithyxml.StartElement{
7914			Name: smithyxml.Name{
7915				Local: "EnableAcceptEncodingBrotli",
7916			},
7917			Attr: rootAttr,
7918		}
7919		el := value.MemberElement(root)
7920		el.Boolean(*v.EnableAcceptEncodingBrotli)
7921	}
7922	if v.EnableAcceptEncodingGzip != nil {
7923		rootAttr := []smithyxml.Attr{}
7924		root := smithyxml.StartElement{
7925			Name: smithyxml.Name{
7926				Local: "EnableAcceptEncodingGzip",
7927			},
7928			Attr: rootAttr,
7929		}
7930		el := value.MemberElement(root)
7931		el.Boolean(*v.EnableAcceptEncodingGzip)
7932	}
7933	if v.HeadersConfig != nil {
7934		rootAttr := []smithyxml.Attr{}
7935		root := smithyxml.StartElement{
7936			Name: smithyxml.Name{
7937				Local: "HeadersConfig",
7938			},
7939			Attr: rootAttr,
7940		}
7941		el := value.MemberElement(root)
7942		if err := awsRestxml_serializeDocumentCachePolicyHeadersConfig(v.HeadersConfig, el); err != nil {
7943			return err
7944		}
7945	}
7946	if v.QueryStringsConfig != nil {
7947		rootAttr := []smithyxml.Attr{}
7948		root := smithyxml.StartElement{
7949			Name: smithyxml.Name{
7950				Local: "QueryStringsConfig",
7951			},
7952			Attr: rootAttr,
7953		}
7954		el := value.MemberElement(root)
7955		if err := awsRestxml_serializeDocumentCachePolicyQueryStringsConfig(v.QueryStringsConfig, el); err != nil {
7956			return err
7957		}
7958	}
7959	return nil
7960}
7961
7962func awsRestxml_serializeDocumentPathList(v []string, value smithyxml.Value) error {
7963	var array *smithyxml.Array
7964	if !value.IsFlattened() {
7965		defer value.Close()
7966	}
7967	customMemberNameAttr := []smithyxml.Attr{}
7968	customMemberName := smithyxml.StartElement{
7969		Name: smithyxml.Name{
7970			Local: "Path",
7971		},
7972		Attr: customMemberNameAttr,
7973	}
7974	array = value.ArrayWithCustomName(customMemberName)
7975	for i := range v {
7976		am := array.Member()
7977		am.String(v[i])
7978	}
7979	return nil
7980}
7981
7982func awsRestxml_serializeDocumentPaths(v *types.Paths, value smithyxml.Value) error {
7983	defer value.Close()
7984	if v.Items != nil {
7985		rootAttr := []smithyxml.Attr{}
7986		root := smithyxml.StartElement{
7987			Name: smithyxml.Name{
7988				Local: "Items",
7989			},
7990			Attr: rootAttr,
7991		}
7992		el := value.MemberElement(root)
7993		if err := awsRestxml_serializeDocumentPathList(v.Items, el); err != nil {
7994			return err
7995		}
7996	}
7997	if v.Quantity != nil {
7998		rootAttr := []smithyxml.Attr{}
7999		root := smithyxml.StartElement{
8000			Name: smithyxml.Name{
8001				Local: "Quantity",
8002			},
8003			Attr: rootAttr,
8004		}
8005		el := value.MemberElement(root)
8006		el.Integer(*v.Quantity)
8007	}
8008	return nil
8009}
8010
8011func awsRestxml_serializeDocumentPublicKeyConfig(v *types.PublicKeyConfig, value smithyxml.Value) error {
8012	defer value.Close()
8013	if v.CallerReference != nil {
8014		rootAttr := []smithyxml.Attr{}
8015		root := smithyxml.StartElement{
8016			Name: smithyxml.Name{
8017				Local: "CallerReference",
8018			},
8019			Attr: rootAttr,
8020		}
8021		el := value.MemberElement(root)
8022		el.String(*v.CallerReference)
8023	}
8024	if v.Comment != nil {
8025		rootAttr := []smithyxml.Attr{}
8026		root := smithyxml.StartElement{
8027			Name: smithyxml.Name{
8028				Local: "Comment",
8029			},
8030			Attr: rootAttr,
8031		}
8032		el := value.MemberElement(root)
8033		el.String(*v.Comment)
8034	}
8035	if v.EncodedKey != nil {
8036		rootAttr := []smithyxml.Attr{}
8037		root := smithyxml.StartElement{
8038			Name: smithyxml.Name{
8039				Local: "EncodedKey",
8040			},
8041			Attr: rootAttr,
8042		}
8043		el := value.MemberElement(root)
8044		el.String(*v.EncodedKey)
8045	}
8046	if v.Name != nil {
8047		rootAttr := []smithyxml.Attr{}
8048		root := smithyxml.StartElement{
8049			Name: smithyxml.Name{
8050				Local: "Name",
8051			},
8052			Attr: rootAttr,
8053		}
8054		el := value.MemberElement(root)
8055		el.String(*v.Name)
8056	}
8057	return nil
8058}
8059
8060func awsRestxml_serializeDocumentPublicKeyIdList(v []string, value smithyxml.Value) error {
8061	var array *smithyxml.Array
8062	if !value.IsFlattened() {
8063		defer value.Close()
8064	}
8065	customMemberNameAttr := []smithyxml.Attr{}
8066	customMemberName := smithyxml.StartElement{
8067		Name: smithyxml.Name{
8068			Local: "PublicKey",
8069		},
8070		Attr: customMemberNameAttr,
8071	}
8072	array = value.ArrayWithCustomName(customMemberName)
8073	for i := range v {
8074		am := array.Member()
8075		am.String(v[i])
8076	}
8077	return nil
8078}
8079
8080func awsRestxml_serializeDocumentQueryArgProfile(v *types.QueryArgProfile, value smithyxml.Value) error {
8081	defer value.Close()
8082	if v.ProfileId != nil {
8083		rootAttr := []smithyxml.Attr{}
8084		root := smithyxml.StartElement{
8085			Name: smithyxml.Name{
8086				Local: "ProfileId",
8087			},
8088			Attr: rootAttr,
8089		}
8090		el := value.MemberElement(root)
8091		el.String(*v.ProfileId)
8092	}
8093	if v.QueryArg != nil {
8094		rootAttr := []smithyxml.Attr{}
8095		root := smithyxml.StartElement{
8096			Name: smithyxml.Name{
8097				Local: "QueryArg",
8098			},
8099			Attr: rootAttr,
8100		}
8101		el := value.MemberElement(root)
8102		el.String(*v.QueryArg)
8103	}
8104	return nil
8105}
8106
8107func awsRestxml_serializeDocumentQueryArgProfileConfig(v *types.QueryArgProfileConfig, value smithyxml.Value) error {
8108	defer value.Close()
8109	if v.ForwardWhenQueryArgProfileIsUnknown != nil {
8110		rootAttr := []smithyxml.Attr{}
8111		root := smithyxml.StartElement{
8112			Name: smithyxml.Name{
8113				Local: "ForwardWhenQueryArgProfileIsUnknown",
8114			},
8115			Attr: rootAttr,
8116		}
8117		el := value.MemberElement(root)
8118		el.Boolean(*v.ForwardWhenQueryArgProfileIsUnknown)
8119	}
8120	if v.QueryArgProfiles != nil {
8121		rootAttr := []smithyxml.Attr{}
8122		root := smithyxml.StartElement{
8123			Name: smithyxml.Name{
8124				Local: "QueryArgProfiles",
8125			},
8126			Attr: rootAttr,
8127		}
8128		el := value.MemberElement(root)
8129		if err := awsRestxml_serializeDocumentQueryArgProfiles(v.QueryArgProfiles, el); err != nil {
8130			return err
8131		}
8132	}
8133	return nil
8134}
8135
8136func awsRestxml_serializeDocumentQueryArgProfileList(v []types.QueryArgProfile, value smithyxml.Value) error {
8137	var array *smithyxml.Array
8138	if !value.IsFlattened() {
8139		defer value.Close()
8140	}
8141	customMemberNameAttr := []smithyxml.Attr{}
8142	customMemberName := smithyxml.StartElement{
8143		Name: smithyxml.Name{
8144			Local: "QueryArgProfile",
8145		},
8146		Attr: customMemberNameAttr,
8147	}
8148	array = value.ArrayWithCustomName(customMemberName)
8149	for i := range v {
8150		am := array.Member()
8151		if err := awsRestxml_serializeDocumentQueryArgProfile(&v[i], am); err != nil {
8152			return err
8153		}
8154	}
8155	return nil
8156}
8157
8158func awsRestxml_serializeDocumentQueryArgProfiles(v *types.QueryArgProfiles, value smithyxml.Value) error {
8159	defer value.Close()
8160	if v.Items != nil {
8161		rootAttr := []smithyxml.Attr{}
8162		root := smithyxml.StartElement{
8163			Name: smithyxml.Name{
8164				Local: "Items",
8165			},
8166			Attr: rootAttr,
8167		}
8168		el := value.MemberElement(root)
8169		if err := awsRestxml_serializeDocumentQueryArgProfileList(v.Items, el); err != nil {
8170			return err
8171		}
8172	}
8173	if v.Quantity != nil {
8174		rootAttr := []smithyxml.Attr{}
8175		root := smithyxml.StartElement{
8176			Name: smithyxml.Name{
8177				Local: "Quantity",
8178			},
8179			Attr: rootAttr,
8180		}
8181		el := value.MemberElement(root)
8182		el.Integer(*v.Quantity)
8183	}
8184	return nil
8185}
8186
8187func awsRestxml_serializeDocumentQueryStringCacheKeys(v *types.QueryStringCacheKeys, value smithyxml.Value) error {
8188	defer value.Close()
8189	if v.Items != nil {
8190		rootAttr := []smithyxml.Attr{}
8191		root := smithyxml.StartElement{
8192			Name: smithyxml.Name{
8193				Local: "Items",
8194			},
8195			Attr: rootAttr,
8196		}
8197		el := value.MemberElement(root)
8198		if err := awsRestxml_serializeDocumentQueryStringCacheKeysList(v.Items, el); err != nil {
8199			return err
8200		}
8201	}
8202	if v.Quantity != nil {
8203		rootAttr := []smithyxml.Attr{}
8204		root := smithyxml.StartElement{
8205			Name: smithyxml.Name{
8206				Local: "Quantity",
8207			},
8208			Attr: rootAttr,
8209		}
8210		el := value.MemberElement(root)
8211		el.Integer(*v.Quantity)
8212	}
8213	return nil
8214}
8215
8216func awsRestxml_serializeDocumentQueryStringCacheKeysList(v []string, value smithyxml.Value) error {
8217	var array *smithyxml.Array
8218	if !value.IsFlattened() {
8219		defer value.Close()
8220	}
8221	customMemberNameAttr := []smithyxml.Attr{}
8222	customMemberName := smithyxml.StartElement{
8223		Name: smithyxml.Name{
8224			Local: "Name",
8225		},
8226		Attr: customMemberNameAttr,
8227	}
8228	array = value.ArrayWithCustomName(customMemberName)
8229	for i := range v {
8230		am := array.Member()
8231		am.String(v[i])
8232	}
8233	return nil
8234}
8235
8236func awsRestxml_serializeDocumentQueryStringNames(v *types.QueryStringNames, value smithyxml.Value) error {
8237	defer value.Close()
8238	if v.Items != nil {
8239		rootAttr := []smithyxml.Attr{}
8240		root := smithyxml.StartElement{
8241			Name: smithyxml.Name{
8242				Local: "Items",
8243			},
8244			Attr: rootAttr,
8245		}
8246		el := value.MemberElement(root)
8247		if err := awsRestxml_serializeDocumentQueryStringNamesList(v.Items, el); err != nil {
8248			return err
8249		}
8250	}
8251	if v.Quantity != nil {
8252		rootAttr := []smithyxml.Attr{}
8253		root := smithyxml.StartElement{
8254			Name: smithyxml.Name{
8255				Local: "Quantity",
8256			},
8257			Attr: rootAttr,
8258		}
8259		el := value.MemberElement(root)
8260		el.Integer(*v.Quantity)
8261	}
8262	return nil
8263}
8264
8265func awsRestxml_serializeDocumentQueryStringNamesList(v []string, value smithyxml.Value) error {
8266	var array *smithyxml.Array
8267	if !value.IsFlattened() {
8268		defer value.Close()
8269	}
8270	customMemberNameAttr := []smithyxml.Attr{}
8271	customMemberName := smithyxml.StartElement{
8272		Name: smithyxml.Name{
8273			Local: "Name",
8274		},
8275		Attr: customMemberNameAttr,
8276	}
8277	array = value.ArrayWithCustomName(customMemberName)
8278	for i := range v {
8279		am := array.Member()
8280		am.String(v[i])
8281	}
8282	return nil
8283}
8284
8285func awsRestxml_serializeDocumentRealtimeMetricsSubscriptionConfig(v *types.RealtimeMetricsSubscriptionConfig, value smithyxml.Value) error {
8286	defer value.Close()
8287	if len(v.RealtimeMetricsSubscriptionStatus) > 0 {
8288		rootAttr := []smithyxml.Attr{}
8289		root := smithyxml.StartElement{
8290			Name: smithyxml.Name{
8291				Local: "RealtimeMetricsSubscriptionStatus",
8292			},
8293			Attr: rootAttr,
8294		}
8295		el := value.MemberElement(root)
8296		el.String(string(v.RealtimeMetricsSubscriptionStatus))
8297	}
8298	return nil
8299}
8300
8301func awsRestxml_serializeDocumentRestrictions(v *types.Restrictions, value smithyxml.Value) error {
8302	defer value.Close()
8303	if v.GeoRestriction != nil {
8304		rootAttr := []smithyxml.Attr{}
8305		root := smithyxml.StartElement{
8306			Name: smithyxml.Name{
8307				Local: "GeoRestriction",
8308			},
8309			Attr: rootAttr,
8310		}
8311		el := value.MemberElement(root)
8312		if err := awsRestxml_serializeDocumentGeoRestriction(v.GeoRestriction, el); err != nil {
8313			return err
8314		}
8315	}
8316	return nil
8317}
8318
8319func awsRestxml_serializeDocumentS3Origin(v *types.S3Origin, value smithyxml.Value) error {
8320	defer value.Close()
8321	if v.DomainName != nil {
8322		rootAttr := []smithyxml.Attr{}
8323		root := smithyxml.StartElement{
8324			Name: smithyxml.Name{
8325				Local: "DomainName",
8326			},
8327			Attr: rootAttr,
8328		}
8329		el := value.MemberElement(root)
8330		el.String(*v.DomainName)
8331	}
8332	if v.OriginAccessIdentity != nil {
8333		rootAttr := []smithyxml.Attr{}
8334		root := smithyxml.StartElement{
8335			Name: smithyxml.Name{
8336				Local: "OriginAccessIdentity",
8337			},
8338			Attr: rootAttr,
8339		}
8340		el := value.MemberElement(root)
8341		el.String(*v.OriginAccessIdentity)
8342	}
8343	return nil
8344}
8345
8346func awsRestxml_serializeDocumentS3OriginConfig(v *types.S3OriginConfig, value smithyxml.Value) error {
8347	defer value.Close()
8348	if v.OriginAccessIdentity != nil {
8349		rootAttr := []smithyxml.Attr{}
8350		root := smithyxml.StartElement{
8351			Name: smithyxml.Name{
8352				Local: "OriginAccessIdentity",
8353			},
8354			Attr: rootAttr,
8355		}
8356		el := value.MemberElement(root)
8357		el.String(*v.OriginAccessIdentity)
8358	}
8359	return nil
8360}
8361
8362func awsRestxml_serializeDocumentSslProtocolsList(v []types.SslProtocol, value smithyxml.Value) error {
8363	var array *smithyxml.Array
8364	if !value.IsFlattened() {
8365		defer value.Close()
8366	}
8367	customMemberNameAttr := []smithyxml.Attr{}
8368	customMemberName := smithyxml.StartElement{
8369		Name: smithyxml.Name{
8370			Local: "SslProtocol",
8371		},
8372		Attr: customMemberNameAttr,
8373	}
8374	array = value.ArrayWithCustomName(customMemberName)
8375	for i := range v {
8376		am := array.Member()
8377		am.String(string(v[i]))
8378	}
8379	return nil
8380}
8381
8382func awsRestxml_serializeDocumentStatusCodeList(v []int32, value smithyxml.Value) error {
8383	var array *smithyxml.Array
8384	if !value.IsFlattened() {
8385		defer value.Close()
8386	}
8387	customMemberNameAttr := []smithyxml.Attr{}
8388	customMemberName := smithyxml.StartElement{
8389		Name: smithyxml.Name{
8390			Local: "StatusCode",
8391		},
8392		Attr: customMemberNameAttr,
8393	}
8394	array = value.ArrayWithCustomName(customMemberName)
8395	for i := range v {
8396		am := array.Member()
8397		am.Integer(v[i])
8398	}
8399	return nil
8400}
8401
8402func awsRestxml_serializeDocumentStatusCodes(v *types.StatusCodes, value smithyxml.Value) error {
8403	defer value.Close()
8404	if v.Items != nil {
8405		rootAttr := []smithyxml.Attr{}
8406		root := smithyxml.StartElement{
8407			Name: smithyxml.Name{
8408				Local: "Items",
8409			},
8410			Attr: rootAttr,
8411		}
8412		el := value.MemberElement(root)
8413		if err := awsRestxml_serializeDocumentStatusCodeList(v.Items, el); err != nil {
8414			return err
8415		}
8416	}
8417	if v.Quantity != nil {
8418		rootAttr := []smithyxml.Attr{}
8419		root := smithyxml.StartElement{
8420			Name: smithyxml.Name{
8421				Local: "Quantity",
8422			},
8423			Attr: rootAttr,
8424		}
8425		el := value.MemberElement(root)
8426		el.Integer(*v.Quantity)
8427	}
8428	return nil
8429}
8430
8431func awsRestxml_serializeDocumentStreamingDistributionConfig(v *types.StreamingDistributionConfig, value smithyxml.Value) error {
8432	defer value.Close()
8433	if v.Aliases != nil {
8434		rootAttr := []smithyxml.Attr{}
8435		root := smithyxml.StartElement{
8436			Name: smithyxml.Name{
8437				Local: "Aliases",
8438			},
8439			Attr: rootAttr,
8440		}
8441		el := value.MemberElement(root)
8442		if err := awsRestxml_serializeDocumentAliases(v.Aliases, el); err != nil {
8443			return err
8444		}
8445	}
8446	if v.CallerReference != nil {
8447		rootAttr := []smithyxml.Attr{}
8448		root := smithyxml.StartElement{
8449			Name: smithyxml.Name{
8450				Local: "CallerReference",
8451			},
8452			Attr: rootAttr,
8453		}
8454		el := value.MemberElement(root)
8455		el.String(*v.CallerReference)
8456	}
8457	if v.Comment != nil {
8458		rootAttr := []smithyxml.Attr{}
8459		root := smithyxml.StartElement{
8460			Name: smithyxml.Name{
8461				Local: "Comment",
8462			},
8463			Attr: rootAttr,
8464		}
8465		el := value.MemberElement(root)
8466		el.String(*v.Comment)
8467	}
8468	if v.Enabled != nil {
8469		rootAttr := []smithyxml.Attr{}
8470		root := smithyxml.StartElement{
8471			Name: smithyxml.Name{
8472				Local: "Enabled",
8473			},
8474			Attr: rootAttr,
8475		}
8476		el := value.MemberElement(root)
8477		el.Boolean(*v.Enabled)
8478	}
8479	if v.Logging != nil {
8480		rootAttr := []smithyxml.Attr{}
8481		root := smithyxml.StartElement{
8482			Name: smithyxml.Name{
8483				Local: "Logging",
8484			},
8485			Attr: rootAttr,
8486		}
8487		el := value.MemberElement(root)
8488		if err := awsRestxml_serializeDocumentStreamingLoggingConfig(v.Logging, el); err != nil {
8489			return err
8490		}
8491	}
8492	if len(v.PriceClass) > 0 {
8493		rootAttr := []smithyxml.Attr{}
8494		root := smithyxml.StartElement{
8495			Name: smithyxml.Name{
8496				Local: "PriceClass",
8497			},
8498			Attr: rootAttr,
8499		}
8500		el := value.MemberElement(root)
8501		el.String(string(v.PriceClass))
8502	}
8503	if v.S3Origin != nil {
8504		rootAttr := []smithyxml.Attr{}
8505		root := smithyxml.StartElement{
8506			Name: smithyxml.Name{
8507				Local: "S3Origin",
8508			},
8509			Attr: rootAttr,
8510		}
8511		el := value.MemberElement(root)
8512		if err := awsRestxml_serializeDocumentS3Origin(v.S3Origin, el); err != nil {
8513			return err
8514		}
8515	}
8516	if v.TrustedSigners != nil {
8517		rootAttr := []smithyxml.Attr{}
8518		root := smithyxml.StartElement{
8519			Name: smithyxml.Name{
8520				Local: "TrustedSigners",
8521			},
8522			Attr: rootAttr,
8523		}
8524		el := value.MemberElement(root)
8525		if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil {
8526			return err
8527		}
8528	}
8529	return nil
8530}
8531
8532func awsRestxml_serializeDocumentStreamingDistributionConfigWithTags(v *types.StreamingDistributionConfigWithTags, value smithyxml.Value) error {
8533	defer value.Close()
8534	if v.StreamingDistributionConfig != nil {
8535		rootAttr := []smithyxml.Attr{}
8536		root := smithyxml.StartElement{
8537			Name: smithyxml.Name{
8538				Local: "StreamingDistributionConfig",
8539			},
8540			Attr: rootAttr,
8541		}
8542		el := value.MemberElement(root)
8543		if err := awsRestxml_serializeDocumentStreamingDistributionConfig(v.StreamingDistributionConfig, el); err != nil {
8544			return err
8545		}
8546	}
8547	if v.Tags != nil {
8548		rootAttr := []smithyxml.Attr{}
8549		root := smithyxml.StartElement{
8550			Name: smithyxml.Name{
8551				Local: "Tags",
8552			},
8553			Attr: rootAttr,
8554		}
8555		el := value.MemberElement(root)
8556		if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil {
8557			return err
8558		}
8559	}
8560	return nil
8561}
8562
8563func awsRestxml_serializeDocumentStreamingLoggingConfig(v *types.StreamingLoggingConfig, value smithyxml.Value) error {
8564	defer value.Close()
8565	if v.Bucket != nil {
8566		rootAttr := []smithyxml.Attr{}
8567		root := smithyxml.StartElement{
8568			Name: smithyxml.Name{
8569				Local: "Bucket",
8570			},
8571			Attr: rootAttr,
8572		}
8573		el := value.MemberElement(root)
8574		el.String(*v.Bucket)
8575	}
8576	if v.Enabled != nil {
8577		rootAttr := []smithyxml.Attr{}
8578		root := smithyxml.StartElement{
8579			Name: smithyxml.Name{
8580				Local: "Enabled",
8581			},
8582			Attr: rootAttr,
8583		}
8584		el := value.MemberElement(root)
8585		el.Boolean(*v.Enabled)
8586	}
8587	if v.Prefix != nil {
8588		rootAttr := []smithyxml.Attr{}
8589		root := smithyxml.StartElement{
8590			Name: smithyxml.Name{
8591				Local: "Prefix",
8592			},
8593			Attr: rootAttr,
8594		}
8595		el := value.MemberElement(root)
8596		el.String(*v.Prefix)
8597	}
8598	return nil
8599}
8600
8601func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error {
8602	defer value.Close()
8603	if v.Key != nil {
8604		rootAttr := []smithyxml.Attr{}
8605		root := smithyxml.StartElement{
8606			Name: smithyxml.Name{
8607				Local: "Key",
8608			},
8609			Attr: rootAttr,
8610		}
8611		el := value.MemberElement(root)
8612		el.String(*v.Key)
8613	}
8614	if v.Value != nil {
8615		rootAttr := []smithyxml.Attr{}
8616		root := smithyxml.StartElement{
8617			Name: smithyxml.Name{
8618				Local: "Value",
8619			},
8620			Attr: rootAttr,
8621		}
8622		el := value.MemberElement(root)
8623		el.String(*v.Value)
8624	}
8625	return nil
8626}
8627
8628func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error {
8629	var array *smithyxml.Array
8630	if !value.IsFlattened() {
8631		defer value.Close()
8632	}
8633	customMemberNameAttr := []smithyxml.Attr{}
8634	customMemberName := smithyxml.StartElement{
8635		Name: smithyxml.Name{
8636			Local: "Key",
8637		},
8638		Attr: customMemberNameAttr,
8639	}
8640	array = value.ArrayWithCustomName(customMemberName)
8641	for i := range v {
8642		am := array.Member()
8643		am.String(v[i])
8644	}
8645	return nil
8646}
8647
8648func awsRestxml_serializeDocumentTagKeys(v *types.TagKeys, value smithyxml.Value) error {
8649	defer value.Close()
8650	if v.Items != nil {
8651		rootAttr := []smithyxml.Attr{}
8652		root := smithyxml.StartElement{
8653			Name: smithyxml.Name{
8654				Local: "Items",
8655			},
8656			Attr: rootAttr,
8657		}
8658		el := value.MemberElement(root)
8659		if err := awsRestxml_serializeDocumentTagKeyList(v.Items, el); err != nil {
8660			return err
8661		}
8662	}
8663	return nil
8664}
8665
8666func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error {
8667	var array *smithyxml.Array
8668	if !value.IsFlattened() {
8669		defer value.Close()
8670	}
8671	customMemberNameAttr := []smithyxml.Attr{}
8672	customMemberName := smithyxml.StartElement{
8673		Name: smithyxml.Name{
8674			Local: "Tag",
8675		},
8676		Attr: customMemberNameAttr,
8677	}
8678	array = value.ArrayWithCustomName(customMemberName)
8679	for i := range v {
8680		am := array.Member()
8681		if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil {
8682			return err
8683		}
8684	}
8685	return nil
8686}
8687
8688func awsRestxml_serializeDocumentTags(v *types.Tags, value smithyxml.Value) error {
8689	defer value.Close()
8690	if v.Items != nil {
8691		rootAttr := []smithyxml.Attr{}
8692		root := smithyxml.StartElement{
8693			Name: smithyxml.Name{
8694				Local: "Items",
8695			},
8696			Attr: rootAttr,
8697		}
8698		el := value.MemberElement(root)
8699		if err := awsRestxml_serializeDocumentTagList(v.Items, el); err != nil {
8700			return err
8701		}
8702	}
8703	return nil
8704}
8705
8706func awsRestxml_serializeDocumentTrustedKeyGroupIdList(v []string, value smithyxml.Value) error {
8707	var array *smithyxml.Array
8708	if !value.IsFlattened() {
8709		defer value.Close()
8710	}
8711	customMemberNameAttr := []smithyxml.Attr{}
8712	customMemberName := smithyxml.StartElement{
8713		Name: smithyxml.Name{
8714			Local: "KeyGroup",
8715		},
8716		Attr: customMemberNameAttr,
8717	}
8718	array = value.ArrayWithCustomName(customMemberName)
8719	for i := range v {
8720		am := array.Member()
8721		am.String(v[i])
8722	}
8723	return nil
8724}
8725
8726func awsRestxml_serializeDocumentTrustedKeyGroups(v *types.TrustedKeyGroups, value smithyxml.Value) error {
8727	defer value.Close()
8728	if v.Enabled != nil {
8729		rootAttr := []smithyxml.Attr{}
8730		root := smithyxml.StartElement{
8731			Name: smithyxml.Name{
8732				Local: "Enabled",
8733			},
8734			Attr: rootAttr,
8735		}
8736		el := value.MemberElement(root)
8737		el.Boolean(*v.Enabled)
8738	}
8739	if v.Items != nil {
8740		rootAttr := []smithyxml.Attr{}
8741		root := smithyxml.StartElement{
8742			Name: smithyxml.Name{
8743				Local: "Items",
8744			},
8745			Attr: rootAttr,
8746		}
8747		el := value.MemberElement(root)
8748		if err := awsRestxml_serializeDocumentTrustedKeyGroupIdList(v.Items, el); err != nil {
8749			return err
8750		}
8751	}
8752	if v.Quantity != nil {
8753		rootAttr := []smithyxml.Attr{}
8754		root := smithyxml.StartElement{
8755			Name: smithyxml.Name{
8756				Local: "Quantity",
8757			},
8758			Attr: rootAttr,
8759		}
8760		el := value.MemberElement(root)
8761		el.Integer(*v.Quantity)
8762	}
8763	return nil
8764}
8765
8766func awsRestxml_serializeDocumentTrustedSigners(v *types.TrustedSigners, value smithyxml.Value) error {
8767	defer value.Close()
8768	if v.Enabled != nil {
8769		rootAttr := []smithyxml.Attr{}
8770		root := smithyxml.StartElement{
8771			Name: smithyxml.Name{
8772				Local: "Enabled",
8773			},
8774			Attr: rootAttr,
8775		}
8776		el := value.MemberElement(root)
8777		el.Boolean(*v.Enabled)
8778	}
8779	if v.Items != nil {
8780		rootAttr := []smithyxml.Attr{}
8781		root := smithyxml.StartElement{
8782			Name: smithyxml.Name{
8783				Local: "Items",
8784			},
8785			Attr: rootAttr,
8786		}
8787		el := value.MemberElement(root)
8788		if err := awsRestxml_serializeDocumentAwsAccountNumberList(v.Items, el); err != nil {
8789			return err
8790		}
8791	}
8792	if v.Quantity != nil {
8793		rootAttr := []smithyxml.Attr{}
8794		root := smithyxml.StartElement{
8795			Name: smithyxml.Name{
8796				Local: "Quantity",
8797			},
8798			Attr: rootAttr,
8799		}
8800		el := value.MemberElement(root)
8801		el.Integer(*v.Quantity)
8802	}
8803	return nil
8804}
8805
8806func awsRestxml_serializeDocumentViewerCertificate(v *types.ViewerCertificate, value smithyxml.Value) error {
8807	defer value.Close()
8808	if v.ACMCertificateArn != nil {
8809		rootAttr := []smithyxml.Attr{}
8810		root := smithyxml.StartElement{
8811			Name: smithyxml.Name{
8812				Local: "ACMCertificateArn",
8813			},
8814			Attr: rootAttr,
8815		}
8816		el := value.MemberElement(root)
8817		el.String(*v.ACMCertificateArn)
8818	}
8819	if v.Certificate != nil {
8820		rootAttr := []smithyxml.Attr{}
8821		root := smithyxml.StartElement{
8822			Name: smithyxml.Name{
8823				Local: "Certificate",
8824			},
8825			Attr: rootAttr,
8826		}
8827		el := value.MemberElement(root)
8828		el.String(*v.Certificate)
8829	}
8830	if len(v.CertificateSource) > 0 {
8831		rootAttr := []smithyxml.Attr{}
8832		root := smithyxml.StartElement{
8833			Name: smithyxml.Name{
8834				Local: "CertificateSource",
8835			},
8836			Attr: rootAttr,
8837		}
8838		el := value.MemberElement(root)
8839		el.String(string(v.CertificateSource))
8840	}
8841	if v.CloudFrontDefaultCertificate != nil {
8842		rootAttr := []smithyxml.Attr{}
8843		root := smithyxml.StartElement{
8844			Name: smithyxml.Name{
8845				Local: "CloudFrontDefaultCertificate",
8846			},
8847			Attr: rootAttr,
8848		}
8849		el := value.MemberElement(root)
8850		el.Boolean(*v.CloudFrontDefaultCertificate)
8851	}
8852	if v.IAMCertificateId != nil {
8853		rootAttr := []smithyxml.Attr{}
8854		root := smithyxml.StartElement{
8855			Name: smithyxml.Name{
8856				Local: "IAMCertificateId",
8857			},
8858			Attr: rootAttr,
8859		}
8860		el := value.MemberElement(root)
8861		el.String(*v.IAMCertificateId)
8862	}
8863	if len(v.MinimumProtocolVersion) > 0 {
8864		rootAttr := []smithyxml.Attr{}
8865		root := smithyxml.StartElement{
8866			Name: smithyxml.Name{
8867				Local: "MinimumProtocolVersion",
8868			},
8869			Attr: rootAttr,
8870		}
8871		el := value.MemberElement(root)
8872		el.String(string(v.MinimumProtocolVersion))
8873	}
8874	if len(v.SSLSupportMethod) > 0 {
8875		rootAttr := []smithyxml.Attr{}
8876		root := smithyxml.StartElement{
8877			Name: smithyxml.Name{
8878				Local: "SSLSupportMethod",
8879			},
8880			Attr: rootAttr,
8881		}
8882		el := value.MemberElement(root)
8883		el.String(string(v.SSLSupportMethod))
8884	}
8885	return nil
8886}
8887