aws-sdk-iotthingsgraph 0.5.0

AWS SDK for AWS IoT Things Graph
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_associate_entity_to_thing_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AssociateEntityToThingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1) = &input.thing_name {
        object.key("thingName").string(var_1);
    }
    if let Some(var_2) = &input.entity_id {
        object.key("entityId").string(var_2);
    }
    if let Some(var_3) = &input.namespace_version {
        object.key("namespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_3).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_flow_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateFlowTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_4) = &input.definition {
        let mut object_5 = object.key("definition").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(&mut object_5, var_4)?;
        object_5.finish();
    }
    if let Some(var_6) = &input.compatible_namespace_version {
        object.key("compatibleNamespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_6).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_system_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSystemInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_7) = &input.tags {
        let mut array_8 = object.key("tags").start_array();
        for item_9 in var_7 {
            {
                let mut object_10 = array_8.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_10, item_9)?;
                object_10.finish();
            }
        }
        array_8.finish();
    }
    if let Some(var_11) = &input.definition {
        let mut object_12 = object.key("definition").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(
            &mut object_12,
            var_11,
        )?;
        object_12.finish();
    }
    if let Some(var_13) = &input.target {
        object.key("target").string(var_13.as_str());
    }
    if let Some(var_14) = &input.greengrass_group_name {
        object.key("greengrassGroupName").string(var_14);
    }
    if let Some(var_15) = &input.s3_bucket_name {
        object.key("s3BucketName").string(var_15);
    }
    if let Some(var_16) = &input.metrics_configuration {
        let mut object_17 = object.key("metricsConfiguration").start_object();
        crate::json_ser::serialize_structure_crate_model_metrics_configuration(
            &mut object_17,
            var_16,
        )?;
        object_17.finish();
    }
    if let Some(var_18) = &input.flow_actions_role_arn {
        object.key("flowActionsRoleArn").string(var_18);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_system_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSystemTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_19) = &input.definition {
        let mut object_20 = object.key("definition").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(
            &mut object_20,
            var_19,
        )?;
        object_20.finish();
    }
    if let Some(var_21) = &input.compatible_namespace_version {
        object.key("compatibleNamespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_21).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_flow_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteFlowTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_22) = &input.id {
        object.key("id").string(var_22);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_system_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteSystemInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_23) = &input.id {
        object.key("id").string(var_23);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_system_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteSystemTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_24) = &input.id {
        object.key("id").string(var_24);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_deploy_system_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeploySystemInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_25) = &input.id {
        object.key("id").string(var_25);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_deprecate_flow_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeprecateFlowTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_26) = &input.id {
        object.key("id").string(var_26);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_deprecate_system_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeprecateSystemTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_27) = &input.id {
        object.key("id").string(var_27);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_namespace_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeNamespaceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_28) = &input.namespace_name {
        object.key("namespaceName").string(var_28);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_dissociate_entity_from_thing_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DissociateEntityFromThingInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_29) = &input.thing_name {
        object.key("thingName").string(var_29);
    }
    if let Some(var_30) = &input.entity_type {
        object.key("entityType").string(var_30.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_entities_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetEntitiesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_31) = &input.ids {
        let mut array_32 = object.key("ids").start_array();
        for item_33 in var_31 {
            {
                array_32.value().string(item_33);
            }
        }
        array_32.finish();
    }
    if let Some(var_34) = &input.namespace_version {
        object.key("namespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_34).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_flow_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetFlowTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_35) = &input.id {
        object.key("id").string(var_35);
    }
    if let Some(var_36) = &input.revision_number {
        object.key("revisionNumber").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_36).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_flow_template_revisions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetFlowTemplateRevisionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_37) = &input.id {
        object.key("id").string(var_37);
    }
    if let Some(var_38) = &input.next_token {
        object.key("nextToken").string(var_38);
    }
    if let Some(var_39) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_39).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_system_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetSystemInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_40) = &input.id {
        object.key("id").string(var_40);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_system_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetSystemTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_41) = &input.id {
        object.key("id").string(var_41);
    }
    if let Some(var_42) = &input.revision_number {
        object.key("revisionNumber").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_42).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_system_template_revisions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetSystemTemplateRevisionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_43) = &input.id {
        object.key("id").string(var_43);
    }
    if let Some(var_44) = &input.next_token {
        object.key("nextToken").string(var_44);
    }
    if let Some(var_45) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_45).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_upload_status_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetUploadStatusInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_46) = &input.upload_id {
        object.key("uploadId").string(var_46);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_flow_execution_messages_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListFlowExecutionMessagesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_47) = &input.flow_execution_id {
        object.key("flowExecutionId").string(var_47);
    }
    if let Some(var_48) = &input.next_token {
        object.key("nextToken").string(var_48);
    }
    if let Some(var_49) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_49).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_tags_for_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListTagsForResourceInput,
) -> 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.resource_arn {
        object.key("resourceArn").string(var_51);
    }
    if let Some(var_52) = &input.next_token {
        object.key("nextToken").string(var_52);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_entities_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchEntitiesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_53) = &input.entity_types {
        let mut array_54 = object.key("entityTypes").start_array();
        for item_55 in var_53 {
            {
                array_54.value().string(item_55.as_str());
            }
        }
        array_54.finish();
    }
    if let Some(var_56) = &input.filters {
        let mut array_57 = object.key("filters").start_array();
        for item_58 in var_56 {
            {
                let mut object_59 = array_57.value().start_object();
                crate::json_ser::serialize_structure_crate_model_entity_filter(
                    &mut object_59,
                    item_58,
                )?;
                object_59.finish();
            }
        }
        array_57.finish();
    }
    if let Some(var_60) = &input.next_token {
        object.key("nextToken").string(var_60);
    }
    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.namespace_version {
        object.key("namespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_62).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_flow_executions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchFlowExecutionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_63) = &input.system_instance_id {
        object.key("systemInstanceId").string(var_63);
    }
    if let Some(var_64) = &input.flow_execution_id {
        object.key("flowExecutionId").string(var_64);
    }
    if let Some(var_65) = &input.start_time {
        object
            .key("startTime")
            .date_time(var_65, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_66) = &input.end_time {
        object
            .key("endTime")
            .date_time(var_66, aws_smithy_types::date_time::Format::EpochSeconds)?;
    }
    if let Some(var_67) = &input.next_token {
        object.key("nextToken").string(var_67);
    }
    if let Some(var_68) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_68).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_flow_templates_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchFlowTemplatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_69) = &input.filters {
        let mut array_70 = object.key("filters").start_array();
        for item_71 in var_69 {
            {
                let mut object_72 = array_70.value().start_object();
                crate::json_ser::serialize_structure_crate_model_flow_template_filter(
                    &mut object_72,
                    item_71,
                )?;
                object_72.finish();
            }
        }
        array_70.finish();
    }
    if let Some(var_73) = &input.next_token {
        object.key("nextToken").string(var_73);
    }
    if let Some(var_74) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_74).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_system_instances_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchSystemInstancesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_75) = &input.filters {
        let mut array_76 = object.key("filters").start_array();
        for item_77 in var_75 {
            {
                let mut object_78 = array_76.value().start_object();
                crate::json_ser::serialize_structure_crate_model_system_instance_filter(
                    &mut object_78,
                    item_77,
                )?;
                object_78.finish();
            }
        }
        array_76.finish();
    }
    if let Some(var_79) = &input.next_token {
        object.key("nextToken").string(var_79);
    }
    if let Some(var_80) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_80).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_system_templates_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchSystemTemplatesInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_81) = &input.filters {
        let mut array_82 = object.key("filters").start_array();
        for item_83 in var_81 {
            {
                let mut object_84 = array_82.value().start_object();
                crate::json_ser::serialize_structure_crate_model_system_template_filter(
                    &mut object_84,
                    item_83,
                )?;
                object_84.finish();
            }
        }
        array_82.finish();
    }
    if let Some(var_85) = &input.next_token {
        object.key("nextToken").string(var_85);
    }
    if let Some(var_86) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_86).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_things_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchThingsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_87) = &input.entity_id {
        object.key("entityId").string(var_87);
    }
    if let Some(var_88) = &input.next_token {
        object.key("nextToken").string(var_88);
    }
    if let Some(var_89) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_89).into()),
        );
    }
    if let Some(var_90) = &input.namespace_version {
        object.key("namespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_90).into()),
        );
    }
    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::SerializationError> {
    if let Some(var_91) = &input.resource_arn {
        object.key("resourceArn").string(var_91);
    }
    if let Some(var_92) = &input.tags {
        let mut array_93 = object.key("tags").start_array();
        for item_94 in var_92 {
            {
                let mut object_95 = array_93.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_95, item_94)?;
                object_95.finish();
            }
        }
        array_93.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_undeploy_system_instance_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UndeploySystemInstanceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_96) = &input.id {
        object.key("id").string(var_96);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_untag_resource_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UntagResourceInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_97) = &input.resource_arn {
        object.key("resourceArn").string(var_97);
    }
    if let Some(var_98) = &input.tag_keys {
        let mut array_99 = object.key("tagKeys").start_array();
        for item_100 in var_98 {
            {
                array_99.value().string(item_100);
            }
        }
        array_99.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_flow_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateFlowTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_101) = &input.id {
        object.key("id").string(var_101);
    }
    if let Some(var_102) = &input.definition {
        let mut object_103 = object.key("definition").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(
            &mut object_103,
            var_102,
        )?;
        object_103.finish();
    }
    if let Some(var_104) = &input.compatible_namespace_version {
        object.key("compatibleNamespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_104).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_system_template_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateSystemTemplateInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_105) = &input.id {
        object.key("id").string(var_105);
    }
    if let Some(var_106) = &input.definition {
        let mut object_107 = object.key("definition").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(
            &mut object_107,
            var_106,
        )?;
        object_107.finish();
    }
    if let Some(var_108) = &input.compatible_namespace_version {
        object.key("compatibleNamespaceVersion").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_108).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_upload_entity_definitions_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UploadEntityDefinitionsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_109) = &input.document {
        let mut object_110 = object.key("document").start_object();
        crate::json_ser::serialize_structure_crate_model_definition_document(
            &mut object_110,
            var_109,
        )?;
        object_110.finish();
    }
    if input.sync_with_public_namespace {
        object
            .key("syncWithPublicNamespace")
            .boolean(input.sync_with_public_namespace);
    }
    if input.deprecate_existing_entities {
        object
            .key("deprecateExistingEntities")
            .boolean(input.deprecate_existing_entities);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_definition_document(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::DefinitionDocument,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_111) = &input.language {
        object.key("language").string(var_111.as_str());
    }
    if let Some(var_112) = &input.text {
        object.key("text").string(var_112);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_tag(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::Tag,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_113) = &input.key {
        object.key("key").string(var_113);
    }
    if let Some(var_114) = &input.value {
        object.key("value").string(var_114);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_metrics_configuration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::MetricsConfiguration,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if input.cloud_metric_enabled {
        object
            .key("cloudMetricEnabled")
            .boolean(input.cloud_metric_enabled);
    }
    if let Some(var_115) = &input.metric_rule_role_arn {
        object.key("metricRuleRoleArn").string(var_115);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_entity_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EntityFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_116) = &input.name {
        object.key("name").string(var_116.as_str());
    }
    if let Some(var_117) = &input.value {
        let mut array_118 = object.key("value").start_array();
        for item_119 in var_117 {
            {
                array_118.value().string(item_119);
            }
        }
        array_118.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_flow_template_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::FlowTemplateFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_120) = &input.name {
        object.key("name").string(var_120.as_str());
    }
    if let Some(var_121) = &input.value {
        let mut array_122 = object.key("value").start_array();
        for item_123 in var_121 {
            {
                array_122.value().string(item_123);
            }
        }
        array_122.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_system_instance_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SystemInstanceFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_124) = &input.name {
        object.key("name").string(var_124.as_str());
    }
    if let Some(var_125) = &input.value {
        let mut array_126 = object.key("value").start_array();
        for item_127 in var_125 {
            {
                array_126.value().string(item_127);
            }
        }
        array_126.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_system_template_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SystemTemplateFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_128) = &input.name {
        object.key("name").string(var_128.as_str());
    }
    if let Some(var_129) = &input.value {
        let mut array_130 = object.key("value").start_array();
        for item_131 in var_129 {
            {
                array_130.value().string(item_131);
            }
        }
        array_130.finish();
    }
    Ok(())
}