1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package opsworkscm
4
5import (
6	"bytes"
7	"context"
8	"fmt"
9	"github.com/aws/aws-sdk-go-v2/service/opsworkscm/types"
10	smithy "github.com/aws/smithy-go"
11	"github.com/aws/smithy-go/encoding/httpbinding"
12	smithyjson "github.com/aws/smithy-go/encoding/json"
13	"github.com/aws/smithy-go/middleware"
14	smithyhttp "github.com/aws/smithy-go/transport/http"
15)
16
17type awsAwsjson11_serializeOpAssociateNode struct {
18}
19
20func (*awsAwsjson11_serializeOpAssociateNode) ID() string {
21	return "OperationSerializer"
22}
23
24func (m *awsAwsjson11_serializeOpAssociateNode) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
25	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
26) {
27	request, ok := in.Request.(*smithyhttp.Request)
28	if !ok {
29		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
30	}
31
32	input, ok := in.Parameters.(*AssociateNodeInput)
33	_ = input
34	if !ok {
35		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
36	}
37
38	request.Request.URL.Path = "/"
39	request.Request.Method = "POST"
40	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
41	if err != nil {
42		return out, metadata, &smithy.SerializationError{Err: err}
43	}
44	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
45	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.AssociateNode")
46
47	jsonEncoder := smithyjson.NewEncoder()
48	if err := awsAwsjson11_serializeOpDocumentAssociateNodeInput(input, jsonEncoder.Value); err != nil {
49		return out, metadata, &smithy.SerializationError{Err: err}
50	}
51
52	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
53		return out, metadata, &smithy.SerializationError{Err: err}
54	}
55
56	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
57		return out, metadata, &smithy.SerializationError{Err: err}
58	}
59	in.Request = request
60
61	return next.HandleSerialize(ctx, in)
62}
63
64type awsAwsjson11_serializeOpCreateBackup struct {
65}
66
67func (*awsAwsjson11_serializeOpCreateBackup) ID() string {
68	return "OperationSerializer"
69}
70
71func (m *awsAwsjson11_serializeOpCreateBackup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
72	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
73) {
74	request, ok := in.Request.(*smithyhttp.Request)
75	if !ok {
76		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
77	}
78
79	input, ok := in.Parameters.(*CreateBackupInput)
80	_ = input
81	if !ok {
82		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
83	}
84
85	request.Request.URL.Path = "/"
86	request.Request.Method = "POST"
87	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
88	if err != nil {
89		return out, metadata, &smithy.SerializationError{Err: err}
90	}
91	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
92	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.CreateBackup")
93
94	jsonEncoder := smithyjson.NewEncoder()
95	if err := awsAwsjson11_serializeOpDocumentCreateBackupInput(input, jsonEncoder.Value); err != nil {
96		return out, metadata, &smithy.SerializationError{Err: err}
97	}
98
99	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
100		return out, metadata, &smithy.SerializationError{Err: err}
101	}
102
103	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
104		return out, metadata, &smithy.SerializationError{Err: err}
105	}
106	in.Request = request
107
108	return next.HandleSerialize(ctx, in)
109}
110
111type awsAwsjson11_serializeOpCreateServer struct {
112}
113
114func (*awsAwsjson11_serializeOpCreateServer) ID() string {
115	return "OperationSerializer"
116}
117
118func (m *awsAwsjson11_serializeOpCreateServer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
119	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
120) {
121	request, ok := in.Request.(*smithyhttp.Request)
122	if !ok {
123		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
124	}
125
126	input, ok := in.Parameters.(*CreateServerInput)
127	_ = input
128	if !ok {
129		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
130	}
131
132	request.Request.URL.Path = "/"
133	request.Request.Method = "POST"
134	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
135	if err != nil {
136		return out, metadata, &smithy.SerializationError{Err: err}
137	}
138	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
139	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.CreateServer")
140
141	jsonEncoder := smithyjson.NewEncoder()
142	if err := awsAwsjson11_serializeOpDocumentCreateServerInput(input, jsonEncoder.Value); err != nil {
143		return out, metadata, &smithy.SerializationError{Err: err}
144	}
145
146	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
147		return out, metadata, &smithy.SerializationError{Err: err}
148	}
149
150	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
151		return out, metadata, &smithy.SerializationError{Err: err}
152	}
153	in.Request = request
154
155	return next.HandleSerialize(ctx, in)
156}
157
158type awsAwsjson11_serializeOpDeleteBackup struct {
159}
160
161func (*awsAwsjson11_serializeOpDeleteBackup) ID() string {
162	return "OperationSerializer"
163}
164
165func (m *awsAwsjson11_serializeOpDeleteBackup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
166	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
167) {
168	request, ok := in.Request.(*smithyhttp.Request)
169	if !ok {
170		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
171	}
172
173	input, ok := in.Parameters.(*DeleteBackupInput)
174	_ = input
175	if !ok {
176		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
177	}
178
179	request.Request.URL.Path = "/"
180	request.Request.Method = "POST"
181	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
182	if err != nil {
183		return out, metadata, &smithy.SerializationError{Err: err}
184	}
185	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
186	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DeleteBackup")
187
188	jsonEncoder := smithyjson.NewEncoder()
189	if err := awsAwsjson11_serializeOpDocumentDeleteBackupInput(input, jsonEncoder.Value); err != nil {
190		return out, metadata, &smithy.SerializationError{Err: err}
191	}
192
193	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
194		return out, metadata, &smithy.SerializationError{Err: err}
195	}
196
197	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
198		return out, metadata, &smithy.SerializationError{Err: err}
199	}
200	in.Request = request
201
202	return next.HandleSerialize(ctx, in)
203}
204
205type awsAwsjson11_serializeOpDeleteServer struct {
206}
207
208func (*awsAwsjson11_serializeOpDeleteServer) ID() string {
209	return "OperationSerializer"
210}
211
212func (m *awsAwsjson11_serializeOpDeleteServer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
213	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
214) {
215	request, ok := in.Request.(*smithyhttp.Request)
216	if !ok {
217		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
218	}
219
220	input, ok := in.Parameters.(*DeleteServerInput)
221	_ = input
222	if !ok {
223		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
224	}
225
226	request.Request.URL.Path = "/"
227	request.Request.Method = "POST"
228	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
229	if err != nil {
230		return out, metadata, &smithy.SerializationError{Err: err}
231	}
232	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
233	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DeleteServer")
234
235	jsonEncoder := smithyjson.NewEncoder()
236	if err := awsAwsjson11_serializeOpDocumentDeleteServerInput(input, jsonEncoder.Value); err != nil {
237		return out, metadata, &smithy.SerializationError{Err: err}
238	}
239
240	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
241		return out, metadata, &smithy.SerializationError{Err: err}
242	}
243
244	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
245		return out, metadata, &smithy.SerializationError{Err: err}
246	}
247	in.Request = request
248
249	return next.HandleSerialize(ctx, in)
250}
251
252type awsAwsjson11_serializeOpDescribeAccountAttributes struct {
253}
254
255func (*awsAwsjson11_serializeOpDescribeAccountAttributes) ID() string {
256	return "OperationSerializer"
257}
258
259func (m *awsAwsjson11_serializeOpDescribeAccountAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
260	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
261) {
262	request, ok := in.Request.(*smithyhttp.Request)
263	if !ok {
264		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
265	}
266
267	input, ok := in.Parameters.(*DescribeAccountAttributesInput)
268	_ = input
269	if !ok {
270		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
271	}
272
273	request.Request.URL.Path = "/"
274	request.Request.Method = "POST"
275	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
276	if err != nil {
277		return out, metadata, &smithy.SerializationError{Err: err}
278	}
279	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
280	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DescribeAccountAttributes")
281
282	jsonEncoder := smithyjson.NewEncoder()
283	if err := awsAwsjson11_serializeOpDocumentDescribeAccountAttributesInput(input, jsonEncoder.Value); err != nil {
284		return out, metadata, &smithy.SerializationError{Err: err}
285	}
286
287	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
288		return out, metadata, &smithy.SerializationError{Err: err}
289	}
290
291	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
292		return out, metadata, &smithy.SerializationError{Err: err}
293	}
294	in.Request = request
295
296	return next.HandleSerialize(ctx, in)
297}
298
299type awsAwsjson11_serializeOpDescribeBackups struct {
300}
301
302func (*awsAwsjson11_serializeOpDescribeBackups) ID() string {
303	return "OperationSerializer"
304}
305
306func (m *awsAwsjson11_serializeOpDescribeBackups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
307	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
308) {
309	request, ok := in.Request.(*smithyhttp.Request)
310	if !ok {
311		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
312	}
313
314	input, ok := in.Parameters.(*DescribeBackupsInput)
315	_ = input
316	if !ok {
317		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
318	}
319
320	request.Request.URL.Path = "/"
321	request.Request.Method = "POST"
322	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
323	if err != nil {
324		return out, metadata, &smithy.SerializationError{Err: err}
325	}
326	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
327	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DescribeBackups")
328
329	jsonEncoder := smithyjson.NewEncoder()
330	if err := awsAwsjson11_serializeOpDocumentDescribeBackupsInput(input, jsonEncoder.Value); err != nil {
331		return out, metadata, &smithy.SerializationError{Err: err}
332	}
333
334	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
335		return out, metadata, &smithy.SerializationError{Err: err}
336	}
337
338	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
339		return out, metadata, &smithy.SerializationError{Err: err}
340	}
341	in.Request = request
342
343	return next.HandleSerialize(ctx, in)
344}
345
346type awsAwsjson11_serializeOpDescribeEvents struct {
347}
348
349func (*awsAwsjson11_serializeOpDescribeEvents) ID() string {
350	return "OperationSerializer"
351}
352
353func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
354	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
355) {
356	request, ok := in.Request.(*smithyhttp.Request)
357	if !ok {
358		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
359	}
360
361	input, ok := in.Parameters.(*DescribeEventsInput)
362	_ = input
363	if !ok {
364		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
365	}
366
367	request.Request.URL.Path = "/"
368	request.Request.Method = "POST"
369	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
370	if err != nil {
371		return out, metadata, &smithy.SerializationError{Err: err}
372	}
373	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
374	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DescribeEvents")
375
376	jsonEncoder := smithyjson.NewEncoder()
377	if err := awsAwsjson11_serializeOpDocumentDescribeEventsInput(input, jsonEncoder.Value); err != nil {
378		return out, metadata, &smithy.SerializationError{Err: err}
379	}
380
381	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
382		return out, metadata, &smithy.SerializationError{Err: err}
383	}
384
385	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
386		return out, metadata, &smithy.SerializationError{Err: err}
387	}
388	in.Request = request
389
390	return next.HandleSerialize(ctx, in)
391}
392
393type awsAwsjson11_serializeOpDescribeNodeAssociationStatus struct {
394}
395
396func (*awsAwsjson11_serializeOpDescribeNodeAssociationStatus) ID() string {
397	return "OperationSerializer"
398}
399
400func (m *awsAwsjson11_serializeOpDescribeNodeAssociationStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
401	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
402) {
403	request, ok := in.Request.(*smithyhttp.Request)
404	if !ok {
405		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
406	}
407
408	input, ok := in.Parameters.(*DescribeNodeAssociationStatusInput)
409	_ = input
410	if !ok {
411		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
412	}
413
414	request.Request.URL.Path = "/"
415	request.Request.Method = "POST"
416	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
417	if err != nil {
418		return out, metadata, &smithy.SerializationError{Err: err}
419	}
420	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
421	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DescribeNodeAssociationStatus")
422
423	jsonEncoder := smithyjson.NewEncoder()
424	if err := awsAwsjson11_serializeOpDocumentDescribeNodeAssociationStatusInput(input, jsonEncoder.Value); err != nil {
425		return out, metadata, &smithy.SerializationError{Err: err}
426	}
427
428	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
429		return out, metadata, &smithy.SerializationError{Err: err}
430	}
431
432	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
433		return out, metadata, &smithy.SerializationError{Err: err}
434	}
435	in.Request = request
436
437	return next.HandleSerialize(ctx, in)
438}
439
440type awsAwsjson11_serializeOpDescribeServers struct {
441}
442
443func (*awsAwsjson11_serializeOpDescribeServers) ID() string {
444	return "OperationSerializer"
445}
446
447func (m *awsAwsjson11_serializeOpDescribeServers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
448	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
449) {
450	request, ok := in.Request.(*smithyhttp.Request)
451	if !ok {
452		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
453	}
454
455	input, ok := in.Parameters.(*DescribeServersInput)
456	_ = input
457	if !ok {
458		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
459	}
460
461	request.Request.URL.Path = "/"
462	request.Request.Method = "POST"
463	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
464	if err != nil {
465		return out, metadata, &smithy.SerializationError{Err: err}
466	}
467	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
468	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DescribeServers")
469
470	jsonEncoder := smithyjson.NewEncoder()
471	if err := awsAwsjson11_serializeOpDocumentDescribeServersInput(input, jsonEncoder.Value); err != nil {
472		return out, metadata, &smithy.SerializationError{Err: err}
473	}
474
475	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
476		return out, metadata, &smithy.SerializationError{Err: err}
477	}
478
479	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
480		return out, metadata, &smithy.SerializationError{Err: err}
481	}
482	in.Request = request
483
484	return next.HandleSerialize(ctx, in)
485}
486
487type awsAwsjson11_serializeOpDisassociateNode struct {
488}
489
490func (*awsAwsjson11_serializeOpDisassociateNode) ID() string {
491	return "OperationSerializer"
492}
493
494func (m *awsAwsjson11_serializeOpDisassociateNode) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
495	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
496) {
497	request, ok := in.Request.(*smithyhttp.Request)
498	if !ok {
499		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
500	}
501
502	input, ok := in.Parameters.(*DisassociateNodeInput)
503	_ = input
504	if !ok {
505		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
506	}
507
508	request.Request.URL.Path = "/"
509	request.Request.Method = "POST"
510	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
511	if err != nil {
512		return out, metadata, &smithy.SerializationError{Err: err}
513	}
514	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
515	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.DisassociateNode")
516
517	jsonEncoder := smithyjson.NewEncoder()
518	if err := awsAwsjson11_serializeOpDocumentDisassociateNodeInput(input, jsonEncoder.Value); err != nil {
519		return out, metadata, &smithy.SerializationError{Err: err}
520	}
521
522	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
523		return out, metadata, &smithy.SerializationError{Err: err}
524	}
525
526	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
527		return out, metadata, &smithy.SerializationError{Err: err}
528	}
529	in.Request = request
530
531	return next.HandleSerialize(ctx, in)
532}
533
534type awsAwsjson11_serializeOpExportServerEngineAttribute struct {
535}
536
537func (*awsAwsjson11_serializeOpExportServerEngineAttribute) ID() string {
538	return "OperationSerializer"
539}
540
541func (m *awsAwsjson11_serializeOpExportServerEngineAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
542	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
543) {
544	request, ok := in.Request.(*smithyhttp.Request)
545	if !ok {
546		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
547	}
548
549	input, ok := in.Parameters.(*ExportServerEngineAttributeInput)
550	_ = input
551	if !ok {
552		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
553	}
554
555	request.Request.URL.Path = "/"
556	request.Request.Method = "POST"
557	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
558	if err != nil {
559		return out, metadata, &smithy.SerializationError{Err: err}
560	}
561	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
562	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.ExportServerEngineAttribute")
563
564	jsonEncoder := smithyjson.NewEncoder()
565	if err := awsAwsjson11_serializeOpDocumentExportServerEngineAttributeInput(input, jsonEncoder.Value); err != nil {
566		return out, metadata, &smithy.SerializationError{Err: err}
567	}
568
569	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
570		return out, metadata, &smithy.SerializationError{Err: err}
571	}
572
573	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
574		return out, metadata, &smithy.SerializationError{Err: err}
575	}
576	in.Request = request
577
578	return next.HandleSerialize(ctx, in)
579}
580
581type awsAwsjson11_serializeOpListTagsForResource struct {
582}
583
584func (*awsAwsjson11_serializeOpListTagsForResource) ID() string {
585	return "OperationSerializer"
586}
587
588func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
589	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
590) {
591	request, ok := in.Request.(*smithyhttp.Request)
592	if !ok {
593		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
594	}
595
596	input, ok := in.Parameters.(*ListTagsForResourceInput)
597	_ = input
598	if !ok {
599		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
600	}
601
602	request.Request.URL.Path = "/"
603	request.Request.Method = "POST"
604	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
605	if err != nil {
606		return out, metadata, &smithy.SerializationError{Err: err}
607	}
608	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
609	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.ListTagsForResource")
610
611	jsonEncoder := smithyjson.NewEncoder()
612	if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil {
613		return out, metadata, &smithy.SerializationError{Err: err}
614	}
615
616	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
617		return out, metadata, &smithy.SerializationError{Err: err}
618	}
619
620	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
621		return out, metadata, &smithy.SerializationError{Err: err}
622	}
623	in.Request = request
624
625	return next.HandleSerialize(ctx, in)
626}
627
628type awsAwsjson11_serializeOpRestoreServer struct {
629}
630
631func (*awsAwsjson11_serializeOpRestoreServer) ID() string {
632	return "OperationSerializer"
633}
634
635func (m *awsAwsjson11_serializeOpRestoreServer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
636	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
637) {
638	request, ok := in.Request.(*smithyhttp.Request)
639	if !ok {
640		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
641	}
642
643	input, ok := in.Parameters.(*RestoreServerInput)
644	_ = input
645	if !ok {
646		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
647	}
648
649	request.Request.URL.Path = "/"
650	request.Request.Method = "POST"
651	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
652	if err != nil {
653		return out, metadata, &smithy.SerializationError{Err: err}
654	}
655	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
656	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.RestoreServer")
657
658	jsonEncoder := smithyjson.NewEncoder()
659	if err := awsAwsjson11_serializeOpDocumentRestoreServerInput(input, jsonEncoder.Value); err != nil {
660		return out, metadata, &smithy.SerializationError{Err: err}
661	}
662
663	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
664		return out, metadata, &smithy.SerializationError{Err: err}
665	}
666
667	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
668		return out, metadata, &smithy.SerializationError{Err: err}
669	}
670	in.Request = request
671
672	return next.HandleSerialize(ctx, in)
673}
674
675type awsAwsjson11_serializeOpStartMaintenance struct {
676}
677
678func (*awsAwsjson11_serializeOpStartMaintenance) ID() string {
679	return "OperationSerializer"
680}
681
682func (m *awsAwsjson11_serializeOpStartMaintenance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
683	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
684) {
685	request, ok := in.Request.(*smithyhttp.Request)
686	if !ok {
687		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
688	}
689
690	input, ok := in.Parameters.(*StartMaintenanceInput)
691	_ = input
692	if !ok {
693		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
694	}
695
696	request.Request.URL.Path = "/"
697	request.Request.Method = "POST"
698	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
699	if err != nil {
700		return out, metadata, &smithy.SerializationError{Err: err}
701	}
702	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
703	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.StartMaintenance")
704
705	jsonEncoder := smithyjson.NewEncoder()
706	if err := awsAwsjson11_serializeOpDocumentStartMaintenanceInput(input, jsonEncoder.Value); err != nil {
707		return out, metadata, &smithy.SerializationError{Err: err}
708	}
709
710	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
711		return out, metadata, &smithy.SerializationError{Err: err}
712	}
713
714	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
715		return out, metadata, &smithy.SerializationError{Err: err}
716	}
717	in.Request = request
718
719	return next.HandleSerialize(ctx, in)
720}
721
722type awsAwsjson11_serializeOpTagResource struct {
723}
724
725func (*awsAwsjson11_serializeOpTagResource) ID() string {
726	return "OperationSerializer"
727}
728
729func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
730	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
731) {
732	request, ok := in.Request.(*smithyhttp.Request)
733	if !ok {
734		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
735	}
736
737	input, ok := in.Parameters.(*TagResourceInput)
738	_ = input
739	if !ok {
740		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
741	}
742
743	request.Request.URL.Path = "/"
744	request.Request.Method = "POST"
745	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
746	if err != nil {
747		return out, metadata, &smithy.SerializationError{Err: err}
748	}
749	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
750	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.TagResource")
751
752	jsonEncoder := smithyjson.NewEncoder()
753	if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
754		return out, metadata, &smithy.SerializationError{Err: err}
755	}
756
757	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
758		return out, metadata, &smithy.SerializationError{Err: err}
759	}
760
761	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
762		return out, metadata, &smithy.SerializationError{Err: err}
763	}
764	in.Request = request
765
766	return next.HandleSerialize(ctx, in)
767}
768
769type awsAwsjson11_serializeOpUntagResource struct {
770}
771
772func (*awsAwsjson11_serializeOpUntagResource) ID() string {
773	return "OperationSerializer"
774}
775
776func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
777	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
778) {
779	request, ok := in.Request.(*smithyhttp.Request)
780	if !ok {
781		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
782	}
783
784	input, ok := in.Parameters.(*UntagResourceInput)
785	_ = input
786	if !ok {
787		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
788	}
789
790	request.Request.URL.Path = "/"
791	request.Request.Method = "POST"
792	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
793	if err != nil {
794		return out, metadata, &smithy.SerializationError{Err: err}
795	}
796	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
797	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.UntagResource")
798
799	jsonEncoder := smithyjson.NewEncoder()
800	if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil {
801		return out, metadata, &smithy.SerializationError{Err: err}
802	}
803
804	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
805		return out, metadata, &smithy.SerializationError{Err: err}
806	}
807
808	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
809		return out, metadata, &smithy.SerializationError{Err: err}
810	}
811	in.Request = request
812
813	return next.HandleSerialize(ctx, in)
814}
815
816type awsAwsjson11_serializeOpUpdateServer struct {
817}
818
819func (*awsAwsjson11_serializeOpUpdateServer) ID() string {
820	return "OperationSerializer"
821}
822
823func (m *awsAwsjson11_serializeOpUpdateServer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
824	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
825) {
826	request, ok := in.Request.(*smithyhttp.Request)
827	if !ok {
828		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
829	}
830
831	input, ok := in.Parameters.(*UpdateServerInput)
832	_ = input
833	if !ok {
834		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
835	}
836
837	request.Request.URL.Path = "/"
838	request.Request.Method = "POST"
839	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
840	if err != nil {
841		return out, metadata, &smithy.SerializationError{Err: err}
842	}
843	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
844	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.UpdateServer")
845
846	jsonEncoder := smithyjson.NewEncoder()
847	if err := awsAwsjson11_serializeOpDocumentUpdateServerInput(input, jsonEncoder.Value); err != nil {
848		return out, metadata, &smithy.SerializationError{Err: err}
849	}
850
851	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
852		return out, metadata, &smithy.SerializationError{Err: err}
853	}
854
855	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
856		return out, metadata, &smithy.SerializationError{Err: err}
857	}
858	in.Request = request
859
860	return next.HandleSerialize(ctx, in)
861}
862
863type awsAwsjson11_serializeOpUpdateServerEngineAttributes struct {
864}
865
866func (*awsAwsjson11_serializeOpUpdateServerEngineAttributes) ID() string {
867	return "OperationSerializer"
868}
869
870func (m *awsAwsjson11_serializeOpUpdateServerEngineAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
871	out middleware.SerializeOutput, metadata middleware.Metadata, err error,
872) {
873	request, ok := in.Request.(*smithyhttp.Request)
874	if !ok {
875		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
876	}
877
878	input, ok := in.Parameters.(*UpdateServerEngineAttributesInput)
879	_ = input
880	if !ok {
881		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
882	}
883
884	request.Request.URL.Path = "/"
885	request.Request.Method = "POST"
886	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
887	if err != nil {
888		return out, metadata, &smithy.SerializationError{Err: err}
889	}
890	httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
891	httpBindingEncoder.SetHeader("X-Amz-Target").String("OpsWorksCM_V2016_11_01.UpdateServerEngineAttributes")
892
893	jsonEncoder := smithyjson.NewEncoder()
894	if err := awsAwsjson11_serializeOpDocumentUpdateServerEngineAttributesInput(input, jsonEncoder.Value); err != nil {
895		return out, metadata, &smithy.SerializationError{Err: err}
896	}
897
898	if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
899		return out, metadata, &smithy.SerializationError{Err: err}
900	}
901
902	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
903		return out, metadata, &smithy.SerializationError{Err: err}
904	}
905	in.Request = request
906
907	return next.HandleSerialize(ctx, in)
908}
909func awsAwsjson11_serializeDocumentEngineAttribute(v *types.EngineAttribute, value smithyjson.Value) error {
910	object := value.Object()
911	defer object.Close()
912
913	if v.Name != nil {
914		ok := object.Key("Name")
915		ok.String(*v.Name)
916	}
917
918	if v.Value != nil {
919		ok := object.Key("Value")
920		ok.String(*v.Value)
921	}
922
923	return nil
924}
925
926func awsAwsjson11_serializeDocumentEngineAttributes(v []types.EngineAttribute, value smithyjson.Value) error {
927	array := value.Array()
928	defer array.Close()
929
930	for i := range v {
931		av := array.Value()
932		if err := awsAwsjson11_serializeDocumentEngineAttribute(&v[i], av); err != nil {
933			return err
934		}
935	}
936	return nil
937}
938
939func awsAwsjson11_serializeDocumentStrings(v []string, value smithyjson.Value) error {
940	array := value.Array()
941	defer array.Close()
942
943	for i := range v {
944		av := array.Value()
945		av.String(v[i])
946	}
947	return nil
948}
949
950func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error {
951	object := value.Object()
952	defer object.Close()
953
954	if v.Key != nil {
955		ok := object.Key("Key")
956		ok.String(*v.Key)
957	}
958
959	if v.Value != nil {
960		ok := object.Key("Value")
961		ok.String(*v.Value)
962	}
963
964	return nil
965}
966
967func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error {
968	array := value.Array()
969	defer array.Close()
970
971	for i := range v {
972		av := array.Value()
973		av.String(v[i])
974	}
975	return nil
976}
977
978func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error {
979	array := value.Array()
980	defer array.Close()
981
982	for i := range v {
983		av := array.Value()
984		if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil {
985			return err
986		}
987	}
988	return nil
989}
990
991func awsAwsjson11_serializeOpDocumentAssociateNodeInput(v *AssociateNodeInput, value smithyjson.Value) error {
992	object := value.Object()
993	defer object.Close()
994
995	if v.EngineAttributes != nil {
996		ok := object.Key("EngineAttributes")
997		if err := awsAwsjson11_serializeDocumentEngineAttributes(v.EngineAttributes, ok); err != nil {
998			return err
999		}
1000	}
1001
1002	if v.NodeName != nil {
1003		ok := object.Key("NodeName")
1004		ok.String(*v.NodeName)
1005	}
1006
1007	if v.ServerName != nil {
1008		ok := object.Key("ServerName")
1009		ok.String(*v.ServerName)
1010	}
1011
1012	return nil
1013}
1014
1015func awsAwsjson11_serializeOpDocumentCreateBackupInput(v *CreateBackupInput, value smithyjson.Value) error {
1016	object := value.Object()
1017	defer object.Close()
1018
1019	if v.Description != nil {
1020		ok := object.Key("Description")
1021		ok.String(*v.Description)
1022	}
1023
1024	if v.ServerName != nil {
1025		ok := object.Key("ServerName")
1026		ok.String(*v.ServerName)
1027	}
1028
1029	if v.Tags != nil {
1030		ok := object.Key("Tags")
1031		if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
1032			return err
1033		}
1034	}
1035
1036	return nil
1037}
1038
1039func awsAwsjson11_serializeOpDocumentCreateServerInput(v *CreateServerInput, value smithyjson.Value) error {
1040	object := value.Object()
1041	defer object.Close()
1042
1043	if v.AssociatePublicIpAddress != nil {
1044		ok := object.Key("AssociatePublicIpAddress")
1045		ok.Boolean(*v.AssociatePublicIpAddress)
1046	}
1047
1048	if v.BackupId != nil {
1049		ok := object.Key("BackupId")
1050		ok.String(*v.BackupId)
1051	}
1052
1053	if v.BackupRetentionCount != nil {
1054		ok := object.Key("BackupRetentionCount")
1055		ok.Integer(*v.BackupRetentionCount)
1056	}
1057
1058	if v.CustomCertificate != nil {
1059		ok := object.Key("CustomCertificate")
1060		ok.String(*v.CustomCertificate)
1061	}
1062
1063	if v.CustomDomain != nil {
1064		ok := object.Key("CustomDomain")
1065		ok.String(*v.CustomDomain)
1066	}
1067
1068	if v.CustomPrivateKey != nil {
1069		ok := object.Key("CustomPrivateKey")
1070		ok.String(*v.CustomPrivateKey)
1071	}
1072
1073	if v.DisableAutomatedBackup != nil {
1074		ok := object.Key("DisableAutomatedBackup")
1075		ok.Boolean(*v.DisableAutomatedBackup)
1076	}
1077
1078	if v.Engine != nil {
1079		ok := object.Key("Engine")
1080		ok.String(*v.Engine)
1081	}
1082
1083	if v.EngineAttributes != nil {
1084		ok := object.Key("EngineAttributes")
1085		if err := awsAwsjson11_serializeDocumentEngineAttributes(v.EngineAttributes, ok); err != nil {
1086			return err
1087		}
1088	}
1089
1090	if v.EngineModel != nil {
1091		ok := object.Key("EngineModel")
1092		ok.String(*v.EngineModel)
1093	}
1094
1095	if v.EngineVersion != nil {
1096		ok := object.Key("EngineVersion")
1097		ok.String(*v.EngineVersion)
1098	}
1099
1100	if v.InstanceProfileArn != nil {
1101		ok := object.Key("InstanceProfileArn")
1102		ok.String(*v.InstanceProfileArn)
1103	}
1104
1105	if v.InstanceType != nil {
1106		ok := object.Key("InstanceType")
1107		ok.String(*v.InstanceType)
1108	}
1109
1110	if v.KeyPair != nil {
1111		ok := object.Key("KeyPair")
1112		ok.String(*v.KeyPair)
1113	}
1114
1115	if v.PreferredBackupWindow != nil {
1116		ok := object.Key("PreferredBackupWindow")
1117		ok.String(*v.PreferredBackupWindow)
1118	}
1119
1120	if v.PreferredMaintenanceWindow != nil {
1121		ok := object.Key("PreferredMaintenanceWindow")
1122		ok.String(*v.PreferredMaintenanceWindow)
1123	}
1124
1125	if v.SecurityGroupIds != nil {
1126		ok := object.Key("SecurityGroupIds")
1127		if err := awsAwsjson11_serializeDocumentStrings(v.SecurityGroupIds, ok); err != nil {
1128			return err
1129		}
1130	}
1131
1132	if v.ServerName != nil {
1133		ok := object.Key("ServerName")
1134		ok.String(*v.ServerName)
1135	}
1136
1137	if v.ServiceRoleArn != nil {
1138		ok := object.Key("ServiceRoleArn")
1139		ok.String(*v.ServiceRoleArn)
1140	}
1141
1142	if v.SubnetIds != nil {
1143		ok := object.Key("SubnetIds")
1144		if err := awsAwsjson11_serializeDocumentStrings(v.SubnetIds, ok); err != nil {
1145			return err
1146		}
1147	}
1148
1149	if v.Tags != nil {
1150		ok := object.Key("Tags")
1151		if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
1152			return err
1153		}
1154	}
1155
1156	return nil
1157}
1158
1159func awsAwsjson11_serializeOpDocumentDeleteBackupInput(v *DeleteBackupInput, value smithyjson.Value) error {
1160	object := value.Object()
1161	defer object.Close()
1162
1163	if v.BackupId != nil {
1164		ok := object.Key("BackupId")
1165		ok.String(*v.BackupId)
1166	}
1167
1168	return nil
1169}
1170
1171func awsAwsjson11_serializeOpDocumentDeleteServerInput(v *DeleteServerInput, value smithyjson.Value) error {
1172	object := value.Object()
1173	defer object.Close()
1174
1175	if v.ServerName != nil {
1176		ok := object.Key("ServerName")
1177		ok.String(*v.ServerName)
1178	}
1179
1180	return nil
1181}
1182
1183func awsAwsjson11_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value smithyjson.Value) error {
1184	object := value.Object()
1185	defer object.Close()
1186
1187	return nil
1188}
1189
1190func awsAwsjson11_serializeOpDocumentDescribeBackupsInput(v *DescribeBackupsInput, value smithyjson.Value) error {
1191	object := value.Object()
1192	defer object.Close()
1193
1194	if v.BackupId != nil {
1195		ok := object.Key("BackupId")
1196		ok.String(*v.BackupId)
1197	}
1198
1199	if v.MaxResults != nil {
1200		ok := object.Key("MaxResults")
1201		ok.Integer(*v.MaxResults)
1202	}
1203
1204	if v.NextToken != nil {
1205		ok := object.Key("NextToken")
1206		ok.String(*v.NextToken)
1207	}
1208
1209	if v.ServerName != nil {
1210		ok := object.Key("ServerName")
1211		ok.String(*v.ServerName)
1212	}
1213
1214	return nil
1215}
1216
1217func awsAwsjson11_serializeOpDocumentDescribeEventsInput(v *DescribeEventsInput, value smithyjson.Value) error {
1218	object := value.Object()
1219	defer object.Close()
1220
1221	if v.MaxResults != nil {
1222		ok := object.Key("MaxResults")
1223		ok.Integer(*v.MaxResults)
1224	}
1225
1226	if v.NextToken != nil {
1227		ok := object.Key("NextToken")
1228		ok.String(*v.NextToken)
1229	}
1230
1231	if v.ServerName != nil {
1232		ok := object.Key("ServerName")
1233		ok.String(*v.ServerName)
1234	}
1235
1236	return nil
1237}
1238
1239func awsAwsjson11_serializeOpDocumentDescribeNodeAssociationStatusInput(v *DescribeNodeAssociationStatusInput, value smithyjson.Value) error {
1240	object := value.Object()
1241	defer object.Close()
1242
1243	if v.NodeAssociationStatusToken != nil {
1244		ok := object.Key("NodeAssociationStatusToken")
1245		ok.String(*v.NodeAssociationStatusToken)
1246	}
1247
1248	if v.ServerName != nil {
1249		ok := object.Key("ServerName")
1250		ok.String(*v.ServerName)
1251	}
1252
1253	return nil
1254}
1255
1256func awsAwsjson11_serializeOpDocumentDescribeServersInput(v *DescribeServersInput, value smithyjson.Value) error {
1257	object := value.Object()
1258	defer object.Close()
1259
1260	if v.MaxResults != nil {
1261		ok := object.Key("MaxResults")
1262		ok.Integer(*v.MaxResults)
1263	}
1264
1265	if v.NextToken != nil {
1266		ok := object.Key("NextToken")
1267		ok.String(*v.NextToken)
1268	}
1269
1270	if v.ServerName != nil {
1271		ok := object.Key("ServerName")
1272		ok.String(*v.ServerName)
1273	}
1274
1275	return nil
1276}
1277
1278func awsAwsjson11_serializeOpDocumentDisassociateNodeInput(v *DisassociateNodeInput, value smithyjson.Value) error {
1279	object := value.Object()
1280	defer object.Close()
1281
1282	if v.EngineAttributes != nil {
1283		ok := object.Key("EngineAttributes")
1284		if err := awsAwsjson11_serializeDocumentEngineAttributes(v.EngineAttributes, ok); err != nil {
1285			return err
1286		}
1287	}
1288
1289	if v.NodeName != nil {
1290		ok := object.Key("NodeName")
1291		ok.String(*v.NodeName)
1292	}
1293
1294	if v.ServerName != nil {
1295		ok := object.Key("ServerName")
1296		ok.String(*v.ServerName)
1297	}
1298
1299	return nil
1300}
1301
1302func awsAwsjson11_serializeOpDocumentExportServerEngineAttributeInput(v *ExportServerEngineAttributeInput, value smithyjson.Value) error {
1303	object := value.Object()
1304	defer object.Close()
1305
1306	if v.ExportAttributeName != nil {
1307		ok := object.Key("ExportAttributeName")
1308		ok.String(*v.ExportAttributeName)
1309	}
1310
1311	if v.InputAttributes != nil {
1312		ok := object.Key("InputAttributes")
1313		if err := awsAwsjson11_serializeDocumentEngineAttributes(v.InputAttributes, ok); err != nil {
1314			return err
1315		}
1316	}
1317
1318	if v.ServerName != nil {
1319		ok := object.Key("ServerName")
1320		ok.String(*v.ServerName)
1321	}
1322
1323	return nil
1324}
1325
1326func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error {
1327	object := value.Object()
1328	defer object.Close()
1329
1330	if v.MaxResults != nil {
1331		ok := object.Key("MaxResults")
1332		ok.Integer(*v.MaxResults)
1333	}
1334
1335	if v.NextToken != nil {
1336		ok := object.Key("NextToken")
1337		ok.String(*v.NextToken)
1338	}
1339
1340	if v.ResourceArn != nil {
1341		ok := object.Key("ResourceArn")
1342		ok.String(*v.ResourceArn)
1343	}
1344
1345	return nil
1346}
1347
1348func awsAwsjson11_serializeOpDocumentRestoreServerInput(v *RestoreServerInput, value smithyjson.Value) error {
1349	object := value.Object()
1350	defer object.Close()
1351
1352	if v.BackupId != nil {
1353		ok := object.Key("BackupId")
1354		ok.String(*v.BackupId)
1355	}
1356
1357	if v.InstanceType != nil {
1358		ok := object.Key("InstanceType")
1359		ok.String(*v.InstanceType)
1360	}
1361
1362	if v.KeyPair != nil {
1363		ok := object.Key("KeyPair")
1364		ok.String(*v.KeyPair)
1365	}
1366
1367	if v.ServerName != nil {
1368		ok := object.Key("ServerName")
1369		ok.String(*v.ServerName)
1370	}
1371
1372	return nil
1373}
1374
1375func awsAwsjson11_serializeOpDocumentStartMaintenanceInput(v *StartMaintenanceInput, value smithyjson.Value) error {
1376	object := value.Object()
1377	defer object.Close()
1378
1379	if v.EngineAttributes != nil {
1380		ok := object.Key("EngineAttributes")
1381		if err := awsAwsjson11_serializeDocumentEngineAttributes(v.EngineAttributes, ok); err != nil {
1382			return err
1383		}
1384	}
1385
1386	if v.ServerName != nil {
1387		ok := object.Key("ServerName")
1388		ok.String(*v.ServerName)
1389	}
1390
1391	return nil
1392}
1393
1394func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
1395	object := value.Object()
1396	defer object.Close()
1397
1398	if v.ResourceArn != nil {
1399		ok := object.Key("ResourceArn")
1400		ok.String(*v.ResourceArn)
1401	}
1402
1403	if v.Tags != nil {
1404		ok := object.Key("Tags")
1405		if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
1406			return err
1407		}
1408	}
1409
1410	return nil
1411}
1412
1413func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error {
1414	object := value.Object()
1415	defer object.Close()
1416
1417	if v.ResourceArn != nil {
1418		ok := object.Key("ResourceArn")
1419		ok.String(*v.ResourceArn)
1420	}
1421
1422	if v.TagKeys != nil {
1423		ok := object.Key("TagKeys")
1424		if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil {
1425			return err
1426		}
1427	}
1428
1429	return nil
1430}
1431
1432func awsAwsjson11_serializeOpDocumentUpdateServerEngineAttributesInput(v *UpdateServerEngineAttributesInput, value smithyjson.Value) error {
1433	object := value.Object()
1434	defer object.Close()
1435
1436	if v.AttributeName != nil {
1437		ok := object.Key("AttributeName")
1438		ok.String(*v.AttributeName)
1439	}
1440
1441	if v.AttributeValue != nil {
1442		ok := object.Key("AttributeValue")
1443		ok.String(*v.AttributeValue)
1444	}
1445
1446	if v.ServerName != nil {
1447		ok := object.Key("ServerName")
1448		ok.String(*v.ServerName)
1449	}
1450
1451	return nil
1452}
1453
1454func awsAwsjson11_serializeOpDocumentUpdateServerInput(v *UpdateServerInput, value smithyjson.Value) error {
1455	object := value.Object()
1456	defer object.Close()
1457
1458	if v.BackupRetentionCount != nil {
1459		ok := object.Key("BackupRetentionCount")
1460		ok.Integer(*v.BackupRetentionCount)
1461	}
1462
1463	if v.DisableAutomatedBackup != nil {
1464		ok := object.Key("DisableAutomatedBackup")
1465		ok.Boolean(*v.DisableAutomatedBackup)
1466	}
1467
1468	if v.PreferredBackupWindow != nil {
1469		ok := object.Key("PreferredBackupWindow")
1470		ok.String(*v.PreferredBackupWindow)
1471	}
1472
1473	if v.PreferredMaintenanceWindow != nil {
1474		ok := object.Key("PreferredMaintenanceWindow")
1475		ok.String(*v.PreferredMaintenanceWindow)
1476	}
1477
1478	if v.ServerName != nil {
1479		ok := object.Key("ServerName")
1480		ok.String(*v.ServerName)
1481	}
1482
1483	return nil
1484}
1485