Enum aws_sdk_kms::model::MacAlgorithmSpec
source · #[non_exhaustive]
pub enum MacAlgorithmSpec {
HmacSha224,
HmacSha256,
HmacSha384,
HmacSha512,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against MacAlgorithmSpec
, 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 macalgorithmspec = unimplemented!();
match macalgorithmspec {
MacAlgorithmSpec::HmacSha224 => { /* ... */ },
MacAlgorithmSpec::HmacSha256 => { /* ... */ },
MacAlgorithmSpec::HmacSha384 => { /* ... */ },
MacAlgorithmSpec::HmacSha512 => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when macalgorithmspec
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant MacAlgorithmSpec::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
MacAlgorithmSpec::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 MacAlgorithmSpec::NewFeature
is defined.
Specifically, when macalgorithmspec
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on MacAlgorithmSpec::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
HmacSha224
HmacSha256
HmacSha384
HmacSha512
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl MacAlgorithmSpec
impl MacAlgorithmSpec
sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the &str
value of the enum member.
Examples found in repository?
More examples
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 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079
pub fn serialize_structure_crate_input_generate_mac_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GenerateMacInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_107) = &input.message {
object
.key("Message")
.string_unchecked(&aws_smithy_types::base64::encode(var_107));
}
if let Some(var_108) = &input.key_id {
object.key("KeyId").string(var_108.as_str());
}
if let Some(var_109) = &input.mac_algorithm {
object.key("MacAlgorithm").string(var_109.as_str());
}
if let Some(var_110) = &input.grant_tokens {
let mut array_111 = object.key("GrantTokens").start_array();
for item_112 in var_110 {
{
array_111.value().string(item_112.as_str());
}
}
array_111.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_generate_random_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GenerateRandomInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_113) = &input.number_of_bytes {
object.key("NumberOfBytes").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_113).into()),
);
}
if let Some(var_114) = &input.custom_key_store_id {
object.key("CustomKeyStoreId").string(var_114.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_key_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetKeyPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_115) = &input.key_id {
object.key("KeyId").string(var_115.as_str());
}
if let Some(var_116) = &input.policy_name {
object.key("PolicyName").string(var_116.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_key_rotation_status_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetKeyRotationStatusInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_117) = &input.key_id {
object.key("KeyId").string(var_117.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_parameters_for_import_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetParametersForImportInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_118) = &input.key_id {
object.key("KeyId").string(var_118.as_str());
}
if let Some(var_119) = &input.wrapping_algorithm {
object.key("WrappingAlgorithm").string(var_119.as_str());
}
if let Some(var_120) = &input.wrapping_key_spec {
object.key("WrappingKeySpec").string(var_120.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_public_key_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetPublicKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_121) = &input.key_id {
object.key("KeyId").string(var_121.as_str());
}
if let Some(var_122) = &input.grant_tokens {
let mut array_123 = object.key("GrantTokens").start_array();
for item_124 in var_122 {
{
array_123.value().string(item_124.as_str());
}
}
array_123.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_import_key_material_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ImportKeyMaterialInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_125) = &input.key_id {
object.key("KeyId").string(var_125.as_str());
}
if let Some(var_126) = &input.import_token {
object
.key("ImportToken")
.string_unchecked(&aws_smithy_types::base64::encode(var_126));
}
if let Some(var_127) = &input.encrypted_key_material {
object
.key("EncryptedKeyMaterial")
.string_unchecked(&aws_smithy_types::base64::encode(var_127));
}
if let Some(var_128) = &input.valid_to {
object
.key("ValidTo")
.date_time(var_128, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_129) = &input.expiration_model {
object.key("ExpirationModel").string(var_129.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_aliases_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListAliasesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_130) = &input.key_id {
object.key("KeyId").string(var_130.as_str());
}
if let Some(var_131) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_131).into()),
);
}
if let Some(var_132) = &input.marker {
object.key("Marker").string(var_132.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_grants_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListGrantsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_133) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_133).into()),
);
}
if let Some(var_134) = &input.marker {
object.key("Marker").string(var_134.as_str());
}
if let Some(var_135) = &input.key_id {
object.key("KeyId").string(var_135.as_str());
}
if let Some(var_136) = &input.grant_id {
object.key("GrantId").string(var_136.as_str());
}
if let Some(var_137) = &input.grantee_principal {
object.key("GranteePrincipal").string(var_137.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_key_policies_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListKeyPoliciesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_138) = &input.key_id {
object.key("KeyId").string(var_138.as_str());
}
if let Some(var_139) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_139).into()),
);
}
if let Some(var_140) = &input.marker {
object.key("Marker").string(var_140.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_keys_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListKeysInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_141) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_141).into()),
);
}
if let Some(var_142) = &input.marker {
object.key("Marker").string(var_142.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_resource_tags_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListResourceTagsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_143) = &input.key_id {
object.key("KeyId").string(var_143.as_str());
}
if let Some(var_144) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_144).into()),
);
}
if let Some(var_145) = &input.marker {
object.key("Marker").string(var_145.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_retirable_grants_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListRetirableGrantsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_146) = &input.limit {
object.key("Limit").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_146).into()),
);
}
if let Some(var_147) = &input.marker {
object.key("Marker").string(var_147.as_str());
}
if let Some(var_148) = &input.retiring_principal {
object.key("RetiringPrincipal").string(var_148.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_put_key_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutKeyPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_149) = &input.key_id {
object.key("KeyId").string(var_149.as_str());
}
if let Some(var_150) = &input.policy_name {
object.key("PolicyName").string(var_150.as_str());
}
if let Some(var_151) = &input.policy {
object.key("Policy").string(var_151.as_str());
}
if input.bypass_policy_lockout_safety_check {
object
.key("BypassPolicyLockoutSafetyCheck")
.boolean(input.bypass_policy_lockout_safety_check);
}
Ok(())
}
pub fn serialize_structure_crate_input_re_encrypt_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ReEncryptInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_152) = &input.ciphertext_blob {
object
.key("CiphertextBlob")
.string_unchecked(&aws_smithy_types::base64::encode(var_152));
}
if let Some(var_153) = &input.source_encryption_context {
#[allow(unused_mut)]
let mut object_154 = object.key("SourceEncryptionContext").start_object();
for (key_155, value_156) in var_153 {
{
object_154.key(key_155.as_str()).string(value_156.as_str());
}
}
object_154.finish();
}
if let Some(var_157) = &input.source_key_id {
object.key("SourceKeyId").string(var_157.as_str());
}
if let Some(var_158) = &input.destination_key_id {
object.key("DestinationKeyId").string(var_158.as_str());
}
if let Some(var_159) = &input.destination_encryption_context {
#[allow(unused_mut)]
let mut object_160 = object.key("DestinationEncryptionContext").start_object();
for (key_161, value_162) in var_159 {
{
object_160.key(key_161.as_str()).string(value_162.as_str());
}
}
object_160.finish();
}
if let Some(var_163) = &input.source_encryption_algorithm {
object
.key("SourceEncryptionAlgorithm")
.string(var_163.as_str());
}
if let Some(var_164) = &input.destination_encryption_algorithm {
object
.key("DestinationEncryptionAlgorithm")
.string(var_164.as_str());
}
if let Some(var_165) = &input.grant_tokens {
let mut array_166 = object.key("GrantTokens").start_array();
for item_167 in var_165 {
{
array_166.value().string(item_167.as_str());
}
}
array_166.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_replicate_key_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ReplicateKeyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_168) = &input.key_id {
object.key("KeyId").string(var_168.as_str());
}
if let Some(var_169) = &input.replica_region {
object.key("ReplicaRegion").string(var_169.as_str());
}
if let Some(var_170) = &input.policy {
object.key("Policy").string(var_170.as_str());
}
if input.bypass_policy_lockout_safety_check {
object
.key("BypassPolicyLockoutSafetyCheck")
.boolean(input.bypass_policy_lockout_safety_check);
}
if let Some(var_171) = &input.description {
object.key("Description").string(var_171.as_str());
}
if let Some(var_172) = &input.tags {
let mut array_173 = object.key("Tags").start_array();
for item_174 in var_172 {
{
#[allow(unused_mut)]
let mut object_175 = array_173.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_175, item_174)?;
object_175.finish();
}
}
array_173.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_retire_grant_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RetireGrantInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_176) = &input.grant_token {
object.key("GrantToken").string(var_176.as_str());
}
if let Some(var_177) = &input.key_id {
object.key("KeyId").string(var_177.as_str());
}
if let Some(var_178) = &input.grant_id {
object.key("GrantId").string(var_178.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_revoke_grant_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RevokeGrantInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_179) = &input.key_id {
object.key("KeyId").string(var_179.as_str());
}
if let Some(var_180) = &input.grant_id {
object.key("GrantId").string(var_180.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_schedule_key_deletion_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ScheduleKeyDeletionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_181) = &input.key_id {
object.key("KeyId").string(var_181.as_str());
}
if let Some(var_182) = &input.pending_window_in_days {
object.key("PendingWindowInDays").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_182).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_sign_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::SignInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_183) = &input.key_id {
object.key("KeyId").string(var_183.as_str());
}
if let Some(var_184) = &input.message {
object
.key("Message")
.string_unchecked(&aws_smithy_types::base64::encode(var_184));
}
if let Some(var_185) = &input.message_type {
object.key("MessageType").string(var_185.as_str());
}
if let Some(var_186) = &input.grant_tokens {
let mut array_187 = object.key("GrantTokens").start_array();
for item_188 in var_186 {
{
array_187.value().string(item_188.as_str());
}
}
array_187.finish();
}
if let Some(var_189) = &input.signing_algorithm {
object.key("SigningAlgorithm").string(var_189.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_190) = &input.key_id {
object.key("KeyId").string(var_190.as_str());
}
if let Some(var_191) = &input.tags {
let mut array_192 = object.key("Tags").start_array();
for item_193 in var_191 {
{
#[allow(unused_mut)]
let mut object_194 = array_192.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_194, item_193)?;
object_194.finish();
}
}
array_192.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_195) = &input.key_id {
object.key("KeyId").string(var_195.as_str());
}
if let Some(var_196) = &input.tag_keys {
let mut array_197 = object.key("TagKeys").start_array();
for item_198 in var_196 {
{
array_197.value().string(item_198.as_str());
}
}
array_197.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_alias_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateAliasInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_199) = &input.alias_name {
object.key("AliasName").string(var_199.as_str());
}
if let Some(var_200) = &input.target_key_id {
object.key("TargetKeyId").string(var_200.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_custom_key_store_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateCustomKeyStoreInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_201) = &input.custom_key_store_id {
object.key("CustomKeyStoreId").string(var_201.as_str());
}
if let Some(var_202) = &input.new_custom_key_store_name {
object.key("NewCustomKeyStoreName").string(var_202.as_str());
}
if let Some(var_203) = &input.key_store_password {
object.key("KeyStorePassword").string(var_203.as_str());
}
if let Some(var_204) = &input.cloud_hsm_cluster_id {
object.key("CloudHsmClusterId").string(var_204.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_key_description_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateKeyDescriptionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_205) = &input.key_id {
object.key("KeyId").string(var_205.as_str());
}
if let Some(var_206) = &input.description {
object.key("Description").string(var_206.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_primary_region_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdatePrimaryRegionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_207) = &input.key_id {
object.key("KeyId").string(var_207.as_str());
}
if let Some(var_208) = &input.primary_region {
object.key("PrimaryRegion").string(var_208.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_verify_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::VerifyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_209) = &input.key_id {
object.key("KeyId").string(var_209.as_str());
}
if let Some(var_210) = &input.message {
object
.key("Message")
.string_unchecked(&aws_smithy_types::base64::encode(var_210));
}
if let Some(var_211) = &input.message_type {
object.key("MessageType").string(var_211.as_str());
}
if let Some(var_212) = &input.signature {
object
.key("Signature")
.string_unchecked(&aws_smithy_types::base64::encode(var_212));
}
if let Some(var_213) = &input.signing_algorithm {
object.key("SigningAlgorithm").string(var_213.as_str());
}
if let Some(var_214) = &input.grant_tokens {
let mut array_215 = object.key("GrantTokens").start_array();
for item_216 in var_214 {
{
array_215.value().string(item_216.as_str());
}
}
array_215.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_verify_mac_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::VerifyMacInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_217) = &input.message {
object
.key("Message")
.string_unchecked(&aws_smithy_types::base64::encode(var_217));
}
if let Some(var_218) = &input.key_id {
object.key("KeyId").string(var_218.as_str());
}
if let Some(var_219) = &input.mac_algorithm {
object.key("MacAlgorithm").string(var_219.as_str());
}
if let Some(var_220) = &input.mac {
object
.key("Mac")
.string_unchecked(&aws_smithy_types::base64::encode(var_220));
}
if let Some(var_221) = &input.grant_tokens {
let mut array_222 = object.key("GrantTokens").start_array();
for item_223 in var_221 {
{
array_222.value().string(item_223.as_str());
}
}
array_222.finish();
}
Ok(())
}
Trait Implementations§
source§impl AsRef<str> for MacAlgorithmSpec
impl AsRef<str> for MacAlgorithmSpec
source§impl Clone for MacAlgorithmSpec
impl Clone for MacAlgorithmSpec
source§fn clone(&self) -> MacAlgorithmSpec
fn clone(&self) -> MacAlgorithmSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MacAlgorithmSpec
impl Debug for MacAlgorithmSpec
source§impl From<&str> for MacAlgorithmSpec
impl From<&str> for MacAlgorithmSpec
source§impl FromStr for MacAlgorithmSpec
impl FromStr for MacAlgorithmSpec
source§impl Hash for MacAlgorithmSpec
impl Hash for MacAlgorithmSpec
source§impl Ord for MacAlgorithmSpec
impl Ord for MacAlgorithmSpec
source§fn cmp(&self, other: &MacAlgorithmSpec) -> Ordering
fn cmp(&self, other: &MacAlgorithmSpec) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<MacAlgorithmSpec> for MacAlgorithmSpec
impl PartialEq<MacAlgorithmSpec> for MacAlgorithmSpec
source§fn eq(&self, other: &MacAlgorithmSpec) -> bool
fn eq(&self, other: &MacAlgorithmSpec) -> bool
source§impl PartialOrd<MacAlgorithmSpec> for MacAlgorithmSpec
impl PartialOrd<MacAlgorithmSpec> for MacAlgorithmSpec
source§fn partial_cmp(&self, other: &MacAlgorithmSpec) -> Option<Ordering>
fn partial_cmp(&self, other: &MacAlgorithmSpec) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for MacAlgorithmSpec
impl StructuralEq for MacAlgorithmSpec
impl StructuralPartialEq for MacAlgorithmSpec
Auto Trait Implementations§
impl RefUnwindSafe for MacAlgorithmSpec
impl Send for MacAlgorithmSpec
impl Sync for MacAlgorithmSpec
impl Unpin for MacAlgorithmSpec
impl UnwindSafe for MacAlgorithmSpec
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.