@aws-sdk/client-serverlessapplicationrepository 3.131.0 → 3.142.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 +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/CreateApplicationCommand.js +2 -2
- package/dist-cjs/commands/CreateApplicationVersionCommand.js +2 -2
- package/dist-cjs/commands/CreateCloudFormationChangeSetCommand.js +2 -2
- package/dist-cjs/commands/CreateCloudFormationTemplateCommand.js +2 -2
- package/dist-cjs/commands/DeleteApplicationCommand.js +1 -1
- package/dist-cjs/commands/GetApplicationCommand.js +2 -2
- package/dist-cjs/commands/GetApplicationPolicyCommand.js +2 -2
- package/dist-cjs/commands/GetCloudFormationTemplateCommand.js +2 -2
- package/dist-cjs/commands/ListApplicationDependenciesCommand.js +2 -2
- package/dist-cjs/commands/ListApplicationVersionsCommand.js +2 -2
- package/dist-cjs/commands/ListApplicationsCommand.js +2 -2
- package/dist-cjs/commands/PutApplicationPolicyCommand.js +2 -2
- package/dist-cjs/commands/UnshareApplicationCommand.js +1 -1
- package/dist-cjs/commands/UpdateApplicationCommand.js +2 -2
- package/dist-cjs/models/models_0.js +145 -217
- package/dist-cjs/protocols/Aws_restJson1.js +235 -491
- package/dist-es/commands/CreateApplicationCommand.js +3 -3
- package/dist-es/commands/CreateApplicationVersionCommand.js +3 -3
- package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +3 -3
- package/dist-es/commands/CreateCloudFormationTemplateCommand.js +3 -3
- package/dist-es/commands/DeleteApplicationCommand.js +2 -2
- package/dist-es/commands/GetApplicationCommand.js +3 -3
- package/dist-es/commands/GetApplicationPolicyCommand.js +3 -3
- package/dist-es/commands/GetCloudFormationTemplateCommand.js +3 -3
- package/dist-es/commands/ListApplicationDependenciesCommand.js +3 -3
- package/dist-es/commands/ListApplicationVersionsCommand.js +3 -3
- package/dist-es/commands/ListApplicationsCommand.js +3 -3
- package/dist-es/commands/PutApplicationPolicyCommand.js +3 -3
- package/dist-es/commands/UnshareApplicationCommand.js +2 -2
- package/dist-es/commands/UpdateApplicationCommand.js +3 -3
- package/dist-es/models/models_0.js +36 -144
- package/dist-es/protocols/Aws_restJson1.js +290 -492
- package/dist-types/models/models_0.d.ts +144 -216
- package/dist-types/ts3.4/models/models_0.d.ts +72 -144
- package/package.json +6 -6
|
@@ -47,26 +47,8 @@ const serializeAws_restJson1CreateApplicationVersionCommand = async (input, cont
|
|
|
47
47
|
};
|
|
48
48
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
49
49
|
"/applications/{ApplicationId}/versions/{SemanticVersion}";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (labelValue.length <= 0) {
|
|
53
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
54
|
-
}
|
|
55
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
59
|
-
}
|
|
60
|
-
if (input.SemanticVersion !== undefined) {
|
|
61
|
-
const labelValue = input.SemanticVersion;
|
|
62
|
-
if (labelValue.length <= 0) {
|
|
63
|
-
throw new Error("Empty value provided for input HTTP label: SemanticVersion.");
|
|
64
|
-
}
|
|
65
|
-
resolvedPath = resolvedPath.replace("{SemanticVersion}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
throw new Error("No value provided for input HTTP label: SemanticVersion.");
|
|
69
|
-
}
|
|
50
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
51
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SemanticVersion", () => input.SemanticVersion, "{SemanticVersion}", false);
|
|
70
52
|
let body;
|
|
71
53
|
body = JSON.stringify({
|
|
72
54
|
...(input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }),
|
|
@@ -91,16 +73,7 @@ const serializeAws_restJson1CreateCloudFormationChangeSetCommand = async (input,
|
|
|
91
73
|
"content-type": "application/json",
|
|
92
74
|
};
|
|
93
75
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/changesets";
|
|
94
|
-
|
|
95
|
-
const labelValue = input.ApplicationId;
|
|
96
|
-
if (labelValue.length <= 0) {
|
|
97
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
98
|
-
}
|
|
99
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
103
|
-
}
|
|
76
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
104
77
|
let body;
|
|
105
78
|
body = JSON.stringify({
|
|
106
79
|
...(input.Capabilities != null && {
|
|
@@ -143,16 +116,7 @@ const serializeAws_restJson1CreateCloudFormationTemplateCommand = async (input,
|
|
|
143
116
|
"content-type": "application/json",
|
|
144
117
|
};
|
|
145
118
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/templates";
|
|
146
|
-
|
|
147
|
-
const labelValue = input.ApplicationId;
|
|
148
|
-
if (labelValue.length <= 0) {
|
|
149
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
150
|
-
}
|
|
151
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
155
|
-
}
|
|
119
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
156
120
|
let body;
|
|
157
121
|
body = JSON.stringify({
|
|
158
122
|
...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }),
|
|
@@ -172,16 +136,7 @@ const serializeAws_restJson1DeleteApplicationCommand = async (input, context) =>
|
|
|
172
136
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
173
137
|
const headers = {};
|
|
174
138
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
175
|
-
|
|
176
|
-
const labelValue = input.ApplicationId;
|
|
177
|
-
if (labelValue.length <= 0) {
|
|
178
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
179
|
-
}
|
|
180
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
184
|
-
}
|
|
139
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
185
140
|
let body;
|
|
186
141
|
return new protocol_http_1.HttpRequest({
|
|
187
142
|
protocol,
|
|
@@ -198,19 +153,10 @@ const serializeAws_restJson1GetApplicationCommand = async (input, context) => {
|
|
|
198
153
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
154
|
const headers = {};
|
|
200
155
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
210
|
-
}
|
|
211
|
-
const query = {
|
|
212
|
-
...(input.SemanticVersion !== undefined && { semanticVersion: input.SemanticVersion }),
|
|
213
|
-
};
|
|
156
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
157
|
+
const query = map({
|
|
158
|
+
semanticVersion: [, input.SemanticVersion],
|
|
159
|
+
});
|
|
214
160
|
let body;
|
|
215
161
|
return new protocol_http_1.HttpRequest({
|
|
216
162
|
protocol,
|
|
@@ -228,16 +174,7 @@ const serializeAws_restJson1GetApplicationPolicyCommand = async (input, context)
|
|
|
228
174
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
229
175
|
const headers = {};
|
|
230
176
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
|
|
231
|
-
|
|
232
|
-
const labelValue = input.ApplicationId;
|
|
233
|
-
if (labelValue.length <= 0) {
|
|
234
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
235
|
-
}
|
|
236
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
240
|
-
}
|
|
177
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
241
178
|
let body;
|
|
242
179
|
return new protocol_http_1.HttpRequest({
|
|
243
180
|
protocol,
|
|
@@ -255,26 +192,8 @@ const serializeAws_restJson1GetCloudFormationTemplateCommand = async (input, con
|
|
|
255
192
|
const headers = {};
|
|
256
193
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
257
194
|
"/applications/{ApplicationId}/templates/{TemplateId}";
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (labelValue.length <= 0) {
|
|
261
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
262
|
-
}
|
|
263
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
267
|
-
}
|
|
268
|
-
if (input.TemplateId !== undefined) {
|
|
269
|
-
const labelValue = input.TemplateId;
|
|
270
|
-
if (labelValue.length <= 0) {
|
|
271
|
-
throw new Error("Empty value provided for input HTTP label: TemplateId.");
|
|
272
|
-
}
|
|
273
|
-
resolvedPath = resolvedPath.replace("{TemplateId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
throw new Error("No value provided for input HTTP label: TemplateId.");
|
|
277
|
-
}
|
|
195
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
196
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateId", () => input.TemplateId, "{TemplateId}", false);
|
|
278
197
|
let body;
|
|
279
198
|
return new protocol_http_1.HttpRequest({
|
|
280
199
|
protocol,
|
|
@@ -292,21 +211,12 @@ const serializeAws_restJson1ListApplicationDependenciesCommand = async (input, c
|
|
|
292
211
|
const headers = {};
|
|
293
212
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
294
213
|
"/applications/{ApplicationId}/dependencies";
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
304
|
-
}
|
|
305
|
-
const query = {
|
|
306
|
-
...(input.MaxItems !== undefined && { maxItems: input.MaxItems.toString() }),
|
|
307
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
308
|
-
...(input.SemanticVersion !== undefined && { semanticVersion: input.SemanticVersion }),
|
|
309
|
-
};
|
|
214
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
215
|
+
const query = map({
|
|
216
|
+
maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
|
|
217
|
+
nextToken: [, input.NextToken],
|
|
218
|
+
semanticVersion: [, input.SemanticVersion],
|
|
219
|
+
});
|
|
310
220
|
let body;
|
|
311
221
|
return new protocol_http_1.HttpRequest({
|
|
312
222
|
protocol,
|
|
@@ -324,10 +234,10 @@ const serializeAws_restJson1ListApplicationsCommand = async (input, context) =>
|
|
|
324
234
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
325
235
|
const headers = {};
|
|
326
236
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
327
|
-
const query = {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
};
|
|
237
|
+
const query = map({
|
|
238
|
+
maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
|
|
239
|
+
nextToken: [, input.NextToken],
|
|
240
|
+
});
|
|
331
241
|
let body;
|
|
332
242
|
return new protocol_http_1.HttpRequest({
|
|
333
243
|
protocol,
|
|
@@ -345,20 +255,11 @@ const serializeAws_restJson1ListApplicationVersionsCommand = async (input, conte
|
|
|
345
255
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
346
256
|
const headers = {};
|
|
347
257
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/versions";
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
354
|
-
}
|
|
355
|
-
else {
|
|
356
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
357
|
-
}
|
|
358
|
-
const query = {
|
|
359
|
-
...(input.MaxItems !== undefined && { maxItems: input.MaxItems.toString() }),
|
|
360
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
361
|
-
};
|
|
258
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
259
|
+
const query = map({
|
|
260
|
+
maxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
|
|
261
|
+
nextToken: [, input.NextToken],
|
|
262
|
+
});
|
|
362
263
|
let body;
|
|
363
264
|
return new protocol_http_1.HttpRequest({
|
|
364
265
|
protocol,
|
|
@@ -378,16 +279,7 @@ const serializeAws_restJson1PutApplicationPolicyCommand = async (input, context)
|
|
|
378
279
|
"content-type": "application/json",
|
|
379
280
|
};
|
|
380
281
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/policy";
|
|
381
|
-
|
|
382
|
-
const labelValue = input.ApplicationId;
|
|
383
|
-
if (labelValue.length <= 0) {
|
|
384
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
385
|
-
}
|
|
386
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
390
|
-
}
|
|
282
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
391
283
|
let body;
|
|
392
284
|
body = JSON.stringify({
|
|
393
285
|
...(input.Statements != null && {
|
|
@@ -411,16 +303,7 @@ const serializeAws_restJson1UnshareApplicationCommand = async (input, context) =
|
|
|
411
303
|
"content-type": "application/json",
|
|
412
304
|
};
|
|
413
305
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}/unshare";
|
|
414
|
-
|
|
415
|
-
const labelValue = input.ApplicationId;
|
|
416
|
-
if (labelValue.length <= 0) {
|
|
417
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
418
|
-
}
|
|
419
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
420
|
-
}
|
|
421
|
-
else {
|
|
422
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
423
|
-
}
|
|
306
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
424
307
|
let body;
|
|
425
308
|
body = JSON.stringify({
|
|
426
309
|
...(input.OrganizationId != null && { organizationId: input.OrganizationId }),
|
|
@@ -442,16 +325,7 @@ const serializeAws_restJson1UpdateApplicationCommand = async (input, context) =>
|
|
|
442
325
|
"content-type": "application/json",
|
|
443
326
|
};
|
|
444
327
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{ApplicationId}";
|
|
445
|
-
|
|
446
|
-
const labelValue = input.ApplicationId;
|
|
447
|
-
if (labelValue.length <= 0) {
|
|
448
|
-
throw new Error("Empty value provided for input HTTP label: ApplicationId.");
|
|
449
|
-
}
|
|
450
|
-
resolvedPath = resolvedPath.replace("{ApplicationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
throw new Error("No value provided for input HTTP label: ApplicationId.");
|
|
454
|
-
}
|
|
328
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
|
|
455
329
|
let body;
|
|
456
330
|
body = JSON.stringify({
|
|
457
331
|
...(input.Author != null && { author: input.Author }),
|
|
@@ -476,63 +350,50 @@ const deserializeAws_restJson1CreateApplicationCommand = async (output, context)
|
|
|
476
350
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
477
351
|
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
478
352
|
}
|
|
479
|
-
const contents = {
|
|
353
|
+
const contents = map({
|
|
480
354
|
$metadata: deserializeMetadata(output),
|
|
481
|
-
|
|
482
|
-
Author: undefined,
|
|
483
|
-
CreationTime: undefined,
|
|
484
|
-
Description: undefined,
|
|
485
|
-
HomePageUrl: undefined,
|
|
486
|
-
IsVerifiedAuthor: undefined,
|
|
487
|
-
Labels: undefined,
|
|
488
|
-
LicenseUrl: undefined,
|
|
489
|
-
Name: undefined,
|
|
490
|
-
ReadmeUrl: undefined,
|
|
491
|
-
SpdxLicenseId: undefined,
|
|
492
|
-
VerifiedAuthorUrl: undefined,
|
|
493
|
-
Version: undefined,
|
|
494
|
-
};
|
|
355
|
+
});
|
|
495
356
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
496
|
-
if (data.applicationId
|
|
357
|
+
if (data.applicationId != null) {
|
|
497
358
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
498
359
|
}
|
|
499
|
-
if (data.author
|
|
360
|
+
if (data.author != null) {
|
|
500
361
|
contents.Author = (0, smithy_client_1.expectString)(data.author);
|
|
501
362
|
}
|
|
502
|
-
if (data.creationTime
|
|
363
|
+
if (data.creationTime != null) {
|
|
503
364
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
504
365
|
}
|
|
505
|
-
if (data.description
|
|
366
|
+
if (data.description != null) {
|
|
506
367
|
contents.Description = (0, smithy_client_1.expectString)(data.description);
|
|
507
368
|
}
|
|
508
|
-
if (data.homePageUrl
|
|
369
|
+
if (data.homePageUrl != null) {
|
|
509
370
|
contents.HomePageUrl = (0, smithy_client_1.expectString)(data.homePageUrl);
|
|
510
371
|
}
|
|
511
|
-
if (data.isVerifiedAuthor
|
|
372
|
+
if (data.isVerifiedAuthor != null) {
|
|
512
373
|
contents.IsVerifiedAuthor = (0, smithy_client_1.expectBoolean)(data.isVerifiedAuthor);
|
|
513
374
|
}
|
|
514
|
-
if (data.labels
|
|
375
|
+
if (data.labels != null) {
|
|
515
376
|
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
516
377
|
}
|
|
517
|
-
if (data.licenseUrl
|
|
378
|
+
if (data.licenseUrl != null) {
|
|
518
379
|
contents.LicenseUrl = (0, smithy_client_1.expectString)(data.licenseUrl);
|
|
519
380
|
}
|
|
520
|
-
if (data.name
|
|
381
|
+
if (data.name != null) {
|
|
521
382
|
contents.Name = (0, smithy_client_1.expectString)(data.name);
|
|
522
383
|
}
|
|
523
|
-
if (data.readmeUrl
|
|
384
|
+
if (data.readmeUrl != null) {
|
|
524
385
|
contents.ReadmeUrl = (0, smithy_client_1.expectString)(data.readmeUrl);
|
|
525
386
|
}
|
|
526
|
-
if (data.spdxLicenseId
|
|
387
|
+
if (data.spdxLicenseId != null) {
|
|
527
388
|
contents.SpdxLicenseId = (0, smithy_client_1.expectString)(data.spdxLicenseId);
|
|
528
389
|
}
|
|
529
|
-
if (data.verifiedAuthorUrl
|
|
390
|
+
if (data.verifiedAuthorUrl != null) {
|
|
530
391
|
contents.VerifiedAuthorUrl = (0, smithy_client_1.expectString)(data.verifiedAuthorUrl);
|
|
531
392
|
}
|
|
532
|
-
if (data.version
|
|
393
|
+
if (data.version != null) {
|
|
533
394
|
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
534
395
|
}
|
|
535
|
-
return
|
|
396
|
+
return contents;
|
|
536
397
|
};
|
|
537
398
|
exports.deserializeAws_restJson1CreateApplicationCommand = deserializeAws_restJson1CreateApplicationCommand;
|
|
538
399
|
const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
|
|
@@ -540,7 +401,6 @@ const deserializeAws_restJson1CreateApplicationCommandError = async (output, con
|
|
|
540
401
|
...output,
|
|
541
402
|
body: await parseBody(output.body, context),
|
|
542
403
|
};
|
|
543
|
-
let response;
|
|
544
404
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
545
405
|
switch (errorCode) {
|
|
546
406
|
case "BadRequestException":
|
|
@@ -560,61 +420,50 @@ const deserializeAws_restJson1CreateApplicationCommandError = async (output, con
|
|
|
560
420
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
561
421
|
default:
|
|
562
422
|
const parsedBody = parsedOutput.body;
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
$metadata,
|
|
423
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
424
|
+
output,
|
|
425
|
+
parsedBody,
|
|
426
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
427
|
+
errorCode,
|
|
569
428
|
});
|
|
570
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
571
429
|
}
|
|
572
430
|
};
|
|
573
431
|
const deserializeAws_restJson1CreateApplicationVersionCommand = async (output, context) => {
|
|
574
432
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
575
433
|
return deserializeAws_restJson1CreateApplicationVersionCommandError(output, context);
|
|
576
434
|
}
|
|
577
|
-
const contents = {
|
|
435
|
+
const contents = map({
|
|
578
436
|
$metadata: deserializeMetadata(output),
|
|
579
|
-
|
|
580
|
-
CreationTime: undefined,
|
|
581
|
-
ParameterDefinitions: undefined,
|
|
582
|
-
RequiredCapabilities: undefined,
|
|
583
|
-
ResourcesSupported: undefined,
|
|
584
|
-
SemanticVersion: undefined,
|
|
585
|
-
SourceCodeArchiveUrl: undefined,
|
|
586
|
-
SourceCodeUrl: undefined,
|
|
587
|
-
TemplateUrl: undefined,
|
|
588
|
-
};
|
|
437
|
+
});
|
|
589
438
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
590
|
-
if (data.applicationId
|
|
439
|
+
if (data.applicationId != null) {
|
|
591
440
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
592
441
|
}
|
|
593
|
-
if (data.creationTime
|
|
442
|
+
if (data.creationTime != null) {
|
|
594
443
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
595
444
|
}
|
|
596
|
-
if (data.parameterDefinitions
|
|
445
|
+
if (data.parameterDefinitions != null) {
|
|
597
446
|
contents.ParameterDefinitions = deserializeAws_restJson1__listOfParameterDefinition(data.parameterDefinitions, context);
|
|
598
447
|
}
|
|
599
|
-
if (data.requiredCapabilities
|
|
448
|
+
if (data.requiredCapabilities != null) {
|
|
600
449
|
contents.RequiredCapabilities = deserializeAws_restJson1__listOfCapability(data.requiredCapabilities, context);
|
|
601
450
|
}
|
|
602
|
-
if (data.resourcesSupported
|
|
451
|
+
if (data.resourcesSupported != null) {
|
|
603
452
|
contents.ResourcesSupported = (0, smithy_client_1.expectBoolean)(data.resourcesSupported);
|
|
604
453
|
}
|
|
605
|
-
if (data.semanticVersion
|
|
454
|
+
if (data.semanticVersion != null) {
|
|
606
455
|
contents.SemanticVersion = (0, smithy_client_1.expectString)(data.semanticVersion);
|
|
607
456
|
}
|
|
608
|
-
if (data.sourceCodeArchiveUrl
|
|
457
|
+
if (data.sourceCodeArchiveUrl != null) {
|
|
609
458
|
contents.SourceCodeArchiveUrl = (0, smithy_client_1.expectString)(data.sourceCodeArchiveUrl);
|
|
610
459
|
}
|
|
611
|
-
if (data.sourceCodeUrl
|
|
460
|
+
if (data.sourceCodeUrl != null) {
|
|
612
461
|
contents.SourceCodeUrl = (0, smithy_client_1.expectString)(data.sourceCodeUrl);
|
|
613
462
|
}
|
|
614
|
-
if (data.templateUrl
|
|
463
|
+
if (data.templateUrl != null) {
|
|
615
464
|
contents.TemplateUrl = (0, smithy_client_1.expectString)(data.templateUrl);
|
|
616
465
|
}
|
|
617
|
-
return
|
|
466
|
+
return contents;
|
|
618
467
|
};
|
|
619
468
|
exports.deserializeAws_restJson1CreateApplicationVersionCommand = deserializeAws_restJson1CreateApplicationVersionCommand;
|
|
620
469
|
const deserializeAws_restJson1CreateApplicationVersionCommandError = async (output, context) => {
|
|
@@ -622,7 +471,6 @@ const deserializeAws_restJson1CreateApplicationVersionCommandError = async (outp
|
|
|
622
471
|
...output,
|
|
623
472
|
body: await parseBody(output.body, context),
|
|
624
473
|
};
|
|
625
|
-
let response;
|
|
626
474
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
627
475
|
switch (errorCode) {
|
|
628
476
|
case "BadRequestException":
|
|
@@ -642,41 +490,35 @@ const deserializeAws_restJson1CreateApplicationVersionCommandError = async (outp
|
|
|
642
490
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
643
491
|
default:
|
|
644
492
|
const parsedBody = parsedOutput.body;
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
$metadata,
|
|
493
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
494
|
+
output,
|
|
495
|
+
parsedBody,
|
|
496
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
497
|
+
errorCode,
|
|
651
498
|
});
|
|
652
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
653
499
|
}
|
|
654
500
|
};
|
|
655
501
|
const deserializeAws_restJson1CreateCloudFormationChangeSetCommand = async (output, context) => {
|
|
656
502
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
657
503
|
return deserializeAws_restJson1CreateCloudFormationChangeSetCommandError(output, context);
|
|
658
504
|
}
|
|
659
|
-
const contents = {
|
|
505
|
+
const contents = map({
|
|
660
506
|
$metadata: deserializeMetadata(output),
|
|
661
|
-
|
|
662
|
-
ChangeSetId: undefined,
|
|
663
|
-
SemanticVersion: undefined,
|
|
664
|
-
StackId: undefined,
|
|
665
|
-
};
|
|
507
|
+
});
|
|
666
508
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
667
|
-
if (data.applicationId
|
|
509
|
+
if (data.applicationId != null) {
|
|
668
510
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
669
511
|
}
|
|
670
|
-
if (data.changeSetId
|
|
512
|
+
if (data.changeSetId != null) {
|
|
671
513
|
contents.ChangeSetId = (0, smithy_client_1.expectString)(data.changeSetId);
|
|
672
514
|
}
|
|
673
|
-
if (data.semanticVersion
|
|
515
|
+
if (data.semanticVersion != null) {
|
|
674
516
|
contents.SemanticVersion = (0, smithy_client_1.expectString)(data.semanticVersion);
|
|
675
517
|
}
|
|
676
|
-
if (data.stackId
|
|
518
|
+
if (data.stackId != null) {
|
|
677
519
|
contents.StackId = (0, smithy_client_1.expectString)(data.stackId);
|
|
678
520
|
}
|
|
679
|
-
return
|
|
521
|
+
return contents;
|
|
680
522
|
};
|
|
681
523
|
exports.deserializeAws_restJson1CreateCloudFormationChangeSetCommand = deserializeAws_restJson1CreateCloudFormationChangeSetCommand;
|
|
682
524
|
const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async (output, context) => {
|
|
@@ -684,7 +526,6 @@ const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async
|
|
|
684
526
|
...output,
|
|
685
527
|
body: await parseBody(output.body, context),
|
|
686
528
|
};
|
|
687
|
-
let response;
|
|
688
529
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
689
530
|
switch (errorCode) {
|
|
690
531
|
case "BadRequestException":
|
|
@@ -701,53 +542,44 @@ const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async
|
|
|
701
542
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
702
543
|
default:
|
|
703
544
|
const parsedBody = parsedOutput.body;
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
$metadata,
|
|
545
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
546
|
+
output,
|
|
547
|
+
parsedBody,
|
|
548
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
549
|
+
errorCode,
|
|
710
550
|
});
|
|
711
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
712
551
|
}
|
|
713
552
|
};
|
|
714
553
|
const deserializeAws_restJson1CreateCloudFormationTemplateCommand = async (output, context) => {
|
|
715
554
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
716
555
|
return deserializeAws_restJson1CreateCloudFormationTemplateCommandError(output, context);
|
|
717
556
|
}
|
|
718
|
-
const contents = {
|
|
557
|
+
const contents = map({
|
|
719
558
|
$metadata: deserializeMetadata(output),
|
|
720
|
-
|
|
721
|
-
CreationTime: undefined,
|
|
722
|
-
ExpirationTime: undefined,
|
|
723
|
-
SemanticVersion: undefined,
|
|
724
|
-
Status: undefined,
|
|
725
|
-
TemplateId: undefined,
|
|
726
|
-
TemplateUrl: undefined,
|
|
727
|
-
};
|
|
559
|
+
});
|
|
728
560
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
729
|
-
if (data.applicationId
|
|
561
|
+
if (data.applicationId != null) {
|
|
730
562
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
731
563
|
}
|
|
732
|
-
if (data.creationTime
|
|
564
|
+
if (data.creationTime != null) {
|
|
733
565
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
734
566
|
}
|
|
735
|
-
if (data.expirationTime
|
|
567
|
+
if (data.expirationTime != null) {
|
|
736
568
|
contents.ExpirationTime = (0, smithy_client_1.expectString)(data.expirationTime);
|
|
737
569
|
}
|
|
738
|
-
if (data.semanticVersion
|
|
570
|
+
if (data.semanticVersion != null) {
|
|
739
571
|
contents.SemanticVersion = (0, smithy_client_1.expectString)(data.semanticVersion);
|
|
740
572
|
}
|
|
741
|
-
if (data.status
|
|
573
|
+
if (data.status != null) {
|
|
742
574
|
contents.Status = (0, smithy_client_1.expectString)(data.status);
|
|
743
575
|
}
|
|
744
|
-
if (data.templateId
|
|
576
|
+
if (data.templateId != null) {
|
|
745
577
|
contents.TemplateId = (0, smithy_client_1.expectString)(data.templateId);
|
|
746
578
|
}
|
|
747
|
-
if (data.templateUrl
|
|
579
|
+
if (data.templateUrl != null) {
|
|
748
580
|
contents.TemplateUrl = (0, smithy_client_1.expectString)(data.templateUrl);
|
|
749
581
|
}
|
|
750
|
-
return
|
|
582
|
+
return contents;
|
|
751
583
|
};
|
|
752
584
|
exports.deserializeAws_restJson1CreateCloudFormationTemplateCommand = deserializeAws_restJson1CreateCloudFormationTemplateCommand;
|
|
753
585
|
const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (output, context) => {
|
|
@@ -755,7 +587,6 @@ const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (
|
|
|
755
587
|
...output,
|
|
756
588
|
body: await parseBody(output.body, context),
|
|
757
589
|
};
|
|
758
|
-
let response;
|
|
759
590
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
760
591
|
switch (errorCode) {
|
|
761
592
|
case "BadRequestException":
|
|
@@ -775,25 +606,23 @@ const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (
|
|
|
775
606
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
776
607
|
default:
|
|
777
608
|
const parsedBody = parsedOutput.body;
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
$metadata,
|
|
609
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
610
|
+
output,
|
|
611
|
+
parsedBody,
|
|
612
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
613
|
+
errorCode,
|
|
784
614
|
});
|
|
785
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
786
615
|
}
|
|
787
616
|
};
|
|
788
617
|
const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
|
|
789
618
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
790
619
|
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
791
620
|
}
|
|
792
|
-
const contents = {
|
|
621
|
+
const contents = map({
|
|
793
622
|
$metadata: deserializeMetadata(output),
|
|
794
|
-
};
|
|
623
|
+
});
|
|
795
624
|
await collectBody(output.body, context);
|
|
796
|
-
return
|
|
625
|
+
return contents;
|
|
797
626
|
};
|
|
798
627
|
exports.deserializeAws_restJson1DeleteApplicationCommand = deserializeAws_restJson1DeleteApplicationCommand;
|
|
799
628
|
const deserializeAws_restJson1DeleteApplicationCommandError = async (output, context) => {
|
|
@@ -801,7 +630,6 @@ const deserializeAws_restJson1DeleteApplicationCommandError = async (output, con
|
|
|
801
630
|
...output,
|
|
802
631
|
body: await parseBody(output.body, context),
|
|
803
632
|
};
|
|
804
|
-
let response;
|
|
805
633
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
806
634
|
switch (errorCode) {
|
|
807
635
|
case "BadRequestException":
|
|
@@ -824,77 +652,62 @@ const deserializeAws_restJson1DeleteApplicationCommandError = async (output, con
|
|
|
824
652
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
825
653
|
default:
|
|
826
654
|
const parsedBody = parsedOutput.body;
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
$metadata,
|
|
655
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
656
|
+
output,
|
|
657
|
+
parsedBody,
|
|
658
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
659
|
+
errorCode,
|
|
833
660
|
});
|
|
834
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
835
661
|
}
|
|
836
662
|
};
|
|
837
663
|
const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
838
664
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
839
665
|
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
840
666
|
}
|
|
841
|
-
const contents = {
|
|
667
|
+
const contents = map({
|
|
842
668
|
$metadata: deserializeMetadata(output),
|
|
843
|
-
|
|
844
|
-
Author: undefined,
|
|
845
|
-
CreationTime: undefined,
|
|
846
|
-
Description: undefined,
|
|
847
|
-
HomePageUrl: undefined,
|
|
848
|
-
IsVerifiedAuthor: undefined,
|
|
849
|
-
Labels: undefined,
|
|
850
|
-
LicenseUrl: undefined,
|
|
851
|
-
Name: undefined,
|
|
852
|
-
ReadmeUrl: undefined,
|
|
853
|
-
SpdxLicenseId: undefined,
|
|
854
|
-
VerifiedAuthorUrl: undefined,
|
|
855
|
-
Version: undefined,
|
|
856
|
-
};
|
|
669
|
+
});
|
|
857
670
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
858
|
-
if (data.applicationId
|
|
671
|
+
if (data.applicationId != null) {
|
|
859
672
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
860
673
|
}
|
|
861
|
-
if (data.author
|
|
674
|
+
if (data.author != null) {
|
|
862
675
|
contents.Author = (0, smithy_client_1.expectString)(data.author);
|
|
863
676
|
}
|
|
864
|
-
if (data.creationTime
|
|
677
|
+
if (data.creationTime != null) {
|
|
865
678
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
866
679
|
}
|
|
867
|
-
if (data.description
|
|
680
|
+
if (data.description != null) {
|
|
868
681
|
contents.Description = (0, smithy_client_1.expectString)(data.description);
|
|
869
682
|
}
|
|
870
|
-
if (data.homePageUrl
|
|
683
|
+
if (data.homePageUrl != null) {
|
|
871
684
|
contents.HomePageUrl = (0, smithy_client_1.expectString)(data.homePageUrl);
|
|
872
685
|
}
|
|
873
|
-
if (data.isVerifiedAuthor
|
|
686
|
+
if (data.isVerifiedAuthor != null) {
|
|
874
687
|
contents.IsVerifiedAuthor = (0, smithy_client_1.expectBoolean)(data.isVerifiedAuthor);
|
|
875
688
|
}
|
|
876
|
-
if (data.labels
|
|
689
|
+
if (data.labels != null) {
|
|
877
690
|
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
878
691
|
}
|
|
879
|
-
if (data.licenseUrl
|
|
692
|
+
if (data.licenseUrl != null) {
|
|
880
693
|
contents.LicenseUrl = (0, smithy_client_1.expectString)(data.licenseUrl);
|
|
881
694
|
}
|
|
882
|
-
if (data.name
|
|
695
|
+
if (data.name != null) {
|
|
883
696
|
contents.Name = (0, smithy_client_1.expectString)(data.name);
|
|
884
697
|
}
|
|
885
|
-
if (data.readmeUrl
|
|
698
|
+
if (data.readmeUrl != null) {
|
|
886
699
|
contents.ReadmeUrl = (0, smithy_client_1.expectString)(data.readmeUrl);
|
|
887
700
|
}
|
|
888
|
-
if (data.spdxLicenseId
|
|
701
|
+
if (data.spdxLicenseId != null) {
|
|
889
702
|
contents.SpdxLicenseId = (0, smithy_client_1.expectString)(data.spdxLicenseId);
|
|
890
703
|
}
|
|
891
|
-
if (data.verifiedAuthorUrl
|
|
704
|
+
if (data.verifiedAuthorUrl != null) {
|
|
892
705
|
contents.VerifiedAuthorUrl = (0, smithy_client_1.expectString)(data.verifiedAuthorUrl);
|
|
893
706
|
}
|
|
894
|
-
if (data.version
|
|
707
|
+
if (data.version != null) {
|
|
895
708
|
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
896
709
|
}
|
|
897
|
-
return
|
|
710
|
+
return contents;
|
|
898
711
|
};
|
|
899
712
|
exports.deserializeAws_restJson1GetApplicationCommand = deserializeAws_restJson1GetApplicationCommand;
|
|
900
713
|
const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
|
|
@@ -902,7 +715,6 @@ const deserializeAws_restJson1GetApplicationCommandError = async (output, contex
|
|
|
902
715
|
...output,
|
|
903
716
|
body: await parseBody(output.body, context),
|
|
904
717
|
};
|
|
905
|
-
let response;
|
|
906
718
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
719
|
switch (errorCode) {
|
|
908
720
|
case "BadRequestException":
|
|
@@ -922,29 +734,26 @@ const deserializeAws_restJson1GetApplicationCommandError = async (output, contex
|
|
|
922
734
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
923
735
|
default:
|
|
924
736
|
const parsedBody = parsedOutput.body;
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
$metadata,
|
|
737
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
738
|
+
output,
|
|
739
|
+
parsedBody,
|
|
740
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
741
|
+
errorCode,
|
|
931
742
|
});
|
|
932
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
933
743
|
}
|
|
934
744
|
};
|
|
935
745
|
const deserializeAws_restJson1GetApplicationPolicyCommand = async (output, context) => {
|
|
936
746
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
937
747
|
return deserializeAws_restJson1GetApplicationPolicyCommandError(output, context);
|
|
938
748
|
}
|
|
939
|
-
const contents = {
|
|
749
|
+
const contents = map({
|
|
940
750
|
$metadata: deserializeMetadata(output),
|
|
941
|
-
|
|
942
|
-
};
|
|
751
|
+
});
|
|
943
752
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
944
|
-
if (data.statements
|
|
753
|
+
if (data.statements != null) {
|
|
945
754
|
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
946
755
|
}
|
|
947
|
-
return
|
|
756
|
+
return contents;
|
|
948
757
|
};
|
|
949
758
|
exports.deserializeAws_restJson1GetApplicationPolicyCommand = deserializeAws_restJson1GetApplicationPolicyCommand;
|
|
950
759
|
const deserializeAws_restJson1GetApplicationPolicyCommandError = async (output, context) => {
|
|
@@ -952,7 +761,6 @@ const deserializeAws_restJson1GetApplicationPolicyCommandError = async (output,
|
|
|
952
761
|
...output,
|
|
953
762
|
body: await parseBody(output.body, context),
|
|
954
763
|
};
|
|
955
|
-
let response;
|
|
956
764
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
957
765
|
switch (errorCode) {
|
|
958
766
|
case "BadRequestException":
|
|
@@ -972,53 +780,44 @@ const deserializeAws_restJson1GetApplicationPolicyCommandError = async (output,
|
|
|
972
780
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
973
781
|
default:
|
|
974
782
|
const parsedBody = parsedOutput.body;
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
$metadata,
|
|
783
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
784
|
+
output,
|
|
785
|
+
parsedBody,
|
|
786
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
787
|
+
errorCode,
|
|
981
788
|
});
|
|
982
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
983
789
|
}
|
|
984
790
|
};
|
|
985
791
|
const deserializeAws_restJson1GetCloudFormationTemplateCommand = async (output, context) => {
|
|
986
792
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
987
793
|
return deserializeAws_restJson1GetCloudFormationTemplateCommandError(output, context);
|
|
988
794
|
}
|
|
989
|
-
const contents = {
|
|
795
|
+
const contents = map({
|
|
990
796
|
$metadata: deserializeMetadata(output),
|
|
991
|
-
|
|
992
|
-
CreationTime: undefined,
|
|
993
|
-
ExpirationTime: undefined,
|
|
994
|
-
SemanticVersion: undefined,
|
|
995
|
-
Status: undefined,
|
|
996
|
-
TemplateId: undefined,
|
|
997
|
-
TemplateUrl: undefined,
|
|
998
|
-
};
|
|
797
|
+
});
|
|
999
798
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1000
|
-
if (data.applicationId
|
|
799
|
+
if (data.applicationId != null) {
|
|
1001
800
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
1002
801
|
}
|
|
1003
|
-
if (data.creationTime
|
|
802
|
+
if (data.creationTime != null) {
|
|
1004
803
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
1005
804
|
}
|
|
1006
|
-
if (data.expirationTime
|
|
805
|
+
if (data.expirationTime != null) {
|
|
1007
806
|
contents.ExpirationTime = (0, smithy_client_1.expectString)(data.expirationTime);
|
|
1008
807
|
}
|
|
1009
|
-
if (data.semanticVersion
|
|
808
|
+
if (data.semanticVersion != null) {
|
|
1010
809
|
contents.SemanticVersion = (0, smithy_client_1.expectString)(data.semanticVersion);
|
|
1011
810
|
}
|
|
1012
|
-
if (data.status
|
|
811
|
+
if (data.status != null) {
|
|
1013
812
|
contents.Status = (0, smithy_client_1.expectString)(data.status);
|
|
1014
813
|
}
|
|
1015
|
-
if (data.templateId
|
|
814
|
+
if (data.templateId != null) {
|
|
1016
815
|
contents.TemplateId = (0, smithy_client_1.expectString)(data.templateId);
|
|
1017
816
|
}
|
|
1018
|
-
if (data.templateUrl
|
|
817
|
+
if (data.templateUrl != null) {
|
|
1019
818
|
contents.TemplateUrl = (0, smithy_client_1.expectString)(data.templateUrl);
|
|
1020
819
|
}
|
|
1021
|
-
return
|
|
820
|
+
return contents;
|
|
1022
821
|
};
|
|
1023
822
|
exports.deserializeAws_restJson1GetCloudFormationTemplateCommand = deserializeAws_restJson1GetCloudFormationTemplateCommand;
|
|
1024
823
|
const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (output, context) => {
|
|
@@ -1026,7 +825,6 @@ const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (out
|
|
|
1026
825
|
...output,
|
|
1027
826
|
body: await parseBody(output.body, context),
|
|
1028
827
|
};
|
|
1029
|
-
let response;
|
|
1030
828
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1031
829
|
switch (errorCode) {
|
|
1032
830
|
case "BadRequestException":
|
|
@@ -1046,33 +844,29 @@ const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (out
|
|
|
1046
844
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1047
845
|
default:
|
|
1048
846
|
const parsedBody = parsedOutput.body;
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
$metadata,
|
|
847
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
848
|
+
output,
|
|
849
|
+
parsedBody,
|
|
850
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
851
|
+
errorCode,
|
|
1055
852
|
});
|
|
1056
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1057
853
|
}
|
|
1058
854
|
};
|
|
1059
855
|
const deserializeAws_restJson1ListApplicationDependenciesCommand = async (output, context) => {
|
|
1060
856
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1061
857
|
return deserializeAws_restJson1ListApplicationDependenciesCommandError(output, context);
|
|
1062
858
|
}
|
|
1063
|
-
const contents = {
|
|
859
|
+
const contents = map({
|
|
1064
860
|
$metadata: deserializeMetadata(output),
|
|
1065
|
-
|
|
1066
|
-
NextToken: undefined,
|
|
1067
|
-
};
|
|
861
|
+
});
|
|
1068
862
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1069
|
-
if (data.dependencies
|
|
863
|
+
if (data.dependencies != null) {
|
|
1070
864
|
contents.Dependencies = deserializeAws_restJson1__listOfApplicationDependencySummary(data.dependencies, context);
|
|
1071
865
|
}
|
|
1072
|
-
if (data.nextToken
|
|
866
|
+
if (data.nextToken != null) {
|
|
1073
867
|
contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1074
868
|
}
|
|
1075
|
-
return
|
|
869
|
+
return contents;
|
|
1076
870
|
};
|
|
1077
871
|
exports.deserializeAws_restJson1ListApplicationDependenciesCommand = deserializeAws_restJson1ListApplicationDependenciesCommand;
|
|
1078
872
|
const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (output, context) => {
|
|
@@ -1080,7 +874,6 @@ const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (o
|
|
|
1080
874
|
...output,
|
|
1081
875
|
body: await parseBody(output.body, context),
|
|
1082
876
|
};
|
|
1083
|
-
let response;
|
|
1084
877
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1085
878
|
switch (errorCode) {
|
|
1086
879
|
case "BadRequestException":
|
|
@@ -1100,33 +893,29 @@ const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (o
|
|
|
1100
893
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1101
894
|
default:
|
|
1102
895
|
const parsedBody = parsedOutput.body;
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
$metadata,
|
|
896
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
897
|
+
output,
|
|
898
|
+
parsedBody,
|
|
899
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
900
|
+
errorCode,
|
|
1109
901
|
});
|
|
1110
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1111
902
|
}
|
|
1112
903
|
};
|
|
1113
904
|
const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
1114
905
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1115
906
|
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
1116
907
|
}
|
|
1117
|
-
const contents = {
|
|
908
|
+
const contents = map({
|
|
1118
909
|
$metadata: deserializeMetadata(output),
|
|
1119
|
-
|
|
1120
|
-
NextToken: undefined,
|
|
1121
|
-
};
|
|
910
|
+
});
|
|
1122
911
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1123
|
-
if (data.applications
|
|
912
|
+
if (data.applications != null) {
|
|
1124
913
|
contents.Applications = deserializeAws_restJson1__listOfApplicationSummary(data.applications, context);
|
|
1125
914
|
}
|
|
1126
|
-
if (data.nextToken
|
|
915
|
+
if (data.nextToken != null) {
|
|
1127
916
|
contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1128
917
|
}
|
|
1129
|
-
return
|
|
918
|
+
return contents;
|
|
1130
919
|
};
|
|
1131
920
|
exports.deserializeAws_restJson1ListApplicationsCommand = deserializeAws_restJson1ListApplicationsCommand;
|
|
1132
921
|
const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
|
|
@@ -1134,7 +923,6 @@ const deserializeAws_restJson1ListApplicationsCommandError = async (output, cont
|
|
|
1134
923
|
...output,
|
|
1135
924
|
body: await parseBody(output.body, context),
|
|
1136
925
|
};
|
|
1137
|
-
let response;
|
|
1138
926
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1139
927
|
switch (errorCode) {
|
|
1140
928
|
case "BadRequestException":
|
|
@@ -1151,33 +939,29 @@ const deserializeAws_restJson1ListApplicationsCommandError = async (output, cont
|
|
|
1151
939
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1152
940
|
default:
|
|
1153
941
|
const parsedBody = parsedOutput.body;
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
$metadata,
|
|
942
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
943
|
+
output,
|
|
944
|
+
parsedBody,
|
|
945
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
946
|
+
errorCode,
|
|
1160
947
|
});
|
|
1161
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1162
948
|
}
|
|
1163
949
|
};
|
|
1164
950
|
const deserializeAws_restJson1ListApplicationVersionsCommand = async (output, context) => {
|
|
1165
951
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1166
952
|
return deserializeAws_restJson1ListApplicationVersionsCommandError(output, context);
|
|
1167
953
|
}
|
|
1168
|
-
const contents = {
|
|
954
|
+
const contents = map({
|
|
1169
955
|
$metadata: deserializeMetadata(output),
|
|
1170
|
-
|
|
1171
|
-
Versions: undefined,
|
|
1172
|
-
};
|
|
956
|
+
});
|
|
1173
957
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1174
|
-
if (data.nextToken
|
|
958
|
+
if (data.nextToken != null) {
|
|
1175
959
|
contents.NextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1176
960
|
}
|
|
1177
|
-
if (data.versions
|
|
961
|
+
if (data.versions != null) {
|
|
1178
962
|
contents.Versions = deserializeAws_restJson1__listOfVersionSummary(data.versions, context);
|
|
1179
963
|
}
|
|
1180
|
-
return
|
|
964
|
+
return contents;
|
|
1181
965
|
};
|
|
1182
966
|
exports.deserializeAws_restJson1ListApplicationVersionsCommand = deserializeAws_restJson1ListApplicationVersionsCommand;
|
|
1183
967
|
const deserializeAws_restJson1ListApplicationVersionsCommandError = async (output, context) => {
|
|
@@ -1185,7 +969,6 @@ const deserializeAws_restJson1ListApplicationVersionsCommandError = async (outpu
|
|
|
1185
969
|
...output,
|
|
1186
970
|
body: await parseBody(output.body, context),
|
|
1187
971
|
};
|
|
1188
|
-
let response;
|
|
1189
972
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1190
973
|
switch (errorCode) {
|
|
1191
974
|
case "BadRequestException":
|
|
@@ -1205,29 +988,26 @@ const deserializeAws_restJson1ListApplicationVersionsCommandError = async (outpu
|
|
|
1205
988
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1206
989
|
default:
|
|
1207
990
|
const parsedBody = parsedOutput.body;
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
$metadata,
|
|
991
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
992
|
+
output,
|
|
993
|
+
parsedBody,
|
|
994
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
995
|
+
errorCode,
|
|
1214
996
|
});
|
|
1215
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1216
997
|
}
|
|
1217
998
|
};
|
|
1218
999
|
const deserializeAws_restJson1PutApplicationPolicyCommand = async (output, context) => {
|
|
1219
1000
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1220
1001
|
return deserializeAws_restJson1PutApplicationPolicyCommandError(output, context);
|
|
1221
1002
|
}
|
|
1222
|
-
const contents = {
|
|
1003
|
+
const contents = map({
|
|
1223
1004
|
$metadata: deserializeMetadata(output),
|
|
1224
|
-
|
|
1225
|
-
};
|
|
1005
|
+
});
|
|
1226
1006
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1227
|
-
if (data.statements
|
|
1007
|
+
if (data.statements != null) {
|
|
1228
1008
|
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
1229
1009
|
}
|
|
1230
|
-
return
|
|
1010
|
+
return contents;
|
|
1231
1011
|
};
|
|
1232
1012
|
exports.deserializeAws_restJson1PutApplicationPolicyCommand = deserializeAws_restJson1PutApplicationPolicyCommand;
|
|
1233
1013
|
const deserializeAws_restJson1PutApplicationPolicyCommandError = async (output, context) => {
|
|
@@ -1235,7 +1015,6 @@ const deserializeAws_restJson1PutApplicationPolicyCommandError = async (output,
|
|
|
1235
1015
|
...output,
|
|
1236
1016
|
body: await parseBody(output.body, context),
|
|
1237
1017
|
};
|
|
1238
|
-
let response;
|
|
1239
1018
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1240
1019
|
switch (errorCode) {
|
|
1241
1020
|
case "BadRequestException":
|
|
@@ -1255,25 +1034,23 @@ const deserializeAws_restJson1PutApplicationPolicyCommandError = async (output,
|
|
|
1255
1034
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1256
1035
|
default:
|
|
1257
1036
|
const parsedBody = parsedOutput.body;
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
$metadata,
|
|
1037
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1038
|
+
output,
|
|
1039
|
+
parsedBody,
|
|
1040
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
1041
|
+
errorCode,
|
|
1264
1042
|
});
|
|
1265
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1266
1043
|
}
|
|
1267
1044
|
};
|
|
1268
1045
|
const deserializeAws_restJson1UnshareApplicationCommand = async (output, context) => {
|
|
1269
1046
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1270
1047
|
return deserializeAws_restJson1UnshareApplicationCommandError(output, context);
|
|
1271
1048
|
}
|
|
1272
|
-
const contents = {
|
|
1049
|
+
const contents = map({
|
|
1273
1050
|
$metadata: deserializeMetadata(output),
|
|
1274
|
-
};
|
|
1051
|
+
});
|
|
1275
1052
|
await collectBody(output.body, context);
|
|
1276
|
-
return
|
|
1053
|
+
return contents;
|
|
1277
1054
|
};
|
|
1278
1055
|
exports.deserializeAws_restJson1UnshareApplicationCommand = deserializeAws_restJson1UnshareApplicationCommand;
|
|
1279
1056
|
const deserializeAws_restJson1UnshareApplicationCommandError = async (output, context) => {
|
|
@@ -1281,7 +1058,6 @@ const deserializeAws_restJson1UnshareApplicationCommandError = async (output, co
|
|
|
1281
1058
|
...output,
|
|
1282
1059
|
body: await parseBody(output.body, context),
|
|
1283
1060
|
};
|
|
1284
|
-
let response;
|
|
1285
1061
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
1062
|
switch (errorCode) {
|
|
1287
1063
|
case "BadRequestException":
|
|
@@ -1301,77 +1077,62 @@ const deserializeAws_restJson1UnshareApplicationCommandError = async (output, co
|
|
|
1301
1077
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1302
1078
|
default:
|
|
1303
1079
|
const parsedBody = parsedOutput.body;
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
$metadata,
|
|
1080
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1081
|
+
output,
|
|
1082
|
+
parsedBody,
|
|
1083
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
1084
|
+
errorCode,
|
|
1310
1085
|
});
|
|
1311
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1312
1086
|
}
|
|
1313
1087
|
};
|
|
1314
1088
|
const deserializeAws_restJson1UpdateApplicationCommand = async (output, context) => {
|
|
1315
1089
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1316
1090
|
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
1317
1091
|
}
|
|
1318
|
-
const contents = {
|
|
1092
|
+
const contents = map({
|
|
1319
1093
|
$metadata: deserializeMetadata(output),
|
|
1320
|
-
|
|
1321
|
-
Author: undefined,
|
|
1322
|
-
CreationTime: undefined,
|
|
1323
|
-
Description: undefined,
|
|
1324
|
-
HomePageUrl: undefined,
|
|
1325
|
-
IsVerifiedAuthor: undefined,
|
|
1326
|
-
Labels: undefined,
|
|
1327
|
-
LicenseUrl: undefined,
|
|
1328
|
-
Name: undefined,
|
|
1329
|
-
ReadmeUrl: undefined,
|
|
1330
|
-
SpdxLicenseId: undefined,
|
|
1331
|
-
VerifiedAuthorUrl: undefined,
|
|
1332
|
-
Version: undefined,
|
|
1333
|
-
};
|
|
1094
|
+
});
|
|
1334
1095
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1335
|
-
if (data.applicationId
|
|
1096
|
+
if (data.applicationId != null) {
|
|
1336
1097
|
contents.ApplicationId = (0, smithy_client_1.expectString)(data.applicationId);
|
|
1337
1098
|
}
|
|
1338
|
-
if (data.author
|
|
1099
|
+
if (data.author != null) {
|
|
1339
1100
|
contents.Author = (0, smithy_client_1.expectString)(data.author);
|
|
1340
1101
|
}
|
|
1341
|
-
if (data.creationTime
|
|
1102
|
+
if (data.creationTime != null) {
|
|
1342
1103
|
contents.CreationTime = (0, smithy_client_1.expectString)(data.creationTime);
|
|
1343
1104
|
}
|
|
1344
|
-
if (data.description
|
|
1105
|
+
if (data.description != null) {
|
|
1345
1106
|
contents.Description = (0, smithy_client_1.expectString)(data.description);
|
|
1346
1107
|
}
|
|
1347
|
-
if (data.homePageUrl
|
|
1108
|
+
if (data.homePageUrl != null) {
|
|
1348
1109
|
contents.HomePageUrl = (0, smithy_client_1.expectString)(data.homePageUrl);
|
|
1349
1110
|
}
|
|
1350
|
-
if (data.isVerifiedAuthor
|
|
1111
|
+
if (data.isVerifiedAuthor != null) {
|
|
1351
1112
|
contents.IsVerifiedAuthor = (0, smithy_client_1.expectBoolean)(data.isVerifiedAuthor);
|
|
1352
1113
|
}
|
|
1353
|
-
if (data.labels
|
|
1114
|
+
if (data.labels != null) {
|
|
1354
1115
|
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
1355
1116
|
}
|
|
1356
|
-
if (data.licenseUrl
|
|
1117
|
+
if (data.licenseUrl != null) {
|
|
1357
1118
|
contents.LicenseUrl = (0, smithy_client_1.expectString)(data.licenseUrl);
|
|
1358
1119
|
}
|
|
1359
|
-
if (data.name
|
|
1120
|
+
if (data.name != null) {
|
|
1360
1121
|
contents.Name = (0, smithy_client_1.expectString)(data.name);
|
|
1361
1122
|
}
|
|
1362
|
-
if (data.readmeUrl
|
|
1123
|
+
if (data.readmeUrl != null) {
|
|
1363
1124
|
contents.ReadmeUrl = (0, smithy_client_1.expectString)(data.readmeUrl);
|
|
1364
1125
|
}
|
|
1365
|
-
if (data.spdxLicenseId
|
|
1126
|
+
if (data.spdxLicenseId != null) {
|
|
1366
1127
|
contents.SpdxLicenseId = (0, smithy_client_1.expectString)(data.spdxLicenseId);
|
|
1367
1128
|
}
|
|
1368
|
-
if (data.verifiedAuthorUrl
|
|
1129
|
+
if (data.verifiedAuthorUrl != null) {
|
|
1369
1130
|
contents.VerifiedAuthorUrl = (0, smithy_client_1.expectString)(data.verifiedAuthorUrl);
|
|
1370
1131
|
}
|
|
1371
|
-
if (data.version
|
|
1132
|
+
if (data.version != null) {
|
|
1372
1133
|
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
1373
1134
|
}
|
|
1374
|
-
return
|
|
1135
|
+
return contents;
|
|
1375
1136
|
};
|
|
1376
1137
|
exports.deserializeAws_restJson1UpdateApplicationCommand = deserializeAws_restJson1UpdateApplicationCommand;
|
|
1377
1138
|
const deserializeAws_restJson1UpdateApplicationCommandError = async (output, context) => {
|
|
@@ -1379,7 +1140,6 @@ const deserializeAws_restJson1UpdateApplicationCommandError = async (output, con
|
|
|
1379
1140
|
...output,
|
|
1380
1141
|
body: await parseBody(output.body, context),
|
|
1381
1142
|
};
|
|
1382
|
-
let response;
|
|
1383
1143
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1384
1144
|
switch (errorCode) {
|
|
1385
1145
|
case "BadRequestException":
|
|
@@ -1402,23 +1162,22 @@ const deserializeAws_restJson1UpdateApplicationCommandError = async (output, con
|
|
|
1402
1162
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1403
1163
|
default:
|
|
1404
1164
|
const parsedBody = parsedOutput.body;
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
$metadata,
|
|
1165
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1166
|
+
output,
|
|
1167
|
+
parsedBody,
|
|
1168
|
+
exceptionCtor: ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException,
|
|
1169
|
+
errorCode,
|
|
1411
1170
|
});
|
|
1412
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1413
1171
|
}
|
|
1414
1172
|
};
|
|
1173
|
+
const map = smithy_client_1.map;
|
|
1415
1174
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1416
|
-
const contents = {};
|
|
1175
|
+
const contents = map({});
|
|
1417
1176
|
const data = parsedOutput.body;
|
|
1418
|
-
if (data.errorCode
|
|
1177
|
+
if (data.errorCode != null) {
|
|
1419
1178
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1420
1179
|
}
|
|
1421
|
-
if (data.message
|
|
1180
|
+
if (data.message != null) {
|
|
1422
1181
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1423
1182
|
}
|
|
1424
1183
|
const exception = new models_0_1.BadRequestException({
|
|
@@ -1428,12 +1187,12 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
1428
1187
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1429
1188
|
};
|
|
1430
1189
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1431
|
-
const contents = {};
|
|
1190
|
+
const contents = map({});
|
|
1432
1191
|
const data = parsedOutput.body;
|
|
1433
|
-
if (data.errorCode
|
|
1192
|
+
if (data.errorCode != null) {
|
|
1434
1193
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1435
1194
|
}
|
|
1436
|
-
if (data.message
|
|
1195
|
+
if (data.message != null) {
|
|
1437
1196
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1438
1197
|
}
|
|
1439
1198
|
const exception = new models_0_1.ConflictException({
|
|
@@ -1443,12 +1202,12 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
1443
1202
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1444
1203
|
};
|
|
1445
1204
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
1446
|
-
const contents = {};
|
|
1205
|
+
const contents = map({});
|
|
1447
1206
|
const data = parsedOutput.body;
|
|
1448
|
-
if (data.errorCode
|
|
1207
|
+
if (data.errorCode != null) {
|
|
1449
1208
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1450
1209
|
}
|
|
1451
|
-
if (data.message
|
|
1210
|
+
if (data.message != null) {
|
|
1452
1211
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1453
1212
|
}
|
|
1454
1213
|
const exception = new models_0_1.ForbiddenException({
|
|
@@ -1458,12 +1217,12 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
1458
1217
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1459
1218
|
};
|
|
1460
1219
|
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1461
|
-
const contents = {};
|
|
1220
|
+
const contents = map({});
|
|
1462
1221
|
const data = parsedOutput.body;
|
|
1463
|
-
if (data.errorCode
|
|
1222
|
+
if (data.errorCode != null) {
|
|
1464
1223
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1465
1224
|
}
|
|
1466
|
-
if (data.message
|
|
1225
|
+
if (data.message != null) {
|
|
1467
1226
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1468
1227
|
}
|
|
1469
1228
|
const exception = new models_0_1.InternalServerErrorException({
|
|
@@ -1473,12 +1232,12 @@ const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (pars
|
|
|
1473
1232
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1474
1233
|
};
|
|
1475
1234
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1476
|
-
const contents = {};
|
|
1235
|
+
const contents = map({});
|
|
1477
1236
|
const data = parsedOutput.body;
|
|
1478
|
-
if (data.errorCode
|
|
1237
|
+
if (data.errorCode != null) {
|
|
1479
1238
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1480
1239
|
}
|
|
1481
|
-
if (data.message
|
|
1240
|
+
if (data.message != null) {
|
|
1482
1241
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1483
1242
|
}
|
|
1484
1243
|
const exception = new models_0_1.NotFoundException({
|
|
@@ -1488,12 +1247,12 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
1488
1247
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1489
1248
|
};
|
|
1490
1249
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1491
|
-
const contents = {};
|
|
1250
|
+
const contents = map({});
|
|
1492
1251
|
const data = parsedOutput.body;
|
|
1493
|
-
if (data.errorCode
|
|
1252
|
+
if (data.errorCode != null) {
|
|
1494
1253
|
contents.ErrorCode = (0, smithy_client_1.expectString)(data.errorCode);
|
|
1495
1254
|
}
|
|
1496
|
-
if (data.message
|
|
1255
|
+
if (data.message != null) {
|
|
1497
1256
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
1498
1257
|
}
|
|
1499
1258
|
const exception = new models_0_1.TooManyRequestsException({
|
|
@@ -1506,9 +1265,6 @@ const serializeAws_restJson1__listOf__string = (input, context) => {
|
|
|
1506
1265
|
return input
|
|
1507
1266
|
.filter((e) => e != null)
|
|
1508
1267
|
.map((entry) => {
|
|
1509
|
-
if (entry === null) {
|
|
1510
|
-
return null;
|
|
1511
|
-
}
|
|
1512
1268
|
return entry;
|
|
1513
1269
|
});
|
|
1514
1270
|
};
|
|
@@ -1516,9 +1272,6 @@ const serializeAws_restJson1__listOfApplicationPolicyStatement = (input, context
|
|
|
1516
1272
|
return input
|
|
1517
1273
|
.filter((e) => e != null)
|
|
1518
1274
|
.map((entry) => {
|
|
1519
|
-
if (entry === null) {
|
|
1520
|
-
return null;
|
|
1521
|
-
}
|
|
1522
1275
|
return serializeAws_restJson1ApplicationPolicyStatement(entry, context);
|
|
1523
1276
|
});
|
|
1524
1277
|
};
|
|
@@ -1526,9 +1279,6 @@ const serializeAws_restJson1__listOfParameterValue = (input, context) => {
|
|
|
1526
1279
|
return input
|
|
1527
1280
|
.filter((e) => e != null)
|
|
1528
1281
|
.map((entry) => {
|
|
1529
|
-
if (entry === null) {
|
|
1530
|
-
return null;
|
|
1531
|
-
}
|
|
1532
1282
|
return serializeAws_restJson1ParameterValue(entry, context);
|
|
1533
1283
|
});
|
|
1534
1284
|
};
|
|
@@ -1536,9 +1286,6 @@ const serializeAws_restJson1__listOfRollbackTrigger = (input, context) => {
|
|
|
1536
1286
|
return input
|
|
1537
1287
|
.filter((e) => e != null)
|
|
1538
1288
|
.map((entry) => {
|
|
1539
|
-
if (entry === null) {
|
|
1540
|
-
return null;
|
|
1541
|
-
}
|
|
1542
1289
|
return serializeAws_restJson1RollbackTrigger(entry, context);
|
|
1543
1290
|
});
|
|
1544
1291
|
};
|
|
@@ -1546,9 +1293,6 @@ const serializeAws_restJson1__listOfTag = (input, context) => {
|
|
|
1546
1293
|
return input
|
|
1547
1294
|
.filter((e) => e != null)
|
|
1548
1295
|
.map((entry) => {
|
|
1549
|
-
if (entry === null) {
|
|
1550
|
-
return null;
|
|
1551
|
-
}
|
|
1552
1296
|
return serializeAws_restJson1Tag(entry, context);
|
|
1553
1297
|
});
|
|
1554
1298
|
};
|