Enum aws_sdk_devicefarm::model::UploadType
source · #[non_exhaustive]
pub enum UploadType {
Show 33 variants
AndroidApp,
AppiumJavaJunitTestPackage,
AppiumJavaJunitTestSpec,
AppiumJavaTestngTestPackage,
AppiumJavaTestngTestSpec,
AppiumNodeTestPackage,
AppiumNodeTestSpec,
AppiumPythonTestPackage,
AppiumPythonTestSpec,
AppiumRubyTestPackage,
AppiumRubyTestSpec,
AppiumWebJavaJunitTestPackage,
AppiumWebJavaJunitTestSpec,
AppiumWebJavaTestngTestPackage,
AppiumWebJavaTestngTestSpec,
AppiumWebNodeTestPackage,
AppiumWebNodeTestSpec,
AppiumWebPythonTestPackage,
AppiumWebPythonTestSpec,
AppiumWebRubyTestPackage,
AppiumWebRubyTestSpec,
CalabashTestPackage,
ExternalData,
InstrumentationTestPackage,
InstrumentationTestSpec,
IosApp,
UiautomationTestPackage,
UiautomatorTestPackage,
WebApp,
XctestTestPackage,
XctestUiTestPackage,
XctestUiTestSpec,
Unknown(UnknownVariantValue),
}Expand description
When writing a match expression against UploadType, 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 uploadtype = unimplemented!();
match uploadtype {
UploadType::AndroidApp => { /* ... */ },
UploadType::AppiumJavaJunitTestPackage => { /* ... */ },
UploadType::AppiumJavaJunitTestSpec => { /* ... */ },
UploadType::AppiumJavaTestngTestPackage => { /* ... */ },
UploadType::AppiumJavaTestngTestSpec => { /* ... */ },
UploadType::AppiumNodeTestPackage => { /* ... */ },
UploadType::AppiumNodeTestSpec => { /* ... */ },
UploadType::AppiumPythonTestPackage => { /* ... */ },
UploadType::AppiumPythonTestSpec => { /* ... */ },
UploadType::AppiumRubyTestPackage => { /* ... */ },
UploadType::AppiumRubyTestSpec => { /* ... */ },
UploadType::AppiumWebJavaJunitTestPackage => { /* ... */ },
UploadType::AppiumWebJavaJunitTestSpec => { /* ... */ },
UploadType::AppiumWebJavaTestngTestPackage => { /* ... */ },
UploadType::AppiumWebJavaTestngTestSpec => { /* ... */ },
UploadType::AppiumWebNodeTestPackage => { /* ... */ },
UploadType::AppiumWebNodeTestSpec => { /* ... */ },
UploadType::AppiumWebPythonTestPackage => { /* ... */ },
UploadType::AppiumWebPythonTestSpec => { /* ... */ },
UploadType::AppiumWebRubyTestPackage => { /* ... */ },
UploadType::AppiumWebRubyTestSpec => { /* ... */ },
UploadType::CalabashTestPackage => { /* ... */ },
UploadType::ExternalData => { /* ... */ },
UploadType::InstrumentationTestPackage => { /* ... */ },
UploadType::InstrumentationTestSpec => { /* ... */ },
UploadType::IosApp => { /* ... */ },
UploadType::UiautomationTestPackage => { /* ... */ },
UploadType::UiautomatorTestPackage => { /* ... */ },
UploadType::WebApp => { /* ... */ },
UploadType::XctestTestPackage => { /* ... */ },
UploadType::XctestUiTestPackage => { /* ... */ },
UploadType::XctestUiTestSpec => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when uploadtype represents
NewFeature, the execution path will lead to the second last match arm,
even though the enum does not contain a variant UploadType::NewFeature
in the current version of SDK. The reason is that the variable other,
created by the @ operator, is bound to
UploadType::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 UploadType::NewFeature is defined.
Specifically, when uploadtype represents NewFeature,
the execution path will hit the second last match arm as before by virtue of
calling as_str on UploadType::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
AndroidApp
AppiumJavaJunitTestPackage
AppiumJavaJunitTestSpec
AppiumJavaTestngTestPackage
AppiumJavaTestngTestSpec
AppiumNodeTestPackage
AppiumNodeTestSpec
AppiumPythonTestPackage
AppiumPythonTestSpec
AppiumRubyTestPackage
AppiumRubyTestSpec
AppiumWebJavaJunitTestPackage
AppiumWebJavaJunitTestSpec
AppiumWebJavaTestngTestPackage
AppiumWebJavaTestngTestSpec
AppiumWebNodeTestPackage
AppiumWebNodeTestSpec
AppiumWebPythonTestPackage
AppiumWebPythonTestSpec
AppiumWebRubyTestPackage
AppiumWebRubyTestSpec
CalabashTestPackage
ExternalData
InstrumentationTestPackage
InstrumentationTestSpec
IosApp
UiautomationTestPackage
UiautomatorTestPackage
WebApp
XctestTestPackage
XctestUiTestPackage
XctestUiTestSpec
Unknown(UnknownVariantValue)
Unknown contains new variants that have been added since this code was generated.
Implementations§
source§impl UploadType
impl UploadType
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
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
pub fn serialize_structure_crate_input_create_upload_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateUploadInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_49) = &input.project_arn {
object.key("projectArn").string(var_49.as_str());
}
if let Some(var_50) = &input.name {
object.key("name").string(var_50.as_str());
}
if let Some(var_51) = &input.r#type {
object.key("type").string(var_51.as_str());
}
if let Some(var_52) = &input.content_type {
object.key("contentType").string(var_52.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_vpce_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_53) = &input.vpce_configuration_name {
object.key("vpceConfigurationName").string(var_53.as_str());
}
if let Some(var_54) = &input.vpce_service_name {
object.key("vpceServiceName").string(var_54.as_str());
}
if let Some(var_55) = &input.service_dns_name {
object.key("serviceDnsName").string(var_55.as_str());
}
if let Some(var_56) = &input.vpce_configuration_description {
object
.key("vpceConfigurationDescription")
.string(var_56.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_device_pool_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteDevicePoolInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_57) = &input.arn {
object.key("arn").string(var_57.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_instance_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteInstanceProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_58) = &input.arn {
object.key("arn").string(var_58.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_network_profile_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteNetworkProfileInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_59) = &input.arn {
object.key("arn").string(var_59.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_60) = &input.arn {
object.key("arn").string(var_60.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_remote_access_session_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteRemoteAccessSessionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_61) = &input.arn {
object.key("arn").string(var_61.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_run_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteRunInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_62) = &input.arn {
object.key("arn").string(var_62.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_test_grid_project_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteTestGridProjectInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_63) = &input.project_arn {
object.key("projectArn").string(var_63.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_upload_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteUploadInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_64) = &input.arn {
object.key("arn").string(var_64.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_delete_vpce_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::DeleteVpceConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_65) = &input.arn {
object.key("arn").string(var_65.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_device_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetDeviceInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_66) = &input.arn {
object.key("arn").string(var_66.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_device_instance_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetDeviceInstanceInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_67) = &input.arn {
object.key("arn").string(var_67.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_get_device_pool_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::GetDevicePoolInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_68) = &input.arn {
object.key("arn").string(var_68.as_str());
}
Ok(())
}
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(())
}Trait Implementations§
source§impl AsRef<str> for UploadType
impl AsRef<str> for UploadType
source§impl Clone for UploadType
impl Clone for UploadType
source§fn clone(&self) -> UploadType
fn clone(&self) -> UploadType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for UploadType
impl Debug for UploadType
source§impl From<&str> for UploadType
impl From<&str> for UploadType
source§impl FromStr for UploadType
impl FromStr for UploadType
source§impl Hash for UploadType
impl Hash for UploadType
source§impl Ord for UploadType
impl Ord for UploadType
source§fn cmp(&self, other: &UploadType) -> Ordering
fn cmp(&self, other: &UploadType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<UploadType> for UploadType
impl PartialEq<UploadType> for UploadType
source§fn eq(&self, other: &UploadType) -> bool
fn eq(&self, other: &UploadType) -> bool
source§impl PartialOrd<UploadType> for UploadType
impl PartialOrd<UploadType> for UploadType
source§fn partial_cmp(&self, other: &UploadType) -> Option<Ordering>
fn partial_cmp(&self, other: &UploadType) -> 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 UploadType
impl StructuralEq for UploadType
impl StructuralPartialEq for UploadType
Auto Trait Implementations§
impl RefUnwindSafe for UploadType
impl Send for UploadType
impl Sync for UploadType
impl Unpin for UploadType
impl UnwindSafe for UploadType
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.