aws-sdk-snowball 0.8.0

AWS SDK for Amazon Import/Export Snowball
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_cancel_cluster_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CancelClusterInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1) = &input.cluster_id {
        object.key("ClusterId").string(var_1.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_cancel_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CancelJobInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_2) = &input.job_id {
        object.key("JobId").string(var_2.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_address_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateAddressInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_3) = &input.address {
        let mut object_4 = object.key("Address").start_object();
        crate::json_ser::serialize_structure_crate_model_address(&mut object_4, var_3)?;
        object_4.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_cluster_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateClusterInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_5) = &input.job_type {
        object.key("JobType").string(var_5.as_str());
    }
    if let Some(var_6) = &input.resources {
        let mut object_7 = object.key("Resources").start_object();
        crate::json_ser::serialize_structure_crate_model_job_resource(&mut object_7, var_6)?;
        object_7.finish();
    }
    if let Some(var_8) = &input.on_device_service_configuration {
        let mut object_9 = object.key("OnDeviceServiceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_on_device_service_configuration(
            &mut object_9,
            var_8,
        )?;
        object_9.finish();
    }
    if let Some(var_10) = &input.description {
        object.key("Description").string(var_10.as_str());
    }
    if let Some(var_11) = &input.address_id {
        object.key("AddressId").string(var_11.as_str());
    }
    if let Some(var_12) = &input.kms_key_arn {
        object.key("KmsKeyARN").string(var_12.as_str());
    }
    if let Some(var_13) = &input.role_arn {
        object.key("RoleARN").string(var_13.as_str());
    }
    if let Some(var_14) = &input.snowball_type {
        object.key("SnowballType").string(var_14.as_str());
    }
    if let Some(var_15) = &input.shipping_option {
        object.key("ShippingOption").string(var_15.as_str());
    }
    if let Some(var_16) = &input.notification {
        let mut object_17 = object.key("Notification").start_object();
        crate::json_ser::serialize_structure_crate_model_notification(&mut object_17, var_16)?;
        object_17.finish();
    }
    if let Some(var_18) = &input.forwarding_address_id {
        object.key("ForwardingAddressId").string(var_18.as_str());
    }
    if let Some(var_19) = &input.tax_documents {
        let mut object_20 = object.key("TaxDocuments").start_object();
        crate::json_ser::serialize_structure_crate_model_tax_documents(&mut object_20, var_19)?;
        object_20.finish();
    }
    if let Some(var_21) = &input.remote_management {
        object.key("RemoteManagement").string(var_21.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateJobInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_22) = &input.job_type {
        object.key("JobType").string(var_22.as_str());
    }
    if let Some(var_23) = &input.resources {
        let mut object_24 = object.key("Resources").start_object();
        crate::json_ser::serialize_structure_crate_model_job_resource(&mut object_24, var_23)?;
        object_24.finish();
    }
    if let Some(var_25) = &input.on_device_service_configuration {
        let mut object_26 = object.key("OnDeviceServiceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_on_device_service_configuration(
            &mut object_26,
            var_25,
        )?;
        object_26.finish();
    }
    if let Some(var_27) = &input.description {
        object.key("Description").string(var_27.as_str());
    }
    if let Some(var_28) = &input.address_id {
        object.key("AddressId").string(var_28.as_str());
    }
    if let Some(var_29) = &input.kms_key_arn {
        object.key("KmsKeyARN").string(var_29.as_str());
    }
    if let Some(var_30) = &input.role_arn {
        object.key("RoleARN").string(var_30.as_str());
    }
    if let Some(var_31) = &input.snowball_capacity_preference {
        object
            .key("SnowballCapacityPreference")
            .string(var_31.as_str());
    }
    if let Some(var_32) = &input.shipping_option {
        object.key("ShippingOption").string(var_32.as_str());
    }
    if let Some(var_33) = &input.notification {
        let mut object_34 = object.key("Notification").start_object();
        crate::json_ser::serialize_structure_crate_model_notification(&mut object_34, var_33)?;
        object_34.finish();
    }
    if let Some(var_35) = &input.cluster_id {
        object.key("ClusterId").string(var_35.as_str());
    }
    if let Some(var_36) = &input.snowball_type {
        object.key("SnowballType").string(var_36.as_str());
    }
    if let Some(var_37) = &input.forwarding_address_id {
        object.key("ForwardingAddressId").string(var_37.as_str());
    }
    if let Some(var_38) = &input.tax_documents {
        let mut object_39 = object.key("TaxDocuments").start_object();
        crate::json_ser::serialize_structure_crate_model_tax_documents(&mut object_39, var_38)?;
        object_39.finish();
    }
    if let Some(var_40) = &input.device_configuration {
        let mut object_41 = object.key("DeviceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_device_configuration(
            &mut object_41,
            var_40,
        )?;
        object_41.finish();
    }
    if let Some(var_42) = &input.remote_management {
        object.key("RemoteManagement").string(var_42.as_str());
    }
    if let Some(var_43) = &input.long_term_pricing_id {
        object.key("LongTermPricingId").string(var_43.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_long_term_pricing_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateLongTermPricingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_44) = &input.long_term_pricing_type {
        object.key("LongTermPricingType").string(var_44.as_str());
    }
    if let Some(var_45) = &input.is_long_term_pricing_auto_renew {
        object.key("IsLongTermPricingAutoRenew").boolean(*var_45);
    }
    if let Some(var_46) = &input.snowball_type {
        object.key("SnowballType").string(var_46.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_return_shipping_label_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateReturnShippingLabelInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_47) = &input.job_id {
        object.key("JobId").string(var_47.as_str());
    }
    if let Some(var_48) = &input.shipping_option {
        object.key("ShippingOption").string(var_48.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_address_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAddressInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_49) = &input.address_id {
        object.key("AddressId").string(var_49.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_addresses_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAddressesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_50) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_50).into()),
        );
    }
    if let Some(var_51) = &input.next_token {
        object.key("NextToken").string(var_51.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_cluster_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeClusterInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_52) = &input.cluster_id {
        object.key("ClusterId").string(var_52.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeJobInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_53) = &input.job_id {
        object.key("JobId").string(var_53.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_return_shipping_label_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeReturnShippingLabelInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_54) = &input.job_id {
        object.key("JobId").string(var_54.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_job_manifest_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetJobManifestInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_55) = &input.job_id {
        object.key("JobId").string(var_55.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_job_unlock_code_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetJobUnlockCodeInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_56) = &input.job_id {
        object.key("JobId").string(var_56.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_software_updates_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetSoftwareUpdatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_57) = &input.job_id {
        object.key("JobId").string(var_57.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_cluster_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListClusterJobsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_58) = &input.cluster_id {
        object.key("ClusterId").string(var_58.as_str());
    }
    if let Some(var_59) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_59).into()),
        );
    }
    if let Some(var_60) = &input.next_token {
        object.key("NextToken").string(var_60.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_clusters_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListClustersInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_61) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_61).into()),
        );
    }
    if let Some(var_62) = &input.next_token {
        object.key("NextToken").string(var_62.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_compatible_images_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListCompatibleImagesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_63) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_63).into()),
        );
    }
    if let Some(var_64) = &input.next_token {
        object.key("NextToken").string(var_64.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListJobsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_65) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_65).into()),
        );
    }
    if let Some(var_66) = &input.next_token {
        object.key("NextToken").string(var_66.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_long_term_pricing_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListLongTermPricingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_67) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_67).into()),
        );
    }
    if let Some(var_68) = &input.next_token {
        object.key("NextToken").string(var_68.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_cluster_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateClusterInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_69) = &input.cluster_id {
        object.key("ClusterId").string(var_69.as_str());
    }
    if let Some(var_70) = &input.role_arn {
        object.key("RoleARN").string(var_70.as_str());
    }
    if let Some(var_71) = &input.description {
        object.key("Description").string(var_71.as_str());
    }
    if let Some(var_72) = &input.resources {
        let mut object_73 = object.key("Resources").start_object();
        crate::json_ser::serialize_structure_crate_model_job_resource(&mut object_73, var_72)?;
        object_73.finish();
    }
    if let Some(var_74) = &input.on_device_service_configuration {
        let mut object_75 = object.key("OnDeviceServiceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_on_device_service_configuration(
            &mut object_75,
            var_74,
        )?;
        object_75.finish();
    }
    if let Some(var_76) = &input.address_id {
        object.key("AddressId").string(var_76.as_str());
    }
    if let Some(var_77) = &input.shipping_option {
        object.key("ShippingOption").string(var_77.as_str());
    }
    if let Some(var_78) = &input.notification {
        let mut object_79 = object.key("Notification").start_object();
        crate::json_ser::serialize_structure_crate_model_notification(&mut object_79, var_78)?;
        object_79.finish();
    }
    if let Some(var_80) = &input.forwarding_address_id {
        object.key("ForwardingAddressId").string(var_80.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateJobInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_81) = &input.job_id {
        object.key("JobId").string(var_81.as_str());
    }
    if let Some(var_82) = &input.role_arn {
        object.key("RoleARN").string(var_82.as_str());
    }
    if let Some(var_83) = &input.notification {
        let mut object_84 = object.key("Notification").start_object();
        crate::json_ser::serialize_structure_crate_model_notification(&mut object_84, var_83)?;
        object_84.finish();
    }
    if let Some(var_85) = &input.resources {
        let mut object_86 = object.key("Resources").start_object();
        crate::json_ser::serialize_structure_crate_model_job_resource(&mut object_86, var_85)?;
        object_86.finish();
    }
    if let Some(var_87) = &input.on_device_service_configuration {
        let mut object_88 = object.key("OnDeviceServiceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_on_device_service_configuration(
            &mut object_88,
            var_87,
        )?;
        object_88.finish();
    }
    if let Some(var_89) = &input.address_id {
        object.key("AddressId").string(var_89.as_str());
    }
    if let Some(var_90) = &input.shipping_option {
        object.key("ShippingOption").string(var_90.as_str());
    }
    if let Some(var_91) = &input.description {
        object.key("Description").string(var_91.as_str());
    }
    if let Some(var_92) = &input.snowball_capacity_preference {
        object
            .key("SnowballCapacityPreference")
            .string(var_92.as_str());
    }
    if let Some(var_93) = &input.forwarding_address_id {
        object.key("ForwardingAddressId").string(var_93.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_job_shipment_state_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateJobShipmentStateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_94) = &input.job_id {
        object.key("JobId").string(var_94.as_str());
    }
    if let Some(var_95) = &input.shipment_state {
        object.key("ShipmentState").string(var_95.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_long_term_pricing_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateLongTermPricingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_96) = &input.long_term_pricing_id {
        object.key("LongTermPricingId").string(var_96.as_str());
    }
    if let Some(var_97) = &input.replacement_job {
        object.key("ReplacementJob").string(var_97.as_str());
    }
    if let Some(var_98) = &input.is_long_term_pricing_auto_renew {
        object.key("IsLongTermPricingAutoRenew").boolean(*var_98);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_address(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Address,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_99) = &input.address_id {
        object.key("AddressId").string(var_99.as_str());
    }
    if let Some(var_100) = &input.name {
        object.key("Name").string(var_100.as_str());
    }
    if let Some(var_101) = &input.company {
        object.key("Company").string(var_101.as_str());
    }
    if let Some(var_102) = &input.street1 {
        object.key("Street1").string(var_102.as_str());
    }
    if let Some(var_103) = &input.street2 {
        object.key("Street2").string(var_103.as_str());
    }
    if let Some(var_104) = &input.street3 {
        object.key("Street3").string(var_104.as_str());
    }
    if let Some(var_105) = &input.city {
        object.key("City").string(var_105.as_str());
    }
    if let Some(var_106) = &input.state_or_province {
        object.key("StateOrProvince").string(var_106.as_str());
    }
    if let Some(var_107) = &input.prefecture_or_district {
        object.key("PrefectureOrDistrict").string(var_107.as_str());
    }
    if let Some(var_108) = &input.landmark {
        object.key("Landmark").string(var_108.as_str());
    }
    if let Some(var_109) = &input.country {
        object.key("Country").string(var_109.as_str());
    }
    if let Some(var_110) = &input.postal_code {
        object.key("PostalCode").string(var_110.as_str());
    }
    if let Some(var_111) = &input.phone_number {
        object.key("PhoneNumber").string(var_111.as_str());
    }
    if input.is_restricted {
        object.key("IsRestricted").boolean(input.is_restricted);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_job_resource(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::JobResource,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_112) = &input.s3_resources {
        let mut array_113 = object.key("S3Resources").start_array();
        for item_114 in var_112 {
            {
                let mut object_115 = array_113.value().start_object();
                crate::json_ser::serialize_structure_crate_model_s3_resource(
                    &mut object_115,
                    item_114,
                )?;
                object_115.finish();
            }
        }
        array_113.finish();
    }
    if let Some(var_116) = &input.lambda_resources {
        let mut array_117 = object.key("LambdaResources").start_array();
        for item_118 in var_116 {
            {
                let mut object_119 = array_117.value().start_object();
                crate::json_ser::serialize_structure_crate_model_lambda_resource(
                    &mut object_119,
                    item_118,
                )?;
                object_119.finish();
            }
        }
        array_117.finish();
    }
    if let Some(var_120) = &input.ec2_ami_resources {
        let mut array_121 = object.key("Ec2AmiResources").start_array();
        for item_122 in var_120 {
            {
                let mut object_123 = array_121.value().start_object();
                crate::json_ser::serialize_structure_crate_model_ec2_ami_resource(
                    &mut object_123,
                    item_122,
                )?;
                object_123.finish();
            }
        }
        array_121.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_on_device_service_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::OnDeviceServiceConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_124) = &input.nfs_on_device_service {
        let mut object_125 = object.key("NFSOnDeviceService").start_object();
        crate::json_ser::serialize_structure_crate_model_nfs_on_device_service_configuration(
            &mut object_125,
            var_124,
        )?;
        object_125.finish();
    }
    if let Some(var_126) = &input.tgw_on_device_service {
        let mut object_127 = object.key("TGWOnDeviceService").start_object();
        crate::json_ser::serialize_structure_crate_model_tgw_on_device_service_configuration(
            &mut object_127,
            var_126,
        )?;
        object_127.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_notification(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Notification,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_128) = &input.sns_topic_arn {
        object.key("SnsTopicARN").string(var_128.as_str());
    }
    if let Some(var_129) = &input.job_states_to_notify {
        let mut array_130 = object.key("JobStatesToNotify").start_array();
        for item_131 in var_129 {
            {
                array_130.value().string(item_131.as_str());
            }
        }
        array_130.finish();
    }
    if input.notify_all {
        object.key("NotifyAll").boolean(input.notify_all);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tax_documents(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::TaxDocuments,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_132) = &input.ind {
        let mut object_133 = object.key("IND").start_object();
        crate::json_ser::serialize_structure_crate_model_ind_tax_documents(
            &mut object_133,
            var_132,
        )?;
        object_133.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_device_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DeviceConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_134) = &input.snowcone_device_configuration {
        let mut object_135 = object.key("SnowconeDeviceConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_snowcone_device_configuration(
            &mut object_135,
            var_134,
        )?;
        object_135.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_s3_resource(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::S3Resource,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_136) = &input.bucket_arn {
        object.key("BucketArn").string(var_136.as_str());
    }
    if let Some(var_137) = &input.key_range {
        let mut object_138 = object.key("KeyRange").start_object();
        crate::json_ser::serialize_structure_crate_model_key_range(&mut object_138, var_137)?;
        object_138.finish();
    }
    if let Some(var_139) = &input.target_on_device_services {
        let mut array_140 = object.key("TargetOnDeviceServices").start_array();
        for item_141 in var_139 {
            {
                let mut object_142 = array_140.value().start_object();
                crate::json_ser::serialize_structure_crate_model_target_on_device_service(
                    &mut object_142,
                    item_141,
                )?;
                object_142.finish();
            }
        }
        array_140.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_lambda_resource(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::LambdaResource,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_143) = &input.lambda_arn {
        object.key("LambdaArn").string(var_143.as_str());
    }
    if let Some(var_144) = &input.event_triggers {
        let mut array_145 = object.key("EventTriggers").start_array();
        for item_146 in var_144 {
            {
                let mut object_147 = array_145.value().start_object();
                crate::json_ser::serialize_structure_crate_model_event_trigger_definition(
                    &mut object_147,
                    item_146,
                )?;
                object_147.finish();
            }
        }
        array_145.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_ec2_ami_resource(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Ec2AmiResource,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_148) = &input.ami_id {
        object.key("AmiId").string(var_148.as_str());
    }
    if let Some(var_149) = &input.snowball_ami_id {
        object.key("SnowballAmiId").string(var_149.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_nfs_on_device_service_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::NfsOnDeviceServiceConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.storage_limit != 0 {
        object.key("StorageLimit").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.storage_limit).into()),
        );
    }
    if let Some(var_150) = &input.storage_unit {
        object.key("StorageUnit").string(var_150.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tgw_on_device_service_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::TgwOnDeviceServiceConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.storage_limit != 0 {
        object.key("StorageLimit").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.storage_limit).into()),
        );
    }
    if let Some(var_151) = &input.storage_unit {
        object.key("StorageUnit").string(var_151.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_ind_tax_documents(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::IndTaxDocuments,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_152) = &input.gstin {
        object.key("GSTIN").string(var_152.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_snowcone_device_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SnowconeDeviceConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_153) = &input.wireless_connection {
        let mut object_154 = object.key("WirelessConnection").start_object();
        crate::json_ser::serialize_structure_crate_model_wireless_connection(
            &mut object_154,
            var_153,
        )?;
        object_154.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_key_range(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::KeyRange,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_155) = &input.begin_marker {
        object.key("BeginMarker").string(var_155.as_str());
    }
    if let Some(var_156) = &input.end_marker {
        object.key("EndMarker").string(var_156.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_target_on_device_service(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::TargetOnDeviceService,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_157) = &input.service_name {
        object.key("ServiceName").string(var_157.as_str());
    }
    if let Some(var_158) = &input.transfer_option {
        object.key("TransferOption").string(var_158.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_event_trigger_definition(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EventTriggerDefinition,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_159) = &input.event_resource_arn {
        object.key("EventResourceARN").string(var_159.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_wireless_connection(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::WirelessConnection,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.is_wifi_enabled {
        object.key("IsWifiEnabled").boolean(input.is_wifi_enabled);
    }
    Ok(())
}