@aws-sdk/client-signer 3.137.0 → 3.145.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/dist-cjs/protocols/Aws_restJson1.js +284 -518
- package/dist-es/protocols/Aws_restJson1.js +349 -502
- package/package.json +11 -6
|
@@ -13,16 +13,7 @@ const serializeAws_restJson1AddProfilePermissionCommand = async (input, context)
|
|
|
13
13
|
};
|
|
14
14
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
15
15
|
"/signing-profiles/{profileName}/permissions";
|
|
16
|
-
|
|
17
|
-
const labelValue = input.profileName;
|
|
18
|
-
if (labelValue.length <= 0) {
|
|
19
|
-
throw new Error("Empty value provided for input HTTP label: profileName.");
|
|
20
|
-
}
|
|
21
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
25
|
-
}
|
|
16
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
26
17
|
let body;
|
|
27
18
|
body = JSON.stringify({
|
|
28
19
|
...(input.action != null && { action: input.action }),
|
|
@@ -46,16 +37,7 @@ const serializeAws_restJson1CancelSigningProfileCommand = async (input, context)
|
|
|
46
37
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
47
38
|
const headers = {};
|
|
48
39
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
|
|
49
|
-
|
|
50
|
-
const labelValue = input.profileName;
|
|
51
|
-
if (labelValue.length <= 0) {
|
|
52
|
-
throw new Error("Empty value provided for input HTTP label: profileName.");
|
|
53
|
-
}
|
|
54
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
58
|
-
}
|
|
40
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
59
41
|
let body;
|
|
60
42
|
return new protocol_http_1.HttpRequest({
|
|
61
43
|
protocol,
|
|
@@ -72,16 +54,7 @@ const serializeAws_restJson1DescribeSigningJobCommand = async (input, context) =
|
|
|
72
54
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
73
55
|
const headers = {};
|
|
74
56
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}";
|
|
75
|
-
|
|
76
|
-
const labelValue = input.jobId;
|
|
77
|
-
if (labelValue.length <= 0) {
|
|
78
|
-
throw new Error("Empty value provided for input HTTP label: jobId.");
|
|
79
|
-
}
|
|
80
|
-
resolvedPath = resolvedPath.replace("{jobId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
84
|
-
}
|
|
57
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
85
58
|
let body;
|
|
86
59
|
return new protocol_http_1.HttpRequest({
|
|
87
60
|
protocol,
|
|
@@ -98,16 +71,7 @@ const serializeAws_restJson1GetSigningPlatformCommand = async (input, context) =
|
|
|
98
71
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
72
|
const headers = {};
|
|
100
73
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms/{platformId}";
|
|
101
|
-
|
|
102
|
-
const labelValue = input.platformId;
|
|
103
|
-
if (labelValue.length <= 0) {
|
|
104
|
-
throw new Error("Empty value provided for input HTTP label: platformId.");
|
|
105
|
-
}
|
|
106
|
-
resolvedPath = resolvedPath.replace("{platformId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
throw new Error("No value provided for input HTTP label: platformId.");
|
|
110
|
-
}
|
|
74
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "platformId", () => input.platformId, "{platformId}", false);
|
|
111
75
|
let body;
|
|
112
76
|
return new protocol_http_1.HttpRequest({
|
|
113
77
|
protocol,
|
|
@@ -124,19 +88,10 @@ const serializeAws_restJson1GetSigningProfileCommand = async (input, context) =>
|
|
|
124
88
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
125
89
|
const headers = {};
|
|
126
90
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
136
|
-
}
|
|
137
|
-
const query = {
|
|
138
|
-
...(input.profileOwner !== undefined && { profileOwner: input.profileOwner }),
|
|
139
|
-
};
|
|
91
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
92
|
+
const query = map({
|
|
93
|
+
profileOwner: [, input.profileOwner],
|
|
94
|
+
});
|
|
140
95
|
let body;
|
|
141
96
|
return new protocol_http_1.HttpRequest({
|
|
142
97
|
protocol,
|
|
@@ -155,19 +110,10 @@ const serializeAws_restJson1ListProfilePermissionsCommand = async (input, contex
|
|
|
155
110
|
const headers = {};
|
|
156
111
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
157
112
|
"/signing-profiles/{profileName}/permissions";
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
167
|
-
}
|
|
168
|
-
const query = {
|
|
169
|
-
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
170
|
-
};
|
|
113
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
114
|
+
const query = map({
|
|
115
|
+
nextToken: [, input.nextToken],
|
|
116
|
+
});
|
|
171
117
|
let body;
|
|
172
118
|
return new protocol_http_1.HttpRequest({
|
|
173
119
|
protocol,
|
|
@@ -185,21 +131,23 @@ const serializeAws_restJson1ListSigningJobsCommand = async (input, context) => {
|
|
|
185
131
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
186
132
|
const headers = {};
|
|
187
133
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs";
|
|
188
|
-
const query = {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
134
|
+
const query = map({
|
|
135
|
+
status: [, input.status],
|
|
136
|
+
platformId: [, input.platformId],
|
|
137
|
+
requestedBy: [, input.requestedBy],
|
|
138
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
139
|
+
nextToken: [, input.nextToken],
|
|
140
|
+
isRevoked: [() => input.isRevoked !== void 0, () => input.isRevoked.toString()],
|
|
141
|
+
signatureExpiresBefore: [
|
|
142
|
+
() => input.signatureExpiresBefore !== void 0,
|
|
143
|
+
() => (input.signatureExpiresBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
144
|
+
],
|
|
145
|
+
signatureExpiresAfter: [
|
|
146
|
+
() => input.signatureExpiresAfter !== void 0,
|
|
147
|
+
() => (input.signatureExpiresAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
148
|
+
],
|
|
149
|
+
jobInvoker: [, input.jobInvoker],
|
|
150
|
+
});
|
|
203
151
|
let body;
|
|
204
152
|
return new protocol_http_1.HttpRequest({
|
|
205
153
|
protocol,
|
|
@@ -217,13 +165,13 @@ const serializeAws_restJson1ListSigningPlatformsCommand = async (input, context)
|
|
|
217
165
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
218
166
|
const headers = {};
|
|
219
167
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-platforms";
|
|
220
|
-
const query = {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
};
|
|
168
|
+
const query = map({
|
|
169
|
+
category: [, input.category],
|
|
170
|
+
partner: [, input.partner],
|
|
171
|
+
target: [, input.target],
|
|
172
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
173
|
+
nextToken: [, input.nextToken],
|
|
174
|
+
});
|
|
227
175
|
let body;
|
|
228
176
|
return new protocol_http_1.HttpRequest({
|
|
229
177
|
protocol,
|
|
@@ -241,13 +189,13 @@ const serializeAws_restJson1ListSigningProfilesCommand = async (input, context)
|
|
|
241
189
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
242
190
|
const headers = {};
|
|
243
191
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles";
|
|
244
|
-
const query = {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
};
|
|
192
|
+
const query = map({
|
|
193
|
+
includeCanceled: [() => input.includeCanceled !== void 0, () => input.includeCanceled.toString()],
|
|
194
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
195
|
+
nextToken: [, input.nextToken],
|
|
196
|
+
platformId: [, input.platformId],
|
|
197
|
+
statuses: [() => input.statuses !== void 0, () => (input.statuses || []).map((_entry) => _entry)],
|
|
198
|
+
});
|
|
251
199
|
let body;
|
|
252
200
|
return new protocol_http_1.HttpRequest({
|
|
253
201
|
protocol,
|
|
@@ -265,16 +213,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
265
213
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
266
214
|
const headers = {};
|
|
267
215
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
268
|
-
|
|
269
|
-
const labelValue = input.resourceArn;
|
|
270
|
-
if (labelValue.length <= 0) {
|
|
271
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
272
|
-
}
|
|
273
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
277
|
-
}
|
|
216
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
278
217
|
let body;
|
|
279
218
|
return new protocol_http_1.HttpRequest({
|
|
280
219
|
protocol,
|
|
@@ -293,16 +232,7 @@ const serializeAws_restJson1PutSigningProfileCommand = async (input, context) =>
|
|
|
293
232
|
"content-type": "application/json",
|
|
294
233
|
};
|
|
295
234
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}";
|
|
296
|
-
|
|
297
|
-
const labelValue = input.profileName;
|
|
298
|
-
if (labelValue.length <= 0) {
|
|
299
|
-
throw new Error("Empty value provided for input HTTP label: profileName.");
|
|
300
|
-
}
|
|
301
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
305
|
-
}
|
|
235
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
306
236
|
let body;
|
|
307
237
|
body = JSON.stringify({
|
|
308
238
|
...(input.overrides != null && {
|
|
@@ -336,29 +266,11 @@ const serializeAws_restJson1RemoveProfilePermissionCommand = async (input, conte
|
|
|
336
266
|
const headers = {};
|
|
337
267
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
338
268
|
"/signing-profiles/{profileName}/permissions/{statementId}";
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
348
|
-
}
|
|
349
|
-
if (input.statementId !== undefined) {
|
|
350
|
-
const labelValue = input.statementId;
|
|
351
|
-
if (labelValue.length <= 0) {
|
|
352
|
-
throw new Error("Empty value provided for input HTTP label: statementId.");
|
|
353
|
-
}
|
|
354
|
-
resolvedPath = resolvedPath.replace("{statementId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
357
|
-
throw new Error("No value provided for input HTTP label: statementId.");
|
|
358
|
-
}
|
|
359
|
-
const query = {
|
|
360
|
-
...(input.revisionId !== undefined && { revisionId: input.revisionId }),
|
|
361
|
-
};
|
|
269
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
270
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "statementId", () => input.statementId, "{statementId}", false);
|
|
271
|
+
const query = map({
|
|
272
|
+
revisionId: [, input.revisionId],
|
|
273
|
+
});
|
|
362
274
|
let body;
|
|
363
275
|
return new protocol_http_1.HttpRequest({
|
|
364
276
|
protocol,
|
|
@@ -378,16 +290,7 @@ const serializeAws_restJson1RevokeSignatureCommand = async (input, context) => {
|
|
|
378
290
|
"content-type": "application/json",
|
|
379
291
|
};
|
|
380
292
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}/revoke";
|
|
381
|
-
|
|
382
|
-
const labelValue = input.jobId;
|
|
383
|
-
if (labelValue.length <= 0) {
|
|
384
|
-
throw new Error("Empty value provided for input HTTP label: jobId.");
|
|
385
|
-
}
|
|
386
|
-
resolvedPath = resolvedPath.replace("{jobId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
throw new Error("No value provided for input HTTP label: jobId.");
|
|
390
|
-
}
|
|
293
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobId", () => input.jobId, "{jobId}", false);
|
|
391
294
|
let body;
|
|
392
295
|
body = JSON.stringify({
|
|
393
296
|
...(input.jobOwner != null && { jobOwner: input.jobOwner }),
|
|
@@ -410,16 +313,7 @@ const serializeAws_restJson1RevokeSigningProfileCommand = async (input, context)
|
|
|
410
313
|
"content-type": "application/json",
|
|
411
314
|
};
|
|
412
315
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}/revoke";
|
|
413
|
-
|
|
414
|
-
const labelValue = input.profileName;
|
|
415
|
-
if (labelValue.length <= 0) {
|
|
416
|
-
throw new Error("Empty value provided for input HTTP label: profileName.");
|
|
417
|
-
}
|
|
418
|
-
resolvedPath = resolvedPath.replace("{profileName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
419
|
-
}
|
|
420
|
-
else {
|
|
421
|
-
throw new Error("No value provided for input HTTP label: profileName.");
|
|
422
|
-
}
|
|
316
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "profileName", () => input.profileName, "{profileName}", false);
|
|
423
317
|
let body;
|
|
424
318
|
body = JSON.stringify({
|
|
425
319
|
...(input.effectiveTime != null && { effectiveTime: Math.round(input.effectiveTime.getTime() / 1000) }),
|
|
@@ -469,16 +363,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
469
363
|
"content-type": "application/json",
|
|
470
364
|
};
|
|
471
365
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
472
|
-
|
|
473
|
-
const labelValue = input.resourceArn;
|
|
474
|
-
if (labelValue.length <= 0) {
|
|
475
|
-
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
476
|
-
}
|
|
477
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
478
|
-
}
|
|
479
|
-
else {
|
|
480
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
481
|
-
}
|
|
366
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
482
367
|
let body;
|
|
483
368
|
body = JSON.stringify({
|
|
484
369
|
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
@@ -498,19 +383,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
498
383
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
499
384
|
const headers = {};
|
|
500
385
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
510
|
-
}
|
|
511
|
-
const query = {
|
|
512
|
-
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
|
|
513
|
-
};
|
|
386
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
387
|
+
const query = map({
|
|
388
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
389
|
+
});
|
|
514
390
|
let body;
|
|
515
391
|
return new protocol_http_1.HttpRequest({
|
|
516
392
|
protocol,
|
|
@@ -528,15 +404,14 @@ const deserializeAws_restJson1AddProfilePermissionCommand = async (output, conte
|
|
|
528
404
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
529
405
|
return deserializeAws_restJson1AddProfilePermissionCommandError(output, context);
|
|
530
406
|
}
|
|
531
|
-
const contents = {
|
|
407
|
+
const contents = map({
|
|
532
408
|
$metadata: deserializeMetadata(output),
|
|
533
|
-
|
|
534
|
-
};
|
|
409
|
+
});
|
|
535
410
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
536
|
-
if (data.revisionId
|
|
411
|
+
if (data.revisionId != null) {
|
|
537
412
|
contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
|
|
538
413
|
}
|
|
539
|
-
return
|
|
414
|
+
return contents;
|
|
540
415
|
};
|
|
541
416
|
exports.deserializeAws_restJson1AddProfilePermissionCommand = deserializeAws_restJson1AddProfilePermissionCommand;
|
|
542
417
|
const deserializeAws_restJson1AddProfilePermissionCommandError = async (output, context) => {
|
|
@@ -544,7 +419,6 @@ const deserializeAws_restJson1AddProfilePermissionCommandError = async (output,
|
|
|
544
419
|
...output,
|
|
545
420
|
body: await parseBody(output.body, context),
|
|
546
421
|
};
|
|
547
|
-
let response;
|
|
548
422
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
549
423
|
switch (errorCode) {
|
|
550
424
|
case "AccessDeniedException":
|
|
@@ -570,25 +444,23 @@ const deserializeAws_restJson1AddProfilePermissionCommandError = async (output,
|
|
|
570
444
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
571
445
|
default:
|
|
572
446
|
const parsedBody = parsedOutput.body;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
$metadata,
|
|
447
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
448
|
+
output,
|
|
449
|
+
parsedBody,
|
|
450
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
451
|
+
errorCode,
|
|
579
452
|
});
|
|
580
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
581
453
|
}
|
|
582
454
|
};
|
|
583
455
|
const deserializeAws_restJson1CancelSigningProfileCommand = async (output, context) => {
|
|
584
456
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
585
457
|
return deserializeAws_restJson1CancelSigningProfileCommandError(output, context);
|
|
586
458
|
}
|
|
587
|
-
const contents = {
|
|
459
|
+
const contents = map({
|
|
588
460
|
$metadata: deserializeMetadata(output),
|
|
589
|
-
};
|
|
461
|
+
});
|
|
590
462
|
await collectBody(output.body, context);
|
|
591
|
-
return
|
|
463
|
+
return contents;
|
|
592
464
|
};
|
|
593
465
|
exports.deserializeAws_restJson1CancelSigningProfileCommand = deserializeAws_restJson1CancelSigningProfileCommand;
|
|
594
466
|
const deserializeAws_restJson1CancelSigningProfileCommandError = async (output, context) => {
|
|
@@ -596,7 +468,6 @@ const deserializeAws_restJson1CancelSigningProfileCommandError = async (output,
|
|
|
596
468
|
...output,
|
|
597
469
|
body: await parseBody(output.body, context),
|
|
598
470
|
};
|
|
599
|
-
let response;
|
|
600
471
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
601
472
|
switch (errorCode) {
|
|
602
473
|
case "AccessDeniedException":
|
|
@@ -613,101 +484,80 @@ const deserializeAws_restJson1CancelSigningProfileCommandError = async (output,
|
|
|
613
484
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
614
485
|
default:
|
|
615
486
|
const parsedBody = parsedOutput.body;
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
$metadata,
|
|
487
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
488
|
+
output,
|
|
489
|
+
parsedBody,
|
|
490
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
491
|
+
errorCode,
|
|
622
492
|
});
|
|
623
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
624
493
|
}
|
|
625
494
|
};
|
|
626
495
|
const deserializeAws_restJson1DescribeSigningJobCommand = async (output, context) => {
|
|
627
496
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
628
497
|
return deserializeAws_restJson1DescribeSigningJobCommandError(output, context);
|
|
629
498
|
}
|
|
630
|
-
const contents = {
|
|
499
|
+
const contents = map({
|
|
631
500
|
$metadata: deserializeMetadata(output),
|
|
632
|
-
|
|
633
|
-
createdAt: undefined,
|
|
634
|
-
jobId: undefined,
|
|
635
|
-
jobInvoker: undefined,
|
|
636
|
-
jobOwner: undefined,
|
|
637
|
-
overrides: undefined,
|
|
638
|
-
platformDisplayName: undefined,
|
|
639
|
-
platformId: undefined,
|
|
640
|
-
profileName: undefined,
|
|
641
|
-
profileVersion: undefined,
|
|
642
|
-
requestedBy: undefined,
|
|
643
|
-
revocationRecord: undefined,
|
|
644
|
-
signatureExpiresAt: undefined,
|
|
645
|
-
signedObject: undefined,
|
|
646
|
-
signingMaterial: undefined,
|
|
647
|
-
signingParameters: undefined,
|
|
648
|
-
source: undefined,
|
|
649
|
-
status: undefined,
|
|
650
|
-
statusReason: undefined,
|
|
651
|
-
};
|
|
501
|
+
});
|
|
652
502
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
653
|
-
if (data.completedAt
|
|
503
|
+
if (data.completedAt != null) {
|
|
654
504
|
contents.completedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.completedAt)));
|
|
655
505
|
}
|
|
656
|
-
if (data.createdAt
|
|
506
|
+
if (data.createdAt != null) {
|
|
657
507
|
contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.createdAt)));
|
|
658
508
|
}
|
|
659
|
-
if (data.jobId
|
|
509
|
+
if (data.jobId != null) {
|
|
660
510
|
contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
|
|
661
511
|
}
|
|
662
|
-
if (data.jobInvoker
|
|
512
|
+
if (data.jobInvoker != null) {
|
|
663
513
|
contents.jobInvoker = (0, smithy_client_1.expectString)(data.jobInvoker);
|
|
664
514
|
}
|
|
665
|
-
if (data.jobOwner
|
|
515
|
+
if (data.jobOwner != null) {
|
|
666
516
|
contents.jobOwner = (0, smithy_client_1.expectString)(data.jobOwner);
|
|
667
517
|
}
|
|
668
|
-
if (data.overrides
|
|
518
|
+
if (data.overrides != null) {
|
|
669
519
|
contents.overrides = deserializeAws_restJson1SigningPlatformOverrides(data.overrides, context);
|
|
670
520
|
}
|
|
671
|
-
if (data.platformDisplayName
|
|
521
|
+
if (data.platformDisplayName != null) {
|
|
672
522
|
contents.platformDisplayName = (0, smithy_client_1.expectString)(data.platformDisplayName);
|
|
673
523
|
}
|
|
674
|
-
if (data.platformId
|
|
524
|
+
if (data.platformId != null) {
|
|
675
525
|
contents.platformId = (0, smithy_client_1.expectString)(data.platformId);
|
|
676
526
|
}
|
|
677
|
-
if (data.profileName
|
|
527
|
+
if (data.profileName != null) {
|
|
678
528
|
contents.profileName = (0, smithy_client_1.expectString)(data.profileName);
|
|
679
529
|
}
|
|
680
|
-
if (data.profileVersion
|
|
530
|
+
if (data.profileVersion != null) {
|
|
681
531
|
contents.profileVersion = (0, smithy_client_1.expectString)(data.profileVersion);
|
|
682
532
|
}
|
|
683
|
-
if (data.requestedBy
|
|
533
|
+
if (data.requestedBy != null) {
|
|
684
534
|
contents.requestedBy = (0, smithy_client_1.expectString)(data.requestedBy);
|
|
685
535
|
}
|
|
686
|
-
if (data.revocationRecord
|
|
536
|
+
if (data.revocationRecord != null) {
|
|
687
537
|
contents.revocationRecord = deserializeAws_restJson1SigningJobRevocationRecord(data.revocationRecord, context);
|
|
688
538
|
}
|
|
689
|
-
if (data.signatureExpiresAt
|
|
539
|
+
if (data.signatureExpiresAt != null) {
|
|
690
540
|
contents.signatureExpiresAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.signatureExpiresAt)));
|
|
691
541
|
}
|
|
692
|
-
if (data.signedObject
|
|
542
|
+
if (data.signedObject != null) {
|
|
693
543
|
contents.signedObject = deserializeAws_restJson1SignedObject(data.signedObject, context);
|
|
694
544
|
}
|
|
695
|
-
if (data.signingMaterial
|
|
545
|
+
if (data.signingMaterial != null) {
|
|
696
546
|
contents.signingMaterial = deserializeAws_restJson1SigningMaterial(data.signingMaterial, context);
|
|
697
547
|
}
|
|
698
|
-
if (data.signingParameters
|
|
548
|
+
if (data.signingParameters != null) {
|
|
699
549
|
contents.signingParameters = deserializeAws_restJson1SigningParameters(data.signingParameters, context);
|
|
700
550
|
}
|
|
701
|
-
if (data.source
|
|
551
|
+
if (data.source != null) {
|
|
702
552
|
contents.source = deserializeAws_restJson1Source(data.source, context);
|
|
703
553
|
}
|
|
704
|
-
if (data.status
|
|
554
|
+
if (data.status != null) {
|
|
705
555
|
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
706
556
|
}
|
|
707
|
-
if (data.statusReason
|
|
557
|
+
if (data.statusReason != null) {
|
|
708
558
|
contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
|
|
709
559
|
}
|
|
710
|
-
return
|
|
560
|
+
return contents;
|
|
711
561
|
};
|
|
712
562
|
exports.deserializeAws_restJson1DescribeSigningJobCommand = deserializeAws_restJson1DescribeSigningJobCommand;
|
|
713
563
|
const deserializeAws_restJson1DescribeSigningJobCommandError = async (output, context) => {
|
|
@@ -715,7 +565,6 @@ const deserializeAws_restJson1DescribeSigningJobCommandError = async (output, co
|
|
|
715
565
|
...output,
|
|
716
566
|
body: await parseBody(output.body, context),
|
|
717
567
|
};
|
|
718
|
-
let response;
|
|
719
568
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
569
|
switch (errorCode) {
|
|
721
570
|
case "AccessDeniedException":
|
|
@@ -732,61 +581,50 @@ const deserializeAws_restJson1DescribeSigningJobCommandError = async (output, co
|
|
|
732
581
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
733
582
|
default:
|
|
734
583
|
const parsedBody = parsedOutput.body;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
$metadata,
|
|
584
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
585
|
+
output,
|
|
586
|
+
parsedBody,
|
|
587
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
588
|
+
errorCode,
|
|
741
589
|
});
|
|
742
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
743
590
|
}
|
|
744
591
|
};
|
|
745
592
|
const deserializeAws_restJson1GetSigningPlatformCommand = async (output, context) => {
|
|
746
593
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
747
594
|
return deserializeAws_restJson1GetSigningPlatformCommandError(output, context);
|
|
748
595
|
}
|
|
749
|
-
const contents = {
|
|
596
|
+
const contents = map({
|
|
750
597
|
$metadata: deserializeMetadata(output),
|
|
751
|
-
|
|
752
|
-
displayName: undefined,
|
|
753
|
-
maxSizeInMB: undefined,
|
|
754
|
-
partner: undefined,
|
|
755
|
-
platformId: undefined,
|
|
756
|
-
revocationSupported: undefined,
|
|
757
|
-
signingConfiguration: undefined,
|
|
758
|
-
signingImageFormat: undefined,
|
|
759
|
-
target: undefined,
|
|
760
|
-
};
|
|
598
|
+
});
|
|
761
599
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
762
|
-
if (data.category
|
|
600
|
+
if (data.category != null) {
|
|
763
601
|
contents.category = (0, smithy_client_1.expectString)(data.category);
|
|
764
602
|
}
|
|
765
|
-
if (data.displayName
|
|
603
|
+
if (data.displayName != null) {
|
|
766
604
|
contents.displayName = (0, smithy_client_1.expectString)(data.displayName);
|
|
767
605
|
}
|
|
768
|
-
if (data.maxSizeInMB
|
|
606
|
+
if (data.maxSizeInMB != null) {
|
|
769
607
|
contents.maxSizeInMB = (0, smithy_client_1.expectInt32)(data.maxSizeInMB);
|
|
770
608
|
}
|
|
771
|
-
if (data.partner
|
|
609
|
+
if (data.partner != null) {
|
|
772
610
|
contents.partner = (0, smithy_client_1.expectString)(data.partner);
|
|
773
611
|
}
|
|
774
|
-
if (data.platformId
|
|
612
|
+
if (data.platformId != null) {
|
|
775
613
|
contents.platformId = (0, smithy_client_1.expectString)(data.platformId);
|
|
776
614
|
}
|
|
777
|
-
if (data.revocationSupported
|
|
615
|
+
if (data.revocationSupported != null) {
|
|
778
616
|
contents.revocationSupported = (0, smithy_client_1.expectBoolean)(data.revocationSupported);
|
|
779
617
|
}
|
|
780
|
-
if (data.signingConfiguration
|
|
618
|
+
if (data.signingConfiguration != null) {
|
|
781
619
|
contents.signingConfiguration = deserializeAws_restJson1SigningConfiguration(data.signingConfiguration, context);
|
|
782
620
|
}
|
|
783
|
-
if (data.signingImageFormat
|
|
621
|
+
if (data.signingImageFormat != null) {
|
|
784
622
|
contents.signingImageFormat = deserializeAws_restJson1SigningImageFormat(data.signingImageFormat, context);
|
|
785
623
|
}
|
|
786
|
-
if (data.target
|
|
624
|
+
if (data.target != null) {
|
|
787
625
|
contents.target = (0, smithy_client_1.expectString)(data.target);
|
|
788
626
|
}
|
|
789
|
-
return
|
|
627
|
+
return contents;
|
|
790
628
|
};
|
|
791
629
|
exports.deserializeAws_restJson1GetSigningPlatformCommand = deserializeAws_restJson1GetSigningPlatformCommand;
|
|
792
630
|
const deserializeAws_restJson1GetSigningPlatformCommandError = async (output, context) => {
|
|
@@ -794,7 +632,6 @@ const deserializeAws_restJson1GetSigningPlatformCommandError = async (output, co
|
|
|
794
632
|
...output,
|
|
795
633
|
body: await parseBody(output.body, context),
|
|
796
634
|
};
|
|
797
|
-
let response;
|
|
798
635
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
799
636
|
switch (errorCode) {
|
|
800
637
|
case "AccessDeniedException":
|
|
@@ -811,81 +648,65 @@ const deserializeAws_restJson1GetSigningPlatformCommandError = async (output, co
|
|
|
811
648
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
812
649
|
default:
|
|
813
650
|
const parsedBody = parsedOutput.body;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
$metadata,
|
|
651
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
652
|
+
output,
|
|
653
|
+
parsedBody,
|
|
654
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
655
|
+
errorCode,
|
|
820
656
|
});
|
|
821
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
822
657
|
}
|
|
823
658
|
};
|
|
824
659
|
const deserializeAws_restJson1GetSigningProfileCommand = async (output, context) => {
|
|
825
660
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
826
661
|
return deserializeAws_restJson1GetSigningProfileCommandError(output, context);
|
|
827
662
|
}
|
|
828
|
-
const contents = {
|
|
663
|
+
const contents = map({
|
|
829
664
|
$metadata: deserializeMetadata(output),
|
|
830
|
-
|
|
831
|
-
overrides: undefined,
|
|
832
|
-
platformDisplayName: undefined,
|
|
833
|
-
platformId: undefined,
|
|
834
|
-
profileName: undefined,
|
|
835
|
-
profileVersion: undefined,
|
|
836
|
-
profileVersionArn: undefined,
|
|
837
|
-
revocationRecord: undefined,
|
|
838
|
-
signatureValidityPeriod: undefined,
|
|
839
|
-
signingMaterial: undefined,
|
|
840
|
-
signingParameters: undefined,
|
|
841
|
-
status: undefined,
|
|
842
|
-
statusReason: undefined,
|
|
843
|
-
tags: undefined,
|
|
844
|
-
};
|
|
665
|
+
});
|
|
845
666
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
846
|
-
if (data.arn
|
|
667
|
+
if (data.arn != null) {
|
|
847
668
|
contents.arn = (0, smithy_client_1.expectString)(data.arn);
|
|
848
669
|
}
|
|
849
|
-
if (data.overrides
|
|
670
|
+
if (data.overrides != null) {
|
|
850
671
|
contents.overrides = deserializeAws_restJson1SigningPlatformOverrides(data.overrides, context);
|
|
851
672
|
}
|
|
852
|
-
if (data.platformDisplayName
|
|
673
|
+
if (data.platformDisplayName != null) {
|
|
853
674
|
contents.platformDisplayName = (0, smithy_client_1.expectString)(data.platformDisplayName);
|
|
854
675
|
}
|
|
855
|
-
if (data.platformId
|
|
676
|
+
if (data.platformId != null) {
|
|
856
677
|
contents.platformId = (0, smithy_client_1.expectString)(data.platformId);
|
|
857
678
|
}
|
|
858
|
-
if (data.profileName
|
|
679
|
+
if (data.profileName != null) {
|
|
859
680
|
contents.profileName = (0, smithy_client_1.expectString)(data.profileName);
|
|
860
681
|
}
|
|
861
|
-
if (data.profileVersion
|
|
682
|
+
if (data.profileVersion != null) {
|
|
862
683
|
contents.profileVersion = (0, smithy_client_1.expectString)(data.profileVersion);
|
|
863
684
|
}
|
|
864
|
-
if (data.profileVersionArn
|
|
685
|
+
if (data.profileVersionArn != null) {
|
|
865
686
|
contents.profileVersionArn = (0, smithy_client_1.expectString)(data.profileVersionArn);
|
|
866
687
|
}
|
|
867
|
-
if (data.revocationRecord
|
|
688
|
+
if (data.revocationRecord != null) {
|
|
868
689
|
contents.revocationRecord = deserializeAws_restJson1SigningProfileRevocationRecord(data.revocationRecord, context);
|
|
869
690
|
}
|
|
870
|
-
if (data.signatureValidityPeriod
|
|
691
|
+
if (data.signatureValidityPeriod != null) {
|
|
871
692
|
contents.signatureValidityPeriod = deserializeAws_restJson1SignatureValidityPeriod(data.signatureValidityPeriod, context);
|
|
872
693
|
}
|
|
873
|
-
if (data.signingMaterial
|
|
694
|
+
if (data.signingMaterial != null) {
|
|
874
695
|
contents.signingMaterial = deserializeAws_restJson1SigningMaterial(data.signingMaterial, context);
|
|
875
696
|
}
|
|
876
|
-
if (data.signingParameters
|
|
697
|
+
if (data.signingParameters != null) {
|
|
877
698
|
contents.signingParameters = deserializeAws_restJson1SigningParameters(data.signingParameters, context);
|
|
878
699
|
}
|
|
879
|
-
if (data.status
|
|
700
|
+
if (data.status != null) {
|
|
880
701
|
contents.status = (0, smithy_client_1.expectString)(data.status);
|
|
881
702
|
}
|
|
882
|
-
if (data.statusReason
|
|
703
|
+
if (data.statusReason != null) {
|
|
883
704
|
contents.statusReason = (0, smithy_client_1.expectString)(data.statusReason);
|
|
884
705
|
}
|
|
885
|
-
if (data.tags
|
|
706
|
+
if (data.tags != null) {
|
|
886
707
|
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
887
708
|
}
|
|
888
|
-
return
|
|
709
|
+
return contents;
|
|
889
710
|
};
|
|
890
711
|
exports.deserializeAws_restJson1GetSigningProfileCommand = deserializeAws_restJson1GetSigningProfileCommand;
|
|
891
712
|
const deserializeAws_restJson1GetSigningProfileCommandError = async (output, context) => {
|
|
@@ -893,7 +714,6 @@ const deserializeAws_restJson1GetSigningProfileCommandError = async (output, con
|
|
|
893
714
|
...output,
|
|
894
715
|
body: await parseBody(output.body, context),
|
|
895
716
|
};
|
|
896
|
-
let response;
|
|
897
717
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
718
|
switch (errorCode) {
|
|
899
719
|
case "AccessDeniedException":
|
|
@@ -910,41 +730,35 @@ const deserializeAws_restJson1GetSigningProfileCommandError = async (output, con
|
|
|
910
730
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
911
731
|
default:
|
|
912
732
|
const parsedBody = parsedOutput.body;
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
$metadata,
|
|
733
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
734
|
+
output,
|
|
735
|
+
parsedBody,
|
|
736
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
737
|
+
errorCode,
|
|
919
738
|
});
|
|
920
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
921
739
|
}
|
|
922
740
|
};
|
|
923
741
|
const deserializeAws_restJson1ListProfilePermissionsCommand = async (output, context) => {
|
|
924
742
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
925
743
|
return deserializeAws_restJson1ListProfilePermissionsCommandError(output, context);
|
|
926
744
|
}
|
|
927
|
-
const contents = {
|
|
745
|
+
const contents = map({
|
|
928
746
|
$metadata: deserializeMetadata(output),
|
|
929
|
-
|
|
930
|
-
permissions: undefined,
|
|
931
|
-
policySizeBytes: undefined,
|
|
932
|
-
revisionId: undefined,
|
|
933
|
-
};
|
|
747
|
+
});
|
|
934
748
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
935
|
-
if (data.nextToken
|
|
749
|
+
if (data.nextToken != null) {
|
|
936
750
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
937
751
|
}
|
|
938
|
-
if (data.permissions
|
|
752
|
+
if (data.permissions != null) {
|
|
939
753
|
contents.permissions = deserializeAws_restJson1Permissions(data.permissions, context);
|
|
940
754
|
}
|
|
941
|
-
if (data.policySizeBytes
|
|
755
|
+
if (data.policySizeBytes != null) {
|
|
942
756
|
contents.policySizeBytes = (0, smithy_client_1.expectInt32)(data.policySizeBytes);
|
|
943
757
|
}
|
|
944
|
-
if (data.revisionId
|
|
758
|
+
if (data.revisionId != null) {
|
|
945
759
|
contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
|
|
946
760
|
}
|
|
947
|
-
return
|
|
761
|
+
return contents;
|
|
948
762
|
};
|
|
949
763
|
exports.deserializeAws_restJson1ListProfilePermissionsCommand = deserializeAws_restJson1ListProfilePermissionsCommand;
|
|
950
764
|
const deserializeAws_restJson1ListProfilePermissionsCommandError = async (output, context) => {
|
|
@@ -952,7 +766,6 @@ const deserializeAws_restJson1ListProfilePermissionsCommandError = async (output
|
|
|
952
766
|
...output,
|
|
953
767
|
body: await parseBody(output.body, context),
|
|
954
768
|
};
|
|
955
|
-
let response;
|
|
956
769
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
957
770
|
switch (errorCode) {
|
|
958
771
|
case "AccessDeniedException":
|
|
@@ -972,33 +785,29 @@ const deserializeAws_restJson1ListProfilePermissionsCommandError = async (output
|
|
|
972
785
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
973
786
|
default:
|
|
974
787
|
const parsedBody = parsedOutput.body;
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
$metadata,
|
|
788
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
789
|
+
output,
|
|
790
|
+
parsedBody,
|
|
791
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
792
|
+
errorCode,
|
|
981
793
|
});
|
|
982
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
983
794
|
}
|
|
984
795
|
};
|
|
985
796
|
const deserializeAws_restJson1ListSigningJobsCommand = async (output, context) => {
|
|
986
797
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
987
798
|
return deserializeAws_restJson1ListSigningJobsCommandError(output, context);
|
|
988
799
|
}
|
|
989
|
-
const contents = {
|
|
800
|
+
const contents = map({
|
|
990
801
|
$metadata: deserializeMetadata(output),
|
|
991
|
-
|
|
992
|
-
nextToken: undefined,
|
|
993
|
-
};
|
|
802
|
+
});
|
|
994
803
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
995
|
-
if (data.jobs
|
|
804
|
+
if (data.jobs != null) {
|
|
996
805
|
contents.jobs = deserializeAws_restJson1SigningJobs(data.jobs, context);
|
|
997
806
|
}
|
|
998
|
-
if (data.nextToken
|
|
807
|
+
if (data.nextToken != null) {
|
|
999
808
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1000
809
|
}
|
|
1001
|
-
return
|
|
810
|
+
return contents;
|
|
1002
811
|
};
|
|
1003
812
|
exports.deserializeAws_restJson1ListSigningJobsCommand = deserializeAws_restJson1ListSigningJobsCommand;
|
|
1004
813
|
const deserializeAws_restJson1ListSigningJobsCommandError = async (output, context) => {
|
|
@@ -1006,7 +815,6 @@ const deserializeAws_restJson1ListSigningJobsCommandError = async (output, conte
|
|
|
1006
815
|
...output,
|
|
1007
816
|
body: await parseBody(output.body, context),
|
|
1008
817
|
};
|
|
1009
|
-
let response;
|
|
1010
818
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1011
819
|
switch (errorCode) {
|
|
1012
820
|
case "AccessDeniedException":
|
|
@@ -1023,33 +831,29 @@ const deserializeAws_restJson1ListSigningJobsCommandError = async (output, conte
|
|
|
1023
831
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1024
832
|
default:
|
|
1025
833
|
const parsedBody = parsedOutput.body;
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
$metadata,
|
|
834
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
835
|
+
output,
|
|
836
|
+
parsedBody,
|
|
837
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
838
|
+
errorCode,
|
|
1032
839
|
});
|
|
1033
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1034
840
|
}
|
|
1035
841
|
};
|
|
1036
842
|
const deserializeAws_restJson1ListSigningPlatformsCommand = async (output, context) => {
|
|
1037
843
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1038
844
|
return deserializeAws_restJson1ListSigningPlatformsCommandError(output, context);
|
|
1039
845
|
}
|
|
1040
|
-
const contents = {
|
|
846
|
+
const contents = map({
|
|
1041
847
|
$metadata: deserializeMetadata(output),
|
|
1042
|
-
|
|
1043
|
-
platforms: undefined,
|
|
1044
|
-
};
|
|
848
|
+
});
|
|
1045
849
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1046
|
-
if (data.nextToken
|
|
850
|
+
if (data.nextToken != null) {
|
|
1047
851
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1048
852
|
}
|
|
1049
|
-
if (data.platforms
|
|
853
|
+
if (data.platforms != null) {
|
|
1050
854
|
contents.platforms = deserializeAws_restJson1SigningPlatforms(data.platforms, context);
|
|
1051
855
|
}
|
|
1052
|
-
return
|
|
856
|
+
return contents;
|
|
1053
857
|
};
|
|
1054
858
|
exports.deserializeAws_restJson1ListSigningPlatformsCommand = deserializeAws_restJson1ListSigningPlatformsCommand;
|
|
1055
859
|
const deserializeAws_restJson1ListSigningPlatformsCommandError = async (output, context) => {
|
|
@@ -1057,7 +861,6 @@ const deserializeAws_restJson1ListSigningPlatformsCommandError = async (output,
|
|
|
1057
861
|
...output,
|
|
1058
862
|
body: await parseBody(output.body, context),
|
|
1059
863
|
};
|
|
1060
|
-
let response;
|
|
1061
864
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1062
865
|
switch (errorCode) {
|
|
1063
866
|
case "AccessDeniedException":
|
|
@@ -1074,33 +877,29 @@ const deserializeAws_restJson1ListSigningPlatformsCommandError = async (output,
|
|
|
1074
877
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1075
878
|
default:
|
|
1076
879
|
const parsedBody = parsedOutput.body;
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
$metadata,
|
|
880
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
881
|
+
output,
|
|
882
|
+
parsedBody,
|
|
883
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
884
|
+
errorCode,
|
|
1083
885
|
});
|
|
1084
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1085
886
|
}
|
|
1086
887
|
};
|
|
1087
888
|
const deserializeAws_restJson1ListSigningProfilesCommand = async (output, context) => {
|
|
1088
889
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1089
890
|
return deserializeAws_restJson1ListSigningProfilesCommandError(output, context);
|
|
1090
891
|
}
|
|
1091
|
-
const contents = {
|
|
892
|
+
const contents = map({
|
|
1092
893
|
$metadata: deserializeMetadata(output),
|
|
1093
|
-
|
|
1094
|
-
profiles: undefined,
|
|
1095
|
-
};
|
|
894
|
+
});
|
|
1096
895
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1097
|
-
if (data.nextToken
|
|
896
|
+
if (data.nextToken != null) {
|
|
1098
897
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1099
898
|
}
|
|
1100
|
-
if (data.profiles
|
|
899
|
+
if (data.profiles != null) {
|
|
1101
900
|
contents.profiles = deserializeAws_restJson1SigningProfiles(data.profiles, context);
|
|
1102
901
|
}
|
|
1103
|
-
return
|
|
902
|
+
return contents;
|
|
1104
903
|
};
|
|
1105
904
|
exports.deserializeAws_restJson1ListSigningProfilesCommand = deserializeAws_restJson1ListSigningProfilesCommand;
|
|
1106
905
|
const deserializeAws_restJson1ListSigningProfilesCommandError = async (output, context) => {
|
|
@@ -1108,7 +907,6 @@ const deserializeAws_restJson1ListSigningProfilesCommandError = async (output, c
|
|
|
1108
907
|
...output,
|
|
1109
908
|
body: await parseBody(output.body, context),
|
|
1110
909
|
};
|
|
1111
|
-
let response;
|
|
1112
910
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1113
911
|
switch (errorCode) {
|
|
1114
912
|
case "AccessDeniedException":
|
|
@@ -1122,29 +920,26 @@ const deserializeAws_restJson1ListSigningProfilesCommandError = async (output, c
|
|
|
1122
920
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1123
921
|
default:
|
|
1124
922
|
const parsedBody = parsedOutput.body;
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
$metadata,
|
|
923
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
924
|
+
output,
|
|
925
|
+
parsedBody,
|
|
926
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
927
|
+
errorCode,
|
|
1131
928
|
});
|
|
1132
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1133
929
|
}
|
|
1134
930
|
};
|
|
1135
931
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1136
932
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1137
933
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1138
934
|
}
|
|
1139
|
-
const contents = {
|
|
935
|
+
const contents = map({
|
|
1140
936
|
$metadata: deserializeMetadata(output),
|
|
1141
|
-
|
|
1142
|
-
};
|
|
937
|
+
});
|
|
1143
938
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1144
|
-
if (data.tags
|
|
939
|
+
if (data.tags != null) {
|
|
1145
940
|
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
1146
941
|
}
|
|
1147
|
-
return
|
|
942
|
+
return contents;
|
|
1148
943
|
};
|
|
1149
944
|
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
1150
945
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -1152,7 +947,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1152
947
|
...output,
|
|
1153
948
|
body: await parseBody(output.body, context),
|
|
1154
949
|
};
|
|
1155
|
-
let response;
|
|
1156
950
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
951
|
switch (errorCode) {
|
|
1158
952
|
case "BadRequestException":
|
|
@@ -1169,37 +963,32 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1169
963
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1170
964
|
default:
|
|
1171
965
|
const parsedBody = parsedOutput.body;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
$metadata,
|
|
966
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
967
|
+
output,
|
|
968
|
+
parsedBody,
|
|
969
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
970
|
+
errorCode,
|
|
1178
971
|
});
|
|
1179
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1180
972
|
}
|
|
1181
973
|
};
|
|
1182
974
|
const deserializeAws_restJson1PutSigningProfileCommand = async (output, context) => {
|
|
1183
975
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1184
976
|
return deserializeAws_restJson1PutSigningProfileCommandError(output, context);
|
|
1185
977
|
}
|
|
1186
|
-
const contents = {
|
|
978
|
+
const contents = map({
|
|
1187
979
|
$metadata: deserializeMetadata(output),
|
|
1188
|
-
|
|
1189
|
-
profileVersion: undefined,
|
|
1190
|
-
profileVersionArn: undefined,
|
|
1191
|
-
};
|
|
980
|
+
});
|
|
1192
981
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1193
|
-
if (data.arn
|
|
982
|
+
if (data.arn != null) {
|
|
1194
983
|
contents.arn = (0, smithy_client_1.expectString)(data.arn);
|
|
1195
984
|
}
|
|
1196
|
-
if (data.profileVersion
|
|
985
|
+
if (data.profileVersion != null) {
|
|
1197
986
|
contents.profileVersion = (0, smithy_client_1.expectString)(data.profileVersion);
|
|
1198
987
|
}
|
|
1199
|
-
if (data.profileVersionArn
|
|
988
|
+
if (data.profileVersionArn != null) {
|
|
1200
989
|
contents.profileVersionArn = (0, smithy_client_1.expectString)(data.profileVersionArn);
|
|
1201
990
|
}
|
|
1202
|
-
return
|
|
991
|
+
return contents;
|
|
1203
992
|
};
|
|
1204
993
|
exports.deserializeAws_restJson1PutSigningProfileCommand = deserializeAws_restJson1PutSigningProfileCommand;
|
|
1205
994
|
const deserializeAws_restJson1PutSigningProfileCommandError = async (output, context) => {
|
|
@@ -1207,7 +996,6 @@ const deserializeAws_restJson1PutSigningProfileCommandError = async (output, con
|
|
|
1207
996
|
...output,
|
|
1208
997
|
body: await parseBody(output.body, context),
|
|
1209
998
|
};
|
|
1210
|
-
let response;
|
|
1211
999
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1212
1000
|
switch (errorCode) {
|
|
1213
1001
|
case "AccessDeniedException":
|
|
@@ -1227,29 +1015,26 @@ const deserializeAws_restJson1PutSigningProfileCommandError = async (output, con
|
|
|
1227
1015
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1228
1016
|
default:
|
|
1229
1017
|
const parsedBody = parsedOutput.body;
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
$metadata,
|
|
1018
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1019
|
+
output,
|
|
1020
|
+
parsedBody,
|
|
1021
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1022
|
+
errorCode,
|
|
1236
1023
|
});
|
|
1237
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1238
1024
|
}
|
|
1239
1025
|
};
|
|
1240
1026
|
const deserializeAws_restJson1RemoveProfilePermissionCommand = async (output, context) => {
|
|
1241
1027
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1242
1028
|
return deserializeAws_restJson1RemoveProfilePermissionCommandError(output, context);
|
|
1243
1029
|
}
|
|
1244
|
-
const contents = {
|
|
1030
|
+
const contents = map({
|
|
1245
1031
|
$metadata: deserializeMetadata(output),
|
|
1246
|
-
|
|
1247
|
-
};
|
|
1032
|
+
});
|
|
1248
1033
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1249
|
-
if (data.revisionId
|
|
1034
|
+
if (data.revisionId != null) {
|
|
1250
1035
|
contents.revisionId = (0, smithy_client_1.expectString)(data.revisionId);
|
|
1251
1036
|
}
|
|
1252
|
-
return
|
|
1037
|
+
return contents;
|
|
1253
1038
|
};
|
|
1254
1039
|
exports.deserializeAws_restJson1RemoveProfilePermissionCommand = deserializeAws_restJson1RemoveProfilePermissionCommand;
|
|
1255
1040
|
const deserializeAws_restJson1RemoveProfilePermissionCommandError = async (output, context) => {
|
|
@@ -1257,7 +1042,6 @@ const deserializeAws_restJson1RemoveProfilePermissionCommandError = async (outpu
|
|
|
1257
1042
|
...output,
|
|
1258
1043
|
body: await parseBody(output.body, context),
|
|
1259
1044
|
};
|
|
1260
|
-
let response;
|
|
1261
1045
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1262
1046
|
switch (errorCode) {
|
|
1263
1047
|
case "AccessDeniedException":
|
|
@@ -1280,25 +1064,23 @@ const deserializeAws_restJson1RemoveProfilePermissionCommandError = async (outpu
|
|
|
1280
1064
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1281
1065
|
default:
|
|
1282
1066
|
const parsedBody = parsedOutput.body;
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
$metadata,
|
|
1067
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1068
|
+
output,
|
|
1069
|
+
parsedBody,
|
|
1070
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1071
|
+
errorCode,
|
|
1289
1072
|
});
|
|
1290
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1291
1073
|
}
|
|
1292
1074
|
};
|
|
1293
1075
|
const deserializeAws_restJson1RevokeSignatureCommand = async (output, context) => {
|
|
1294
1076
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1295
1077
|
return deserializeAws_restJson1RevokeSignatureCommandError(output, context);
|
|
1296
1078
|
}
|
|
1297
|
-
const contents = {
|
|
1079
|
+
const contents = map({
|
|
1298
1080
|
$metadata: deserializeMetadata(output),
|
|
1299
|
-
};
|
|
1081
|
+
});
|
|
1300
1082
|
await collectBody(output.body, context);
|
|
1301
|
-
return
|
|
1083
|
+
return contents;
|
|
1302
1084
|
};
|
|
1303
1085
|
exports.deserializeAws_restJson1RevokeSignatureCommand = deserializeAws_restJson1RevokeSignatureCommand;
|
|
1304
1086
|
const deserializeAws_restJson1RevokeSignatureCommandError = async (output, context) => {
|
|
@@ -1306,7 +1088,6 @@ const deserializeAws_restJson1RevokeSignatureCommandError = async (output, conte
|
|
|
1306
1088
|
...output,
|
|
1307
1089
|
body: await parseBody(output.body, context),
|
|
1308
1090
|
};
|
|
1309
|
-
let response;
|
|
1310
1091
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1311
1092
|
switch (errorCode) {
|
|
1312
1093
|
case "AccessDeniedException":
|
|
@@ -1326,25 +1107,23 @@ const deserializeAws_restJson1RevokeSignatureCommandError = async (output, conte
|
|
|
1326
1107
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1327
1108
|
default:
|
|
1328
1109
|
const parsedBody = parsedOutput.body;
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
$metadata,
|
|
1110
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1111
|
+
output,
|
|
1112
|
+
parsedBody,
|
|
1113
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1114
|
+
errorCode,
|
|
1335
1115
|
});
|
|
1336
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1337
1116
|
}
|
|
1338
1117
|
};
|
|
1339
1118
|
const deserializeAws_restJson1RevokeSigningProfileCommand = async (output, context) => {
|
|
1340
1119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1341
1120
|
return deserializeAws_restJson1RevokeSigningProfileCommandError(output, context);
|
|
1342
1121
|
}
|
|
1343
|
-
const contents = {
|
|
1122
|
+
const contents = map({
|
|
1344
1123
|
$metadata: deserializeMetadata(output),
|
|
1345
|
-
};
|
|
1124
|
+
});
|
|
1346
1125
|
await collectBody(output.body, context);
|
|
1347
|
-
return
|
|
1126
|
+
return contents;
|
|
1348
1127
|
};
|
|
1349
1128
|
exports.deserializeAws_restJson1RevokeSigningProfileCommand = deserializeAws_restJson1RevokeSigningProfileCommand;
|
|
1350
1129
|
const deserializeAws_restJson1RevokeSigningProfileCommandError = async (output, context) => {
|
|
@@ -1352,7 +1131,6 @@ const deserializeAws_restJson1RevokeSigningProfileCommandError = async (output,
|
|
|
1352
1131
|
...output,
|
|
1353
1132
|
body: await parseBody(output.body, context),
|
|
1354
1133
|
};
|
|
1355
|
-
let response;
|
|
1356
1134
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1357
1135
|
switch (errorCode) {
|
|
1358
1136
|
case "AccessDeniedException":
|
|
@@ -1372,33 +1150,29 @@ const deserializeAws_restJson1RevokeSigningProfileCommandError = async (output,
|
|
|
1372
1150
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1373
1151
|
default:
|
|
1374
1152
|
const parsedBody = parsedOutput.body;
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
$metadata,
|
|
1153
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1154
|
+
output,
|
|
1155
|
+
parsedBody,
|
|
1156
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1157
|
+
errorCode,
|
|
1381
1158
|
});
|
|
1382
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1383
1159
|
}
|
|
1384
1160
|
};
|
|
1385
1161
|
const deserializeAws_restJson1StartSigningJobCommand = async (output, context) => {
|
|
1386
1162
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1387
1163
|
return deserializeAws_restJson1StartSigningJobCommandError(output, context);
|
|
1388
1164
|
}
|
|
1389
|
-
const contents = {
|
|
1165
|
+
const contents = map({
|
|
1390
1166
|
$metadata: deserializeMetadata(output),
|
|
1391
|
-
|
|
1392
|
-
jobOwner: undefined,
|
|
1393
|
-
};
|
|
1167
|
+
});
|
|
1394
1168
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1395
|
-
if (data.jobId
|
|
1169
|
+
if (data.jobId != null) {
|
|
1396
1170
|
contents.jobId = (0, smithy_client_1.expectString)(data.jobId);
|
|
1397
1171
|
}
|
|
1398
|
-
if (data.jobOwner
|
|
1172
|
+
if (data.jobOwner != null) {
|
|
1399
1173
|
contents.jobOwner = (0, smithy_client_1.expectString)(data.jobOwner);
|
|
1400
1174
|
}
|
|
1401
|
-
return
|
|
1175
|
+
return contents;
|
|
1402
1176
|
};
|
|
1403
1177
|
exports.deserializeAws_restJson1StartSigningJobCommand = deserializeAws_restJson1StartSigningJobCommand;
|
|
1404
1178
|
const deserializeAws_restJson1StartSigningJobCommandError = async (output, context) => {
|
|
@@ -1406,7 +1180,6 @@ const deserializeAws_restJson1StartSigningJobCommandError = async (output, conte
|
|
|
1406
1180
|
...output,
|
|
1407
1181
|
body: await parseBody(output.body, context),
|
|
1408
1182
|
};
|
|
1409
|
-
let response;
|
|
1410
1183
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1411
1184
|
switch (errorCode) {
|
|
1412
1185
|
case "AccessDeniedException":
|
|
@@ -1429,25 +1202,23 @@ const deserializeAws_restJson1StartSigningJobCommandError = async (output, conte
|
|
|
1429
1202
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1430
1203
|
default:
|
|
1431
1204
|
const parsedBody = parsedOutput.body;
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
$metadata,
|
|
1205
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1206
|
+
output,
|
|
1207
|
+
parsedBody,
|
|
1208
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1209
|
+
errorCode,
|
|
1438
1210
|
});
|
|
1439
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1440
1211
|
}
|
|
1441
1212
|
};
|
|
1442
1213
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1443
1214
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1444
1215
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1445
1216
|
}
|
|
1446
|
-
const contents = {
|
|
1217
|
+
const contents = map({
|
|
1447
1218
|
$metadata: deserializeMetadata(output),
|
|
1448
|
-
};
|
|
1219
|
+
});
|
|
1449
1220
|
await collectBody(output.body, context);
|
|
1450
|
-
return
|
|
1221
|
+
return contents;
|
|
1451
1222
|
};
|
|
1452
1223
|
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
1453
1224
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
@@ -1455,7 +1226,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1455
1226
|
...output,
|
|
1456
1227
|
body: await parseBody(output.body, context),
|
|
1457
1228
|
};
|
|
1458
|
-
let response;
|
|
1459
1229
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1460
1230
|
switch (errorCode) {
|
|
1461
1231
|
case "BadRequestException":
|
|
@@ -1472,25 +1242,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1472
1242
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1473
1243
|
default:
|
|
1474
1244
|
const parsedBody = parsedOutput.body;
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
$metadata,
|
|
1245
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1246
|
+
output,
|
|
1247
|
+
parsedBody,
|
|
1248
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1249
|
+
errorCode,
|
|
1481
1250
|
});
|
|
1482
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1483
1251
|
}
|
|
1484
1252
|
};
|
|
1485
1253
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1486
1254
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1487
1255
|
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1488
1256
|
}
|
|
1489
|
-
const contents = {
|
|
1257
|
+
const contents = map({
|
|
1490
1258
|
$metadata: deserializeMetadata(output),
|
|
1491
|
-
};
|
|
1259
|
+
});
|
|
1492
1260
|
await collectBody(output.body, context);
|
|
1493
|
-
return
|
|
1261
|
+
return contents;
|
|
1494
1262
|
};
|
|
1495
1263
|
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
1496
1264
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
@@ -1498,7 +1266,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1498
1266
|
...output,
|
|
1499
1267
|
body: await parseBody(output.body, context),
|
|
1500
1268
|
};
|
|
1501
|
-
let response;
|
|
1502
1269
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1503
1270
|
switch (errorCode) {
|
|
1504
1271
|
case "BadRequestException":
|
|
@@ -1515,23 +1282,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1515
1282
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1516
1283
|
default:
|
|
1517
1284
|
const parsedBody = parsedOutput.body;
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
$metadata,
|
|
1285
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1286
|
+
output,
|
|
1287
|
+
parsedBody,
|
|
1288
|
+
exceptionCtor: SignerServiceException_1.SignerServiceException,
|
|
1289
|
+
errorCode,
|
|
1524
1290
|
});
|
|
1525
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1526
1291
|
}
|
|
1527
1292
|
};
|
|
1293
|
+
const map = smithy_client_1.map;
|
|
1528
1294
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1529
|
-
const contents = {};
|
|
1295
|
+
const contents = map({});
|
|
1530
1296
|
const data = parsedOutput.body;
|
|
1531
|
-
if (data.code
|
|
1297
|
+
if (data.code != null) {
|
|
1532
1298
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1533
1299
|
}
|
|
1534
|
-
if (data.message
|
|
1300
|
+
if (data.message != null) {
|
|
1535
1301
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1536
1302
|
}
|
|
1537
1303
|
const exception = new models_0_1.AccessDeniedException({
|
|
@@ -1541,12 +1307,12 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
1541
1307
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1542
1308
|
};
|
|
1543
1309
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1544
|
-
const contents = {};
|
|
1310
|
+
const contents = map({});
|
|
1545
1311
|
const data = parsedOutput.body;
|
|
1546
|
-
if (data.code
|
|
1312
|
+
if (data.code != null) {
|
|
1547
1313
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1548
1314
|
}
|
|
1549
|
-
if (data.message
|
|
1315
|
+
if (data.message != null) {
|
|
1550
1316
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1551
1317
|
}
|
|
1552
1318
|
const exception = new models_0_1.BadRequestException({
|
|
@@ -1556,12 +1322,12 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
1556
1322
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1557
1323
|
};
|
|
1558
1324
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1559
|
-
const contents = {};
|
|
1325
|
+
const contents = map({});
|
|
1560
1326
|
const data = parsedOutput.body;
|
|
1561
|
-
if (data.code
|
|
1327
|
+
if (data.code != null) {
|
|
1562
1328
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1563
1329
|
}
|
|
1564
|
-
if (data.message
|
|
1330
|
+
if (data.message != null) {
|
|
1565
1331
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1566
1332
|
}
|
|
1567
1333
|
const exception = new models_0_1.ConflictException({
|
|
@@ -1571,12 +1337,12 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
1571
1337
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1572
1338
|
};
|
|
1573
1339
|
const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1574
|
-
const contents = {};
|
|
1340
|
+
const contents = map({});
|
|
1575
1341
|
const data = parsedOutput.body;
|
|
1576
|
-
if (data.code
|
|
1342
|
+
if (data.code != null) {
|
|
1577
1343
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1578
1344
|
}
|
|
1579
|
-
if (data.message
|
|
1345
|
+
if (data.message != null) {
|
|
1580
1346
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1581
1347
|
}
|
|
1582
1348
|
const exception = new models_0_1.InternalServiceErrorException({
|
|
@@ -1586,12 +1352,12 @@ const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (par
|
|
|
1586
1352
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1587
1353
|
};
|
|
1588
1354
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1589
|
-
const contents = {};
|
|
1355
|
+
const contents = map({});
|
|
1590
1356
|
const data = parsedOutput.body;
|
|
1591
|
-
if (data.code
|
|
1357
|
+
if (data.code != null) {
|
|
1592
1358
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1593
1359
|
}
|
|
1594
|
-
if (data.message
|
|
1360
|
+
if (data.message != null) {
|
|
1595
1361
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1596
1362
|
}
|
|
1597
1363
|
const exception = new models_0_1.NotFoundException({
|
|
@@ -1601,12 +1367,12 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
1601
1367
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1602
1368
|
};
|
|
1603
1369
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1604
|
-
const contents = {};
|
|
1370
|
+
const contents = map({});
|
|
1605
1371
|
const data = parsedOutput.body;
|
|
1606
|
-
if (data.code
|
|
1372
|
+
if (data.code != null) {
|
|
1607
1373
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1608
1374
|
}
|
|
1609
|
-
if (data.message
|
|
1375
|
+
if (data.message != null) {
|
|
1610
1376
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1611
1377
|
}
|
|
1612
1378
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -1616,12 +1382,12 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
1616
1382
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1617
1383
|
};
|
|
1618
1384
|
const deserializeAws_restJson1ServiceLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1619
|
-
const contents = {};
|
|
1385
|
+
const contents = map({});
|
|
1620
1386
|
const data = parsedOutput.body;
|
|
1621
|
-
if (data.code
|
|
1387
|
+
if (data.code != null) {
|
|
1622
1388
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1623
1389
|
}
|
|
1624
|
-
if (data.message
|
|
1390
|
+
if (data.message != null) {
|
|
1625
1391
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1626
1392
|
}
|
|
1627
1393
|
const exception = new models_0_1.ServiceLimitExceededException({
|
|
@@ -1631,12 +1397,12 @@ const deserializeAws_restJson1ServiceLimitExceededExceptionResponse = async (par
|
|
|
1631
1397
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1632
1398
|
};
|
|
1633
1399
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1634
|
-
const contents = {};
|
|
1400
|
+
const contents = map({});
|
|
1635
1401
|
const data = parsedOutput.body;
|
|
1636
|
-
if (data.code
|
|
1402
|
+
if (data.code != null) {
|
|
1637
1403
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1638
1404
|
}
|
|
1639
|
-
if (data.message
|
|
1405
|
+
if (data.message != null) {
|
|
1640
1406
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1641
1407
|
}
|
|
1642
1408
|
const exception = new models_0_1.ThrottlingException({
|
|
@@ -1646,12 +1412,12 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
1646
1412
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1647
1413
|
};
|
|
1648
1414
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1649
|
-
const contents = {};
|
|
1415
|
+
const contents = map({});
|
|
1650
1416
|
const data = parsedOutput.body;
|
|
1651
|
-
if (data.code
|
|
1417
|
+
if (data.code != null) {
|
|
1652
1418
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1653
1419
|
}
|
|
1654
|
-
if (data.message
|
|
1420
|
+
if (data.message != null) {
|
|
1655
1421
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1656
1422
|
}
|
|
1657
1423
|
const exception = new models_0_1.TooManyRequestsException({
|
|
@@ -1661,12 +1427,12 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
1661
1427
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1662
1428
|
};
|
|
1663
1429
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1664
|
-
const contents = {};
|
|
1430
|
+
const contents = map({});
|
|
1665
1431
|
const data = parsedOutput.body;
|
|
1666
|
-
if (data.code
|
|
1432
|
+
if (data.code != null) {
|
|
1667
1433
|
contents.code = (0, smithy_client_1.expectString)(data.code);
|
|
1668
1434
|
}
|
|
1669
|
-
if (data.message
|
|
1435
|
+
if (data.message != null) {
|
|
1670
1436
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
1671
1437
|
}
|
|
1672
1438
|
const exception = new models_0_1.ValidationException({
|