#[non_exhaustive]
pub enum Domain {
    Ecommerce,
    VideoOnDemand,
    Unknown(UnknownVariantValue),
}
Expand description

When writing a match expression against Domain, 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 domain = unimplemented!();
match domain {
    Domain::Ecommerce => { /* ... */ },
    Domain::VideoOnDemand => { /* ... */ },
    other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
    _ => { /* ... */ },
}

The above code demonstrates that when domain represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant Domain::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to Domain::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 Domain::NewFeature is defined. Specifically, when domain represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on Domain::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.

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.
§

Ecommerce

§

VideoOnDemand

§

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 748)
747
748
749
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/json_ser.rs (line 243)
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
pub fn serialize_structure_crate_input_create_dataset_group_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDatasetGroupInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_56) = &input.name {
        object.key("name").string(var_56.as_str());
    }
    if let Some(var_57) = &input.role_arn {
        object.key("roleArn").string(var_57.as_str());
    }
    if let Some(var_58) = &input.kms_key_arn {
        object.key("kmsKeyArn").string(var_58.as_str());
    }
    if let Some(var_59) = &input.domain {
        object.key("domain").string(var_59.as_str());
    }
    if let Some(var_60) = &input.tags {
        let mut array_61 = object.key("tags").start_array();
        for item_62 in var_60 {
            {
                #[allow(unused_mut)]
                let mut object_63 = array_61.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_63, item_62)?;
                object_63.finish();
            }
        }
        array_61.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_dataset_import_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateDatasetImportJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_64) = &input.job_name {
        object.key("jobName").string(var_64.as_str());
    }
    if let Some(var_65) = &input.dataset_arn {
        object.key("datasetArn").string(var_65.as_str());
    }
    if let Some(var_66) = &input.data_source {
        #[allow(unused_mut)]
        let mut object_67 = object.key("dataSource").start_object();
        crate::json_ser::serialize_structure_crate_model_data_source(&mut object_67, var_66)?;
        object_67.finish();
    }
    if let Some(var_68) = &input.role_arn {
        object.key("roleArn").string(var_68.as_str());
    }
    if let Some(var_69) = &input.tags {
        let mut array_70 = object.key("tags").start_array();
        for item_71 in var_69 {
            {
                #[allow(unused_mut)]
                let mut object_72 = array_70.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_72, item_71)?;
                object_72.finish();
            }
        }
        array_70.finish();
    }
    if let Some(var_73) = &input.import_mode {
        object.key("importMode").string(var_73.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_event_tracker_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateEventTrackerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_74) = &input.name {
        object.key("name").string(var_74.as_str());
    }
    if let Some(var_75) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_75.as_str());
    }
    if let Some(var_76) = &input.tags {
        let mut array_77 = object.key("tags").start_array();
        for item_78 in var_76 {
            {
                #[allow(unused_mut)]
                let mut object_79 = array_77.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_79, item_78)?;
                object_79.finish();
            }
        }
        array_77.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_filter_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateFilterInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_80) = &input.name {
        object.key("name").string(var_80.as_str());
    }
    if let Some(var_81) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_81.as_str());
    }
    if let Some(var_82) = &input.filter_expression {
        object.key("filterExpression").string(var_82.as_str());
    }
    if let Some(var_83) = &input.tags {
        let mut array_84 = object.key("tags").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_tag(&mut object_86, item_85)?;
                object_86.finish();
            }
        }
        array_84.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_recommender_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateRecommenderInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_87) = &input.name {
        object.key("name").string(var_87.as_str());
    }
    if let Some(var_88) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_88.as_str());
    }
    if let Some(var_89) = &input.recipe_arn {
        object.key("recipeArn").string(var_89.as_str());
    }
    if let Some(var_90) = &input.recommender_config {
        #[allow(unused_mut)]
        let mut object_91 = object.key("recommenderConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_recommender_config(
            &mut object_91,
            var_90,
        )?;
        object_91.finish();
    }
    if let Some(var_92) = &input.tags {
        let mut array_93 = object.key("tags").start_array();
        for item_94 in var_92 {
            {
                #[allow(unused_mut)]
                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_create_schema_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSchemaInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_96) = &input.name {
        object.key("name").string(var_96.as_str());
    }
    if let Some(var_97) = &input.schema {
        object.key("schema").string(var_97.as_str());
    }
    if let Some(var_98) = &input.domain {
        object.key("domain").string(var_98.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_solution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSolutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_99) = &input.name {
        object.key("name").string(var_99.as_str());
    }
    if let Some(var_100) = &input.perform_hpo {
        object.key("performHPO").boolean(*var_100);
    }
    if input.perform_auto_ml {
        object.key("performAutoML").boolean(input.perform_auto_ml);
    }
    if let Some(var_101) = &input.recipe_arn {
        object.key("recipeArn").string(var_101.as_str());
    }
    if let Some(var_102) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_102.as_str());
    }
    if let Some(var_103) = &input.event_type {
        object.key("eventType").string(var_103.as_str());
    }
    if let Some(var_104) = &input.solution_config {
        #[allow(unused_mut)]
        let mut object_105 = object.key("solutionConfig").start_object();
        crate::json_ser::serialize_structure_crate_model_solution_config(&mut object_105, var_104)?;
        object_105.finish();
    }
    if let Some(var_106) = &input.tags {
        let mut array_107 = object.key("tags").start_array();
        for item_108 in var_106 {
            {
                #[allow(unused_mut)]
                let mut object_109 = array_107.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_109, item_108)?;
                object_109.finish();
            }
        }
        array_107.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_create_solution_version_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::CreateSolutionVersionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_110) = &input.solution_arn {
        object.key("solutionArn").string(var_110.as_str());
    }
    if let Some(var_111) = &input.training_mode {
        object.key("trainingMode").string(var_111.as_str());
    }
    if let Some(var_112) = &input.tags {
        let mut array_113 = object.key("tags").start_array();
        for item_114 in var_112 {
            {
                #[allow(unused_mut)]
                let mut object_115 = array_113.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_115, item_114)?;
                object_115.finish();
            }
        }
        array_113.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_campaign_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteCampaignInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_116) = &input.campaign_arn {
        object.key("campaignArn").string(var_116.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_dataset_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDatasetInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_117) = &input.dataset_arn {
        object.key("datasetArn").string(var_117.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_dataset_group_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteDatasetGroupInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_118) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_118.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_event_tracker_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteEventTrackerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_119) = &input.event_tracker_arn {
        object.key("eventTrackerArn").string(var_119.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_filter_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteFilterInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_120) = &input.filter_arn {
        object.key("filterArn").string(var_120.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_recommender_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteRecommenderInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_121) = &input.recommender_arn {
        object.key("recommenderArn").string(var_121.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_schema_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteSchemaInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_122) = &input.schema_arn {
        object.key("schemaArn").string(var_122.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_delete_solution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DeleteSolutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_123) = &input.solution_arn {
        object.key("solutionArn").string(var_123.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_algorithm_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAlgorithmInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_124) = &input.algorithm_arn {
        object.key("algorithmArn").string(var_124.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_batch_inference_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeBatchInferenceJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_125) = &input.batch_inference_job_arn {
        object.key("batchInferenceJobArn").string(var_125.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_batch_segment_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeBatchSegmentJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_126) = &input.batch_segment_job_arn {
        object.key("batchSegmentJobArn").string(var_126.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_campaign_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeCampaignInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_127) = &input.campaign_arn {
        object.key("campaignArn").string(var_127.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_dataset_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDatasetInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_128) = &input.dataset_arn {
        object.key("datasetArn").string(var_128.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_dataset_export_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDatasetExportJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_129) = &input.dataset_export_job_arn {
        object.key("datasetExportJobArn").string(var_129.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_dataset_group_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDatasetGroupInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_130) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_130.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_dataset_import_job_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeDatasetImportJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_131) = &input.dataset_import_job_arn {
        object.key("datasetImportJobArn").string(var_131.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_event_tracker_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeEventTrackerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_132) = &input.event_tracker_arn {
        object.key("eventTrackerArn").string(var_132.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_feature_transformation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeFeatureTransformationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_133) = &input.feature_transformation_arn {
        object
            .key("featureTransformationArn")
            .string(var_133.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_filter_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeFilterInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_134) = &input.filter_arn {
        object.key("filterArn").string(var_134.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_recipe_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeRecipeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_135) = &input.recipe_arn {
        object.key("recipeArn").string(var_135.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_recommender_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeRecommenderInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_136) = &input.recommender_arn {
        object.key("recommenderArn").string(var_136.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_schema_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeSchemaInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_137) = &input.schema_arn {
        object.key("schemaArn").string(var_137.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_solution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeSolutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_138) = &input.solution_arn {
        object.key("solutionArn").string(var_138.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_solution_version_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeSolutionVersionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_139) = &input.solution_version_arn {
        object.key("solutionVersionArn").string(var_139.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_get_solution_metrics_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::GetSolutionMetricsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_140) = &input.solution_version_arn {
        object.key("solutionVersionArn").string(var_140.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_batch_inference_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListBatchInferenceJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_141) = &input.solution_version_arn {
        object.key("solutionVersionArn").string(var_141.as_str());
    }
    if let Some(var_142) = &input.next_token {
        object.key("nextToken").string(var_142.as_str());
    }
    if let Some(var_143) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_143).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_batch_segment_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListBatchSegmentJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_144) = &input.solution_version_arn {
        object.key("solutionVersionArn").string(var_144.as_str());
    }
    if let Some(var_145) = &input.next_token {
        object.key("nextToken").string(var_145.as_str());
    }
    if let Some(var_146) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_146).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_campaigns_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListCampaignsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_147) = &input.solution_arn {
        object.key("solutionArn").string(var_147.as_str());
    }
    if let Some(var_148) = &input.next_token {
        object.key("nextToken").string(var_148.as_str());
    }
    if let Some(var_149) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_149).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_dataset_export_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDatasetExportJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_150) = &input.dataset_arn {
        object.key("datasetArn").string(var_150.as_str());
    }
    if let Some(var_151) = &input.next_token {
        object.key("nextToken").string(var_151.as_str());
    }
    if let Some(var_152) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_152).into()),
        );
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_list_dataset_import_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDatasetImportJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_155) = &input.dataset_arn {
        object.key("datasetArn").string(var_155.as_str());
    }
    if let Some(var_156) = &input.next_token {
        object.key("nextToken").string(var_156.as_str());
    }
    if let Some(var_157) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_157).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_datasets_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListDatasetsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_158) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_158.as_str());
    }
    if let Some(var_159) = &input.next_token {
        object.key("nextToken").string(var_159.as_str());
    }
    if let Some(var_160) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_160).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_event_trackers_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListEventTrackersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_161) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_161.as_str());
    }
    if let Some(var_162) = &input.next_token {
        object.key("nextToken").string(var_162.as_str());
    }
    if let Some(var_163) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_163).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_filters_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListFiltersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_164) = &input.dataset_group_arn {
        object.key("datasetGroupArn").string(var_164.as_str());
    }
    if let Some(var_165) = &input.next_token {
        object.key("nextToken").string(var_165.as_str());
    }
    if let Some(var_166) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_166).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_recipes_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListRecipesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_167) = &input.recipe_provider {
        object.key("recipeProvider").string(var_167.as_str());
    }
    if let Some(var_168) = &input.next_token {
        object.key("nextToken").string(var_168.as_str());
    }
    if let Some(var_169) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_169).into()),
        );
    }
    if let Some(var_170) = &input.domain {
        object.key("domain").string(var_170.as_str());
    }
    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