Skip to content

Commit 7df7325

Browse files
author
Steven Yuan
authored
fix(codegen): dedupe @aws.protocols#restXml serialization (#5568)
* fix(codegen): dedupe `@aws.protocols#restXml` serialization * chore(codegen): generate clients
1 parent 792d3ae commit 7df7325

File tree

5 files changed

+0
-237
lines changed

5 files changed

+0
-237
lines changed

clients/client-cloudfront/src/protocols/Aws_restXml.ts

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,6 @@ export const se_CreateCachePolicyCommand = async (
773773
const resolvedPath =
774774
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy";
775775
let body: any;
776-
if (input.CachePolicyConfig !== undefined) {
777-
body = se_CachePolicyConfig(input.CachePolicyConfig, context);
778-
}
779776
let contents: any;
780777
if (input.CachePolicyConfig !== undefined) {
781778
contents = se_CachePolicyConfig(input.CachePolicyConfig, context);
@@ -809,9 +806,6 @@ export const se_CreateCloudFrontOriginAccessIdentityCommand = async (
809806
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
810807
"/2020-05-31/origin-access-identity/cloudfront";
811808
let body: any;
812-
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
813-
body = se_CloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, context);
814-
}
815809
let contents: any;
816810
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
817811
contents = se_CloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, context);
@@ -844,9 +838,6 @@ export const se_CreateContinuousDeploymentPolicyCommand = async (
844838
const resolvedPath =
845839
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/continuous-deployment-policy";
846840
let body: any;
847-
if (input.ContinuousDeploymentPolicyConfig !== undefined) {
848-
body = se_ContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, context);
849-
}
850841
let contents: any;
851842
if (input.ContinuousDeploymentPolicyConfig !== undefined) {
852843
contents = se_ContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, context);
@@ -879,9 +870,6 @@ export const se_CreateDistributionCommand = async (
879870
const resolvedPath =
880871
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
881872
let body: any;
882-
if (input.DistributionConfig !== undefined) {
883-
body = se_DistributionConfig(input.DistributionConfig, context);
884-
}
885873
let contents: any;
886874
if (input.DistributionConfig !== undefined) {
887875
contents = se_DistributionConfig(input.DistributionConfig, context);
@@ -917,9 +905,6 @@ export const se_CreateDistributionWithTagsCommand = async (
917905
WithTags: [, ""],
918906
});
919907
let body: any;
920-
if (input.DistributionConfigWithTags !== undefined) {
921-
body = se_DistributionConfigWithTags(input.DistributionConfigWithTags, context);
922-
}
923908
let contents: any;
924909
if (input.DistributionConfigWithTags !== undefined) {
925910
contents = se_DistributionConfigWithTags(input.DistributionConfigWithTags, context);
@@ -953,9 +938,6 @@ export const se_CreateFieldLevelEncryptionConfigCommand = async (
953938
const resolvedPath =
954939
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption";
955940
let body: any;
956-
if (input.FieldLevelEncryptionConfig !== undefined) {
957-
body = se_FieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
958-
}
959941
let contents: any;
960942
if (input.FieldLevelEncryptionConfig !== undefined) {
961943
contents = se_FieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
@@ -989,9 +971,6 @@ export const se_CreateFieldLevelEncryptionProfileCommand = async (
989971
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
990972
"/2020-05-31/field-level-encryption-profile";
991973
let body: any;
992-
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
993-
body = se_FieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
994-
}
995974
let contents: any;
996975
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
997976
contents = se_FieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
@@ -1073,9 +1052,6 @@ export const se_CreateInvalidationCommand = async (
10731052
false
10741053
);
10751054
let body: any;
1076-
if (input.InvalidationBatch !== undefined) {
1077-
body = se_InvalidationBatch(input.InvalidationBatch, context);
1078-
}
10791055
let contents: any;
10801056
if (input.InvalidationBatch !== undefined) {
10811057
contents = se_InvalidationBatch(input.InvalidationBatch, context);
@@ -1107,9 +1083,6 @@ export const se_CreateKeyGroupCommand = async (
11071083
};
11081084
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group";
11091085
let body: any;
1110-
if (input.KeyGroupConfig !== undefined) {
1111-
body = se_KeyGroupConfig(input.KeyGroupConfig, context);
1112-
}
11131086
let contents: any;
11141087
if (input.KeyGroupConfig !== undefined) {
11151088
contents = se_KeyGroupConfig(input.KeyGroupConfig, context);
@@ -1192,9 +1165,6 @@ export const se_CreateMonitoringSubscriptionCommand = async (
11921165
false
11931166
);
11941167
let body: any;
1195-
if (input.MonitoringSubscription !== undefined) {
1196-
body = se_MonitoringSubscription(input.MonitoringSubscription, context);
1197-
}
11981168
let contents: any;
11991169
if (input.MonitoringSubscription !== undefined) {
12001170
contents = se_MonitoringSubscription(input.MonitoringSubscription, context);
@@ -1227,9 +1197,6 @@ export const se_CreateOriginAccessControlCommand = async (
12271197
const resolvedPath =
12281198
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control";
12291199
let body: any;
1230-
if (input.OriginAccessControlConfig !== undefined) {
1231-
body = se_OriginAccessControlConfig(input.OriginAccessControlConfig, context);
1232-
}
12331200
let contents: any;
12341201
if (input.OriginAccessControlConfig !== undefined) {
12351202
contents = se_OriginAccessControlConfig(input.OriginAccessControlConfig, context);
@@ -1262,9 +1229,6 @@ export const se_CreateOriginRequestPolicyCommand = async (
12621229
const resolvedPath =
12631230
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy";
12641231
let body: any;
1265-
if (input.OriginRequestPolicyConfig !== undefined) {
1266-
body = se_OriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
1267-
}
12681232
let contents: any;
12691233
if (input.OriginRequestPolicyConfig !== undefined) {
12701234
contents = se_OriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
@@ -1296,9 +1260,6 @@ export const se_CreatePublicKeyCommand = async (
12961260
};
12971261
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key";
12981262
let body: any;
1299-
if (input.PublicKeyConfig !== undefined) {
1300-
body = se_PublicKeyConfig(input.PublicKeyConfig, context);
1301-
}
13021263
let contents: any;
13031264
if (input.PublicKeyConfig !== undefined) {
13041265
contents = se_PublicKeyConfig(input.PublicKeyConfig, context);
@@ -1384,9 +1345,6 @@ export const se_CreateResponseHeadersPolicyCommand = async (
13841345
const resolvedPath =
13851346
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy";
13861347
let body: any;
1387-
if (input.ResponseHeadersPolicyConfig !== undefined) {
1388-
body = se_ResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context);
1389-
}
13901348
let contents: any;
13911349
if (input.ResponseHeadersPolicyConfig !== undefined) {
13921350
contents = se_ResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context);
@@ -1419,9 +1377,6 @@ export const se_CreateStreamingDistributionCommand = async (
14191377
const resolvedPath =
14201378
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
14211379
let body: any;
1422-
if (input.StreamingDistributionConfig !== undefined) {
1423-
body = se_StreamingDistributionConfig(input.StreamingDistributionConfig, context);
1424-
}
14251380
let contents: any;
14261381
if (input.StreamingDistributionConfig !== undefined) {
14271382
contents = se_StreamingDistributionConfig(input.StreamingDistributionConfig, context);
@@ -1457,9 +1412,6 @@ export const se_CreateStreamingDistributionWithTagsCommand = async (
14571412
WithTags: [, ""],
14581413
});
14591414
let body: any;
1460-
if (input.StreamingDistributionConfigWithTags !== undefined) {
1461-
body = se_StreamingDistributionConfigWithTags(input.StreamingDistributionConfigWithTags, context);
1462-
}
14631415
let contents: any;
14641416
if (input.StreamingDistributionConfigWithTags !== undefined) {
14651417
contents = se_StreamingDistributionConfigWithTags(input.StreamingDistributionConfigWithTags, context);
@@ -3461,9 +3413,6 @@ export const se_TagResourceCommand = async (
34613413
Resource: [, __expectNonNull(input.Resource!, `Resource`)],
34623414
});
34633415
let body: any;
3464-
if (input.Tags !== undefined) {
3465-
body = se_Tags(input.Tags, context);
3466-
}
34673416
let contents: any;
34683417
if (input.Tags !== undefined) {
34693418
contents = se_Tags(input.Tags, context);
@@ -3539,9 +3488,6 @@ export const se_UntagResourceCommand = async (
35393488
Resource: [, __expectNonNull(input.Resource!, `Resource`)],
35403489
});
35413490
let body: any;
3542-
if (input.TagKeys !== undefined) {
3543-
body = se_TagKeys(input.TagKeys, context);
3544-
}
35453491
let contents: any;
35463492
if (input.TagKeys !== undefined) {
35473493
contents = se_TagKeys(input.TagKeys, context);
@@ -3577,9 +3523,6 @@ export const se_UpdateCachePolicyCommand = async (
35773523
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
35783524
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
35793525
let body: any;
3580-
if (input.CachePolicyConfig !== undefined) {
3581-
body = se_CachePolicyConfig(input.CachePolicyConfig, context);
3582-
}
35833526
let contents: any;
35843527
if (input.CachePolicyConfig !== undefined) {
35853528
contents = se_CachePolicyConfig(input.CachePolicyConfig, context);
@@ -3615,9 +3558,6 @@ export const se_UpdateCloudFrontOriginAccessIdentityCommand = async (
36153558
"/2020-05-31/origin-access-identity/cloudfront/{Id}/config";
36163559
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
36173560
let body: any;
3618-
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
3619-
body = se_CloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, context);
3620-
}
36213561
let contents: any;
36223562
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
36233563
contents = se_CloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, context);
@@ -3653,9 +3593,6 @@ export const se_UpdateContinuousDeploymentPolicyCommand = async (
36533593
"/2020-05-31/continuous-deployment-policy/{Id}";
36543594
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
36553595
let body: any;
3656-
if (input.ContinuousDeploymentPolicyConfig !== undefined) {
3657-
body = se_ContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, context);
3658-
}
36593596
let contents: any;
36603597
if (input.ContinuousDeploymentPolicyConfig !== undefined) {
36613598
contents = se_ContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, context);
@@ -3690,9 +3627,6 @@ export const se_UpdateDistributionCommand = async (
36903627
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}/config";
36913628
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
36923629
let body: any;
3693-
if (input.DistributionConfig !== undefined) {
3694-
body = se_DistributionConfig(input.DistributionConfig, context);
3695-
}
36963630
let contents: any;
36973631
if (input.DistributionConfig !== undefined) {
36983632
contents = se_DistributionConfig(input.DistributionConfig, context);
@@ -3759,9 +3693,6 @@ export const se_UpdateFieldLevelEncryptionConfigCommand = async (
37593693
"/2020-05-31/field-level-encryption/{Id}/config";
37603694
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
37613695
let body: any;
3762-
if (input.FieldLevelEncryptionConfig !== undefined) {
3763-
body = se_FieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
3764-
}
37653696
let contents: any;
37663697
if (input.FieldLevelEncryptionConfig !== undefined) {
37673698
contents = se_FieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
@@ -3797,9 +3728,6 @@ export const se_UpdateFieldLevelEncryptionProfileCommand = async (
37973728
"/2020-05-31/field-level-encryption-profile/{Id}/config";
37983729
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
37993730
let body: any;
3800-
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
3801-
body = se_FieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
3802-
}
38033731
let contents: any;
38043732
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
38053733
contents = se_FieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
@@ -3873,9 +3801,6 @@ export const se_UpdateKeyGroupCommand = async (
38733801
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
38743802
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
38753803
let body: any;
3876-
if (input.KeyGroupConfig !== undefined) {
3877-
body = se_KeyGroupConfig(input.KeyGroupConfig, context);
3878-
}
38793804
let contents: any;
38803805
if (input.KeyGroupConfig !== undefined) {
38813806
contents = se_KeyGroupConfig(input.KeyGroupConfig, context);
@@ -3946,9 +3871,6 @@ export const se_UpdateOriginAccessControlCommand = async (
39463871
"/2020-05-31/origin-access-control/{Id}/config";
39473872
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
39483873
let body: any;
3949-
if (input.OriginAccessControlConfig !== undefined) {
3950-
body = se_OriginAccessControlConfig(input.OriginAccessControlConfig, context);
3951-
}
39523874
let contents: any;
39533875
if (input.OriginAccessControlConfig !== undefined) {
39543876
contents = se_OriginAccessControlConfig(input.OriginAccessControlConfig, context);
@@ -3983,9 +3905,6 @@ export const se_UpdateOriginRequestPolicyCommand = async (
39833905
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
39843906
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
39853907
let body: any;
3986-
if (input.OriginRequestPolicyConfig !== undefined) {
3987-
body = se_OriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
3988-
}
39893908
let contents: any;
39903909
if (input.OriginRequestPolicyConfig !== undefined) {
39913910
contents = se_OriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
@@ -4020,9 +3939,6 @@ export const se_UpdatePublicKeyCommand = async (
40203939
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}/config";
40213940
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
40223941
let body: any;
4023-
if (input.PublicKeyConfig !== undefined) {
4024-
body = se_PublicKeyConfig(input.PublicKeyConfig, context);
4025-
}
40263942
let contents: any;
40273943
if (input.PublicKeyConfig !== undefined) {
40283944
contents = se_PublicKeyConfig(input.PublicKeyConfig, context);
@@ -4114,9 +4030,6 @@ export const se_UpdateResponseHeadersPolicyCommand = async (
41144030
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
41154031
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
41164032
let body: any;
4117-
if (input.ResponseHeadersPolicyConfig !== undefined) {
4118-
body = se_ResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context);
4119-
}
41204033
let contents: any;
41214034
if (input.ResponseHeadersPolicyConfig !== undefined) {
41224035
contents = se_ResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context);
@@ -4152,9 +4065,6 @@ export const se_UpdateStreamingDistributionCommand = async (
41524065
"/2020-05-31/streaming-distribution/{Id}/config";
41534066
resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false);
41544067
let body: any;
4155-
if (input.StreamingDistributionConfig !== undefined) {
4156-
body = se_StreamingDistributionConfig(input.StreamingDistributionConfig, context);
4157-
}
41584068
let contents: any;
41594069
if (input.StreamingDistributionConfig !== undefined) {
41604070
contents = se_StreamingDistributionConfig(input.StreamingDistributionConfig, context);

clients/client-s3-control/src/protocols/Aws_restXml.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,6 @@ export const se_CreateBucketCommand = async (
836836
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20180820/bucket/{Bucket}";
837837
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket!, "{Bucket}", false);
838838
let body: any;
839-
if (input.CreateBucketConfiguration !== undefined) {
840-
body = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context);
841-
}
842839
let contents: any;
843840
if (input.CreateBucketConfiguration !== undefined) {
844841
contents = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context);
@@ -3631,9 +3628,6 @@ export const se_PutBucketLifecycleConfigurationCommand = async (
36313628
"/v20180820/bucket/{Bucket}/lifecycleconfiguration";
36323629
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket!, "{Bucket}", false);
36333630
let body: any;
3634-
if (input.LifecycleConfiguration !== undefined) {
3635-
body = se_LifecycleConfiguration(input.LifecycleConfiguration, context);
3636-
}
36373631
let contents: any;
36383632
if (input.LifecycleConfiguration !== undefined) {
36393633
contents = se_LifecycleConfiguration(input.LifecycleConfiguration, context);
@@ -3729,9 +3723,6 @@ export const se_PutBucketReplicationCommand = async (
37293723
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20180820/bucket/{Bucket}/replication";
37303724
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket!, "{Bucket}", false);
37313725
let body: any;
3732-
if (input.ReplicationConfiguration !== undefined) {
3733-
body = se_ReplicationConfiguration(input.ReplicationConfiguration, context);
3734-
}
37353726
let contents: any;
37363727
if (input.ReplicationConfiguration !== undefined) {
37373728
contents = se_ReplicationConfiguration(input.ReplicationConfiguration, context);
@@ -3777,9 +3768,6 @@ export const se_PutBucketTaggingCommand = async (
37773768
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20180820/bucket/{Bucket}/tagging";
37783769
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket!, "{Bucket}", false);
37793770
let body: any;
3780-
if (input.Tagging !== undefined) {
3781-
body = se_Tagging(input.Tagging, context);
3782-
}
37833771
let contents: any;
37843772
if (input.Tagging !== undefined) {
37853773
contents = se_Tagging(input.Tagging, context);
@@ -3826,9 +3814,6 @@ export const se_PutBucketVersioningCommand = async (
38263814
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20180820/bucket/{Bucket}/versioning";
38273815
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", () => input.Bucket!, "{Bucket}", false);
38283816
let body: any;
3829-
if (input.VersioningConfiguration !== undefined) {
3830-
body = se_VersioningConfiguration(input.VersioningConfiguration, context);
3831-
}
38323817
let contents: any;
38333818
if (input.VersioningConfiguration !== undefined) {
38343819
contents = se_VersioningConfiguration(input.VersioningConfiguration, context);
@@ -3976,9 +3961,6 @@ export const se_PutPublicAccessBlockCommand = async (
39763961
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
39773962
"/v20180820/configuration/publicAccessBlock";
39783963
let body: any;
3979-
if (input.PublicAccessBlockConfiguration !== undefined) {
3980-
body = se_PublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context);
3981-
}
39823964
let contents: any;
39833965
if (input.PublicAccessBlockConfiguration !== undefined) {
39843966
contents = se_PublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context);

0 commit comments

Comments
 (0)