#[non_exhaustive]
pub enum ContentHandlingStrategy {
ConvertToBinary,
ConvertToText,
Unknown(UnknownVariantValue),
}Expand description
When writing a match expression against ContentHandlingStrategy, 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 contenthandlingstrategy = unimplemented!();
match contenthandlingstrategy {
ContentHandlingStrategy::ConvertToBinary => { /* ... */ },
ContentHandlingStrategy::ConvertToText => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when contenthandlingstrategy represents
NewFeature, the execution path will lead to the second last match arm,
even though the enum does not contain a variant ContentHandlingStrategy::NewFeature
in the current version of SDK. The reason is that the variable other,
created by the @ operator, is bound to
ContentHandlingStrategy::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 ContentHandlingStrategy::NewFeature is defined.
Specifically, when contenthandlingstrategy represents NewFeature,
the execution path will hit the second last match arm as before by virtue of
calling as_str on ContentHandlingStrategy::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.
Specifies how to handle response payload content type conversions. Supported only for WebSocket APIs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConvertToBinary
ConvertToText
Unknown(UnknownVariantValue)
Unknown contains new variants that have been added since this code was generated.
Implementations§
source§impl ContentHandlingStrategy
impl ContentHandlingStrategy
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
pub fn serialize_structure_crate_input_create_integration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateIntegrationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_43) = &input.connection_id {
object.key("connectionId").string(var_43.as_str());
}
if let Some(var_44) = &input.connection_type {
object.key("connectionType").string(var_44.as_str());
}
if let Some(var_45) = &input.content_handling_strategy {
object
.key("contentHandlingStrategy")
.string(var_45.as_str());
}
if let Some(var_46) = &input.credentials_arn {
object.key("credentialsArn").string(var_46.as_str());
}
if let Some(var_47) = &input.description {
object.key("description").string(var_47.as_str());
}
if let Some(var_48) = &input.integration_method {
object.key("integrationMethod").string(var_48.as_str());
}
if let Some(var_49) = &input.integration_subtype {
object.key("integrationSubtype").string(var_49.as_str());
}
if let Some(var_50) = &input.integration_type {
object.key("integrationType").string(var_50.as_str());
}
if let Some(var_51) = &input.integration_uri {
object.key("integrationUri").string(var_51.as_str());
}
if let Some(var_52) = &input.passthrough_behavior {
object.key("passthroughBehavior").string(var_52.as_str());
}
if let Some(var_53) = &input.payload_format_version {
object.key("payloadFormatVersion").string(var_53.as_str());
}
if let Some(var_54) = &input.request_parameters {
#[allow(unused_mut)]
let mut object_55 = object.key("requestParameters").start_object();
for (key_56, value_57) in var_54 {
{
object_55.key(key_56.as_str()).string(value_57.as_str());
}
}
object_55.finish();
}
if let Some(var_58) = &input.request_templates {
#[allow(unused_mut)]
let mut object_59 = object.key("requestTemplates").start_object();
for (key_60, value_61) in var_58 {
{
object_59.key(key_60.as_str()).string(value_61.as_str());
}
}
object_59.finish();
}
if let Some(var_62) = &input.response_parameters {
#[allow(unused_mut)]
let mut object_63 = object.key("responseParameters").start_object();
for (key_64, value_65) in var_62 {
{
#[allow(unused_mut)]
let mut object_66 = object_63.key(key_64.as_str()).start_object();
for (key_67, value_68) in value_65 {
{
object_66.key(key_67.as_str()).string(value_68.as_str());
}
}
object_66.finish();
}
}
object_63.finish();
}
if let Some(var_69) = &input.template_selection_expression {
object
.key("templateSelectionExpression")
.string(var_69.as_str());
}
if input.timeout_in_millis != 0 {
object.key("timeoutInMillis").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.timeout_in_millis).into()),
);
}
if let Some(var_70) = &input.tls_config {
#[allow(unused_mut)]
let mut object_71 = object.key("tlsConfig").start_object();
crate::json_ser::serialize_structure_crate_model_tls_config_input(&mut object_71, var_70)?;
object_71.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_integration_response_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateIntegrationResponseInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_72) = &input.content_handling_strategy {
object
.key("contentHandlingStrategy")
.string(var_72.as_str());
}
if let Some(var_73) = &input.integration_response_key {
object.key("integrationResponseKey").string(var_73.as_str());
}
if let Some(var_74) = &input.response_parameters {
#[allow(unused_mut)]
let mut object_75 = object.key("responseParameters").start_object();
for (key_76, value_77) in var_74 {
{
object_75.key(key_76.as_str()).string(value_77.as_str());
}
}
object_75.finish();
}
if let Some(var_78) = &input.response_templates {
#[allow(unused_mut)]
let mut object_79 = object.key("responseTemplates").start_object();
for (key_80, value_81) in var_78 {
{
object_79.key(key_80.as_str()).string(value_81.as_str());
}
}
object_79.finish();
}
if let Some(var_82) = &input.template_selection_expression {
object
.key("templateSelectionExpression")
.string(var_82.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_model_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateModelInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_83) = &input.content_type {
object.key("contentType").string(var_83.as_str());
}
if let Some(var_84) = &input.description {
object.key("description").string(var_84.as_str());
}
if let Some(var_85) = &input.name {
object.key("name").string(var_85.as_str());
}
if let Some(var_86) = &input.schema {
object.key("schema").string(var_86.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_route_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateRouteInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if input.api_key_required {
object.key("apiKeyRequired").boolean(input.api_key_required);
}
if let Some(var_87) = &input.authorization_scopes {
let mut array_88 = object.key("authorizationScopes").start_array();
for item_89 in var_87 {
{
array_88.value().string(item_89.as_str());
}
}
array_88.finish();
}
if let Some(var_90) = &input.authorization_type {
object.key("authorizationType").string(var_90.as_str());
}
if let Some(var_91) = &input.authorizer_id {
object.key("authorizerId").string(var_91.as_str());
}
if let Some(var_92) = &input.model_selection_expression {
object
.key("modelSelectionExpression")
.string(var_92.as_str());
}
if let Some(var_93) = &input.operation_name {
object.key("operationName").string(var_93.as_str());
}
if let Some(var_94) = &input.request_models {
#[allow(unused_mut)]
let mut object_95 = object.key("requestModels").start_object();
for (key_96, value_97) in var_94 {
{
object_95.key(key_96.as_str()).string(value_97.as_str());
}
}
object_95.finish();
}
if let Some(var_98) = &input.request_parameters {
#[allow(unused_mut)]
let mut object_99 = object.key("requestParameters").start_object();
for (key_100, value_101) in var_98 {
{
#[allow(unused_mut)]
let mut object_102 = object_99.key(key_100.as_str()).start_object();
crate::json_ser::serialize_structure_crate_model_parameter_constraints(
&mut object_102,
value_101,
)?;
object_102.finish();
}
}
object_99.finish();
}
if let Some(var_103) = &input.route_key {
object.key("routeKey").string(var_103.as_str());
}
if let Some(var_104) = &input.route_response_selection_expression {
object
.key("routeResponseSelectionExpression")
.string(var_104.as_str());
}
if let Some(var_105) = &input.target {
object.key("target").string(var_105.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_route_response_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateRouteResponseInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_106) = &input.model_selection_expression {
object
.key("modelSelectionExpression")
.string(var_106.as_str());
}
if let Some(var_107) = &input.response_models {
#[allow(unused_mut)]
let mut object_108 = object.key("responseModels").start_object();
for (key_109, value_110) in var_107 {
{
object_108.key(key_109.as_str()).string(value_110.as_str());
}
}
object_108.finish();
}
if let Some(var_111) = &input.response_parameters {
#[allow(unused_mut)]
let mut object_112 = object.key("responseParameters").start_object();
for (key_113, value_114) in var_111 {
{
#[allow(unused_mut)]
let mut object_115 = object_112.key(key_113.as_str()).start_object();
crate::json_ser::serialize_structure_crate_model_parameter_constraints(
&mut object_115,
value_114,
)?;
object_115.finish();
}
}
object_112.finish();
}
if let Some(var_116) = &input.route_response_key {
object.key("routeResponseKey").string(var_116.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_stage_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateStageInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_117) = &input.access_log_settings {
#[allow(unused_mut)]
let mut object_118 = object.key("accessLogSettings").start_object();
crate::json_ser::serialize_structure_crate_model_access_log_settings(
&mut object_118,
var_117,
)?;
object_118.finish();
}
if input.auto_deploy {
object.key("autoDeploy").boolean(input.auto_deploy);
}
if let Some(var_119) = &input.client_certificate_id {
object.key("clientCertificateId").string(var_119.as_str());
}
if let Some(var_120) = &input.default_route_settings {
#[allow(unused_mut)]
let mut object_121 = object.key("defaultRouteSettings").start_object();
crate::json_ser::serialize_structure_crate_model_route_settings(&mut object_121, var_120)?;
object_121.finish();
}
if let Some(var_122) = &input.deployment_id {
object.key("deploymentId").string(var_122.as_str());
}
if let Some(var_123) = &input.description {
object.key("description").string(var_123.as_str());
}
if let Some(var_124) = &input.route_settings {
#[allow(unused_mut)]
let mut object_125 = object.key("routeSettings").start_object();
for (key_126, value_127) in var_124 {
{
#[allow(unused_mut)]
let mut object_128 = object_125.key(key_126.as_str()).start_object();
crate::json_ser::serialize_structure_crate_model_route_settings(
&mut object_128,
value_127,
)?;
object_128.finish();
}
}
object_125.finish();
}
if let Some(var_129) = &input.stage_name {
object.key("stageName").string(var_129.as_str());
}
if let Some(var_130) = &input.stage_variables {
#[allow(unused_mut)]
let mut object_131 = object.key("stageVariables").start_object();
for (key_132, value_133) in var_130 {
{
object_131.key(key_132.as_str()).string(value_133.as_str());
}
}
object_131.finish();
}
if let Some(var_134) = &input.tags {
#[allow(unused_mut)]
let mut object_135 = object.key("tags").start_object();
for (key_136, value_137) in var_134 {
{
object_135.key(key_136.as_str()).string(value_137.as_str());
}
}
object_135.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_vpc_link_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateVpcLinkInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_138) = &input.name {
object.key("name").string(var_138.as_str());
}
if let Some(var_139) = &input.security_group_ids {
let mut array_140 = object.key("securityGroupIds").start_array();
for item_141 in var_139 {
{
array_140.value().string(item_141.as_str());
}
}
array_140.finish();
}
if let Some(var_142) = &input.subnet_ids {
let mut array_143 = object.key("subnetIds").start_array();
for item_144 in var_142 {
{
array_143.value().string(item_144.as_str());
}
}
array_143.finish();
}
if let Some(var_145) = &input.tags {
#[allow(unused_mut)]
let mut object_146 = object.key("tags").start_object();
for (key_147, value_148) in var_145 {
{
object_146.key(key_147.as_str()).string(value_148.as_str());
}
}
object_146.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_import_api_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ImportApiInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_149) = &input.body {
object.key("body").string(var_149.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_reimport_api_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::ReimportApiInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_150) = &input.body {
object.key("body").string(var_150.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_151) = &input.tags {
#[allow(unused_mut)]
let mut object_152 = object.key("tags").start_object();
for (key_153, value_154) in var_151 {
{
object_152.key(key_153.as_str()).string(value_154.as_str());
}
}
object_152.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_api_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateApiInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_155) = &input.api_key_selection_expression {
object
.key("apiKeySelectionExpression")
.string(var_155.as_str());
}
if let Some(var_156) = &input.cors_configuration {
#[allow(unused_mut)]
let mut object_157 = object.key("corsConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_cors(&mut object_157, var_156)?;
object_157.finish();
}
if let Some(var_158) = &input.credentials_arn {
object.key("credentialsArn").string(var_158.as_str());
}
if let Some(var_159) = &input.description {
object.key("description").string(var_159.as_str());
}
if input.disable_execute_api_endpoint {
object
.key("disableExecuteApiEndpoint")
.boolean(input.disable_execute_api_endpoint);
}
if input.disable_schema_validation {
object
.key("disableSchemaValidation")
.boolean(input.disable_schema_validation);
}
if let Some(var_160) = &input.name {
object.key("name").string(var_160.as_str());
}
if let Some(var_161) = &input.route_key {
object.key("routeKey").string(var_161.as_str());
}
if let Some(var_162) = &input.route_selection_expression {
object
.key("routeSelectionExpression")
.string(var_162.as_str());
}
if let Some(var_163) = &input.target {
object.key("target").string(var_163.as_str());
}
if let Some(var_164) = &input.version {
object.key("version").string(var_164.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_api_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateApiMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_165) = &input.api_id {
object.key("apiId").string(var_165.as_str());
}
if let Some(var_166) = &input.api_mapping_key {
object.key("apiMappingKey").string(var_166.as_str());
}
if let Some(var_167) = &input.stage {
object.key("stage").string(var_167.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_authorizer_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateAuthorizerInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_168) = &input.authorizer_credentials_arn {
object
.key("authorizerCredentialsArn")
.string(var_168.as_str());
}
if let Some(var_169) = &input.authorizer_payload_format_version {
object
.key("authorizerPayloadFormatVersion")
.string(var_169.as_str());
}
if input.authorizer_result_ttl_in_seconds != 0 {
object.key("authorizerResultTtlInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.authorizer_result_ttl_in_seconds).into()),
);
}
if let Some(var_170) = &input.authorizer_type {
object.key("authorizerType").string(var_170.as_str());
}
if let Some(var_171) = &input.authorizer_uri {
object.key("authorizerUri").string(var_171.as_str());
}
if input.enable_simple_responses {
object
.key("enableSimpleResponses")
.boolean(input.enable_simple_responses);
}
if let Some(var_172) = &input.identity_source {
let mut array_173 = object.key("identitySource").start_array();
for item_174 in var_172 {
{
array_173.value().string(item_174.as_str());
}
}
array_173.finish();
}
if let Some(var_175) = &input.identity_validation_expression {
object
.key("identityValidationExpression")
.string(var_175.as_str());
}
if let Some(var_176) = &input.jwt_configuration {
#[allow(unused_mut)]
let mut object_177 = object.key("jwtConfiguration").start_object();
crate::json_ser::serialize_structure_crate_model_jwt_configuration(
&mut object_177,
var_176,
)?;
object_177.finish();
}
if let Some(var_178) = &input.name {
object.key("name").string(var_178.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_deployment_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateDeploymentInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_179) = &input.description {
object.key("description").string(var_179.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_domain_name_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateDomainNameInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_180) = &input.domain_name_configurations {
let mut array_181 = object.key("domainNameConfigurations").start_array();
for item_182 in var_180 {
{
#[allow(unused_mut)]
let mut object_183 = array_181.value().start_object();
crate::json_ser::serialize_structure_crate_model_domain_name_configuration(
&mut object_183,
item_182,
)?;
object_183.finish();
}
}
array_181.finish();
}
if let Some(var_184) = &input.mutual_tls_authentication {
#[allow(unused_mut)]
let mut object_185 = object.key("mutualTlsAuthentication").start_object();
crate::json_ser::serialize_structure_crate_model_mutual_tls_authentication_input(
&mut object_185,
var_184,
)?;
object_185.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_integration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateIntegrationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_186) = &input.connection_id {
object.key("connectionId").string(var_186.as_str());
}
if let Some(var_187) = &input.connection_type {
object.key("connectionType").string(var_187.as_str());
}
if let Some(var_188) = &input.content_handling_strategy {
object
.key("contentHandlingStrategy")
.string(var_188.as_str());
}
if let Some(var_189) = &input.credentials_arn {
object.key("credentialsArn").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.integration_method {
object.key("integrationMethod").string(var_191.as_str());
}
if let Some(var_192) = &input.integration_subtype {
object.key("integrationSubtype").string(var_192.as_str());
}
if let Some(var_193) = &input.integration_type {
object.key("integrationType").string(var_193.as_str());
}
if let Some(var_194) = &input.integration_uri {
object.key("integrationUri").string(var_194.as_str());
}
if let Some(var_195) = &input.passthrough_behavior {
object.key("passthroughBehavior").string(var_195.as_str());
}
if let Some(var_196) = &input.payload_format_version {
object.key("payloadFormatVersion").string(var_196.as_str());
}
if let Some(var_197) = &input.request_parameters {
#[allow(unused_mut)]
let mut object_198 = object.key("requestParameters").start_object();
for (key_199, value_200) in var_197 {
{
object_198.key(key_199.as_str()).string(value_200.as_str());
}
}
object_198.finish();
}
if let Some(var_201) = &input.request_templates {
#[allow(unused_mut)]
let mut object_202 = object.key("requestTemplates").start_object();
for (key_203, value_204) in var_201 {
{
object_202.key(key_203.as_str()).string(value_204.as_str());
}
}
object_202.finish();
}
if let Some(var_205) = &input.response_parameters {
#[allow(unused_mut)]
let mut object_206 = object.key("responseParameters").start_object();
for (key_207, value_208) in var_205 {
{
#[allow(unused_mut)]
let mut object_209 = object_206.key(key_207.as_str()).start_object();
for (key_210, value_211) in value_208 {
{
object_209.key(key_210.as_str()).string(value_211.as_str());
}
}
object_209.finish();
}
}
object_206.finish();
}
if let Some(var_212) = &input.template_selection_expression {
object
.key("templateSelectionExpression")
.string(var_212.as_str());
}
if input.timeout_in_millis != 0 {
object.key("timeoutInMillis").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((input.timeout_in_millis).into()),
);
}
if let Some(var_213) = &input.tls_config {
#[allow(unused_mut)]
let mut object_214 = object.key("tlsConfig").start_object();
crate::json_ser::serialize_structure_crate_model_tls_config_input(
&mut object_214,
var_213,
)?;
object_214.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_integration_response_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateIntegrationResponseInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_215) = &input.content_handling_strategy {
object
.key("contentHandlingStrategy")
.string(var_215.as_str());
}
if let Some(var_216) = &input.integration_response_key {
object
.key("integrationResponseKey")
.string(var_216.as_str());
}
if let Some(var_217) = &input.response_parameters {
#[allow(unused_mut)]
let mut object_218 = object.key("responseParameters").start_object();
for (key_219, value_220) in var_217 {
{
object_218.key(key_219.as_str()).string(value_220.as_str());
}
}
object_218.finish();
}
if let Some(var_221) = &input.response_templates {
#[allow(unused_mut)]
let mut object_222 = object.key("responseTemplates").start_object();
for (key_223, value_224) in var_221 {
{
object_222.key(key_223.as_str()).string(value_224.as_str());
}
}
object_222.finish();
}
if let Some(var_225) = &input.template_selection_expression {
object
.key("templateSelectionExpression")
.string(var_225.as_str());
}
Ok(())
}Trait Implementations§
source§impl AsRef<str> for ContentHandlingStrategy
impl AsRef<str> for ContentHandlingStrategy
source§impl Clone for ContentHandlingStrategy
impl Clone for ContentHandlingStrategy
source§fn clone(&self) -> ContentHandlingStrategy
fn clone(&self) -> ContentHandlingStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ContentHandlingStrategy
impl Debug for ContentHandlingStrategy
source§impl From<&str> for ContentHandlingStrategy
impl From<&str> for ContentHandlingStrategy
source§impl FromStr for ContentHandlingStrategy
impl FromStr for ContentHandlingStrategy
source§impl Hash for ContentHandlingStrategy
impl Hash for ContentHandlingStrategy
source§impl Ord for ContentHandlingStrategy
impl Ord for ContentHandlingStrategy
source§fn cmp(&self, other: &ContentHandlingStrategy) -> Ordering
fn cmp(&self, other: &ContentHandlingStrategy) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<ContentHandlingStrategy> for ContentHandlingStrategy
impl PartialEq<ContentHandlingStrategy> for ContentHandlingStrategy
source§fn eq(&self, other: &ContentHandlingStrategy) -> bool
fn eq(&self, other: &ContentHandlingStrategy) -> bool
source§impl PartialOrd<ContentHandlingStrategy> for ContentHandlingStrategy
impl PartialOrd<ContentHandlingStrategy> for ContentHandlingStrategy
source§fn partial_cmp(&self, other: &ContentHandlingStrategy) -> Option<Ordering>
fn partial_cmp(&self, other: &ContentHandlingStrategy) -> 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 ContentHandlingStrategy
impl StructuralEq for ContentHandlingStrategy
impl StructuralPartialEq for ContentHandlingStrategy
Auto Trait Implementations§
impl RefUnwindSafe for ContentHandlingStrategy
impl Send for ContentHandlingStrategy
impl Sync for ContentHandlingStrategy
impl Unpin for ContentHandlingStrategy
impl UnwindSafe for ContentHandlingStrategy
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.