Enum aws_sdk_emr::model::IdentityType
source · #[non_exhaustive]
pub enum IdentityType {
Group,
User,
Unknown(UnknownVariantValue),
}Expand description
When writing a match expression against IdentityType, 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 identitytype = unimplemented!();
match identitytype {
IdentityType::Group => { /* ... */ },
IdentityType::User => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when identitytype represents
NewFeature, the execution path will lead to the second last match arm,
even though the enum does not contain a variant IdentityType::NewFeature
in the current version of SDK. The reason is that the variable other,
created by the @ operator, is bound to
IdentityType::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 IdentityType::NewFeature is defined.
Specifically, when identitytype represents NewFeature,
the execution path will hit the second last match arm as before by virtue of
calling as_str on IdentityType::NewFeature also yielding "NewFeature".
Explicitly matching on the Unknown variant should
be avoided for two reasons:
- The inner data
UnknownVariantValueis 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
Group
User
Unknown(UnknownVariantValue)
Unknown contains new variants that have been added since this code was generated.
Implementations§
source§impl IdentityType
impl IdentityType
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
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
pub fn serialize_structure_crate_input_create_studio_session_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateStudioSessionMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_45) = &input.studio_id {
object.key("StudioId").string(var_45.as_str());
}
if let Some(var_46) = &input.identity_id {
object.key("IdentityId").string(var_46.as_str());
}
if let Some(var_47) = &input.identity_name {
object.key("IdentityName").string(var_47.as_str());
}
if let Some(var_48) = &input.identity_type {
object.key("IdentityType").string(var_48.as_str());
}
if let Some(var_49) = &input.session_policy_arn {
object.key("SessionPolicyArn").string(var_49.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_security_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteSecurityConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_50) = &input.name {
object.key("Name").string(var_50.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_studio_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteStudioInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_51) = &input.studio_id {
object.key("StudioId").string(var_51.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_studio_session_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteStudioSessionMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_52) = &input.studio_id {
object.key("StudioId").string(var_52.as_str());
}
if let Some(var_53) = &input.identity_id {
object.key("IdentityId").string(var_53.as_str());
}
if let Some(var_54) = &input.identity_name {
object.key("IdentityName").string(var_54.as_str());
}
if let Some(var_55) = &input.identity_type {
object.key("IdentityType").string(var_55.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_cluster_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeClusterInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_56) = &input.cluster_id {
object.key("ClusterId").string(var_56.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_job_flows_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeJobFlowsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_57) = &input.created_after {
object
.key("CreatedAfter")
.date_time(var_57, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_58) = &input.created_before {
object
.key("CreatedBefore")
.date_time(var_58, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_59) = &input.job_flow_ids {
let mut array_60 = object.key("JobFlowIds").start_array();
for item_61 in var_59 {
{
array_60.value().string(item_61.as_str());
}
}
array_60.finish();
}
if let Some(var_62) = &input.job_flow_states {
let mut array_63 = object.key("JobFlowStates").start_array();
for item_64 in var_62 {
{
array_63.value().string(item_64.as_str());
}
}
array_63.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_notebook_execution_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeNotebookExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_65) = &input.notebook_execution_id {
object.key("NotebookExecutionId").string(var_65.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_release_label_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeReleaseLabelInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_66) = &input.release_label {
object.key("ReleaseLabel").string(var_66.as_str());
}
if let Some(var_67) = &input.next_token {
object.key("NextToken").string(var_67.as_str());
}
if let Some(var_68) = &input.max_results {
object.key("MaxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_68).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_security_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeSecurityConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_69) = &input.name {
object.key("Name").string(var_69.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_step_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeStepInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_70) = &input.cluster_id {
object.key("ClusterId").string(var_70.as_str());
}
if let Some(var_71) = &input.step_id {
object.key("StepId").string(var_71.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_describe_studio_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DescribeStudioInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_72) = &input.studio_id {
object.key("StudioId").string(var_72.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_auto_termination_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetAutoTerminationPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_73) = &input.cluster_id {
object.key("ClusterId").string(var_73.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_managed_scaling_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetManagedScalingPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_74) = &input.cluster_id {
object.key("ClusterId").string(var_74.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_studio_session_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetStudioSessionMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_75) = &input.studio_id {
object.key("StudioId").string(var_75.as_str());
}
if let Some(var_76) = &input.identity_id {
object.key("IdentityId").string(var_76.as_str());
}
if let Some(var_77) = &input.identity_name {
object.key("IdentityName").string(var_77.as_str());
}
if let Some(var_78) = &input.identity_type {
object.key("IdentityType").string(var_78.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_bootstrap_actions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListBootstrapActionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_79) = &input.cluster_id {
object.key("ClusterId").string(var_79.as_str());
}
if let Some(var_80) = &input.marker {
object.key("Marker").string(var_80.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_clusters_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListClustersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_81) = &input.created_after {
object
.key("CreatedAfter")
.date_time(var_81, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_82) = &input.created_before {
object
.key("CreatedBefore")
.date_time(var_82, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_83) = &input.cluster_states {
let mut array_84 = object.key("ClusterStates").start_array();
for item_85 in var_83 {
{
array_84.value().string(item_85.as_str());
}
}
array_84.finish();
}
if let Some(var_86) = &input.marker {
object.key("Marker").string(var_86.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_instance_fleets_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListInstanceFleetsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_87) = &input.cluster_id {
object.key("ClusterId").string(var_87.as_str());
}
if let Some(var_88) = &input.marker {
object.key("Marker").string(var_88.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_instance_groups_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListInstanceGroupsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_89) = &input.cluster_id {
object.key("ClusterId").string(var_89.as_str());
}
if let Some(var_90) = &input.marker {
object.key("Marker").string(var_90.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_instances_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListInstancesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_91) = &input.cluster_id {
object.key("ClusterId").string(var_91.as_str());
}
if let Some(var_92) = &input.instance_group_id {
object.key("InstanceGroupId").string(var_92.as_str());
}
if let Some(var_93) = &input.instance_group_types {
let mut array_94 = object.key("InstanceGroupTypes").start_array();
for item_95 in var_93 {
{
array_94.value().string(item_95.as_str());
}
}
array_94.finish();
}
if let Some(var_96) = &input.instance_fleet_id {
object.key("InstanceFleetId").string(var_96.as_str());
}
if let Some(var_97) = &input.instance_fleet_type {
object.key("InstanceFleetType").string(var_97.as_str());
}
if let Some(var_98) = &input.instance_states {
let mut array_99 = object.key("InstanceStates").start_array();
for item_100 in var_98 {
{
array_99.value().string(item_100.as_str());
}
}
array_99.finish();
}
if let Some(var_101) = &input.marker {
object.key("Marker").string(var_101.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_notebook_executions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListNotebookExecutionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_102) = &input.editor_id {
object.key("EditorId").string(var_102.as_str());
}
if let Some(var_103) = &input.status {
object.key("Status").string(var_103.as_str());
}
if let Some(var_104) = &input.from {
object
.key("From")
.date_time(var_104, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_105) = &input.to {
object
.key("To")
.date_time(var_105, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_106) = &input.marker {
object.key("Marker").string(var_106.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_release_labels_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListReleaseLabelsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_107) = &input.filters {
#[allow(unused_mut)]
let mut object_108 = object.key("Filters").start_object();
crate::json_ser::serialize_structure_crate_model_release_label_filter(
&mut object_108,
var_107,
)?;
object_108.finish();
}
if let Some(var_109) = &input.next_token {
object.key("NextToken").string(var_109.as_str());
}
if let Some(var_110) = &input.max_results {
object.key("MaxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_110).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_list_security_configurations_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListSecurityConfigurationsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_111) = &input.marker {
object.key("Marker").string(var_111.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_steps_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListStepsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_112) = &input.cluster_id {
object.key("ClusterId").string(var_112.as_str());
}
if let Some(var_113) = &input.step_states {
let mut array_114 = object.key("StepStates").start_array();
for item_115 in var_113 {
{
array_114.value().string(item_115.as_str());
}
}
array_114.finish();
}
if let Some(var_116) = &input.step_ids {
let mut array_117 = object.key("StepIds").start_array();
for item_118 in var_116 {
{
array_117.value().string(item_118.as_str());
}
}
array_117.finish();
}
if let Some(var_119) = &input.marker {
object.key("Marker").string(var_119.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_studios_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListStudiosInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_120) = &input.marker {
object.key("Marker").string(var_120.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_studio_session_mappings_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListStudioSessionMappingsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_121) = &input.studio_id {
object.key("StudioId").string(var_121.as_str());
}
if let Some(var_122) = &input.identity_type {
object.key("IdentityType").string(var_122.as_str());
}
if let Some(var_123) = &input.marker {
object.key("Marker").string(var_123.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_modify_cluster_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ModifyClusterInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_124) = &input.cluster_id {
object.key("ClusterId").string(var_124.as_str());
}
if let Some(var_125) = &input.step_concurrency_level {
object.key("StepConcurrencyLevel").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_125).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_modify_instance_fleet_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ModifyInstanceFleetInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_126) = &input.cluster_id {
object.key("ClusterId").string(var_126.as_str());
}
if let Some(var_127) = &input.instance_fleet {
#[allow(unused_mut)]
let mut object_128 = object.key("InstanceFleet").start_object();
crate::json_ser::serialize_structure_crate_model_instance_fleet_modify_config(
&mut object_128,
var_127,
)?;
object_128.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_modify_instance_groups_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ModifyInstanceGroupsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_129) = &input.cluster_id {
object.key("ClusterId").string(var_129.as_str());
}
if let Some(var_130) = &input.instance_groups {
let mut array_131 = object.key("InstanceGroups").start_array();
for item_132 in var_130 {
{
#[allow(unused_mut)]
let mut object_133 = array_131.value().start_object();
crate::json_ser::serialize_structure_crate_model_instance_group_modify_config(
&mut object_133,
item_132,
)?;
object_133.finish();
}
}
array_131.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_put_auto_scaling_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutAutoScalingPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_134) = &input.cluster_id {
object.key("ClusterId").string(var_134.as_str());
}
if let Some(var_135) = &input.instance_group_id {
object.key("InstanceGroupId").string(var_135.as_str());
}
if let Some(var_136) = &input.auto_scaling_policy {
#[allow(unused_mut)]
let mut object_137 = object.key("AutoScalingPolicy").start_object();
crate::json_ser::serialize_structure_crate_model_auto_scaling_policy(
&mut object_137,
var_136,
)?;
object_137.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_put_auto_termination_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutAutoTerminationPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_138) = &input.cluster_id {
object.key("ClusterId").string(var_138.as_str());
}
if let Some(var_139) = &input.auto_termination_policy {
#[allow(unused_mut)]
let mut object_140 = object.key("AutoTerminationPolicy").start_object();
crate::json_ser::serialize_structure_crate_model_auto_termination_policy(
&mut object_140,
var_139,
)?;
object_140.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_put_block_public_access_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutBlockPublicAccessConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_141) = &input.block_public_access_configuration {
#[allow(unused_mut)]
let mut object_142 = object.key("BlockPublicAccessConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_block_public_access_configuration(
&mut object_142,
var_141,
)?;
object_142.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_put_managed_scaling_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutManagedScalingPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_143) = &input.cluster_id {
object.key("ClusterId").string(var_143.as_str());
}
if let Some(var_144) = &input.managed_scaling_policy {
#[allow(unused_mut)]
let mut object_145 = object.key("ManagedScalingPolicy").start_object();
crate::json_ser::serialize_structure_crate_model_managed_scaling_policy(
&mut object_145,
var_144,
)?;
object_145.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_remove_auto_scaling_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RemoveAutoScalingPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_146) = &input.cluster_id {
object.key("ClusterId").string(var_146.as_str());
}
if let Some(var_147) = &input.instance_group_id {
object.key("InstanceGroupId").string(var_147.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_remove_auto_termination_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RemoveAutoTerminationPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_148) = &input.cluster_id {
object.key("ClusterId").string(var_148.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_remove_managed_scaling_policy_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RemoveManagedScalingPolicyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_149) = &input.cluster_id {
object.key("ClusterId").string(var_149.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_remove_tags_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RemoveTagsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_150) = &input.resource_id {
object.key("ResourceId").string(var_150.as_str());
}
if let Some(var_151) = &input.tag_keys {
let mut array_152 = object.key("TagKeys").start_array();
for item_153 in var_151 {
{
array_152.value().string(item_153.as_str());
}
}
array_152.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_run_job_flow_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RunJobFlowInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_154) = &input.name {
object.key("Name").string(var_154.as_str());
}
if let Some(var_155) = &input.log_uri {
object.key("LogUri").string(var_155.as_str());
}
if let Some(var_156) = &input.log_encryption_kms_key_id {
object.key("LogEncryptionKmsKeyId").string(var_156.as_str());
}
if let Some(var_157) = &input.additional_info {
object.key("AdditionalInfo").string(var_157.as_str());
}
if let Some(var_158) = &input.ami_version {
object.key("AmiVersion").string(var_158.as_str());
}
if let Some(var_159) = &input.release_label {
object.key("ReleaseLabel").string(var_159.as_str());
}
if let Some(var_160) = &input.instances {
#[allow(unused_mut)]
let mut object_161 = object.key("Instances").start_object();
crate::json_ser::serialize_structure_crate_model_job_flow_instances_config(
&mut object_161,
var_160,
)?;
object_161.finish();
}
if let Some(var_162) = &input.steps {
let mut array_163 = object.key("Steps").start_array();
for item_164 in var_162 {
{
#[allow(unused_mut)]
let mut object_165 = array_163.value().start_object();
crate::json_ser::serialize_structure_crate_model_step_config(
&mut object_165,
item_164,
)?;
object_165.finish();
}
}
array_163.finish();
}
if let Some(var_166) = &input.bootstrap_actions {
let mut array_167 = object.key("BootstrapActions").start_array();
for item_168 in var_166 {
{
#[allow(unused_mut)]
let mut object_169 = array_167.value().start_object();
crate::json_ser::serialize_structure_crate_model_bootstrap_action_config(
&mut object_169,
item_168,
)?;
object_169.finish();
}
}
array_167.finish();
}
if let Some(var_170) = &input.supported_products {
let mut array_171 = object.key("SupportedProducts").start_array();
for item_172 in var_170 {
{
array_171.value().string(item_172.as_str());
}
}
array_171.finish();
}
if let Some(var_173) = &input.new_supported_products {
let mut array_174 = object.key("NewSupportedProducts").start_array();
for item_175 in var_173 {
{
#[allow(unused_mut)]
let mut object_176 = array_174.value().start_object();
crate::json_ser::serialize_structure_crate_model_supported_product_config(
&mut object_176,
item_175,
)?;
object_176.finish();
}
}
array_174.finish();
}
if let Some(var_177) = &input.applications {
let mut array_178 = object.key("Applications").start_array();
for item_179 in var_177 {
{
#[allow(unused_mut)]
let mut object_180 = array_178.value().start_object();
crate::json_ser::serialize_structure_crate_model_application(
&mut object_180,
item_179,
)?;
object_180.finish();
}
}
array_178.finish();
}
if let Some(var_181) = &input.configurations {
let mut array_182 = object.key("Configurations").start_array();
for item_183 in var_181 {
{
#[allow(unused_mut)]
let mut object_184 = array_182.value().start_object();
crate::json_ser::serialize_structure_crate_model_configuration(
&mut object_184,
item_183,
)?;
object_184.finish();
}
}
array_182.finish();
}
if input.visible_to_all_users {
object
.key("VisibleToAllUsers")
.boolean(input.visible_to_all_users);
}
if let Some(var_185) = &input.job_flow_role {
object.key("JobFlowRole").string(var_185.as_str());
}
if let Some(var_186) = &input.service_role {
object.key("ServiceRole").string(var_186.as_str());
}
if let Some(var_187) = &input.tags {
let mut array_188 = object.key("Tags").start_array();
for item_189 in var_187 {
{
#[allow(unused_mut)]
let mut object_190 = array_188.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_190, item_189)?;
object_190.finish();
}
}
array_188.finish();
}
if let Some(var_191) = &input.security_configuration {
object.key("SecurityConfiguration").string(var_191.as_str());
}
if let Some(var_192) = &input.auto_scaling_role {
object.key("AutoScalingRole").string(var_192.as_str());
}
if let Some(var_193) = &input.scale_down_behavior {
object.key("ScaleDownBehavior").string(var_193.as_str());
}
if let Some(var_194) = &input.custom_ami_id {
object.key("CustomAmiId").string(var_194.as_str());
}
if let Some(var_195) = &input.ebs_root_volume_size {
object.key("EbsRootVolumeSize").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_195).into()),
);
}
if let Some(var_196) = &input.repo_upgrade_on_boot {
object.key("RepoUpgradeOnBoot").string(var_196.as_str());
}
if let Some(var_197) = &input.kerberos_attributes {
#[allow(unused_mut)]
let mut object_198 = object.key("KerberosAttributes").start_object();
crate::json_ser::serialize_structure_crate_model_kerberos_attributes(
&mut object_198,
var_197,
)?;
object_198.finish();
}
if let Some(var_199) = &input.step_concurrency_level {
object.key("StepConcurrencyLevel").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_199).into()),
);
}
if let Some(var_200) = &input.managed_scaling_policy {
#[allow(unused_mut)]
let mut object_201 = object.key("ManagedScalingPolicy").start_object();
crate::json_ser::serialize_structure_crate_model_managed_scaling_policy(
&mut object_201,
var_200,
)?;
object_201.finish();
}
if let Some(var_202) = &input.placement_group_configs {
let mut array_203 = object.key("PlacementGroupConfigs").start_array();
for item_204 in var_202 {
{
#[allow(unused_mut)]
let mut object_205 = array_203.value().start_object();
crate::json_ser::serialize_structure_crate_model_placement_group_config(
&mut object_205,
item_204,
)?;
object_205.finish();
}
}
array_203.finish();
}
if let Some(var_206) = &input.auto_termination_policy {
#[allow(unused_mut)]
let mut object_207 = object.key("AutoTerminationPolicy").start_object();
crate::json_ser::serialize_structure_crate_model_auto_termination_policy(
&mut object_207,
var_206,
)?;
object_207.finish();
}
if let Some(var_208) = &input.os_release_label {
object.key("OSReleaseLabel").string(var_208.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_set_termination_protection_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::SetTerminationProtectionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_209) = &input.job_flow_ids {
let mut array_210 = object.key("JobFlowIds").start_array();
for item_211 in var_209 {
{
array_210.value().string(item_211.as_str());
}
}
array_210.finish();
}
{
object
.key("TerminationProtected")
.boolean(input.termination_protected);
}
Ok(())
}
pub fn serialize_structure_crate_input_set_visible_to_all_users_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::SetVisibleToAllUsersInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_212) = &input.job_flow_ids {
let mut array_213 = object.key("JobFlowIds").start_array();
for item_214 in var_212 {
{
array_213.value().string(item_214.as_str());
}
}
array_213.finish();
}
{
object
.key("VisibleToAllUsers")
.boolean(input.visible_to_all_users);
}
Ok(())
}
pub fn serialize_structure_crate_input_start_notebook_execution_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StartNotebookExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_215) = &input.editor_id {
object.key("EditorId").string(var_215.as_str());
}
if let Some(var_216) = &input.relative_path {
object.key("RelativePath").string(var_216.as_str());
}
if let Some(var_217) = &input.notebook_execution_name {
object.key("NotebookExecutionName").string(var_217.as_str());
}
if let Some(var_218) = &input.notebook_params {
object.key("NotebookParams").string(var_218.as_str());
}
if let Some(var_219) = &input.execution_engine {
#[allow(unused_mut)]
let mut object_220 = object.key("ExecutionEngine").start_object();
crate::json_ser::serialize_structure_crate_model_execution_engine_config(
&mut object_220,
var_219,
)?;
object_220.finish();
}
if let Some(var_221) = &input.service_role {
object.key("ServiceRole").string(var_221.as_str());
}
if let Some(var_222) = &input.notebook_instance_security_group_id {
object
.key("NotebookInstanceSecurityGroupId")
.string(var_222.as_str());
}
if let Some(var_223) = &input.tags {
let mut array_224 = object.key("Tags").start_array();
for item_225 in var_223 {
{
#[allow(unused_mut)]
let mut object_226 = array_224.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_226, item_225)?;
object_226.finish();
}
}
array_224.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_stop_notebook_execution_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StopNotebookExecutionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_227) = &input.notebook_execution_id {
object.key("NotebookExecutionId").string(var_227.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_terminate_job_flows_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::TerminateJobFlowsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_228) = &input.job_flow_ids {
let mut array_229 = object.key("JobFlowIds").start_array();
for item_230 in var_228 {
{
array_229.value().string(item_230.as_str());
}
}
array_229.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_studio_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateStudioInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_231) = &input.studio_id {
object.key("StudioId").string(var_231.as_str());
}
if let Some(var_232) = &input.name {
object.key("Name").string(var_232.as_str());
}
if let Some(var_233) = &input.description {
object.key("Description").string(var_233.as_str());
}
if let Some(var_234) = &input.subnet_ids {
let mut array_235 = object.key("SubnetIds").start_array();
for item_236 in var_234 {
{
array_235.value().string(item_236.as_str());
}
}
array_235.finish();
}
if let Some(var_237) = &input.default_s3_location {
object.key("DefaultS3Location").string(var_237.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_studio_session_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateStudioSessionMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_238) = &input.studio_id {
object.key("StudioId").string(var_238.as_str());
}
if let Some(var_239) = &input.identity_id {
object.key("IdentityId").string(var_239.as_str());
}
if let Some(var_240) = &input.identity_name {
object.key("IdentityName").string(var_240.as_str());
}
if let Some(var_241) = &input.identity_type {
object.key("IdentityType").string(var_241.as_str());
}
if let Some(var_242) = &input.session_policy_arn {
object.key("SessionPolicyArn").string(var_242.as_str());
}
Ok(())
}Trait Implementations§
source§impl AsRef<str> for IdentityType
impl AsRef<str> for IdentityType
source§impl Clone for IdentityType
impl Clone for IdentityType
source§fn clone(&self) -> IdentityType
fn clone(&self) -> IdentityType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for IdentityType
impl Debug for IdentityType
source§impl From<&str> for IdentityType
impl From<&str> for IdentityType
source§impl FromStr for IdentityType
impl FromStr for IdentityType
source§impl Hash for IdentityType
impl Hash for IdentityType
source§impl Ord for IdentityType
impl Ord for IdentityType
source§fn cmp(&self, other: &IdentityType) -> Ordering
fn cmp(&self, other: &IdentityType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<IdentityType> for IdentityType
impl PartialEq<IdentityType> for IdentityType
source§fn eq(&self, other: &IdentityType) -> bool
fn eq(&self, other: &IdentityType) -> bool
source§impl PartialOrd<IdentityType> for IdentityType
impl PartialOrd<IdentityType> for IdentityType
source§fn partial_cmp(&self, other: &IdentityType) -> Option<Ordering>
fn partial_cmp(&self, other: &IdentityType) -> 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 IdentityType
impl StructuralEq for IdentityType
impl StructuralPartialEq for IdentityType
Auto Trait Implementations§
impl RefUnwindSafe for IdentityType
impl Send for IdentityType
impl Sync for IdentityType
impl Unpin for IdentityType
impl UnwindSafe for IdentityType
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.