#[non_exhaustive]
pub enum ActionOwner {
    Aws,
    Custom,
    ThirdParty,
    Unknown(UnknownVariantValue),
}
Expand description

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

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

Aws

§

Custom

§

ThirdParty

§

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 891)
890
891
892
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/json_ser.rs (line 318)
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
pub fn serialize_structure_crate_input_list_action_types_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListActionTypesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_59) = &input.action_owner_filter {
        object.key("actionOwnerFilter").string(var_59.as_str());
    }
    if let Some(var_60) = &input.next_token {
        object.key("nextToken").string(var_60.as_str());
    }
    if let Some(var_61) = &input.region_filter {
        object.key("regionFilter").string(var_61.as_str());
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_list_pipelines_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListPipelinesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_65) = &input.next_token {
        object.key("nextToken").string(var_65.as_str());
    }
    if let Some(var_66) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_66).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::error::SerializationError> {
    if let Some(var_67) = &input.resource_arn {
        object.key("resourceArn").string(var_67.as_str());
    }
    if let Some(var_68) = &input.next_token {
        object.key("nextToken").string(var_68.as_str());
    }
    if let Some(var_69) = &input.max_results {
        object.key("maxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_69).into()),
        );
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_poll_for_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PollForJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_72) = &input.action_type_id {
        #[allow(unused_mut)]
        let mut object_73 = object.key("actionTypeId").start_object();
        crate::json_ser::serialize_structure_crate_model_action_type_id(&mut object_73, var_72)?;
        object_73.finish();
    }
    if let Some(var_74) = &input.max_batch_size {
        object.key("maxBatchSize").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_74).into()),
        );
    }
    if let Some(var_75) = &input.query_param {
        #[allow(unused_mut)]
        let mut object_76 = object.key("queryParam").start_object();
        for (key_77, value_78) in var_75 {
            {
                object_76.key(key_77.as_str()).string(value_78.as_str());
            }
        }
        object_76.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_poll_for_third_party_jobs_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PollForThirdPartyJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_79) = &input.action_type_id {
        #[allow(unused_mut)]
        let mut object_80 = object.key("actionTypeId").start_object();
        crate::json_ser::serialize_structure_crate_model_action_type_id(&mut object_80, var_79)?;
        object_80.finish();
    }
    if let Some(var_81) = &input.max_batch_size {
        object.key("maxBatchSize").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_81).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_action_revision_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutActionRevisionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_82) = &input.pipeline_name {
        object.key("pipelineName").string(var_82.as_str());
    }
    if let Some(var_83) = &input.stage_name {
        object.key("stageName").string(var_83.as_str());
    }
    if let Some(var_84) = &input.action_name {
        object.key("actionName").string(var_84.as_str());
    }
    if let Some(var_85) = &input.action_revision {
        #[allow(unused_mut)]
        let mut object_86 = object.key("actionRevision").start_object();
        crate::json_ser::serialize_structure_crate_model_action_revision(&mut object_86, var_85)?;
        object_86.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_approval_result_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutApprovalResultInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_87) = &input.pipeline_name {
        object.key("pipelineName").string(var_87.as_str());
    }
    if let Some(var_88) = &input.stage_name {
        object.key("stageName").string(var_88.as_str());
    }
    if let Some(var_89) = &input.action_name {
        object.key("actionName").string(var_89.as_str());
    }
    if let Some(var_90) = &input.result {
        #[allow(unused_mut)]
        let mut object_91 = object.key("result").start_object();
        crate::json_ser::serialize_structure_crate_model_approval_result(&mut object_91, var_90)?;
        object_91.finish();
    }
    if let Some(var_92) = &input.token {
        object.key("token").string(var_92.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_job_failure_result_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutJobFailureResultInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_93) = &input.job_id {
        object.key("jobId").string(var_93.as_str());
    }
    if let Some(var_94) = &input.failure_details {
        #[allow(unused_mut)]
        let mut object_95 = object.key("failureDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_failure_details(&mut object_95, var_94)?;
        object_95.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_job_success_result_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutJobSuccessResultInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_96) = &input.job_id {
        object.key("jobId").string(var_96.as_str());
    }
    if let Some(var_97) = &input.current_revision {
        #[allow(unused_mut)]
        let mut object_98 = object.key("currentRevision").start_object();
        crate::json_ser::serialize_structure_crate_model_current_revision(&mut object_98, var_97)?;
        object_98.finish();
    }
    if let Some(var_99) = &input.continuation_token {
        object.key("continuationToken").string(var_99.as_str());
    }
    if let Some(var_100) = &input.execution_details {
        #[allow(unused_mut)]
        let mut object_101 = object.key("executionDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_execution_details(
            &mut object_101,
            var_100,
        )?;
        object_101.finish();
    }
    if let Some(var_102) = &input.output_variables {
        #[allow(unused_mut)]
        let mut object_103 = object.key("outputVariables").start_object();
        for (key_104, value_105) in var_102 {
            {
                object_103.key(key_104.as_str()).string(value_105.as_str());
            }
        }
        object_103.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_third_party_job_failure_result_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutThirdPartyJobFailureResultInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_106) = &input.job_id {
        object.key("jobId").string(var_106.as_str());
    }
    if let Some(var_107) = &input.client_token {
        object.key("clientToken").string(var_107.as_str());
    }
    if let Some(var_108) = &input.failure_details {
        #[allow(unused_mut)]
        let mut object_109 = object.key("failureDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_failure_details(&mut object_109, var_108)?;
        object_109.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_third_party_job_success_result_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutThirdPartyJobSuccessResultInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_110) = &input.job_id {
        object.key("jobId").string(var_110.as_str());
    }
    if let Some(var_111) = &input.client_token {
        object.key("clientToken").string(var_111.as_str());
    }
    if let Some(var_112) = &input.current_revision {
        #[allow(unused_mut)]
        let mut object_113 = object.key("currentRevision").start_object();
        crate::json_ser::serialize_structure_crate_model_current_revision(
            &mut object_113,
            var_112,
        )?;
        object_113.finish();
    }
    if let Some(var_114) = &input.continuation_token {
        object.key("continuationToken").string(var_114.as_str());
    }
    if let Some(var_115) = &input.execution_details {
        #[allow(unused_mut)]
        let mut object_116 = object.key("executionDetails").start_object();
        crate::json_ser::serialize_structure_crate_model_execution_details(
            &mut object_116,
            var_115,
        )?;
        object_116.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_webhook_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutWebhookInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_117) = &input.webhook {
        #[allow(unused_mut)]
        let mut object_118 = object.key("webhook").start_object();
        crate::json_ser::serialize_structure_crate_model_webhook_definition(
            &mut object_118,
            var_117,
        )?;
        object_118.finish();
    }
    if let Some(var_119) = &input.tags {
        let mut array_120 = object.key("tags").start_array();
        for item_121 in var_119 {
            {
                #[allow(unused_mut)]
                let mut object_122 = array_120.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_122, item_121)?;
                object_122.finish();
            }
        }
        array_120.finish();
    }
    Ok(())
}

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

pub fn serialize_structure_crate_input_retry_stage_execution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::RetryStageExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_124) = &input.pipeline_name {
        object.key("pipelineName").string(var_124.as_str());
    }
    if let Some(var_125) = &input.stage_name {
        object.key("stageName").string(var_125.as_str());
    }
    if let Some(var_126) = &input.pipeline_execution_id {
        object.key("pipelineExecutionId").string(var_126.as_str());
    }
    if let Some(var_127) = &input.retry_mode {
        object.key("retryMode").string(var_127.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_pipeline_execution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartPipelineExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_128) = &input.name {
        object.key("name").string(var_128.as_str());
    }
    if let Some(var_129) = &input.client_request_token {
        object.key("clientRequestToken").string(var_129.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_stop_pipeline_execution_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StopPipelineExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_130) = &input.pipeline_name {
        object.key("pipelineName").string(var_130.as_str());
    }
    if let Some(var_131) = &input.pipeline_execution_id {
        object.key("pipelineExecutionId").string(var_131.as_str());
    }
    if input.abandon {
        object.key("abandon").boolean(input.abandon);
    }
    if let Some(var_132) = &input.reason {
        object.key("reason").string(var_132.as_str());
    }
    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_133) = &input.resource_arn {
        object.key("resourceArn").string(var_133.as_str());
    }
    if let Some(var_134) = &input.tags {
        let mut array_135 = object.key("tags").start_array();
        for item_136 in var_134 {
            {
                #[allow(unused_mut)]
                let mut object_137 = array_135.value().start_object();
                crate::json_ser::serialize_structure_crate_model_tag(&mut object_137, item_136)?;
                object_137.finish();
            }
        }
        array_135.finish();
    }
    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::error::SerializationError> {
    if let Some(var_138) = &input.resource_arn {
        object.key("resourceArn").string(var_138.as_str());
    }
    if let Some(var_139) = &input.tag_keys {
        let mut array_140 = object.key("tagKeys").start_array();
        for item_141 in var_139 {
            {
                array_140.value().string(item_141.as_str());
            }
        }
        array_140.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_action_type_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateActionTypeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_142) = &input.action_type {
        #[allow(unused_mut)]
        let mut object_143 = object.key("actionType").start_object();
        crate::json_ser::serialize_structure_crate_model_action_type_declaration(
            &mut object_143,
            var_142,
        )?;
        object_143.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_pipeline_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdatePipelineInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_144) = &input.pipeline {
        #[allow(unused_mut)]
        let mut object_145 = object.key("pipeline").start_object();
        crate::json_ser::serialize_structure_crate_model_pipeline_declaration(
            &mut object_145,
            var_144,
        )?;
        object_145.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_action_type_settings(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ActionTypeSettings,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_146) = &input.third_party_configuration_url {
        object
            .key("thirdPartyConfigurationUrl")
            .string(var_146.as_str());
    }
    if let Some(var_147) = &input.entity_url_template {
        object.key("entityUrlTemplate").string(var_147.as_str());
    }
    if let Some(var_148) = &input.execution_url_template {
        object.key("executionUrlTemplate").string(var_148.as_str());
    }
    if let Some(var_149) = &input.revision_url_template {
        object.key("revisionUrlTemplate").string(var_149.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_action_configuration_property(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ActionConfigurationProperty,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_150) = &input.name {
        object.key("name").string(var_150.as_str());
    }
    {
        object.key("required").boolean(input.required);
    }
    {
        object.key("key").boolean(input.key);
    }
    {
        object.key("secret").boolean(input.secret);
    }
    if input.queryable {
        object.key("queryable").boolean(input.queryable);
    }
    if let Some(var_151) = &input.description {
        object.key("description").string(var_151.as_str());
    }
    if let Some(var_152) = &input.r#type {
        object.key("type").string(var_152.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_artifact_details(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ArtifactDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    {
        object.key("minimumCount").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.minimum_count).into()),
        );
    }
    {
        object.key("maximumCount").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((input.maximum_count).into()),
        );
    }
    Ok(())
}

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

pub fn serialize_structure_crate_model_pipeline_declaration(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::PipelineDeclaration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_155) = &input.name {
        object.key("name").string(var_155.as_str());
    }
    if let Some(var_156) = &input.role_arn {
        object.key("roleArn").string(var_156.as_str());
    }
    if let Some(var_157) = &input.artifact_store {
        #[allow(unused_mut)]
        let mut object_158 = object.key("artifactStore").start_object();
        crate::json_ser::serialize_structure_crate_model_artifact_store(&mut object_158, var_157)?;
        object_158.finish();
    }
    if let Some(var_159) = &input.artifact_stores {
        #[allow(unused_mut)]
        let mut object_160 = object.key("artifactStores").start_object();
        for (key_161, value_162) in var_159 {
            {
                #[allow(unused_mut)]
                let mut object_163 = object_160.key(key_161.as_str()).start_object();
                crate::json_ser::serialize_structure_crate_model_artifact_store(
                    &mut object_163,
                    value_162,
                )?;
                object_163.finish();
            }
        }
        object_160.finish();
    }
    if let Some(var_164) = &input.stages {
        let mut array_165 = object.key("stages").start_array();
        for item_166 in var_164 {
            {
                #[allow(unused_mut)]
                let mut object_167 = array_165.value().start_object();
                crate::json_ser::serialize_structure_crate_model_stage_declaration(
                    &mut object_167,
                    item_166,
                )?;
                object_167.finish();
            }
        }
        array_165.finish();
    }
    if let Some(var_168) = &input.version {
        object.key("version").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_168).into()),
        );
    }
    Ok(())
}

pub fn serialize_structure_crate_model_action_execution_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ActionExecutionFilter,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_169) = &input.pipeline_execution_id {
        object.key("pipelineExecutionId").string(var_169.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_action_type_id(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ActionTypeId,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    if let Some(var_170) = &input.category {
        object.key("category").string(var_170.as_str());
    }
    if let Some(var_171) = &input.owner {
        object.key("owner").string(var_171.as_str());
    }
    if let Some(var_172) = &input.provider {
        object.key("provider").string(var_172.as_str());
    }
    if let Some(var_173) = &input.version {
        object.key("version").string(var_173.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