#[non_exhaustive]
pub enum OperationType {
    Add,
    Remove,
    Unknown(UnknownVariantValue),
}
Expand description

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

The above code demonstrates that when operationtype represents NewFeature, the execution path will lead to the second last match arm, even though the enum does not contain a variant OperationType::NewFeature in the current version of SDK. The reason is that the variable other, created by the @ operator, is bound to OperationType::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 OperationType::NewFeature is defined. Specifically, when operationtype represents NewFeature, the execution path will hit the second last match arm as before by virtue of calling as_str on OperationType::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.
§

Add

§

Remove

§

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 42768)
42767
42768
42769
    fn as_ref(&self) -> &str {
        self.as_str()
    }
More examples
Hide additional examples
src/operation_ser.rs (line 17495)
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
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
pub fn serialize_operation_crate_operation_modify_fpga_image_attribute(
    input: &crate::input::ModifyFpgaImageAttributeInput,
) -> 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, "ModifyFpgaImageAttribute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4895 = writer.prefix("DryRun");
    if let Some(var_4896) = &input.dry_run {
        scope_4895.boolean(*var_4896);
    }
    #[allow(unused_mut)]
    let mut scope_4897 = writer.prefix("FpgaImageId");
    if let Some(var_4898) = &input.fpga_image_id {
        scope_4897.string(var_4898);
    }
    #[allow(unused_mut)]
    let mut scope_4899 = writer.prefix("Attribute");
    if let Some(var_4900) = &input.attribute {
        scope_4899.string(var_4900.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4901 = writer.prefix("OperationType");
    if let Some(var_4902) = &input.operation_type {
        scope_4901.string(var_4902.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4903 = writer.prefix("UserId");
    if let Some(var_4904) = &input.user_ids {
        let mut list_4906 = scope_4903.start_list(true, Some("UserId"));
        for item_4905 in var_4904 {
            #[allow(unused_mut)]
            let mut entry_4907 = list_4906.entry();
            entry_4907.string(item_4905);
        }
        list_4906.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4908 = writer.prefix("UserGroup");
    if let Some(var_4909) = &input.user_groups {
        let mut list_4911 = scope_4908.start_list(true, Some("UserGroup"));
        for item_4910 in var_4909 {
            #[allow(unused_mut)]
            let mut entry_4912 = list_4911.entry();
            entry_4912.string(item_4910);
        }
        list_4911.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4913 = writer.prefix("ProductCode");
    if let Some(var_4914) = &input.product_codes {
        let mut list_4916 = scope_4913.start_list(true, Some("ProductCode"));
        for item_4915 in var_4914 {
            #[allow(unused_mut)]
            let mut entry_4917 = list_4916.entry();
            entry_4917.string(item_4915);
        }
        list_4916.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4918 = writer.prefix("LoadPermission");
    if let Some(var_4919) = &input.load_permission {
        crate::query_ser::serialize_structure_crate_model_load_permission_modifications(
            scope_4918, var_4919,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_4920 = writer.prefix("Description");
    if let Some(var_4921) = &input.description {
        scope_4920.string(var_4921);
    }
    #[allow(unused_mut)]
    let mut scope_4922 = writer.prefix("Name");
    if let Some(var_4923) = &input.name {
        scope_4922.string(var_4923);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_hosts(
    input: &crate::input::ModifyHostsInput,
) -> 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, "ModifyHosts", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4924 = writer.prefix("AutoPlacement");
    if let Some(var_4925) = &input.auto_placement {
        scope_4924.string(var_4925.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4926 = writer.prefix("HostId");
    if let Some(var_4927) = &input.host_ids {
        let mut list_4929 = scope_4926.start_list(true, Some("item"));
        for item_4928 in var_4927 {
            #[allow(unused_mut)]
            let mut entry_4930 = list_4929.entry();
            entry_4930.string(item_4928);
        }
        list_4929.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4931 = writer.prefix("HostRecovery");
    if let Some(var_4932) = &input.host_recovery {
        scope_4931.string(var_4932.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4933 = writer.prefix("InstanceType");
    if let Some(var_4934) = &input.instance_type {
        scope_4933.string(var_4934);
    }
    #[allow(unused_mut)]
    let mut scope_4935 = writer.prefix("InstanceFamily");
    if let Some(var_4936) = &input.instance_family {
        scope_4935.string(var_4936);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_identity_id_format(
    input: &crate::input::ModifyIdentityIdFormatInput,
) -> 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, "ModifyIdentityIdFormat", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4937 = writer.prefix("PrincipalArn");
    if let Some(var_4938) = &input.principal_arn {
        scope_4937.string(var_4938);
    }
    #[allow(unused_mut)]
    let mut scope_4939 = writer.prefix("Resource");
    if let Some(var_4940) = &input.resource {
        scope_4939.string(var_4940);
    }
    #[allow(unused_mut)]
    let mut scope_4941 = writer.prefix("UseLongIds");
    if let Some(var_4942) = &input.use_long_ids {
        scope_4941.boolean(*var_4942);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_id_format(
    input: &crate::input::ModifyIdFormatInput,
) -> 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, "ModifyIdFormat", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4943 = writer.prefix("Resource");
    if let Some(var_4944) = &input.resource {
        scope_4943.string(var_4944);
    }
    #[allow(unused_mut)]
    let mut scope_4945 = writer.prefix("UseLongIds");
    if let Some(var_4946) = &input.use_long_ids {
        scope_4945.boolean(*var_4946);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_image_attribute(
    input: &crate::input::ModifyImageAttributeInput,
) -> 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, "ModifyImageAttribute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4947 = writer.prefix("Attribute");
    if let Some(var_4948) = &input.attribute {
        scope_4947.string(var_4948);
    }
    #[allow(unused_mut)]
    let mut scope_4949 = writer.prefix("Description");
    if let Some(var_4950) = &input.description {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_4949, var_4950)?;
    }
    #[allow(unused_mut)]
    let mut scope_4951 = writer.prefix("ImageId");
    if let Some(var_4952) = &input.image_id {
        scope_4951.string(var_4952);
    }
    #[allow(unused_mut)]
    let mut scope_4953 = writer.prefix("LaunchPermission");
    if let Some(var_4954) = &input.launch_permission {
        crate::query_ser::serialize_structure_crate_model_launch_permission_modifications(
            scope_4953, var_4954,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_4955 = writer.prefix("OperationType");
    if let Some(var_4956) = &input.operation_type {
        scope_4955.string(var_4956.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4957 = writer.prefix("ProductCode");
    if let Some(var_4958) = &input.product_codes {
        let mut list_4960 = scope_4957.start_list(true, Some("ProductCode"));
        for item_4959 in var_4958 {
            #[allow(unused_mut)]
            let mut entry_4961 = list_4960.entry();
            entry_4961.string(item_4959);
        }
        list_4960.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4962 = writer.prefix("UserGroup");
    if let Some(var_4963) = &input.user_groups {
        let mut list_4965 = scope_4962.start_list(true, Some("UserGroup"));
        for item_4964 in var_4963 {
            #[allow(unused_mut)]
            let mut entry_4966 = list_4965.entry();
            entry_4966.string(item_4964);
        }
        list_4965.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4967 = writer.prefix("UserId");
    if let Some(var_4968) = &input.user_ids {
        let mut list_4970 = scope_4967.start_list(true, Some("UserId"));
        for item_4969 in var_4968 {
            #[allow(unused_mut)]
            let mut entry_4971 = list_4970.entry();
            entry_4971.string(item_4969);
        }
        list_4970.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4972 = writer.prefix("Value");
    if let Some(var_4973) = &input.value {
        scope_4972.string(var_4973);
    }
    #[allow(unused_mut)]
    let mut scope_4974 = writer.prefix("DryRun");
    if let Some(var_4975) = &input.dry_run {
        scope_4974.boolean(*var_4975);
    }
    #[allow(unused_mut)]
    let mut scope_4976 = writer.prefix("OrganizationArn");
    if let Some(var_4977) = &input.organization_arns {
        let mut list_4979 = scope_4976.start_list(true, Some("OrganizationArn"));
        for item_4978 in var_4977 {
            #[allow(unused_mut)]
            let mut entry_4980 = list_4979.entry();
            entry_4980.string(item_4978);
        }
        list_4979.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4981 = writer.prefix("OrganizationalUnitArn");
    if let Some(var_4982) = &input.organizational_unit_arns {
        let mut list_4984 = scope_4981.start_list(true, Some("OrganizationalUnitArn"));
        for item_4983 in var_4982 {
            #[allow(unused_mut)]
            let mut entry_4985 = list_4984.entry();
            entry_4985.string(item_4983);
        }
        list_4984.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_attribute(
    input: &crate::input::ModifyInstanceAttributeInput,
) -> 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, "ModifyInstanceAttribute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_4986 = writer.prefix("SourceDestCheck");
    if let Some(var_4987) = &input.source_dest_check {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_4986, var_4987,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_4988 = writer.prefix("Attribute");
    if let Some(var_4989) = &input.attribute {
        scope_4988.string(var_4989.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_4990 = writer.prefix("BlockDeviceMapping");
    if let Some(var_4991) = &input.block_device_mappings {
        let mut list_4993 = scope_4990.start_list(true, Some("item"));
        for item_4992 in var_4991 {
            #[allow(unused_mut)]
            let mut entry_4994 = list_4993.entry();
            crate::query_ser::serialize_structure_crate_model_instance_block_device_mapping_specification(entry_4994, item_4992)?;
        }
        list_4993.finish();
    }
    #[allow(unused_mut)]
    let mut scope_4995 = writer.prefix("DisableApiTermination");
    if let Some(var_4996) = &input.disable_api_termination {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_4995, var_4996,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_4997 = writer.prefix("DryRun");
    if let Some(var_4998) = &input.dry_run {
        scope_4997.boolean(*var_4998);
    }
    #[allow(unused_mut)]
    let mut scope_4999 = writer.prefix("EbsOptimized");
    if let Some(var_5000) = &input.ebs_optimized {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_4999, var_5000,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5001 = writer.prefix("EnaSupport");
    if let Some(var_5002) = &input.ena_support {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5001, var_5002,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5003 = writer.prefix("GroupId");
    if let Some(var_5004) = &input.groups {
        let mut list_5006 = scope_5003.start_list(true, Some("groupId"));
        for item_5005 in var_5004 {
            #[allow(unused_mut)]
            let mut entry_5007 = list_5006.entry();
            entry_5007.string(item_5005);
        }
        list_5006.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5008 = writer.prefix("InstanceId");
    if let Some(var_5009) = &input.instance_id {
        scope_5008.string(var_5009);
    }
    #[allow(unused_mut)]
    let mut scope_5010 = writer.prefix("InstanceInitiatedShutdownBehavior");
    if let Some(var_5011) = &input.instance_initiated_shutdown_behavior {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5010, var_5011)?;
    }
    #[allow(unused_mut)]
    let mut scope_5012 = writer.prefix("InstanceType");
    if let Some(var_5013) = &input.instance_type {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5012, var_5013)?;
    }
    #[allow(unused_mut)]
    let mut scope_5014 = writer.prefix("Kernel");
    if let Some(var_5015) = &input.kernel {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5014, var_5015)?;
    }
    #[allow(unused_mut)]
    let mut scope_5016 = writer.prefix("Ramdisk");
    if let Some(var_5017) = &input.ramdisk {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5016, var_5017)?;
    }
    #[allow(unused_mut)]
    let mut scope_5018 = writer.prefix("SriovNetSupport");
    if let Some(var_5019) = &input.sriov_net_support {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5018, var_5019)?;
    }
    #[allow(unused_mut)]
    let mut scope_5020 = writer.prefix("UserData");
    if let Some(var_5021) = &input.user_data {
        crate::query_ser::serialize_structure_crate_model_blob_attribute_value(
            scope_5020, var_5021,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5022 = writer.prefix("Value");
    if let Some(var_5023) = &input.value {
        scope_5022.string(var_5023);
    }
    #[allow(unused_mut)]
    let mut scope_5024 = writer.prefix("DisableApiStop");
    if let Some(var_5025) = &input.disable_api_stop {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5024, var_5025,
        )?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_capacity_reservation_attributes(
    input: &crate::input::ModifyInstanceCapacityReservationAttributesInput,
) -> 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,
        "ModifyInstanceCapacityReservationAttributes",
        "2016-11-15",
    );
    #[allow(unused_mut)]
    let mut scope_5026 = writer.prefix("InstanceId");
    if let Some(var_5027) = &input.instance_id {
        scope_5026.string(var_5027);
    }
    #[allow(unused_mut)]
    let mut scope_5028 = writer.prefix("CapacityReservationSpecification");
    if let Some(var_5029) = &input.capacity_reservation_specification {
        crate::query_ser::serialize_structure_crate_model_capacity_reservation_specification(
            scope_5028, var_5029,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5030 = writer.prefix("DryRun");
    if let Some(var_5031) = &input.dry_run {
        scope_5030.boolean(*var_5031);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_credit_specification(
    input: &crate::input::ModifyInstanceCreditSpecificationInput,
) -> 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,
        "ModifyInstanceCreditSpecification",
        "2016-11-15",
    );
    #[allow(unused_mut)]
    let mut scope_5032 = writer.prefix("DryRun");
    if let Some(var_5033) = &input.dry_run {
        scope_5032.boolean(*var_5033);
    }
    #[allow(unused_mut)]
    let mut scope_5034 = writer.prefix("ClientToken");
    if let Some(var_5035) = &input.client_token {
        scope_5034.string(var_5035);
    }
    #[allow(unused_mut)]
    let mut scope_5036 = writer.prefix("InstanceCreditSpecification");
    if let Some(var_5037) = &input.instance_credit_specifications {
        let mut list_5039 = scope_5036.start_list(true, Some("item"));
        for item_5038 in var_5037 {
            #[allow(unused_mut)]
            let mut entry_5040 = list_5039.entry();
            crate::query_ser::serialize_structure_crate_model_instance_credit_specification_request(entry_5040, item_5038)?;
        }
        list_5039.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_event_start_time(
    input: &crate::input::ModifyInstanceEventStartTimeInput,
) -> 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, "ModifyInstanceEventStartTime", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5041 = writer.prefix("DryRun");
    if let Some(var_5042) = &input.dry_run {
        scope_5041.boolean(*var_5042);
    }
    #[allow(unused_mut)]
    let mut scope_5043 = writer.prefix("InstanceId");
    if let Some(var_5044) = &input.instance_id {
        scope_5043.string(var_5044);
    }
    #[allow(unused_mut)]
    let mut scope_5045 = writer.prefix("InstanceEventId");
    if let Some(var_5046) = &input.instance_event_id {
        scope_5045.string(var_5046);
    }
    #[allow(unused_mut)]
    let mut scope_5047 = writer.prefix("NotBefore");
    if let Some(var_5048) = &input.not_before {
        scope_5047.date_time(var_5048, aws_smithy_types::date_time::Format::DateTime)?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_event_window(
    input: &crate::input::ModifyInstanceEventWindowInput,
) -> 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, "ModifyInstanceEventWindow", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5049 = writer.prefix("DryRun");
    if let Some(var_5050) = &input.dry_run {
        scope_5049.boolean(*var_5050);
    }
    #[allow(unused_mut)]
    let mut scope_5051 = writer.prefix("Name");
    if let Some(var_5052) = &input.name {
        scope_5051.string(var_5052);
    }
    #[allow(unused_mut)]
    let mut scope_5053 = writer.prefix("InstanceEventWindowId");
    if let Some(var_5054) = &input.instance_event_window_id {
        scope_5053.string(var_5054);
    }
    #[allow(unused_mut)]
    let mut scope_5055 = writer.prefix("TimeRange");
    if let Some(var_5056) = &input.time_ranges {
        let mut list_5058 = scope_5055.start_list(true, None);
        for item_5057 in var_5056 {
            #[allow(unused_mut)]
            let mut entry_5059 = list_5058.entry();
            crate::query_ser::serialize_structure_crate_model_instance_event_window_time_range_request(entry_5059, item_5057)?;
        }
        list_5058.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5060 = writer.prefix("CronExpression");
    if let Some(var_5061) = &input.cron_expression {
        scope_5060.string(var_5061);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_maintenance_options(
    input: &crate::input::ModifyInstanceMaintenanceOptionsInput,
) -> 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,
        "ModifyInstanceMaintenanceOptions",
        "2016-11-15",
    );
    #[allow(unused_mut)]
    let mut scope_5062 = writer.prefix("InstanceId");
    if let Some(var_5063) = &input.instance_id {
        scope_5062.string(var_5063);
    }
    #[allow(unused_mut)]
    let mut scope_5064 = writer.prefix("AutoRecovery");
    if let Some(var_5065) = &input.auto_recovery {
        scope_5064.string(var_5065.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5066 = writer.prefix("DryRun");
    if let Some(var_5067) = &input.dry_run {
        scope_5066.boolean(*var_5067);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_metadata_options(
    input: &crate::input::ModifyInstanceMetadataOptionsInput,
) -> 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, "ModifyInstanceMetadataOptions", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5068 = writer.prefix("InstanceId");
    if let Some(var_5069) = &input.instance_id {
        scope_5068.string(var_5069);
    }
    #[allow(unused_mut)]
    let mut scope_5070 = writer.prefix("HttpTokens");
    if let Some(var_5071) = &input.http_tokens {
        scope_5070.string(var_5071.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5072 = writer.prefix("HttpPutResponseHopLimit");
    if let Some(var_5073) = &input.http_put_response_hop_limit {
        scope_5072.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5073).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5074 = writer.prefix("HttpEndpoint");
    if let Some(var_5075) = &input.http_endpoint {
        scope_5074.string(var_5075.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5076 = writer.prefix("DryRun");
    if let Some(var_5077) = &input.dry_run {
        scope_5076.boolean(*var_5077);
    }
    #[allow(unused_mut)]
    let mut scope_5078 = writer.prefix("HttpProtocolIpv6");
    if let Some(var_5079) = &input.http_protocol_ipv6 {
        scope_5078.string(var_5079.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5080 = writer.prefix("InstanceMetadataTags");
    if let Some(var_5081) = &input.instance_metadata_tags {
        scope_5080.string(var_5081.as_str());
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_instance_placement(
    input: &crate::input::ModifyInstancePlacementInput,
) -> 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, "ModifyInstancePlacement", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5082 = writer.prefix("Affinity");
    if let Some(var_5083) = &input.affinity {
        scope_5082.string(var_5083.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5084 = writer.prefix("GroupName");
    if let Some(var_5085) = &input.group_name {
        scope_5084.string(var_5085);
    }
    #[allow(unused_mut)]
    let mut scope_5086 = writer.prefix("HostId");
    if let Some(var_5087) = &input.host_id {
        scope_5086.string(var_5087);
    }
    #[allow(unused_mut)]
    let mut scope_5088 = writer.prefix("InstanceId");
    if let Some(var_5089) = &input.instance_id {
        scope_5088.string(var_5089);
    }
    #[allow(unused_mut)]
    let mut scope_5090 = writer.prefix("Tenancy");
    if let Some(var_5091) = &input.tenancy {
        scope_5090.string(var_5091.as_str());
    }
    #[allow(unused_mut)]
    let mut scope_5092 = writer.prefix("PartitionNumber");
    if let Some(var_5093) = &input.partition_number {
        scope_5092.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5093).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5094 = writer.prefix("HostResourceGroupArn");
    if let Some(var_5095) = &input.host_resource_group_arn {
        scope_5094.string(var_5095);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_ipam(
    input: &crate::input::ModifyIpamInput,
) -> 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, "ModifyIpam", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5096 = writer.prefix("DryRun");
    if let Some(var_5097) = &input.dry_run {
        scope_5096.boolean(*var_5097);
    }
    #[allow(unused_mut)]
    let mut scope_5098 = writer.prefix("IpamId");
    if let Some(var_5099) = &input.ipam_id {
        scope_5098.string(var_5099);
    }
    #[allow(unused_mut)]
    let mut scope_5100 = writer.prefix("Description");
    if let Some(var_5101) = &input.description {
        scope_5100.string(var_5101);
    }
    #[allow(unused_mut)]
    let mut scope_5102 = writer.prefix("AddOperatingRegion");
    if let Some(var_5103) = &input.add_operating_regions {
        let mut list_5105 = scope_5102.start_list(true, None);
        for item_5104 in var_5103 {
            #[allow(unused_mut)]
            let mut entry_5106 = list_5105.entry();
            crate::query_ser::serialize_structure_crate_model_add_ipam_operating_region(
                entry_5106, item_5104,
            )?;
        }
        list_5105.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5107 = writer.prefix("RemoveOperatingRegion");
    if let Some(var_5108) = &input.remove_operating_regions {
        let mut list_5110 = scope_5107.start_list(true, None);
        for item_5109 in var_5108 {
            #[allow(unused_mut)]
            let mut entry_5111 = list_5110.entry();
            crate::query_ser::serialize_structure_crate_model_remove_ipam_operating_region(
                entry_5111, item_5109,
            )?;
        }
        list_5110.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_ipam_pool(
    input: &crate::input::ModifyIpamPoolInput,
) -> 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, "ModifyIpamPool", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5112 = writer.prefix("DryRun");
    if let Some(var_5113) = &input.dry_run {
        scope_5112.boolean(*var_5113);
    }
    #[allow(unused_mut)]
    let mut scope_5114 = writer.prefix("IpamPoolId");
    if let Some(var_5115) = &input.ipam_pool_id {
        scope_5114.string(var_5115);
    }
    #[allow(unused_mut)]
    let mut scope_5116 = writer.prefix("Description");
    if let Some(var_5117) = &input.description {
        scope_5116.string(var_5117);
    }
    #[allow(unused_mut)]
    let mut scope_5118 = writer.prefix("AutoImport");
    if let Some(var_5119) = &input.auto_import {
        scope_5118.boolean(*var_5119);
    }
    #[allow(unused_mut)]
    let mut scope_5120 = writer.prefix("AllocationMinNetmaskLength");
    if let Some(var_5121) = &input.allocation_min_netmask_length {
        scope_5120.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5121).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5122 = writer.prefix("AllocationMaxNetmaskLength");
    if let Some(var_5123) = &input.allocation_max_netmask_length {
        scope_5122.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5123).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5124 = writer.prefix("AllocationDefaultNetmaskLength");
    if let Some(var_5125) = &input.allocation_default_netmask_length {
        scope_5124.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5125).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5126 = writer.prefix("ClearAllocationDefaultNetmaskLength");
    if let Some(var_5127) = &input.clear_allocation_default_netmask_length {
        scope_5126.boolean(*var_5127);
    }
    #[allow(unused_mut)]
    let mut scope_5128 = writer.prefix("AddAllocationResourceTag");
    if let Some(var_5129) = &input.add_allocation_resource_tags {
        let mut list_5131 = scope_5128.start_list(true, Some("item"));
        for item_5130 in var_5129 {
            #[allow(unused_mut)]
            let mut entry_5132 = list_5131.entry();
            crate::query_ser::serialize_structure_crate_model_request_ipam_resource_tag(
                entry_5132, item_5130,
            )?;
        }
        list_5131.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5133 = writer.prefix("RemoveAllocationResourceTag");
    if let Some(var_5134) = &input.remove_allocation_resource_tags {
        let mut list_5136 = scope_5133.start_list(true, Some("item"));
        for item_5135 in var_5134 {
            #[allow(unused_mut)]
            let mut entry_5137 = list_5136.entry();
            crate::query_ser::serialize_structure_crate_model_request_ipam_resource_tag(
                entry_5137, item_5135,
            )?;
        }
        list_5136.finish();
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_ipam_resource_cidr(
    input: &crate::input::ModifyIpamResourceCidrInput,
) -> 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, "ModifyIpamResourceCidr", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5138 = writer.prefix("DryRun");
    if let Some(var_5139) = &input.dry_run {
        scope_5138.boolean(*var_5139);
    }
    #[allow(unused_mut)]
    let mut scope_5140 = writer.prefix("ResourceId");
    if let Some(var_5141) = &input.resource_id {
        scope_5140.string(var_5141);
    }
    #[allow(unused_mut)]
    let mut scope_5142 = writer.prefix("ResourceCidr");
    if let Some(var_5143) = &input.resource_cidr {
        scope_5142.string(var_5143);
    }
    #[allow(unused_mut)]
    let mut scope_5144 = writer.prefix("ResourceRegion");
    if let Some(var_5145) = &input.resource_region {
        scope_5144.string(var_5145);
    }
    #[allow(unused_mut)]
    let mut scope_5146 = writer.prefix("CurrentIpamScopeId");
    if let Some(var_5147) = &input.current_ipam_scope_id {
        scope_5146.string(var_5147);
    }
    #[allow(unused_mut)]
    let mut scope_5148 = writer.prefix("DestinationIpamScopeId");
    if let Some(var_5149) = &input.destination_ipam_scope_id {
        scope_5148.string(var_5149);
    }
    #[allow(unused_mut)]
    let mut scope_5150 = writer.prefix("Monitored");
    if let Some(var_5151) = &input.monitored {
        scope_5150.boolean(*var_5151);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_ipam_scope(
    input: &crate::input::ModifyIpamScopeInput,
) -> 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, "ModifyIpamScope", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5152 = writer.prefix("DryRun");
    if let Some(var_5153) = &input.dry_run {
        scope_5152.boolean(*var_5153);
    }
    #[allow(unused_mut)]
    let mut scope_5154 = writer.prefix("IpamScopeId");
    if let Some(var_5155) = &input.ipam_scope_id {
        scope_5154.string(var_5155);
    }
    #[allow(unused_mut)]
    let mut scope_5156 = writer.prefix("Description");
    if let Some(var_5157) = &input.description {
        scope_5156.string(var_5157);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_launch_template(
    input: &crate::input::ModifyLaunchTemplateInput,
) -> 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, "ModifyLaunchTemplate", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5158 = writer.prefix("DryRun");
    if let Some(var_5159) = &input.dry_run {
        scope_5158.boolean(*var_5159);
    }
    #[allow(unused_mut)]
    let mut scope_5160 = writer.prefix("ClientToken");
    if let Some(var_5161) = &input.client_token {
        scope_5160.string(var_5161);
    }
    #[allow(unused_mut)]
    let mut scope_5162 = writer.prefix("LaunchTemplateId");
    if let Some(var_5163) = &input.launch_template_id {
        scope_5162.string(var_5163);
    }
    #[allow(unused_mut)]
    let mut scope_5164 = writer.prefix("LaunchTemplateName");
    if let Some(var_5165) = &input.launch_template_name {
        scope_5164.string(var_5165);
    }
    #[allow(unused_mut)]
    let mut scope_5166 = writer.prefix("SetDefaultVersion");
    if let Some(var_5167) = &input.default_version {
        scope_5166.string(var_5167);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_local_gateway_route(
    input: &crate::input::ModifyLocalGatewayRouteInput,
) -> 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, "ModifyLocalGatewayRoute", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5168 = writer.prefix("DestinationCidrBlock");
    if let Some(var_5169) = &input.destination_cidr_block {
        scope_5168.string(var_5169);
    }
    #[allow(unused_mut)]
    let mut scope_5170 = writer.prefix("LocalGatewayRouteTableId");
    if let Some(var_5171) = &input.local_gateway_route_table_id {
        scope_5170.string(var_5171);
    }
    #[allow(unused_mut)]
    let mut scope_5172 = writer.prefix("LocalGatewayVirtualInterfaceGroupId");
    if let Some(var_5173) = &input.local_gateway_virtual_interface_group_id {
        scope_5172.string(var_5173);
    }
    #[allow(unused_mut)]
    let mut scope_5174 = writer.prefix("NetworkInterfaceId");
    if let Some(var_5175) = &input.network_interface_id {
        scope_5174.string(var_5175);
    }
    #[allow(unused_mut)]
    let mut scope_5176 = writer.prefix("DryRun");
    if let Some(var_5177) = &input.dry_run {
        scope_5176.boolean(*var_5177);
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_managed_prefix_list(
    input: &crate::input::ModifyManagedPrefixListInput,
) -> 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, "ModifyManagedPrefixList", "2016-11-15");
    #[allow(unused_mut)]
    let mut scope_5178 = writer.prefix("DryRun");
    if let Some(var_5179) = &input.dry_run {
        scope_5178.boolean(*var_5179);
    }
    #[allow(unused_mut)]
    let mut scope_5180 = writer.prefix("PrefixListId");
    if let Some(var_5181) = &input.prefix_list_id {
        scope_5180.string(var_5181);
    }
    #[allow(unused_mut)]
    let mut scope_5182 = writer.prefix("CurrentVersion");
    if let Some(var_5183) = &input.current_version {
        scope_5182.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5183).into()),
        );
    }
    #[allow(unused_mut)]
    let mut scope_5184 = writer.prefix("PrefixListName");
    if let Some(var_5185) = &input.prefix_list_name {
        scope_5184.string(var_5185);
    }
    #[allow(unused_mut)]
    let mut scope_5186 = writer.prefix("AddEntry");
    if let Some(var_5187) = &input.add_entries {
        let mut list_5189 = scope_5186.start_list(true, None);
        for item_5188 in var_5187 {
            #[allow(unused_mut)]
            let mut entry_5190 = list_5189.entry();
            crate::query_ser::serialize_structure_crate_model_add_prefix_list_entry(
                entry_5190, item_5188,
            )?;
        }
        list_5189.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5191 = writer.prefix("RemoveEntry");
    if let Some(var_5192) = &input.remove_entries {
        let mut list_5194 = scope_5191.start_list(true, None);
        for item_5193 in var_5192 {
            #[allow(unused_mut)]
            let mut entry_5195 = list_5194.entry();
            crate::query_ser::serialize_structure_crate_model_remove_prefix_list_entry(
                entry_5195, item_5193,
            )?;
        }
        list_5194.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5196 = writer.prefix("MaxEntries");
    if let Some(var_5197) = &input.max_entries {
        scope_5196.number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_5197).into()),
        );
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

pub fn serialize_operation_crate_operation_modify_network_interface_attribute(
    input: &crate::input::ModifyNetworkInterfaceAttributeInput,
) -> 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,
        "ModifyNetworkInterfaceAttribute",
        "2016-11-15",
    );
    #[allow(unused_mut)]
    let mut scope_5198 = writer.prefix("Attachment");
    if let Some(var_5199) = &input.attachment {
        crate::query_ser::serialize_structure_crate_model_network_interface_attachment_changes(
            scope_5198, var_5199,
        )?;
    }
    #[allow(unused_mut)]
    let mut scope_5200 = writer.prefix("Description");
    if let Some(var_5201) = &input.description {
        crate::query_ser::serialize_structure_crate_model_attribute_value(scope_5200, var_5201)?;
    }
    #[allow(unused_mut)]
    let mut scope_5202 = writer.prefix("DryRun");
    if let Some(var_5203) = &input.dry_run {
        scope_5202.boolean(*var_5203);
    }
    #[allow(unused_mut)]
    let mut scope_5204 = writer.prefix("SecurityGroupId");
    if let Some(var_5205) = &input.groups {
        let mut list_5207 = scope_5204.start_list(true, Some("SecurityGroupId"));
        for item_5206 in var_5205 {
            #[allow(unused_mut)]
            let mut entry_5208 = list_5207.entry();
            entry_5208.string(item_5206);
        }
        list_5207.finish();
    }
    #[allow(unused_mut)]
    let mut scope_5209 = writer.prefix("NetworkInterfaceId");
    if let Some(var_5210) = &input.network_interface_id {
        scope_5209.string(var_5210);
    }
    #[allow(unused_mut)]
    let mut scope_5211 = writer.prefix("SourceDestCheck");
    if let Some(var_5212) = &input.source_dest_check {
        crate::query_ser::serialize_structure_crate_model_attribute_boolean_value(
            scope_5211, var_5212,
        )?;
    }
    writer.finish();
    Ok(aws_smithy_http::body::SdkBody::from(out))
}

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))
}

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