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
pub fn serialize_structure_crate_input_create_application_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateApplicationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_1) = &input.client_token {
object.key("clientToken").string(var_1.as_str());
}
if let Some(var_2) = &input.definition {
#[allow(unused_mut)]
let mut object_3 = object.key("definition").start_object();
crate::json_ser::serialize_union_crate_model_definition(&mut object_3, var_2)?;
object_3.finish();
}
if let Some(var_4) = &input.description {
object.key("description").string(var_4.as_str());
}
if let Some(var_5) = &input.engine_type {
object.key("engineType").string(var_5.as_str());
}
if let Some(var_6) = &input.name {
object.key("name").string(var_6.as_str());
}
if let Some(var_7) = &input.tags {
#[allow(unused_mut)]
let mut object_8 = object.key("tags").start_object();
for (key_9, value_10) in var_7 {
{
object_8.key(key_9.as_str()).string(value_10.as_str());
}
}
object_8.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_data_set_import_task_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateDataSetImportTaskInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_11) = &input.client_token {
object.key("clientToken").string(var_11.as_str());
}
if let Some(var_12) = &input.import_config {
#[allow(unused_mut)]
let mut object_13 = object.key("importConfig").start_object();
crate::json_ser::serialize_union_crate_model_data_set_import_config(
&mut object_13,
var_12,
)?;
object_13.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_deployment_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateDeploymentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_14) = &input.application_version {
object.key("applicationVersion").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_14).into()),
);
}
if let Some(var_15) = &input.client_token {
object.key("clientToken").string(var_15.as_str());
}
if let Some(var_16) = &input.environment_id {
object.key("environmentId").string(var_16.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_environment_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateEnvironmentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_17) = &input.client_token {
object.key("clientToken").string(var_17.as_str());
}
if let Some(var_18) = &input.description {
object.key("description").string(var_18.as_str());
}
if let Some(var_19) = &input.engine_type {
object.key("engineType").string(var_19.as_str());
}
if let Some(var_20) = &input.engine_version {
object.key("engineVersion").string(var_20.as_str());
}
if let Some(var_21) = &input.high_availability_config {
#[allow(unused_mut)]
let mut object_22 = object.key("highAvailabilityConfig").start_object();
crate::json_ser::serialize_structure_crate_model_high_availability_config(
&mut object_22,
var_21,
)?;
object_22.finish();
}
if let Some(var_23) = &input.instance_type {
object.key("instanceType").string(var_23.as_str());
}
if let Some(var_24) = &input.name {
object.key("name").string(var_24.as_str());
}
if let Some(var_25) = &input.preferred_maintenance_window {
object
.key("preferredMaintenanceWindow")
.string(var_25.as_str());
}
if input.publicly_accessible {
object
.key("publiclyAccessible")
.boolean(input.publicly_accessible);
}
if let Some(var_26) = &input.security_group_ids {
let mut array_27 = object.key("securityGroupIds").start_array();
for item_28 in var_26 {
{
array_27.value().string(item_28.as_str());
}
}
array_27.finish();
}
if let Some(var_29) = &input.storage_configurations {
let mut array_30 = object.key("storageConfigurations").start_array();
for item_31 in var_29 {
{
#[allow(unused_mut)]
let mut object_32 = array_30.value().start_object();
crate::json_ser::serialize_union_crate_model_storage_configuration(
&mut object_32,
item_31,
)?;
object_32.finish();
}
}
array_30.finish();
}
if let Some(var_33) = &input.subnet_ids {
let mut array_34 = object.key("subnetIds").start_array();
for item_35 in var_33 {
{
array_34.value().string(item_35.as_str());
}
}
array_34.finish();
}
if let Some(var_36) = &input.tags {
#[allow(unused_mut)]
let mut object_37 = object.key("tags").start_object();
for (key_38, value_39) in var_36 {
{
object_37.key(key_38.as_str()).string(value_39.as_str());
}
}
object_37.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_start_batch_job_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StartBatchJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_40) = &input.batch_job_identifier {
#[allow(unused_mut)]
let mut object_41 = object.key("batchJobIdentifier").start_object();
crate::json_ser::serialize_union_crate_model_batch_job_identifier(&mut object_41, var_40)?;
object_41.finish();
}
if let Some(var_42) = &input.job_params {
#[allow(unused_mut)]
let mut object_43 = object.key("jobParams").start_object();
for (key_44, value_45) in var_42 {
{
object_43.key(key_44.as_str()).string(value_45.as_str());
}
}
object_43.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_stop_application_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StopApplicationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if input.force_stop {
object.key("forceStop").boolean(input.force_stop);
}
Ok(())
}
pub fn serialize_structure_crate_input_tag_resource_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::TagResourceInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_46) = &input.tags {
#[allow(unused_mut)]
let mut object_47 = object.key("tags").start_object();
for (key_48, value_49) in var_46 {
{
object_47.key(key_48.as_str()).string(value_49.as_str());
}
}
object_47.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_application_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateApplicationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_50) = &input.current_application_version {
object.key("currentApplicationVersion").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_50).into()),
);
}
if let Some(var_51) = &input.definition {
#[allow(unused_mut)]
let mut object_52 = object.key("definition").start_object();
crate::json_ser::serialize_union_crate_model_definition(&mut object_52, var_51)?;
object_52.finish();
}
if let Some(var_53) = &input.description {
object.key("description").string(var_53.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_environment_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateEnvironmentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if input.apply_during_maintenance_window {
object
.key("applyDuringMaintenanceWindow")
.boolean(input.apply_during_maintenance_window);
}
if let Some(var_54) = &input.desired_capacity {
object.key("desiredCapacity").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_54).into()),
);
}
if let Some(var_55) = &input.engine_version {
object.key("engineVersion").string(var_55.as_str());
}
if let Some(var_56) = &input.instance_type {
object.key("instanceType").string(var_56.as_str());
}
if let Some(var_57) = &input.preferred_maintenance_window {
object
.key("preferredMaintenanceWindow")
.string(var_57.as_str());
}
Ok(())
}
pub fn serialize_union_crate_model_definition(
object_3: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::Definition,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::Definition::S3Location(inner) => {
object_3.key("s3Location").string(inner.as_str());
}
crate::model::Definition::Content(inner) => {
object_3.key("content").string(inner.as_str());
}
crate::model::Definition::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"Definition",
),
)
}
}
Ok(())
}
pub fn serialize_union_crate_model_data_set_import_config(
object_13: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::DataSetImportConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::DataSetImportConfig::S3Location(inner) => {
object_13.key("s3Location").string(inner.as_str());
}
crate::model::DataSetImportConfig::DataSets(inner) => {
let mut array_58 = object_13.key("dataSets").start_array();
for item_59 in inner {
{
#[allow(unused_mut)]
let mut object_60 = array_58.value().start_object();
crate::json_ser::serialize_structure_crate_model_data_set_import_item(
&mut object_60,
item_59,
)?;
object_60.finish();
}
}
array_58.finish();
}
crate::model::DataSetImportConfig::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"DataSetImportConfig",
),
)
}
}
Ok(())
}
pub fn serialize_structure_crate_model_high_availability_config(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::HighAvailabilityConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_61) = &input.desired_capacity {
object.key("desiredCapacity").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_61).into()),
);
}
Ok(())
}
pub fn serialize_union_crate_model_storage_configuration(
object_32: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::StorageConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::StorageConfiguration::Efs(inner) => {
#[allow(unused_mut)]
let mut object_62 = object_32.key("efs").start_object();
crate::json_ser::serialize_structure_crate_model_efs_storage_configuration(
&mut object_62,
inner,
)?;
object_62.finish();
}
crate::model::StorageConfiguration::Fsx(inner) => {
#[allow(unused_mut)]
let mut object_63 = object_32.key("fsx").start_object();
crate::json_ser::serialize_structure_crate_model_fsx_storage_configuration(
&mut object_63,
inner,
)?;
object_63.finish();
}
crate::model::StorageConfiguration::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"StorageConfiguration",
),
)
}
}
Ok(())
}
pub fn serialize_union_crate_model_batch_job_identifier(
object_41: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::BatchJobIdentifier,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::BatchJobIdentifier::FileBatchJobIdentifier(inner) => {
#[allow(unused_mut)]
let mut object_64 = object_41.key("fileBatchJobIdentifier").start_object();
crate::json_ser::serialize_structure_crate_model_file_batch_job_identifier(
&mut object_64,
inner,
)?;
object_64.finish();
}
crate::model::BatchJobIdentifier::ScriptBatchJobIdentifier(inner) => {
#[allow(unused_mut)]
let mut object_65 = object_41.key("scriptBatchJobIdentifier").start_object();
crate::json_ser::serialize_structure_crate_model_script_batch_job_identifier(
&mut object_65,
inner,
)?;
object_65.finish();
}
crate::model::BatchJobIdentifier::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"BatchJobIdentifier",
),
)
}
}
Ok(())
}
pub fn serialize_structure_crate_model_data_set_import_item(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::DataSetImportItem,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_66) = &input.data_set {
#[allow(unused_mut)]
let mut object_67 = object.key("dataSet").start_object();
crate::json_ser::serialize_structure_crate_model_data_set(&mut object_67, var_66)?;
object_67.finish();
}
if let Some(var_68) = &input.external_location {
#[allow(unused_mut)]
let mut object_69 = object.key("externalLocation").start_object();
crate::json_ser::serialize_union_crate_model_external_location(&mut object_69, var_68)?;
object_69.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_efs_storage_configuration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::EfsStorageConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_70) = &input.file_system_id {
object.key("file-system-id").string(var_70.as_str());
}
if let Some(var_71) = &input.mount_point {
object.key("mount-point").string(var_71.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_fsx_storage_configuration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::FsxStorageConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_72) = &input.file_system_id {
object.key("file-system-id").string(var_72.as_str());
}
if let Some(var_73) = &input.mount_point {
object.key("mount-point").string(var_73.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_file_batch_job_identifier(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::FileBatchJobIdentifier,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_74) = &input.file_name {
object.key("fileName").string(var_74.as_str());
}
if let Some(var_75) = &input.folder_path {
object.key("folderPath").string(var_75.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_script_batch_job_identifier(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ScriptBatchJobIdentifier,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_76) = &input.script_name {
object.key("scriptName").string(var_76.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_data_set(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::DataSet,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_77) = &input.storage_type {
object.key("storageType").string(var_77.as_str());
}
if let Some(var_78) = &input.dataset_name {
object.key("datasetName").string(var_78.as_str());
}
if let Some(var_79) = &input.dataset_org {
#[allow(unused_mut)]
let mut object_80 = object.key("datasetOrg").start_object();
crate::json_ser::serialize_union_crate_model_dataset_org_attributes(
&mut object_80,
var_79,
)?;
object_80.finish();
}
if let Some(var_81) = &input.relative_path {
object.key("relativePath").string(var_81.as_str());
}
if let Some(var_82) = &input.record_length {
#[allow(unused_mut)]
let mut object_83 = object.key("recordLength").start_object();
crate::json_ser::serialize_structure_crate_model_record_length(&mut object_83, var_82)?;
object_83.finish();
}
Ok(())
}
pub fn serialize_union_crate_model_external_location(
object_69: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ExternalLocation,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::ExternalLocation::S3Location(inner) => {
object_69.key("s3Location").string(inner.as_str());
}
crate::model::ExternalLocation::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"ExternalLocation",
),
)
}
}
Ok(())
}
pub fn serialize_union_crate_model_dataset_org_attributes(
object_80: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::DatasetOrgAttributes,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
match input {
crate::model::DatasetOrgAttributes::Vsam(inner) => {
#[allow(unused_mut)]
let mut object_84 = object_80.key("vsam").start_object();
crate::json_ser::serialize_structure_crate_model_vsam_attributes(
&mut object_84,
inner,
)?;
object_84.finish();
}
crate::model::DatasetOrgAttributes::Gdg(inner) => {
#[allow(unused_mut)]
let mut object_85 = object_80.key("gdg").start_object();
crate::json_ser::serialize_structure_crate_model_gdg_attributes(&mut object_85, inner)?;
object_85.finish();
}
crate::model::DatasetOrgAttributes::Unknown => {
return Err(
aws_smithy_http::operation::error::SerializationError::unknown_variant(
"DatasetOrgAttributes",
),
)
}
}
Ok(())
}
pub fn serialize_structure_crate_model_record_length(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::RecordLength,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
{
object.key("min").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.min).into()),
);
}
{
object.key("max").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.max).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_model_vsam_attributes(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::VsamAttributes,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_86) = &input.format {
object.key("format").string(var_86.as_str());
}
if let Some(var_87) = &input.encoding {
object.key("encoding").string(var_87.as_str());
}
if input.compressed {
object.key("compressed").boolean(input.compressed);
}
if let Some(var_88) = &input.primary_key {
#[allow(unused_mut)]
let mut object_89 = object.key("primaryKey").start_object();
crate::json_ser::serialize_structure_crate_model_primary_key(&mut object_89, var_88)?;
object_89.finish();
}
if let Some(var_90) = &input.alternate_keys {
let mut array_91 = object.key("alternateKeys").start_array();
for item_92 in var_90 {
{
#[allow(unused_mut)]
let mut object_93 = array_91.value().start_object();
crate::json_ser::serialize_structure_crate_model_alternate_key(
&mut object_93,
item_92,
)?;
object_93.finish();
}
}
array_91.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_gdg_attributes(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::GdgAttributes,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if input.limit != 0 {
object.key("limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.limit).into()),
);
}
if let Some(var_94) = &input.roll_disposition {
object.key("rollDisposition").string(var_94.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_primary_key(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::PrimaryKey,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_95) = &input.name {
object.key("name").string(var_95.as_str());
}
{
object.key("offset").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.offset).into()),
);
}
{
object.key("length").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.length).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_model_alternate_key(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::AlternateKey,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_96) = &input.name {
object.key("name").string(var_96.as_str());
}
{
object.key("offset").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.offset).into()),
);
}
{
object.key("length").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.length).into()),
);
}
if input.allow_duplicates {
object
.key("allowDuplicates")
.boolean(input.allow_duplicates);
}
Ok(())
}