Enum aws_sdk_devicefarm::model::TestType
source · #[non_exhaustive]
pub enum TestType {
Show 22 variants
AppiumJavaJunit,
AppiumJavaTestng,
AppiumNode,
AppiumPython,
AppiumRuby,
AppiumWebJavaJunit,
AppiumWebJavaTestng,
AppiumWebNode,
AppiumWebPython,
AppiumWebRuby,
BuiltinExplorer,
BuiltinFuzz,
Calabash,
Instrumentation,
RemoteAccessRecord,
RemoteAccessReplay,
Uiautomation,
Uiautomator,
WebPerformanceProfile,
Xctest,
XctestUi,
Unknown(UnknownVariantValue),
}Expand description
When writing a match expression against TestType, 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 testtype = unimplemented!();
match testtype {
TestType::AppiumJavaJunit => { /* ... */ },
TestType::AppiumJavaTestng => { /* ... */ },
TestType::AppiumNode => { /* ... */ },
TestType::AppiumPython => { /* ... */ },
TestType::AppiumRuby => { /* ... */ },
TestType::AppiumWebJavaJunit => { /* ... */ },
TestType::AppiumWebJavaTestng => { /* ... */ },
TestType::AppiumWebNode => { /* ... */ },
TestType::AppiumWebPython => { /* ... */ },
TestType::AppiumWebRuby => { /* ... */ },
TestType::BuiltinExplorer => { /* ... */ },
TestType::BuiltinFuzz => { /* ... */ },
TestType::Calabash => { /* ... */ },
TestType::Instrumentation => { /* ... */ },
TestType::RemoteAccessRecord => { /* ... */ },
TestType::RemoteAccessReplay => { /* ... */ },
TestType::Uiautomation => { /* ... */ },
TestType::Uiautomator => { /* ... */ },
TestType::WebPerformanceProfile => { /* ... */ },
TestType::Xctest => { /* ... */ },
TestType::XctestUi => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when testtype represents
NewFeature, the execution path will lead to the second last match arm,
even though the enum does not contain a variant TestType::NewFeature
in the current version of SDK. The reason is that the variable other,
created by the @ operator, is bound to
TestType::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 TestType::NewFeature is defined.
Specifically, when testtype represents NewFeature,
the execution path will hit the second last match arm as before by virtue of
calling as_str on TestType::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
AppiumJavaJunit
AppiumJavaTestng
AppiumNode
AppiumPython
AppiumRuby
AppiumWebJavaJunit
AppiumWebJavaTestng
AppiumWebNode
AppiumWebPython
AppiumWebRuby
BuiltinExplorer
BuiltinFuzz
Calabash
Instrumentation
RemoteAccessRecord
RemoteAccessReplay
Uiautomation
Uiautomator
WebPerformanceProfile
Xctest
XctestUi
Unknown(UnknownVariantValue)
Unknown contains new variants that have been added since this code was generated.
Implementations§
source§impl TestType
impl TestType
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
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 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489
pub fn serialize_structure_crate_input_get_device_pool_compatibility_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetDevicePoolCompatibilityInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_69) = &input.device_pool_arn {
object.key("devicePoolArn").string(var_69.as_str());
}
if let Some(var_70) = &input.app_arn {
object.key("appArn").string(var_70.as_str());
}
if let Some(var_71) = &input.test_type {
object.key("testType").string(var_71.as_str());
}
if let Some(var_72) = &input.test {
#[allow(unused_mut)]
let mut object_73 = object.key("test").start_object();
crate::json_ser::serialize_structure_crate_model_schedule_run_test(&mut object_73, var_72)?;
object_73.finish();
}
if let Some(var_74) = &input.configuration {
#[allow(unused_mut)]
let mut object_75 = object.key("configuration").start_object();
crate::json_ser::serialize_structure_crate_model_schedule_run_configuration(
&mut object_75,
var_74,
)?;
object_75.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_get_instance_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetInstanceProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_76) = &input.arn {
object.key("arn").string(var_76.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_job_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_77) = &input.arn {
object.key("arn").string(var_77.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_network_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetNetworkProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_78) = &input.arn {
object.key("arn").string(var_78.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_offering_status_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetOfferingStatusInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_79) = &input.next_token {
object.key("nextToken").string(var_79.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_80) = &input.arn {
object.key("arn").string(var_80.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_remote_access_session_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_81) = &input.arn {
object.key("arn").string(var_81.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_run_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetRunInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_82) = &input.arn {
object.key("arn").string(var_82.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_suite_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetSuiteInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_83) = &input.arn {
object.key("arn").string(var_83.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_test_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetTestInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_84) = &input.arn {
object.key("arn").string(var_84.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_test_grid_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_85) = &input.project_arn {
object.key("projectArn").string(var_85.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_test_grid_session_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetTestGridSessionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_86) = &input.project_arn {
object.key("projectArn").string(var_86.as_str());
}
if let Some(var_87) = &input.session_id {
object.key("sessionId").string(var_87.as_str());
}
if let Some(var_88) = &input.session_arn {
object.key("sessionArn").string(var_88.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_upload_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetUploadInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_89) = &input.arn {
object.key("arn").string(var_89.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_vpce_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_90) = &input.arn {
object.key("arn").string(var_90.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_install_to_remote_access_session_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::InstallToRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_91) = &input.remote_access_session_arn {
object.key("remoteAccessSessionArn").string(var_91.as_str());
}
if let Some(var_92) = &input.app_arn {
object.key("appArn").string(var_92.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_artifacts_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListArtifactsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_93) = &input.arn {
object.key("arn").string(var_93.as_str());
}
if let Some(var_94) = &input.r#type {
object.key("type").string(var_94.as_str());
}
if let Some(var_95) = &input.next_token {
object.key("nextToken").string(var_95.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_device_instances_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListDeviceInstancesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_96) = &input.max_results {
object.key("maxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_96).into()),
);
}
if let Some(var_97) = &input.next_token {
object.key("nextToken").string(var_97.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_device_pools_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListDevicePoolsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_98) = &input.arn {
object.key("arn").string(var_98.as_str());
}
if let Some(var_99) = &input.r#type {
object.key("type").string(var_99.as_str());
}
if let Some(var_100) = &input.next_token {
object.key("nextToken").string(var_100.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_devices_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListDevicesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_101) = &input.arn {
object.key("arn").string(var_101.as_str());
}
if let Some(var_102) = &input.next_token {
object.key("nextToken").string(var_102.as_str());
}
if let Some(var_103) = &input.filters {
let mut array_104 = object.key("filters").start_array();
for item_105 in var_103 {
{
#[allow(unused_mut)]
let mut object_106 = array_104.value().start_object();
crate::json_ser::serialize_structure_crate_model_device_filter(
&mut object_106,
item_105,
)?;
object_106.finish();
}
}
array_104.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_list_instance_profiles_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListInstanceProfilesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_107) = &input.max_results {
object.key("maxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_107).into()),
);
}
if let Some(var_108) = &input.next_token {
object.key("nextToken").string(var_108.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_jobs_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListJobsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_109) = &input.arn {
object.key("arn").string(var_109.as_str());
}
if let Some(var_110) = &input.next_token {
object.key("nextToken").string(var_110.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_network_profiles_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListNetworkProfilesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_111) = &input.arn {
object.key("arn").string(var_111.as_str());
}
if let Some(var_112) = &input.r#type {
object.key("type").string(var_112.as_str());
}
if let Some(var_113) = &input.next_token {
object.key("nextToken").string(var_113.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_offering_promotions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListOfferingPromotionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_114) = &input.next_token {
object.key("nextToken").string(var_114.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_offerings_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListOfferingsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_115) = &input.next_token {
object.key("nextToken").string(var_115.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_offering_transactions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListOfferingTransactionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_116) = &input.next_token {
object.key("nextToken").string(var_116.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_projects_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListProjectsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_117) = &input.arn {
object.key("arn").string(var_117.as_str());
}
if let Some(var_118) = &input.next_token {
object.key("nextToken").string(var_118.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_remote_access_sessions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListRemoteAccessSessionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_119) = &input.arn {
object.key("arn").string(var_119.as_str());
}
if let Some(var_120) = &input.next_token {
object.key("nextToken").string(var_120.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_runs_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListRunsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_121) = &input.arn {
object.key("arn").string(var_121.as_str());
}
if let Some(var_122) = &input.next_token {
object.key("nextToken").string(var_122.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_samples_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListSamplesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_123) = &input.arn {
object.key("arn").string(var_123.as_str());
}
if let Some(var_124) = &input.next_token {
object.key("nextToken").string(var_124.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_suites_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListSuitesInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_125) = &input.arn {
object.key("arn").string(var_125.as_str());
}
if let Some(var_126) = &input.next_token {
object.key("nextToken").string(var_126.as_str());
}
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_127) = &input.resource_arn {
object.key("ResourceARN").string(var_127.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_test_grid_projects_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListTestGridProjectsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_128) = &input.max_result {
object.key("maxResult").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_128).into()),
);
}
if let Some(var_129) = &input.next_token {
object.key("nextToken").string(var_129.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_test_grid_session_actions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListTestGridSessionActionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_130) = &input.session_arn {
object.key("sessionArn").string(var_130.as_str());
}
if let Some(var_131) = &input.max_result {
object.key("maxResult").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_131).into()),
);
}
if let Some(var_132) = &input.next_token {
object.key("nextToken").string(var_132.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_test_grid_session_artifacts_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListTestGridSessionArtifactsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_133) = &input.session_arn {
object.key("sessionArn").string(var_133.as_str());
}
if let Some(var_134) = &input.r#type {
object.key("type").string(var_134.as_str());
}
if let Some(var_135) = &input.max_result {
object.key("maxResult").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_135).into()),
);
}
if let Some(var_136) = &input.next_token {
object.key("nextToken").string(var_136.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_test_grid_sessions_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListTestGridSessionsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_137) = &input.project_arn {
object.key("projectArn").string(var_137.as_str());
}
if let Some(var_138) = &input.status {
object.key("status").string(var_138.as_str());
}
if let Some(var_139) = &input.creation_time_after {
object
.key("creationTimeAfter")
.date_time(var_139, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_140) = &input.creation_time_before {
object
.key("creationTimeBefore")
.date_time(var_140, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_141) = &input.end_time_after {
object
.key("endTimeAfter")
.date_time(var_141, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_142) = &input.end_time_before {
object
.key("endTimeBefore")
.date_time(var_142, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_143) = &input.max_result {
object.key("maxResult").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_143).into()),
);
}
if let Some(var_144) = &input.next_token {
object.key("nextToken").string(var_144.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_tests_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListTestsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_145) = &input.arn {
object.key("arn").string(var_145.as_str());
}
if let Some(var_146) = &input.next_token {
object.key("nextToken").string(var_146.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_unique_problems_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListUniqueProblemsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_147) = &input.arn {
object.key("arn").string(var_147.as_str());
}
if let Some(var_148) = &input.next_token {
object.key("nextToken").string(var_148.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_uploads_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListUploadsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_149) = &input.arn {
object.key("arn").string(var_149.as_str());
}
if let Some(var_150) = &input.r#type {
object.key("type").string(var_150.as_str());
}
if let Some(var_151) = &input.next_token {
object.key("nextToken").string(var_151.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_list_vpce_configurations_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ListVpceConfigurationsInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_152) = &input.max_results {
object.key("maxResults").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_152).into()),
);
}
if let Some(var_153) = &input.next_token {
object.key("nextToken").string(var_153.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_purchase_offering_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PurchaseOfferingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_154) = &input.offering_id {
object.key("offeringId").string(var_154.as_str());
}
if let Some(var_155) = &input.quantity {
object.key("quantity").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_155).into()),
);
}
if let Some(var_156) = &input.offering_promotion_id {
object.key("offeringPromotionId").string(var_156.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_renew_offering_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::RenewOfferingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_157) = &input.offering_id {
object.key("offeringId").string(var_157.as_str());
}
if let Some(var_158) = &input.quantity {
object.key("quantity").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_158).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_schedule_run_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ScheduleRunInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_159) = &input.project_arn {
object.key("projectArn").string(var_159.as_str());
}
if let Some(var_160) = &input.app_arn {
object.key("appArn").string(var_160.as_str());
}
if let Some(var_161) = &input.device_pool_arn {
object.key("devicePoolArn").string(var_161.as_str());
}
if let Some(var_162) = &input.device_selection_configuration {
#[allow(unused_mut)]
let mut object_163 = object.key("deviceSelectionConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_device_selection_configuration(
&mut object_163,
var_162,
)?;
object_163.finish();
}
if let Some(var_164) = &input.name {
object.key("name").string(var_164.as_str());
}
if let Some(var_165) = &input.test {
#[allow(unused_mut)]
let mut object_166 = object.key("test").start_object();
crate::json_ser::serialize_structure_crate_model_schedule_run_test(
&mut object_166,
var_165,
)?;
object_166.finish();
}
if let Some(var_167) = &input.configuration {
#[allow(unused_mut)]
let mut object_168 = object.key("configuration").start_object();
crate::json_ser::serialize_structure_crate_model_schedule_run_configuration(
&mut object_168,
var_167,
)?;
object_168.finish();
}
if let Some(var_169) = &input.execution_configuration {
#[allow(unused_mut)]
let mut object_170 = object.key("executionConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_execution_configuration(
&mut object_170,
var_169,
)?;
object_170.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_stop_job_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StopJobInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_171) = &input.arn {
object.key("arn").string(var_171.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_stop_remote_access_session_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StopRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_172) = &input.arn {
object.key("arn").string(var_172.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_stop_run_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::StopRunInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_173) = &input.arn {
object.key("arn").string(var_173.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_174) = &input.resource_arn {
object.key("ResourceARN").string(var_174.as_str());
}
if let Some(var_175) = &input.tags {
let mut array_176 = object.key("Tags").start_array();
for item_177 in var_175 {
{
#[allow(unused_mut)]
let mut object_178 = array_176.value().start_object();
crate::json_ser::serialize_structure_crate_model_tag(&mut object_178, item_177)?;
object_178.finish();
}
}
array_176.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_179) = &input.resource_arn {
object.key("ResourceARN").string(var_179.as_str());
}
if let Some(var_180) = &input.tag_keys {
let mut array_181 = object.key("TagKeys").start_array();
for item_182 in var_180 {
{
array_181.value().string(item_182.as_str());
}
}
array_181.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_device_instance_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateDeviceInstanceInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_183) = &input.arn {
object.key("arn").string(var_183.as_str());
}
if let Some(var_184) = &input.profile_arn {
object.key("profileArn").string(var_184.as_str());
}
if let Some(var_185) = &input.labels {
let mut array_186 = object.key("labels").start_array();
for item_187 in var_185 {
{
array_186.value().string(item_187.as_str());
}
}
array_186.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_device_pool_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateDevicePoolInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_188) = &input.arn {
object.key("arn").string(var_188.as_str());
}
if let Some(var_189) = &input.name {
object.key("name").string(var_189.as_str());
}
if let Some(var_190) = &input.description {
object.key("description").string(var_190.as_str());
}
if let Some(var_191) = &input.rules {
let mut array_192 = object.key("rules").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_rule(&mut object_194, item_193)?;
object_194.finish();
}
}
array_192.finish();
}
if let Some(var_195) = &input.max_devices {
object.key("maxDevices").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_195).into()),
);
}
if let Some(var_196) = &input.clear_max_devices {
object.key("clearMaxDevices").boolean(*var_196);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_instance_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateInstanceProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_197) = &input.arn {
object.key("arn").string(var_197.as_str());
}
if let Some(var_198) = &input.name {
object.key("name").string(var_198.as_str());
}
if let Some(var_199) = &input.description {
object.key("description").string(var_199.as_str());
}
if let Some(var_200) = &input.package_cleanup {
object.key("packageCleanup").boolean(*var_200);
}
if let Some(var_201) = &input.exclude_app_packages_from_cleanup {
let mut array_202 = object.key("excludeAppPackagesFromCleanup").start_array();
for item_203 in var_201 {
{
array_202.value().string(item_203.as_str());
}
}
array_202.finish();
}
if let Some(var_204) = &input.reboot_after_use {
object.key("rebootAfterUse").boolean(*var_204);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_network_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateNetworkProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_205) = &input.arn {
object.key("arn").string(var_205.as_str());
}
if let Some(var_206) = &input.name {
object.key("name").string(var_206.as_str());
}
if let Some(var_207) = &input.description {
object.key("description").string(var_207.as_str());
}
if let Some(var_208) = &input.r#type {
object.key("type").string(var_208.as_str());
}
if let Some(var_209) = &input.uplink_bandwidth_bits {
object.key("uplinkBandwidthBits").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_209).into()),
);
}
if let Some(var_210) = &input.downlink_bandwidth_bits {
object.key("downlinkBandwidthBits").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_210).into()),
);
}
if let Some(var_211) = &input.uplink_delay_ms {
object.key("uplinkDelayMs").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_211).into()),
);
}
if let Some(var_212) = &input.downlink_delay_ms {
object.key("downlinkDelayMs").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_212).into()),
);
}
if let Some(var_213) = &input.uplink_jitter_ms {
object.key("uplinkJitterMs").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_213).into()),
);
}
if let Some(var_214) = &input.downlink_jitter_ms {
object.key("downlinkJitterMs").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_214).into()),
);
}
if input.uplink_loss_percent != 0 {
object.key("uplinkLossPercent").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.uplink_loss_percent).into()),
);
}
if input.downlink_loss_percent != 0 {
object.key("downlinkLossPercent").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.downlink_loss_percent).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_215) = &input.arn {
object.key("arn").string(var_215.as_str());
}
if let Some(var_216) = &input.name {
object.key("name").string(var_216.as_str());
}
if let Some(var_217) = &input.default_job_timeout_minutes {
object.key("defaultJobTimeoutMinutes").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_217).into()),
);
}
if let Some(var_218) = &input.vpc_config {
#[allow(unused_mut)]
let mut object_219 = object.key("vpcConfig").start_object();
crate::json_ser::serialize_structure_crate_model_vpc_config(&mut object_219, var_218)?;
object_219.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_test_grid_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_220) = &input.project_arn {
object.key("projectArn").string(var_220.as_str());
}
if let Some(var_221) = &input.name {
object.key("name").string(var_221.as_str());
}
if let Some(var_222) = &input.description {
object.key("description").string(var_222.as_str());
}
if let Some(var_223) = &input.vpc_config {
#[allow(unused_mut)]
let mut object_224 = object.key("vpcConfig").start_object();
crate::json_ser::serialize_structure_crate_model_test_grid_vpc_config(
&mut object_224,
var_223,
)?;
object_224.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_upload_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateUploadInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_225) = &input.arn {
object.key("arn").string(var_225.as_str());
}
if let Some(var_226) = &input.name {
object.key("name").string(var_226.as_str());
}
if let Some(var_227) = &input.content_type {
object.key("contentType").string(var_227.as_str());
}
if let Some(var_228) = &input.edit_content {
object.key("editContent").boolean(*var_228);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_vpce_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_229) = &input.arn {
object.key("arn").string(var_229.as_str());
}
if let Some(var_230) = &input.vpce_configuration_name {
object.key("vpceConfigurationName").string(var_230.as_str());
}
if let Some(var_231) = &input.vpce_service_name {
object.key("vpceServiceName").string(var_231.as_str());
}
if let Some(var_232) = &input.service_dns_name {
object.key("serviceDnsName").string(var_232.as_str());
}
if let Some(var_233) = &input.vpce_configuration_description {
object
.key("vpceConfigurationDescription")
.string(var_233.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_rule(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::Rule,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_234) = &input.attribute {
object.key("attribute").string(var_234.as_str());
}
if let Some(var_235) = &input.operator {
object.key("operator").string(var_235.as_str());
}
if let Some(var_236) = &input.value {
object.key("value").string(var_236.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_vpc_config(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::VpcConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_237) = &input.security_group_ids {
let mut array_238 = object.key("securityGroupIds").start_array();
for item_239 in var_237 {
{
array_238.value().string(item_239.as_str());
}
}
array_238.finish();
}
if let Some(var_240) = &input.subnet_ids {
let mut array_241 = object.key("subnetIds").start_array();
for item_242 in var_240 {
{
array_241.value().string(item_242.as_str());
}
}
array_241.finish();
}
if let Some(var_243) = &input.vpc_id {
object.key("vpcId").string(var_243.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_create_remote_access_session_configuration(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::CreateRemoteAccessSessionConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_244) = &input.billing_method {
object.key("billingMethod").string(var_244.as_str());
}
if let Some(var_245) = &input.vpce_configuration_arns {
let mut array_246 = object.key("vpceConfigurationArns").start_array();
for item_247 in var_245 {
{
array_246.value().string(item_247.as_str());
}
}
array_246.finish();
}
Ok(())
}
pub fn serialize_structure_crate_model_test_grid_vpc_config(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::TestGridVpcConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_248) = &input.security_group_ids {
let mut array_249 = object.key("securityGroupIds").start_array();
for item_250 in var_248 {
{
array_249.value().string(item_250.as_str());
}
}
array_249.finish();
}
if let Some(var_251) = &input.subnet_ids {
let mut array_252 = object.key("subnetIds").start_array();
for item_253 in var_251 {
{
array_252.value().string(item_253.as_str());
}
}
array_252.finish();
}
if let Some(var_254) = &input.vpc_id {
object.key("vpcId").string(var_254.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_model_schedule_run_test(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::model::ScheduleRunTest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_255) = &input.r#type {
object.key("type").string(var_255.as_str());
}
if let Some(var_256) = &input.test_package_arn {
object.key("testPackageArn").string(var_256.as_str());
}
if let Some(var_257) = &input.test_spec_arn {
object.key("testSpecArn").string(var_257.as_str());
}
if let Some(var_258) = &input.filter {
object.key("filter").string(var_258.as_str());
}
if let Some(var_259) = &input.parameters {
#[allow(unused_mut)]
let mut object_260 = object.key("parameters").start_object();
for (key_261, value_262) in var_259 {
{
object_260.key(key_261.as_str()).string(value_262.as_str());
}
}
object_260.finish();
}
Ok(())
}Trait Implementations§
source§impl Ord for TestType
impl Ord for TestType
source§impl PartialOrd<TestType> for TestType
impl PartialOrd<TestType> for TestType
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 TestType
impl StructuralEq for TestType
impl StructuralPartialEq for TestType
Auto Trait Implementations§
impl RefUnwindSafe for TestType
impl Send for TestType
impl Sync for TestType
impl Unpin for TestType
impl UnwindSafe for TestType
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.