1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package s3control
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/s3control/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	smithytime "github.com/aws/smithy-go/time"
15	smithyhttp "github.com/aws/smithy-go/transport/http"
16)
17
18type awsRestxml_serializeOpCreateAccessPoint struct {
19}
20
21func (*awsRestxml_serializeOpCreateAccessPoint) ID() string {
22	return "OperationSerializer"
23}
24
25func (m *awsRestxml_serializeOpCreateAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
26	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
27) {
28	request, ok := in.Request.(*smithyhttp.Request)
29	if !ok {
30		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
31	}
32
33	input, ok := in.Parameters.(*CreateAccessPointInput)
34	_ = input
35	if !ok {
36		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
37	}
38
39	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}")
40	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
41	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
42	request.Method = "PUT"
43	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
44	if err != nil {
45		return out, metadata, &smithy.SerializationError{Err: err}
46	}
47
48	if err := awsRestxml_serializeOpHttpBindingsCreateAccessPointInput(input, restEncoder); err != nil {
49		return out, metadata, &smithy.SerializationError{Err: err}
50	}
51
52	restEncoder.SetHeader("Content-Type").String("application/xml")
53
54	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
55	rootAttr := []smithyxml.Attr{}
56	root := smithyxml.StartElement{
57		Name: smithyxml.Name{
58			Local: "CreateAccessPointRequest",
59		},
60		Attr: rootAttr,
61	}
62	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
63	if err := awsRestxml_serializeOpDocumentCreateAccessPointInput(input, xmlEncoder.RootElement(root)); err != nil {
64		return out, metadata, &smithy.SerializationError{Err: err}
65	}
66	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
67		return out, metadata, &smithy.SerializationError{Err: err}
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_serializeOpHttpBindingsCreateAccessPointInput(v *CreateAccessPointInput, encoder *httpbinding.Encoder) error {
78	if v == nil {
79		return fmt.Errorf("unsupported serialization of nil %T", v)
80	}
81
82	if v.AccountId != nil && len(*v.AccountId) > 0 {
83		locationName := "X-Amz-Account-Id"
84		encoder.SetHeader(locationName).String(*v.AccountId)
85	}
86
87	if v.Name == nil || len(*v.Name) == 0 {
88		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
89	}
90	if v.Name != nil {
91		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
92			return err
93		}
94	}
95
96	return nil
97}
98
99func awsRestxml_serializeOpDocumentCreateAccessPointInput(v *CreateAccessPointInput, value smithyxml.Value) error {
100	defer value.Close()
101	if v.Bucket != nil {
102		rootAttr := []smithyxml.Attr{}
103		root := smithyxml.StartElement{
104			Name: smithyxml.Name{
105				Local: "Bucket",
106			},
107			Attr: rootAttr,
108		}
109		el := value.MemberElement(root)
110		el.String(*v.Bucket)
111	}
112	if v.PublicAccessBlockConfiguration != nil {
113		rootAttr := []smithyxml.Attr{}
114		root := smithyxml.StartElement{
115			Name: smithyxml.Name{
116				Local: "PublicAccessBlockConfiguration",
117			},
118			Attr: rootAttr,
119		}
120		el := value.MemberElement(root)
121		if err := awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v.PublicAccessBlockConfiguration, el); err != nil {
122			return err
123		}
124	}
125	if v.VpcConfiguration != nil {
126		rootAttr := []smithyxml.Attr{}
127		root := smithyxml.StartElement{
128			Name: smithyxml.Name{
129				Local: "VpcConfiguration",
130			},
131			Attr: rootAttr,
132		}
133		el := value.MemberElement(root)
134		if err := awsRestxml_serializeDocumentVpcConfiguration(v.VpcConfiguration, el); err != nil {
135			return err
136		}
137	}
138	return nil
139}
140
141type awsRestxml_serializeOpCreateAccessPointForObjectLambda struct {
142}
143
144func (*awsRestxml_serializeOpCreateAccessPointForObjectLambda) ID() string {
145	return "OperationSerializer"
146}
147
148func (m *awsRestxml_serializeOpCreateAccessPointForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
149	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
150) {
151	request, ok := in.Request.(*smithyhttp.Request)
152	if !ok {
153		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
154	}
155
156	input, ok := in.Parameters.(*CreateAccessPointForObjectLambdaInput)
157	_ = input
158	if !ok {
159		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
160	}
161
162	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}")
163	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
164	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
165	request.Method = "PUT"
166	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
167	if err != nil {
168		return out, metadata, &smithy.SerializationError{Err: err}
169	}
170
171	if err := awsRestxml_serializeOpHttpBindingsCreateAccessPointForObjectLambdaInput(input, restEncoder); err != nil {
172		return out, metadata, &smithy.SerializationError{Err: err}
173	}
174
175	restEncoder.SetHeader("Content-Type").String("application/xml")
176
177	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
178	rootAttr := []smithyxml.Attr{}
179	root := smithyxml.StartElement{
180		Name: smithyxml.Name{
181			Local: "CreateAccessPointForObjectLambdaRequest",
182		},
183		Attr: rootAttr,
184	}
185	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
186	if err := awsRestxml_serializeOpDocumentCreateAccessPointForObjectLambdaInput(input, xmlEncoder.RootElement(root)); err != nil {
187		return out, metadata, &smithy.SerializationError{Err: err}
188	}
189	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
190		return out, metadata, &smithy.SerializationError{Err: err}
191	}
192
193	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
194		return out, metadata, &smithy.SerializationError{Err: err}
195	}
196	in.Request = request
197
198	return next.HandleSerialize(ctx, in)
199}
200func awsRestxml_serializeOpHttpBindingsCreateAccessPointForObjectLambdaInput(v *CreateAccessPointForObjectLambdaInput, encoder *httpbinding.Encoder) error {
201	if v == nil {
202		return fmt.Errorf("unsupported serialization of nil %T", v)
203	}
204
205	if v.AccountId != nil && len(*v.AccountId) > 0 {
206		locationName := "X-Amz-Account-Id"
207		encoder.SetHeader(locationName).String(*v.AccountId)
208	}
209
210	if v.Name == nil || len(*v.Name) == 0 {
211		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
212	}
213	if v.Name != nil {
214		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
215			return err
216		}
217	}
218
219	return nil
220}
221
222func awsRestxml_serializeOpDocumentCreateAccessPointForObjectLambdaInput(v *CreateAccessPointForObjectLambdaInput, value smithyxml.Value) error {
223	defer value.Close()
224	if v.Configuration != nil {
225		rootAttr := []smithyxml.Attr{}
226		root := smithyxml.StartElement{
227			Name: smithyxml.Name{
228				Local: "Configuration",
229			},
230			Attr: rootAttr,
231		}
232		el := value.MemberElement(root)
233		if err := awsRestxml_serializeDocumentObjectLambdaConfiguration(v.Configuration, el); err != nil {
234			return err
235		}
236	}
237	return nil
238}
239
240type awsRestxml_serializeOpCreateBucket struct {
241}
242
243func (*awsRestxml_serializeOpCreateBucket) ID() string {
244	return "OperationSerializer"
245}
246
247func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
248	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
249) {
250	request, ok := in.Request.(*smithyhttp.Request)
251	if !ok {
252		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
253	}
254
255	input, ok := in.Parameters.(*CreateBucketInput)
256	_ = input
257	if !ok {
258		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
259	}
260
261	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}")
262	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
263	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
264	request.Method = "PUT"
265	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
266	if err != nil {
267		return out, metadata, &smithy.SerializationError{Err: err}
268	}
269
270	if err := awsRestxml_serializeOpHttpBindingsCreateBucketInput(input, restEncoder); err != nil {
271		return out, metadata, &smithy.SerializationError{Err: err}
272	}
273
274	if input.CreateBucketConfiguration != nil {
275		if !restEncoder.HasHeader("Content-Type") {
276			restEncoder.SetHeader("Content-Type").String("application/xml")
277		}
278
279		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
280		payloadRootAttr := []smithyxml.Attr{}
281		payloadRoot := smithyxml.StartElement{
282			Name: smithyxml.Name{
283				Local: "CreateBucketConfiguration",
284			},
285			Attr: payloadRootAttr,
286		}
287		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
288		if err := awsRestxml_serializeDocumentCreateBucketConfiguration(input.CreateBucketConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
289			return out, metadata, &smithy.SerializationError{Err: err}
290		}
291		payload := bytes.NewReader(xmlEncoder.Bytes())
292		if request, err = request.SetStream(payload); err != nil {
293			return out, metadata, &smithy.SerializationError{Err: err}
294		}
295	}
296
297	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
298		return out, metadata, &smithy.SerializationError{Err: err}
299	}
300	in.Request = request
301
302	return next.HandleSerialize(ctx, in)
303}
304func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, encoder *httpbinding.Encoder) error {
305	if v == nil {
306		return fmt.Errorf("unsupported serialization of nil %T", v)
307	}
308
309	if len(v.ACL) > 0 {
310		locationName := "X-Amz-Acl"
311		encoder.SetHeader(locationName).String(string(v.ACL))
312	}
313
314	if v.Bucket == nil || len(*v.Bucket) == 0 {
315		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
316	}
317	if v.Bucket != nil {
318		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
319			return err
320		}
321	}
322
323	if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
324		locationName := "X-Amz-Grant-Full-Control"
325		encoder.SetHeader(locationName).String(*v.GrantFullControl)
326	}
327
328	if v.GrantRead != nil && len(*v.GrantRead) > 0 {
329		locationName := "X-Amz-Grant-Read"
330		encoder.SetHeader(locationName).String(*v.GrantRead)
331	}
332
333	if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
334		locationName := "X-Amz-Grant-Read-Acp"
335		encoder.SetHeader(locationName).String(*v.GrantReadACP)
336	}
337
338	if v.GrantWrite != nil && len(*v.GrantWrite) > 0 {
339		locationName := "X-Amz-Grant-Write"
340		encoder.SetHeader(locationName).String(*v.GrantWrite)
341	}
342
343	if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
344		locationName := "X-Amz-Grant-Write-Acp"
345		encoder.SetHeader(locationName).String(*v.GrantWriteACP)
346	}
347
348	if v.ObjectLockEnabledForBucket {
349		locationName := "X-Amz-Bucket-Object-Lock-Enabled"
350		encoder.SetHeader(locationName).Boolean(v.ObjectLockEnabledForBucket)
351	}
352
353	if v.OutpostId != nil && len(*v.OutpostId) > 0 {
354		locationName := "X-Amz-Outpost-Id"
355		encoder.SetHeader(locationName).String(*v.OutpostId)
356	}
357
358	return nil
359}
360
361type awsRestxml_serializeOpCreateJob struct {
362}
363
364func (*awsRestxml_serializeOpCreateJob) ID() string {
365	return "OperationSerializer"
366}
367
368func (m *awsRestxml_serializeOpCreateJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
369	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
370) {
371	request, ok := in.Request.(*smithyhttp.Request)
372	if !ok {
373		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
374	}
375
376	input, ok := in.Parameters.(*CreateJobInput)
377	_ = input
378	if !ok {
379		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
380	}
381
382	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs")
383	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
384	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
385	request.Method = "POST"
386	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
387	if err != nil {
388		return out, metadata, &smithy.SerializationError{Err: err}
389	}
390
391	if err := awsRestxml_serializeOpHttpBindingsCreateJobInput(input, restEncoder); err != nil {
392		return out, metadata, &smithy.SerializationError{Err: err}
393	}
394
395	restEncoder.SetHeader("Content-Type").String("application/xml")
396
397	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
398	rootAttr := []smithyxml.Attr{}
399	root := smithyxml.StartElement{
400		Name: smithyxml.Name{
401			Local: "CreateJobRequest",
402		},
403		Attr: rootAttr,
404	}
405	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
406	if err := awsRestxml_serializeOpDocumentCreateJobInput(input, xmlEncoder.RootElement(root)); err != nil {
407		return out, metadata, &smithy.SerializationError{Err: err}
408	}
409	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
410		return out, metadata, &smithy.SerializationError{Err: err}
411	}
412
413	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
414		return out, metadata, &smithy.SerializationError{Err: err}
415	}
416	in.Request = request
417
418	return next.HandleSerialize(ctx, in)
419}
420func awsRestxml_serializeOpHttpBindingsCreateJobInput(v *CreateJobInput, encoder *httpbinding.Encoder) error {
421	if v == nil {
422		return fmt.Errorf("unsupported serialization of nil %T", v)
423	}
424
425	if v.AccountId != nil && len(*v.AccountId) > 0 {
426		locationName := "X-Amz-Account-Id"
427		encoder.SetHeader(locationName).String(*v.AccountId)
428	}
429
430	return nil
431}
432
433func awsRestxml_serializeOpDocumentCreateJobInput(v *CreateJobInput, value smithyxml.Value) error {
434	defer value.Close()
435	if v.ClientRequestToken != nil {
436		rootAttr := []smithyxml.Attr{}
437		root := smithyxml.StartElement{
438			Name: smithyxml.Name{
439				Local: "ClientRequestToken",
440			},
441			Attr: rootAttr,
442		}
443		el := value.MemberElement(root)
444		el.String(*v.ClientRequestToken)
445	}
446	if v.ConfirmationRequired {
447		rootAttr := []smithyxml.Attr{}
448		root := smithyxml.StartElement{
449			Name: smithyxml.Name{
450				Local: "ConfirmationRequired",
451			},
452			Attr: rootAttr,
453		}
454		el := value.MemberElement(root)
455		el.Boolean(v.ConfirmationRequired)
456	}
457	if v.Description != nil {
458		rootAttr := []smithyxml.Attr{}
459		root := smithyxml.StartElement{
460			Name: smithyxml.Name{
461				Local: "Description",
462			},
463			Attr: rootAttr,
464		}
465		el := value.MemberElement(root)
466		el.String(*v.Description)
467	}
468	if v.Manifest != nil {
469		rootAttr := []smithyxml.Attr{}
470		root := smithyxml.StartElement{
471			Name: smithyxml.Name{
472				Local: "Manifest",
473			},
474			Attr: rootAttr,
475		}
476		el := value.MemberElement(root)
477		if err := awsRestxml_serializeDocumentJobManifest(v.Manifest, el); err != nil {
478			return err
479		}
480	}
481	if v.Operation != nil {
482		rootAttr := []smithyxml.Attr{}
483		root := smithyxml.StartElement{
484			Name: smithyxml.Name{
485				Local: "Operation",
486			},
487			Attr: rootAttr,
488		}
489		el := value.MemberElement(root)
490		if err := awsRestxml_serializeDocumentJobOperation(v.Operation, el); err != nil {
491			return err
492		}
493	}
494	{
495		rootAttr := []smithyxml.Attr{}
496		root := smithyxml.StartElement{
497			Name: smithyxml.Name{
498				Local: "Priority",
499			},
500			Attr: rootAttr,
501		}
502		el := value.MemberElement(root)
503		el.Integer(v.Priority)
504	}
505	if v.Report != nil {
506		rootAttr := []smithyxml.Attr{}
507		root := smithyxml.StartElement{
508			Name: smithyxml.Name{
509				Local: "Report",
510			},
511			Attr: rootAttr,
512		}
513		el := value.MemberElement(root)
514		if err := awsRestxml_serializeDocumentJobReport(v.Report, el); err != nil {
515			return err
516		}
517	}
518	if v.RoleArn != nil {
519		rootAttr := []smithyxml.Attr{}
520		root := smithyxml.StartElement{
521			Name: smithyxml.Name{
522				Local: "RoleArn",
523			},
524			Attr: rootAttr,
525		}
526		el := value.MemberElement(root)
527		el.String(*v.RoleArn)
528	}
529	if v.Tags != nil {
530		rootAttr := []smithyxml.Attr{}
531		root := smithyxml.StartElement{
532			Name: smithyxml.Name{
533				Local: "Tags",
534			},
535			Attr: rootAttr,
536		}
537		el := value.MemberElement(root)
538		if err := awsRestxml_serializeDocumentS3TagSet(v.Tags, el); err != nil {
539			return err
540		}
541	}
542	return nil
543}
544
545type awsRestxml_serializeOpDeleteAccessPoint struct {
546}
547
548func (*awsRestxml_serializeOpDeleteAccessPoint) ID() string {
549	return "OperationSerializer"
550}
551
552func (m *awsRestxml_serializeOpDeleteAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
553	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
554) {
555	request, ok := in.Request.(*smithyhttp.Request)
556	if !ok {
557		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
558	}
559
560	input, ok := in.Parameters.(*DeleteAccessPointInput)
561	_ = input
562	if !ok {
563		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
564	}
565
566	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}")
567	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
568	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
569	request.Method = "DELETE"
570	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
571	if err != nil {
572		return out, metadata, &smithy.SerializationError{Err: err}
573	}
574
575	if err := awsRestxml_serializeOpHttpBindingsDeleteAccessPointInput(input, restEncoder); err != nil {
576		return out, metadata, &smithy.SerializationError{Err: err}
577	}
578
579	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
580		return out, metadata, &smithy.SerializationError{Err: err}
581	}
582	in.Request = request
583
584	return next.HandleSerialize(ctx, in)
585}
586func awsRestxml_serializeOpHttpBindingsDeleteAccessPointInput(v *DeleteAccessPointInput, encoder *httpbinding.Encoder) error {
587	if v == nil {
588		return fmt.Errorf("unsupported serialization of nil %T", v)
589	}
590
591	if v.AccountId != nil && len(*v.AccountId) > 0 {
592		locationName := "X-Amz-Account-Id"
593		encoder.SetHeader(locationName).String(*v.AccountId)
594	}
595
596	if v.Name == nil || len(*v.Name) == 0 {
597		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
598	}
599	if v.Name != nil {
600		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
601			return err
602		}
603	}
604
605	return nil
606}
607
608type awsRestxml_serializeOpDeleteAccessPointForObjectLambda struct {
609}
610
611func (*awsRestxml_serializeOpDeleteAccessPointForObjectLambda) ID() string {
612	return "OperationSerializer"
613}
614
615func (m *awsRestxml_serializeOpDeleteAccessPointForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
616	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
617) {
618	request, ok := in.Request.(*smithyhttp.Request)
619	if !ok {
620		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
621	}
622
623	input, ok := in.Parameters.(*DeleteAccessPointForObjectLambdaInput)
624	_ = input
625	if !ok {
626		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
627	}
628
629	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}")
630	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
631	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
632	request.Method = "DELETE"
633	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
634	if err != nil {
635		return out, metadata, &smithy.SerializationError{Err: err}
636	}
637
638	if err := awsRestxml_serializeOpHttpBindingsDeleteAccessPointForObjectLambdaInput(input, restEncoder); err != nil {
639		return out, metadata, &smithy.SerializationError{Err: err}
640	}
641
642	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
643		return out, metadata, &smithy.SerializationError{Err: err}
644	}
645	in.Request = request
646
647	return next.HandleSerialize(ctx, in)
648}
649func awsRestxml_serializeOpHttpBindingsDeleteAccessPointForObjectLambdaInput(v *DeleteAccessPointForObjectLambdaInput, encoder *httpbinding.Encoder) error {
650	if v == nil {
651		return fmt.Errorf("unsupported serialization of nil %T", v)
652	}
653
654	if v.AccountId != nil && len(*v.AccountId) > 0 {
655		locationName := "X-Amz-Account-Id"
656		encoder.SetHeader(locationName).String(*v.AccountId)
657	}
658
659	if v.Name == nil || len(*v.Name) == 0 {
660		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
661	}
662	if v.Name != nil {
663		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
664			return err
665		}
666	}
667
668	return nil
669}
670
671type awsRestxml_serializeOpDeleteAccessPointPolicy struct {
672}
673
674func (*awsRestxml_serializeOpDeleteAccessPointPolicy) ID() string {
675	return "OperationSerializer"
676}
677
678func (m *awsRestxml_serializeOpDeleteAccessPointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
679	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
680) {
681	request, ok := in.Request.(*smithyhttp.Request)
682	if !ok {
683		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
684	}
685
686	input, ok := in.Parameters.(*DeleteAccessPointPolicyInput)
687	_ = input
688	if !ok {
689		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
690	}
691
692	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}/policy")
693	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
694	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
695	request.Method = "DELETE"
696	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
697	if err != nil {
698		return out, metadata, &smithy.SerializationError{Err: err}
699	}
700
701	if err := awsRestxml_serializeOpHttpBindingsDeleteAccessPointPolicyInput(input, restEncoder); err != nil {
702		return out, metadata, &smithy.SerializationError{Err: err}
703	}
704
705	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
706		return out, metadata, &smithy.SerializationError{Err: err}
707	}
708	in.Request = request
709
710	return next.HandleSerialize(ctx, in)
711}
712func awsRestxml_serializeOpHttpBindingsDeleteAccessPointPolicyInput(v *DeleteAccessPointPolicyInput, encoder *httpbinding.Encoder) error {
713	if v == nil {
714		return fmt.Errorf("unsupported serialization of nil %T", v)
715	}
716
717	if v.AccountId != nil && len(*v.AccountId) > 0 {
718		locationName := "X-Amz-Account-Id"
719		encoder.SetHeader(locationName).String(*v.AccountId)
720	}
721
722	if v.Name == nil || len(*v.Name) == 0 {
723		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
724	}
725	if v.Name != nil {
726		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
727			return err
728		}
729	}
730
731	return nil
732}
733
734type awsRestxml_serializeOpDeleteAccessPointPolicyForObjectLambda struct {
735}
736
737func (*awsRestxml_serializeOpDeleteAccessPointPolicyForObjectLambda) ID() string {
738	return "OperationSerializer"
739}
740
741func (m *awsRestxml_serializeOpDeleteAccessPointPolicyForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
742	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
743) {
744	request, ok := in.Request.(*smithyhttp.Request)
745	if !ok {
746		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
747	}
748
749	input, ok := in.Parameters.(*DeleteAccessPointPolicyForObjectLambdaInput)
750	_ = input
751	if !ok {
752		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
753	}
754
755	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/policy")
756	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
757	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
758	request.Method = "DELETE"
759	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
760	if err != nil {
761		return out, metadata, &smithy.SerializationError{Err: err}
762	}
763
764	if err := awsRestxml_serializeOpHttpBindingsDeleteAccessPointPolicyForObjectLambdaInput(input, restEncoder); err != nil {
765		return out, metadata, &smithy.SerializationError{Err: err}
766	}
767
768	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
769		return out, metadata, &smithy.SerializationError{Err: err}
770	}
771	in.Request = request
772
773	return next.HandleSerialize(ctx, in)
774}
775func awsRestxml_serializeOpHttpBindingsDeleteAccessPointPolicyForObjectLambdaInput(v *DeleteAccessPointPolicyForObjectLambdaInput, encoder *httpbinding.Encoder) error {
776	if v == nil {
777		return fmt.Errorf("unsupported serialization of nil %T", v)
778	}
779
780	if v.AccountId != nil && len(*v.AccountId) > 0 {
781		locationName := "X-Amz-Account-Id"
782		encoder.SetHeader(locationName).String(*v.AccountId)
783	}
784
785	if v.Name == nil || len(*v.Name) == 0 {
786		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
787	}
788	if v.Name != nil {
789		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
790			return err
791		}
792	}
793
794	return nil
795}
796
797type awsRestxml_serializeOpDeleteBucket struct {
798}
799
800func (*awsRestxml_serializeOpDeleteBucket) ID() string {
801	return "OperationSerializer"
802}
803
804func (m *awsRestxml_serializeOpDeleteBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
805	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
806) {
807	request, ok := in.Request.(*smithyhttp.Request)
808	if !ok {
809		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
810	}
811
812	input, ok := in.Parameters.(*DeleteBucketInput)
813	_ = input
814	if !ok {
815		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
816	}
817
818	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}")
819	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
820	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
821	request.Method = "DELETE"
822	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
823	if err != nil {
824		return out, metadata, &smithy.SerializationError{Err: err}
825	}
826
827	if err := awsRestxml_serializeOpHttpBindingsDeleteBucketInput(input, restEncoder); err != nil {
828		return out, metadata, &smithy.SerializationError{Err: err}
829	}
830
831	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
832		return out, metadata, &smithy.SerializationError{Err: err}
833	}
834	in.Request = request
835
836	return next.HandleSerialize(ctx, in)
837}
838func awsRestxml_serializeOpHttpBindingsDeleteBucketInput(v *DeleteBucketInput, encoder *httpbinding.Encoder) error {
839	if v == nil {
840		return fmt.Errorf("unsupported serialization of nil %T", v)
841	}
842
843	if v.AccountId != nil && len(*v.AccountId) > 0 {
844		locationName := "X-Amz-Account-Id"
845		encoder.SetHeader(locationName).String(*v.AccountId)
846	}
847
848	if v.Bucket == nil || len(*v.Bucket) == 0 {
849		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
850	}
851	if v.Bucket != nil {
852		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
853			return err
854		}
855	}
856
857	return nil
858}
859
860type awsRestxml_serializeOpDeleteBucketLifecycleConfiguration struct {
861}
862
863func (*awsRestxml_serializeOpDeleteBucketLifecycleConfiguration) ID() string {
864	return "OperationSerializer"
865}
866
867func (m *awsRestxml_serializeOpDeleteBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
868	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
869) {
870	request, ok := in.Request.(*smithyhttp.Request)
871	if !ok {
872		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
873	}
874
875	input, ok := in.Parameters.(*DeleteBucketLifecycleConfigurationInput)
876	_ = input
877	if !ok {
878		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
879	}
880
881	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/lifecycleconfiguration")
882	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
883	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
884	request.Method = "DELETE"
885	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
886	if err != nil {
887		return out, metadata, &smithy.SerializationError{Err: err}
888	}
889
890	if err := awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleConfigurationInput(input, restEncoder); err != nil {
891		return out, metadata, &smithy.SerializationError{Err: err}
892	}
893
894	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
895		return out, metadata, &smithy.SerializationError{Err: err}
896	}
897	in.Request = request
898
899	return next.HandleSerialize(ctx, in)
900}
901func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleConfigurationInput(v *DeleteBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error {
902	if v == nil {
903		return fmt.Errorf("unsupported serialization of nil %T", v)
904	}
905
906	if v.AccountId != nil && len(*v.AccountId) > 0 {
907		locationName := "X-Amz-Account-Id"
908		encoder.SetHeader(locationName).String(*v.AccountId)
909	}
910
911	if v.Bucket == nil || len(*v.Bucket) == 0 {
912		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
913	}
914	if v.Bucket != nil {
915		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
916			return err
917		}
918	}
919
920	return nil
921}
922
923type awsRestxml_serializeOpDeleteBucketPolicy struct {
924}
925
926func (*awsRestxml_serializeOpDeleteBucketPolicy) ID() string {
927	return "OperationSerializer"
928}
929
930func (m *awsRestxml_serializeOpDeleteBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
931	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
932) {
933	request, ok := in.Request.(*smithyhttp.Request)
934	if !ok {
935		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
936	}
937
938	input, ok := in.Parameters.(*DeleteBucketPolicyInput)
939	_ = input
940	if !ok {
941		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
942	}
943
944	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/policy")
945	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
946	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
947	request.Method = "DELETE"
948	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
949	if err != nil {
950		return out, metadata, &smithy.SerializationError{Err: err}
951	}
952
953	if err := awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(input, restEncoder); err != nil {
954		return out, metadata, &smithy.SerializationError{Err: err}
955	}
956
957	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
958		return out, metadata, &smithy.SerializationError{Err: err}
959	}
960	in.Request = request
961
962	return next.HandleSerialize(ctx, in)
963}
964func awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(v *DeleteBucketPolicyInput, encoder *httpbinding.Encoder) error {
965	if v == nil {
966		return fmt.Errorf("unsupported serialization of nil %T", v)
967	}
968
969	if v.AccountId != nil && len(*v.AccountId) > 0 {
970		locationName := "X-Amz-Account-Id"
971		encoder.SetHeader(locationName).String(*v.AccountId)
972	}
973
974	if v.Bucket == nil || len(*v.Bucket) == 0 {
975		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
976	}
977	if v.Bucket != nil {
978		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
979			return err
980		}
981	}
982
983	return nil
984}
985
986type awsRestxml_serializeOpDeleteBucketTagging struct {
987}
988
989func (*awsRestxml_serializeOpDeleteBucketTagging) ID() string {
990	return "OperationSerializer"
991}
992
993func (m *awsRestxml_serializeOpDeleteBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
994	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
995) {
996	request, ok := in.Request.(*smithyhttp.Request)
997	if !ok {
998		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
999	}
1000
1001	input, ok := in.Parameters.(*DeleteBucketTaggingInput)
1002	_ = input
1003	if !ok {
1004		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1005	}
1006
1007	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/tagging")
1008	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1009	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1010	request.Method = "DELETE"
1011	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1012	if err != nil {
1013		return out, metadata, &smithy.SerializationError{Err: err}
1014	}
1015
1016	if err := awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(input, restEncoder); err != nil {
1017		return out, metadata, &smithy.SerializationError{Err: err}
1018	}
1019
1020	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1021		return out, metadata, &smithy.SerializationError{Err: err}
1022	}
1023	in.Request = request
1024
1025	return next.HandleSerialize(ctx, in)
1026}
1027func awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(v *DeleteBucketTaggingInput, encoder *httpbinding.Encoder) error {
1028	if v == nil {
1029		return fmt.Errorf("unsupported serialization of nil %T", v)
1030	}
1031
1032	if v.AccountId != nil && len(*v.AccountId) > 0 {
1033		locationName := "X-Amz-Account-Id"
1034		encoder.SetHeader(locationName).String(*v.AccountId)
1035	}
1036
1037	if v.Bucket == nil || len(*v.Bucket) == 0 {
1038		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
1039	}
1040	if v.Bucket != nil {
1041		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
1042			return err
1043		}
1044	}
1045
1046	return nil
1047}
1048
1049type awsRestxml_serializeOpDeleteJobTagging struct {
1050}
1051
1052func (*awsRestxml_serializeOpDeleteJobTagging) ID() string {
1053	return "OperationSerializer"
1054}
1055
1056func (m *awsRestxml_serializeOpDeleteJobTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1057	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1058) {
1059	request, ok := in.Request.(*smithyhttp.Request)
1060	if !ok {
1061		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1062	}
1063
1064	input, ok := in.Parameters.(*DeleteJobTaggingInput)
1065	_ = input
1066	if !ok {
1067		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1068	}
1069
1070	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs/{JobId}/tagging")
1071	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1072	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1073	request.Method = "DELETE"
1074	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1075	if err != nil {
1076		return out, metadata, &smithy.SerializationError{Err: err}
1077	}
1078
1079	if err := awsRestxml_serializeOpHttpBindingsDeleteJobTaggingInput(input, restEncoder); err != nil {
1080		return out, metadata, &smithy.SerializationError{Err: err}
1081	}
1082
1083	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1084		return out, metadata, &smithy.SerializationError{Err: err}
1085	}
1086	in.Request = request
1087
1088	return next.HandleSerialize(ctx, in)
1089}
1090func awsRestxml_serializeOpHttpBindingsDeleteJobTaggingInput(v *DeleteJobTaggingInput, encoder *httpbinding.Encoder) error {
1091	if v == nil {
1092		return fmt.Errorf("unsupported serialization of nil %T", v)
1093	}
1094
1095	if v.AccountId != nil && len(*v.AccountId) > 0 {
1096		locationName := "X-Amz-Account-Id"
1097		encoder.SetHeader(locationName).String(*v.AccountId)
1098	}
1099
1100	if v.JobId == nil || len(*v.JobId) == 0 {
1101		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
1102	}
1103	if v.JobId != nil {
1104		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
1105			return err
1106		}
1107	}
1108
1109	return nil
1110}
1111
1112type awsRestxml_serializeOpDeletePublicAccessBlock struct {
1113}
1114
1115func (*awsRestxml_serializeOpDeletePublicAccessBlock) ID() string {
1116	return "OperationSerializer"
1117}
1118
1119func (m *awsRestxml_serializeOpDeletePublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1120	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1121) {
1122	request, ok := in.Request.(*smithyhttp.Request)
1123	if !ok {
1124		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1125	}
1126
1127	input, ok := in.Parameters.(*DeletePublicAccessBlockInput)
1128	_ = input
1129	if !ok {
1130		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1131	}
1132
1133	opPath, opQuery := httpbinding.SplitURI("/v20180820/configuration/publicAccessBlock")
1134	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1135	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1136	request.Method = "DELETE"
1137	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1138	if err != nil {
1139		return out, metadata, &smithy.SerializationError{Err: err}
1140	}
1141
1142	if err := awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(input, restEncoder); err != nil {
1143		return out, metadata, &smithy.SerializationError{Err: err}
1144	}
1145
1146	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1147		return out, metadata, &smithy.SerializationError{Err: err}
1148	}
1149	in.Request = request
1150
1151	return next.HandleSerialize(ctx, in)
1152}
1153func awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(v *DeletePublicAccessBlockInput, encoder *httpbinding.Encoder) error {
1154	if v == nil {
1155		return fmt.Errorf("unsupported serialization of nil %T", v)
1156	}
1157
1158	if v.AccountId != nil && len(*v.AccountId) > 0 {
1159		locationName := "X-Amz-Account-Id"
1160		encoder.SetHeader(locationName).String(*v.AccountId)
1161	}
1162
1163	return nil
1164}
1165
1166type awsRestxml_serializeOpDeleteStorageLensConfiguration struct {
1167}
1168
1169func (*awsRestxml_serializeOpDeleteStorageLensConfiguration) ID() string {
1170	return "OperationSerializer"
1171}
1172
1173func (m *awsRestxml_serializeOpDeleteStorageLensConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1174	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1175) {
1176	request, ok := in.Request.(*smithyhttp.Request)
1177	if !ok {
1178		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1179	}
1180
1181	input, ok := in.Parameters.(*DeleteStorageLensConfigurationInput)
1182	_ = input
1183	if !ok {
1184		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1185	}
1186
1187	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}")
1188	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1189	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1190	request.Method = "DELETE"
1191	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1192	if err != nil {
1193		return out, metadata, &smithy.SerializationError{Err: err}
1194	}
1195
1196	if err := awsRestxml_serializeOpHttpBindingsDeleteStorageLensConfigurationInput(input, restEncoder); err != nil {
1197		return out, metadata, &smithy.SerializationError{Err: err}
1198	}
1199
1200	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1201		return out, metadata, &smithy.SerializationError{Err: err}
1202	}
1203	in.Request = request
1204
1205	return next.HandleSerialize(ctx, in)
1206}
1207func awsRestxml_serializeOpHttpBindingsDeleteStorageLensConfigurationInput(v *DeleteStorageLensConfigurationInput, encoder *httpbinding.Encoder) error {
1208	if v == nil {
1209		return fmt.Errorf("unsupported serialization of nil %T", v)
1210	}
1211
1212	if v.AccountId != nil && len(*v.AccountId) > 0 {
1213		locationName := "X-Amz-Account-Id"
1214		encoder.SetHeader(locationName).String(*v.AccountId)
1215	}
1216
1217	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
1218		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
1219	}
1220	if v.ConfigId != nil {
1221		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
1222			return err
1223		}
1224	}
1225
1226	return nil
1227}
1228
1229type awsRestxml_serializeOpDeleteStorageLensConfigurationTagging struct {
1230}
1231
1232func (*awsRestxml_serializeOpDeleteStorageLensConfigurationTagging) ID() string {
1233	return "OperationSerializer"
1234}
1235
1236func (m *awsRestxml_serializeOpDeleteStorageLensConfigurationTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1237	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1238) {
1239	request, ok := in.Request.(*smithyhttp.Request)
1240	if !ok {
1241		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1242	}
1243
1244	input, ok := in.Parameters.(*DeleteStorageLensConfigurationTaggingInput)
1245	_ = input
1246	if !ok {
1247		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1248	}
1249
1250	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}/tagging")
1251	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1252	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1253	request.Method = "DELETE"
1254	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1255	if err != nil {
1256		return out, metadata, &smithy.SerializationError{Err: err}
1257	}
1258
1259	if err := awsRestxml_serializeOpHttpBindingsDeleteStorageLensConfigurationTaggingInput(input, restEncoder); err != nil {
1260		return out, metadata, &smithy.SerializationError{Err: err}
1261	}
1262
1263	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1264		return out, metadata, &smithy.SerializationError{Err: err}
1265	}
1266	in.Request = request
1267
1268	return next.HandleSerialize(ctx, in)
1269}
1270func awsRestxml_serializeOpHttpBindingsDeleteStorageLensConfigurationTaggingInput(v *DeleteStorageLensConfigurationTaggingInput, encoder *httpbinding.Encoder) error {
1271	if v == nil {
1272		return fmt.Errorf("unsupported serialization of nil %T", v)
1273	}
1274
1275	if v.AccountId != nil && len(*v.AccountId) > 0 {
1276		locationName := "X-Amz-Account-Id"
1277		encoder.SetHeader(locationName).String(*v.AccountId)
1278	}
1279
1280	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
1281		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
1282	}
1283	if v.ConfigId != nil {
1284		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
1285			return err
1286		}
1287	}
1288
1289	return nil
1290}
1291
1292type awsRestxml_serializeOpDescribeJob struct {
1293}
1294
1295func (*awsRestxml_serializeOpDescribeJob) ID() string {
1296	return "OperationSerializer"
1297}
1298
1299func (m *awsRestxml_serializeOpDescribeJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1300	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1301) {
1302	request, ok := in.Request.(*smithyhttp.Request)
1303	if !ok {
1304		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1305	}
1306
1307	input, ok := in.Parameters.(*DescribeJobInput)
1308	_ = input
1309	if !ok {
1310		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1311	}
1312
1313	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs/{JobId}")
1314	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1315	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1316	request.Method = "GET"
1317	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1318	if err != nil {
1319		return out, metadata, &smithy.SerializationError{Err: err}
1320	}
1321
1322	if err := awsRestxml_serializeOpHttpBindingsDescribeJobInput(input, restEncoder); err != nil {
1323		return out, metadata, &smithy.SerializationError{Err: err}
1324	}
1325
1326	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1327		return out, metadata, &smithy.SerializationError{Err: err}
1328	}
1329	in.Request = request
1330
1331	return next.HandleSerialize(ctx, in)
1332}
1333func awsRestxml_serializeOpHttpBindingsDescribeJobInput(v *DescribeJobInput, encoder *httpbinding.Encoder) error {
1334	if v == nil {
1335		return fmt.Errorf("unsupported serialization of nil %T", v)
1336	}
1337
1338	if v.AccountId != nil && len(*v.AccountId) > 0 {
1339		locationName := "X-Amz-Account-Id"
1340		encoder.SetHeader(locationName).String(*v.AccountId)
1341	}
1342
1343	if v.JobId == nil || len(*v.JobId) == 0 {
1344		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
1345	}
1346	if v.JobId != nil {
1347		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
1348			return err
1349		}
1350	}
1351
1352	return nil
1353}
1354
1355type awsRestxml_serializeOpGetAccessPoint struct {
1356}
1357
1358func (*awsRestxml_serializeOpGetAccessPoint) ID() string {
1359	return "OperationSerializer"
1360}
1361
1362func (m *awsRestxml_serializeOpGetAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1363	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1364) {
1365	request, ok := in.Request.(*smithyhttp.Request)
1366	if !ok {
1367		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1368	}
1369
1370	input, ok := in.Parameters.(*GetAccessPointInput)
1371	_ = input
1372	if !ok {
1373		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1374	}
1375
1376	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}")
1377	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1378	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1379	request.Method = "GET"
1380	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1381	if err != nil {
1382		return out, metadata, &smithy.SerializationError{Err: err}
1383	}
1384
1385	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointInput(input, restEncoder); err != nil {
1386		return out, metadata, &smithy.SerializationError{Err: err}
1387	}
1388
1389	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1390		return out, metadata, &smithy.SerializationError{Err: err}
1391	}
1392	in.Request = request
1393
1394	return next.HandleSerialize(ctx, in)
1395}
1396func awsRestxml_serializeOpHttpBindingsGetAccessPointInput(v *GetAccessPointInput, encoder *httpbinding.Encoder) error {
1397	if v == nil {
1398		return fmt.Errorf("unsupported serialization of nil %T", v)
1399	}
1400
1401	if v.AccountId != nil && len(*v.AccountId) > 0 {
1402		locationName := "X-Amz-Account-Id"
1403		encoder.SetHeader(locationName).String(*v.AccountId)
1404	}
1405
1406	if v.Name == nil || len(*v.Name) == 0 {
1407		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1408	}
1409	if v.Name != nil {
1410		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1411			return err
1412		}
1413	}
1414
1415	return nil
1416}
1417
1418type awsRestxml_serializeOpGetAccessPointConfigurationForObjectLambda struct {
1419}
1420
1421func (*awsRestxml_serializeOpGetAccessPointConfigurationForObjectLambda) ID() string {
1422	return "OperationSerializer"
1423}
1424
1425func (m *awsRestxml_serializeOpGetAccessPointConfigurationForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1426	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1427) {
1428	request, ok := in.Request.(*smithyhttp.Request)
1429	if !ok {
1430		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1431	}
1432
1433	input, ok := in.Parameters.(*GetAccessPointConfigurationForObjectLambdaInput)
1434	_ = input
1435	if !ok {
1436		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1437	}
1438
1439	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/configuration")
1440	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1441	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1442	request.Method = "GET"
1443	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1444	if err != nil {
1445		return out, metadata, &smithy.SerializationError{Err: err}
1446	}
1447
1448	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointConfigurationForObjectLambdaInput(input, restEncoder); err != nil {
1449		return out, metadata, &smithy.SerializationError{Err: err}
1450	}
1451
1452	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1453		return out, metadata, &smithy.SerializationError{Err: err}
1454	}
1455	in.Request = request
1456
1457	return next.HandleSerialize(ctx, in)
1458}
1459func awsRestxml_serializeOpHttpBindingsGetAccessPointConfigurationForObjectLambdaInput(v *GetAccessPointConfigurationForObjectLambdaInput, encoder *httpbinding.Encoder) error {
1460	if v == nil {
1461		return fmt.Errorf("unsupported serialization of nil %T", v)
1462	}
1463
1464	if v.AccountId != nil && len(*v.AccountId) > 0 {
1465		locationName := "X-Amz-Account-Id"
1466		encoder.SetHeader(locationName).String(*v.AccountId)
1467	}
1468
1469	if v.Name == nil || len(*v.Name) == 0 {
1470		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1471	}
1472	if v.Name != nil {
1473		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1474			return err
1475		}
1476	}
1477
1478	return nil
1479}
1480
1481type awsRestxml_serializeOpGetAccessPointForObjectLambda struct {
1482}
1483
1484func (*awsRestxml_serializeOpGetAccessPointForObjectLambda) ID() string {
1485	return "OperationSerializer"
1486}
1487
1488func (m *awsRestxml_serializeOpGetAccessPointForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1489	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1490) {
1491	request, ok := in.Request.(*smithyhttp.Request)
1492	if !ok {
1493		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1494	}
1495
1496	input, ok := in.Parameters.(*GetAccessPointForObjectLambdaInput)
1497	_ = input
1498	if !ok {
1499		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1500	}
1501
1502	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}")
1503	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1504	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1505	request.Method = "GET"
1506	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1507	if err != nil {
1508		return out, metadata, &smithy.SerializationError{Err: err}
1509	}
1510
1511	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointForObjectLambdaInput(input, restEncoder); err != nil {
1512		return out, metadata, &smithy.SerializationError{Err: err}
1513	}
1514
1515	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1516		return out, metadata, &smithy.SerializationError{Err: err}
1517	}
1518	in.Request = request
1519
1520	return next.HandleSerialize(ctx, in)
1521}
1522func awsRestxml_serializeOpHttpBindingsGetAccessPointForObjectLambdaInput(v *GetAccessPointForObjectLambdaInput, encoder *httpbinding.Encoder) error {
1523	if v == nil {
1524		return fmt.Errorf("unsupported serialization of nil %T", v)
1525	}
1526
1527	if v.AccountId != nil && len(*v.AccountId) > 0 {
1528		locationName := "X-Amz-Account-Id"
1529		encoder.SetHeader(locationName).String(*v.AccountId)
1530	}
1531
1532	if v.Name == nil || len(*v.Name) == 0 {
1533		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1534	}
1535	if v.Name != nil {
1536		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1537			return err
1538		}
1539	}
1540
1541	return nil
1542}
1543
1544type awsRestxml_serializeOpGetAccessPointPolicy struct {
1545}
1546
1547func (*awsRestxml_serializeOpGetAccessPointPolicy) ID() string {
1548	return "OperationSerializer"
1549}
1550
1551func (m *awsRestxml_serializeOpGetAccessPointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1552	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1553) {
1554	request, ok := in.Request.(*smithyhttp.Request)
1555	if !ok {
1556		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1557	}
1558
1559	input, ok := in.Parameters.(*GetAccessPointPolicyInput)
1560	_ = input
1561	if !ok {
1562		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1563	}
1564
1565	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}/policy")
1566	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1567	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1568	request.Method = "GET"
1569	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1570	if err != nil {
1571		return out, metadata, &smithy.SerializationError{Err: err}
1572	}
1573
1574	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyInput(input, restEncoder); err != nil {
1575		return out, metadata, &smithy.SerializationError{Err: err}
1576	}
1577
1578	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1579		return out, metadata, &smithy.SerializationError{Err: err}
1580	}
1581	in.Request = request
1582
1583	return next.HandleSerialize(ctx, in)
1584}
1585func awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyInput(v *GetAccessPointPolicyInput, encoder *httpbinding.Encoder) error {
1586	if v == nil {
1587		return fmt.Errorf("unsupported serialization of nil %T", v)
1588	}
1589
1590	if v.AccountId != nil && len(*v.AccountId) > 0 {
1591		locationName := "X-Amz-Account-Id"
1592		encoder.SetHeader(locationName).String(*v.AccountId)
1593	}
1594
1595	if v.Name == nil || len(*v.Name) == 0 {
1596		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1597	}
1598	if v.Name != nil {
1599		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1600			return err
1601		}
1602	}
1603
1604	return nil
1605}
1606
1607type awsRestxml_serializeOpGetAccessPointPolicyForObjectLambda struct {
1608}
1609
1610func (*awsRestxml_serializeOpGetAccessPointPolicyForObjectLambda) ID() string {
1611	return "OperationSerializer"
1612}
1613
1614func (m *awsRestxml_serializeOpGetAccessPointPolicyForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1615	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1616) {
1617	request, ok := in.Request.(*smithyhttp.Request)
1618	if !ok {
1619		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1620	}
1621
1622	input, ok := in.Parameters.(*GetAccessPointPolicyForObjectLambdaInput)
1623	_ = input
1624	if !ok {
1625		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1626	}
1627
1628	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/policy")
1629	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1630	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1631	request.Method = "GET"
1632	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1633	if err != nil {
1634		return out, metadata, &smithy.SerializationError{Err: err}
1635	}
1636
1637	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyForObjectLambdaInput(input, restEncoder); err != nil {
1638		return out, metadata, &smithy.SerializationError{Err: err}
1639	}
1640
1641	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1642		return out, metadata, &smithy.SerializationError{Err: err}
1643	}
1644	in.Request = request
1645
1646	return next.HandleSerialize(ctx, in)
1647}
1648func awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyForObjectLambdaInput(v *GetAccessPointPolicyForObjectLambdaInput, encoder *httpbinding.Encoder) error {
1649	if v == nil {
1650		return fmt.Errorf("unsupported serialization of nil %T", v)
1651	}
1652
1653	if v.AccountId != nil && len(*v.AccountId) > 0 {
1654		locationName := "X-Amz-Account-Id"
1655		encoder.SetHeader(locationName).String(*v.AccountId)
1656	}
1657
1658	if v.Name == nil || len(*v.Name) == 0 {
1659		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1660	}
1661	if v.Name != nil {
1662		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1663			return err
1664		}
1665	}
1666
1667	return nil
1668}
1669
1670type awsRestxml_serializeOpGetAccessPointPolicyStatus struct {
1671}
1672
1673func (*awsRestxml_serializeOpGetAccessPointPolicyStatus) ID() string {
1674	return "OperationSerializer"
1675}
1676
1677func (m *awsRestxml_serializeOpGetAccessPointPolicyStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1678	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1679) {
1680	request, ok := in.Request.(*smithyhttp.Request)
1681	if !ok {
1682		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1683	}
1684
1685	input, ok := in.Parameters.(*GetAccessPointPolicyStatusInput)
1686	_ = input
1687	if !ok {
1688		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1689	}
1690
1691	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}/policyStatus")
1692	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1693	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1694	request.Method = "GET"
1695	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1696	if err != nil {
1697		return out, metadata, &smithy.SerializationError{Err: err}
1698	}
1699
1700	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyStatusInput(input, restEncoder); err != nil {
1701		return out, metadata, &smithy.SerializationError{Err: err}
1702	}
1703
1704	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1705		return out, metadata, &smithy.SerializationError{Err: err}
1706	}
1707	in.Request = request
1708
1709	return next.HandleSerialize(ctx, in)
1710}
1711func awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyStatusInput(v *GetAccessPointPolicyStatusInput, encoder *httpbinding.Encoder) error {
1712	if v == nil {
1713		return fmt.Errorf("unsupported serialization of nil %T", v)
1714	}
1715
1716	if v.AccountId != nil && len(*v.AccountId) > 0 {
1717		locationName := "X-Amz-Account-Id"
1718		encoder.SetHeader(locationName).String(*v.AccountId)
1719	}
1720
1721	if v.Name == nil || len(*v.Name) == 0 {
1722		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1723	}
1724	if v.Name != nil {
1725		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1726			return err
1727		}
1728	}
1729
1730	return nil
1731}
1732
1733type awsRestxml_serializeOpGetAccessPointPolicyStatusForObjectLambda struct {
1734}
1735
1736func (*awsRestxml_serializeOpGetAccessPointPolicyStatusForObjectLambda) ID() string {
1737	return "OperationSerializer"
1738}
1739
1740func (m *awsRestxml_serializeOpGetAccessPointPolicyStatusForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1741	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1742) {
1743	request, ok := in.Request.(*smithyhttp.Request)
1744	if !ok {
1745		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1746	}
1747
1748	input, ok := in.Parameters.(*GetAccessPointPolicyStatusForObjectLambdaInput)
1749	_ = input
1750	if !ok {
1751		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1752	}
1753
1754	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/policyStatus")
1755	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1756	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1757	request.Method = "GET"
1758	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1759	if err != nil {
1760		return out, metadata, &smithy.SerializationError{Err: err}
1761	}
1762
1763	if err := awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyStatusForObjectLambdaInput(input, restEncoder); err != nil {
1764		return out, metadata, &smithy.SerializationError{Err: err}
1765	}
1766
1767	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1768		return out, metadata, &smithy.SerializationError{Err: err}
1769	}
1770	in.Request = request
1771
1772	return next.HandleSerialize(ctx, in)
1773}
1774func awsRestxml_serializeOpHttpBindingsGetAccessPointPolicyStatusForObjectLambdaInput(v *GetAccessPointPolicyStatusForObjectLambdaInput, encoder *httpbinding.Encoder) error {
1775	if v == nil {
1776		return fmt.Errorf("unsupported serialization of nil %T", v)
1777	}
1778
1779	if v.AccountId != nil && len(*v.AccountId) > 0 {
1780		locationName := "X-Amz-Account-Id"
1781		encoder.SetHeader(locationName).String(*v.AccountId)
1782	}
1783
1784	if v.Name == nil || len(*v.Name) == 0 {
1785		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
1786	}
1787	if v.Name != nil {
1788		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
1789			return err
1790		}
1791	}
1792
1793	return nil
1794}
1795
1796type awsRestxml_serializeOpGetBucket struct {
1797}
1798
1799func (*awsRestxml_serializeOpGetBucket) ID() string {
1800	return "OperationSerializer"
1801}
1802
1803func (m *awsRestxml_serializeOpGetBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1804	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1805) {
1806	request, ok := in.Request.(*smithyhttp.Request)
1807	if !ok {
1808		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1809	}
1810
1811	input, ok := in.Parameters.(*GetBucketInput)
1812	_ = input
1813	if !ok {
1814		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1815	}
1816
1817	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}")
1818	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1819	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1820	request.Method = "GET"
1821	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1822	if err != nil {
1823		return out, metadata, &smithy.SerializationError{Err: err}
1824	}
1825
1826	if err := awsRestxml_serializeOpHttpBindingsGetBucketInput(input, restEncoder); err != nil {
1827		return out, metadata, &smithy.SerializationError{Err: err}
1828	}
1829
1830	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1831		return out, metadata, &smithy.SerializationError{Err: err}
1832	}
1833	in.Request = request
1834
1835	return next.HandleSerialize(ctx, in)
1836}
1837func awsRestxml_serializeOpHttpBindingsGetBucketInput(v *GetBucketInput, encoder *httpbinding.Encoder) error {
1838	if v == nil {
1839		return fmt.Errorf("unsupported serialization of nil %T", v)
1840	}
1841
1842	if v.AccountId != nil && len(*v.AccountId) > 0 {
1843		locationName := "X-Amz-Account-Id"
1844		encoder.SetHeader(locationName).String(*v.AccountId)
1845	}
1846
1847	if v.Bucket == nil || len(*v.Bucket) == 0 {
1848		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
1849	}
1850	if v.Bucket != nil {
1851		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
1852			return err
1853		}
1854	}
1855
1856	return nil
1857}
1858
1859type awsRestxml_serializeOpGetBucketLifecycleConfiguration struct {
1860}
1861
1862func (*awsRestxml_serializeOpGetBucketLifecycleConfiguration) ID() string {
1863	return "OperationSerializer"
1864}
1865
1866func (m *awsRestxml_serializeOpGetBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1867	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1868) {
1869	request, ok := in.Request.(*smithyhttp.Request)
1870	if !ok {
1871		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1872	}
1873
1874	input, ok := in.Parameters.(*GetBucketLifecycleConfigurationInput)
1875	_ = input
1876	if !ok {
1877		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1878	}
1879
1880	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/lifecycleconfiguration")
1881	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1882	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1883	request.Method = "GET"
1884	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1885	if err != nil {
1886		return out, metadata, &smithy.SerializationError{Err: err}
1887	}
1888
1889	if err := awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(input, restEncoder); err != nil {
1890		return out, metadata, &smithy.SerializationError{Err: err}
1891	}
1892
1893	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1894		return out, metadata, &smithy.SerializationError{Err: err}
1895	}
1896	in.Request = request
1897
1898	return next.HandleSerialize(ctx, in)
1899}
1900func awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(v *GetBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error {
1901	if v == nil {
1902		return fmt.Errorf("unsupported serialization of nil %T", v)
1903	}
1904
1905	if v.AccountId != nil && len(*v.AccountId) > 0 {
1906		locationName := "X-Amz-Account-Id"
1907		encoder.SetHeader(locationName).String(*v.AccountId)
1908	}
1909
1910	if v.Bucket == nil || len(*v.Bucket) == 0 {
1911		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
1912	}
1913	if v.Bucket != nil {
1914		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
1915			return err
1916		}
1917	}
1918
1919	return nil
1920}
1921
1922type awsRestxml_serializeOpGetBucketPolicy struct {
1923}
1924
1925func (*awsRestxml_serializeOpGetBucketPolicy) ID() string {
1926	return "OperationSerializer"
1927}
1928
1929func (m *awsRestxml_serializeOpGetBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1930	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1931) {
1932	request, ok := in.Request.(*smithyhttp.Request)
1933	if !ok {
1934		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1935	}
1936
1937	input, ok := in.Parameters.(*GetBucketPolicyInput)
1938	_ = input
1939	if !ok {
1940		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
1941	}
1942
1943	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/policy")
1944	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
1945	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
1946	request.Method = "GET"
1947	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
1948	if err != nil {
1949		return out, metadata, &smithy.SerializationError{Err: err}
1950	}
1951
1952	if err := awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(input, restEncoder); err != nil {
1953		return out, metadata, &smithy.SerializationError{Err: err}
1954	}
1955
1956	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
1957		return out, metadata, &smithy.SerializationError{Err: err}
1958	}
1959	in.Request = request
1960
1961	return next.HandleSerialize(ctx, in)
1962}
1963func awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(v *GetBucketPolicyInput, encoder *httpbinding.Encoder) error {
1964	if v == nil {
1965		return fmt.Errorf("unsupported serialization of nil %T", v)
1966	}
1967
1968	if v.AccountId != nil && len(*v.AccountId) > 0 {
1969		locationName := "X-Amz-Account-Id"
1970		encoder.SetHeader(locationName).String(*v.AccountId)
1971	}
1972
1973	if v.Bucket == nil || len(*v.Bucket) == 0 {
1974		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
1975	}
1976	if v.Bucket != nil {
1977		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
1978			return err
1979		}
1980	}
1981
1982	return nil
1983}
1984
1985type awsRestxml_serializeOpGetBucketTagging struct {
1986}
1987
1988func (*awsRestxml_serializeOpGetBucketTagging) ID() string {
1989	return "OperationSerializer"
1990}
1991
1992func (m *awsRestxml_serializeOpGetBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
1993	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
1994) {
1995	request, ok := in.Request.(*smithyhttp.Request)
1996	if !ok {
1997		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
1998	}
1999
2000	input, ok := in.Parameters.(*GetBucketTaggingInput)
2001	_ = input
2002	if !ok {
2003		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2004	}
2005
2006	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/tagging")
2007	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2008	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2009	request.Method = "GET"
2010	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2011	if err != nil {
2012		return out, metadata, &smithy.SerializationError{Err: err}
2013	}
2014
2015	if err := awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(input, restEncoder); err != nil {
2016		return out, metadata, &smithy.SerializationError{Err: err}
2017	}
2018
2019	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2020		return out, metadata, &smithy.SerializationError{Err: err}
2021	}
2022	in.Request = request
2023
2024	return next.HandleSerialize(ctx, in)
2025}
2026func awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(v *GetBucketTaggingInput, encoder *httpbinding.Encoder) error {
2027	if v == nil {
2028		return fmt.Errorf("unsupported serialization of nil %T", v)
2029	}
2030
2031	if v.AccountId != nil && len(*v.AccountId) > 0 {
2032		locationName := "X-Amz-Account-Id"
2033		encoder.SetHeader(locationName).String(*v.AccountId)
2034	}
2035
2036	if v.Bucket == nil || len(*v.Bucket) == 0 {
2037		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
2038	}
2039	if v.Bucket != nil {
2040		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
2041			return err
2042		}
2043	}
2044
2045	return nil
2046}
2047
2048type awsRestxml_serializeOpGetJobTagging struct {
2049}
2050
2051func (*awsRestxml_serializeOpGetJobTagging) ID() string {
2052	return "OperationSerializer"
2053}
2054
2055func (m *awsRestxml_serializeOpGetJobTagging) 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.(*GetJobTaggingInput)
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("/v20180820/jobs/{JobId}/tagging")
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_serializeOpHttpBindingsGetJobTaggingInput(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_serializeOpHttpBindingsGetJobTaggingInput(v *GetJobTaggingInput, encoder *httpbinding.Encoder) error {
2090	if v == nil {
2091		return fmt.Errorf("unsupported serialization of nil %T", v)
2092	}
2093
2094	if v.AccountId != nil && len(*v.AccountId) > 0 {
2095		locationName := "X-Amz-Account-Id"
2096		encoder.SetHeader(locationName).String(*v.AccountId)
2097	}
2098
2099	if v.JobId == nil || len(*v.JobId) == 0 {
2100		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
2101	}
2102	if v.JobId != nil {
2103		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
2104			return err
2105		}
2106	}
2107
2108	return nil
2109}
2110
2111type awsRestxml_serializeOpGetPublicAccessBlock struct {
2112}
2113
2114func (*awsRestxml_serializeOpGetPublicAccessBlock) ID() string {
2115	return "OperationSerializer"
2116}
2117
2118func (m *awsRestxml_serializeOpGetPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2119	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2120) {
2121	request, ok := in.Request.(*smithyhttp.Request)
2122	if !ok {
2123		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2124	}
2125
2126	input, ok := in.Parameters.(*GetPublicAccessBlockInput)
2127	_ = input
2128	if !ok {
2129		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2130	}
2131
2132	opPath, opQuery := httpbinding.SplitURI("/v20180820/configuration/publicAccessBlock")
2133	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2134	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2135	request.Method = "GET"
2136	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2137	if err != nil {
2138		return out, metadata, &smithy.SerializationError{Err: err}
2139	}
2140
2141	if err := awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(input, restEncoder); err != nil {
2142		return out, metadata, &smithy.SerializationError{Err: err}
2143	}
2144
2145	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2146		return out, metadata, &smithy.SerializationError{Err: err}
2147	}
2148	in.Request = request
2149
2150	return next.HandleSerialize(ctx, in)
2151}
2152func awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(v *GetPublicAccessBlockInput, encoder *httpbinding.Encoder) error {
2153	if v == nil {
2154		return fmt.Errorf("unsupported serialization of nil %T", v)
2155	}
2156
2157	if v.AccountId != nil && len(*v.AccountId) > 0 {
2158		locationName := "X-Amz-Account-Id"
2159		encoder.SetHeader(locationName).String(*v.AccountId)
2160	}
2161
2162	return nil
2163}
2164
2165type awsRestxml_serializeOpGetStorageLensConfiguration struct {
2166}
2167
2168func (*awsRestxml_serializeOpGetStorageLensConfiguration) ID() string {
2169	return "OperationSerializer"
2170}
2171
2172func (m *awsRestxml_serializeOpGetStorageLensConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2173	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2174) {
2175	request, ok := in.Request.(*smithyhttp.Request)
2176	if !ok {
2177		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2178	}
2179
2180	input, ok := in.Parameters.(*GetStorageLensConfigurationInput)
2181	_ = input
2182	if !ok {
2183		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2184	}
2185
2186	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}")
2187	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2188	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2189	request.Method = "GET"
2190	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2191	if err != nil {
2192		return out, metadata, &smithy.SerializationError{Err: err}
2193	}
2194
2195	if err := awsRestxml_serializeOpHttpBindingsGetStorageLensConfigurationInput(input, restEncoder); err != nil {
2196		return out, metadata, &smithy.SerializationError{Err: err}
2197	}
2198
2199	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2200		return out, metadata, &smithy.SerializationError{Err: err}
2201	}
2202	in.Request = request
2203
2204	return next.HandleSerialize(ctx, in)
2205}
2206func awsRestxml_serializeOpHttpBindingsGetStorageLensConfigurationInput(v *GetStorageLensConfigurationInput, encoder *httpbinding.Encoder) error {
2207	if v == nil {
2208		return fmt.Errorf("unsupported serialization of nil %T", v)
2209	}
2210
2211	if v.AccountId != nil && len(*v.AccountId) > 0 {
2212		locationName := "X-Amz-Account-Id"
2213		encoder.SetHeader(locationName).String(*v.AccountId)
2214	}
2215
2216	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
2217		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
2218	}
2219	if v.ConfigId != nil {
2220		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
2221			return err
2222		}
2223	}
2224
2225	return nil
2226}
2227
2228type awsRestxml_serializeOpGetStorageLensConfigurationTagging struct {
2229}
2230
2231func (*awsRestxml_serializeOpGetStorageLensConfigurationTagging) ID() string {
2232	return "OperationSerializer"
2233}
2234
2235func (m *awsRestxml_serializeOpGetStorageLensConfigurationTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2236	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2237) {
2238	request, ok := in.Request.(*smithyhttp.Request)
2239	if !ok {
2240		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2241	}
2242
2243	input, ok := in.Parameters.(*GetStorageLensConfigurationTaggingInput)
2244	_ = input
2245	if !ok {
2246		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2247	}
2248
2249	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}/tagging")
2250	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2251	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2252	request.Method = "GET"
2253	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2254	if err != nil {
2255		return out, metadata, &smithy.SerializationError{Err: err}
2256	}
2257
2258	if err := awsRestxml_serializeOpHttpBindingsGetStorageLensConfigurationTaggingInput(input, restEncoder); err != nil {
2259		return out, metadata, &smithy.SerializationError{Err: err}
2260	}
2261
2262	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2263		return out, metadata, &smithy.SerializationError{Err: err}
2264	}
2265	in.Request = request
2266
2267	return next.HandleSerialize(ctx, in)
2268}
2269func awsRestxml_serializeOpHttpBindingsGetStorageLensConfigurationTaggingInput(v *GetStorageLensConfigurationTaggingInput, encoder *httpbinding.Encoder) error {
2270	if v == nil {
2271		return fmt.Errorf("unsupported serialization of nil %T", v)
2272	}
2273
2274	if v.AccountId != nil && len(*v.AccountId) > 0 {
2275		locationName := "X-Amz-Account-Id"
2276		encoder.SetHeader(locationName).String(*v.AccountId)
2277	}
2278
2279	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
2280		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
2281	}
2282	if v.ConfigId != nil {
2283		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
2284			return err
2285		}
2286	}
2287
2288	return nil
2289}
2290
2291type awsRestxml_serializeOpListAccessPoints struct {
2292}
2293
2294func (*awsRestxml_serializeOpListAccessPoints) ID() string {
2295	return "OperationSerializer"
2296}
2297
2298func (m *awsRestxml_serializeOpListAccessPoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2299	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2300) {
2301	request, ok := in.Request.(*smithyhttp.Request)
2302	if !ok {
2303		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2304	}
2305
2306	input, ok := in.Parameters.(*ListAccessPointsInput)
2307	_ = input
2308	if !ok {
2309		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2310	}
2311
2312	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint")
2313	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2314	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2315	request.Method = "GET"
2316	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2317	if err != nil {
2318		return out, metadata, &smithy.SerializationError{Err: err}
2319	}
2320
2321	if err := awsRestxml_serializeOpHttpBindingsListAccessPointsInput(input, restEncoder); err != nil {
2322		return out, metadata, &smithy.SerializationError{Err: err}
2323	}
2324
2325	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2326		return out, metadata, &smithy.SerializationError{Err: err}
2327	}
2328	in.Request = request
2329
2330	return next.HandleSerialize(ctx, in)
2331}
2332func awsRestxml_serializeOpHttpBindingsListAccessPointsInput(v *ListAccessPointsInput, encoder *httpbinding.Encoder) error {
2333	if v == nil {
2334		return fmt.Errorf("unsupported serialization of nil %T", v)
2335	}
2336
2337	if v.AccountId != nil && len(*v.AccountId) > 0 {
2338		locationName := "X-Amz-Account-Id"
2339		encoder.SetHeader(locationName).String(*v.AccountId)
2340	}
2341
2342	if v.Bucket != nil {
2343		encoder.SetQuery("bucket").String(*v.Bucket)
2344	}
2345
2346	if v.MaxResults != 0 {
2347		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2348	}
2349
2350	if v.NextToken != nil {
2351		encoder.SetQuery("nextToken").String(*v.NextToken)
2352	}
2353
2354	return nil
2355}
2356
2357type awsRestxml_serializeOpListAccessPointsForObjectLambda struct {
2358}
2359
2360func (*awsRestxml_serializeOpListAccessPointsForObjectLambda) ID() string {
2361	return "OperationSerializer"
2362}
2363
2364func (m *awsRestxml_serializeOpListAccessPointsForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2365	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2366) {
2367	request, ok := in.Request.(*smithyhttp.Request)
2368	if !ok {
2369		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2370	}
2371
2372	input, ok := in.Parameters.(*ListAccessPointsForObjectLambdaInput)
2373	_ = input
2374	if !ok {
2375		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2376	}
2377
2378	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda")
2379	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2380	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2381	request.Method = "GET"
2382	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2383	if err != nil {
2384		return out, metadata, &smithy.SerializationError{Err: err}
2385	}
2386
2387	if err := awsRestxml_serializeOpHttpBindingsListAccessPointsForObjectLambdaInput(input, restEncoder); err != nil {
2388		return out, metadata, &smithy.SerializationError{Err: err}
2389	}
2390
2391	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2392		return out, metadata, &smithy.SerializationError{Err: err}
2393	}
2394	in.Request = request
2395
2396	return next.HandleSerialize(ctx, in)
2397}
2398func awsRestxml_serializeOpHttpBindingsListAccessPointsForObjectLambdaInput(v *ListAccessPointsForObjectLambdaInput, encoder *httpbinding.Encoder) error {
2399	if v == nil {
2400		return fmt.Errorf("unsupported serialization of nil %T", v)
2401	}
2402
2403	if v.AccountId != nil && len(*v.AccountId) > 0 {
2404		locationName := "X-Amz-Account-Id"
2405		encoder.SetHeader(locationName).String(*v.AccountId)
2406	}
2407
2408	if v.MaxResults != 0 {
2409		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2410	}
2411
2412	if v.NextToken != nil {
2413		encoder.SetQuery("nextToken").String(*v.NextToken)
2414	}
2415
2416	return nil
2417}
2418
2419type awsRestxml_serializeOpListJobs struct {
2420}
2421
2422func (*awsRestxml_serializeOpListJobs) ID() string {
2423	return "OperationSerializer"
2424}
2425
2426func (m *awsRestxml_serializeOpListJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2427	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2428) {
2429	request, ok := in.Request.(*smithyhttp.Request)
2430	if !ok {
2431		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2432	}
2433
2434	input, ok := in.Parameters.(*ListJobsInput)
2435	_ = input
2436	if !ok {
2437		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2438	}
2439
2440	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs")
2441	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2442	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2443	request.Method = "GET"
2444	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2445	if err != nil {
2446		return out, metadata, &smithy.SerializationError{Err: err}
2447	}
2448
2449	if err := awsRestxml_serializeOpHttpBindingsListJobsInput(input, restEncoder); err != nil {
2450		return out, metadata, &smithy.SerializationError{Err: err}
2451	}
2452
2453	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2454		return out, metadata, &smithy.SerializationError{Err: err}
2455	}
2456	in.Request = request
2457
2458	return next.HandleSerialize(ctx, in)
2459}
2460func awsRestxml_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder *httpbinding.Encoder) error {
2461	if v == nil {
2462		return fmt.Errorf("unsupported serialization of nil %T", v)
2463	}
2464
2465	if v.AccountId != nil && len(*v.AccountId) > 0 {
2466		locationName := "X-Amz-Account-Id"
2467		encoder.SetHeader(locationName).String(*v.AccountId)
2468	}
2469
2470	if v.JobStatuses != nil {
2471		for i := range v.JobStatuses {
2472			encoder.AddQuery("jobStatuses").String(string(v.JobStatuses[i]))
2473		}
2474	}
2475
2476	if v.MaxResults != 0 {
2477		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2478	}
2479
2480	if v.NextToken != nil {
2481		encoder.SetQuery("nextToken").String(*v.NextToken)
2482	}
2483
2484	return nil
2485}
2486
2487type awsRestxml_serializeOpListRegionalBuckets struct {
2488}
2489
2490func (*awsRestxml_serializeOpListRegionalBuckets) ID() string {
2491	return "OperationSerializer"
2492}
2493
2494func (m *awsRestxml_serializeOpListRegionalBuckets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2495	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2496) {
2497	request, ok := in.Request.(*smithyhttp.Request)
2498	if !ok {
2499		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2500	}
2501
2502	input, ok := in.Parameters.(*ListRegionalBucketsInput)
2503	_ = input
2504	if !ok {
2505		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2506	}
2507
2508	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket")
2509	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2510	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2511	request.Method = "GET"
2512	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2513	if err != nil {
2514		return out, metadata, &smithy.SerializationError{Err: err}
2515	}
2516
2517	if err := awsRestxml_serializeOpHttpBindingsListRegionalBucketsInput(input, restEncoder); err != nil {
2518		return out, metadata, &smithy.SerializationError{Err: err}
2519	}
2520
2521	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2522		return out, metadata, &smithy.SerializationError{Err: err}
2523	}
2524	in.Request = request
2525
2526	return next.HandleSerialize(ctx, in)
2527}
2528func awsRestxml_serializeOpHttpBindingsListRegionalBucketsInput(v *ListRegionalBucketsInput, encoder *httpbinding.Encoder) error {
2529	if v == nil {
2530		return fmt.Errorf("unsupported serialization of nil %T", v)
2531	}
2532
2533	if v.AccountId != nil && len(*v.AccountId) > 0 {
2534		locationName := "X-Amz-Account-Id"
2535		encoder.SetHeader(locationName).String(*v.AccountId)
2536	}
2537
2538	if v.MaxResults != 0 {
2539		encoder.SetQuery("maxResults").Integer(v.MaxResults)
2540	}
2541
2542	if v.NextToken != nil {
2543		encoder.SetQuery("nextToken").String(*v.NextToken)
2544	}
2545
2546	if v.OutpostId != nil && len(*v.OutpostId) > 0 {
2547		locationName := "X-Amz-Outpost-Id"
2548		encoder.SetHeader(locationName).String(*v.OutpostId)
2549	}
2550
2551	return nil
2552}
2553
2554type awsRestxml_serializeOpListStorageLensConfigurations struct {
2555}
2556
2557func (*awsRestxml_serializeOpListStorageLensConfigurations) ID() string {
2558	return "OperationSerializer"
2559}
2560
2561func (m *awsRestxml_serializeOpListStorageLensConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2562	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2563) {
2564	request, ok := in.Request.(*smithyhttp.Request)
2565	if !ok {
2566		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2567	}
2568
2569	input, ok := in.Parameters.(*ListStorageLensConfigurationsInput)
2570	_ = input
2571	if !ok {
2572		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2573	}
2574
2575	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens")
2576	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2577	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2578	request.Method = "GET"
2579	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2580	if err != nil {
2581		return out, metadata, &smithy.SerializationError{Err: err}
2582	}
2583
2584	if err := awsRestxml_serializeOpHttpBindingsListStorageLensConfigurationsInput(input, restEncoder); err != nil {
2585		return out, metadata, &smithy.SerializationError{Err: err}
2586	}
2587
2588	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2589		return out, metadata, &smithy.SerializationError{Err: err}
2590	}
2591	in.Request = request
2592
2593	return next.HandleSerialize(ctx, in)
2594}
2595func awsRestxml_serializeOpHttpBindingsListStorageLensConfigurationsInput(v *ListStorageLensConfigurationsInput, encoder *httpbinding.Encoder) error {
2596	if v == nil {
2597		return fmt.Errorf("unsupported serialization of nil %T", v)
2598	}
2599
2600	if v.AccountId != nil && len(*v.AccountId) > 0 {
2601		locationName := "X-Amz-Account-Id"
2602		encoder.SetHeader(locationName).String(*v.AccountId)
2603	}
2604
2605	if v.NextToken != nil {
2606		encoder.SetQuery("nextToken").String(*v.NextToken)
2607	}
2608
2609	return nil
2610}
2611
2612type awsRestxml_serializeOpPutAccessPointConfigurationForObjectLambda struct {
2613}
2614
2615func (*awsRestxml_serializeOpPutAccessPointConfigurationForObjectLambda) ID() string {
2616	return "OperationSerializer"
2617}
2618
2619func (m *awsRestxml_serializeOpPutAccessPointConfigurationForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2620	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2621) {
2622	request, ok := in.Request.(*smithyhttp.Request)
2623	if !ok {
2624		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2625	}
2626
2627	input, ok := in.Parameters.(*PutAccessPointConfigurationForObjectLambdaInput)
2628	_ = input
2629	if !ok {
2630		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2631	}
2632
2633	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/configuration")
2634	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2635	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2636	request.Method = "PUT"
2637	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2638	if err != nil {
2639		return out, metadata, &smithy.SerializationError{Err: err}
2640	}
2641
2642	if err := awsRestxml_serializeOpHttpBindingsPutAccessPointConfigurationForObjectLambdaInput(input, restEncoder); err != nil {
2643		return out, metadata, &smithy.SerializationError{Err: err}
2644	}
2645
2646	restEncoder.SetHeader("Content-Type").String("application/xml")
2647
2648	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
2649	rootAttr := []smithyxml.Attr{}
2650	root := smithyxml.StartElement{
2651		Name: smithyxml.Name{
2652			Local: "PutAccessPointConfigurationForObjectLambdaRequest",
2653		},
2654		Attr: rootAttr,
2655	}
2656	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
2657	if err := awsRestxml_serializeOpDocumentPutAccessPointConfigurationForObjectLambdaInput(input, xmlEncoder.RootElement(root)); err != nil {
2658		return out, metadata, &smithy.SerializationError{Err: err}
2659	}
2660	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
2661		return out, metadata, &smithy.SerializationError{Err: err}
2662	}
2663
2664	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2665		return out, metadata, &smithy.SerializationError{Err: err}
2666	}
2667	in.Request = request
2668
2669	return next.HandleSerialize(ctx, in)
2670}
2671func awsRestxml_serializeOpHttpBindingsPutAccessPointConfigurationForObjectLambdaInput(v *PutAccessPointConfigurationForObjectLambdaInput, encoder *httpbinding.Encoder) error {
2672	if v == nil {
2673		return fmt.Errorf("unsupported serialization of nil %T", v)
2674	}
2675
2676	if v.AccountId != nil && len(*v.AccountId) > 0 {
2677		locationName := "X-Amz-Account-Id"
2678		encoder.SetHeader(locationName).String(*v.AccountId)
2679	}
2680
2681	if v.Name == nil || len(*v.Name) == 0 {
2682		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
2683	}
2684	if v.Name != nil {
2685		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
2686			return err
2687		}
2688	}
2689
2690	return nil
2691}
2692
2693func awsRestxml_serializeOpDocumentPutAccessPointConfigurationForObjectLambdaInput(v *PutAccessPointConfigurationForObjectLambdaInput, value smithyxml.Value) error {
2694	defer value.Close()
2695	if v.Configuration != nil {
2696		rootAttr := []smithyxml.Attr{}
2697		root := smithyxml.StartElement{
2698			Name: smithyxml.Name{
2699				Local: "Configuration",
2700			},
2701			Attr: rootAttr,
2702		}
2703		el := value.MemberElement(root)
2704		if err := awsRestxml_serializeDocumentObjectLambdaConfiguration(v.Configuration, el); err != nil {
2705			return err
2706		}
2707	}
2708	return nil
2709}
2710
2711type awsRestxml_serializeOpPutAccessPointPolicy struct {
2712}
2713
2714func (*awsRestxml_serializeOpPutAccessPointPolicy) ID() string {
2715	return "OperationSerializer"
2716}
2717
2718func (m *awsRestxml_serializeOpPutAccessPointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2719	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2720) {
2721	request, ok := in.Request.(*smithyhttp.Request)
2722	if !ok {
2723		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2724	}
2725
2726	input, ok := in.Parameters.(*PutAccessPointPolicyInput)
2727	_ = input
2728	if !ok {
2729		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2730	}
2731
2732	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspoint/{Name}/policy")
2733	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2734	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2735	request.Method = "PUT"
2736	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2737	if err != nil {
2738		return out, metadata, &smithy.SerializationError{Err: err}
2739	}
2740
2741	if err := awsRestxml_serializeOpHttpBindingsPutAccessPointPolicyInput(input, restEncoder); err != nil {
2742		return out, metadata, &smithy.SerializationError{Err: err}
2743	}
2744
2745	restEncoder.SetHeader("Content-Type").String("application/xml")
2746
2747	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
2748	rootAttr := []smithyxml.Attr{}
2749	root := smithyxml.StartElement{
2750		Name: smithyxml.Name{
2751			Local: "PutAccessPointPolicyRequest",
2752		},
2753		Attr: rootAttr,
2754	}
2755	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
2756	if err := awsRestxml_serializeOpDocumentPutAccessPointPolicyInput(input, xmlEncoder.RootElement(root)); err != nil {
2757		return out, metadata, &smithy.SerializationError{Err: err}
2758	}
2759	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
2760		return out, metadata, &smithy.SerializationError{Err: err}
2761	}
2762
2763	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2764		return out, metadata, &smithy.SerializationError{Err: err}
2765	}
2766	in.Request = request
2767
2768	return next.HandleSerialize(ctx, in)
2769}
2770func awsRestxml_serializeOpHttpBindingsPutAccessPointPolicyInput(v *PutAccessPointPolicyInput, encoder *httpbinding.Encoder) error {
2771	if v == nil {
2772		return fmt.Errorf("unsupported serialization of nil %T", v)
2773	}
2774
2775	if v.AccountId != nil && len(*v.AccountId) > 0 {
2776		locationName := "X-Amz-Account-Id"
2777		encoder.SetHeader(locationName).String(*v.AccountId)
2778	}
2779
2780	if v.Name == nil || len(*v.Name) == 0 {
2781		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
2782	}
2783	if v.Name != nil {
2784		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
2785			return err
2786		}
2787	}
2788
2789	return nil
2790}
2791
2792func awsRestxml_serializeOpDocumentPutAccessPointPolicyInput(v *PutAccessPointPolicyInput, value smithyxml.Value) error {
2793	defer value.Close()
2794	if v.Policy != nil {
2795		rootAttr := []smithyxml.Attr{}
2796		root := smithyxml.StartElement{
2797			Name: smithyxml.Name{
2798				Local: "Policy",
2799			},
2800			Attr: rootAttr,
2801		}
2802		el := value.MemberElement(root)
2803		el.String(*v.Policy)
2804	}
2805	return nil
2806}
2807
2808type awsRestxml_serializeOpPutAccessPointPolicyForObjectLambda struct {
2809}
2810
2811func (*awsRestxml_serializeOpPutAccessPointPolicyForObjectLambda) ID() string {
2812	return "OperationSerializer"
2813}
2814
2815func (m *awsRestxml_serializeOpPutAccessPointPolicyForObjectLambda) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2816	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2817) {
2818	request, ok := in.Request.(*smithyhttp.Request)
2819	if !ok {
2820		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2821	}
2822
2823	input, ok := in.Parameters.(*PutAccessPointPolicyForObjectLambdaInput)
2824	_ = input
2825	if !ok {
2826		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2827	}
2828
2829	opPath, opQuery := httpbinding.SplitURI("/v20180820/accesspointforobjectlambda/{Name}/policy")
2830	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2831	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2832	request.Method = "PUT"
2833	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2834	if err != nil {
2835		return out, metadata, &smithy.SerializationError{Err: err}
2836	}
2837
2838	if err := awsRestxml_serializeOpHttpBindingsPutAccessPointPolicyForObjectLambdaInput(input, restEncoder); err != nil {
2839		return out, metadata, &smithy.SerializationError{Err: err}
2840	}
2841
2842	restEncoder.SetHeader("Content-Type").String("application/xml")
2843
2844	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
2845	rootAttr := []smithyxml.Attr{}
2846	root := smithyxml.StartElement{
2847		Name: smithyxml.Name{
2848			Local: "PutAccessPointPolicyForObjectLambdaRequest",
2849		},
2850		Attr: rootAttr,
2851	}
2852	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
2853	if err := awsRestxml_serializeOpDocumentPutAccessPointPolicyForObjectLambdaInput(input, xmlEncoder.RootElement(root)); err != nil {
2854		return out, metadata, &smithy.SerializationError{Err: err}
2855	}
2856	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
2857		return out, metadata, &smithy.SerializationError{Err: err}
2858	}
2859
2860	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2861		return out, metadata, &smithy.SerializationError{Err: err}
2862	}
2863	in.Request = request
2864
2865	return next.HandleSerialize(ctx, in)
2866}
2867func awsRestxml_serializeOpHttpBindingsPutAccessPointPolicyForObjectLambdaInput(v *PutAccessPointPolicyForObjectLambdaInput, encoder *httpbinding.Encoder) error {
2868	if v == nil {
2869		return fmt.Errorf("unsupported serialization of nil %T", v)
2870	}
2871
2872	if v.AccountId != nil && len(*v.AccountId) > 0 {
2873		locationName := "X-Amz-Account-Id"
2874		encoder.SetHeader(locationName).String(*v.AccountId)
2875	}
2876
2877	if v.Name == nil || len(*v.Name) == 0 {
2878		return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
2879	}
2880	if v.Name != nil {
2881		if err := encoder.SetURI("Name").String(*v.Name); err != nil {
2882			return err
2883		}
2884	}
2885
2886	return nil
2887}
2888
2889func awsRestxml_serializeOpDocumentPutAccessPointPolicyForObjectLambdaInput(v *PutAccessPointPolicyForObjectLambdaInput, value smithyxml.Value) error {
2890	defer value.Close()
2891	if v.Policy != nil {
2892		rootAttr := []smithyxml.Attr{}
2893		root := smithyxml.StartElement{
2894			Name: smithyxml.Name{
2895				Local: "Policy",
2896			},
2897			Attr: rootAttr,
2898		}
2899		el := value.MemberElement(root)
2900		el.String(*v.Policy)
2901	}
2902	return nil
2903}
2904
2905type awsRestxml_serializeOpPutBucketLifecycleConfiguration struct {
2906}
2907
2908func (*awsRestxml_serializeOpPutBucketLifecycleConfiguration) ID() string {
2909	return "OperationSerializer"
2910}
2911
2912func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2913	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
2914) {
2915	request, ok := in.Request.(*smithyhttp.Request)
2916	if !ok {
2917		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
2918	}
2919
2920	input, ok := in.Parameters.(*PutBucketLifecycleConfigurationInput)
2921	_ = input
2922	if !ok {
2923		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
2924	}
2925
2926	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/lifecycleconfiguration")
2927	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
2928	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
2929	request.Method = "PUT"
2930	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
2931	if err != nil {
2932		return out, metadata, &smithy.SerializationError{Err: err}
2933	}
2934
2935	if err := awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(input, restEncoder); err != nil {
2936		return out, metadata, &smithy.SerializationError{Err: err}
2937	}
2938
2939	if input.LifecycleConfiguration != nil {
2940		if !restEncoder.HasHeader("Content-Type") {
2941			restEncoder.SetHeader("Content-Type").String("application/xml")
2942		}
2943
2944		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
2945		payloadRootAttr := []smithyxml.Attr{}
2946		payloadRoot := smithyxml.StartElement{
2947			Name: smithyxml.Name{
2948				Local: "LifecycleConfiguration",
2949			},
2950			Attr: payloadRootAttr,
2951		}
2952		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
2953		if err := awsRestxml_serializeDocumentLifecycleConfiguration(input.LifecycleConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
2954			return out, metadata, &smithy.SerializationError{Err: err}
2955		}
2956		payload := bytes.NewReader(xmlEncoder.Bytes())
2957		if request, err = request.SetStream(payload); err != nil {
2958			return out, metadata, &smithy.SerializationError{Err: err}
2959		}
2960	}
2961
2962	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
2963		return out, metadata, &smithy.SerializationError{Err: err}
2964	}
2965	in.Request = request
2966
2967	return next.HandleSerialize(ctx, in)
2968}
2969func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *PutBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error {
2970	if v == nil {
2971		return fmt.Errorf("unsupported serialization of nil %T", v)
2972	}
2973
2974	if v.AccountId != nil && len(*v.AccountId) > 0 {
2975		locationName := "X-Amz-Account-Id"
2976		encoder.SetHeader(locationName).String(*v.AccountId)
2977	}
2978
2979	if v.Bucket == nil || len(*v.Bucket) == 0 {
2980		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
2981	}
2982	if v.Bucket != nil {
2983		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
2984			return err
2985		}
2986	}
2987
2988	return nil
2989}
2990
2991type awsRestxml_serializeOpPutBucketPolicy struct {
2992}
2993
2994func (*awsRestxml_serializeOpPutBucketPolicy) ID() string {
2995	return "OperationSerializer"
2996}
2997
2998func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
2999	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3000) {
3001	request, ok := in.Request.(*smithyhttp.Request)
3002	if !ok {
3003		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3004	}
3005
3006	input, ok := in.Parameters.(*PutBucketPolicyInput)
3007	_ = input
3008	if !ok {
3009		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3010	}
3011
3012	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/policy")
3013	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3014	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3015	request.Method = "PUT"
3016	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3017	if err != nil {
3018		return out, metadata, &smithy.SerializationError{Err: err}
3019	}
3020
3021	if err := awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(input, restEncoder); err != nil {
3022		return out, metadata, &smithy.SerializationError{Err: err}
3023	}
3024
3025	restEncoder.SetHeader("Content-Type").String("application/xml")
3026
3027	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3028	rootAttr := []smithyxml.Attr{}
3029	root := smithyxml.StartElement{
3030		Name: smithyxml.Name{
3031			Local: "PutBucketPolicyRequest",
3032		},
3033		Attr: rootAttr,
3034	}
3035	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3036	if err := awsRestxml_serializeOpDocumentPutBucketPolicyInput(input, xmlEncoder.RootElement(root)); err != nil {
3037		return out, metadata, &smithy.SerializationError{Err: err}
3038	}
3039	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
3040		return out, metadata, &smithy.SerializationError{Err: err}
3041	}
3042
3043	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3044		return out, metadata, &smithy.SerializationError{Err: err}
3045	}
3046	in.Request = request
3047
3048	return next.HandleSerialize(ctx, in)
3049}
3050func awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(v *PutBucketPolicyInput, encoder *httpbinding.Encoder) error {
3051	if v == nil {
3052		return fmt.Errorf("unsupported serialization of nil %T", v)
3053	}
3054
3055	if v.AccountId != nil && len(*v.AccountId) > 0 {
3056		locationName := "X-Amz-Account-Id"
3057		encoder.SetHeader(locationName).String(*v.AccountId)
3058	}
3059
3060	if v.Bucket == nil || len(*v.Bucket) == 0 {
3061		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
3062	}
3063	if v.Bucket != nil {
3064		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
3065			return err
3066		}
3067	}
3068
3069	if v.ConfirmRemoveSelfBucketAccess {
3070		locationName := "X-Amz-Confirm-Remove-Self-Bucket-Access"
3071		encoder.SetHeader(locationName).Boolean(v.ConfirmRemoveSelfBucketAccess)
3072	}
3073
3074	return nil
3075}
3076
3077func awsRestxml_serializeOpDocumentPutBucketPolicyInput(v *PutBucketPolicyInput, value smithyxml.Value) error {
3078	defer value.Close()
3079	if v.Policy != nil {
3080		rootAttr := []smithyxml.Attr{}
3081		root := smithyxml.StartElement{
3082			Name: smithyxml.Name{
3083				Local: "Policy",
3084			},
3085			Attr: rootAttr,
3086		}
3087		el := value.MemberElement(root)
3088		el.String(*v.Policy)
3089	}
3090	return nil
3091}
3092
3093type awsRestxml_serializeOpPutBucketTagging struct {
3094}
3095
3096func (*awsRestxml_serializeOpPutBucketTagging) ID() string {
3097	return "OperationSerializer"
3098}
3099
3100func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3101	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3102) {
3103	request, ok := in.Request.(*smithyhttp.Request)
3104	if !ok {
3105		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3106	}
3107
3108	input, ok := in.Parameters.(*PutBucketTaggingInput)
3109	_ = input
3110	if !ok {
3111		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3112	}
3113
3114	opPath, opQuery := httpbinding.SplitURI("/v20180820/bucket/{Bucket}/tagging")
3115	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3116	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3117	request.Method = "PUT"
3118	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3119	if err != nil {
3120		return out, metadata, &smithy.SerializationError{Err: err}
3121	}
3122
3123	if err := awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(input, restEncoder); err != nil {
3124		return out, metadata, &smithy.SerializationError{Err: err}
3125	}
3126
3127	if input.Tagging != nil {
3128		if !restEncoder.HasHeader("Content-Type") {
3129			restEncoder.SetHeader("Content-Type").String("application/xml")
3130		}
3131
3132		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3133		payloadRootAttr := []smithyxml.Attr{}
3134		payloadRoot := smithyxml.StartElement{
3135			Name: smithyxml.Name{
3136				Local: "Tagging",
3137			},
3138			Attr: payloadRootAttr,
3139		}
3140		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3141		if err := awsRestxml_serializeDocumentTagging(input.Tagging, xmlEncoder.RootElement(payloadRoot)); err != nil {
3142			return out, metadata, &smithy.SerializationError{Err: err}
3143		}
3144		payload := bytes.NewReader(xmlEncoder.Bytes())
3145		if request, err = request.SetStream(payload); err != nil {
3146			return out, metadata, &smithy.SerializationError{Err: err}
3147		}
3148	}
3149
3150	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3151		return out, metadata, &smithy.SerializationError{Err: err}
3152	}
3153	in.Request = request
3154
3155	return next.HandleSerialize(ctx, in)
3156}
3157func awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(v *PutBucketTaggingInput, encoder *httpbinding.Encoder) error {
3158	if v == nil {
3159		return fmt.Errorf("unsupported serialization of nil %T", v)
3160	}
3161
3162	if v.AccountId != nil && len(*v.AccountId) > 0 {
3163		locationName := "X-Amz-Account-Id"
3164		encoder.SetHeader(locationName).String(*v.AccountId)
3165	}
3166
3167	if v.Bucket == nil || len(*v.Bucket) == 0 {
3168		return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
3169	}
3170	if v.Bucket != nil {
3171		if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
3172			return err
3173		}
3174	}
3175
3176	return nil
3177}
3178
3179type awsRestxml_serializeOpPutJobTagging struct {
3180}
3181
3182func (*awsRestxml_serializeOpPutJobTagging) ID() string {
3183	return "OperationSerializer"
3184}
3185
3186func (m *awsRestxml_serializeOpPutJobTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3187	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3188) {
3189	request, ok := in.Request.(*smithyhttp.Request)
3190	if !ok {
3191		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3192	}
3193
3194	input, ok := in.Parameters.(*PutJobTaggingInput)
3195	_ = input
3196	if !ok {
3197		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3198	}
3199
3200	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs/{JobId}/tagging")
3201	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3202	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3203	request.Method = "PUT"
3204	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3205	if err != nil {
3206		return out, metadata, &smithy.SerializationError{Err: err}
3207	}
3208
3209	if err := awsRestxml_serializeOpHttpBindingsPutJobTaggingInput(input, restEncoder); err != nil {
3210		return out, metadata, &smithy.SerializationError{Err: err}
3211	}
3212
3213	restEncoder.SetHeader("Content-Type").String("application/xml")
3214
3215	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3216	rootAttr := []smithyxml.Attr{}
3217	root := smithyxml.StartElement{
3218		Name: smithyxml.Name{
3219			Local: "PutJobTaggingRequest",
3220		},
3221		Attr: rootAttr,
3222	}
3223	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3224	if err := awsRestxml_serializeOpDocumentPutJobTaggingInput(input, xmlEncoder.RootElement(root)); err != nil {
3225		return out, metadata, &smithy.SerializationError{Err: err}
3226	}
3227	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
3228		return out, metadata, &smithy.SerializationError{Err: err}
3229	}
3230
3231	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3232		return out, metadata, &smithy.SerializationError{Err: err}
3233	}
3234	in.Request = request
3235
3236	return next.HandleSerialize(ctx, in)
3237}
3238func awsRestxml_serializeOpHttpBindingsPutJobTaggingInput(v *PutJobTaggingInput, encoder *httpbinding.Encoder) error {
3239	if v == nil {
3240		return fmt.Errorf("unsupported serialization of nil %T", v)
3241	}
3242
3243	if v.AccountId != nil && len(*v.AccountId) > 0 {
3244		locationName := "X-Amz-Account-Id"
3245		encoder.SetHeader(locationName).String(*v.AccountId)
3246	}
3247
3248	if v.JobId == nil || len(*v.JobId) == 0 {
3249		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
3250	}
3251	if v.JobId != nil {
3252		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
3253			return err
3254		}
3255	}
3256
3257	return nil
3258}
3259
3260func awsRestxml_serializeOpDocumentPutJobTaggingInput(v *PutJobTaggingInput, value smithyxml.Value) error {
3261	defer value.Close()
3262	if v.Tags != nil {
3263		rootAttr := []smithyxml.Attr{}
3264		root := smithyxml.StartElement{
3265			Name: smithyxml.Name{
3266				Local: "Tags",
3267			},
3268			Attr: rootAttr,
3269		}
3270		el := value.MemberElement(root)
3271		if err := awsRestxml_serializeDocumentS3TagSet(v.Tags, el); err != nil {
3272			return err
3273		}
3274	}
3275	return nil
3276}
3277
3278type awsRestxml_serializeOpPutPublicAccessBlock struct {
3279}
3280
3281func (*awsRestxml_serializeOpPutPublicAccessBlock) ID() string {
3282	return "OperationSerializer"
3283}
3284
3285func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3286	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3287) {
3288	request, ok := in.Request.(*smithyhttp.Request)
3289	if !ok {
3290		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3291	}
3292
3293	input, ok := in.Parameters.(*PutPublicAccessBlockInput)
3294	_ = input
3295	if !ok {
3296		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3297	}
3298
3299	opPath, opQuery := httpbinding.SplitURI("/v20180820/configuration/publicAccessBlock")
3300	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3301	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3302	request.Method = "PUT"
3303	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3304	if err != nil {
3305		return out, metadata, &smithy.SerializationError{Err: err}
3306	}
3307
3308	if err := awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(input, restEncoder); err != nil {
3309		return out, metadata, &smithy.SerializationError{Err: err}
3310	}
3311
3312	if input.PublicAccessBlockConfiguration != nil {
3313		if !restEncoder.HasHeader("Content-Type") {
3314			restEncoder.SetHeader("Content-Type").String("application/xml")
3315		}
3316
3317		xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3318		payloadRootAttr := []smithyxml.Attr{}
3319		payloadRoot := smithyxml.StartElement{
3320			Name: smithyxml.Name{
3321				Local: "PublicAccessBlockConfiguration",
3322			},
3323			Attr: payloadRootAttr,
3324		}
3325		payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3326		if err := awsRestxml_serializeDocumentPublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
3327			return out, metadata, &smithy.SerializationError{Err: err}
3328		}
3329		payload := bytes.NewReader(xmlEncoder.Bytes())
3330		if request, err = request.SetStream(payload); err != nil {
3331			return out, metadata, &smithy.SerializationError{Err: err}
3332		}
3333	}
3334
3335	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3336		return out, metadata, &smithy.SerializationError{Err: err}
3337	}
3338	in.Request = request
3339
3340	return next.HandleSerialize(ctx, in)
3341}
3342func awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(v *PutPublicAccessBlockInput, encoder *httpbinding.Encoder) error {
3343	if v == nil {
3344		return fmt.Errorf("unsupported serialization of nil %T", v)
3345	}
3346
3347	if v.AccountId != nil && len(*v.AccountId) > 0 {
3348		locationName := "X-Amz-Account-Id"
3349		encoder.SetHeader(locationName).String(*v.AccountId)
3350	}
3351
3352	return nil
3353}
3354
3355type awsRestxml_serializeOpPutStorageLensConfiguration struct {
3356}
3357
3358func (*awsRestxml_serializeOpPutStorageLensConfiguration) ID() string {
3359	return "OperationSerializer"
3360}
3361
3362func (m *awsRestxml_serializeOpPutStorageLensConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3363	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3364) {
3365	request, ok := in.Request.(*smithyhttp.Request)
3366	if !ok {
3367		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3368	}
3369
3370	input, ok := in.Parameters.(*PutStorageLensConfigurationInput)
3371	_ = input
3372	if !ok {
3373		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3374	}
3375
3376	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}")
3377	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3378	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3379	request.Method = "PUT"
3380	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3381	if err != nil {
3382		return out, metadata, &smithy.SerializationError{Err: err}
3383	}
3384
3385	if err := awsRestxml_serializeOpHttpBindingsPutStorageLensConfigurationInput(input, restEncoder); err != nil {
3386		return out, metadata, &smithy.SerializationError{Err: err}
3387	}
3388
3389	restEncoder.SetHeader("Content-Type").String("application/xml")
3390
3391	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3392	rootAttr := []smithyxml.Attr{}
3393	root := smithyxml.StartElement{
3394		Name: smithyxml.Name{
3395			Local: "PutStorageLensConfigurationRequest",
3396		},
3397		Attr: rootAttr,
3398	}
3399	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3400	if err := awsRestxml_serializeOpDocumentPutStorageLensConfigurationInput(input, xmlEncoder.RootElement(root)); err != nil {
3401		return out, metadata, &smithy.SerializationError{Err: err}
3402	}
3403	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
3404		return out, metadata, &smithy.SerializationError{Err: err}
3405	}
3406
3407	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3408		return out, metadata, &smithy.SerializationError{Err: err}
3409	}
3410	in.Request = request
3411
3412	return next.HandleSerialize(ctx, in)
3413}
3414func awsRestxml_serializeOpHttpBindingsPutStorageLensConfigurationInput(v *PutStorageLensConfigurationInput, encoder *httpbinding.Encoder) error {
3415	if v == nil {
3416		return fmt.Errorf("unsupported serialization of nil %T", v)
3417	}
3418
3419	if v.AccountId != nil && len(*v.AccountId) > 0 {
3420		locationName := "X-Amz-Account-Id"
3421		encoder.SetHeader(locationName).String(*v.AccountId)
3422	}
3423
3424	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
3425		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
3426	}
3427	if v.ConfigId != nil {
3428		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
3429			return err
3430		}
3431	}
3432
3433	return nil
3434}
3435
3436func awsRestxml_serializeOpDocumentPutStorageLensConfigurationInput(v *PutStorageLensConfigurationInput, value smithyxml.Value) error {
3437	defer value.Close()
3438	if v.StorageLensConfiguration != nil {
3439		rootAttr := []smithyxml.Attr{}
3440		root := smithyxml.StartElement{
3441			Name: smithyxml.Name{
3442				Local: "StorageLensConfiguration",
3443			},
3444			Attr: rootAttr,
3445		}
3446		el := value.MemberElement(root)
3447		if err := awsRestxml_serializeDocumentStorageLensConfiguration(v.StorageLensConfiguration, el); err != nil {
3448			return err
3449		}
3450	}
3451	if v.Tags != nil {
3452		rootAttr := []smithyxml.Attr{}
3453		root := smithyxml.StartElement{
3454			Name: smithyxml.Name{
3455				Local: "Tags",
3456			},
3457			Attr: rootAttr,
3458		}
3459		el := value.MemberElement(root)
3460		if err := awsRestxml_serializeDocumentStorageLensTags(v.Tags, el); err != nil {
3461			return err
3462		}
3463	}
3464	return nil
3465}
3466
3467type awsRestxml_serializeOpPutStorageLensConfigurationTagging struct {
3468}
3469
3470func (*awsRestxml_serializeOpPutStorageLensConfigurationTagging) ID() string {
3471	return "OperationSerializer"
3472}
3473
3474func (m *awsRestxml_serializeOpPutStorageLensConfigurationTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3475	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3476) {
3477	request, ok := in.Request.(*smithyhttp.Request)
3478	if !ok {
3479		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3480	}
3481
3482	input, ok := in.Parameters.(*PutStorageLensConfigurationTaggingInput)
3483	_ = input
3484	if !ok {
3485		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3486	}
3487
3488	opPath, opQuery := httpbinding.SplitURI("/v20180820/storagelens/{ConfigId}/tagging")
3489	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3490	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3491	request.Method = "PUT"
3492	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3493	if err != nil {
3494		return out, metadata, &smithy.SerializationError{Err: err}
3495	}
3496
3497	if err := awsRestxml_serializeOpHttpBindingsPutStorageLensConfigurationTaggingInput(input, restEncoder); err != nil {
3498		return out, metadata, &smithy.SerializationError{Err: err}
3499	}
3500
3501	restEncoder.SetHeader("Content-Type").String("application/xml")
3502
3503	xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
3504	rootAttr := []smithyxml.Attr{}
3505	root := smithyxml.StartElement{
3506		Name: smithyxml.Name{
3507			Local: "PutStorageLensConfigurationTaggingRequest",
3508		},
3509		Attr: rootAttr,
3510	}
3511	root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://awss3control.amazonaws.com/doc/2018-08-20/"))
3512	if err := awsRestxml_serializeOpDocumentPutStorageLensConfigurationTaggingInput(input, xmlEncoder.RootElement(root)); err != nil {
3513		return out, metadata, &smithy.SerializationError{Err: err}
3514	}
3515	if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
3516		return out, metadata, &smithy.SerializationError{Err: err}
3517	}
3518
3519	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3520		return out, metadata, &smithy.SerializationError{Err: err}
3521	}
3522	in.Request = request
3523
3524	return next.HandleSerialize(ctx, in)
3525}
3526func awsRestxml_serializeOpHttpBindingsPutStorageLensConfigurationTaggingInput(v *PutStorageLensConfigurationTaggingInput, encoder *httpbinding.Encoder) error {
3527	if v == nil {
3528		return fmt.Errorf("unsupported serialization of nil %T", v)
3529	}
3530
3531	if v.AccountId != nil && len(*v.AccountId) > 0 {
3532		locationName := "X-Amz-Account-Id"
3533		encoder.SetHeader(locationName).String(*v.AccountId)
3534	}
3535
3536	if v.ConfigId == nil || len(*v.ConfigId) == 0 {
3537		return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigId must not be empty")}
3538	}
3539	if v.ConfigId != nil {
3540		if err := encoder.SetURI("ConfigId").String(*v.ConfigId); err != nil {
3541			return err
3542		}
3543	}
3544
3545	return nil
3546}
3547
3548func awsRestxml_serializeOpDocumentPutStorageLensConfigurationTaggingInput(v *PutStorageLensConfigurationTaggingInput, value smithyxml.Value) error {
3549	defer value.Close()
3550	if v.Tags != nil {
3551		rootAttr := []smithyxml.Attr{}
3552		root := smithyxml.StartElement{
3553			Name: smithyxml.Name{
3554				Local: "Tags",
3555			},
3556			Attr: rootAttr,
3557		}
3558		el := value.MemberElement(root)
3559		if err := awsRestxml_serializeDocumentStorageLensTags(v.Tags, el); err != nil {
3560			return err
3561		}
3562	}
3563	return nil
3564}
3565
3566type awsRestxml_serializeOpUpdateJobPriority struct {
3567}
3568
3569func (*awsRestxml_serializeOpUpdateJobPriority) ID() string {
3570	return "OperationSerializer"
3571}
3572
3573func (m *awsRestxml_serializeOpUpdateJobPriority) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3574	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3575) {
3576	request, ok := in.Request.(*smithyhttp.Request)
3577	if !ok {
3578		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3579	}
3580
3581	input, ok := in.Parameters.(*UpdateJobPriorityInput)
3582	_ = input
3583	if !ok {
3584		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3585	}
3586
3587	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs/{JobId}/priority")
3588	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3589	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3590	request.Method = "POST"
3591	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3592	if err != nil {
3593		return out, metadata, &smithy.SerializationError{Err: err}
3594	}
3595
3596	if err := awsRestxml_serializeOpHttpBindingsUpdateJobPriorityInput(input, restEncoder); err != nil {
3597		return out, metadata, &smithy.SerializationError{Err: err}
3598	}
3599
3600	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3601		return out, metadata, &smithy.SerializationError{Err: err}
3602	}
3603	in.Request = request
3604
3605	return next.HandleSerialize(ctx, in)
3606}
3607func awsRestxml_serializeOpHttpBindingsUpdateJobPriorityInput(v *UpdateJobPriorityInput, encoder *httpbinding.Encoder) error {
3608	if v == nil {
3609		return fmt.Errorf("unsupported serialization of nil %T", v)
3610	}
3611
3612	if v.AccountId != nil && len(*v.AccountId) > 0 {
3613		locationName := "X-Amz-Account-Id"
3614		encoder.SetHeader(locationName).String(*v.AccountId)
3615	}
3616
3617	if v.JobId == nil || len(*v.JobId) == 0 {
3618		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
3619	}
3620	if v.JobId != nil {
3621		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
3622			return err
3623		}
3624	}
3625
3626	{
3627		encoder.SetQuery("priority").Integer(v.Priority)
3628	}
3629
3630	return nil
3631}
3632
3633type awsRestxml_serializeOpUpdateJobStatus struct {
3634}
3635
3636func (*awsRestxml_serializeOpUpdateJobStatus) ID() string {
3637	return "OperationSerializer"
3638}
3639
3640func (m *awsRestxml_serializeOpUpdateJobStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
3641	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
3642) {
3643	request, ok := in.Request.(*smithyhttp.Request)
3644	if !ok {
3645		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
3646	}
3647
3648	input, ok := in.Parameters.(*UpdateJobStatusInput)
3649	_ = input
3650	if !ok {
3651		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
3652	}
3653
3654	opPath, opQuery := httpbinding.SplitURI("/v20180820/jobs/{JobId}/status")
3655	request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
3656	request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
3657	request.Method = "POST"
3658	restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
3659	if err != nil {
3660		return out, metadata, &smithy.SerializationError{Err: err}
3661	}
3662
3663	if err := awsRestxml_serializeOpHttpBindingsUpdateJobStatusInput(input, restEncoder); err != nil {
3664		return out, metadata, &smithy.SerializationError{Err: err}
3665	}
3666
3667	if request.Request, err = restEncoder.Encode(request.Request); err != nil {
3668		return out, metadata, &smithy.SerializationError{Err: err}
3669	}
3670	in.Request = request
3671
3672	return next.HandleSerialize(ctx, in)
3673}
3674func awsRestxml_serializeOpHttpBindingsUpdateJobStatusInput(v *UpdateJobStatusInput, encoder *httpbinding.Encoder) error {
3675	if v == nil {
3676		return fmt.Errorf("unsupported serialization of nil %T", v)
3677	}
3678
3679	if v.AccountId != nil && len(*v.AccountId) > 0 {
3680		locationName := "X-Amz-Account-Id"
3681		encoder.SetHeader(locationName).String(*v.AccountId)
3682	}
3683
3684	if v.JobId == nil || len(*v.JobId) == 0 {
3685		return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")}
3686	}
3687	if v.JobId != nil {
3688		if err := encoder.SetURI("JobId").String(*v.JobId); err != nil {
3689			return err
3690		}
3691	}
3692
3693	if len(v.RequestedJobStatus) > 0 {
3694		encoder.SetQuery("requestedJobStatus").String(string(v.RequestedJobStatus))
3695	}
3696
3697	if v.StatusUpdateReason != nil {
3698		encoder.SetQuery("statusUpdateReason").String(*v.StatusUpdateReason)
3699	}
3700
3701	return nil
3702}
3703
3704func awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v *types.AbortIncompleteMultipartUpload, value smithyxml.Value) error {
3705	defer value.Close()
3706	if v.DaysAfterInitiation != 0 {
3707		rootAttr := []smithyxml.Attr{}
3708		root := smithyxml.StartElement{
3709			Name: smithyxml.Name{
3710				Local: "DaysAfterInitiation",
3711			},
3712			Attr: rootAttr,
3713		}
3714		el := value.MemberElement(root)
3715		el.Integer(v.DaysAfterInitiation)
3716	}
3717	return nil
3718}
3719
3720func awsRestxml_serializeDocumentAccountLevel(v *types.AccountLevel, value smithyxml.Value) error {
3721	defer value.Close()
3722	if v.ActivityMetrics != nil {
3723		rootAttr := []smithyxml.Attr{}
3724		root := smithyxml.StartElement{
3725			Name: smithyxml.Name{
3726				Local: "ActivityMetrics",
3727			},
3728			Attr: rootAttr,
3729		}
3730		el := value.MemberElement(root)
3731		if err := awsRestxml_serializeDocumentActivityMetrics(v.ActivityMetrics, el); err != nil {
3732			return err
3733		}
3734	}
3735	if v.BucketLevel != nil {
3736		rootAttr := []smithyxml.Attr{}
3737		root := smithyxml.StartElement{
3738			Name: smithyxml.Name{
3739				Local: "BucketLevel",
3740			},
3741			Attr: rootAttr,
3742		}
3743		el := value.MemberElement(root)
3744		if err := awsRestxml_serializeDocumentBucketLevel(v.BucketLevel, el); err != nil {
3745			return err
3746		}
3747	}
3748	return nil
3749}
3750
3751func awsRestxml_serializeDocumentActivityMetrics(v *types.ActivityMetrics, value smithyxml.Value) error {
3752	defer value.Close()
3753	if v.IsEnabled {
3754		rootAttr := []smithyxml.Attr{}
3755		root := smithyxml.StartElement{
3756			Name: smithyxml.Name{
3757				Local: "IsEnabled",
3758			},
3759			Attr: rootAttr,
3760		}
3761		el := value.MemberElement(root)
3762		el.Boolean(v.IsEnabled)
3763	}
3764	return nil
3765}
3766
3767func awsRestxml_serializeDocumentAwsLambdaTransformation(v *types.AwsLambdaTransformation, value smithyxml.Value) error {
3768	defer value.Close()
3769	if v.FunctionArn != nil {
3770		rootAttr := []smithyxml.Attr{}
3771		root := smithyxml.StartElement{
3772			Name: smithyxml.Name{
3773				Local: "FunctionArn",
3774			},
3775			Attr: rootAttr,
3776		}
3777		el := value.MemberElement(root)
3778		el.String(*v.FunctionArn)
3779	}
3780	if v.FunctionPayload != nil {
3781		rootAttr := []smithyxml.Attr{}
3782		root := smithyxml.StartElement{
3783			Name: smithyxml.Name{
3784				Local: "FunctionPayload",
3785			},
3786			Attr: rootAttr,
3787		}
3788		el := value.MemberElement(root)
3789		el.String(*v.FunctionPayload)
3790	}
3791	return nil
3792}
3793
3794func awsRestxml_serializeDocumentBucketLevel(v *types.BucketLevel, value smithyxml.Value) error {
3795	defer value.Close()
3796	if v.ActivityMetrics != nil {
3797		rootAttr := []smithyxml.Attr{}
3798		root := smithyxml.StartElement{
3799			Name: smithyxml.Name{
3800				Local: "ActivityMetrics",
3801			},
3802			Attr: rootAttr,
3803		}
3804		el := value.MemberElement(root)
3805		if err := awsRestxml_serializeDocumentActivityMetrics(v.ActivityMetrics, el); err != nil {
3806			return err
3807		}
3808	}
3809	if v.PrefixLevel != nil {
3810		rootAttr := []smithyxml.Attr{}
3811		root := smithyxml.StartElement{
3812			Name: smithyxml.Name{
3813				Local: "PrefixLevel",
3814			},
3815			Attr: rootAttr,
3816		}
3817		el := value.MemberElement(root)
3818		if err := awsRestxml_serializeDocumentPrefixLevel(v.PrefixLevel, el); err != nil {
3819			return err
3820		}
3821	}
3822	return nil
3823}
3824
3825func awsRestxml_serializeDocumentBuckets(v []string, value smithyxml.Value) error {
3826	var array *smithyxml.Array
3827	if !value.IsFlattened() {
3828		defer value.Close()
3829	}
3830	customMemberNameAttr := []smithyxml.Attr{}
3831	customMemberName := smithyxml.StartElement{
3832		Name: smithyxml.Name{
3833			Local: "Arn",
3834		},
3835		Attr: customMemberNameAttr,
3836	}
3837	array = value.ArrayWithCustomName(customMemberName)
3838	for i := range v {
3839		am := array.Member()
3840		am.String(v[i])
3841	}
3842	return nil
3843}
3844
3845func awsRestxml_serializeDocumentCreateBucketConfiguration(v *types.CreateBucketConfiguration, value smithyxml.Value) error {
3846	defer value.Close()
3847	if len(v.LocationConstraint) > 0 {
3848		rootAttr := []smithyxml.Attr{}
3849		root := smithyxml.StartElement{
3850			Name: smithyxml.Name{
3851				Local: "LocationConstraint",
3852			},
3853			Attr: rootAttr,
3854		}
3855		el := value.MemberElement(root)
3856		el.String(string(v.LocationConstraint))
3857	}
3858	return nil
3859}
3860
3861func awsRestxml_serializeDocumentExclude(v *types.Exclude, value smithyxml.Value) error {
3862	defer value.Close()
3863	if v.Buckets != nil {
3864		rootAttr := []smithyxml.Attr{}
3865		root := smithyxml.StartElement{
3866			Name: smithyxml.Name{
3867				Local: "Buckets",
3868			},
3869			Attr: rootAttr,
3870		}
3871		el := value.MemberElement(root)
3872		if err := awsRestxml_serializeDocumentBuckets(v.Buckets, el); err != nil {
3873			return err
3874		}
3875	}
3876	if v.Regions != nil {
3877		rootAttr := []smithyxml.Attr{}
3878		root := smithyxml.StartElement{
3879			Name: smithyxml.Name{
3880				Local: "Regions",
3881			},
3882			Attr: rootAttr,
3883		}
3884		el := value.MemberElement(root)
3885		if err := awsRestxml_serializeDocumentRegions(v.Regions, el); err != nil {
3886			return err
3887		}
3888	}
3889	return nil
3890}
3891
3892func awsRestxml_serializeDocumentInclude(v *types.Include, value smithyxml.Value) error {
3893	defer value.Close()
3894	if v.Buckets != nil {
3895		rootAttr := []smithyxml.Attr{}
3896		root := smithyxml.StartElement{
3897			Name: smithyxml.Name{
3898				Local: "Buckets",
3899			},
3900			Attr: rootAttr,
3901		}
3902		el := value.MemberElement(root)
3903		if err := awsRestxml_serializeDocumentBuckets(v.Buckets, el); err != nil {
3904			return err
3905		}
3906	}
3907	if v.Regions != nil {
3908		rootAttr := []smithyxml.Attr{}
3909		root := smithyxml.StartElement{
3910			Name: smithyxml.Name{
3911				Local: "Regions",
3912			},
3913			Attr: rootAttr,
3914		}
3915		el := value.MemberElement(root)
3916		if err := awsRestxml_serializeDocumentRegions(v.Regions, el); err != nil {
3917			return err
3918		}
3919	}
3920	return nil
3921}
3922
3923func awsRestxml_serializeDocumentJobManifest(v *types.JobManifest, value smithyxml.Value) error {
3924	defer value.Close()
3925	if v.Location != nil {
3926		rootAttr := []smithyxml.Attr{}
3927		root := smithyxml.StartElement{
3928			Name: smithyxml.Name{
3929				Local: "Location",
3930			},
3931			Attr: rootAttr,
3932		}
3933		el := value.MemberElement(root)
3934		if err := awsRestxml_serializeDocumentJobManifestLocation(v.Location, el); err != nil {
3935			return err
3936		}
3937	}
3938	if v.Spec != nil {
3939		rootAttr := []smithyxml.Attr{}
3940		root := smithyxml.StartElement{
3941			Name: smithyxml.Name{
3942				Local: "Spec",
3943			},
3944			Attr: rootAttr,
3945		}
3946		el := value.MemberElement(root)
3947		if err := awsRestxml_serializeDocumentJobManifestSpec(v.Spec, el); err != nil {
3948			return err
3949		}
3950	}
3951	return nil
3952}
3953
3954func awsRestxml_serializeDocumentJobManifestFieldList(v []types.JobManifestFieldName, value smithyxml.Value) error {
3955	var array *smithyxml.Array
3956	if !value.IsFlattened() {
3957		defer value.Close()
3958	}
3959	array = value.Array()
3960	for i := range v {
3961		am := array.Member()
3962		am.String(string(v[i]))
3963	}
3964	return nil
3965}
3966
3967func awsRestxml_serializeDocumentJobManifestLocation(v *types.JobManifestLocation, value smithyxml.Value) error {
3968	defer value.Close()
3969	if v.ETag != nil {
3970		rootAttr := []smithyxml.Attr{}
3971		root := smithyxml.StartElement{
3972			Name: smithyxml.Name{
3973				Local: "ETag",
3974			},
3975			Attr: rootAttr,
3976		}
3977		el := value.MemberElement(root)
3978		el.String(*v.ETag)
3979	}
3980	if v.ObjectArn != nil {
3981		rootAttr := []smithyxml.Attr{}
3982		root := smithyxml.StartElement{
3983			Name: smithyxml.Name{
3984				Local: "ObjectArn",
3985			},
3986			Attr: rootAttr,
3987		}
3988		el := value.MemberElement(root)
3989		el.String(*v.ObjectArn)
3990	}
3991	if v.ObjectVersionId != nil {
3992		rootAttr := []smithyxml.Attr{}
3993		root := smithyxml.StartElement{
3994			Name: smithyxml.Name{
3995				Local: "ObjectVersionId",
3996			},
3997			Attr: rootAttr,
3998		}
3999		el := value.MemberElement(root)
4000		el.String(*v.ObjectVersionId)
4001	}
4002	return nil
4003}
4004
4005func awsRestxml_serializeDocumentJobManifestSpec(v *types.JobManifestSpec, value smithyxml.Value) error {
4006	defer value.Close()
4007	if v.Fields != nil {
4008		rootAttr := []smithyxml.Attr{}
4009		root := smithyxml.StartElement{
4010			Name: smithyxml.Name{
4011				Local: "Fields",
4012			},
4013			Attr: rootAttr,
4014		}
4015		el := value.MemberElement(root)
4016		if err := awsRestxml_serializeDocumentJobManifestFieldList(v.Fields, el); err != nil {
4017			return err
4018		}
4019	}
4020	if len(v.Format) > 0 {
4021		rootAttr := []smithyxml.Attr{}
4022		root := smithyxml.StartElement{
4023			Name: smithyxml.Name{
4024				Local: "Format",
4025			},
4026			Attr: rootAttr,
4027		}
4028		el := value.MemberElement(root)
4029		el.String(string(v.Format))
4030	}
4031	return nil
4032}
4033
4034func awsRestxml_serializeDocumentJobOperation(v *types.JobOperation, value smithyxml.Value) error {
4035	defer value.Close()
4036	if v.LambdaInvoke != nil {
4037		rootAttr := []smithyxml.Attr{}
4038		root := smithyxml.StartElement{
4039			Name: smithyxml.Name{
4040				Local: "LambdaInvoke",
4041			},
4042			Attr: rootAttr,
4043		}
4044		el := value.MemberElement(root)
4045		if err := awsRestxml_serializeDocumentLambdaInvokeOperation(v.LambdaInvoke, el); err != nil {
4046			return err
4047		}
4048	}
4049	if v.S3DeleteObjectTagging != nil {
4050		rootAttr := []smithyxml.Attr{}
4051		root := smithyxml.StartElement{
4052			Name: smithyxml.Name{
4053				Local: "S3DeleteObjectTagging",
4054			},
4055			Attr: rootAttr,
4056		}
4057		el := value.MemberElement(root)
4058		if err := awsRestxml_serializeDocumentS3DeleteObjectTaggingOperation(v.S3DeleteObjectTagging, el); err != nil {
4059			return err
4060		}
4061	}
4062	if v.S3InitiateRestoreObject != nil {
4063		rootAttr := []smithyxml.Attr{}
4064		root := smithyxml.StartElement{
4065			Name: smithyxml.Name{
4066				Local: "S3InitiateRestoreObject",
4067			},
4068			Attr: rootAttr,
4069		}
4070		el := value.MemberElement(root)
4071		if err := awsRestxml_serializeDocumentS3InitiateRestoreObjectOperation(v.S3InitiateRestoreObject, el); err != nil {
4072			return err
4073		}
4074	}
4075	if v.S3PutObjectAcl != nil {
4076		rootAttr := []smithyxml.Attr{}
4077		root := smithyxml.StartElement{
4078			Name: smithyxml.Name{
4079				Local: "S3PutObjectAcl",
4080			},
4081			Attr: rootAttr,
4082		}
4083		el := value.MemberElement(root)
4084		if err := awsRestxml_serializeDocumentS3SetObjectAclOperation(v.S3PutObjectAcl, el); err != nil {
4085			return err
4086		}
4087	}
4088	if v.S3PutObjectCopy != nil {
4089		rootAttr := []smithyxml.Attr{}
4090		root := smithyxml.StartElement{
4091			Name: smithyxml.Name{
4092				Local: "S3PutObjectCopy",
4093			},
4094			Attr: rootAttr,
4095		}
4096		el := value.MemberElement(root)
4097		if err := awsRestxml_serializeDocumentS3CopyObjectOperation(v.S3PutObjectCopy, el); err != nil {
4098			return err
4099		}
4100	}
4101	if v.S3PutObjectLegalHold != nil {
4102		rootAttr := []smithyxml.Attr{}
4103		root := smithyxml.StartElement{
4104			Name: smithyxml.Name{
4105				Local: "S3PutObjectLegalHold",
4106			},
4107			Attr: rootAttr,
4108		}
4109		el := value.MemberElement(root)
4110		if err := awsRestxml_serializeDocumentS3SetObjectLegalHoldOperation(v.S3PutObjectLegalHold, el); err != nil {
4111			return err
4112		}
4113	}
4114	if v.S3PutObjectRetention != nil {
4115		rootAttr := []smithyxml.Attr{}
4116		root := smithyxml.StartElement{
4117			Name: smithyxml.Name{
4118				Local: "S3PutObjectRetention",
4119			},
4120			Attr: rootAttr,
4121		}
4122		el := value.MemberElement(root)
4123		if err := awsRestxml_serializeDocumentS3SetObjectRetentionOperation(v.S3PutObjectRetention, el); err != nil {
4124			return err
4125		}
4126	}
4127	if v.S3PutObjectTagging != nil {
4128		rootAttr := []smithyxml.Attr{}
4129		root := smithyxml.StartElement{
4130			Name: smithyxml.Name{
4131				Local: "S3PutObjectTagging",
4132			},
4133			Attr: rootAttr,
4134		}
4135		el := value.MemberElement(root)
4136		if err := awsRestxml_serializeDocumentS3SetObjectTaggingOperation(v.S3PutObjectTagging, el); err != nil {
4137			return err
4138		}
4139	}
4140	return nil
4141}
4142
4143func awsRestxml_serializeDocumentJobReport(v *types.JobReport, value smithyxml.Value) error {
4144	defer value.Close()
4145	if v.Bucket != nil {
4146		rootAttr := []smithyxml.Attr{}
4147		root := smithyxml.StartElement{
4148			Name: smithyxml.Name{
4149				Local: "Bucket",
4150			},
4151			Attr: rootAttr,
4152		}
4153		el := value.MemberElement(root)
4154		el.String(*v.Bucket)
4155	}
4156	{
4157		rootAttr := []smithyxml.Attr{}
4158		root := smithyxml.StartElement{
4159			Name: smithyxml.Name{
4160				Local: "Enabled",
4161			},
4162			Attr: rootAttr,
4163		}
4164		el := value.MemberElement(root)
4165		el.Boolean(v.Enabled)
4166	}
4167	if len(v.Format) > 0 {
4168		rootAttr := []smithyxml.Attr{}
4169		root := smithyxml.StartElement{
4170			Name: smithyxml.Name{
4171				Local: "Format",
4172			},
4173			Attr: rootAttr,
4174		}
4175		el := value.MemberElement(root)
4176		el.String(string(v.Format))
4177	}
4178	if v.Prefix != nil {
4179		rootAttr := []smithyxml.Attr{}
4180		root := smithyxml.StartElement{
4181			Name: smithyxml.Name{
4182				Local: "Prefix",
4183			},
4184			Attr: rootAttr,
4185		}
4186		el := value.MemberElement(root)
4187		el.String(*v.Prefix)
4188	}
4189	if len(v.ReportScope) > 0 {
4190		rootAttr := []smithyxml.Attr{}
4191		root := smithyxml.StartElement{
4192			Name: smithyxml.Name{
4193				Local: "ReportScope",
4194			},
4195			Attr: rootAttr,
4196		}
4197		el := value.MemberElement(root)
4198		el.String(string(v.ReportScope))
4199	}
4200	return nil
4201}
4202
4203func awsRestxml_serializeDocumentLambdaInvokeOperation(v *types.LambdaInvokeOperation, value smithyxml.Value) error {
4204	defer value.Close()
4205	if v.FunctionArn != nil {
4206		rootAttr := []smithyxml.Attr{}
4207		root := smithyxml.StartElement{
4208			Name: smithyxml.Name{
4209				Local: "FunctionArn",
4210			},
4211			Attr: rootAttr,
4212		}
4213		el := value.MemberElement(root)
4214		el.String(*v.FunctionArn)
4215	}
4216	return nil
4217}
4218
4219func awsRestxml_serializeDocumentLifecycleConfiguration(v *types.LifecycleConfiguration, value smithyxml.Value) error {
4220	defer value.Close()
4221	if v.Rules != nil {
4222		rootAttr := []smithyxml.Attr{}
4223		root := smithyxml.StartElement{
4224			Name: smithyxml.Name{
4225				Local: "Rules",
4226			},
4227			Attr: rootAttr,
4228		}
4229		el := value.MemberElement(root)
4230		if err := awsRestxml_serializeDocumentLifecycleRules(v.Rules, el); err != nil {
4231			return err
4232		}
4233	}
4234	return nil
4235}
4236
4237func awsRestxml_serializeDocumentLifecycleExpiration(v *types.LifecycleExpiration, value smithyxml.Value) error {
4238	defer value.Close()
4239	if v.Date != nil {
4240		rootAttr := []smithyxml.Attr{}
4241		root := smithyxml.StartElement{
4242			Name: smithyxml.Name{
4243				Local: "Date",
4244			},
4245			Attr: rootAttr,
4246		}
4247		el := value.MemberElement(root)
4248		el.String(smithytime.FormatDateTime(*v.Date))
4249	}
4250	if v.Days != 0 {
4251		rootAttr := []smithyxml.Attr{}
4252		root := smithyxml.StartElement{
4253			Name: smithyxml.Name{
4254				Local: "Days",
4255			},
4256			Attr: rootAttr,
4257		}
4258		el := value.MemberElement(root)
4259		el.Integer(v.Days)
4260	}
4261	if v.ExpiredObjectDeleteMarker {
4262		rootAttr := []smithyxml.Attr{}
4263		root := smithyxml.StartElement{
4264			Name: smithyxml.Name{
4265				Local: "ExpiredObjectDeleteMarker",
4266			},
4267			Attr: rootAttr,
4268		}
4269		el := value.MemberElement(root)
4270		el.Boolean(v.ExpiredObjectDeleteMarker)
4271	}
4272	return nil
4273}
4274
4275func awsRestxml_serializeDocumentLifecycleRule(v *types.LifecycleRule, value smithyxml.Value) error {
4276	defer value.Close()
4277	if v.AbortIncompleteMultipartUpload != nil {
4278		rootAttr := []smithyxml.Attr{}
4279		root := smithyxml.StartElement{
4280			Name: smithyxml.Name{
4281				Local: "AbortIncompleteMultipartUpload",
4282			},
4283			Attr: rootAttr,
4284		}
4285		el := value.MemberElement(root)
4286		if err := awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v.AbortIncompleteMultipartUpload, el); err != nil {
4287			return err
4288		}
4289	}
4290	if v.Expiration != nil {
4291		rootAttr := []smithyxml.Attr{}
4292		root := smithyxml.StartElement{
4293			Name: smithyxml.Name{
4294				Local: "Expiration",
4295			},
4296			Attr: rootAttr,
4297		}
4298		el := value.MemberElement(root)
4299		if err := awsRestxml_serializeDocumentLifecycleExpiration(v.Expiration, el); err != nil {
4300			return err
4301		}
4302	}
4303	if v.Filter != nil {
4304		rootAttr := []smithyxml.Attr{}
4305		root := smithyxml.StartElement{
4306			Name: smithyxml.Name{
4307				Local: "Filter",
4308			},
4309			Attr: rootAttr,
4310		}
4311		el := value.MemberElement(root)
4312		if err := awsRestxml_serializeDocumentLifecycleRuleFilter(v.Filter, el); err != nil {
4313			return err
4314		}
4315	}
4316	if v.ID != nil {
4317		rootAttr := []smithyxml.Attr{}
4318		root := smithyxml.StartElement{
4319			Name: smithyxml.Name{
4320				Local: "ID",
4321			},
4322			Attr: rootAttr,
4323		}
4324		el := value.MemberElement(root)
4325		el.String(*v.ID)
4326	}
4327	if v.NoncurrentVersionExpiration != nil {
4328		rootAttr := []smithyxml.Attr{}
4329		root := smithyxml.StartElement{
4330			Name: smithyxml.Name{
4331				Local: "NoncurrentVersionExpiration",
4332			},
4333			Attr: rootAttr,
4334		}
4335		el := value.MemberElement(root)
4336		if err := awsRestxml_serializeDocumentNoncurrentVersionExpiration(v.NoncurrentVersionExpiration, el); err != nil {
4337			return err
4338		}
4339	}
4340	if v.NoncurrentVersionTransitions != nil {
4341		rootAttr := []smithyxml.Attr{}
4342		root := smithyxml.StartElement{
4343			Name: smithyxml.Name{
4344				Local: "NoncurrentVersionTransitions",
4345			},
4346			Attr: rootAttr,
4347		}
4348		el := value.MemberElement(root)
4349		if err := awsRestxml_serializeDocumentNoncurrentVersionTransitionList(v.NoncurrentVersionTransitions, el); err != nil {
4350			return err
4351		}
4352	}
4353	if len(v.Status) > 0 {
4354		rootAttr := []smithyxml.Attr{}
4355		root := smithyxml.StartElement{
4356			Name: smithyxml.Name{
4357				Local: "Status",
4358			},
4359			Attr: rootAttr,
4360		}
4361		el := value.MemberElement(root)
4362		el.String(string(v.Status))
4363	}
4364	if v.Transitions != nil {
4365		rootAttr := []smithyxml.Attr{}
4366		root := smithyxml.StartElement{
4367			Name: smithyxml.Name{
4368				Local: "Transitions",
4369			},
4370			Attr: rootAttr,
4371		}
4372		el := value.MemberElement(root)
4373		if err := awsRestxml_serializeDocumentTransitionList(v.Transitions, el); err != nil {
4374			return err
4375		}
4376	}
4377	return nil
4378}
4379
4380func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator, value smithyxml.Value) error {
4381	defer value.Close()
4382	if v.Prefix != nil {
4383		rootAttr := []smithyxml.Attr{}
4384		root := smithyxml.StartElement{
4385			Name: smithyxml.Name{
4386				Local: "Prefix",
4387			},
4388			Attr: rootAttr,
4389		}
4390		el := value.MemberElement(root)
4391		el.String(*v.Prefix)
4392	}
4393	if v.Tags != nil {
4394		rootAttr := []smithyxml.Attr{}
4395		root := smithyxml.StartElement{
4396			Name: smithyxml.Name{
4397				Local: "Tags",
4398			},
4399			Attr: rootAttr,
4400		}
4401		el := value.MemberElement(root)
4402		if err := awsRestxml_serializeDocumentS3TagSet(v.Tags, el); err != nil {
4403			return err
4404		}
4405	}
4406	return nil
4407}
4408
4409func awsRestxml_serializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, value smithyxml.Value) error {
4410	defer value.Close()
4411	if v.And != nil {
4412		rootAttr := []smithyxml.Attr{}
4413		root := smithyxml.StartElement{
4414			Name: smithyxml.Name{
4415				Local: "And",
4416			},
4417			Attr: rootAttr,
4418		}
4419		el := value.MemberElement(root)
4420		if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(v.And, el); err != nil {
4421			return err
4422		}
4423	}
4424	if v.Prefix != nil {
4425		rootAttr := []smithyxml.Attr{}
4426		root := smithyxml.StartElement{
4427			Name: smithyxml.Name{
4428				Local: "Prefix",
4429			},
4430			Attr: rootAttr,
4431		}
4432		el := value.MemberElement(root)
4433		el.String(*v.Prefix)
4434	}
4435	if v.Tag != nil {
4436		rootAttr := []smithyxml.Attr{}
4437		root := smithyxml.StartElement{
4438			Name: smithyxml.Name{
4439				Local: "Tag",
4440			},
4441			Attr: rootAttr,
4442		}
4443		el := value.MemberElement(root)
4444		if err := awsRestxml_serializeDocumentS3Tag(v.Tag, el); err != nil {
4445			return err
4446		}
4447	}
4448	return nil
4449}
4450
4451func awsRestxml_serializeDocumentLifecycleRules(v []types.LifecycleRule, value smithyxml.Value) error {
4452	var array *smithyxml.Array
4453	if !value.IsFlattened() {
4454		defer value.Close()
4455	}
4456	customMemberNameAttr := []smithyxml.Attr{}
4457	customMemberName := smithyxml.StartElement{
4458		Name: smithyxml.Name{
4459			Local: "Rule",
4460		},
4461		Attr: customMemberNameAttr,
4462	}
4463	array = value.ArrayWithCustomName(customMemberName)
4464	for i := range v {
4465		am := array.Member()
4466		if err := awsRestxml_serializeDocumentLifecycleRule(&v[i], am); err != nil {
4467			return err
4468		}
4469	}
4470	return nil
4471}
4472
4473func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.NoncurrentVersionExpiration, value smithyxml.Value) error {
4474	defer value.Close()
4475	if v.NoncurrentDays != 0 {
4476		rootAttr := []smithyxml.Attr{}
4477		root := smithyxml.StartElement{
4478			Name: smithyxml.Name{
4479				Local: "NoncurrentDays",
4480			},
4481			Attr: rootAttr,
4482		}
4483		el := value.MemberElement(root)
4484		el.Integer(v.NoncurrentDays)
4485	}
4486	return nil
4487}
4488
4489func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.NoncurrentVersionTransition, value smithyxml.Value) error {
4490	defer value.Close()
4491	if v.NoncurrentDays != 0 {
4492		rootAttr := []smithyxml.Attr{}
4493		root := smithyxml.StartElement{
4494			Name: smithyxml.Name{
4495				Local: "NoncurrentDays",
4496			},
4497			Attr: rootAttr,
4498		}
4499		el := value.MemberElement(root)
4500		el.Integer(v.NoncurrentDays)
4501	}
4502	if len(v.StorageClass) > 0 {
4503		rootAttr := []smithyxml.Attr{}
4504		root := smithyxml.StartElement{
4505			Name: smithyxml.Name{
4506				Local: "StorageClass",
4507			},
4508			Attr: rootAttr,
4509		}
4510		el := value.MemberElement(root)
4511		el.String(string(v.StorageClass))
4512	}
4513	return nil
4514}
4515
4516func awsRestxml_serializeDocumentNoncurrentVersionTransitionList(v []types.NoncurrentVersionTransition, value smithyxml.Value) error {
4517	var array *smithyxml.Array
4518	if !value.IsFlattened() {
4519		defer value.Close()
4520	}
4521	customMemberNameAttr := []smithyxml.Attr{}
4522	customMemberName := smithyxml.StartElement{
4523		Name: smithyxml.Name{
4524			Local: "NoncurrentVersionTransition",
4525		},
4526		Attr: customMemberNameAttr,
4527	}
4528	array = value.ArrayWithCustomName(customMemberName)
4529	for i := range v {
4530		am := array.Member()
4531		if err := awsRestxml_serializeDocumentNoncurrentVersionTransition(&v[i], am); err != nil {
4532			return err
4533		}
4534	}
4535	return nil
4536}
4537
4538func awsRestxml_serializeDocumentObjectLambdaAllowedFeaturesList(v []types.ObjectLambdaAllowedFeature, value smithyxml.Value) error {
4539	var array *smithyxml.Array
4540	if !value.IsFlattened() {
4541		defer value.Close()
4542	}
4543	customMemberNameAttr := []smithyxml.Attr{}
4544	customMemberName := smithyxml.StartElement{
4545		Name: smithyxml.Name{
4546			Local: "AllowedFeature",
4547		},
4548		Attr: customMemberNameAttr,
4549	}
4550	array = value.ArrayWithCustomName(customMemberName)
4551	for i := range v {
4552		am := array.Member()
4553		am.String(string(v[i]))
4554	}
4555	return nil
4556}
4557
4558func awsRestxml_serializeDocumentObjectLambdaConfiguration(v *types.ObjectLambdaConfiguration, value smithyxml.Value) error {
4559	defer value.Close()
4560	if v.AllowedFeatures != nil {
4561		rootAttr := []smithyxml.Attr{}
4562		root := smithyxml.StartElement{
4563			Name: smithyxml.Name{
4564				Local: "AllowedFeatures",
4565			},
4566			Attr: rootAttr,
4567		}
4568		el := value.MemberElement(root)
4569		if err := awsRestxml_serializeDocumentObjectLambdaAllowedFeaturesList(v.AllowedFeatures, el); err != nil {
4570			return err
4571		}
4572	}
4573	if v.CloudWatchMetricsEnabled {
4574		rootAttr := []smithyxml.Attr{}
4575		root := smithyxml.StartElement{
4576			Name: smithyxml.Name{
4577				Local: "CloudWatchMetricsEnabled",
4578			},
4579			Attr: rootAttr,
4580		}
4581		el := value.MemberElement(root)
4582		el.Boolean(v.CloudWatchMetricsEnabled)
4583	}
4584	if v.SupportingAccessPoint != nil {
4585		rootAttr := []smithyxml.Attr{}
4586		root := smithyxml.StartElement{
4587			Name: smithyxml.Name{
4588				Local: "SupportingAccessPoint",
4589			},
4590			Attr: rootAttr,
4591		}
4592		el := value.MemberElement(root)
4593		el.String(*v.SupportingAccessPoint)
4594	}
4595	if v.TransformationConfigurations != nil {
4596		rootAttr := []smithyxml.Attr{}
4597		root := smithyxml.StartElement{
4598			Name: smithyxml.Name{
4599				Local: "TransformationConfigurations",
4600			},
4601			Attr: rootAttr,
4602		}
4603		el := value.MemberElement(root)
4604		if err := awsRestxml_serializeDocumentObjectLambdaTransformationConfigurationsList(v.TransformationConfigurations, el); err != nil {
4605			return err
4606		}
4607	}
4608	return nil
4609}
4610
4611func awsRestxml_serializeDocumentObjectLambdaContentTransformation(v types.ObjectLambdaContentTransformation, value smithyxml.Value) error {
4612	defer value.Close()
4613	switch uv := v.(type) {
4614	case *types.ObjectLambdaContentTransformationMemberAwsLambda:
4615		customMemberNameAttr := []smithyxml.Attr{}
4616		customMemberName := smithyxml.StartElement{
4617			Name: smithyxml.Name{
4618				Local: "AwsLambda",
4619			},
4620			Attr: customMemberNameAttr,
4621		}
4622		av := value.MemberElement(customMemberName)
4623		if err := awsRestxml_serializeDocumentAwsLambdaTransformation(&uv.Value, av); err != nil {
4624			return err
4625		}
4626
4627	default:
4628		return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
4629
4630	}
4631	return nil
4632}
4633
4634func awsRestxml_serializeDocumentObjectLambdaTransformationConfiguration(v *types.ObjectLambdaTransformationConfiguration, value smithyxml.Value) error {
4635	defer value.Close()
4636	if v.Actions != nil {
4637		rootAttr := []smithyxml.Attr{}
4638		root := smithyxml.StartElement{
4639			Name: smithyxml.Name{
4640				Local: "Actions",
4641			},
4642			Attr: rootAttr,
4643		}
4644		el := value.MemberElement(root)
4645		if err := awsRestxml_serializeDocumentObjectLambdaTransformationConfigurationActionsList(v.Actions, el); err != nil {
4646			return err
4647		}
4648	}
4649	if v.ContentTransformation != nil {
4650		rootAttr := []smithyxml.Attr{}
4651		root := smithyxml.StartElement{
4652			Name: smithyxml.Name{
4653				Local: "ContentTransformation",
4654			},
4655			Attr: rootAttr,
4656		}
4657		el := value.MemberElement(root)
4658		if err := awsRestxml_serializeDocumentObjectLambdaContentTransformation(v.ContentTransformation, el); err != nil {
4659			return err
4660		}
4661	}
4662	return nil
4663}
4664
4665func awsRestxml_serializeDocumentObjectLambdaTransformationConfigurationActionsList(v []types.ObjectLambdaTransformationConfigurationAction, value smithyxml.Value) error {
4666	var array *smithyxml.Array
4667	if !value.IsFlattened() {
4668		defer value.Close()
4669	}
4670	customMemberNameAttr := []smithyxml.Attr{}
4671	customMemberName := smithyxml.StartElement{
4672		Name: smithyxml.Name{
4673			Local: "Action",
4674		},
4675		Attr: customMemberNameAttr,
4676	}
4677	array = value.ArrayWithCustomName(customMemberName)
4678	for i := range v {
4679		am := array.Member()
4680		am.String(string(v[i]))
4681	}
4682	return nil
4683}
4684
4685func awsRestxml_serializeDocumentObjectLambdaTransformationConfigurationsList(v []types.ObjectLambdaTransformationConfiguration, value smithyxml.Value) error {
4686	var array *smithyxml.Array
4687	if !value.IsFlattened() {
4688		defer value.Close()
4689	}
4690	customMemberNameAttr := []smithyxml.Attr{}
4691	customMemberName := smithyxml.StartElement{
4692		Name: smithyxml.Name{
4693			Local: "TransformationConfiguration",
4694		},
4695		Attr: customMemberNameAttr,
4696	}
4697	array = value.ArrayWithCustomName(customMemberName)
4698	for i := range v {
4699		am := array.Member()
4700		if err := awsRestxml_serializeDocumentObjectLambdaTransformationConfiguration(&v[i], am); err != nil {
4701			return err
4702		}
4703	}
4704	return nil
4705}
4706
4707func awsRestxml_serializeDocumentPrefixLevel(v *types.PrefixLevel, value smithyxml.Value) error {
4708	defer value.Close()
4709	if v.StorageMetrics != nil {
4710		rootAttr := []smithyxml.Attr{}
4711		root := smithyxml.StartElement{
4712			Name: smithyxml.Name{
4713				Local: "StorageMetrics",
4714			},
4715			Attr: rootAttr,
4716		}
4717		el := value.MemberElement(root)
4718		if err := awsRestxml_serializeDocumentPrefixLevelStorageMetrics(v.StorageMetrics, el); err != nil {
4719			return err
4720		}
4721	}
4722	return nil
4723}
4724
4725func awsRestxml_serializeDocumentPrefixLevelStorageMetrics(v *types.PrefixLevelStorageMetrics, value smithyxml.Value) error {
4726	defer value.Close()
4727	if v.IsEnabled {
4728		rootAttr := []smithyxml.Attr{}
4729		root := smithyxml.StartElement{
4730			Name: smithyxml.Name{
4731				Local: "IsEnabled",
4732			},
4733			Attr: rootAttr,
4734		}
4735		el := value.MemberElement(root)
4736		el.Boolean(v.IsEnabled)
4737	}
4738	if v.SelectionCriteria != nil {
4739		rootAttr := []smithyxml.Attr{}
4740		root := smithyxml.StartElement{
4741			Name: smithyxml.Name{
4742				Local: "SelectionCriteria",
4743			},
4744			Attr: rootAttr,
4745		}
4746		el := value.MemberElement(root)
4747		if err := awsRestxml_serializeDocumentSelectionCriteria(v.SelectionCriteria, el); err != nil {
4748			return err
4749		}
4750	}
4751	return nil
4752}
4753
4754func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicAccessBlockConfiguration, value smithyxml.Value) error {
4755	defer value.Close()
4756	if v.BlockPublicAcls {
4757		rootAttr := []smithyxml.Attr{}
4758		root := smithyxml.StartElement{
4759			Name: smithyxml.Name{
4760				Local: "BlockPublicAcls",
4761			},
4762			Attr: rootAttr,
4763		}
4764		el := value.MemberElement(root)
4765		el.Boolean(v.BlockPublicAcls)
4766	}
4767	if v.BlockPublicPolicy {
4768		rootAttr := []smithyxml.Attr{}
4769		root := smithyxml.StartElement{
4770			Name: smithyxml.Name{
4771				Local: "BlockPublicPolicy",
4772			},
4773			Attr: rootAttr,
4774		}
4775		el := value.MemberElement(root)
4776		el.Boolean(v.BlockPublicPolicy)
4777	}
4778	if v.IgnorePublicAcls {
4779		rootAttr := []smithyxml.Attr{}
4780		root := smithyxml.StartElement{
4781			Name: smithyxml.Name{
4782				Local: "IgnorePublicAcls",
4783			},
4784			Attr: rootAttr,
4785		}
4786		el := value.MemberElement(root)
4787		el.Boolean(v.IgnorePublicAcls)
4788	}
4789	if v.RestrictPublicBuckets {
4790		rootAttr := []smithyxml.Attr{}
4791		root := smithyxml.StartElement{
4792			Name: smithyxml.Name{
4793				Local: "RestrictPublicBuckets",
4794			},
4795			Attr: rootAttr,
4796		}
4797		el := value.MemberElement(root)
4798		el.Boolean(v.RestrictPublicBuckets)
4799	}
4800	return nil
4801}
4802
4803func awsRestxml_serializeDocumentRegions(v []string, value smithyxml.Value) error {
4804	var array *smithyxml.Array
4805	if !value.IsFlattened() {
4806		defer value.Close()
4807	}
4808	customMemberNameAttr := []smithyxml.Attr{}
4809	customMemberName := smithyxml.StartElement{
4810		Name: smithyxml.Name{
4811			Local: "Region",
4812		},
4813		Attr: customMemberNameAttr,
4814	}
4815	array = value.ArrayWithCustomName(customMemberName)
4816	for i := range v {
4817		am := array.Member()
4818		am.String(v[i])
4819	}
4820	return nil
4821}
4822
4823func awsRestxml_serializeDocumentS3AccessControlList(v *types.S3AccessControlList, value smithyxml.Value) error {
4824	defer value.Close()
4825	if v.Grants != nil {
4826		rootAttr := []smithyxml.Attr{}
4827		root := smithyxml.StartElement{
4828			Name: smithyxml.Name{
4829				Local: "Grants",
4830			},
4831			Attr: rootAttr,
4832		}
4833		el := value.MemberElement(root)
4834		if err := awsRestxml_serializeDocumentS3GrantList(v.Grants, el); err != nil {
4835			return err
4836		}
4837	}
4838	if v.Owner != nil {
4839		rootAttr := []smithyxml.Attr{}
4840		root := smithyxml.StartElement{
4841			Name: smithyxml.Name{
4842				Local: "Owner",
4843			},
4844			Attr: rootAttr,
4845		}
4846		el := value.MemberElement(root)
4847		if err := awsRestxml_serializeDocumentS3ObjectOwner(v.Owner, el); err != nil {
4848			return err
4849		}
4850	}
4851	return nil
4852}
4853
4854func awsRestxml_serializeDocumentS3AccessControlPolicy(v *types.S3AccessControlPolicy, value smithyxml.Value) error {
4855	defer value.Close()
4856	if v.AccessControlList != nil {
4857		rootAttr := []smithyxml.Attr{}
4858		root := smithyxml.StartElement{
4859			Name: smithyxml.Name{
4860				Local: "AccessControlList",
4861			},
4862			Attr: rootAttr,
4863		}
4864		el := value.MemberElement(root)
4865		if err := awsRestxml_serializeDocumentS3AccessControlList(v.AccessControlList, el); err != nil {
4866			return err
4867		}
4868	}
4869	if len(v.CannedAccessControlList) > 0 {
4870		rootAttr := []smithyxml.Attr{}
4871		root := smithyxml.StartElement{
4872			Name: smithyxml.Name{
4873				Local: "CannedAccessControlList",
4874			},
4875			Attr: rootAttr,
4876		}
4877		el := value.MemberElement(root)
4878		el.String(string(v.CannedAccessControlList))
4879	}
4880	return nil
4881}
4882
4883func awsRestxml_serializeDocumentS3BucketDestination(v *types.S3BucketDestination, value smithyxml.Value) error {
4884	defer value.Close()
4885	if v.AccountId != nil {
4886		rootAttr := []smithyxml.Attr{}
4887		root := smithyxml.StartElement{
4888			Name: smithyxml.Name{
4889				Local: "AccountId",
4890			},
4891			Attr: rootAttr,
4892		}
4893		el := value.MemberElement(root)
4894		el.String(*v.AccountId)
4895	}
4896	if v.Arn != nil {
4897		rootAttr := []smithyxml.Attr{}
4898		root := smithyxml.StartElement{
4899			Name: smithyxml.Name{
4900				Local: "Arn",
4901			},
4902			Attr: rootAttr,
4903		}
4904		el := value.MemberElement(root)
4905		el.String(*v.Arn)
4906	}
4907	if v.Encryption != nil {
4908		rootAttr := []smithyxml.Attr{}
4909		root := smithyxml.StartElement{
4910			Name: smithyxml.Name{
4911				Local: "Encryption",
4912			},
4913			Attr: rootAttr,
4914		}
4915		el := value.MemberElement(root)
4916		if err := awsRestxml_serializeDocumentStorageLensDataExportEncryption(v.Encryption, el); err != nil {
4917			return err
4918		}
4919	}
4920	if len(v.Format) > 0 {
4921		rootAttr := []smithyxml.Attr{}
4922		root := smithyxml.StartElement{
4923			Name: smithyxml.Name{
4924				Local: "Format",
4925			},
4926			Attr: rootAttr,
4927		}
4928		el := value.MemberElement(root)
4929		el.String(string(v.Format))
4930	}
4931	if len(v.OutputSchemaVersion) > 0 {
4932		rootAttr := []smithyxml.Attr{}
4933		root := smithyxml.StartElement{
4934			Name: smithyxml.Name{
4935				Local: "OutputSchemaVersion",
4936			},
4937			Attr: rootAttr,
4938		}
4939		el := value.MemberElement(root)
4940		el.String(string(v.OutputSchemaVersion))
4941	}
4942	if v.Prefix != nil {
4943		rootAttr := []smithyxml.Attr{}
4944		root := smithyxml.StartElement{
4945			Name: smithyxml.Name{
4946				Local: "Prefix",
4947			},
4948			Attr: rootAttr,
4949		}
4950		el := value.MemberElement(root)
4951		el.String(*v.Prefix)
4952	}
4953	return nil
4954}
4955
4956func awsRestxml_serializeDocumentS3CopyObjectOperation(v *types.S3CopyObjectOperation, value smithyxml.Value) error {
4957	defer value.Close()
4958	if v.AccessControlGrants != nil {
4959		rootAttr := []smithyxml.Attr{}
4960		root := smithyxml.StartElement{
4961			Name: smithyxml.Name{
4962				Local: "AccessControlGrants",
4963			},
4964			Attr: rootAttr,
4965		}
4966		el := value.MemberElement(root)
4967		if err := awsRestxml_serializeDocumentS3GrantList(v.AccessControlGrants, el); err != nil {
4968			return err
4969		}
4970	}
4971	if len(v.CannedAccessControlList) > 0 {
4972		rootAttr := []smithyxml.Attr{}
4973		root := smithyxml.StartElement{
4974			Name: smithyxml.Name{
4975				Local: "CannedAccessControlList",
4976			},
4977			Attr: rootAttr,
4978		}
4979		el := value.MemberElement(root)
4980		el.String(string(v.CannedAccessControlList))
4981	}
4982	if len(v.MetadataDirective) > 0 {
4983		rootAttr := []smithyxml.Attr{}
4984		root := smithyxml.StartElement{
4985			Name: smithyxml.Name{
4986				Local: "MetadataDirective",
4987			},
4988			Attr: rootAttr,
4989		}
4990		el := value.MemberElement(root)
4991		el.String(string(v.MetadataDirective))
4992	}
4993	if v.ModifiedSinceConstraint != nil {
4994		rootAttr := []smithyxml.Attr{}
4995		root := smithyxml.StartElement{
4996			Name: smithyxml.Name{
4997				Local: "ModifiedSinceConstraint",
4998			},
4999			Attr: rootAttr,
5000		}
5001		el := value.MemberElement(root)
5002		el.String(smithytime.FormatDateTime(*v.ModifiedSinceConstraint))
5003	}
5004	if v.NewObjectMetadata != nil {
5005		rootAttr := []smithyxml.Attr{}
5006		root := smithyxml.StartElement{
5007			Name: smithyxml.Name{
5008				Local: "NewObjectMetadata",
5009			},
5010			Attr: rootAttr,
5011		}
5012		el := value.MemberElement(root)
5013		if err := awsRestxml_serializeDocumentS3ObjectMetadata(v.NewObjectMetadata, el); err != nil {
5014			return err
5015		}
5016	}
5017	if v.NewObjectTagging != nil {
5018		rootAttr := []smithyxml.Attr{}
5019		root := smithyxml.StartElement{
5020			Name: smithyxml.Name{
5021				Local: "NewObjectTagging",
5022			},
5023			Attr: rootAttr,
5024		}
5025		el := value.MemberElement(root)
5026		if err := awsRestxml_serializeDocumentS3TagSet(v.NewObjectTagging, el); err != nil {
5027			return err
5028		}
5029	}
5030	if len(v.ObjectLockLegalHoldStatus) > 0 {
5031		rootAttr := []smithyxml.Attr{}
5032		root := smithyxml.StartElement{
5033			Name: smithyxml.Name{
5034				Local: "ObjectLockLegalHoldStatus",
5035			},
5036			Attr: rootAttr,
5037		}
5038		el := value.MemberElement(root)
5039		el.String(string(v.ObjectLockLegalHoldStatus))
5040	}
5041	if len(v.ObjectLockMode) > 0 {
5042		rootAttr := []smithyxml.Attr{}
5043		root := smithyxml.StartElement{
5044			Name: smithyxml.Name{
5045				Local: "ObjectLockMode",
5046			},
5047			Attr: rootAttr,
5048		}
5049		el := value.MemberElement(root)
5050		el.String(string(v.ObjectLockMode))
5051	}
5052	if v.ObjectLockRetainUntilDate != nil {
5053		rootAttr := []smithyxml.Attr{}
5054		root := smithyxml.StartElement{
5055			Name: smithyxml.Name{
5056				Local: "ObjectLockRetainUntilDate",
5057			},
5058			Attr: rootAttr,
5059		}
5060		el := value.MemberElement(root)
5061		el.String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
5062	}
5063	if v.RedirectLocation != nil {
5064		rootAttr := []smithyxml.Attr{}
5065		root := smithyxml.StartElement{
5066			Name: smithyxml.Name{
5067				Local: "RedirectLocation",
5068			},
5069			Attr: rootAttr,
5070		}
5071		el := value.MemberElement(root)
5072		el.String(*v.RedirectLocation)
5073	}
5074	if v.RequesterPays {
5075		rootAttr := []smithyxml.Attr{}
5076		root := smithyxml.StartElement{
5077			Name: smithyxml.Name{
5078				Local: "RequesterPays",
5079			},
5080			Attr: rootAttr,
5081		}
5082		el := value.MemberElement(root)
5083		el.Boolean(v.RequesterPays)
5084	}
5085	if v.SSEAwsKmsKeyId != nil {
5086		rootAttr := []smithyxml.Attr{}
5087		root := smithyxml.StartElement{
5088			Name: smithyxml.Name{
5089				Local: "SSEAwsKmsKeyId",
5090			},
5091			Attr: rootAttr,
5092		}
5093		el := value.MemberElement(root)
5094		el.String(*v.SSEAwsKmsKeyId)
5095	}
5096	if len(v.StorageClass) > 0 {
5097		rootAttr := []smithyxml.Attr{}
5098		root := smithyxml.StartElement{
5099			Name: smithyxml.Name{
5100				Local: "StorageClass",
5101			},
5102			Attr: rootAttr,
5103		}
5104		el := value.MemberElement(root)
5105		el.String(string(v.StorageClass))
5106	}
5107	if v.TargetKeyPrefix != nil {
5108		rootAttr := []smithyxml.Attr{}
5109		root := smithyxml.StartElement{
5110			Name: smithyxml.Name{
5111				Local: "TargetKeyPrefix",
5112			},
5113			Attr: rootAttr,
5114		}
5115		el := value.MemberElement(root)
5116		el.String(*v.TargetKeyPrefix)
5117	}
5118	if v.TargetResource != nil {
5119		rootAttr := []smithyxml.Attr{}
5120		root := smithyxml.StartElement{
5121			Name: smithyxml.Name{
5122				Local: "TargetResource",
5123			},
5124			Attr: rootAttr,
5125		}
5126		el := value.MemberElement(root)
5127		el.String(*v.TargetResource)
5128	}
5129	if v.UnModifiedSinceConstraint != nil {
5130		rootAttr := []smithyxml.Attr{}
5131		root := smithyxml.StartElement{
5132			Name: smithyxml.Name{
5133				Local: "UnModifiedSinceConstraint",
5134			},
5135			Attr: rootAttr,
5136		}
5137		el := value.MemberElement(root)
5138		el.String(smithytime.FormatDateTime(*v.UnModifiedSinceConstraint))
5139	}
5140	return nil
5141}
5142
5143func awsRestxml_serializeDocumentS3DeleteObjectTaggingOperation(v *types.S3DeleteObjectTaggingOperation, value smithyxml.Value) error {
5144	defer value.Close()
5145	return nil
5146}
5147
5148func awsRestxml_serializeDocumentS3Grant(v *types.S3Grant, value smithyxml.Value) error {
5149	defer value.Close()
5150	if v.Grantee != nil {
5151		rootAttr := []smithyxml.Attr{}
5152		root := smithyxml.StartElement{
5153			Name: smithyxml.Name{
5154				Local: "Grantee",
5155			},
5156			Attr: rootAttr,
5157		}
5158		el := value.MemberElement(root)
5159		if err := awsRestxml_serializeDocumentS3Grantee(v.Grantee, el); err != nil {
5160			return err
5161		}
5162	}
5163	if len(v.Permission) > 0 {
5164		rootAttr := []smithyxml.Attr{}
5165		root := smithyxml.StartElement{
5166			Name: smithyxml.Name{
5167				Local: "Permission",
5168			},
5169			Attr: rootAttr,
5170		}
5171		el := value.MemberElement(root)
5172		el.String(string(v.Permission))
5173	}
5174	return nil
5175}
5176
5177func awsRestxml_serializeDocumentS3Grantee(v *types.S3Grantee, value smithyxml.Value) error {
5178	defer value.Close()
5179	if v.DisplayName != nil {
5180		rootAttr := []smithyxml.Attr{}
5181		root := smithyxml.StartElement{
5182			Name: smithyxml.Name{
5183				Local: "DisplayName",
5184			},
5185			Attr: rootAttr,
5186		}
5187		el := value.MemberElement(root)
5188		el.String(*v.DisplayName)
5189	}
5190	if v.Identifier != nil {
5191		rootAttr := []smithyxml.Attr{}
5192		root := smithyxml.StartElement{
5193			Name: smithyxml.Name{
5194				Local: "Identifier",
5195			},
5196			Attr: rootAttr,
5197		}
5198		el := value.MemberElement(root)
5199		el.String(*v.Identifier)
5200	}
5201	if len(v.TypeIdentifier) > 0 {
5202		rootAttr := []smithyxml.Attr{}
5203		root := smithyxml.StartElement{
5204			Name: smithyxml.Name{
5205				Local: "TypeIdentifier",
5206			},
5207			Attr: rootAttr,
5208		}
5209		el := value.MemberElement(root)
5210		el.String(string(v.TypeIdentifier))
5211	}
5212	return nil
5213}
5214
5215func awsRestxml_serializeDocumentS3GrantList(v []types.S3Grant, value smithyxml.Value) error {
5216	var array *smithyxml.Array
5217	if !value.IsFlattened() {
5218		defer value.Close()
5219	}
5220	array = value.Array()
5221	for i := range v {
5222		am := array.Member()
5223		if err := awsRestxml_serializeDocumentS3Grant(&v[i], am); err != nil {
5224			return err
5225		}
5226	}
5227	return nil
5228}
5229
5230func awsRestxml_serializeDocumentS3InitiateRestoreObjectOperation(v *types.S3InitiateRestoreObjectOperation, value smithyxml.Value) error {
5231	defer value.Close()
5232	if v.ExpirationInDays != nil {
5233		rootAttr := []smithyxml.Attr{}
5234		root := smithyxml.StartElement{
5235			Name: smithyxml.Name{
5236				Local: "ExpirationInDays",
5237			},
5238			Attr: rootAttr,
5239		}
5240		el := value.MemberElement(root)
5241		el.Integer(*v.ExpirationInDays)
5242	}
5243	if len(v.GlacierJobTier) > 0 {
5244		rootAttr := []smithyxml.Attr{}
5245		root := smithyxml.StartElement{
5246			Name: smithyxml.Name{
5247				Local: "GlacierJobTier",
5248			},
5249			Attr: rootAttr,
5250		}
5251		el := value.MemberElement(root)
5252		el.String(string(v.GlacierJobTier))
5253	}
5254	return nil
5255}
5256
5257func awsRestxml_serializeDocumentS3ObjectLockLegalHold(v *types.S3ObjectLockLegalHold, value smithyxml.Value) error {
5258	defer value.Close()
5259	if len(v.Status) > 0 {
5260		rootAttr := []smithyxml.Attr{}
5261		root := smithyxml.StartElement{
5262			Name: smithyxml.Name{
5263				Local: "Status",
5264			},
5265			Attr: rootAttr,
5266		}
5267		el := value.MemberElement(root)
5268		el.String(string(v.Status))
5269	}
5270	return nil
5271}
5272
5273func awsRestxml_serializeDocumentS3ObjectMetadata(v *types.S3ObjectMetadata, value smithyxml.Value) error {
5274	defer value.Close()
5275	if v.CacheControl != nil {
5276		rootAttr := []smithyxml.Attr{}
5277		root := smithyxml.StartElement{
5278			Name: smithyxml.Name{
5279				Local: "CacheControl",
5280			},
5281			Attr: rootAttr,
5282		}
5283		el := value.MemberElement(root)
5284		el.String(*v.CacheControl)
5285	}
5286	if v.ContentDisposition != nil {
5287		rootAttr := []smithyxml.Attr{}
5288		root := smithyxml.StartElement{
5289			Name: smithyxml.Name{
5290				Local: "ContentDisposition",
5291			},
5292			Attr: rootAttr,
5293		}
5294		el := value.MemberElement(root)
5295		el.String(*v.ContentDisposition)
5296	}
5297	if v.ContentEncoding != nil {
5298		rootAttr := []smithyxml.Attr{}
5299		root := smithyxml.StartElement{
5300			Name: smithyxml.Name{
5301				Local: "ContentEncoding",
5302			},
5303			Attr: rootAttr,
5304		}
5305		el := value.MemberElement(root)
5306		el.String(*v.ContentEncoding)
5307	}
5308	if v.ContentLanguage != nil {
5309		rootAttr := []smithyxml.Attr{}
5310		root := smithyxml.StartElement{
5311			Name: smithyxml.Name{
5312				Local: "ContentLanguage",
5313			},
5314			Attr: rootAttr,
5315		}
5316		el := value.MemberElement(root)
5317		el.String(*v.ContentLanguage)
5318	}
5319	if v.ContentLength != 0 {
5320		rootAttr := []smithyxml.Attr{}
5321		root := smithyxml.StartElement{
5322			Name: smithyxml.Name{
5323				Local: "ContentLength",
5324			},
5325			Attr: rootAttr,
5326		}
5327		el := value.MemberElement(root)
5328		el.Long(v.ContentLength)
5329	}
5330	if v.ContentMD5 != nil {
5331		rootAttr := []smithyxml.Attr{}
5332		root := smithyxml.StartElement{
5333			Name: smithyxml.Name{
5334				Local: "ContentMD5",
5335			},
5336			Attr: rootAttr,
5337		}
5338		el := value.MemberElement(root)
5339		el.String(*v.ContentMD5)
5340	}
5341	if v.ContentType != nil {
5342		rootAttr := []smithyxml.Attr{}
5343		root := smithyxml.StartElement{
5344			Name: smithyxml.Name{
5345				Local: "ContentType",
5346			},
5347			Attr: rootAttr,
5348		}
5349		el := value.MemberElement(root)
5350		el.String(*v.ContentType)
5351	}
5352	if v.HttpExpiresDate != nil {
5353		rootAttr := []smithyxml.Attr{}
5354		root := smithyxml.StartElement{
5355			Name: smithyxml.Name{
5356				Local: "HttpExpiresDate",
5357			},
5358			Attr: rootAttr,
5359		}
5360		el := value.MemberElement(root)
5361		el.String(smithytime.FormatDateTime(*v.HttpExpiresDate))
5362	}
5363	if v.RequesterCharged {
5364		rootAttr := []smithyxml.Attr{}
5365		root := smithyxml.StartElement{
5366			Name: smithyxml.Name{
5367				Local: "RequesterCharged",
5368			},
5369			Attr: rootAttr,
5370		}
5371		el := value.MemberElement(root)
5372		el.Boolean(v.RequesterCharged)
5373	}
5374	if len(v.SSEAlgorithm) > 0 {
5375		rootAttr := []smithyxml.Attr{}
5376		root := smithyxml.StartElement{
5377			Name: smithyxml.Name{
5378				Local: "SSEAlgorithm",
5379			},
5380			Attr: rootAttr,
5381		}
5382		el := value.MemberElement(root)
5383		el.String(string(v.SSEAlgorithm))
5384	}
5385	if v.UserMetadata != nil {
5386		rootAttr := []smithyxml.Attr{}
5387		root := smithyxml.StartElement{
5388			Name: smithyxml.Name{
5389				Local: "UserMetadata",
5390			},
5391			Attr: rootAttr,
5392		}
5393		el := value.MemberElement(root)
5394		if err := awsRestxml_serializeDocumentS3UserMetadata(v.UserMetadata, el); err != nil {
5395			return err
5396		}
5397	}
5398	return nil
5399}
5400
5401func awsRestxml_serializeDocumentS3ObjectOwner(v *types.S3ObjectOwner, value smithyxml.Value) error {
5402	defer value.Close()
5403	if v.DisplayName != nil {
5404		rootAttr := []smithyxml.Attr{}
5405		root := smithyxml.StartElement{
5406			Name: smithyxml.Name{
5407				Local: "DisplayName",
5408			},
5409			Attr: rootAttr,
5410		}
5411		el := value.MemberElement(root)
5412		el.String(*v.DisplayName)
5413	}
5414	if v.ID != nil {
5415		rootAttr := []smithyxml.Attr{}
5416		root := smithyxml.StartElement{
5417			Name: smithyxml.Name{
5418				Local: "ID",
5419			},
5420			Attr: rootAttr,
5421		}
5422		el := value.MemberElement(root)
5423		el.String(*v.ID)
5424	}
5425	return nil
5426}
5427
5428func awsRestxml_serializeDocumentS3Retention(v *types.S3Retention, value smithyxml.Value) error {
5429	defer value.Close()
5430	if len(v.Mode) > 0 {
5431		rootAttr := []smithyxml.Attr{}
5432		root := smithyxml.StartElement{
5433			Name: smithyxml.Name{
5434				Local: "Mode",
5435			},
5436			Attr: rootAttr,
5437		}
5438		el := value.MemberElement(root)
5439		el.String(string(v.Mode))
5440	}
5441	if v.RetainUntilDate != nil {
5442		rootAttr := []smithyxml.Attr{}
5443		root := smithyxml.StartElement{
5444			Name: smithyxml.Name{
5445				Local: "RetainUntilDate",
5446			},
5447			Attr: rootAttr,
5448		}
5449		el := value.MemberElement(root)
5450		el.String(smithytime.FormatDateTime(*v.RetainUntilDate))
5451	}
5452	return nil
5453}
5454
5455func awsRestxml_serializeDocumentS3SetObjectAclOperation(v *types.S3SetObjectAclOperation, value smithyxml.Value) error {
5456	defer value.Close()
5457	if v.AccessControlPolicy != nil {
5458		rootAttr := []smithyxml.Attr{}
5459		root := smithyxml.StartElement{
5460			Name: smithyxml.Name{
5461				Local: "AccessControlPolicy",
5462			},
5463			Attr: rootAttr,
5464		}
5465		el := value.MemberElement(root)
5466		if err := awsRestxml_serializeDocumentS3AccessControlPolicy(v.AccessControlPolicy, el); err != nil {
5467			return err
5468		}
5469	}
5470	return nil
5471}
5472
5473func awsRestxml_serializeDocumentS3SetObjectLegalHoldOperation(v *types.S3SetObjectLegalHoldOperation, value smithyxml.Value) error {
5474	defer value.Close()
5475	if v.LegalHold != nil {
5476		rootAttr := []smithyxml.Attr{}
5477		root := smithyxml.StartElement{
5478			Name: smithyxml.Name{
5479				Local: "LegalHold",
5480			},
5481			Attr: rootAttr,
5482		}
5483		el := value.MemberElement(root)
5484		if err := awsRestxml_serializeDocumentS3ObjectLockLegalHold(v.LegalHold, el); err != nil {
5485			return err
5486		}
5487	}
5488	return nil
5489}
5490
5491func awsRestxml_serializeDocumentS3SetObjectRetentionOperation(v *types.S3SetObjectRetentionOperation, value smithyxml.Value) error {
5492	defer value.Close()
5493	if v.BypassGovernanceRetention {
5494		rootAttr := []smithyxml.Attr{}
5495		root := smithyxml.StartElement{
5496			Name: smithyxml.Name{
5497				Local: "BypassGovernanceRetention",
5498			},
5499			Attr: rootAttr,
5500		}
5501		el := value.MemberElement(root)
5502		el.Boolean(v.BypassGovernanceRetention)
5503	}
5504	if v.Retention != nil {
5505		rootAttr := []smithyxml.Attr{}
5506		root := smithyxml.StartElement{
5507			Name: smithyxml.Name{
5508				Local: "Retention",
5509			},
5510			Attr: rootAttr,
5511		}
5512		el := value.MemberElement(root)
5513		if err := awsRestxml_serializeDocumentS3Retention(v.Retention, el); err != nil {
5514			return err
5515		}
5516	}
5517	return nil
5518}
5519
5520func awsRestxml_serializeDocumentS3SetObjectTaggingOperation(v *types.S3SetObjectTaggingOperation, value smithyxml.Value) error {
5521	defer value.Close()
5522	if v.TagSet != nil {
5523		rootAttr := []smithyxml.Attr{}
5524		root := smithyxml.StartElement{
5525			Name: smithyxml.Name{
5526				Local: "TagSet",
5527			},
5528			Attr: rootAttr,
5529		}
5530		el := value.MemberElement(root)
5531		if err := awsRestxml_serializeDocumentS3TagSet(v.TagSet, el); err != nil {
5532			return err
5533		}
5534	}
5535	return nil
5536}
5537
5538func awsRestxml_serializeDocumentS3Tag(v *types.S3Tag, value smithyxml.Value) error {
5539	defer value.Close()
5540	if v.Key != nil {
5541		rootAttr := []smithyxml.Attr{}
5542		root := smithyxml.StartElement{
5543			Name: smithyxml.Name{
5544				Local: "Key",
5545			},
5546			Attr: rootAttr,
5547		}
5548		el := value.MemberElement(root)
5549		el.String(*v.Key)
5550	}
5551	if v.Value != nil {
5552		rootAttr := []smithyxml.Attr{}
5553		root := smithyxml.StartElement{
5554			Name: smithyxml.Name{
5555				Local: "Value",
5556			},
5557			Attr: rootAttr,
5558		}
5559		el := value.MemberElement(root)
5560		el.String(*v.Value)
5561	}
5562	return nil
5563}
5564
5565func awsRestxml_serializeDocumentS3TagSet(v []types.S3Tag, value smithyxml.Value) error {
5566	var array *smithyxml.Array
5567	if !value.IsFlattened() {
5568		defer value.Close()
5569	}
5570	array = value.Array()
5571	for i := range v {
5572		am := array.Member()
5573		if err := awsRestxml_serializeDocumentS3Tag(&v[i], am); err != nil {
5574			return err
5575		}
5576	}
5577	return nil
5578}
5579
5580func awsRestxml_serializeDocumentS3UserMetadata(v map[string]string, value smithyxml.Value) error {
5581	if !value.IsFlattened() {
5582		defer value.Close()
5583	}
5584	m := value.Map()
5585	for key := range v {
5586		entry := m.Entry()
5587		keyElementAttr := []smithyxml.Attr{}
5588		keyElement := smithyxml.StartElement{
5589			Name: smithyxml.Name{
5590				Local: "key",
5591			},
5592			Attr: keyElementAttr,
5593		}
5594		entry.MemberElement(keyElement).String(key)
5595		valueElementAttr := []smithyxml.Attr{}
5596		valueElement := smithyxml.StartElement{
5597			Name: smithyxml.Name{
5598				Local: "value",
5599			},
5600			Attr: valueElementAttr,
5601		}
5602		entry.MemberElement(valueElement).String(v[key])
5603		entry.Close()
5604	}
5605	return nil
5606}
5607
5608func awsRestxml_serializeDocumentSelectionCriteria(v *types.SelectionCriteria, value smithyxml.Value) error {
5609	defer value.Close()
5610	if v.Delimiter != nil {
5611		rootAttr := []smithyxml.Attr{}
5612		root := smithyxml.StartElement{
5613			Name: smithyxml.Name{
5614				Local: "Delimiter",
5615			},
5616			Attr: rootAttr,
5617		}
5618		el := value.MemberElement(root)
5619		el.String(*v.Delimiter)
5620	}
5621	if v.MaxDepth != 0 {
5622		rootAttr := []smithyxml.Attr{}
5623		root := smithyxml.StartElement{
5624			Name: smithyxml.Name{
5625				Local: "MaxDepth",
5626			},
5627			Attr: rootAttr,
5628		}
5629		el := value.MemberElement(root)
5630		el.Integer(v.MaxDepth)
5631	}
5632	if v.MinStorageBytesPercentage != 0 {
5633		rootAttr := []smithyxml.Attr{}
5634		root := smithyxml.StartElement{
5635			Name: smithyxml.Name{
5636				Local: "MinStorageBytesPercentage",
5637			},
5638			Attr: rootAttr,
5639		}
5640		el := value.MemberElement(root)
5641		el.Double(v.MinStorageBytesPercentage)
5642	}
5643	return nil
5644}
5645
5646func awsRestxml_serializeDocumentSSEKMS(v *types.SSEKMS, value smithyxml.Value) error {
5647	defer value.Close()
5648	if v.KeyId != nil {
5649		rootAttr := []smithyxml.Attr{}
5650		root := smithyxml.StartElement{
5651			Name: smithyxml.Name{
5652				Local: "KeyId",
5653			},
5654			Attr: rootAttr,
5655		}
5656		el := value.MemberElement(root)
5657		el.String(*v.KeyId)
5658	}
5659	return nil
5660}
5661
5662func awsRestxml_serializeDocumentSSES3(v *types.SSES3, value smithyxml.Value) error {
5663	defer value.Close()
5664	return nil
5665}
5666
5667func awsRestxml_serializeDocumentStorageLensAwsOrg(v *types.StorageLensAwsOrg, value smithyxml.Value) error {
5668	defer value.Close()
5669	if v.Arn != nil {
5670		rootAttr := []smithyxml.Attr{}
5671		root := smithyxml.StartElement{
5672			Name: smithyxml.Name{
5673				Local: "Arn",
5674			},
5675			Attr: rootAttr,
5676		}
5677		el := value.MemberElement(root)
5678		el.String(*v.Arn)
5679	}
5680	return nil
5681}
5682
5683func awsRestxml_serializeDocumentStorageLensConfiguration(v *types.StorageLensConfiguration, value smithyxml.Value) error {
5684	defer value.Close()
5685	if v.AccountLevel != nil {
5686		rootAttr := []smithyxml.Attr{}
5687		root := smithyxml.StartElement{
5688			Name: smithyxml.Name{
5689				Local: "AccountLevel",
5690			},
5691			Attr: rootAttr,
5692		}
5693		el := value.MemberElement(root)
5694		if err := awsRestxml_serializeDocumentAccountLevel(v.AccountLevel, el); err != nil {
5695			return err
5696		}
5697	}
5698	if v.AwsOrg != nil {
5699		rootAttr := []smithyxml.Attr{}
5700		root := smithyxml.StartElement{
5701			Name: smithyxml.Name{
5702				Local: "AwsOrg",
5703			},
5704			Attr: rootAttr,
5705		}
5706		el := value.MemberElement(root)
5707		if err := awsRestxml_serializeDocumentStorageLensAwsOrg(v.AwsOrg, el); err != nil {
5708			return err
5709		}
5710	}
5711	if v.DataExport != nil {
5712		rootAttr := []smithyxml.Attr{}
5713		root := smithyxml.StartElement{
5714			Name: smithyxml.Name{
5715				Local: "DataExport",
5716			},
5717			Attr: rootAttr,
5718		}
5719		el := value.MemberElement(root)
5720		if err := awsRestxml_serializeDocumentStorageLensDataExport(v.DataExport, el); err != nil {
5721			return err
5722		}
5723	}
5724	if v.Exclude != nil {
5725		rootAttr := []smithyxml.Attr{}
5726		root := smithyxml.StartElement{
5727			Name: smithyxml.Name{
5728				Local: "Exclude",
5729			},
5730			Attr: rootAttr,
5731		}
5732		el := value.MemberElement(root)
5733		if err := awsRestxml_serializeDocumentExclude(v.Exclude, el); err != nil {
5734			return err
5735		}
5736	}
5737	if v.Id != nil {
5738		rootAttr := []smithyxml.Attr{}
5739		root := smithyxml.StartElement{
5740			Name: smithyxml.Name{
5741				Local: "Id",
5742			},
5743			Attr: rootAttr,
5744		}
5745		el := value.MemberElement(root)
5746		el.String(*v.Id)
5747	}
5748	if v.Include != nil {
5749		rootAttr := []smithyxml.Attr{}
5750		root := smithyxml.StartElement{
5751			Name: smithyxml.Name{
5752				Local: "Include",
5753			},
5754			Attr: rootAttr,
5755		}
5756		el := value.MemberElement(root)
5757		if err := awsRestxml_serializeDocumentInclude(v.Include, el); err != nil {
5758			return err
5759		}
5760	}
5761	{
5762		rootAttr := []smithyxml.Attr{}
5763		root := smithyxml.StartElement{
5764			Name: smithyxml.Name{
5765				Local: "IsEnabled",
5766			},
5767			Attr: rootAttr,
5768		}
5769		el := value.MemberElement(root)
5770		el.Boolean(v.IsEnabled)
5771	}
5772	if v.StorageLensArn != nil {
5773		rootAttr := []smithyxml.Attr{}
5774		root := smithyxml.StartElement{
5775			Name: smithyxml.Name{
5776				Local: "StorageLensArn",
5777			},
5778			Attr: rootAttr,
5779		}
5780		el := value.MemberElement(root)
5781		el.String(*v.StorageLensArn)
5782	}
5783	return nil
5784}
5785
5786func awsRestxml_serializeDocumentStorageLensDataExport(v *types.StorageLensDataExport, value smithyxml.Value) error {
5787	defer value.Close()
5788	if v.S3BucketDestination != nil {
5789		rootAttr := []smithyxml.Attr{}
5790		root := smithyxml.StartElement{
5791			Name: smithyxml.Name{
5792				Local: "S3BucketDestination",
5793			},
5794			Attr: rootAttr,
5795		}
5796		el := value.MemberElement(root)
5797		if err := awsRestxml_serializeDocumentS3BucketDestination(v.S3BucketDestination, el); err != nil {
5798			return err
5799		}
5800	}
5801	return nil
5802}
5803
5804func awsRestxml_serializeDocumentStorageLensDataExportEncryption(v *types.StorageLensDataExportEncryption, value smithyxml.Value) error {
5805	defer value.Close()
5806	if v.SSEKMS != nil {
5807		rootAttr := []smithyxml.Attr{}
5808		root := smithyxml.StartElement{
5809			Name: smithyxml.Name{
5810				Local: "SSE-KMS",
5811			},
5812			Attr: rootAttr,
5813		}
5814		el := value.MemberElement(root)
5815		if err := awsRestxml_serializeDocumentSSEKMS(v.SSEKMS, el); err != nil {
5816			return err
5817		}
5818	}
5819	if v.SSES3 != nil {
5820		rootAttr := []smithyxml.Attr{}
5821		root := smithyxml.StartElement{
5822			Name: smithyxml.Name{
5823				Local: "SSE-S3",
5824			},
5825			Attr: rootAttr,
5826		}
5827		el := value.MemberElement(root)
5828		if err := awsRestxml_serializeDocumentSSES3(v.SSES3, el); err != nil {
5829			return err
5830		}
5831	}
5832	return nil
5833}
5834
5835func awsRestxml_serializeDocumentStorageLensTag(v *types.StorageLensTag, value smithyxml.Value) error {
5836	defer value.Close()
5837	if v.Key != nil {
5838		rootAttr := []smithyxml.Attr{}
5839		root := smithyxml.StartElement{
5840			Name: smithyxml.Name{
5841				Local: "Key",
5842			},
5843			Attr: rootAttr,
5844		}
5845		el := value.MemberElement(root)
5846		el.String(*v.Key)
5847	}
5848	if v.Value != nil {
5849		rootAttr := []smithyxml.Attr{}
5850		root := smithyxml.StartElement{
5851			Name: smithyxml.Name{
5852				Local: "Value",
5853			},
5854			Attr: rootAttr,
5855		}
5856		el := value.MemberElement(root)
5857		el.String(*v.Value)
5858	}
5859	return nil
5860}
5861
5862func awsRestxml_serializeDocumentStorageLensTags(v []types.StorageLensTag, value smithyxml.Value) error {
5863	var array *smithyxml.Array
5864	if !value.IsFlattened() {
5865		defer value.Close()
5866	}
5867	customMemberNameAttr := []smithyxml.Attr{}
5868	customMemberName := smithyxml.StartElement{
5869		Name: smithyxml.Name{
5870			Local: "Tag",
5871		},
5872		Attr: customMemberNameAttr,
5873	}
5874	array = value.ArrayWithCustomName(customMemberName)
5875	for i := range v {
5876		am := array.Member()
5877		if err := awsRestxml_serializeDocumentStorageLensTag(&v[i], am); err != nil {
5878			return err
5879		}
5880	}
5881	return nil
5882}
5883
5884func awsRestxml_serializeDocumentTagging(v *types.Tagging, value smithyxml.Value) error {
5885	defer value.Close()
5886	if v.TagSet != nil {
5887		rootAttr := []smithyxml.Attr{}
5888		root := smithyxml.StartElement{
5889			Name: smithyxml.Name{
5890				Local: "TagSet",
5891			},
5892			Attr: rootAttr,
5893		}
5894		el := value.MemberElement(root)
5895		if err := awsRestxml_serializeDocumentS3TagSet(v.TagSet, el); err != nil {
5896			return err
5897		}
5898	}
5899	return nil
5900}
5901
5902func awsRestxml_serializeDocumentTransition(v *types.Transition, value smithyxml.Value) error {
5903	defer value.Close()
5904	if v.Date != nil {
5905		rootAttr := []smithyxml.Attr{}
5906		root := smithyxml.StartElement{
5907			Name: smithyxml.Name{
5908				Local: "Date",
5909			},
5910			Attr: rootAttr,
5911		}
5912		el := value.MemberElement(root)
5913		el.String(smithytime.FormatDateTime(*v.Date))
5914	}
5915	if v.Days != 0 {
5916		rootAttr := []smithyxml.Attr{}
5917		root := smithyxml.StartElement{
5918			Name: smithyxml.Name{
5919				Local: "Days",
5920			},
5921			Attr: rootAttr,
5922		}
5923		el := value.MemberElement(root)
5924		el.Integer(v.Days)
5925	}
5926	if len(v.StorageClass) > 0 {
5927		rootAttr := []smithyxml.Attr{}
5928		root := smithyxml.StartElement{
5929			Name: smithyxml.Name{
5930				Local: "StorageClass",
5931			},
5932			Attr: rootAttr,
5933		}
5934		el := value.MemberElement(root)
5935		el.String(string(v.StorageClass))
5936	}
5937	return nil
5938}
5939
5940func awsRestxml_serializeDocumentTransitionList(v []types.Transition, value smithyxml.Value) error {
5941	var array *smithyxml.Array
5942	if !value.IsFlattened() {
5943		defer value.Close()
5944	}
5945	customMemberNameAttr := []smithyxml.Attr{}
5946	customMemberName := smithyxml.StartElement{
5947		Name: smithyxml.Name{
5948			Local: "Transition",
5949		},
5950		Attr: customMemberNameAttr,
5951	}
5952	array = value.ArrayWithCustomName(customMemberName)
5953	for i := range v {
5954		am := array.Member()
5955		if err := awsRestxml_serializeDocumentTransition(&v[i], am); err != nil {
5956			return err
5957		}
5958	}
5959	return nil
5960}
5961
5962func awsRestxml_serializeDocumentVpcConfiguration(v *types.VpcConfiguration, value smithyxml.Value) error {
5963	defer value.Close()
5964	if v.VpcId != nil {
5965		rootAttr := []smithyxml.Attr{}
5966		root := smithyxml.StartElement{
5967			Name: smithyxml.Name{
5968				Local: "VpcId",
5969			},
5970			Attr: rootAttr,
5971		}
5972		el := value.MemberElement(root)
5973		el.String(*v.VpcId)
5974	}
5975	return nil
5976}
5977