Skip to content

Commit 4c535c9

Browse files
authored
chore(clients): write content-type header for missing operations (#2387)
1 parent deed209 commit 4c535c9

File tree

29 files changed

+819
-78
lines changed

29 files changed

+819
-78
lines changed

clients/client-api-gateway/protocols/Aws_restJson1.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,9 @@ export const serializeAws_restJson1GetAccountCommand = async (
17661766
input: GetAccountCommandInput,
17671767
context: __SerdeContext
17681768
): Promise<__HttpRequest> => {
1769-
const headers: any = {};
1769+
const headers: any = {
1770+
"content-type": "application/json",
1771+
};
17701772
let resolvedPath = "/account";
17711773
let body: any;
17721774
body = "";

clients/client-auditmanager/protocols/Aws_restJson1.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ export const serializeAws_restJson1DeregisterAccountCommand = async (
694694
input: DeregisterAccountCommandInput,
695695
context: __SerdeContext
696696
): Promise<__HttpRequest> => {
697-
const headers: any = {};
697+
const headers: any = {
698+
"content-type": "application/json",
699+
};
698700
let resolvedPath = "/account/deregisterAccount";
699701
let body: any;
700702
body = "";
@@ -773,7 +775,9 @@ export const serializeAws_restJson1GetAccountStatusCommand = async (
773775
input: GetAccountStatusCommandInput,
774776
context: __SerdeContext
775777
): Promise<__HttpRequest> => {
776-
const headers: any = {};
778+
const headers: any = {
779+
"content-type": "application/json",
780+
};
777781
let resolvedPath = "/account/status";
778782
let body: any;
779783
body = "";
@@ -1211,7 +1215,9 @@ export const serializeAws_restJson1GetOrganizationAdminAccountCommand = async (
12111215
input: GetOrganizationAdminAccountCommandInput,
12121216
context: __SerdeContext
12131217
): Promise<__HttpRequest> => {
1214-
const headers: any = {};
1218+
const headers: any = {
1219+
"content-type": "application/json",
1220+
};
12151221
let resolvedPath = "/account/organizationAdminAccount";
12161222
let body: any;
12171223
body = "";
@@ -1231,7 +1237,9 @@ export const serializeAws_restJson1GetServicesInScopeCommand = async (
12311237
input: GetServicesInScopeCommandInput,
12321238
context: __SerdeContext
12331239
): Promise<__HttpRequest> => {
1234-
const headers: any = {};
1240+
const headers: any = {
1241+
"content-type": "application/json",
1242+
};
12351243
let resolvedPath = "/services";
12361244
let body: any;
12371245
body = "";

clients/client-backup/protocols/Aws_restJson1.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,9 @@ export const serializeAws_restJson1DescribeGlobalSettingsCommand = async (
562562
input: DescribeGlobalSettingsCommandInput,
563563
context: __SerdeContext
564564
): Promise<__HttpRequest> => {
565-
const headers: any = {};
565+
const headers: any = {
566+
"content-type": "application/json",
567+
};
566568
let resolvedPath = "/global-settings";
567569
let body: any;
568570
body = "";
@@ -647,7 +649,9 @@ export const serializeAws_restJson1DescribeRegionSettingsCommand = async (
647649
input: DescribeRegionSettingsCommandInput,
648650
context: __SerdeContext
649651
): Promise<__HttpRequest> => {
650-
const headers: any = {};
652+
const headers: any = {
653+
"content-type": "application/json",
654+
};
651655
let resolvedPath = "/account-settings";
652656
let body: any;
653657
body = "";
@@ -975,7 +979,9 @@ export const serializeAws_restJson1GetSupportedResourceTypesCommand = async (
975979
input: GetSupportedResourceTypesCommandInput,
976980
context: __SerdeContext
977981
): Promise<__HttpRequest> => {
978-
const headers: any = {};
982+
const headers: any = {
983+
"content-type": "application/json",
984+
};
979985
let resolvedPath = "/supported-resource-types";
980986
let body: any;
981987
body = "";

clients/client-chime/protocols/Aws_restJson1.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,7 +3688,9 @@ export const serializeAws_restJson1GetGlobalSettingsCommand = async (
36883688
input: GetGlobalSettingsCommandInput,
36893689
context: __SerdeContext
36903690
): Promise<__HttpRequest> => {
3691-
const headers: any = {};
3691+
const headers: any = {
3692+
"content-type": "application/json",
3693+
};
36923694
let resolvedPath = "/settings";
36933695
let body: any;
36943696
body = "";
@@ -3736,7 +3738,9 @@ export const serializeAws_restJson1GetMessagingSessionEndpointCommand = async (
37363738
input: GetMessagingSessionEndpointCommandInput,
37373739
context: __SerdeContext
37383740
): Promise<__HttpRequest> => {
3739-
const headers: any = {};
3741+
const headers: any = {
3742+
"content-type": "application/json",
3743+
};
37403744
let resolvedPath = "/endpoints/messaging-session";
37413745
let body: any;
37423746
body = "";
@@ -3819,7 +3823,9 @@ export const serializeAws_restJson1GetPhoneNumberSettingsCommand = async (
38193823
input: GetPhoneNumberSettingsCommandInput,
38203824
context: __SerdeContext
38213825
): Promise<__HttpRequest> => {
3822-
const headers: any = {};
3826+
const headers: any = {
3827+
"content-type": "application/json",
3828+
};
38233829
let resolvedPath = "/settings/phone-number";
38243830
let body: any;
38253831
body = "";

clients/client-cloudfront/protocols/Aws_restXml.ts

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,9 @@ export const serializeAws_restXmlCreateCachePolicyCommand = async (
497497
};
498498
let resolvedPath = "/2020-05-31/cache-policy";
499499
let body: any;
500+
if (input.CachePolicyConfig !== undefined) {
501+
body = serializeAws_restXmlCachePolicyConfig(input.CachePolicyConfig, context);
502+
}
500503
let contents: any;
501504
if (input.CachePolicyConfig !== undefined) {
502505
contents = serializeAws_restXmlCachePolicyConfig(input.CachePolicyConfig, context);
@@ -525,6 +528,12 @@ export const serializeAws_restXmlCreateCloudFrontOriginAccessIdentityCommand = a
525528
};
526529
let resolvedPath = "/2020-05-31/origin-access-identity/cloudfront";
527530
let body: any;
531+
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
532+
body = serializeAws_restXmlCloudFrontOriginAccessIdentityConfig(
533+
input.CloudFrontOriginAccessIdentityConfig,
534+
context
535+
);
536+
}
528537
let contents: any;
529538
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
530539
contents = serializeAws_restXmlCloudFrontOriginAccessIdentityConfig(
@@ -556,6 +565,9 @@ export const serializeAws_restXmlCreateDistributionCommand = async (
556565
};
557566
let resolvedPath = "/2020-05-31/distribution";
558567
let body: any;
568+
if (input.DistributionConfig !== undefined) {
569+
body = serializeAws_restXmlDistributionConfig(input.DistributionConfig, context);
570+
}
559571
let contents: any;
560572
if (input.DistributionConfig !== undefined) {
561573
contents = serializeAws_restXmlDistributionConfig(input.DistributionConfig, context);
@@ -587,6 +599,9 @@ export const serializeAws_restXmlCreateDistributionWithTagsCommand = async (
587599
WithTags: "",
588600
};
589601
let body: any;
602+
if (input.DistributionConfigWithTags !== undefined) {
603+
body = serializeAws_restXmlDistributionConfigWithTags(input.DistributionConfigWithTags, context);
604+
}
590605
let contents: any;
591606
if (input.DistributionConfigWithTags !== undefined) {
592607
contents = serializeAws_restXmlDistributionConfigWithTags(input.DistributionConfigWithTags, context);
@@ -616,6 +631,9 @@ export const serializeAws_restXmlCreateFieldLevelEncryptionConfigCommand = async
616631
};
617632
let resolvedPath = "/2020-05-31/field-level-encryption";
618633
let body: any;
634+
if (input.FieldLevelEncryptionConfig !== undefined) {
635+
body = serializeAws_restXmlFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
636+
}
619637
let contents: any;
620638
if (input.FieldLevelEncryptionConfig !== undefined) {
621639
contents = serializeAws_restXmlFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
@@ -644,6 +662,9 @@ export const serializeAws_restXmlCreateFieldLevelEncryptionProfileCommand = asyn
644662
};
645663
let resolvedPath = "/2020-05-31/field-level-encryption-profile";
646664
let body: any;
665+
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
666+
body = serializeAws_restXmlFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
667+
}
647668
let contents: any;
648669
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
649670
contents = serializeAws_restXmlFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
@@ -720,6 +741,9 @@ export const serializeAws_restXmlCreateInvalidationCommand = async (
720741
throw new Error("No value provided for input HTTP label: DistributionId.");
721742
}
722743
let body: any;
744+
if (input.InvalidationBatch !== undefined) {
745+
body = serializeAws_restXmlInvalidationBatch(input.InvalidationBatch, context);
746+
}
723747
let contents: any;
724748
if (input.InvalidationBatch !== undefined) {
725749
contents = serializeAws_restXmlInvalidationBatch(input.InvalidationBatch, context);
@@ -748,6 +772,9 @@ export const serializeAws_restXmlCreateKeyGroupCommand = async (
748772
};
749773
let resolvedPath = "/2020-05-31/key-group";
750774
let body: any;
775+
if (input.KeyGroupConfig !== undefined) {
776+
body = serializeAws_restXmlKeyGroupConfig(input.KeyGroupConfig, context);
777+
}
751778
let contents: any;
752779
if (input.KeyGroupConfig !== undefined) {
753780
contents = serializeAws_restXmlKeyGroupConfig(input.KeyGroupConfig, context);
@@ -785,6 +812,9 @@ export const serializeAws_restXmlCreateMonitoringSubscriptionCommand = async (
785812
throw new Error("No value provided for input HTTP label: DistributionId.");
786813
}
787814
let body: any;
815+
if (input.MonitoringSubscription !== undefined) {
816+
body = serializeAws_restXmlMonitoringSubscription(input.MonitoringSubscription, context);
817+
}
788818
let contents: any;
789819
if (input.MonitoringSubscription !== undefined) {
790820
contents = serializeAws_restXmlMonitoringSubscription(input.MonitoringSubscription, context);
@@ -813,6 +843,9 @@ export const serializeAws_restXmlCreateOriginRequestPolicyCommand = async (
813843
};
814844
let resolvedPath = "/2020-05-31/origin-request-policy";
815845
let body: any;
846+
if (input.OriginRequestPolicyConfig !== undefined) {
847+
body = serializeAws_restXmlOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
848+
}
816849
let contents: any;
817850
if (input.OriginRequestPolicyConfig !== undefined) {
818851
contents = serializeAws_restXmlOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
@@ -841,6 +874,9 @@ export const serializeAws_restXmlCreatePublicKeyCommand = async (
841874
};
842875
let resolvedPath = "/2020-05-31/public-key";
843876
let body: any;
877+
if (input.PublicKeyConfig !== undefined) {
878+
body = serializeAws_restXmlPublicKeyConfig(input.PublicKeyConfig, context);
879+
}
844880
let contents: any;
845881
if (input.PublicKeyConfig !== undefined) {
846882
contents = serializeAws_restXmlPublicKeyConfig(input.PublicKeyConfig, context);
@@ -918,6 +954,9 @@ export const serializeAws_restXmlCreateStreamingDistributionCommand = async (
918954
};
919955
let resolvedPath = "/2020-05-31/streaming-distribution";
920956
let body: any;
957+
if (input.StreamingDistributionConfig !== undefined) {
958+
body = serializeAws_restXmlStreamingDistributionConfig(input.StreamingDistributionConfig, context);
959+
}
921960
let contents: any;
922961
if (input.StreamingDistributionConfig !== undefined) {
923962
contents = serializeAws_restXmlStreamingDistributionConfig(input.StreamingDistributionConfig, context);
@@ -949,6 +988,9 @@ export const serializeAws_restXmlCreateStreamingDistributionWithTagsCommand = as
949988
WithTags: "",
950989
};
951990
let body: any;
991+
if (input.StreamingDistributionConfigWithTags !== undefined) {
992+
body = serializeAws_restXmlStreamingDistributionConfigWithTags(input.StreamingDistributionConfigWithTags, context);
993+
}
952994
let contents: any;
953995
if (input.StreamingDistributionConfigWithTags !== undefined) {
954996
contents = serializeAws_restXmlStreamingDistributionConfigWithTags(
@@ -2542,6 +2584,9 @@ export const serializeAws_restXmlTagResourceCommand = async (
25422584
...(input.Resource !== undefined && { Resource: input.Resource }),
25432585
};
25442586
let body: any;
2587+
if (input.Tags !== undefined) {
2588+
body = serializeAws_restXmlTags(input.Tags, context);
2589+
}
25452590
let contents: any;
25462591
if (input.Tags !== undefined) {
25472592
contents = serializeAws_restXmlTags(input.Tags, context);
@@ -2620,6 +2665,9 @@ export const serializeAws_restXmlUntagResourceCommand = async (
26202665
...(input.Resource !== undefined && { Resource: input.Resource }),
26212666
};
26222667
let body: any;
2668+
if (input.TagKeys !== undefined) {
2669+
body = serializeAws_restXmlTagKeys(input.TagKeys, context);
2670+
}
26232671
let contents: any;
26242672
if (input.TagKeys !== undefined) {
26252673
contents = serializeAws_restXmlTagKeys(input.TagKeys, context);
@@ -2659,6 +2707,9 @@ export const serializeAws_restXmlUpdateCachePolicyCommand = async (
26592707
throw new Error("No value provided for input HTTP label: Id.");
26602708
}
26612709
let body: any;
2710+
if (input.CachePolicyConfig !== undefined) {
2711+
body = serializeAws_restXmlCachePolicyConfig(input.CachePolicyConfig, context);
2712+
}
26622713
let contents: any;
26632714
if (input.CachePolicyConfig !== undefined) {
26642715
contents = serializeAws_restXmlCachePolicyConfig(input.CachePolicyConfig, context);
@@ -2697,6 +2748,12 @@ export const serializeAws_restXmlUpdateCloudFrontOriginAccessIdentityCommand = a
26972748
throw new Error("No value provided for input HTTP label: Id.");
26982749
}
26992750
let body: any;
2751+
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
2752+
body = serializeAws_restXmlCloudFrontOriginAccessIdentityConfig(
2753+
input.CloudFrontOriginAccessIdentityConfig,
2754+
context
2755+
);
2756+
}
27002757
let contents: any;
27012758
if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
27022759
contents = serializeAws_restXmlCloudFrontOriginAccessIdentityConfig(
@@ -2738,6 +2795,9 @@ export const serializeAws_restXmlUpdateDistributionCommand = async (
27382795
throw new Error("No value provided for input HTTP label: Id.");
27392796
}
27402797
let body: any;
2798+
if (input.DistributionConfig !== undefined) {
2799+
body = serializeAws_restXmlDistributionConfig(input.DistributionConfig, context);
2800+
}
27412801
let contents: any;
27422802
if (input.DistributionConfig !== undefined) {
27432803
contents = serializeAws_restXmlDistributionConfig(input.DistributionConfig, context);
@@ -2776,6 +2836,9 @@ export const serializeAws_restXmlUpdateFieldLevelEncryptionConfigCommand = async
27762836
throw new Error("No value provided for input HTTP label: Id.");
27772837
}
27782838
let body: any;
2839+
if (input.FieldLevelEncryptionConfig !== undefined) {
2840+
body = serializeAws_restXmlFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
2841+
}
27792842
let contents: any;
27802843
if (input.FieldLevelEncryptionConfig !== undefined) {
27812844
contents = serializeAws_restXmlFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
@@ -2814,6 +2877,9 @@ export const serializeAws_restXmlUpdateFieldLevelEncryptionProfileCommand = asyn
28142877
throw new Error("No value provided for input HTTP label: Id.");
28152878
}
28162879
let body: any;
2880+
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
2881+
body = serializeAws_restXmlFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
2882+
}
28172883
let contents: any;
28182884
if (input.FieldLevelEncryptionProfileConfig !== undefined) {
28192885
contents = serializeAws_restXmlFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, context);
@@ -2897,6 +2963,9 @@ export const serializeAws_restXmlUpdateKeyGroupCommand = async (
28972963
throw new Error("No value provided for input HTTP label: Id.");
28982964
}
28992965
let body: any;
2966+
if (input.KeyGroupConfig !== undefined) {
2967+
body = serializeAws_restXmlKeyGroupConfig(input.KeyGroupConfig, context);
2968+
}
29002969
let contents: any;
29012970
if (input.KeyGroupConfig !== undefined) {
29022971
contents = serializeAws_restXmlKeyGroupConfig(input.KeyGroupConfig, context);
@@ -2935,6 +3004,9 @@ export const serializeAws_restXmlUpdateOriginRequestPolicyCommand = async (
29353004
throw new Error("No value provided for input HTTP label: Id.");
29363005
}
29373006
let body: any;
3007+
if (input.OriginRequestPolicyConfig !== undefined) {
3008+
body = serializeAws_restXmlOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
3009+
}
29383010
let contents: any;
29393011
if (input.OriginRequestPolicyConfig !== undefined) {
29403012
contents = serializeAws_restXmlOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
@@ -2973,6 +3045,9 @@ export const serializeAws_restXmlUpdatePublicKeyCommand = async (
29733045
throw new Error("No value provided for input HTTP label: Id.");
29743046
}
29753047
let body: any;
3048+
if (input.PublicKeyConfig !== undefined) {
3049+
body = serializeAws_restXmlPublicKeyConfig(input.PublicKeyConfig, context);
3050+
}
29763051
let contents: any;
29773052
if (input.PublicKeyConfig !== undefined) {
29783053
contents = serializeAws_restXmlPublicKeyConfig(input.PublicKeyConfig, context);
@@ -3064,6 +3139,9 @@ export const serializeAws_restXmlUpdateStreamingDistributionCommand = async (
30643139
throw new Error("No value provided for input HTTP label: Id.");
30653140
}
30663141
let body: any;
3142+
if (input.StreamingDistributionConfig !== undefined) {
3143+
body = serializeAws_restXmlStreamingDistributionConfig(input.StreamingDistributionConfig, context);
3144+
}
30673145
let contents: any;
30683146
if (input.StreamingDistributionConfig !== undefined) {
30693147
contents = serializeAws_restXmlStreamingDistributionConfig(input.StreamingDistributionConfig, context);

clients/client-devops-guru/protocols/Aws_restJson1.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ export const serializeAws_restJson1DescribeAccountHealthCommand = async (
168168
input: DescribeAccountHealthCommandInput,
169169
context: __SerdeContext
170170
): Promise<__HttpRequest> => {
171-
const headers: any = {};
171+
const headers: any = {
172+
"content-type": "application/json",
173+
};
172174
let resolvedPath = "/accounts/health";
173175
let body: any;
174176
body = "";
@@ -326,7 +328,9 @@ export const serializeAws_restJson1DescribeServiceIntegrationCommand = async (
326328
input: DescribeServiceIntegrationCommandInput,
327329
context: __SerdeContext
328330
): Promise<__HttpRequest> => {
329-
const headers: any = {};
331+
const headers: any = {
332+
"content-type": "application/json",
333+
};
330334
let resolvedPath = "/service-integrations";
331335
let body: any;
332336
body = "";

clients/client-elastic-inference/protocols/Aws_restJson1.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export const serializeAws_restJson1DescribeAcceleratorTypesCommand = async (
103103
input: DescribeAcceleratorTypesCommandInput,
104104
context: __SerdeContext
105105
): Promise<__HttpRequest> => {
106-
const headers: any = {};
106+
const headers: any = {
107+
"content-type": "application/json",
108+
};
107109
let resolvedPath = "/describe-accelerator-types";
108110
let body: any;
109111
body = "";

0 commit comments

Comments
 (0)