#[non_exhaustive]
pub enum VerificationState {
    BenignPositive,
    FalsePositive,
    TruePositive,
    UnknownValue,
    Unknown(UnknownVariantValue),
}
Expand description

When writing a match expression against VerificationState, it is important to ensure your code is forward-compatible. That is, if a match arm handles a case for a feature that is supported by the service but has not been represented as an enum variant in a current version of SDK, your code should continue to work when you upgrade SDK to a future version in which the enum does include a variant for that feature.

Here is an example of how you can make a match expression forward-compatible:

# let verificationstate = unimplemented!();
match verificationstate {
    VerificationState::BenignPositive => { /* ... */ },
    VerificationState::FalsePositive => { /* ... */ },
    VerificationState::TruePositive => { /* ... */ },
    VerificationState::UnknownValue => { /* ... */ },
    other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
    _ => { /* ... */ },
}

The above code demonstrates that when verificationstate represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant VerificationState::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to VerificationState::Unknown(UnknownVariantValue("NewFeature".to_owned())) and calling as_str on it yields "NewFeature". This match expression is forward-compatible when executed with a newer version of SDK where the variant VerificationState::NewFeature is defined. Specifically, when verificationstate represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on VerificationState::NewFeature also yielding "NewFeature".

Explicitly matching on the Unknown variant should be avoided for two reasons:

  • The inner data UnknownVariantValue is opaque, and no further information can be extracted.
  • It might inadvertently shadow other intended match arms. Note: VerificationState::Unknown has been renamed to ::UnknownValue.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

BenignPositive

§

FalsePositive

§

TruePositive

§

UnknownValue

Note: ::Unknown has been renamed to ::UnknownValue.

§

Unknown(UnknownVariantValue)

Unknown contains new variants that have been added since this code was generated.

Implementations§

Returns the &str value of the enum member.

Examples found in repository?
src/model.rs (line 9751)
9750
9751
9752
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/json_ser.rs (line 166)
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
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
pub fn serialize_structure_crate_input_batch_update_findings_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::BatchUpdateFindingsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if input.confidence != 0 {
        object.key("Confidence").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.confidence).into()),
        );
    }
    if input.criticality != 0 {
        object.key("Criticality").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.criticality).into()),
        );
    }
    if let Some(var_16) = &input.finding_identifiers {
        let mut array_17 = object.key("FindingIdentifiers").start_array();
        for item_18 in var_16 {
            {
                #[allow(unused_mut)]
                let mut object_19 = array_17.value().start_object();
                crate::json_ser::serialize_structure_crate_model_aws_security_finding_identifier(
                    &mut object_19,
                    item_18,
                )?;
                object_19.finish();
            }
        }
        array_17.finish();
    }
    if let Some(var_20) = &input.note {
        #[allow(unused_mut)]
        let mut object_21 = object.key("Note").start_object();
        crate::json_ser::serialize_structure_crate_model_note_update(&mut object_21, var_20)?;
        object_21.finish();
    }
    if let Some(var_22) = &input.related_findings {
        let mut array_23 = object.key("RelatedFindings").start_array();
        for item_24 in var_22 {
            {
                #[allow(unused_mut)]
                let mut object_25 = array_23.value().start_object();
                crate::json_ser::serialize_structure_crate_model_related_finding(
                    &mut object_25,
                    item_24,
                )?;
                object_25.finish();
            }
        }
        array_23.finish();
    }
    if let Some(var_26) = &input.severity {
        #[allow(unused_mut)]
        let mut object_27 = object.key("Severity").start_object();
        crate::json_ser::serialize_structure_crate_model_severity_update(&mut object_27, var_26)?;
        object_27.finish();
    }
    if let Some(var_28) = &input.types {
        let mut array_29 = object.key("Types").start_array();
        for item_30 in var_28 {
            {
                array_29.value().string(item_30.as_str());
            }
        }
        array_29.finish();
    }
    if let Some(var_31) = &input.user_defined_fields {
        #[allow(unused_mut)]
        let mut object_32 = object.key("UserDefinedFields").start_object();
        for (key_33, value_34) in var_31 {
            {
                object_32.key(key_33.as_str()).string(value_34.as_str());
            }
        }
        object_32.finish();
    }
    if let Some(var_35) = &input.verification_state {
        object.key("VerificationState").string(var_35.as_str());
    }
    if let Some(var_36) = &input.workflow {
        #[allow(unused_mut)]
        let mut object_37 = object.key("Workflow").start_object();
        crate::json_ser::serialize_structure_crate_model_workflow_update(&mut object_37, var_36)?;
        object_37.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_action_target_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateActionTargetInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_38) = &input.description {
        object.key("Description").string(var_38.as_str());
    }
    if let Some(var_39) = &input.id {
        object.key("Id").string(var_39.as_str());
    }
    if let Some(var_40) = &input.name {
        object.key("Name").string(var_40.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_finding_aggregator_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateFindingAggregatorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_41) = &input.region_linking_mode {
        object.key("RegionLinkingMode").string(var_41.as_str());
    }
    if let Some(var_42) = &input.regions {
        let mut array_43 = object.key("Regions").start_array();
        for item_44 in var_42 {
            {
                array_43.value().string(item_44.as_str());
            }
        }
        array_43.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_insight_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateInsightInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_45) = &input.filters {
        #[allow(unused_mut)]
        let mut object_46 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_aws_security_finding_filters(
            &mut object_46,
            var_45,
        )?;
        object_46.finish();
    }
    if let Some(var_47) = &input.group_by_attribute {
        object.key("GroupByAttribute").string(var_47.as_str());
    }
    if let Some(var_48) = &input.name {
        object.key("Name").string(var_48.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_members_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateMembersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_49) = &input.account_details {
        let mut array_50 = object.key("AccountDetails").start_array();
        for item_51 in var_49 {
            {
                #[allow(unused_mut)]
                let mut object_52 = array_50.value().start_object();
                crate::json_ser::serialize_structure_crate_model_account_details(
                    &mut object_52,
                    item_51,
                )?;
                object_52.finish();
            }
        }
        array_50.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_decline_invitations_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeclineInvitationsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_53) = &input.account_ids {
        let mut array_54 = object.key("AccountIds").start_array();
        for item_55 in var_53 {
            {
                array_54.value().string(item_55.as_str());
            }
        }
        array_54.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_invitations_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteInvitationsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_56) = &input.account_ids {
        let mut array_57 = object.key("AccountIds").start_array();
        for item_58 in var_56 {
            {
                array_57.value().string(item_58.as_str());
            }
        }
        array_57.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_members_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteMembersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_59) = &input.account_ids {
        let mut array_60 = object.key("AccountIds").start_array();
        for item_61 in var_59 {
            {
                array_60.value().string(item_61.as_str());
            }
        }
        array_60.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_action_targets_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeActionTargetsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_62) = &input.action_target_arns {
        let mut array_63 = object.key("ActionTargetArns").start_array();
        for item_64 in var_62 {
            {
                array_63.value().string(item_64.as_str());
            }
        }
        array_63.finish();
    }
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_65) = &input.next_token {
        object.key("NextToken").string(var_65.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disable_organization_admin_account_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisableOrganizationAdminAccountInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_66) = &input.admin_account_id {
        object.key("AdminAccountId").string(var_66.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_disassociate_members_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DisassociateMembersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_67) = &input.account_ids {
        let mut array_68 = object.key("AccountIds").start_array();
        for item_69 in var_67 {
            {
                array_68.value().string(item_69.as_str());
            }
        }
        array_68.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_enable_import_findings_for_product_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::EnableImportFindingsForProductInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_70) = &input.product_arn {
        object.key("ProductArn").string(var_70.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_enable_organization_admin_account_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::EnableOrganizationAdminAccountInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_71) = &input.admin_account_id {
        object.key("AdminAccountId").string(var_71.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_enable_security_hub_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::EnableSecurityHubInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if input.enable_default_standards {
        object
            .key("EnableDefaultStandards")
            .boolean(input.enable_default_standards);
    }
    if let Some(var_72) = &input.tags {
        #[allow(unused_mut)]
        let mut object_73 = object.key("Tags").start_object();
        for (key_74, value_75) in var_72 {
            {
                object_73.key(key_74.as_str()).string(value_75.as_str());
            }
        }
        object_73.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_enabled_standards_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetEnabledStandardsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_76) = &input.next_token {
        object.key("NextToken").string(var_76.as_str());
    }
    if let Some(var_77) = &input.standards_subscription_arns {
        let mut array_78 = object.key("StandardsSubscriptionArns").start_array();
        for item_79 in var_77 {
            {
                array_78.value().string(item_79.as_str());
            }
        }
        array_78.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_findings_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetFindingsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_80) = &input.filters {
        #[allow(unused_mut)]
        let mut object_81 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_aws_security_finding_filters(
            &mut object_81,
            var_80,
        )?;
        object_81.finish();
    }
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_82) = &input.next_token {
        object.key("NextToken").string(var_82.as_str());
    }
    if let Some(var_83) = &input.sort_criteria {
        let mut array_84 = object.key("SortCriteria").start_array();
        for item_85 in var_83 {
            {
                #[allow(unused_mut)]
                let mut object_86 = array_84.value().start_object();
                crate::json_ser::serialize_structure_crate_model_sort_criterion(
                    &mut object_86,
                    item_85,
                )?;
                object_86.finish();
            }
        }
        array_84.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_insights_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetInsightsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_87) = &input.insight_arns {
        let mut array_88 = object.key("InsightArns").start_array();
        for item_89 in var_87 {
            {
                array_88.value().string(item_89.as_str());
            }
        }
        array_88.finish();
    }
    if input.max_results != 0 {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.max_results).into()),
        );
    }
    if let Some(var_90) = &input.next_token {
        object.key("NextToken").string(var_90.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_members_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetMembersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_91) = &input.account_ids {
        let mut array_92 = object.key("AccountIds").start_array();
        for item_93 in var_91 {
            {
                array_92.value().string(item_93.as_str());
            }
        }
        array_92.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_invite_members_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::InviteMembersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_94) = &input.account_ids {
        let mut array_95 = object.key("AccountIds").start_array();
        for item_96 in var_94 {
            {
                array_95.value().string(item_96.as_str());
            }
        }
        array_95.finish();
    }
    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_97) = &input.tags {
        #[allow(unused_mut)]
        let mut object_98 = object.key("Tags").start_object();
        for (key_99, value_100) in var_97 {
            {
                object_98.key(key_99.as_str()).string(value_100.as_str());
            }
        }
        object_98.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_action_target_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateActionTargetInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_101) = &input.description {
        object.key("Description").string(var_101.as_str());
    }
    if let Some(var_102) = &input.name {
        object.key("Name").string(var_102.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_finding_aggregator_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateFindingAggregatorInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_103) = &input.finding_aggregator_arn {
        object.key("FindingAggregatorArn").string(var_103.as_str());
    }
    if let Some(var_104) = &input.region_linking_mode {
        object.key("RegionLinkingMode").string(var_104.as_str());
    }
    if let Some(var_105) = &input.regions {
        let mut array_106 = object.key("Regions").start_array();
        for item_107 in var_105 {
            {
                array_106.value().string(item_107.as_str());
            }
        }
        array_106.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_findings_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateFindingsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_108) = &input.filters {
        #[allow(unused_mut)]
        let mut object_109 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_aws_security_finding_filters(
            &mut object_109,
            var_108,
        )?;
        object_109.finish();
    }
    if let Some(var_110) = &input.note {
        #[allow(unused_mut)]
        let mut object_111 = object.key("Note").start_object();
        crate::json_ser::serialize_structure_crate_model_note_update(&mut object_111, var_110)?;
        object_111.finish();
    }
    if let Some(var_112) = &input.record_state {
        object.key("RecordState").string(var_112.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_insight_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateInsightInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_113) = &input.filters {
        #[allow(unused_mut)]
        let mut object_114 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_aws_security_finding_filters(
            &mut object_114,
            var_113,
        )?;
        object_114.finish();
    }
    if let Some(var_115) = &input.group_by_attribute {
        object.key("GroupByAttribute").string(var_115.as_str());
    }
    if let Some(var_116) = &input.name {
        object.key("Name").string(var_116.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_organization_configuration_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateOrganizationConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    {
        object.key("AutoEnable").boolean(input.auto_enable);
    }
    if let Some(var_117) = &input.auto_enable_standards {
        object.key("AutoEnableStandards").string(var_117.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_security_hub_configuration_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateSecurityHubConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if input.auto_enable_controls {
        object
            .key("AutoEnableControls")
            .boolean(input.auto_enable_controls);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_standards_control_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateStandardsControlInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_118) = &input.control_status {
        object.key("ControlStatus").string(var_118.as_str());
    }
    if let Some(var_119) = &input.disabled_reason {
        object.key("DisabledReason").string(var_119.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_standards_subscription_request(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::StandardsSubscriptionRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_120) = &input.standards_arn {
        object.key("StandardsArn").string(var_120.as_str());
    }
    if let Some(var_121) = &input.standards_input {
        #[allow(unused_mut)]
        let mut object_122 = object.key("StandardsInput").start_object();
        for (key_123, value_124) in var_121 {
            {
                object_122.key(key_123.as_str()).string(value_124.as_str());
            }
        }
        object_122.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_aws_security_finding(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::AwsSecurityFinding,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_125) = &input.schema_version {
        object.key("SchemaVersion").string(var_125.as_str());
    }
    if let Some(var_126) = &input.id {
        object.key("Id").string(var_126.as_str());
    }
    if let Some(var_127) = &input.product_arn {
        object.key("ProductArn").string(var_127.as_str());
    }
    if let Some(var_128) = &input.product_name {
        object.key("ProductName").string(var_128.as_str());
    }
    if let Some(var_129) = &input.company_name {
        object.key("CompanyName").string(var_129.as_str());
    }
    if let Some(var_130) = &input.region {
        object.key("Region").string(var_130.as_str());
    }
    if let Some(var_131) = &input.generator_id {
        object.key("GeneratorId").string(var_131.as_str());
    }
    if let Some(var_132) = &input.aws_account_id {
        object.key("AwsAccountId").string(var_132.as_str());
    }
    if let Some(var_133) = &input.types {
        let mut array_134 = object.key("Types").start_array();
        for item_135 in var_133 {
            {
                array_134.value().string(item_135.as_str());
            }
        }
        array_134.finish();
    }
    if let Some(var_136) = &input.first_observed_at {
        object.key("FirstObservedAt").string(var_136.as_str());
    }
    if let Some(var_137) = &input.last_observed_at {
        object.key("LastObservedAt").string(var_137.as_str());
    }
    if let Some(var_138) = &input.created_at {
        object.key("CreatedAt").string(var_138.as_str());
    }
    if let Some(var_139) = &input.updated_at {
        object.key("UpdatedAt").string(var_139.as_str());
    }
    if let Some(var_140) = &input.severity {
        #[allow(unused_mut)]
        let mut object_141 = object.key("Severity").start_object();
        crate::json_ser::serialize_structure_crate_model_severity(&mut object_141, var_140)?;
        object_141.finish();
    }
    if input.confidence != 0 {
        object.key("Confidence").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.confidence).into()),
        );
    }
    if input.criticality != 0 {
        object.key("Criticality").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.criticality).into()),
        );
    }
    if let Some(var_142) = &input.title {
        object.key("Title").string(var_142.as_str());
    }
    if let Some(var_143) = &input.description {
        object.key("Description").string(var_143.as_str());
    }
    if let Some(var_144) = &input.remediation {
        #[allow(unused_mut)]
        let mut object_145 = object.key("Remediation").start_object();
        crate::json_ser::serialize_structure_crate_model_remediation(&mut object_145, var_144)?;
        object_145.finish();
    }
    if let Some(var_146) = &input.source_url {
        object.key("SourceUrl").string(var_146.as_str());
    }
    if let Some(var_147) = &input.product_fields {
        #[allow(unused_mut)]
        let mut object_148 = object.key("ProductFields").start_object();
        for (key_149, value_150) in var_147 {
            {
                object_148.key(key_149.as_str()).string(value_150.as_str());
            }
        }
        object_148.finish();
    }
    if let Some(var_151) = &input.user_defined_fields {
        #[allow(unused_mut)]
        let mut object_152 = object.key("UserDefinedFields").start_object();
        for (key_153, value_154) in var_151 {
            {
                object_152.key(key_153.as_str()).string(value_154.as_str());
            }
        }
        object_152.finish();
    }
    if let Some(var_155) = &input.malware {
        let mut array_156 = object.key("Malware").start_array();
        for item_157 in var_155 {
            {
                #[allow(unused_mut)]
                let mut object_158 = array_156.value().start_object();
                crate::json_ser::serialize_structure_crate_model_malware(
                    &mut object_158,
                    item_157,
                )?;
                object_158.finish();
            }
        }
        array_156.finish();
    }
    if let Some(var_159) = &input.network {
        #[allow(unused_mut)]
        let mut object_160 = object.key("Network").start_object();
        crate::json_ser::serialize_structure_crate_model_network(&mut object_160, var_159)?;
        object_160.finish();
    }
    if let Some(var_161) = &input.network_path {
        let mut array_162 = object.key("NetworkPath").start_array();
        for item_163 in var_161 {
            {
                #[allow(unused_mut)]
                let mut object_164 = array_162.value().start_object();
                crate::json_ser::serialize_structure_crate_model_network_path_component(
                    &mut object_164,
                    item_163,
                )?;
                object_164.finish();
            }
        }
        array_162.finish();
    }
    if let Some(var_165) = &input.process {
        #[allow(unused_mut)]
        let mut object_166 = object.key("Process").start_object();
        crate::json_ser::serialize_structure_crate_model_process_details(&mut object_166, var_165)?;
        object_166.finish();
    }
    if let Some(var_167) = &input.threats {
        let mut array_168 = object.key("Threats").start_array();
        for item_169 in var_167 {
            {
                #[allow(unused_mut)]
                let mut object_170 = array_168.value().start_object();
                crate::json_ser::serialize_structure_crate_model_threat(&mut object_170, item_169)?;
                object_170.finish();
            }
        }
        array_168.finish();
    }
    if let Some(var_171) = &input.threat_intel_indicators {
        let mut array_172 = object.key("ThreatIntelIndicators").start_array();
        for item_173 in var_171 {
            {
                #[allow(unused_mut)]
                let mut object_174 = array_172.value().start_object();
                crate::json_ser::serialize_structure_crate_model_threat_intel_indicator(
                    &mut object_174,
                    item_173,
                )?;
                object_174.finish();
            }
        }
        array_172.finish();
    }
    if let Some(var_175) = &input.resources {
        let mut array_176 = object.key("Resources").start_array();
        for item_177 in var_175 {
            {
                #[allow(unused_mut)]
                let mut object_178 = array_176.value().start_object();
                crate::json_ser::serialize_structure_crate_model_resource(
                    &mut object_178,
                    item_177,
                )?;
                object_178.finish();
            }
        }
        array_176.finish();
    }
    if let Some(var_179) = &input.compliance {
        #[allow(unused_mut)]
        let mut object_180 = object.key("Compliance").start_object();
        crate::json_ser::serialize_structure_crate_model_compliance(&mut object_180, var_179)?;
        object_180.finish();
    }
    if let Some(var_181) = &input.verification_state {
        object.key("VerificationState").string(var_181.as_str());
    }
    if let Some(var_182) = &input.workflow_state {
        object.key("WorkflowState").string(var_182.as_str());
    }
    if let Some(var_183) = &input.workflow {
        #[allow(unused_mut)]
        let mut object_184 = object.key("Workflow").start_object();
        crate::json_ser::serialize_structure_crate_model_workflow(&mut object_184, var_183)?;
        object_184.finish();
    }
    if let Some(var_185) = &input.record_state {
        object.key("RecordState").string(var_185.as_str());
    }
    if let Some(var_186) = &input.related_findings {
        let mut array_187 = object.key("RelatedFindings").start_array();
        for item_188 in var_186 {
            {
                #[allow(unused_mut)]
                let mut object_189 = array_187.value().start_object();
                crate::json_ser::serialize_structure_crate_model_related_finding(
                    &mut object_189,
                    item_188,
                )?;
                object_189.finish();
            }
        }
        array_187.finish();
    }
    if let Some(var_190) = &input.note {
        #[allow(unused_mut)]
        let mut object_191 = object.key("Note").start_object();
        crate::json_ser::serialize_structure_crate_model_note(&mut object_191, var_190)?;
        object_191.finish();
    }
    if let Some(var_192) = &input.vulnerabilities {
        let mut array_193 = object.key("Vulnerabilities").start_array();
        for item_194 in var_192 {
            {
                #[allow(unused_mut)]
                let mut object_195 = array_193.value().start_object();
                crate::json_ser::serialize_structure_crate_model_vulnerability(
                    &mut object_195,
                    item_194,
                )?;
                object_195.finish();
            }
        }
        array_193.finish();
    }
    if let Some(var_196) = &input.patch_summary {
        #[allow(unused_mut)]
        let mut object_197 = object.key("PatchSummary").start_object();
        crate::json_ser::serialize_structure_crate_model_patch_summary(&mut object_197, var_196)?;
        object_197.finish();
    }
    if let Some(var_198) = &input.action {
        #[allow(unused_mut)]
        let mut object_199 = object.key("Action").start_object();
        crate::json_ser::serialize_structure_crate_model_action(&mut object_199, var_198)?;
        object_199.finish();
    }
    if let Some(var_200) = &input.finding_provider_fields {
        #[allow(unused_mut)]
        let mut object_201 = object.key("FindingProviderFields").start_object();
        crate::json_ser::serialize_structure_crate_model_finding_provider_fields(
            &mut object_201,
            var_200,
        )?;
        object_201.finish();
    }
    if input.sample {
        object.key("Sample").boolean(input.sample);
    }
    Ok(())
}

Returns all the &str values of the enum members.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more