#[non_exhaustive]
pub enum HostnameType {
    IpName,
    ResourceName,
    Unknown(UnknownVariantValue),
}
Expand description

When writing a match expression against HostnameType, 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 hostnametype = unimplemented!();
match hostnametype {
    HostnameType::IpName => { /* ... */ },
    HostnameType::ResourceName => { /* ... */ },
    other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
    _ => { /* ... */ },
}

The above code demonstrates that when hostnametype represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant HostnameType::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to HostnameType::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 HostnameType::NewFeature is defined. Specifically, when hostnametype represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on HostnameType::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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

IpName

§

ResourceName

§

Unknown(UnknownVariantValue)

Unknown contains new variants that have been added since this code was generated.

Implementations§

Returns the &str value of the enum member.

Examples found in repository?
src/model.rs (line 10806)
10805
10806
10807
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/query_ser.rs (line 3590)
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
pub fn serialize_structure_crate_model_private_dns_name_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::PrivateDnsNameOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1029 = writer.prefix("HostnameType");
    if let Some(var_1030) = &input.hostname_type {
        scope_1029.string(var_1030.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1031 = writer.prefix("EnableResourceNameDnsARecord");
    if let Some(var_1032) = &input.enable_resource_name_dns_a_record {
        scope_1031.boolean(*var_1032);
    }
    #[allow(unused_mut)]
    let mut scope_1033 = writer.prefix("EnableResourceNameDnsAAAARecord");
    if let Some(var_1034) = &input.enable_resource_name_dns_aaaa_record {
        scope_1033.boolean(*var_1034);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_maintenance_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::InstanceMaintenanceOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1035 = writer.prefix("AutoRecovery");
    if let Some(var_1036) = &input.auto_recovery {
        scope_1035.string(var_1036.as_str());
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_launch_specification(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::ScheduledInstancesLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1037 = writer.prefix("BlockDeviceMapping");
    if let Some(var_1038) = &input.block_device_mappings {
        let mut list_1040 = scope_1037.start_list(true, Some("BlockDeviceMapping"));
        for item_1039 in var_1038 {
            #[allow(unused_mut)]
            let mut entry_1041 = list_1040.entry();
            crate::query_ser::serialize_structure_crate_model_scheduled_instances_block_device_mapping(entry_1041, item_1039)?;
        }
        list_1040.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1042 = writer.prefix("EbsOptimized");
    if let Some(var_1043) = &input.ebs_optimized {
        scope_1042.boolean(*var_1043);
    }
    #[allow(unused_mut)]
    let mut scope_1044 = writer.prefix("IamInstanceProfile");
    if let Some(var_1045) = &input.iam_instance_profile {
        crate::query_ser::serialize_structure_crate_model_scheduled_instances_iam_instance_profile(
            scope_1044, var_1045,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_1046 = writer.prefix("ImageId");
    if let Some(var_1047) = &input.image_id {
        scope_1046.string(var_1047);
    }
    #[allow(unused_mut)]
    let mut scope_1048 = writer.prefix("InstanceType");
    if let Some(var_1049) = &input.instance_type {
        scope_1048.string(var_1049);
    }
    #[allow(unused_mut)]
    let mut scope_1050 = writer.prefix("KernelId");
    if let Some(var_1051) = &input.kernel_id {
        scope_1050.string(var_1051);
    }
    #[allow(unused_mut)]
    let mut scope_1052 = writer.prefix("KeyName");
    if let Some(var_1053) = &input.key_name {
        scope_1052.string(var_1053);
    }
    #[allow(unused_mut)]
    let mut scope_1054 = writer.prefix("Monitoring");
    if let Some(var_1055) = &input.monitoring {
        crate::query_ser::serialize_structure_crate_model_scheduled_instances_monitoring(
            scope_1054, var_1055,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_1056 = writer.prefix("NetworkInterface");
    if let Some(var_1057) = &input.network_interfaces {
        let mut list_1059 = scope_1056.start_list(true, Some("NetworkInterface"));
        for item_1058 in var_1057 {
            #[allow(unused_mut)]
            let mut entry_1060 = list_1059.entry();
            crate::query_ser::serialize_structure_crate_model_scheduled_instances_network_interface(entry_1060, item_1058)?;
        }
        list_1059.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1061 = writer.prefix("Placement");
    if let Some(var_1062) = &input.placement {
        crate::query_ser::serialize_structure_crate_model_scheduled_instances_placement(
            scope_1061, var_1062,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_1063 = writer.prefix("RamdiskId");
    if let Some(var_1064) = &input.ramdisk_id {
        scope_1063.string(var_1064);
    }
    #[allow(unused_mut)]
    let mut scope_1065 = writer.prefix("SecurityGroupId");
    if let Some(var_1066) = &input.security_group_ids {
        let mut list_1068 = scope_1065.start_list(true, Some("SecurityGroupId"));
        for item_1067 in var_1066 {
            #[allow(unused_mut)]
            let mut entry_1069 = list_1068.entry();
            entry_1069.string(item_1067);
        }
        list_1068.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1070 = writer.prefix("SubnetId");
    if let Some(var_1071) = &input.subnet_id {
        scope_1070.string(var_1071);
    }
    #[allow(unused_mut)]
    let mut scope_1072 = writer.prefix("UserData");
    if let Some(var_1073) = &input.user_data {
        scope_1072.string(var_1073);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_description(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::SecurityGroupRuleDescription,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1074 = writer.prefix("SecurityGroupRuleId");
    if let Some(var_1075) = &input.security_group_rule_id {
        scope_1074.string(var_1075);
    }
    #[allow(unused_mut)]
    let mut scope_1076 = writer.prefix("Description");
    if let Some(var_1077) = &input.description {
        scope_1076.string(var_1077);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ip_range(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::IpRange,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1078 = writer.prefix("CidrIp");
    if let Some(var_1079) = &input.cidr_ip {
        scope_1078.string(var_1079);
    }
    #[allow(unused_mut)]
    let mut scope_1080 = writer.prefix("Description");
    if let Some(var_1081) = &input.description {
        scope_1080.string(var_1081);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipv6_range(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::Ipv6Range,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1082 = writer.prefix("CidrIpv6");
    if let Some(var_1083) = &input.cidr_ipv6 {
        scope_1082.string(var_1083);
    }
    #[allow(unused_mut)]
    let mut scope_1084 = writer.prefix("Description");
    if let Some(var_1085) = &input.description {
        scope_1084.string(var_1085);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_prefix_list_id(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::PrefixListId,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1086 = writer.prefix("Description");
    if let Some(var_1087) = &input.description {
        scope_1086.string(var_1087);
    }
    #[allow(unused_mut)]
    let mut scope_1088 = writer.prefix("PrefixListId");
    if let Some(var_1089) = &input.prefix_list_id {
        scope_1088.string(var_1089);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_user_id_group_pair(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::UserIdGroupPair,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1090 = writer.prefix("Description");
    if let Some(var_1091) = &input.description {
        scope_1090.string(var_1091);
    }
    #[allow(unused_mut)]
    let mut scope_1092 = writer.prefix("GroupId");
    if let Some(var_1093) = &input.group_id {
        scope_1092.string(var_1093);
    }
    #[allow(unused_mut)]
    let mut scope_1094 = writer.prefix("GroupName");
    if let Some(var_1095) = &input.group_name {
        scope_1094.string(var_1095);
    }
    #[allow(unused_mut)]
    let mut scope_1096 = writer.prefix("PeeringStatus");
    if let Some(var_1097) = &input.peering_status {
        scope_1096.string(var_1097);
    }
    #[allow(unused_mut)]
    let mut scope_1098 = writer.prefix("UserId");
    if let Some(var_1099) = &input.user_id {
        scope_1098.string(var_1099);
    }
    #[allow(unused_mut)]
    let mut scope_1100 = writer.prefix("VpcId");
    if let Some(var_1101) = &input.vpc_id {
        scope_1100.string(var_1101);
    }
    #[allow(unused_mut)]
    let mut scope_1102 = writer.prefix("VpcPeeringConnectionId");
    if let Some(var_1103) = &input.vpc_peering_connection_id {
        scope_1102.string(var_1103);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_s3_storage(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::S3Storage,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1104 = writer.prefix("AWSAccessKeyId");
    if let Some(var_1105) = &input.aws_access_key_id {
        scope_1104.string(var_1105);
    }
    #[allow(unused_mut)]
    let mut scope_1106 = writer.prefix("Bucket");
    if let Some(var_1107) = &input.bucket {
        scope_1106.string(var_1107);
    }
    #[allow(unused_mut)]
    let mut scope_1108 = writer.prefix("Prefix");
    if let Some(var_1109) = &input.prefix {
        scope_1108.string(var_1109);
    }
    #[allow(unused_mut)]
    let mut scope_1110 = writer.prefix("UploadPolicy");
    if let Some(var_1111) = &input.upload_policy {
        scope_1110.string(&aws_smithy_types::base64::encode(var_1111));
    }
    #[allow(unused_mut)]
    let mut scope_1112 = writer.prefix("UploadPolicySignature");
    if let Some(var_1113) = &input.upload_policy_signature {
        scope_1112.string(var_1113);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_directory_service_authentication_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::DirectoryServiceAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1114 = writer.prefix("DirectoryId");
    if let Some(var_1115) = &input.directory_id {
        scope_1114.string(var_1115);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_certificate_authentication_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::CertificateAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1116 = writer.prefix("ClientRootCertificateChainArn");
    if let Some(var_1117) = &input.client_root_certificate_chain_arn {
        scope_1116.string(var_1117);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_federated_authentication_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::FederatedAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1118 = writer.prefix("SAMLProviderArn");
    if let Some(var_1119) = &input.saml_provider_arn {
        scope_1118.string(var_1119);
    }
    #[allow(unused_mut)]
    let mut scope_1120 = writer.prefix("SelfServiceSAMLProviderArn");
    if let Some(var_1121) = &input.self_service_saml_provider_arn {
        scope_1120.string(var_1121);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_spot_maintenance_strategies_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::FleetSpotMaintenanceStrategiesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1122 = writer.prefix("CapacityRebalance");
    if let Some(var_1123) = &input.capacity_rebalance {
        crate::query_ser::serialize_structure_crate_model_fleet_spot_capacity_rebalance_request(
            scope_1122, var_1123,
        )?;
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_capacity_reservation_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::CapacityReservationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1124 = writer.prefix("UsageStrategy");
    if let Some(var_1125) = &input.usage_strategy {
        scope_1124.string(var_1125.as_str());
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_specification_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::FleetLaunchTemplateSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1126 = writer.prefix("LaunchTemplateId");
    if let Some(var_1127) = &input.launch_template_id {
        scope_1126.string(var_1127);
    }
    #[allow(unused_mut)]
    let mut scope_1128 = writer.prefix("LaunchTemplateName");
    if let Some(var_1129) = &input.launch_template_name {
        scope_1128.string(var_1129);
    }
    #[allow(unused_mut)]
    let mut scope_1130 = writer.prefix("Version");
    if let Some(var_1131) = &input.version {
        scope_1130.string(var_1131);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_overrides_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::FleetLaunchTemplateOverridesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1132 = writer.prefix("InstanceType");
    if let Some(var_1133) = &input.instance_type {
        scope_1132.string(var_1133.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1134 = writer.prefix("MaxPrice");
    if let Some(var_1135) = &input.max_price {
        scope_1134.string(var_1135);
    }
    #[allow(unused_mut)]
    let mut scope_1136 = writer.prefix("SubnetId");
    if let Some(var_1137) = &input.subnet_id {
        scope_1136.string(var_1137);
    }
    #[allow(unused_mut)]
    let mut scope_1138 = writer.prefix("AvailabilityZone");
    if let Some(var_1139) = &input.availability_zone {
        scope_1138.string(var_1139);
    }
    #[allow(unused_mut)]
    let mut scope_1140 = writer.prefix("WeightedCapacity");
    if let Some(var_1141) = &input.weighted_capacity {
        scope_1140.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_1141).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1142 = writer.prefix("Priority");
    if let Some(var_1143) = &input.priority {
        scope_1142.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::Float((*var_1143).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1144 = writer.prefix("Placement");
    if let Some(var_1145) = &input.placement {
        crate::query_ser::serialize_structure_crate_model_placement(scope_1144, var_1145)?;
    }
    #[allow(unused_mut)]
    let mut scope_1146 = writer.prefix("InstanceRequirements");
    if let Some(var_1147) = &input.instance_requirements {
        crate::query_ser::serialize_structure_crate_model_instance_requirements_request(
            scope_1146, var_1147,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_1148 = writer.prefix("ImageId");
    if let Some(var_1149) = &input.image_id {
        scope_1148.string(var_1149);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ebs_block_device(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::EbsBlockDevice,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1150 = writer.prefix("DeleteOnTermination");
    if let Some(var_1151) = &input.delete_on_termination {
        scope_1150.boolean(*var_1151);
    }
    #[allow(unused_mut)]
    let mut scope_1152 = writer.prefix("Iops");
    if let Some(var_1153) = &input.iops {
        scope_1152.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1153).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1154 = writer.prefix("SnapshotId");
    if let Some(var_1155) = &input.snapshot_id {
        scope_1154.string(var_1155);
    }
    #[allow(unused_mut)]
    let mut scope_1156 = writer.prefix("VolumeSize");
    if let Some(var_1157) = &input.volume_size {
        scope_1156.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1157).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1158 = writer.prefix("VolumeType");
    if let Some(var_1159) = &input.volume_type {
        scope_1158.string(var_1159.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1160 = writer.prefix("KmsKeyId");
    if let Some(var_1161) = &input.kms_key_id {
        scope_1160.string(var_1161);
    }
    #[allow(unused_mut)]
    let mut scope_1162 = writer.prefix("Throughput");
    if let Some(var_1163) = &input.throughput {
        scope_1162.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1163).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1164 = writer.prefix("OutpostArn");
    if let Some(var_1165) = &input.outpost_arn {
        scope_1164.string(var_1165);
    }
    #[allow(unused_mut)]
    let mut scope_1166 = writer.prefix("Encrypted");
    if let Some(var_1167) = &input.encrypted {
        scope_1166.boolean(*var_1167);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_iam_instance_profile_specification_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1168 = writer.prefix("Arn");
    if let Some(var_1169) = &input.arn {
        scope_1168.string(var_1169);
    }
    #[allow(unused_mut)]
    let mut scope_1170 = writer.prefix("Name");
    if let Some(var_1171) = &input.name {
        scope_1170.string(var_1171);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_block_device_mapping_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateBlockDeviceMappingRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1172 = writer.prefix("DeviceName");
    if let Some(var_1173) = &input.device_name {
        scope_1172.string(var_1173);
    }
    #[allow(unused_mut)]
    let mut scope_1174 = writer.prefix("VirtualName");
    if let Some(var_1175) = &input.virtual_name {
        scope_1174.string(var_1175);
    }
    #[allow(unused_mut)]
    let mut scope_1176 = writer.prefix("Ebs");
    if let Some(var_1177) = &input.ebs {
        crate::query_ser::serialize_structure_crate_model_launch_template_ebs_block_device_request(
            scope_1176, var_1177,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_1178 = writer.prefix("NoDevice");
    if let Some(var_1179) = &input.no_device {
        scope_1178.string(var_1179);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_network_interface_specification_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1180 = writer.prefix("AssociateCarrierIpAddress");
    if let Some(var_1181) = &input.associate_carrier_ip_address {
        scope_1180.boolean(*var_1181);
    }
    #[allow(unused_mut)]
    let mut scope_1182 = writer.prefix("AssociatePublicIpAddress");
    if let Some(var_1183) = &input.associate_public_ip_address {
        scope_1182.boolean(*var_1183);
    }
    #[allow(unused_mut)]
    let mut scope_1184 = writer.prefix("DeleteOnTermination");
    if let Some(var_1185) = &input.delete_on_termination {
        scope_1184.boolean(*var_1185);
    }
    #[allow(unused_mut)]
    let mut scope_1186 = writer.prefix("Description");
    if let Some(var_1187) = &input.description {
        scope_1186.string(var_1187);
    }
    #[allow(unused_mut)]
    let mut scope_1188 = writer.prefix("DeviceIndex");
    if let Some(var_1189) = &input.device_index {
        scope_1188.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1189).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1190 = writer.prefix("SecurityGroupId");
    if let Some(var_1191) = &input.groups {
        let mut list_1193 = scope_1190.start_list(true, Some("SecurityGroupId"));
        for item_1192 in var_1191 {
            #[allow(unused_mut)]
            let mut entry_1194 = list_1193.entry();
            entry_1194.string(item_1192);
        }
        list_1193.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1195 = writer.prefix("InterfaceType");
    if let Some(var_1196) = &input.interface_type {
        scope_1195.string(var_1196);
    }
    #[allow(unused_mut)]
    let mut scope_1197 = writer.prefix("Ipv6AddressCount");
    if let Some(var_1198) = &input.ipv6_address_count {
        scope_1197.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1198).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1199 = writer.prefix("Ipv6Addresses");
    if let Some(var_1200) = &input.ipv6_addresses {
        let mut list_1202 = scope_1199.start_list(true, Some("InstanceIpv6Address"));
        for item_1201 in var_1200 {
            #[allow(unused_mut)]
            let mut entry_1203 = list_1202.entry();
            crate::query_ser::serialize_structure_crate_model_instance_ipv6_address_request(
                entry_1203, item_1201,
            )?;
        }
        list_1202.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1204 = writer.prefix("NetworkInterfaceId");
    if let Some(var_1205) = &input.network_interface_id {
        scope_1204.string(var_1205);
    }
    #[allow(unused_mut)]
    let mut scope_1206 = writer.prefix("PrivateIpAddress");
    if let Some(var_1207) = &input.private_ip_address {
        scope_1206.string(var_1207);
    }
    #[allow(unused_mut)]
    let mut scope_1208 = writer.prefix("PrivateIpAddresses");
    if let Some(var_1209) = &input.private_ip_addresses {
        let mut list_1211 = scope_1208.start_list(true, Some("item"));
        for item_1210 in var_1209 {
            #[allow(unused_mut)]
            let mut entry_1212 = list_1211.entry();
            crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
                entry_1212, item_1210,
            )?;
        }
        list_1211.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1213 = writer.prefix("SecondaryPrivateIpAddressCount");
    if let Some(var_1214) = &input.secondary_private_ip_address_count {
        scope_1213.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1214).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1215 = writer.prefix("SubnetId");
    if let Some(var_1216) = &input.subnet_id {
        scope_1215.string(var_1216);
    }
    #[allow(unused_mut)]
    let mut scope_1217 = writer.prefix("NetworkCardIndex");
    if let Some(var_1218) = &input.network_card_index {
        scope_1217.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1218).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1219 = writer.prefix("Ipv4Prefix");
    if let Some(var_1220) = &input.ipv4_prefixes {
        let mut list_1222 = scope_1219.start_list(true, Some("item"));
        for item_1221 in var_1220 {
            #[allow(unused_mut)]
            let mut entry_1223 = list_1222.entry();
            crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
                entry_1223, item_1221,
            )?;
        }
        list_1222.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1224 = writer.prefix("Ipv4PrefixCount");
    if let Some(var_1225) = &input.ipv4_prefix_count {
        scope_1224.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1225).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1226 = writer.prefix("Ipv6Prefix");
    if let Some(var_1227) = &input.ipv6_prefixes {
        let mut list_1229 = scope_1226.start_list(true, Some("item"));
        for item_1228 in var_1227 {
            #[allow(unused_mut)]
            let mut entry_1230 = list_1229.entry();
            crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
                entry_1230, item_1228,
            )?;
        }
        list_1229.finish();
    }
    #[allow(unused_mut)]
    let mut scope_1231 = writer.prefix("Ipv6PrefixCount");
    if let Some(var_1232) = &input.ipv6_prefix_count {
        scope_1231.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1232).into()),
        );
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_templates_monitoring_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplatesMonitoringRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1233 = writer.prefix("Enabled");
    if let Some(var_1234) = &input.enabled {
        scope_1233.boolean(*var_1234);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_placement_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplatePlacementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1235 = writer.prefix("AvailabilityZone");
    if let Some(var_1236) = &input.availability_zone {
        scope_1235.string(var_1236);
    }
    #[allow(unused_mut)]
    let mut scope_1237 = writer.prefix("Affinity");
    if let Some(var_1238) = &input.affinity {
        scope_1237.string(var_1238);
    }
    #[allow(unused_mut)]
    let mut scope_1239 = writer.prefix("GroupName");
    if let Some(var_1240) = &input.group_name {
        scope_1239.string(var_1240);
    }
    #[allow(unused_mut)]
    let mut scope_1241 = writer.prefix("HostId");
    if let Some(var_1242) = &input.host_id {
        scope_1241.string(var_1242);
    }
    #[allow(unused_mut)]
    let mut scope_1243 = writer.prefix("Tenancy");
    if let Some(var_1244) = &input.tenancy {
        scope_1243.string(var_1244.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1245 = writer.prefix("SpreadDomain");
    if let Some(var_1246) = &input.spread_domain {
        scope_1245.string(var_1246);
    }
    #[allow(unused_mut)]
    let mut scope_1247 = writer.prefix("HostResourceGroupArn");
    if let Some(var_1248) = &input.host_resource_group_arn {
        scope_1247.string(var_1248);
    }
    #[allow(unused_mut)]
    let mut scope_1249 = writer.prefix("PartitionNumber");
    if let Some(var_1250) = &input.partition_number {
        scope_1249.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1250).into()),
        );
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_tag_specification_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateTagSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1251 = writer.prefix("ResourceType");
    if let Some(var_1252) = &input.resource_type {
        scope_1251.string(var_1252.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1253 = writer.prefix("Tag");
    if let Some(var_1254) = &input.tags {
        let mut list_1256 = scope_1253.start_list(true, Some("item"));
        for item_1255 in var_1254 {
            #[allow(unused_mut)]
            let mut entry_1257 = list_1256.entry();
            crate::query_ser::serialize_structure_crate_model_tag(entry_1257, item_1255)?;
        }
        list_1256.finish();
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_elastic_inference_accelerator(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateElasticInferenceAccelerator,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1258 = writer.prefix("Type");
    if let Some(var_1259) = &input.r#type {
        scope_1258.string(var_1259);
    }
    #[allow(unused_mut)]
    let mut scope_1260 = writer.prefix("Count");
    if let Some(var_1261) = &input.count {
        scope_1260.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1261).into()),
        );
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_market_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateInstanceMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1262 = writer.prefix("MarketType");
    if let Some(var_1263) = &input.market_type {
        scope_1262.string(var_1263.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1264 = writer.prefix("SpotOptions");
    if let Some(var_1265) = &input.spot_options {
        crate::query_ser::serialize_structure_crate_model_launch_template_spot_market_options_request(scope_1264, var_1265)?;
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_cpu_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateCpuOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1266 = writer.prefix("CoreCount");
    if let Some(var_1267) = &input.core_count {
        scope_1266.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1267).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1268 = writer.prefix("ThreadsPerCore");
    if let Some(var_1269) = &input.threads_per_core {
        scope_1268.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1269).into()),
        );
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_capacity_reservation_specification_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1270 = writer.prefix("CapacityReservationPreference");
    if let Some(var_1271) = &input.capacity_reservation_preference {
        scope_1270.string(var_1271.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1272 = writer.prefix("CapacityReservationTarget");
    if let Some(var_1273) = &input.capacity_reservation_target {
        crate::query_ser::serialize_structure_crate_model_capacity_reservation_target(
            scope_1272, var_1273,
        )?;
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_license_configuration_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateLicenseConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1274 = writer.prefix("LicenseConfigurationArn");
    if let Some(var_1275) = &input.license_configuration_arn {
        scope_1274.string(var_1275);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_hibernation_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateHibernationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1276 = writer.prefix("Configured");
    if let Some(var_1277) = &input.configured {
        scope_1276.boolean(*var_1277);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_metadata_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateInstanceMetadataOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1278 = writer.prefix("HttpTokens");
    if let Some(var_1279) = &input.http_tokens {
        scope_1278.string(var_1279.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1280 = writer.prefix("HttpPutResponseHopLimit");
    if let Some(var_1281) = &input.http_put_response_hop_limit {
        scope_1280.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_1281).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_1282 = writer.prefix("HttpEndpoint");
    if let Some(var_1283) = &input.http_endpoint {
        scope_1282.string(var_1283.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1284 = writer.prefix("HttpProtocolIpv6");
    if let Some(var_1285) = &input.http_protocol_ipv6 {
        scope_1284.string(var_1285.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1286 = writer.prefix("InstanceMetadataTags");
    if let Some(var_1287) = &input.instance_metadata_tags {
        scope_1286.string(var_1287.as_str());
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_enclave_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplateEnclaveOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1288 = writer.prefix("Enabled");
    if let Some(var_1289) = &input.enabled {
        scope_1288.boolean(*var_1289);
    }
    Ok(())
}

#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_private_dns_name_options_request(
    mut writer: aws_smithy_query::QueryValueWriter,
    input: &crate::model::LaunchTemplatePrivateDnsNameOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
    #[allow(unused_mut)]
    let mut scope_1290 = writer.prefix("HostnameType");
    if let Some(var_1291) = &input.hostname_type {
        scope_1290.string(var_1291.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_1292 = writer.prefix("EnableResourceNameDnsARecord");
    if let Some(var_1293) = &input.enable_resource_name_dns_a_record {
        scope_1292.boolean(*var_1293);
    }
    #[allow(unused_mut)]
    let mut scope_1294 = writer.prefix("EnableResourceNameDnsAAAARecord");
    if let Some(var_1295) = &input.enable_resource_name_dns_aaaa_record {
        scope_1294.boolean(*var_1295);
    }
    Ok(())
}
src/operation_ser.rs (line 18548)
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
pub fn serialize_operation_crate_operation_modify_private_dns_name_options(
    input: &crate::input::ModifyPrivateDnsNameOptionsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyPrivateDnsNameOptions", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5213 = writer.prefix("DryRun");
    if let Some(var_5214) = &input.dry_run {
        scope_5213.boolean(*var_5214);
    }
    #[allow(unused_mut)]
    let mut scope_5215 = writer.prefix("InstanceId");
    if let Some(var_5216) = &input.instance_id {
        scope_5215.string(var_5216);
    }
    #[allow(unused_mut)]
    let mut scope_5217 = writer.prefix("PrivateDnsHostnameType");
    if let Some(var_5218) = &input.private_dns_hostname_type {
        scope_5217.string(var_5218.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5219 = writer.prefix("EnableResourceNameDnsARecord");
    if let Some(var_5220) = &input.enable_resource_name_dns_a_record {
        scope_5219.boolean(*var_5220);
    }
    #[allow(unused_mut)]
    let mut scope_5221 = writer.prefix("EnableResourceNameDnsAAAARecord");
    if let Some(var_5222) = &input.enable_resource_name_dns_aaaa_record {
        scope_5221.boolean(*var_5222);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_reserved_instances(
    input: &crate::input::ModifyReservedInstancesInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifyReservedInstances", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5223 = writer.prefix("ReservedInstancesId");
    if let Some(var_5224) = &input.reserved_instances_ids {
        let mut list_5226 = scope_5223.start_list(true, Some("ReservedInstancesId"));
        for item_5225 in var_5224 {
            #[allow(unused_mut)]
            let mut entry_5227 = list_5226.entry();
            entry_5227.string(item_5225);
        }
        list_5226.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5228 = writer.prefix("ClientToken");
    if let Some(var_5229) = &input.client_token {
        scope_5228.string(var_5229);
    }
    #[allow(unused_mut)]
    let mut scope_5230 = writer.prefix("ReservedInstancesConfigurationSetItemType");
    if let Some(var_5231) = &input.target_configurations {
        let mut list_5233 = scope_5230.start_list(true, Some("item"));
        for item_5232 in var_5231 {
            #[allow(unused_mut)]
            let mut entry_5234 = list_5233.entry();
            crate::query_ser::serialize_structure_crate_model_reserved_instances_configuration(
                entry_5234, item_5232,
            )?;
        }
        list_5233.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_security_group_rules(
    input: &crate::input::ModifySecurityGroupRulesInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifySecurityGroupRules", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5235 = writer.prefix("GroupId");
    if let Some(var_5236) = &input.group_id {
        scope_5235.string(var_5236);
    }
    #[allow(unused_mut)]
    let mut scope_5237 = writer.prefix("SecurityGroupRule");
    if let Some(var_5238) = &input.security_group_rules {
        let mut list_5240 = scope_5237.start_list(true, Some("item"));
        for item_5239 in var_5238 {
            #[allow(unused_mut)]
            let mut entry_5241 = list_5240.entry();
            crate::query_ser::serialize_structure_crate_model_security_group_rule_update(
                entry_5241, item_5239,
            )?;
        }
        list_5240.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5242 = writer.prefix("DryRun");
    if let Some(var_5243) = &input.dry_run {
        scope_5242.boolean(*var_5243);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_snapshot_attribute(
    input: &crate::input::ModifySnapshotAttributeInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifySnapshotAttribute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5244 = writer.prefix("Attribute");
    if let Some(var_5245) = &input.attribute {
        scope_5244.string(var_5245.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5246 = writer.prefix("CreateVolumePermission");
    if let Some(var_5247) = &input.create_volume_permission {
        crate::query_ser::serialize_structure_crate_model_create_volume_permission_modifications(
            scope_5246, var_5247,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5248 = writer.prefix("UserGroup");
    if let Some(var_5249) = &input.group_names {
        let mut list_5251 = scope_5248.start_list(true, Some("GroupName"));
        for item_5250 in var_5249 {
            #[allow(unused_mut)]
            let mut entry_5252 = list_5251.entry();
            entry_5252.string(item_5250);
        }
        list_5251.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5253 = writer.prefix("OperationType");
    if let Some(var_5254) = &input.operation_type {
        scope_5253.string(var_5254.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5255 = writer.prefix("SnapshotId");
    if let Some(var_5256) = &input.snapshot_id {
        scope_5255.string(var_5256);
    }
    #[allow(unused_mut)]
    let mut scope_5257 = writer.prefix("UserId");
    if let Some(var_5258) = &input.user_ids {
        let mut list_5260 = scope_5257.start_list(true, Some("UserId"));
        for item_5259 in var_5258 {
            #[allow(unused_mut)]
            let mut entry_5261 = list_5260.entry();
            entry_5261.string(item_5259);
        }
        list_5260.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5262 = writer.prefix("DryRun");
    if let Some(var_5263) = &input.dry_run {
        scope_5262.boolean(*var_5263);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_snapshot_tier(
    input: &crate::input::ModifySnapshotTierInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifySnapshotTier", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5264 = writer.prefix("SnapshotId");
    if let Some(var_5265) = &input.snapshot_id {
        scope_5264.string(var_5265);
    }
    #[allow(unused_mut)]
    let mut scope_5266 = writer.prefix("StorageTier");
    if let Some(var_5267) = &input.storage_tier {
        scope_5266.string(var_5267.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5268 = writer.prefix("DryRun");
    if let Some(var_5269) = &input.dry_run {
        scope_5268.boolean(*var_5269);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_spot_fleet_request(
    input: &crate::input::ModifySpotFleetRequestInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifySpotFleetRequest", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5270 = writer.prefix("ExcessCapacityTerminationPolicy");
    if let Some(var_5271) = &input.excess_capacity_termination_policy {
        scope_5270.string(var_5271.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5272 = writer.prefix("LaunchTemplateConfig");
    if let Some(var_5273) = &input.launch_template_configs {
        let mut list_5275 = scope_5272.start_list(true, Some("item"));
        for item_5274 in var_5273 {
            #[allow(unused_mut)]
            let mut entry_5276 = list_5275.entry();
            crate::query_ser::serialize_structure_crate_model_launch_template_config(
                entry_5276, item_5274,
            )?;
        }
        list_5275.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5277 = writer.prefix("SpotFleetRequestId");
    if let Some(var_5278) = &input.spot_fleet_request_id {
        scope_5277.string(var_5278);
    }
    #[allow(unused_mut)]
    let mut scope_5279 = writer.prefix("TargetCapacity");
    if let Some(var_5280) = &input.target_capacity {
        scope_5279.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5280).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5281 = writer.prefix("OnDemandTargetCapacity");
    if let Some(var_5282) = &input.on_demand_target_capacity {
        scope_5281.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5282).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5283 = writer.prefix("Context");
    if let Some(var_5284) = &input.context {
        scope_5283.string(var_5284);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_subnet_attribute(
    input: &crate::input::ModifySubnetAttributeInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
    let mut out = String::new();
    #[allow(unused_mut)]
    let mut writer =
        aws_smithy_query::QueryWriter::new(&mut out, "ModifySubnetAttribute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5285 = writer.prefix("AssignIpv6AddressOnCreation");
    if let Some(var_5286) = &input.assign_ipv6_address_on_creation {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5285, var_5286,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5287 = writer.prefix("MapPublicIpOnLaunch");
    if let Some(var_5288) = &input.map_public_ip_on_launch {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5287, var_5288,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5289 = writer.prefix("SubnetId");
    if let Some(var_5290) = &input.subnet_id {
        scope_5289.string(var_5290);
    }
    #[allow(unused_mut)]
    let mut scope_5291 = writer.prefix("MapCustomerOwnedIpOnLaunch");
    if let Some(var_5292) = &input.map_customer_owned_ip_on_launch {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5291, var_5292,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5293 = writer.prefix("CustomerOwnedIpv4Pool");
    if let Some(var_5294) = &input.customer_owned_ipv4_pool {
        scope_5293.string(var_5294);
    }
    #[allow(unused_mut)]
    let mut scope_5295 = writer.prefix("EnableDns64");
    if let Some(var_5296) = &input.enable_dns64 {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5295, var_5296,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5297 = writer.prefix("PrivateDnsHostnameTypeOnLaunch");
    if let Some(var_5298) = &input.private_dns_hostname_type_on_launch {
        scope_5297.string(var_5298.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5299 = writer.prefix("EnableResourceNameDnsARecordOnLaunch");
    if let Some(var_5300) = &input.enable_resource_name_dns_a_record_on_launch {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5299, var_5300,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5301 = writer.prefix("EnableResourceNameDnsAAAARecordOnLaunch");
    if let Some(var_5302) = &input.enable_resource_name_dns_aaaa_record_on_launch {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5301, var_5302,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5303 = writer.prefix("EnableLniAtDeviceIndex");
    if let Some(var_5304) = &input.enable_lni_at_device_index {
        scope_5303.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5304).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5305 = writer.prefix("DisableLniAtDeviceIndex");
    if let Some(var_5306) = &input.disable_lni_at_device_index {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5305, var_5306,
        )?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

Returns all the &str values of the enum members.

Trait Implementations§

Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more