Enum aws_sdk_lambda::model::FunctionUrlAuthType
source · #[non_exhaustive]
pub enum FunctionUrlAuthType {
AwsIam,
None,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against FunctionUrlAuthType
, 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 functionurlauthtype = unimplemented!();
match functionurlauthtype {
FunctionUrlAuthType::AwsIam => { /* ... */ },
FunctionUrlAuthType::None => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when functionurlauthtype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant FunctionUrlAuthType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
FunctionUrlAuthType::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 FunctionUrlAuthType::NewFeature
is defined.
Specifically, when functionurlauthtype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on FunctionUrlAuthType::NewFeature
also yielding "NewFeature"
.
Explicitly matching on the Unknown
variant should
be avoided for two reasons:
- The inner data
UnknownVariantValue
is opaque, and no further information can be extracted. - It might inadvertently shadow other intended match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AwsIam
None
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl FunctionUrlAuthType
impl FunctionUrlAuthType
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
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877
pub fn serialize_structure_crate_input_add_permission_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::AddPermissionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_5) = &input.action {
object.key("Action").string(var_5.as_str());
}
if let Some(var_6) = &input.event_source_token {
object.key("EventSourceToken").string(var_6.as_str());
}
if let Some(var_7) = &input.function_url_auth_type {
object.key("FunctionUrlAuthType").string(var_7.as_str());
}
if let Some(var_8) = &input.principal {
object.key("Principal").string(var_8.as_str());
}
if let Some(var_9) = &input.principal_org_id {
object.key("PrincipalOrgID").string(var_9.as_str());
}
if let Some(var_10) = &input.revision_id {
object.key("RevisionId").string(var_10.as_str());
}
if let Some(var_11) = &input.source_account {
object.key("SourceAccount").string(var_11.as_str());
}
if let Some(var_12) = &input.source_arn {
object.key("SourceArn").string(var_12.as_str());
}
if let Some(var_13) = &input.statement_id {
object.key("StatementId").string(var_13.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_alias_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateAliasInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_14) = &input.description {
object.key("Description").string(var_14.as_str());
}
if let Some(var_15) = &input.function_version {
object.key("FunctionVersion").string(var_15.as_str());
}
if let Some(var_16) = &input.name {
object.key("Name").string(var_16.as_str());
}
if let Some(var_17) = &input.routing_config {
#[allow(unused_mut)]
let mut object_18 = object.key("RoutingConfig").start_object();
crate::json_ser::serialize_structure_crate_model_alias_routing_configuration(
&mut object_18,
var_17,
)?;
object_18.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_code_signing_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateCodeSigningConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_19) = &input.allowed_publishers {
#[allow(unused_mut)]
let mut object_20 = object.key("AllowedPublishers").start_object();
crate::json_ser::serialize_structure_crate_model_allowed_publishers(
&mut object_20,
var_19,
)?;
object_20.finish();
}
if let Some(var_21) = &input.code_signing_policies {
#[allow(unused_mut)]
let mut object_22 = object.key("CodeSigningPolicies").start_object();
crate::json_ser::serialize_structure_crate_model_code_signing_policies(
&mut object_22,
var_21,
)?;
object_22.finish();
}
if let Some(var_23) = &input.description {
object.key("Description").string(var_23.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_create_event_source_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateEventSourceMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_24) = &input.amazon_managed_kafka_event_source_config {
#[allow(unused_mut)]
let mut object_25 = object
.key("AmazonManagedKafkaEventSourceConfig")
.start_object();
crate::json_ser::serialize_structure_crate_model_amazon_managed_kafka_event_source_config(
&mut object_25,
var_24,
)?;
object_25.finish();
}
if let Some(var_26) = &input.batch_size {
object.key("BatchSize").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_26).into()),
);
}
if let Some(var_27) = &input.bisect_batch_on_function_error {
object.key("BisectBatchOnFunctionError").boolean(*var_27);
}
if let Some(var_28) = &input.destination_config {
#[allow(unused_mut)]
let mut object_29 = object.key("DestinationConfig").start_object();
crate::json_ser::serialize_structure_crate_model_destination_config(
&mut object_29,
var_28,
)?;
object_29.finish();
}
if let Some(var_30) = &input.enabled {
object.key("Enabled").boolean(*var_30);
}
if let Some(var_31) = &input.event_source_arn {
object.key("EventSourceArn").string(var_31.as_str());
}
if let Some(var_32) = &input.filter_criteria {
#[allow(unused_mut)]
let mut object_33 = object.key("FilterCriteria").start_object();
crate::json_ser::serialize_structure_crate_model_filter_criteria(&mut object_33, var_32)?;
object_33.finish();
}
if let Some(var_34) = &input.function_name {
object.key("FunctionName").string(var_34.as_str());
}
if let Some(var_35) = &input.function_response_types {
let mut array_36 = object.key("FunctionResponseTypes").start_array();
for item_37 in var_35 {
{
array_36.value().string(item_37.as_str());
}
}
array_36.finish();
}
if let Some(var_38) = &input.maximum_batching_window_in_seconds {
object.key("MaximumBatchingWindowInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_38).into()),
);
}
if let Some(var_39) = &input.maximum_record_age_in_seconds {
object.key("MaximumRecordAgeInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_39).into()),
);
}
if let Some(var_40) = &input.maximum_retry_attempts {
object.key("MaximumRetryAttempts").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_40).into()),
);
}
if let Some(var_41) = &input.parallelization_factor {
object.key("ParallelizationFactor").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_41).into()),
);
}
if let Some(var_42) = &input.queues {
let mut array_43 = object.key("Queues").start_array();
for item_44 in var_42 {
{
array_43.value().string(item_44.as_str());
}
}
array_43.finish();
}
if let Some(var_45) = &input.self_managed_event_source {
#[allow(unused_mut)]
let mut object_46 = object.key("SelfManagedEventSource").start_object();
crate::json_ser::serialize_structure_crate_model_self_managed_event_source(
&mut object_46,
var_45,
)?;
object_46.finish();
}
if let Some(var_47) = &input.self_managed_kafka_event_source_config {
#[allow(unused_mut)]
let mut object_48 = object
.key("SelfManagedKafkaEventSourceConfig")
.start_object();
crate::json_ser::serialize_structure_crate_model_self_managed_kafka_event_source_config(
&mut object_48,
var_47,
)?;
object_48.finish();
}
if let Some(var_49) = &input.source_access_configurations {
let mut array_50 = object.key("SourceAccessConfigurations").start_array();
for item_51 in var_49 {
{
#[allow(unused_mut)]
let mut object_52 = array_50.value().start_object();
crate::json_ser::serialize_structure_crate_model_source_access_configuration(
&mut object_52,
item_51,
)?;
object_52.finish();
}
}
array_50.finish();
}
if let Some(var_53) = &input.starting_position {
object.key("StartingPosition").string(var_53.as_str());
}
if let Some(var_54) = &input.starting_position_timestamp {
object
.key("StartingPositionTimestamp")
.date_time(var_54, aws_smithy_types::date_time::Format::EpochSeconds)?;
}
if let Some(var_55) = &input.topics {
let mut array_56 = object.key("Topics").start_array();
for item_57 in var_55 {
{
array_56.value().string(item_57.as_str());
}
}
array_56.finish();
}
if let Some(var_58) = &input.tumbling_window_in_seconds {
object.key("TumblingWindowInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_58).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_create_function_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateFunctionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_59) = &input.architectures {
let mut array_60 = object.key("Architectures").start_array();
for item_61 in var_59 {
{
array_60.value().string(item_61.as_str());
}
}
array_60.finish();
}
if let Some(var_62) = &input.code {
#[allow(unused_mut)]
let mut object_63 = object.key("Code").start_object();
crate::json_ser::serialize_structure_crate_model_function_code(&mut object_63, var_62)?;
object_63.finish();
}
if let Some(var_64) = &input.code_signing_config_arn {
object.key("CodeSigningConfigArn").string(var_64.as_str());
}
if let Some(var_65) = &input.dead_letter_config {
#[allow(unused_mut)]
let mut object_66 = object.key("DeadLetterConfig").start_object();
crate::json_ser::serialize_structure_crate_model_dead_letter_config(
&mut object_66,
var_65,
)?;
object_66.finish();
}
if let Some(var_67) = &input.description {
object.key("Description").string(var_67.as_str());
}
if let Some(var_68) = &input.environment {
#[allow(unused_mut)]
let mut object_69 = object.key("Environment").start_object();
crate::json_ser::serialize_structure_crate_model_environment(&mut object_69, var_68)?;
object_69.finish();
}
if let Some(var_70) = &input.ephemeral_storage {
#[allow(unused_mut)]
let mut object_71 = object.key("EphemeralStorage").start_object();
crate::json_ser::serialize_structure_crate_model_ephemeral_storage(&mut object_71, var_70)?;
object_71.finish();
}
if let Some(var_72) = &input.file_system_configs {
let mut array_73 = object.key("FileSystemConfigs").start_array();
for item_74 in var_72 {
{
#[allow(unused_mut)]
let mut object_75 = array_73.value().start_object();
crate::json_ser::serialize_structure_crate_model_file_system_config(
&mut object_75,
item_74,
)?;
object_75.finish();
}
}
array_73.finish();
}
if let Some(var_76) = &input.function_name {
object.key("FunctionName").string(var_76.as_str());
}
if let Some(var_77) = &input.handler {
object.key("Handler").string(var_77.as_str());
}
if let Some(var_78) = &input.image_config {
#[allow(unused_mut)]
let mut object_79 = object.key("ImageConfig").start_object();
crate::json_ser::serialize_structure_crate_model_image_config(&mut object_79, var_78)?;
object_79.finish();
}
if let Some(var_80) = &input.kms_key_arn {
object.key("KMSKeyArn").string(var_80.as_str());
}
if let Some(var_81) = &input.layers {
let mut array_82 = object.key("Layers").start_array();
for item_83 in var_81 {
{
array_82.value().string(item_83.as_str());
}
}
array_82.finish();
}
if let Some(var_84) = &input.memory_size {
object.key("MemorySize").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_84).into()),
);
}
if let Some(var_85) = &input.package_type {
object.key("PackageType").string(var_85.as_str());
}
if input.publish {
object.key("Publish").boolean(input.publish);
}
if let Some(var_86) = &input.role {
object.key("Role").string(var_86.as_str());
}
if let Some(var_87) = &input.runtime {
object.key("Runtime").string(var_87.as_str());
}
if let Some(var_88) = &input.tags {
#[allow(unused_mut)]
let mut object_89 = object.key("Tags").start_object();
for (key_90, value_91) in var_88 {
{
object_89.key(key_90.as_str()).string(value_91.as_str());
}
}
object_89.finish();
}
if let Some(var_92) = &input.timeout {
object.key("Timeout").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_92).into()),
);
}
if let Some(var_93) = &input.tracing_config {
#[allow(unused_mut)]
let mut object_94 = object.key("TracingConfig").start_object();
crate::json_ser::serialize_structure_crate_model_tracing_config(&mut object_94, var_93)?;
object_94.finish();
}
if let Some(var_95) = &input.vpc_config {
#[allow(unused_mut)]
let mut object_96 = object.key("VpcConfig").start_object();
crate::json_ser::serialize_structure_crate_model_vpc_config(&mut object_96, var_95)?;
object_96.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_create_function_url_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::CreateFunctionUrlConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_97) = &input.auth_type {
object.key("AuthType").string(var_97.as_str());
}
if let Some(var_98) = &input.cors {
#[allow(unused_mut)]
let mut object_99 = object.key("Cors").start_object();
crate::json_ser::serialize_structure_crate_model_cors(&mut object_99, var_98)?;
object_99.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_publish_layer_version_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PublishLayerVersionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_100) = &input.compatible_architectures {
let mut array_101 = object.key("CompatibleArchitectures").start_array();
for item_102 in var_100 {
{
array_101.value().string(item_102.as_str());
}
}
array_101.finish();
}
if let Some(var_103) = &input.compatible_runtimes {
let mut array_104 = object.key("CompatibleRuntimes").start_array();
for item_105 in var_103 {
{
array_104.value().string(item_105.as_str());
}
}
array_104.finish();
}
if let Some(var_106) = &input.content {
#[allow(unused_mut)]
let mut object_107 = object.key("Content").start_object();
crate::json_ser::serialize_structure_crate_model_layer_version_content_input(
&mut object_107,
var_106,
)?;
object_107.finish();
}
if let Some(var_108) = &input.description {
object.key("Description").string(var_108.as_str());
}
if let Some(var_109) = &input.license_info {
object.key("LicenseInfo").string(var_109.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_publish_version_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PublishVersionInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_110) = &input.code_sha256 {
object.key("CodeSha256").string(var_110.as_str());
}
if let Some(var_111) = &input.description {
object.key("Description").string(var_111.as_str());
}
if let Some(var_112) = &input.revision_id {
object.key("RevisionId").string(var_112.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_put_function_code_signing_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutFunctionCodeSigningConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_113) = &input.code_signing_config_arn {
object.key("CodeSigningConfigArn").string(var_113.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_put_function_concurrency_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutFunctionConcurrencyInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_114) = &input.reserved_concurrent_executions {
object.key("ReservedConcurrentExecutions").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_114).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_put_function_event_invoke_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutFunctionEventInvokeConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_115) = &input.destination_config {
#[allow(unused_mut)]
let mut object_116 = object.key("DestinationConfig").start_object();
crate::json_ser::serialize_structure_crate_model_destination_config(
&mut object_116,
var_115,
)?;
object_116.finish();
}
if let Some(var_117) = &input.maximum_event_age_in_seconds {
object.key("MaximumEventAgeInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_117).into()),
);
}
if let Some(var_118) = &input.maximum_retry_attempts {
object.key("MaximumRetryAttempts").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_118).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_put_provisioned_concurrency_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::PutProvisionedConcurrencyConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_119) = &input.provisioned_concurrent_executions {
object.key("ProvisionedConcurrentExecutions").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_119).into()),
);
}
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_120) = &input.tags {
#[allow(unused_mut)]
let mut object_121 = object.key("Tags").start_object();
for (key_122, value_123) in var_120 {
{
object_121.key(key_122.as_str()).string(value_123.as_str());
}
}
object_121.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_alias_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateAliasInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_124) = &input.description {
object.key("Description").string(var_124.as_str());
}
if let Some(var_125) = &input.function_version {
object.key("FunctionVersion").string(var_125.as_str());
}
if let Some(var_126) = &input.revision_id {
object.key("RevisionId").string(var_126.as_str());
}
if let Some(var_127) = &input.routing_config {
#[allow(unused_mut)]
let mut object_128 = object.key("RoutingConfig").start_object();
crate::json_ser::serialize_structure_crate_model_alias_routing_configuration(
&mut object_128,
var_127,
)?;
object_128.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_code_signing_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateCodeSigningConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_129) = &input.allowed_publishers {
#[allow(unused_mut)]
let mut object_130 = object.key("AllowedPublishers").start_object();
crate::json_ser::serialize_structure_crate_model_allowed_publishers(
&mut object_130,
var_129,
)?;
object_130.finish();
}
if let Some(var_131) = &input.code_signing_policies {
#[allow(unused_mut)]
let mut object_132 = object.key("CodeSigningPolicies").start_object();
crate::json_ser::serialize_structure_crate_model_code_signing_policies(
&mut object_132,
var_131,
)?;
object_132.finish();
}
if let Some(var_133) = &input.description {
object.key("Description").string(var_133.as_str());
}
Ok(())
}
pub fn serialize_structure_crate_input_update_event_source_mapping_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateEventSourceMappingInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_134) = &input.batch_size {
object.key("BatchSize").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_134).into()),
);
}
if let Some(var_135) = &input.bisect_batch_on_function_error {
object.key("BisectBatchOnFunctionError").boolean(*var_135);
}
if let Some(var_136) = &input.destination_config {
#[allow(unused_mut)]
let mut object_137 = object.key("DestinationConfig").start_object();
crate::json_ser::serialize_structure_crate_model_destination_config(
&mut object_137,
var_136,
)?;
object_137.finish();
}
if let Some(var_138) = &input.enabled {
object.key("Enabled").boolean(*var_138);
}
if let Some(var_139) = &input.filter_criteria {
#[allow(unused_mut)]
let mut object_140 = object.key("FilterCriteria").start_object();
crate::json_ser::serialize_structure_crate_model_filter_criteria(&mut object_140, var_139)?;
object_140.finish();
}
if let Some(var_141) = &input.function_name {
object.key("FunctionName").string(var_141.as_str());
}
if let Some(var_142) = &input.function_response_types {
let mut array_143 = object.key("FunctionResponseTypes").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.maximum_batching_window_in_seconds {
object.key("MaximumBatchingWindowInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_145).into()),
);
}
if let Some(var_146) = &input.maximum_record_age_in_seconds {
object.key("MaximumRecordAgeInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_146).into()),
);
}
if let Some(var_147) = &input.maximum_retry_attempts {
object.key("MaximumRetryAttempts").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_147).into()),
);
}
if let Some(var_148) = &input.parallelization_factor {
object.key("ParallelizationFactor").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_148).into()),
);
}
if let Some(var_149) = &input.source_access_configurations {
let mut array_150 = object.key("SourceAccessConfigurations").start_array();
for item_151 in var_149 {
{
#[allow(unused_mut)]
let mut object_152 = array_150.value().start_object();
crate::json_ser::serialize_structure_crate_model_source_access_configuration(
&mut object_152,
item_151,
)?;
object_152.finish();
}
}
array_150.finish();
}
if let Some(var_153) = &input.tumbling_window_in_seconds {
object.key("TumblingWindowInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_153).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_function_code_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateFunctionCodeInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_154) = &input.architectures {
let mut array_155 = object.key("Architectures").start_array();
for item_156 in var_154 {
{
array_155.value().string(item_156.as_str());
}
}
array_155.finish();
}
if input.dry_run {
object.key("DryRun").boolean(input.dry_run);
}
if let Some(var_157) = &input.image_uri {
object.key("ImageUri").string(var_157.as_str());
}
if input.publish {
object.key("Publish").boolean(input.publish);
}
if let Some(var_158) = &input.revision_id {
object.key("RevisionId").string(var_158.as_str());
}
if let Some(var_159) = &input.s3_bucket {
object.key("S3Bucket").string(var_159.as_str());
}
if let Some(var_160) = &input.s3_key {
object.key("S3Key").string(var_160.as_str());
}
if let Some(var_161) = &input.s3_object_version {
object.key("S3ObjectVersion").string(var_161.as_str());
}
if let Some(var_162) = &input.zip_file {
object
.key("ZipFile")
.string_unchecked(&aws_smithy_types::base64::encode(var_162));
}
Ok(())
}
pub fn serialize_structure_crate_input_update_function_configuration_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateFunctionConfigurationInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_163) = &input.dead_letter_config {
#[allow(unused_mut)]
let mut object_164 = object.key("DeadLetterConfig").start_object();
crate::json_ser::serialize_structure_crate_model_dead_letter_config(
&mut object_164,
var_163,
)?;
object_164.finish();
}
if let Some(var_165) = &input.description {
object.key("Description").string(var_165.as_str());
}
if let Some(var_166) = &input.environment {
#[allow(unused_mut)]
let mut object_167 = object.key("Environment").start_object();
crate::json_ser::serialize_structure_crate_model_environment(&mut object_167, var_166)?;
object_167.finish();
}
if let Some(var_168) = &input.ephemeral_storage {
#[allow(unused_mut)]
let mut object_169 = object.key("EphemeralStorage").start_object();
crate::json_ser::serialize_structure_crate_model_ephemeral_storage(
&mut object_169,
var_168,
)?;
object_169.finish();
}
if let Some(var_170) = &input.file_system_configs {
let mut array_171 = object.key("FileSystemConfigs").start_array();
for item_172 in var_170 {
{
#[allow(unused_mut)]
let mut object_173 = array_171.value().start_object();
crate::json_ser::serialize_structure_crate_model_file_system_config(
&mut object_173,
item_172,
)?;
object_173.finish();
}
}
array_171.finish();
}
if let Some(var_174) = &input.handler {
object.key("Handler").string(var_174.as_str());
}
if let Some(var_175) = &input.image_config {
#[allow(unused_mut)]
let mut object_176 = object.key("ImageConfig").start_object();
crate::json_ser::serialize_structure_crate_model_image_config(&mut object_176, var_175)?;
object_176.finish();
}
if let Some(var_177) = &input.kms_key_arn {
object.key("KMSKeyArn").string(var_177.as_str());
}
if let Some(var_178) = &input.layers {
let mut array_179 = object.key("Layers").start_array();
for item_180 in var_178 {
{
array_179.value().string(item_180.as_str());
}
}
array_179.finish();
}
if let Some(var_181) = &input.memory_size {
object.key("MemorySize").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_181).into()),
);
}
if let Some(var_182) = &input.revision_id {
object.key("RevisionId").string(var_182.as_str());
}
if let Some(var_183) = &input.role {
object.key("Role").string(var_183.as_str());
}
if let Some(var_184) = &input.runtime {
object.key("Runtime").string(var_184.as_str());
}
if let Some(var_185) = &input.timeout {
object.key("Timeout").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_185).into()),
);
}
if let Some(var_186) = &input.tracing_config {
#[allow(unused_mut)]
let mut object_187 = object.key("TracingConfig").start_object();
crate::json_ser::serialize_structure_crate_model_tracing_config(&mut object_187, var_186)?;
object_187.finish();
}
if let Some(var_188) = &input.vpc_config {
#[allow(unused_mut)]
let mut object_189 = object.key("VpcConfig").start_object();
crate::json_ser::serialize_structure_crate_model_vpc_config(&mut object_189, var_188)?;
object_189.finish();
}
Ok(())
}
pub fn serialize_structure_crate_input_update_function_event_invoke_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateFunctionEventInvokeConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_190) = &input.destination_config {
#[allow(unused_mut)]
let mut object_191 = object.key("DestinationConfig").start_object();
crate::json_ser::serialize_structure_crate_model_destination_config(
&mut object_191,
var_190,
)?;
object_191.finish();
}
if let Some(var_192) = &input.maximum_event_age_in_seconds {
object.key("MaximumEventAgeInSeconds").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_192).into()),
);
}
if let Some(var_193) = &input.maximum_retry_attempts {
object.key("MaximumRetryAttempts").number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_193).into()),
);
}
Ok(())
}
pub fn serialize_structure_crate_input_update_function_url_config_input(
object: &mut aws_smithy_json::serialize::JsonObjectWriter,
input: &crate::input::UpdateFunctionUrlConfigInput,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
if let Some(var_194) = &input.auth_type {
object.key("AuthType").string(var_194.as_str());
}
if let Some(var_195) = &input.cors {
#[allow(unused_mut)]
let mut object_196 = object.key("Cors").start_object();
crate::json_ser::serialize_structure_crate_model_cors(&mut object_196, var_195)?;
object_196.finish();
}
Ok(())
}
Trait Implementations§
source§impl AsRef<str> for FunctionUrlAuthType
impl AsRef<str> for FunctionUrlAuthType
source§impl Clone for FunctionUrlAuthType
impl Clone for FunctionUrlAuthType
source§fn clone(&self) -> FunctionUrlAuthType
fn clone(&self) -> FunctionUrlAuthType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FunctionUrlAuthType
impl Debug for FunctionUrlAuthType
source§impl From<&str> for FunctionUrlAuthType
impl From<&str> for FunctionUrlAuthType
source§impl FromStr for FunctionUrlAuthType
impl FromStr for FunctionUrlAuthType
source§impl Hash for FunctionUrlAuthType
impl Hash for FunctionUrlAuthType
source§impl Ord for FunctionUrlAuthType
impl Ord for FunctionUrlAuthType
source§fn cmp(&self, other: &FunctionUrlAuthType) -> Ordering
fn cmp(&self, other: &FunctionUrlAuthType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<FunctionUrlAuthType> for FunctionUrlAuthType
impl PartialEq<FunctionUrlAuthType> for FunctionUrlAuthType
source§fn eq(&self, other: &FunctionUrlAuthType) -> bool
fn eq(&self, other: &FunctionUrlAuthType) -> bool
source§impl PartialOrd<FunctionUrlAuthType> for FunctionUrlAuthType
impl PartialOrd<FunctionUrlAuthType> for FunctionUrlAuthType
source§fn partial_cmp(&self, other: &FunctionUrlAuthType) -> Option<Ordering>
fn partial_cmp(&self, other: &FunctionUrlAuthType) -> 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 FunctionUrlAuthType
impl StructuralEq for FunctionUrlAuthType
impl StructuralPartialEq for FunctionUrlAuthType
Auto Trait Implementations§
impl RefUnwindSafe for FunctionUrlAuthType
impl Send for FunctionUrlAuthType
impl Sync for FunctionUrlAuthType
impl Unpin for FunctionUrlAuthType
impl UnwindSafe for FunctionUrlAuthType
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.