@aws-sdk/client-oam 3.306.0 → 3.310.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/dist-cjs/commands/CreateLinkCommand.js +2 -2
- package/dist-cjs/commands/CreateSinkCommand.js +2 -2
- package/dist-cjs/commands/DeleteLinkCommand.js +2 -2
- package/dist-cjs/commands/DeleteSinkCommand.js +2 -2
- package/dist-cjs/commands/GetLinkCommand.js +2 -2
- package/dist-cjs/commands/GetSinkCommand.js +2 -2
- package/dist-cjs/commands/GetSinkPolicyCommand.js +2 -2
- package/dist-cjs/commands/ListAttachedLinksCommand.js +2 -2
- package/dist-cjs/commands/ListLinksCommand.js +2 -2
- package/dist-cjs/commands/ListSinksCommand.js +2 -2
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
- package/dist-cjs/commands/PutSinkPolicyCommand.js +2 -2
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateLinkCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +187 -195
- package/dist-es/commands/CreateLinkCommand.js +3 -3
- package/dist-es/commands/CreateSinkCommand.js +3 -3
- package/dist-es/commands/DeleteLinkCommand.js +3 -3
- package/dist-es/commands/DeleteSinkCommand.js +3 -3
- package/dist-es/commands/GetLinkCommand.js +3 -3
- package/dist-es/commands/GetSinkCommand.js +3 -3
- package/dist-es/commands/GetSinkPolicyCommand.js +3 -3
- package/dist-es/commands/ListAttachedLinksCommand.js +3 -3
- package/dist-es/commands/ListLinksCommand.js +3 -3
- package/dist-es/commands/ListSinksCommand.js +3 -3
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-es/commands/PutSinkPolicyCommand.js +3 -3
- package/dist-es/commands/TagResourceCommand.js +3 -3
- package/dist-es/commands/UntagResourceCommand.js +3 -3
- package/dist-es/commands/UpdateLinkCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +156 -164
- package/dist-types/protocols/Aws_restJson1.d.ts +120 -30
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +30 -30
- package/package.json +35 -35
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_UpdateLinkCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutSinkPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSinksCommand = exports.de_ListLinksCommand = exports.de_ListAttachedLinksCommand = exports.de_GetSinkPolicyCommand = exports.de_GetSinkCommand = exports.de_GetLinkCommand = exports.de_DeleteSinkCommand = exports.de_DeleteLinkCommand = exports.de_CreateSinkCommand = exports.de_CreateLinkCommand = exports.se_UpdateLinkCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutSinkPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSinksCommand = exports.se_ListLinksCommand = exports.se_ListAttachedLinksCommand = exports.se_GetSinkPolicyCommand = exports.se_GetSinkCommand = exports.se_GetLinkCommand = exports.se_DeleteSinkCommand = exports.se_DeleteLinkCommand = exports.se_CreateSinkCommand = exports.se_CreateLinkCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const OAMServiceException_1 = require("../models/OAMServiceException");
|
|
8
|
-
const
|
|
8
|
+
const se_CreateLinkCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {
|
|
11
11
|
"content-type": "application/json",
|
|
@@ -14,11 +14,9 @@ const serializeAws_restJson1CreateLinkCommand = async (input, context) => {
|
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify({
|
|
16
16
|
...(input.LabelTemplate != null && { LabelTemplate: input.LabelTemplate }),
|
|
17
|
-
...(input.ResourceTypes != null && {
|
|
18
|
-
ResourceTypes: serializeAws_restJson1ResourceTypesInput(input.ResourceTypes, context),
|
|
19
|
-
}),
|
|
17
|
+
...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypesInput(input.ResourceTypes, context) }),
|
|
20
18
|
...(input.SinkIdentifier != null && { SinkIdentifier: input.SinkIdentifier }),
|
|
21
|
-
...(input.Tags != null && { Tags:
|
|
19
|
+
...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }),
|
|
22
20
|
});
|
|
23
21
|
return new protocol_http_1.HttpRequest({
|
|
24
22
|
protocol,
|
|
@@ -30,8 +28,8 @@ const serializeAws_restJson1CreateLinkCommand = async (input, context) => {
|
|
|
30
28
|
body,
|
|
31
29
|
});
|
|
32
30
|
};
|
|
33
|
-
exports.
|
|
34
|
-
const
|
|
31
|
+
exports.se_CreateLinkCommand = se_CreateLinkCommand;
|
|
32
|
+
const se_CreateSinkCommand = async (input, context) => {
|
|
35
33
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
34
|
const headers = {
|
|
37
35
|
"content-type": "application/json",
|
|
@@ -40,7 +38,7 @@ const serializeAws_restJson1CreateSinkCommand = async (input, context) => {
|
|
|
40
38
|
let body;
|
|
41
39
|
body = JSON.stringify({
|
|
42
40
|
...(input.Name != null && { Name: input.Name }),
|
|
43
|
-
...(input.Tags != null && { Tags:
|
|
41
|
+
...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }),
|
|
44
42
|
});
|
|
45
43
|
return new protocol_http_1.HttpRequest({
|
|
46
44
|
protocol,
|
|
@@ -52,8 +50,8 @@ const serializeAws_restJson1CreateSinkCommand = async (input, context) => {
|
|
|
52
50
|
body,
|
|
53
51
|
});
|
|
54
52
|
};
|
|
55
|
-
exports.
|
|
56
|
-
const
|
|
53
|
+
exports.se_CreateSinkCommand = se_CreateSinkCommand;
|
|
54
|
+
const se_DeleteLinkCommand = async (input, context) => {
|
|
57
55
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
58
56
|
const headers = {
|
|
59
57
|
"content-type": "application/json",
|
|
@@ -73,8 +71,8 @@ const serializeAws_restJson1DeleteLinkCommand = async (input, context) => {
|
|
|
73
71
|
body,
|
|
74
72
|
});
|
|
75
73
|
};
|
|
76
|
-
exports.
|
|
77
|
-
const
|
|
74
|
+
exports.se_DeleteLinkCommand = se_DeleteLinkCommand;
|
|
75
|
+
const se_DeleteSinkCommand = async (input, context) => {
|
|
78
76
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
79
77
|
const headers = {
|
|
80
78
|
"content-type": "application/json",
|
|
@@ -94,8 +92,8 @@ const serializeAws_restJson1DeleteSinkCommand = async (input, context) => {
|
|
|
94
92
|
body,
|
|
95
93
|
});
|
|
96
94
|
};
|
|
97
|
-
exports.
|
|
98
|
-
const
|
|
95
|
+
exports.se_DeleteSinkCommand = se_DeleteSinkCommand;
|
|
96
|
+
const se_GetLinkCommand = async (input, context) => {
|
|
99
97
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
100
98
|
const headers = {
|
|
101
99
|
"content-type": "application/json",
|
|
@@ -115,8 +113,8 @@ const serializeAws_restJson1GetLinkCommand = async (input, context) => {
|
|
|
115
113
|
body,
|
|
116
114
|
});
|
|
117
115
|
};
|
|
118
|
-
exports.
|
|
119
|
-
const
|
|
116
|
+
exports.se_GetLinkCommand = se_GetLinkCommand;
|
|
117
|
+
const se_GetSinkCommand = async (input, context) => {
|
|
120
118
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
121
119
|
const headers = {
|
|
122
120
|
"content-type": "application/json",
|
|
@@ -136,8 +134,8 @@ const serializeAws_restJson1GetSinkCommand = async (input, context) => {
|
|
|
136
134
|
body,
|
|
137
135
|
});
|
|
138
136
|
};
|
|
139
|
-
exports.
|
|
140
|
-
const
|
|
137
|
+
exports.se_GetSinkCommand = se_GetSinkCommand;
|
|
138
|
+
const se_GetSinkPolicyCommand = async (input, context) => {
|
|
141
139
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
142
140
|
const headers = {
|
|
143
141
|
"content-type": "application/json",
|
|
@@ -157,8 +155,8 @@ const serializeAws_restJson1GetSinkPolicyCommand = async (input, context) => {
|
|
|
157
155
|
body,
|
|
158
156
|
});
|
|
159
157
|
};
|
|
160
|
-
exports.
|
|
161
|
-
const
|
|
158
|
+
exports.se_GetSinkPolicyCommand = se_GetSinkPolicyCommand;
|
|
159
|
+
const se_ListAttachedLinksCommand = async (input, context) => {
|
|
162
160
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
163
161
|
const headers = {
|
|
164
162
|
"content-type": "application/json",
|
|
@@ -180,8 +178,8 @@ const serializeAws_restJson1ListAttachedLinksCommand = async (input, context) =>
|
|
|
180
178
|
body,
|
|
181
179
|
});
|
|
182
180
|
};
|
|
183
|
-
exports.
|
|
184
|
-
const
|
|
181
|
+
exports.se_ListAttachedLinksCommand = se_ListAttachedLinksCommand;
|
|
182
|
+
const se_ListLinksCommand = async (input, context) => {
|
|
185
183
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
186
184
|
const headers = {
|
|
187
185
|
"content-type": "application/json",
|
|
@@ -202,8 +200,8 @@ const serializeAws_restJson1ListLinksCommand = async (input, context) => {
|
|
|
202
200
|
body,
|
|
203
201
|
});
|
|
204
202
|
};
|
|
205
|
-
exports.
|
|
206
|
-
const
|
|
203
|
+
exports.se_ListLinksCommand = se_ListLinksCommand;
|
|
204
|
+
const se_ListSinksCommand = async (input, context) => {
|
|
207
205
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
208
206
|
const headers = {
|
|
209
207
|
"content-type": "application/json",
|
|
@@ -224,8 +222,8 @@ const serializeAws_restJson1ListSinksCommand = async (input, context) => {
|
|
|
224
222
|
body,
|
|
225
223
|
});
|
|
226
224
|
};
|
|
227
|
-
exports.
|
|
228
|
-
const
|
|
225
|
+
exports.se_ListSinksCommand = se_ListSinksCommand;
|
|
226
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
229
227
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
230
228
|
const headers = {};
|
|
231
229
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
@@ -241,8 +239,8 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
241
239
|
body,
|
|
242
240
|
});
|
|
243
241
|
};
|
|
244
|
-
exports.
|
|
245
|
-
const
|
|
242
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
243
|
+
const se_PutSinkPolicyCommand = async (input, context) => {
|
|
246
244
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
247
245
|
const headers = {
|
|
248
246
|
"content-type": "application/json",
|
|
@@ -263,8 +261,8 @@ const serializeAws_restJson1PutSinkPolicyCommand = async (input, context) => {
|
|
|
263
261
|
body,
|
|
264
262
|
});
|
|
265
263
|
};
|
|
266
|
-
exports.
|
|
267
|
-
const
|
|
264
|
+
exports.se_PutSinkPolicyCommand = se_PutSinkPolicyCommand;
|
|
265
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
268
266
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
269
267
|
const headers = {
|
|
270
268
|
"content-type": "application/json",
|
|
@@ -273,7 +271,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
273
271
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
274
272
|
let body;
|
|
275
273
|
body = JSON.stringify({
|
|
276
|
-
...(input.Tags != null && { Tags:
|
|
274
|
+
...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }),
|
|
277
275
|
});
|
|
278
276
|
return new protocol_http_1.HttpRequest({
|
|
279
277
|
protocol,
|
|
@@ -285,8 +283,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
285
283
|
body,
|
|
286
284
|
});
|
|
287
285
|
};
|
|
288
|
-
exports.
|
|
289
|
-
const
|
|
286
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
287
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
290
288
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
291
289
|
const headers = {};
|
|
292
290
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
@@ -309,8 +307,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
309
307
|
body,
|
|
310
308
|
});
|
|
311
309
|
};
|
|
312
|
-
exports.
|
|
313
|
-
const
|
|
310
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
311
|
+
const se_UpdateLinkCommand = async (input, context) => {
|
|
314
312
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
315
313
|
const headers = {
|
|
316
314
|
"content-type": "application/json",
|
|
@@ -319,9 +317,7 @@ const serializeAws_restJson1UpdateLinkCommand = async (input, context) => {
|
|
|
319
317
|
let body;
|
|
320
318
|
body = JSON.stringify({
|
|
321
319
|
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
322
|
-
...(input.ResourceTypes != null && {
|
|
323
|
-
ResourceTypes: serializeAws_restJson1ResourceTypesInput(input.ResourceTypes, context),
|
|
324
|
-
}),
|
|
320
|
+
...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypesInput(input.ResourceTypes, context) }),
|
|
325
321
|
});
|
|
326
322
|
return new protocol_http_1.HttpRequest({
|
|
327
323
|
protocol,
|
|
@@ -333,10 +329,10 @@ const serializeAws_restJson1UpdateLinkCommand = async (input, context) => {
|
|
|
333
329
|
body,
|
|
334
330
|
});
|
|
335
331
|
};
|
|
336
|
-
exports.
|
|
337
|
-
const
|
|
332
|
+
exports.se_UpdateLinkCommand = se_UpdateLinkCommand;
|
|
333
|
+
const de_CreateLinkCommand = async (output, context) => {
|
|
338
334
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
339
|
-
return
|
|
335
|
+
return de_CreateLinkCommandError(output, context);
|
|
340
336
|
}
|
|
341
337
|
const contents = map({
|
|
342
338
|
$metadata: deserializeMetadata(output),
|
|
@@ -355,18 +351,18 @@ const deserializeAws_restJson1CreateLinkCommand = async (output, context) => {
|
|
|
355
351
|
contents.LabelTemplate = (0, smithy_client_1.expectString)(data.LabelTemplate);
|
|
356
352
|
}
|
|
357
353
|
if (data.ResourceTypes != null) {
|
|
358
|
-
contents.ResourceTypes =
|
|
354
|
+
contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context);
|
|
359
355
|
}
|
|
360
356
|
if (data.SinkArn != null) {
|
|
361
357
|
contents.SinkArn = (0, smithy_client_1.expectString)(data.SinkArn);
|
|
362
358
|
}
|
|
363
359
|
if (data.Tags != null) {
|
|
364
|
-
contents.Tags =
|
|
360
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
365
361
|
}
|
|
366
362
|
return contents;
|
|
367
363
|
};
|
|
368
|
-
exports.
|
|
369
|
-
const
|
|
364
|
+
exports.de_CreateLinkCommand = de_CreateLinkCommand;
|
|
365
|
+
const de_CreateLinkCommandError = async (output, context) => {
|
|
370
366
|
const parsedOutput = {
|
|
371
367
|
...output,
|
|
372
368
|
body: await parseErrorBody(output.body, context),
|
|
@@ -375,19 +371,19 @@ const deserializeAws_restJson1CreateLinkCommandError = async (output, context) =
|
|
|
375
371
|
switch (errorCode) {
|
|
376
372
|
case "ConflictException":
|
|
377
373
|
case "com.amazonaws.oam#ConflictException":
|
|
378
|
-
throw await
|
|
374
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
379
375
|
case "InternalServiceFault":
|
|
380
376
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
381
|
-
throw await
|
|
377
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
382
378
|
case "InvalidParameterException":
|
|
383
379
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
384
|
-
throw await
|
|
380
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
385
381
|
case "MissingRequiredParameterException":
|
|
386
382
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
387
|
-
throw await
|
|
383
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
388
384
|
case "ServiceQuotaExceededException":
|
|
389
385
|
case "com.amazonaws.oam#ServiceQuotaExceededException":
|
|
390
|
-
throw await
|
|
386
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
391
387
|
default:
|
|
392
388
|
const parsedBody = parsedOutput.body;
|
|
393
389
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -398,9 +394,9 @@ const deserializeAws_restJson1CreateLinkCommandError = async (output, context) =
|
|
|
398
394
|
});
|
|
399
395
|
}
|
|
400
396
|
};
|
|
401
|
-
const
|
|
397
|
+
const de_CreateSinkCommand = async (output, context) => {
|
|
402
398
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
403
|
-
return
|
|
399
|
+
return de_CreateSinkCommandError(output, context);
|
|
404
400
|
}
|
|
405
401
|
const contents = map({
|
|
406
402
|
$metadata: deserializeMetadata(output),
|
|
@@ -416,12 +412,12 @@ const deserializeAws_restJson1CreateSinkCommand = async (output, context) => {
|
|
|
416
412
|
contents.Name = (0, smithy_client_1.expectString)(data.Name);
|
|
417
413
|
}
|
|
418
414
|
if (data.Tags != null) {
|
|
419
|
-
contents.Tags =
|
|
415
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
420
416
|
}
|
|
421
417
|
return contents;
|
|
422
418
|
};
|
|
423
|
-
exports.
|
|
424
|
-
const
|
|
419
|
+
exports.de_CreateSinkCommand = de_CreateSinkCommand;
|
|
420
|
+
const de_CreateSinkCommandError = async (output, context) => {
|
|
425
421
|
const parsedOutput = {
|
|
426
422
|
...output,
|
|
427
423
|
body: await parseErrorBody(output.body, context),
|
|
@@ -430,19 +426,19 @@ const deserializeAws_restJson1CreateSinkCommandError = async (output, context) =
|
|
|
430
426
|
switch (errorCode) {
|
|
431
427
|
case "ConflictException":
|
|
432
428
|
case "com.amazonaws.oam#ConflictException":
|
|
433
|
-
throw await
|
|
429
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
434
430
|
case "InternalServiceFault":
|
|
435
431
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
436
|
-
throw await
|
|
432
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
437
433
|
case "InvalidParameterException":
|
|
438
434
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
439
|
-
throw await
|
|
435
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
440
436
|
case "MissingRequiredParameterException":
|
|
441
437
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
442
|
-
throw await
|
|
438
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
443
439
|
case "ServiceQuotaExceededException":
|
|
444
440
|
case "com.amazonaws.oam#ServiceQuotaExceededException":
|
|
445
|
-
throw await
|
|
441
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
446
442
|
default:
|
|
447
443
|
const parsedBody = parsedOutput.body;
|
|
448
444
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -453,9 +449,9 @@ const deserializeAws_restJson1CreateSinkCommandError = async (output, context) =
|
|
|
453
449
|
});
|
|
454
450
|
}
|
|
455
451
|
};
|
|
456
|
-
const
|
|
452
|
+
const de_DeleteLinkCommand = async (output, context) => {
|
|
457
453
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
458
|
-
return
|
|
454
|
+
return de_DeleteLinkCommandError(output, context);
|
|
459
455
|
}
|
|
460
456
|
const contents = map({
|
|
461
457
|
$metadata: deserializeMetadata(output),
|
|
@@ -463,8 +459,8 @@ const deserializeAws_restJson1DeleteLinkCommand = async (output, context) => {
|
|
|
463
459
|
await collectBody(output.body, context);
|
|
464
460
|
return contents;
|
|
465
461
|
};
|
|
466
|
-
exports.
|
|
467
|
-
const
|
|
462
|
+
exports.de_DeleteLinkCommand = de_DeleteLinkCommand;
|
|
463
|
+
const de_DeleteLinkCommandError = async (output, context) => {
|
|
468
464
|
const parsedOutput = {
|
|
469
465
|
...output,
|
|
470
466
|
body: await parseErrorBody(output.body, context),
|
|
@@ -473,16 +469,16 @@ const deserializeAws_restJson1DeleteLinkCommandError = async (output, context) =
|
|
|
473
469
|
switch (errorCode) {
|
|
474
470
|
case "InternalServiceFault":
|
|
475
471
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
476
|
-
throw await
|
|
472
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
477
473
|
case "InvalidParameterException":
|
|
478
474
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
479
|
-
throw await
|
|
475
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
480
476
|
case "MissingRequiredParameterException":
|
|
481
477
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
482
|
-
throw await
|
|
478
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
483
479
|
case "ResourceNotFoundException":
|
|
484
480
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
485
|
-
throw await
|
|
481
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
486
482
|
default:
|
|
487
483
|
const parsedBody = parsedOutput.body;
|
|
488
484
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -493,9 +489,9 @@ const deserializeAws_restJson1DeleteLinkCommandError = async (output, context) =
|
|
|
493
489
|
});
|
|
494
490
|
}
|
|
495
491
|
};
|
|
496
|
-
const
|
|
492
|
+
const de_DeleteSinkCommand = async (output, context) => {
|
|
497
493
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
498
|
-
return
|
|
494
|
+
return de_DeleteSinkCommandError(output, context);
|
|
499
495
|
}
|
|
500
496
|
const contents = map({
|
|
501
497
|
$metadata: deserializeMetadata(output),
|
|
@@ -503,8 +499,8 @@ const deserializeAws_restJson1DeleteSinkCommand = async (output, context) => {
|
|
|
503
499
|
await collectBody(output.body, context);
|
|
504
500
|
return contents;
|
|
505
501
|
};
|
|
506
|
-
exports.
|
|
507
|
-
const
|
|
502
|
+
exports.de_DeleteSinkCommand = de_DeleteSinkCommand;
|
|
503
|
+
const de_DeleteSinkCommandError = async (output, context) => {
|
|
508
504
|
const parsedOutput = {
|
|
509
505
|
...output,
|
|
510
506
|
body: await parseErrorBody(output.body, context),
|
|
@@ -513,19 +509,19 @@ const deserializeAws_restJson1DeleteSinkCommandError = async (output, context) =
|
|
|
513
509
|
switch (errorCode) {
|
|
514
510
|
case "ConflictException":
|
|
515
511
|
case "com.amazonaws.oam#ConflictException":
|
|
516
|
-
throw await
|
|
512
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
517
513
|
case "InternalServiceFault":
|
|
518
514
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
519
|
-
throw await
|
|
515
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
520
516
|
case "InvalidParameterException":
|
|
521
517
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
522
|
-
throw await
|
|
518
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
523
519
|
case "MissingRequiredParameterException":
|
|
524
520
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
525
|
-
throw await
|
|
521
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
526
522
|
case "ResourceNotFoundException":
|
|
527
523
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
528
|
-
throw await
|
|
524
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
529
525
|
default:
|
|
530
526
|
const parsedBody = parsedOutput.body;
|
|
531
527
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -536,9 +532,9 @@ const deserializeAws_restJson1DeleteSinkCommandError = async (output, context) =
|
|
|
536
532
|
});
|
|
537
533
|
}
|
|
538
534
|
};
|
|
539
|
-
const
|
|
535
|
+
const de_GetLinkCommand = async (output, context) => {
|
|
540
536
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
541
|
-
return
|
|
537
|
+
return de_GetLinkCommandError(output, context);
|
|
542
538
|
}
|
|
543
539
|
const contents = map({
|
|
544
540
|
$metadata: deserializeMetadata(output),
|
|
@@ -557,18 +553,18 @@ const deserializeAws_restJson1GetLinkCommand = async (output, context) => {
|
|
|
557
553
|
contents.LabelTemplate = (0, smithy_client_1.expectString)(data.LabelTemplate);
|
|
558
554
|
}
|
|
559
555
|
if (data.ResourceTypes != null) {
|
|
560
|
-
contents.ResourceTypes =
|
|
556
|
+
contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context);
|
|
561
557
|
}
|
|
562
558
|
if (data.SinkArn != null) {
|
|
563
559
|
contents.SinkArn = (0, smithy_client_1.expectString)(data.SinkArn);
|
|
564
560
|
}
|
|
565
561
|
if (data.Tags != null) {
|
|
566
|
-
contents.Tags =
|
|
562
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
567
563
|
}
|
|
568
564
|
return contents;
|
|
569
565
|
};
|
|
570
|
-
exports.
|
|
571
|
-
const
|
|
566
|
+
exports.de_GetLinkCommand = de_GetLinkCommand;
|
|
567
|
+
const de_GetLinkCommandError = async (output, context) => {
|
|
572
568
|
const parsedOutput = {
|
|
573
569
|
...output,
|
|
574
570
|
body: await parseErrorBody(output.body, context),
|
|
@@ -577,16 +573,16 @@ const deserializeAws_restJson1GetLinkCommandError = async (output, context) => {
|
|
|
577
573
|
switch (errorCode) {
|
|
578
574
|
case "InternalServiceFault":
|
|
579
575
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
580
|
-
throw await
|
|
576
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
581
577
|
case "InvalidParameterException":
|
|
582
578
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
583
|
-
throw await
|
|
579
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
584
580
|
case "MissingRequiredParameterException":
|
|
585
581
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
586
|
-
throw await
|
|
582
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
587
583
|
case "ResourceNotFoundException":
|
|
588
584
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
589
|
-
throw await
|
|
585
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
590
586
|
default:
|
|
591
587
|
const parsedBody = parsedOutput.body;
|
|
592
588
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -597,9 +593,9 @@ const deserializeAws_restJson1GetLinkCommandError = async (output, context) => {
|
|
|
597
593
|
});
|
|
598
594
|
}
|
|
599
595
|
};
|
|
600
|
-
const
|
|
596
|
+
const de_GetSinkCommand = async (output, context) => {
|
|
601
597
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
602
|
-
return
|
|
598
|
+
return de_GetSinkCommandError(output, context);
|
|
603
599
|
}
|
|
604
600
|
const contents = map({
|
|
605
601
|
$metadata: deserializeMetadata(output),
|
|
@@ -615,12 +611,12 @@ const deserializeAws_restJson1GetSinkCommand = async (output, context) => {
|
|
|
615
611
|
contents.Name = (0, smithy_client_1.expectString)(data.Name);
|
|
616
612
|
}
|
|
617
613
|
if (data.Tags != null) {
|
|
618
|
-
contents.Tags =
|
|
614
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
619
615
|
}
|
|
620
616
|
return contents;
|
|
621
617
|
};
|
|
622
|
-
exports.
|
|
623
|
-
const
|
|
618
|
+
exports.de_GetSinkCommand = de_GetSinkCommand;
|
|
619
|
+
const de_GetSinkCommandError = async (output, context) => {
|
|
624
620
|
const parsedOutput = {
|
|
625
621
|
...output,
|
|
626
622
|
body: await parseErrorBody(output.body, context),
|
|
@@ -629,16 +625,16 @@ const deserializeAws_restJson1GetSinkCommandError = async (output, context) => {
|
|
|
629
625
|
switch (errorCode) {
|
|
630
626
|
case "InternalServiceFault":
|
|
631
627
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
632
|
-
throw await
|
|
628
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
633
629
|
case "InvalidParameterException":
|
|
634
630
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
635
|
-
throw await
|
|
631
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
636
632
|
case "MissingRequiredParameterException":
|
|
637
633
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
638
|
-
throw await
|
|
634
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
639
635
|
case "ResourceNotFoundException":
|
|
640
636
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
641
|
-
throw await
|
|
637
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
642
638
|
default:
|
|
643
639
|
const parsedBody = parsedOutput.body;
|
|
644
640
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -649,9 +645,9 @@ const deserializeAws_restJson1GetSinkCommandError = async (output, context) => {
|
|
|
649
645
|
});
|
|
650
646
|
}
|
|
651
647
|
};
|
|
652
|
-
const
|
|
648
|
+
const de_GetSinkPolicyCommand = async (output, context) => {
|
|
653
649
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
654
|
-
return
|
|
650
|
+
return de_GetSinkPolicyCommandError(output, context);
|
|
655
651
|
}
|
|
656
652
|
const contents = map({
|
|
657
653
|
$metadata: deserializeMetadata(output),
|
|
@@ -668,8 +664,8 @@ const deserializeAws_restJson1GetSinkPolicyCommand = async (output, context) =>
|
|
|
668
664
|
}
|
|
669
665
|
return contents;
|
|
670
666
|
};
|
|
671
|
-
exports.
|
|
672
|
-
const
|
|
667
|
+
exports.de_GetSinkPolicyCommand = de_GetSinkPolicyCommand;
|
|
668
|
+
const de_GetSinkPolicyCommandError = async (output, context) => {
|
|
673
669
|
const parsedOutput = {
|
|
674
670
|
...output,
|
|
675
671
|
body: await parseErrorBody(output.body, context),
|
|
@@ -678,16 +674,16 @@ const deserializeAws_restJson1GetSinkPolicyCommandError = async (output, context
|
|
|
678
674
|
switch (errorCode) {
|
|
679
675
|
case "InternalServiceFault":
|
|
680
676
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
681
|
-
throw await
|
|
677
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
682
678
|
case "InvalidParameterException":
|
|
683
679
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
684
|
-
throw await
|
|
680
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
685
681
|
case "MissingRequiredParameterException":
|
|
686
682
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
687
|
-
throw await
|
|
683
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
688
684
|
case "ResourceNotFoundException":
|
|
689
685
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
690
|
-
throw await
|
|
686
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
691
687
|
default:
|
|
692
688
|
const parsedBody = parsedOutput.body;
|
|
693
689
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -698,24 +694,24 @@ const deserializeAws_restJson1GetSinkPolicyCommandError = async (output, context
|
|
|
698
694
|
});
|
|
699
695
|
}
|
|
700
696
|
};
|
|
701
|
-
const
|
|
697
|
+
const de_ListAttachedLinksCommand = async (output, context) => {
|
|
702
698
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
703
|
-
return
|
|
699
|
+
return de_ListAttachedLinksCommandError(output, context);
|
|
704
700
|
}
|
|
705
701
|
const contents = map({
|
|
706
702
|
$metadata: deserializeMetadata(output),
|
|
707
703
|
});
|
|
708
704
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
709
705
|
if (data.Items != null) {
|
|
710
|
-
contents.Items =
|
|
706
|
+
contents.Items = de_ListAttachedLinksItems(data.Items, context);
|
|
711
707
|
}
|
|
712
708
|
if (data.NextToken != null) {
|
|
713
709
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
714
710
|
}
|
|
715
711
|
return contents;
|
|
716
712
|
};
|
|
717
|
-
exports.
|
|
718
|
-
const
|
|
713
|
+
exports.de_ListAttachedLinksCommand = de_ListAttachedLinksCommand;
|
|
714
|
+
const de_ListAttachedLinksCommandError = async (output, context) => {
|
|
719
715
|
const parsedOutput = {
|
|
720
716
|
...output,
|
|
721
717
|
body: await parseErrorBody(output.body, context),
|
|
@@ -724,16 +720,16 @@ const deserializeAws_restJson1ListAttachedLinksCommandError = async (output, con
|
|
|
724
720
|
switch (errorCode) {
|
|
725
721
|
case "InternalServiceFault":
|
|
726
722
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
727
|
-
throw await
|
|
723
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
728
724
|
case "InvalidParameterException":
|
|
729
725
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
730
|
-
throw await
|
|
726
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
731
727
|
case "MissingRequiredParameterException":
|
|
732
728
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
733
|
-
throw await
|
|
729
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
734
730
|
case "ResourceNotFoundException":
|
|
735
731
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
736
|
-
throw await
|
|
732
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
737
733
|
default:
|
|
738
734
|
const parsedBody = parsedOutput.body;
|
|
739
735
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -744,24 +740,24 @@ const deserializeAws_restJson1ListAttachedLinksCommandError = async (output, con
|
|
|
744
740
|
});
|
|
745
741
|
}
|
|
746
742
|
};
|
|
747
|
-
const
|
|
743
|
+
const de_ListLinksCommand = async (output, context) => {
|
|
748
744
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
749
|
-
return
|
|
745
|
+
return de_ListLinksCommandError(output, context);
|
|
750
746
|
}
|
|
751
747
|
const contents = map({
|
|
752
748
|
$metadata: deserializeMetadata(output),
|
|
753
749
|
});
|
|
754
750
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
755
751
|
if (data.Items != null) {
|
|
756
|
-
contents.Items =
|
|
752
|
+
contents.Items = de_ListLinksItems(data.Items, context);
|
|
757
753
|
}
|
|
758
754
|
if (data.NextToken != null) {
|
|
759
755
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
760
756
|
}
|
|
761
757
|
return contents;
|
|
762
758
|
};
|
|
763
|
-
exports.
|
|
764
|
-
const
|
|
759
|
+
exports.de_ListLinksCommand = de_ListLinksCommand;
|
|
760
|
+
const de_ListLinksCommandError = async (output, context) => {
|
|
765
761
|
const parsedOutput = {
|
|
766
762
|
...output,
|
|
767
763
|
body: await parseErrorBody(output.body, context),
|
|
@@ -770,13 +766,13 @@ const deserializeAws_restJson1ListLinksCommandError = async (output, context) =>
|
|
|
770
766
|
switch (errorCode) {
|
|
771
767
|
case "InternalServiceFault":
|
|
772
768
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
773
|
-
throw await
|
|
769
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
774
770
|
case "InvalidParameterException":
|
|
775
771
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
776
|
-
throw await
|
|
772
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
777
773
|
case "ResourceNotFoundException":
|
|
778
774
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
779
|
-
throw await
|
|
775
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
780
776
|
default:
|
|
781
777
|
const parsedBody = parsedOutput.body;
|
|
782
778
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -787,24 +783,24 @@ const deserializeAws_restJson1ListLinksCommandError = async (output, context) =>
|
|
|
787
783
|
});
|
|
788
784
|
}
|
|
789
785
|
};
|
|
790
|
-
const
|
|
786
|
+
const de_ListSinksCommand = async (output, context) => {
|
|
791
787
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
792
|
-
return
|
|
788
|
+
return de_ListSinksCommandError(output, context);
|
|
793
789
|
}
|
|
794
790
|
const contents = map({
|
|
795
791
|
$metadata: deserializeMetadata(output),
|
|
796
792
|
});
|
|
797
793
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
798
794
|
if (data.Items != null) {
|
|
799
|
-
contents.Items =
|
|
795
|
+
contents.Items = de_ListSinksItems(data.Items, context);
|
|
800
796
|
}
|
|
801
797
|
if (data.NextToken != null) {
|
|
802
798
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
803
799
|
}
|
|
804
800
|
return contents;
|
|
805
801
|
};
|
|
806
|
-
exports.
|
|
807
|
-
const
|
|
802
|
+
exports.de_ListSinksCommand = de_ListSinksCommand;
|
|
803
|
+
const de_ListSinksCommandError = async (output, context) => {
|
|
808
804
|
const parsedOutput = {
|
|
809
805
|
...output,
|
|
810
806
|
body: await parseErrorBody(output.body, context),
|
|
@@ -813,13 +809,13 @@ const deserializeAws_restJson1ListSinksCommandError = async (output, context) =>
|
|
|
813
809
|
switch (errorCode) {
|
|
814
810
|
case "InternalServiceFault":
|
|
815
811
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
816
|
-
throw await
|
|
812
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
817
813
|
case "InvalidParameterException":
|
|
818
814
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
819
|
-
throw await
|
|
815
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
820
816
|
case "ResourceNotFoundException":
|
|
821
817
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
822
|
-
throw await
|
|
818
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
823
819
|
default:
|
|
824
820
|
const parsedBody = parsedOutput.body;
|
|
825
821
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -830,21 +826,21 @@ const deserializeAws_restJson1ListSinksCommandError = async (output, context) =>
|
|
|
830
826
|
});
|
|
831
827
|
}
|
|
832
828
|
};
|
|
833
|
-
const
|
|
829
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
834
830
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
835
|
-
return
|
|
831
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
836
832
|
}
|
|
837
833
|
const contents = map({
|
|
838
834
|
$metadata: deserializeMetadata(output),
|
|
839
835
|
});
|
|
840
836
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
841
837
|
if (data.Tags != null) {
|
|
842
|
-
contents.Tags =
|
|
838
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
843
839
|
}
|
|
844
840
|
return contents;
|
|
845
841
|
};
|
|
846
|
-
exports.
|
|
847
|
-
const
|
|
842
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
843
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
848
844
|
const parsedOutput = {
|
|
849
845
|
...output,
|
|
850
846
|
body: await parseErrorBody(output.body, context),
|
|
@@ -853,10 +849,10 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
853
849
|
switch (errorCode) {
|
|
854
850
|
case "ResourceNotFoundException":
|
|
855
851
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
856
|
-
throw await
|
|
852
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
857
853
|
case "ValidationException":
|
|
858
854
|
case "com.amazonaws.oam#ValidationException":
|
|
859
|
-
throw await
|
|
855
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
860
856
|
default:
|
|
861
857
|
const parsedBody = parsedOutput.body;
|
|
862
858
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -867,9 +863,9 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
867
863
|
});
|
|
868
864
|
}
|
|
869
865
|
};
|
|
870
|
-
const
|
|
866
|
+
const de_PutSinkPolicyCommand = async (output, context) => {
|
|
871
867
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
872
|
-
return
|
|
868
|
+
return de_PutSinkPolicyCommandError(output, context);
|
|
873
869
|
}
|
|
874
870
|
const contents = map({
|
|
875
871
|
$metadata: deserializeMetadata(output),
|
|
@@ -886,8 +882,8 @@ const deserializeAws_restJson1PutSinkPolicyCommand = async (output, context) =>
|
|
|
886
882
|
}
|
|
887
883
|
return contents;
|
|
888
884
|
};
|
|
889
|
-
exports.
|
|
890
|
-
const
|
|
885
|
+
exports.de_PutSinkPolicyCommand = de_PutSinkPolicyCommand;
|
|
886
|
+
const de_PutSinkPolicyCommandError = async (output, context) => {
|
|
891
887
|
const parsedOutput = {
|
|
892
888
|
...output,
|
|
893
889
|
body: await parseErrorBody(output.body, context),
|
|
@@ -896,16 +892,16 @@ const deserializeAws_restJson1PutSinkPolicyCommandError = async (output, context
|
|
|
896
892
|
switch (errorCode) {
|
|
897
893
|
case "InternalServiceFault":
|
|
898
894
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
899
|
-
throw await
|
|
895
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
900
896
|
case "InvalidParameterException":
|
|
901
897
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
902
|
-
throw await
|
|
898
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
903
899
|
case "MissingRequiredParameterException":
|
|
904
900
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
905
|
-
throw await
|
|
901
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
906
902
|
case "ResourceNotFoundException":
|
|
907
903
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
908
|
-
throw await
|
|
904
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
909
905
|
default:
|
|
910
906
|
const parsedBody = parsedOutput.body;
|
|
911
907
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -916,9 +912,9 @@ const deserializeAws_restJson1PutSinkPolicyCommandError = async (output, context
|
|
|
916
912
|
});
|
|
917
913
|
}
|
|
918
914
|
};
|
|
919
|
-
const
|
|
915
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
920
916
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
921
|
-
return
|
|
917
|
+
return de_TagResourceCommandError(output, context);
|
|
922
918
|
}
|
|
923
919
|
const contents = map({
|
|
924
920
|
$metadata: deserializeMetadata(output),
|
|
@@ -926,8 +922,8 @@ const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
|
926
922
|
await collectBody(output.body, context);
|
|
927
923
|
return contents;
|
|
928
924
|
};
|
|
929
|
-
exports.
|
|
930
|
-
const
|
|
925
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
926
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
931
927
|
const parsedOutput = {
|
|
932
928
|
...output,
|
|
933
929
|
body: await parseErrorBody(output.body, context),
|
|
@@ -936,13 +932,13 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
936
932
|
switch (errorCode) {
|
|
937
933
|
case "ResourceNotFoundException":
|
|
938
934
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
939
|
-
throw await
|
|
935
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
940
936
|
case "TooManyTagsException":
|
|
941
937
|
case "com.amazonaws.oam#TooManyTagsException":
|
|
942
|
-
throw await
|
|
938
|
+
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
943
939
|
case "ValidationException":
|
|
944
940
|
case "com.amazonaws.oam#ValidationException":
|
|
945
|
-
throw await
|
|
941
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
946
942
|
default:
|
|
947
943
|
const parsedBody = parsedOutput.body;
|
|
948
944
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -953,9 +949,9 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
953
949
|
});
|
|
954
950
|
}
|
|
955
951
|
};
|
|
956
|
-
const
|
|
952
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
957
953
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
958
|
-
return
|
|
954
|
+
return de_UntagResourceCommandError(output, context);
|
|
959
955
|
}
|
|
960
956
|
const contents = map({
|
|
961
957
|
$metadata: deserializeMetadata(output),
|
|
@@ -963,8 +959,8 @@ const deserializeAws_restJson1UntagResourceCommand = async (output, context) =>
|
|
|
963
959
|
await collectBody(output.body, context);
|
|
964
960
|
return contents;
|
|
965
961
|
};
|
|
966
|
-
exports.
|
|
967
|
-
const
|
|
962
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
963
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
968
964
|
const parsedOutput = {
|
|
969
965
|
...output,
|
|
970
966
|
body: await parseErrorBody(output.body, context),
|
|
@@ -973,10 +969,10 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
973
969
|
switch (errorCode) {
|
|
974
970
|
case "ResourceNotFoundException":
|
|
975
971
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
976
|
-
throw await
|
|
972
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
977
973
|
case "ValidationException":
|
|
978
974
|
case "com.amazonaws.oam#ValidationException":
|
|
979
|
-
throw await
|
|
975
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
980
976
|
default:
|
|
981
977
|
const parsedBody = parsedOutput.body;
|
|
982
978
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -987,9 +983,9 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
987
983
|
});
|
|
988
984
|
}
|
|
989
985
|
};
|
|
990
|
-
const
|
|
986
|
+
const de_UpdateLinkCommand = async (output, context) => {
|
|
991
987
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
992
|
-
return
|
|
988
|
+
return de_UpdateLinkCommandError(output, context);
|
|
993
989
|
}
|
|
994
990
|
const contents = map({
|
|
995
991
|
$metadata: deserializeMetadata(output),
|
|
@@ -1008,18 +1004,18 @@ const deserializeAws_restJson1UpdateLinkCommand = async (output, context) => {
|
|
|
1008
1004
|
contents.LabelTemplate = (0, smithy_client_1.expectString)(data.LabelTemplate);
|
|
1009
1005
|
}
|
|
1010
1006
|
if (data.ResourceTypes != null) {
|
|
1011
|
-
contents.ResourceTypes =
|
|
1007
|
+
contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context);
|
|
1012
1008
|
}
|
|
1013
1009
|
if (data.SinkArn != null) {
|
|
1014
1010
|
contents.SinkArn = (0, smithy_client_1.expectString)(data.SinkArn);
|
|
1015
1011
|
}
|
|
1016
1012
|
if (data.Tags != null) {
|
|
1017
|
-
contents.Tags =
|
|
1013
|
+
contents.Tags = de_TagMapOutput(data.Tags, context);
|
|
1018
1014
|
}
|
|
1019
1015
|
return contents;
|
|
1020
1016
|
};
|
|
1021
|
-
exports.
|
|
1022
|
-
const
|
|
1017
|
+
exports.de_UpdateLinkCommand = de_UpdateLinkCommand;
|
|
1018
|
+
const de_UpdateLinkCommandError = async (output, context) => {
|
|
1023
1019
|
const parsedOutput = {
|
|
1024
1020
|
...output,
|
|
1025
1021
|
body: await parseErrorBody(output.body, context),
|
|
@@ -1028,16 +1024,16 @@ const deserializeAws_restJson1UpdateLinkCommandError = async (output, context) =
|
|
|
1028
1024
|
switch (errorCode) {
|
|
1029
1025
|
case "InternalServiceFault":
|
|
1030
1026
|
case "com.amazonaws.oam#InternalServiceFault":
|
|
1031
|
-
throw await
|
|
1027
|
+
throw await de_InternalServiceFaultRes(parsedOutput, context);
|
|
1032
1028
|
case "InvalidParameterException":
|
|
1033
1029
|
case "com.amazonaws.oam#InvalidParameterException":
|
|
1034
|
-
throw await
|
|
1030
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1035
1031
|
case "MissingRequiredParameterException":
|
|
1036
1032
|
case "com.amazonaws.oam#MissingRequiredParameterException":
|
|
1037
|
-
throw await
|
|
1033
|
+
throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
|
|
1038
1034
|
case "ResourceNotFoundException":
|
|
1039
1035
|
case "com.amazonaws.oam#ResourceNotFoundException":
|
|
1040
|
-
throw await
|
|
1036
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1041
1037
|
default:
|
|
1042
1038
|
const parsedBody = parsedOutput.body;
|
|
1043
1039
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -1049,7 +1045,7 @@ const deserializeAws_restJson1UpdateLinkCommandError = async (output, context) =
|
|
|
1049
1045
|
}
|
|
1050
1046
|
};
|
|
1051
1047
|
const map = smithy_client_1.map;
|
|
1052
|
-
const
|
|
1048
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1053
1049
|
const contents = map({
|
|
1054
1050
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1055
1051
|
});
|
|
@@ -1063,7 +1059,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
1063
1059
|
});
|
|
1064
1060
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1065
1061
|
};
|
|
1066
|
-
const
|
|
1062
|
+
const de_InternalServiceFaultRes = async (parsedOutput, context) => {
|
|
1067
1063
|
const contents = map({
|
|
1068
1064
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1069
1065
|
});
|
|
@@ -1077,7 +1073,7 @@ const deserializeAws_restJson1InternalServiceFaultResponse = async (parsedOutput
|
|
|
1077
1073
|
});
|
|
1078
1074
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1079
1075
|
};
|
|
1080
|
-
const
|
|
1076
|
+
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
1081
1077
|
const contents = map({
|
|
1082
1078
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1083
1079
|
});
|
|
@@ -1091,7 +1087,7 @@ const deserializeAws_restJson1InvalidParameterExceptionResponse = async (parsedO
|
|
|
1091
1087
|
});
|
|
1092
1088
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1093
1089
|
};
|
|
1094
|
-
const
|
|
1090
|
+
const de_MissingRequiredParameterExceptionRes = async (parsedOutput, context) => {
|
|
1095
1091
|
const contents = map({
|
|
1096
1092
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1097
1093
|
});
|
|
@@ -1105,7 +1101,7 @@ const deserializeAws_restJson1MissingRequiredParameterExceptionResponse = async
|
|
|
1105
1101
|
});
|
|
1106
1102
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1107
1103
|
};
|
|
1108
|
-
const
|
|
1104
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1109
1105
|
const contents = map({
|
|
1110
1106
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1111
1107
|
});
|
|
@@ -1119,7 +1115,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
1119
1115
|
});
|
|
1120
1116
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1121
1117
|
};
|
|
1122
|
-
const
|
|
1118
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1123
1119
|
const contents = map({
|
|
1124
1120
|
amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
|
|
1125
1121
|
});
|
|
@@ -1133,7 +1129,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
1133
1129
|
});
|
|
1134
1130
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1135
1131
|
};
|
|
1136
|
-
const
|
|
1132
|
+
const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
1137
1133
|
const contents = map({});
|
|
1138
1134
|
const data = parsedOutput.body;
|
|
1139
1135
|
if (data.Message != null) {
|
|
@@ -1145,7 +1141,7 @@ const deserializeAws_restJson1TooManyTagsExceptionResponse = async (parsedOutput
|
|
|
1145
1141
|
});
|
|
1146
1142
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1147
1143
|
};
|
|
1148
|
-
const
|
|
1144
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1149
1145
|
const contents = map({});
|
|
1150
1146
|
const data = parsedOutput.body;
|
|
1151
1147
|
if (data.Message != null) {
|
|
@@ -1157,14 +1153,14 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1157
1153
|
});
|
|
1158
1154
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1159
1155
|
};
|
|
1160
|
-
const
|
|
1156
|
+
const se_ResourceTypesInput = (input, context) => {
|
|
1161
1157
|
return input
|
|
1162
1158
|
.filter((e) => e != null)
|
|
1163
1159
|
.map((entry) => {
|
|
1164
1160
|
return entry;
|
|
1165
1161
|
});
|
|
1166
1162
|
};
|
|
1167
|
-
const
|
|
1163
|
+
const se_TagMapInput = (input, context) => {
|
|
1168
1164
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1169
1165
|
if (value === null) {
|
|
1170
1166
|
return acc;
|
|
@@ -1173,67 +1169,63 @@ const serializeAws_restJson1TagMapInput = (input, context) => {
|
|
|
1173
1169
|
return acc;
|
|
1174
1170
|
}, {});
|
|
1175
1171
|
};
|
|
1176
|
-
const
|
|
1172
|
+
const de_ListAttachedLinksItem = (output, context) => {
|
|
1177
1173
|
return {
|
|
1178
1174
|
Label: (0, smithy_client_1.expectString)(output.Label),
|
|
1179
1175
|
LinkArn: (0, smithy_client_1.expectString)(output.LinkArn),
|
|
1180
|
-
ResourceTypes: output.ResourceTypes != null
|
|
1181
|
-
? deserializeAws_restJson1ResourceTypesOutput(output.ResourceTypes, context)
|
|
1182
|
-
: undefined,
|
|
1176
|
+
ResourceTypes: output.ResourceTypes != null ? de_ResourceTypesOutput(output.ResourceTypes, context) : undefined,
|
|
1183
1177
|
};
|
|
1184
1178
|
};
|
|
1185
|
-
const
|
|
1179
|
+
const de_ListAttachedLinksItems = (output, context) => {
|
|
1186
1180
|
const retVal = (output || [])
|
|
1187
1181
|
.filter((e) => e != null)
|
|
1188
1182
|
.map((entry) => {
|
|
1189
1183
|
if (entry === null) {
|
|
1190
1184
|
return null;
|
|
1191
1185
|
}
|
|
1192
|
-
return
|
|
1186
|
+
return de_ListAttachedLinksItem(entry, context);
|
|
1193
1187
|
});
|
|
1194
1188
|
return retVal;
|
|
1195
1189
|
};
|
|
1196
|
-
const
|
|
1190
|
+
const de_ListLinksItem = (output, context) => {
|
|
1197
1191
|
return {
|
|
1198
1192
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1199
1193
|
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1200
1194
|
Label: (0, smithy_client_1.expectString)(output.Label),
|
|
1201
|
-
ResourceTypes: output.ResourceTypes != null
|
|
1202
|
-
? deserializeAws_restJson1ResourceTypesOutput(output.ResourceTypes, context)
|
|
1203
|
-
: undefined,
|
|
1195
|
+
ResourceTypes: output.ResourceTypes != null ? de_ResourceTypesOutput(output.ResourceTypes, context) : undefined,
|
|
1204
1196
|
SinkArn: (0, smithy_client_1.expectString)(output.SinkArn),
|
|
1205
1197
|
};
|
|
1206
1198
|
};
|
|
1207
|
-
const
|
|
1199
|
+
const de_ListLinksItems = (output, context) => {
|
|
1208
1200
|
const retVal = (output || [])
|
|
1209
1201
|
.filter((e) => e != null)
|
|
1210
1202
|
.map((entry) => {
|
|
1211
1203
|
if (entry === null) {
|
|
1212
1204
|
return null;
|
|
1213
1205
|
}
|
|
1214
|
-
return
|
|
1206
|
+
return de_ListLinksItem(entry, context);
|
|
1215
1207
|
});
|
|
1216
1208
|
return retVal;
|
|
1217
1209
|
};
|
|
1218
|
-
const
|
|
1210
|
+
const de_ListSinksItem = (output, context) => {
|
|
1219
1211
|
return {
|
|
1220
1212
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1221
1213
|
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1222
1214
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1223
1215
|
};
|
|
1224
1216
|
};
|
|
1225
|
-
const
|
|
1217
|
+
const de_ListSinksItems = (output, context) => {
|
|
1226
1218
|
const retVal = (output || [])
|
|
1227
1219
|
.filter((e) => e != null)
|
|
1228
1220
|
.map((entry) => {
|
|
1229
1221
|
if (entry === null) {
|
|
1230
1222
|
return null;
|
|
1231
1223
|
}
|
|
1232
|
-
return
|
|
1224
|
+
return de_ListSinksItem(entry, context);
|
|
1233
1225
|
});
|
|
1234
1226
|
return retVal;
|
|
1235
1227
|
};
|
|
1236
|
-
const
|
|
1228
|
+
const de_ResourceTypesOutput = (output, context) => {
|
|
1237
1229
|
const retVal = (output || [])
|
|
1238
1230
|
.filter((e) => e != null)
|
|
1239
1231
|
.map((entry) => {
|
|
@@ -1244,7 +1236,7 @@ const deserializeAws_restJson1ResourceTypesOutput = (output, context) => {
|
|
|
1244
1236
|
});
|
|
1245
1237
|
return retVal;
|
|
1246
1238
|
};
|
|
1247
|
-
const
|
|
1239
|
+
const de_TagMapOutput = (output, context) => {
|
|
1248
1240
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1249
1241
|
if (value === null) {
|
|
1250
1242
|
return acc;
|