#[non_exhaustive]
pub enum ActionCategory {
Approval,
Build,
Deploy,
Invoke,
Source,
Test,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against ActionCategory
, 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 actioncategory = unimplemented!();
match actioncategory {
ActionCategory::Approval => { /* ... */ },
ActionCategory::Build => { /* ... */ },
ActionCategory::Deploy => { /* ... */ },
ActionCategory::Invoke => { /* ... */ },
ActionCategory::Source => { /* ... */ },
ActionCategory::Test => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when actioncategory
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant ActionCategory::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
ActionCategory::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 ActionCategory::NewFeature
is defined.
Specifically, when actioncategory
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on ActionCategory::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
Approval
Build
Deploy
Invoke
Source
Test
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl ActionCategory
impl ActionCategory
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
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 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 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270
pub fn serialize_structure_crate_input_create_custom_action_type_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateCustomActionTypeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_6) = &input.category {
object.key("category").string(var_6.as_str());
}
if let Some(var_7) = &input.provider {
object.key("provider").string(var_7.as_str());
}
if let Some(var_8) = &input.version {
object.key("version").string(var_8.as_str());
}
if let Some(var_9) = &input.settings {
#[allow(unused_mut)]
let mut object_10 = object.key("settings").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_settings(
&mut object_10,
var_9,
)?;
object_10.finish();
}
if let Some(var_11) = &input.configuration_properties {
let mut array_12 = object.key("configurationProperties").start_array();
for item_13 in var_11 {
{
#[allow(unused_mut)]
let mut object_14 = array_12.value().start_object();
crate::json_ser::serialize_structure_crate_model_action_configuration_property(
&mut object_14,
item_13,
)?;
object_14.finish();
}
}
array_12.finish();
}
if let Some(var_15) = &input.input_artifact_details {
#[allow(unused_mut)]
let mut object_16 = object.key("inputArtifactDetails").start_object();
crate::json_ser::serialize_structure_crate_model_artifact_details(&mut object_16, var_15)?;
object_16.finish();
}
if let Some(var_17) = &input.output_artifact_details {
#[allow(unused_mut)]
let mut object_18 = object.key("outputArtifactDetails").start_object();
crate::json_ser::serialize_structure_crate_model_artifact_details(&mut object_18, var_17)?;
object_18.finish();
}
if let Some(var_19) = &input.tags {
let mut array_20 = object.key("tags").start_array();
for item_21 in var_19 {
{
#[allow(unused_mut)]
let mut object_22 = array_20.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_22, item_21)?;
object_22.finish();
}
}
array_20.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_pipeline_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreatePipelineInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_23) = &input.pipeline {
#[allow(unused_mut)]
let mut object_24 = object.key("pipeline").start_object();
crate::json_ser::serialize_structure_crate_model_pipeline_declaration(
&mut object_24,
var_23,
)?;
object_24.finish();
}
if let Some(var_25) = &input.tags {
let mut array_26 = object.key("tags").start_array();
for item_27 in var_25 {
{
#[allow(unused_mut)]
let mut object_28 = array_26.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_28, item_27)?;
object_28.finish();
}
}
array_26.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_custom_action_type_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteCustomActionTypeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_29) = &input.category {
object.key("category").string(var_29.as_str());
}
if let Some(var_30) = &input.provider {
object.key("provider").string(var_30.as_str());
}
if let Some(var_31) = &input.version {
object.key("version").string(var_31.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_pipeline_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeletePipelineInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_32) = &input.name {
object.key("name").string(var_32.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_webhook_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteWebhookInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_33) = &input.name {
object.key("name").string(var_33.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_deregister_webhook_with_third_party_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeregisterWebhookWithThirdPartyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_34) = &input.webhook_name {
object.key("webhookName").string(var_34.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_disable_stage_transition_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DisableStageTransitionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_35) = &input.pipeline_name {
object.key("pipelineName").string(var_35.as_str());
}
if let Some(var_36) = &input.stage_name {
object.key("stageName").string(var_36.as_str());
}
if let Some(var_37) = &input.transition_type {
object.key("transitionType").string(var_37.as_str());
}
if let Some(var_38) = &input.reason {
object.key("reason").string(var_38.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_enable_stage_transition_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::EnableStageTransitionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_39) = &input.pipeline_name {
object.key("pipelineName").string(var_39.as_str());
}
if let Some(var_40) = &input.stage_name {
object.key("stageName").string(var_40.as_str());
}
if let Some(var_41) = &input.transition_type {
object.key("transitionType").string(var_41.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_action_type_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetActionTypeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_42) = &input.category {
object.key("category").string(var_42.as_str());
}
if let Some(var_43) = &input.owner {
object.key("owner").string(var_43.as_str());
}
if let Some(var_44) = &input.provider {
object.key("provider").string(var_44.as_str());
}
if let Some(var_45) = &input.version {
object.key("version").string(var_45.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_job_details_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetJobDetailsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_46) = &input.job_id {
object.key("jobId").string(var_46.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_pipeline_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetPipelineInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_47) = &input.name {
object.key("name").string(var_47.as_str());
}
if let Some(var_48) = &input.version {
object.key("version").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_48).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_get_pipeline_execution_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetPipelineExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_49) = &input.pipeline_name {
object.key("pipelineName").string(var_49.as_str());
}
if let Some(var_50) = &input.pipeline_execution_id {
object.key("pipelineExecutionId").string(var_50.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_pipeline_state_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetPipelineStateInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_51) = &input.name {
object.key("name").string(var_51.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_third_party_job_details_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetThirdPartyJobDetailsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_52) = &input.job_id {
object.key("jobId").string(var_52.as_str());
}
if let Some(var_53) = &input.client_token {
object.key("clientToken").string(var_53.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_action_executions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListActionExecutionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_54) = &input.pipeline_name {
object.key("pipelineName").string(var_54.as_str());
}
if let Some(var_55) = &input.filter {
#[allow(unused_mut)]
let mut object_56 = object.key("filter").start_object();
crate::json_ser::serialize_structure_crate_model_action_execution_filter(
&mut object_56,
var_55,
)?;
object_56.finish();
}
if let Some(var_57) = &input.max_results {
object.key("maxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_57).into()),
);
}
if let Some(var_58) = &input.next_token {
object.key("nextToken").string(var_58.as_str());
}
Ok(())
}
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(())
}
pub fn serialize_structure_crate_model_action_revision(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ActionRevision,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_174) = &input.revision_id {
object.key("revisionId").string(var_174.as_str());
}
if let Some(var_175) = &input.revision_change_id {
object.key("revisionChangeId").string(var_175.as_str());
}
if let Some(var_176) = &input.created {
object
.key("created")
.date_time(var_176, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
Ok(())
}
pub fn serialize_structure_crate_model_approval_result(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ApprovalResult,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_177) = &input.summary {
object.key("summary").string(var_177.as_str());
}
if let Some(var_178) = &input.status {
object.key("status").string(var_178.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_failure_details(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::FailureDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_179) = &input.r#type {
object.key("type").string(var_179.as_str());
}
if let Some(var_180) = &input.message {
object.key("message").string(var_180.as_str());
}
if let Some(var_181) = &input.external_execution_id {
object.key("externalExecutionId").string(var_181.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_current_revision(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::CurrentRevision,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_182) = &input.revision {
object.key("revision").string(var_182.as_str());
}
if let Some(var_183) = &input.change_identifier {
object.key("changeIdentifier").string(var_183.as_str());
}
if let Some(var_184) = &input.created {
object
.key("created")
.date_time(var_184, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_185) = &input.revision_summary {
object.key("revisionSummary").string(var_185.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_execution_details(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ExecutionDetails,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_186) = &input.summary {
object.key("summary").string(var_186.as_str());
}
if let Some(var_187) = &input.external_execution_id {
object.key("externalExecutionId").string(var_187.as_str());
}
if let Some(var_188) = &input.percent_complete {
object.key("percentComplete").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_188).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_model_webhook_definition(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::WebhookDefinition,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_189) = &input.name {
object.key("name").string(var_189.as_str());
}
if let Some(var_190) = &input.target_pipeline {
object.key("targetPipeline").string(var_190.as_str());
}
if let Some(var_191) = &input.target_action {
object.key("targetAction").string(var_191.as_str());
}
if let Some(var_192) = &input.filters {
let mut array_193 = object.key("filters").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_webhook_filter_rule(
&mut object_195,
item_194,
)?;
object_195.finish();
}
}
array_193.finish();
}
if let Some(var_196) = &input.authentication {
object.key("authentication").string(var_196.as_str());
}
if let Some(var_197) = &input.authentication_configuration {
#[allow(unused_mut)]
let mut object_198 = object.key("authenticationConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_webhook_auth_configuration(
&mut object_198,
var_197,
)?;
object_198.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_action_type_declaration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ActionTypeDeclaration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_199) = &input.description {
object.key("description").string(var_199.as_str());
}
if let Some(var_200) = &input.executor {
#[allow(unused_mut)]
let mut object_201 = object.key("executor").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_executor(
&mut object_201,
var_200,
)?;
object_201.finish();
}
if let Some(var_202) = &input.id {
#[allow(unused_mut)]
let mut object_203 = object.key("id").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_identifier(
&mut object_203,
var_202,
)?;
object_203.finish();
}
if let Some(var_204) = &input.input_artifact_details {
#[allow(unused_mut)]
let mut object_205 = object.key("inputArtifactDetails").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_artifact_details(
&mut object_205,
var_204,
)?;
object_205.finish();
}
if let Some(var_206) = &input.output_artifact_details {
#[allow(unused_mut)]
let mut object_207 = object.key("outputArtifactDetails").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_artifact_details(
&mut object_207,
var_206,
)?;
object_207.finish();
}
if let Some(var_208) = &input.permissions {
#[allow(unused_mut)]
let mut object_209 = object.key("permissions").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_permissions(
&mut object_209,
var_208,
)?;
object_209.finish();
}
if let Some(var_210) = &input.properties {
let mut array_211 = object.key("properties").start_array();
for item_212 in var_210 {
{
#[allow(unused_mut)]
let mut object_213 = array_211.value().start_object();
crate::json_ser::serialize_structure_crate_model_action_type_property(
&mut object_213,
item_212,
)?;
object_213.finish();
}
}
array_211.finish();
}
if let Some(var_214) = &input.urls {
#[allow(unused_mut)]
let mut object_215 = object.key("urls").start_object();
crate::json_ser::serialize_structure_crate_model_action_type_urls(
&mut object_215,
var_214,
)?;
object_215.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_artifact_store(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ArtifactStore,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_216) = &input.r#type {
object.key("type").string(var_216.as_str());
}
if let Some(var_217) = &input.location {
object.key("location").string(var_217.as_str());
}
if let Some(var_218) = &input.encryption_key {
#[allow(unused_mut)]
let mut object_219 = object.key("encryptionKey").start_object();
crate::json_ser::serialize_structure_crate_model_encryption_key(&mut object_219, var_218)?;
object_219.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_stage_declaration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::StageDeclaration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_220) = &input.name {
object.key("name").string(var_220.as_str());
}
if let Some(var_221) = &input.blockers {
let mut array_222 = object.key("blockers").start_array();
for item_223 in var_221 {
{
#[allow(unused_mut)]
let mut object_224 = array_222.value().start_object();
crate::json_ser::serialize_structure_crate_model_blocker_declaration(
&mut object_224,
item_223,
)?;
object_224.finish();
}
}
array_222.finish();
}
if let Some(var_225) = &input.actions {
let mut array_226 = object.key("actions").start_array();
for item_227 in var_225 {
{
#[allow(unused_mut)]
let mut object_228 = array_226.value().start_object();
crate::json_ser::serialize_structure_crate_model_action_declaration(
&mut object_228,
item_227,
)?;
object_228.finish();
}
}
array_226.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_webhook_filter_rule(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::WebhookFilterRule,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_229) = &input.json_path {
object.key("jsonPath").string(var_229.as_str());
}
if let Some(var_230) = &input.match_equals {
object.key("matchEquals").string(var_230.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_webhook_auth_configuration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::WebhookAuthConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_231) = &input.allowed_ip_range {
object.key("AllowedIPRange").string(var_231.as_str());
}
if let Some(var_232) = &input.secret_token {
object.key("SecretToken").string(var_232.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_action_type_executor(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ActionTypeExecutor,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_233) = &input.configuration {
#[allow(unused_mut)]
let mut object_234 = object.key("configuration").start_object();
crate::json_ser::serialize_structure_crate_model_executor_configuration(
&mut object_234,
var_233,
)?;
object_234.finish();
}
if let Some(var_235) = &input.r#type {
object.key("type").string(var_235.as_str());
}
if let Some(var_236) = &input.policy_statements_template {
object
.key("policyStatementsTemplate")
.string(var_236.as_str());
}
if let Some(var_237) = &input.job_timeout {
object.key("jobTimeout").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_237).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_model_action_type_identifier(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ActionTypeIdentifier,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_238) = &input.category {
object.key("category").string(var_238.as_str());
}
if let Some(var_239) = &input.owner {
object.key("owner").string(var_239.as_str());
}
if let Some(var_240) = &input.provider {
object.key("provider").string(var_240.as_str());
}
if let Some(var_241) = &input.version {
object.key("version").string(var_241.as_str());
}
Ok(())
}
Trait Implementations§
source§impl AsRef<str> for ActionCategory
impl AsRef<str> for ActionCategory
source§impl Clone for ActionCategory
impl Clone for ActionCategory
source§fn clone(&self) -> ActionCategory
fn clone(&self) -> ActionCategory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ActionCategory
impl Debug for ActionCategory
source§impl From<&str> for ActionCategory
impl From<&str> for ActionCategory
source§impl FromStr for ActionCategory
impl FromStr for ActionCategory
source§impl Hash for ActionCategory
impl Hash for ActionCategory
source§impl Ord for ActionCategory
impl Ord for ActionCategory
source§fn cmp(&self, other: &ActionCategory) -> Ordering
fn cmp(&self, other: &ActionCategory) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<ActionCategory> for ActionCategory
impl PartialEq<ActionCategory> for ActionCategory
source§fn eq(&self, other: &ActionCategory) -> bool
fn eq(&self, other: &ActionCategory) -> bool
source§impl PartialOrd<ActionCategory> for ActionCategory
impl PartialOrd<ActionCategory> for ActionCategory
source§fn partial_cmp(&self, other: &ActionCategory) -> Option<Ordering>
fn partial_cmp(&self, other: &ActionCategory) -> 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 ActionCategory
impl StructuralEq for ActionCategory
impl StructuralPartialEq for ActionCategory
Auto Trait Implementations§
impl RefUnwindSafe for ActionCategory
impl Send for ActionCategory
impl Sync for ActionCategory
impl Unpin for ActionCategory
impl UnwindSafe for ActionCategory
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.