Skip to content

Commit fedfc63

Browse files
authored
chore: codegen for json blob serde fixes (#1059)
1 parent 7800bcf commit fedfc63

File tree

104 files changed

+3952
-1392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3952
-1392
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,15 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
220220
if (input.clientToken !== undefined) {
221221
query["clientToken"] = input.clientToken;
222222
}
223+
let body: any;
223224
return new __HttpRequest({
224225
...context.endpoint,
225226
protocol: "https",
226227
method: "DELETE",
227228
headers: headers,
228229
path: resolvedPath,
229-
query: query
230+
query: query,
231+
body: body
230232
});
231233
}
232234

@@ -267,13 +269,15 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
267269
if (input.clientToken !== undefined) {
268270
query["clientToken"] = input.clientToken;
269271
}
272+
let body: any;
270273
return new __HttpRequest({
271274
...context.endpoint,
272275
protocol: "https",
273276
method: "DELETE",
274277
headers: headers,
275278
path: resolvedPath,
276-
query: query
279+
query: query,
280+
body: body
277281
});
278282
}
279283

@@ -291,13 +295,15 @@ export async function serializeAws_restJson1_1GetAnalyzedResourceCommand(
291295
if (input.resourceArn !== undefined) {
292296
query["resourceArn"] = input.resourceArn;
293297
}
298+
let body: any;
294299
return new __HttpRequest({
295300
...context.endpoint,
296301
protocol: "https",
297302
method: "GET",
298303
headers: headers,
299304
path: resolvedPath,
300-
query: query
305+
query: query,
306+
body: body
301307
});
302308
}
303309

@@ -322,12 +328,14 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
322328
} else {
323329
throw new Error("No value provided for input HTTP label: analyzerName.");
324330
}
331+
let body: any;
325332
return new __HttpRequest({
326333
...context.endpoint,
327334
protocol: "https",
328335
method: "GET",
329336
headers: headers,
330-
path: resolvedPath
337+
path: resolvedPath,
338+
body: body
331339
});
332340
}
333341

@@ -364,12 +372,14 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
364372
} else {
365373
throw new Error("No value provided for input HTTP label: ruleName.");
366374
}
375+
let body: any;
367376
return new __HttpRequest({
368377
...context.endpoint,
369378
protocol: "https",
370379
method: "GET",
371380
headers: headers,
372-
path: resolvedPath
381+
path: resolvedPath,
382+
body: body
373383
});
374384
}
375385

@@ -396,13 +406,15 @@ export async function serializeAws_restJson1_1GetFindingCommand(
396406
if (input.analyzerArn !== undefined) {
397407
query["analyzerArn"] = input.analyzerArn;
398408
}
409+
let body: any;
399410
return new __HttpRequest({
400411
...context.endpoint,
401412
protocol: "https",
402413
method: "GET",
403414
headers: headers,
404415
path: resolvedPath,
405-
query: query
416+
query: query,
417+
body: body
406418
});
407419
}
408420

@@ -455,13 +467,15 @@ export async function serializeAws_restJson1_1ListAnalyzersCommand(
455467
if (input.type !== undefined) {
456468
query["type"] = input.type;
457469
}
470+
let body: any;
458471
return new __HttpRequest({
459472
...context.endpoint,
460473
protocol: "https",
461474
method: "GET",
462475
headers: headers,
463476
path: resolvedPath,
464-
query: query
477+
query: query,
478+
body: body
465479
});
466480
}
467481

@@ -493,13 +507,15 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
493507
if (input.nextToken !== undefined) {
494508
query["nextToken"] = input.nextToken;
495509
}
510+
let body: any;
496511
return new __HttpRequest({
497512
...context.endpoint,
498513
protocol: "https",
499514
method: "GET",
500515
headers: headers,
501516
path: resolvedPath,
502-
query: query
517+
query: query,
518+
body: body
503519
});
504520
}
505521

@@ -565,12 +581,14 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
565581
} else {
566582
throw new Error("No value provided for input HTTP label: resourceArn.");
567583
}
584+
let body: any;
568585
return new __HttpRequest({
569586
...context.endpoint,
570587
protocol: "https",
571588
method: "GET",
572589
headers: headers,
573-
path: resolvedPath
590+
path: resolvedPath,
591+
body: body
574592
});
575593
}
576594

@@ -662,13 +680,15 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
662680
if (input.tagKeys !== undefined) {
663681
query["tagKeys"] = (input.tagKeys || []).map(_entry => _entry);
664682
}
683+
let body: any;
665684
return new __HttpRequest({
666685
...context.endpoint,
667686
protocol: "https",
668687
method: "DELETE",
669688
headers: headers,
670689
path: resolvedPath,
671-
query: query
690+
query: query,
691+
body: body
672692
});
673693
}
674694

clients/client-acm-pca/protocols/Aws_json1_1.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,17 +3068,15 @@ const serializeAws_json1_1ImportCertificateAuthorityCertificateRequest = (
30683068
): any => {
30693069
const bodyParams: any = {};
30703070
if (input.Certificate !== undefined) {
3071-
bodyParams["Certificate"] = Buffer.from(input.Certificate).toString(
3072-
"utf-8"
3073-
);
3071+
bodyParams["Certificate"] = context.base64Encoder(input.Certificate);
30743072
}
30753073
if (input.CertificateAuthorityArn !== undefined) {
30763074
bodyParams["CertificateAuthorityArn"] = input.CertificateAuthorityArn;
30773075
}
30783076
if (input.CertificateChain !== undefined) {
3079-
bodyParams["CertificateChain"] = Buffer.from(
3077+
bodyParams["CertificateChain"] = context.base64Encoder(
30803078
input.CertificateChain
3081-
).toString("utf-8");
3079+
);
30823080
}
30833081
return bodyParams;
30843082
};
@@ -3092,7 +3090,7 @@ const serializeAws_json1_1IssueCertificateRequest = (
30923090
bodyParams["CertificateAuthorityArn"] = input.CertificateAuthorityArn;
30933091
}
30943092
if (input.Csr !== undefined) {
3095-
bodyParams["Csr"] = Buffer.from(input.Csr).toString("utf-8");
3093+
bodyParams["Csr"] = context.base64Encoder(input.Csr);
30963094
}
30973095
if (input.IdempotencyToken !== undefined) {
30983096
bodyParams["IdempotencyToken"] = input.IdempotencyToken;

clients/client-acm/protocols/Aws_json1_1.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ const serializeAws_json1_1ExportCertificateRequest = (
17791779
bodyParams["CertificateArn"] = input.CertificateArn;
17801780
}
17811781
if (input.Passphrase !== undefined) {
1782-
bodyParams["Passphrase"] = Buffer.from(input.Passphrase).toString("utf-8");
1782+
bodyParams["Passphrase"] = context.base64Encoder(input.Passphrase);
17831783
}
17841784
return bodyParams;
17851785
};
@@ -1840,20 +1840,18 @@ const serializeAws_json1_1ImportCertificateRequest = (
18401840
): any => {
18411841
const bodyParams: any = {};
18421842
if (input.Certificate !== undefined) {
1843-
bodyParams["Certificate"] = Buffer.from(input.Certificate).toString(
1844-
"utf-8"
1845-
);
1843+
bodyParams["Certificate"] = context.base64Encoder(input.Certificate);
18461844
}
18471845
if (input.CertificateArn !== undefined) {
18481846
bodyParams["CertificateArn"] = input.CertificateArn;
18491847
}
18501848
if (input.CertificateChain !== undefined) {
1851-
bodyParams["CertificateChain"] = Buffer.from(
1849+
bodyParams["CertificateChain"] = context.base64Encoder(
18521850
input.CertificateChain
1853-
).toString("utf-8");
1851+
);
18541852
}
18551853
if (input.PrivateKey !== undefined) {
1856-
bodyParams["PrivateKey"] = Buffer.from(input.PrivateKey).toString("utf-8");
1854+
bodyParams["PrivateKey"] = context.base64Encoder(input.PrivateKey);
18571855
}
18581856
if (input.Tags !== undefined) {
18591857
bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context);

0 commit comments

Comments
 (0)