@aws-sdk/client-codestar-notifications 3.310.0 → 3.315.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/protocols/Aws_restJson1.js +180 -332
- package/dist-es/protocols/Aws_restJson1.js +159 -311
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { CodestarNotificationsServiceException as __BaseException } from "../models/CodestarNotificationsServiceException";
|
|
5
5
|
import { AccessDeniedException, ConcurrentModificationException, ConfigurationException, InvalidNextTokenException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
@@ -10,16 +10,16 @@ export const se_CreateNotificationRuleCommand = async (input, context) => {
|
|
|
10
10
|
};
|
|
11
11
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createNotificationRule";
|
|
12
12
|
let body;
|
|
13
|
-
body = JSON.stringify({
|
|
14
|
-
ClientRequestToken:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
13
|
+
body = JSON.stringify(take(input, {
|
|
14
|
+
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
15
|
+
DetailType: [],
|
|
16
|
+
EventTypeIds: (_) => _json(_),
|
|
17
|
+
Name: [],
|
|
18
|
+
Resource: [],
|
|
19
|
+
Status: [],
|
|
20
|
+
Tags: (_) => _json(_),
|
|
21
|
+
Targets: (_) => _json(_),
|
|
22
|
+
}));
|
|
23
23
|
return new __HttpRequest({
|
|
24
24
|
protocol,
|
|
25
25
|
hostname,
|
|
@@ -37,9 +37,9 @@ export const se_DeleteNotificationRuleCommand = async (input, context) => {
|
|
|
37
37
|
};
|
|
38
38
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteNotificationRule";
|
|
39
39
|
let body;
|
|
40
|
-
body = JSON.stringify({
|
|
41
|
-
|
|
42
|
-
});
|
|
40
|
+
body = JSON.stringify(take(input, {
|
|
41
|
+
Arn: [],
|
|
42
|
+
}));
|
|
43
43
|
return new __HttpRequest({
|
|
44
44
|
protocol,
|
|
45
45
|
hostname,
|
|
@@ -57,10 +57,10 @@ export const se_DeleteTargetCommand = async (input, context) => {
|
|
|
57
57
|
};
|
|
58
58
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteTarget";
|
|
59
59
|
let body;
|
|
60
|
-
body = JSON.stringify({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
60
|
+
body = JSON.stringify(take(input, {
|
|
61
|
+
ForceUnsubscribeAll: [],
|
|
62
|
+
TargetAddress: [],
|
|
63
|
+
}));
|
|
64
64
|
return new __HttpRequest({
|
|
65
65
|
protocol,
|
|
66
66
|
hostname,
|
|
@@ -78,9 +78,9 @@ export const se_DescribeNotificationRuleCommand = async (input, context) => {
|
|
|
78
78
|
};
|
|
79
79
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeNotificationRule";
|
|
80
80
|
let body;
|
|
81
|
-
body = JSON.stringify({
|
|
82
|
-
|
|
83
|
-
});
|
|
81
|
+
body = JSON.stringify(take(input, {
|
|
82
|
+
Arn: [],
|
|
83
|
+
}));
|
|
84
84
|
return new __HttpRequest({
|
|
85
85
|
protocol,
|
|
86
86
|
hostname,
|
|
@@ -98,11 +98,11 @@ export const se_ListEventTypesCommand = async (input, context) => {
|
|
|
98
98
|
};
|
|
99
99
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listEventTypes";
|
|
100
100
|
let body;
|
|
101
|
-
body = JSON.stringify({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
101
|
+
body = JSON.stringify(take(input, {
|
|
102
|
+
Filters: (_) => _json(_),
|
|
103
|
+
MaxResults: [],
|
|
104
|
+
NextToken: [],
|
|
105
|
+
}));
|
|
106
106
|
return new __HttpRequest({
|
|
107
107
|
protocol,
|
|
108
108
|
hostname,
|
|
@@ -120,11 +120,11 @@ export const se_ListNotificationRulesCommand = async (input, context) => {
|
|
|
120
120
|
};
|
|
121
121
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listNotificationRules";
|
|
122
122
|
let body;
|
|
123
|
-
body = JSON.stringify({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
});
|
|
123
|
+
body = JSON.stringify(take(input, {
|
|
124
|
+
Filters: (_) => _json(_),
|
|
125
|
+
MaxResults: [],
|
|
126
|
+
NextToken: [],
|
|
127
|
+
}));
|
|
128
128
|
return new __HttpRequest({
|
|
129
129
|
protocol,
|
|
130
130
|
hostname,
|
|
@@ -142,9 +142,9 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
|
142
142
|
};
|
|
143
143
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTagsForResource";
|
|
144
144
|
let body;
|
|
145
|
-
body = JSON.stringify({
|
|
146
|
-
|
|
147
|
-
});
|
|
145
|
+
body = JSON.stringify(take(input, {
|
|
146
|
+
Arn: [],
|
|
147
|
+
}));
|
|
148
148
|
return new __HttpRequest({
|
|
149
149
|
protocol,
|
|
150
150
|
hostname,
|
|
@@ -162,11 +162,11 @@ export const se_ListTargetsCommand = async (input, context) => {
|
|
|
162
162
|
};
|
|
163
163
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTargets";
|
|
164
164
|
let body;
|
|
165
|
-
body = JSON.stringify({
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
});
|
|
165
|
+
body = JSON.stringify(take(input, {
|
|
166
|
+
Filters: (_) => _json(_),
|
|
167
|
+
MaxResults: [],
|
|
168
|
+
NextToken: [],
|
|
169
|
+
}));
|
|
170
170
|
return new __HttpRequest({
|
|
171
171
|
protocol,
|
|
172
172
|
hostname,
|
|
@@ -184,11 +184,11 @@ export const se_SubscribeCommand = async (input, context) => {
|
|
|
184
184
|
};
|
|
185
185
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscribe";
|
|
186
186
|
let body;
|
|
187
|
-
body = JSON.stringify({
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
});
|
|
187
|
+
body = JSON.stringify(take(input, {
|
|
188
|
+
Arn: [],
|
|
189
|
+
ClientRequestToken: [],
|
|
190
|
+
Target: (_) => _json(_),
|
|
191
|
+
}));
|
|
192
192
|
return new __HttpRequest({
|
|
193
193
|
protocol,
|
|
194
194
|
hostname,
|
|
@@ -206,10 +206,10 @@ export const se_TagResourceCommand = async (input, context) => {
|
|
|
206
206
|
};
|
|
207
207
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagResource";
|
|
208
208
|
let body;
|
|
209
|
-
body = JSON.stringify({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
209
|
+
body = JSON.stringify(take(input, {
|
|
210
|
+
Arn: [],
|
|
211
|
+
Tags: (_) => _json(_),
|
|
212
|
+
}));
|
|
213
213
|
return new __HttpRequest({
|
|
214
214
|
protocol,
|
|
215
215
|
hostname,
|
|
@@ -227,10 +227,10 @@ export const se_UnsubscribeCommand = async (input, context) => {
|
|
|
227
227
|
};
|
|
228
228
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/unsubscribe";
|
|
229
229
|
let body;
|
|
230
|
-
body = JSON.stringify({
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
});
|
|
230
|
+
body = JSON.stringify(take(input, {
|
|
231
|
+
Arn: [],
|
|
232
|
+
TargetAddress: [],
|
|
233
|
+
}));
|
|
234
234
|
return new __HttpRequest({
|
|
235
235
|
protocol,
|
|
236
236
|
hostname,
|
|
@@ -271,14 +271,14 @@ export const se_UpdateNotificationRuleCommand = async (input, context) => {
|
|
|
271
271
|
};
|
|
272
272
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateNotificationRule";
|
|
273
273
|
let body;
|
|
274
|
-
body = JSON.stringify({
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
});
|
|
274
|
+
body = JSON.stringify(take(input, {
|
|
275
|
+
Arn: [],
|
|
276
|
+
DetailType: [],
|
|
277
|
+
EventTypeIds: (_) => _json(_),
|
|
278
|
+
Name: [],
|
|
279
|
+
Status: [],
|
|
280
|
+
Targets: (_) => _json(_),
|
|
281
|
+
}));
|
|
282
282
|
return new __HttpRequest({
|
|
283
283
|
protocol,
|
|
284
284
|
hostname,
|
|
@@ -297,9 +297,10 @@ export const de_CreateNotificationRuleCommand = async (output, context) => {
|
|
|
297
297
|
$metadata: deserializeMetadata(output),
|
|
298
298
|
});
|
|
299
299
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
300
|
+
const doc = take(data, {
|
|
301
|
+
Arn: __expectString,
|
|
302
|
+
});
|
|
303
|
+
Object.assign(contents, doc);
|
|
303
304
|
return contents;
|
|
304
305
|
};
|
|
305
306
|
const de_CreateNotificationRuleCommandError = async (output, context) => {
|
|
@@ -329,10 +330,9 @@ const de_CreateNotificationRuleCommandError = async (output, context) => {
|
|
|
329
330
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
330
331
|
default:
|
|
331
332
|
const parsedBody = parsedOutput.body;
|
|
332
|
-
throwDefaultError({
|
|
333
|
+
return throwDefaultError({
|
|
333
334
|
output,
|
|
334
335
|
parsedBody,
|
|
335
|
-
exceptionCtor: __BaseException,
|
|
336
336
|
errorCode,
|
|
337
337
|
});
|
|
338
338
|
}
|
|
@@ -345,9 +345,10 @@ export const de_DeleteNotificationRuleCommand = async (output, context) => {
|
|
|
345
345
|
$metadata: deserializeMetadata(output),
|
|
346
346
|
});
|
|
347
347
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
348
|
+
const doc = take(data, {
|
|
349
|
+
Arn: __expectString,
|
|
350
|
+
});
|
|
351
|
+
Object.assign(contents, doc);
|
|
351
352
|
return contents;
|
|
352
353
|
};
|
|
353
354
|
const de_DeleteNotificationRuleCommandError = async (output, context) => {
|
|
@@ -368,10 +369,9 @@ const de_DeleteNotificationRuleCommandError = async (output, context) => {
|
|
|
368
369
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
369
370
|
default:
|
|
370
371
|
const parsedBody = parsedOutput.body;
|
|
371
|
-
throwDefaultError({
|
|
372
|
+
return throwDefaultError({
|
|
372
373
|
output,
|
|
373
374
|
parsedBody,
|
|
374
|
-
exceptionCtor: __BaseException,
|
|
375
375
|
errorCode,
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -398,10 +398,9 @@ const de_DeleteTargetCommandError = async (output, context) => {
|
|
|
398
398
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
399
399
|
default:
|
|
400
400
|
const parsedBody = parsedOutput.body;
|
|
401
|
-
throwDefaultError({
|
|
401
|
+
return throwDefaultError({
|
|
402
402
|
output,
|
|
403
403
|
parsedBody,
|
|
404
|
-
exceptionCtor: __BaseException,
|
|
405
404
|
errorCode,
|
|
406
405
|
});
|
|
407
406
|
}
|
|
@@ -414,39 +413,20 @@ export const de_DescribeNotificationRuleCommand = async (output, context) => {
|
|
|
414
413
|
$metadata: deserializeMetadata(output),
|
|
415
414
|
});
|
|
416
415
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
if (data.LastModifiedTimestamp != null) {
|
|
433
|
-
contents.LastModifiedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTimestamp)));
|
|
434
|
-
}
|
|
435
|
-
if (data.Name != null) {
|
|
436
|
-
contents.Name = __expectString(data.Name);
|
|
437
|
-
}
|
|
438
|
-
if (data.Resource != null) {
|
|
439
|
-
contents.Resource = __expectString(data.Resource);
|
|
440
|
-
}
|
|
441
|
-
if (data.Status != null) {
|
|
442
|
-
contents.Status = __expectString(data.Status);
|
|
443
|
-
}
|
|
444
|
-
if (data.Tags != null) {
|
|
445
|
-
contents.Tags = de_Tags(data.Tags, context);
|
|
446
|
-
}
|
|
447
|
-
if (data.Targets != null) {
|
|
448
|
-
contents.Targets = de_TargetsBatch(data.Targets, context);
|
|
449
|
-
}
|
|
416
|
+
const doc = take(data, {
|
|
417
|
+
Arn: __expectString,
|
|
418
|
+
CreatedBy: __expectString,
|
|
419
|
+
CreatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
420
|
+
DetailType: __expectString,
|
|
421
|
+
EventTypes: _json,
|
|
422
|
+
LastModifiedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
423
|
+
Name: __expectString,
|
|
424
|
+
Resource: __expectString,
|
|
425
|
+
Status: __expectString,
|
|
426
|
+
Tags: _json,
|
|
427
|
+
Targets: _json,
|
|
428
|
+
});
|
|
429
|
+
Object.assign(contents, doc);
|
|
450
430
|
return contents;
|
|
451
431
|
};
|
|
452
432
|
const de_DescribeNotificationRuleCommandError = async (output, context) => {
|
|
@@ -464,10 +444,9 @@ const de_DescribeNotificationRuleCommandError = async (output, context) => {
|
|
|
464
444
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
465
445
|
default:
|
|
466
446
|
const parsedBody = parsedOutput.body;
|
|
467
|
-
throwDefaultError({
|
|
447
|
+
return throwDefaultError({
|
|
468
448
|
output,
|
|
469
449
|
parsedBody,
|
|
470
|
-
exceptionCtor: __BaseException,
|
|
471
450
|
errorCode,
|
|
472
451
|
});
|
|
473
452
|
}
|
|
@@ -480,12 +459,11 @@ export const de_ListEventTypesCommand = async (output, context) => {
|
|
|
480
459
|
$metadata: deserializeMetadata(output),
|
|
481
460
|
});
|
|
482
461
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
462
|
+
const doc = take(data, {
|
|
463
|
+
EventTypes: _json,
|
|
464
|
+
NextToken: __expectString,
|
|
465
|
+
});
|
|
466
|
+
Object.assign(contents, doc);
|
|
489
467
|
return contents;
|
|
490
468
|
};
|
|
491
469
|
const de_ListEventTypesCommandError = async (output, context) => {
|
|
@@ -503,10 +481,9 @@ const de_ListEventTypesCommandError = async (output, context) => {
|
|
|
503
481
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
504
482
|
default:
|
|
505
483
|
const parsedBody = parsedOutput.body;
|
|
506
|
-
throwDefaultError({
|
|
484
|
+
return throwDefaultError({
|
|
507
485
|
output,
|
|
508
486
|
parsedBody,
|
|
509
|
-
exceptionCtor: __BaseException,
|
|
510
487
|
errorCode,
|
|
511
488
|
});
|
|
512
489
|
}
|
|
@@ -519,12 +496,11 @@ export const de_ListNotificationRulesCommand = async (output, context) => {
|
|
|
519
496
|
$metadata: deserializeMetadata(output),
|
|
520
497
|
});
|
|
521
498
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
499
|
+
const doc = take(data, {
|
|
500
|
+
NextToken: __expectString,
|
|
501
|
+
NotificationRules: _json,
|
|
502
|
+
});
|
|
503
|
+
Object.assign(contents, doc);
|
|
528
504
|
return contents;
|
|
529
505
|
};
|
|
530
506
|
const de_ListNotificationRulesCommandError = async (output, context) => {
|
|
@@ -542,10 +518,9 @@ const de_ListNotificationRulesCommandError = async (output, context) => {
|
|
|
542
518
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
543
519
|
default:
|
|
544
520
|
const parsedBody = parsedOutput.body;
|
|
545
|
-
throwDefaultError({
|
|
521
|
+
return throwDefaultError({
|
|
546
522
|
output,
|
|
547
523
|
parsedBody,
|
|
548
|
-
exceptionCtor: __BaseException,
|
|
549
524
|
errorCode,
|
|
550
525
|
});
|
|
551
526
|
}
|
|
@@ -558,9 +533,10 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
558
533
|
$metadata: deserializeMetadata(output),
|
|
559
534
|
});
|
|
560
535
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
536
|
+
const doc = take(data, {
|
|
537
|
+
Tags: _json,
|
|
538
|
+
});
|
|
539
|
+
Object.assign(contents, doc);
|
|
564
540
|
return contents;
|
|
565
541
|
};
|
|
566
542
|
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -578,10 +554,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
578
554
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
579
555
|
default:
|
|
580
556
|
const parsedBody = parsedOutput.body;
|
|
581
|
-
throwDefaultError({
|
|
557
|
+
return throwDefaultError({
|
|
582
558
|
output,
|
|
583
559
|
parsedBody,
|
|
584
|
-
exceptionCtor: __BaseException,
|
|
585
560
|
errorCode,
|
|
586
561
|
});
|
|
587
562
|
}
|
|
@@ -594,12 +569,11 @@ export const de_ListTargetsCommand = async (output, context) => {
|
|
|
594
569
|
$metadata: deserializeMetadata(output),
|
|
595
570
|
});
|
|
596
571
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
572
|
+
const doc = take(data, {
|
|
573
|
+
NextToken: __expectString,
|
|
574
|
+
Targets: _json,
|
|
575
|
+
});
|
|
576
|
+
Object.assign(contents, doc);
|
|
603
577
|
return contents;
|
|
604
578
|
};
|
|
605
579
|
const de_ListTargetsCommandError = async (output, context) => {
|
|
@@ -617,10 +591,9 @@ const de_ListTargetsCommandError = async (output, context) => {
|
|
|
617
591
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
618
592
|
default:
|
|
619
593
|
const parsedBody = parsedOutput.body;
|
|
620
|
-
throwDefaultError({
|
|
594
|
+
return throwDefaultError({
|
|
621
595
|
output,
|
|
622
596
|
parsedBody,
|
|
623
|
-
exceptionCtor: __BaseException,
|
|
624
597
|
errorCode,
|
|
625
598
|
});
|
|
626
599
|
}
|
|
@@ -633,9 +606,10 @@ export const de_SubscribeCommand = async (output, context) => {
|
|
|
633
606
|
$metadata: deserializeMetadata(output),
|
|
634
607
|
});
|
|
635
608
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}
|
|
609
|
+
const doc = take(data, {
|
|
610
|
+
Arn: __expectString,
|
|
611
|
+
});
|
|
612
|
+
Object.assign(contents, doc);
|
|
639
613
|
return contents;
|
|
640
614
|
};
|
|
641
615
|
const de_SubscribeCommandError = async (output, context) => {
|
|
@@ -656,10 +630,9 @@ const de_SubscribeCommandError = async (output, context) => {
|
|
|
656
630
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
657
631
|
default:
|
|
658
632
|
const parsedBody = parsedOutput.body;
|
|
659
|
-
throwDefaultError({
|
|
633
|
+
return throwDefaultError({
|
|
660
634
|
output,
|
|
661
635
|
parsedBody,
|
|
662
|
-
exceptionCtor: __BaseException,
|
|
663
636
|
errorCode,
|
|
664
637
|
});
|
|
665
638
|
}
|
|
@@ -672,9 +645,10 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
672
645
|
$metadata: deserializeMetadata(output),
|
|
673
646
|
});
|
|
674
647
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
648
|
+
const doc = take(data, {
|
|
649
|
+
Tags: _json,
|
|
650
|
+
});
|
|
651
|
+
Object.assign(contents, doc);
|
|
678
652
|
return contents;
|
|
679
653
|
};
|
|
680
654
|
const de_TagResourceCommandError = async (output, context) => {
|
|
@@ -698,10 +672,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
698
672
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
699
673
|
default:
|
|
700
674
|
const parsedBody = parsedOutput.body;
|
|
701
|
-
throwDefaultError({
|
|
675
|
+
return throwDefaultError({
|
|
702
676
|
output,
|
|
703
677
|
parsedBody,
|
|
704
|
-
exceptionCtor: __BaseException,
|
|
705
678
|
errorCode,
|
|
706
679
|
});
|
|
707
680
|
}
|
|
@@ -714,9 +687,10 @@ export const de_UnsubscribeCommand = async (output, context) => {
|
|
|
714
687
|
$metadata: deserializeMetadata(output),
|
|
715
688
|
});
|
|
716
689
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}
|
|
690
|
+
const doc = take(data, {
|
|
691
|
+
Arn: __expectString,
|
|
692
|
+
});
|
|
693
|
+
Object.assign(contents, doc);
|
|
720
694
|
return contents;
|
|
721
695
|
};
|
|
722
696
|
const de_UnsubscribeCommandError = async (output, context) => {
|
|
@@ -731,10 +705,9 @@ const de_UnsubscribeCommandError = async (output, context) => {
|
|
|
731
705
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
732
706
|
default:
|
|
733
707
|
const parsedBody = parsedOutput.body;
|
|
734
|
-
throwDefaultError({
|
|
708
|
+
return throwDefaultError({
|
|
735
709
|
output,
|
|
736
710
|
parsedBody,
|
|
737
|
-
exceptionCtor: __BaseException,
|
|
738
711
|
errorCode,
|
|
739
712
|
});
|
|
740
713
|
}
|
|
@@ -770,10 +743,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
770
743
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
771
744
|
default:
|
|
772
745
|
const parsedBody = parsedOutput.body;
|
|
773
|
-
throwDefaultError({
|
|
746
|
+
return throwDefaultError({
|
|
774
747
|
output,
|
|
775
748
|
parsedBody,
|
|
776
|
-
exceptionCtor: __BaseException,
|
|
777
749
|
errorCode,
|
|
778
750
|
});
|
|
779
751
|
}
|
|
@@ -806,21 +778,21 @@ const de_UpdateNotificationRuleCommandError = async (output, context) => {
|
|
|
806
778
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
807
779
|
default:
|
|
808
780
|
const parsedBody = parsedOutput.body;
|
|
809
|
-
throwDefaultError({
|
|
781
|
+
return throwDefaultError({
|
|
810
782
|
output,
|
|
811
783
|
parsedBody,
|
|
812
|
-
exceptionCtor: __BaseException,
|
|
813
784
|
errorCode,
|
|
814
785
|
});
|
|
815
786
|
}
|
|
816
787
|
};
|
|
817
|
-
const
|
|
788
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
818
789
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
819
790
|
const contents = map({});
|
|
820
791
|
const data = parsedOutput.body;
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}
|
|
792
|
+
const doc = take(data, {
|
|
793
|
+
Message: __expectString,
|
|
794
|
+
});
|
|
795
|
+
Object.assign(contents, doc);
|
|
824
796
|
const exception = new AccessDeniedException({
|
|
825
797
|
$metadata: deserializeMetadata(parsedOutput),
|
|
826
798
|
...contents,
|
|
@@ -830,9 +802,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
830
802
|
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
831
803
|
const contents = map({});
|
|
832
804
|
const data = parsedOutput.body;
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
805
|
+
const doc = take(data, {
|
|
806
|
+
Message: __expectString,
|
|
807
|
+
});
|
|
808
|
+
Object.assign(contents, doc);
|
|
836
809
|
const exception = new ConcurrentModificationException({
|
|
837
810
|
$metadata: deserializeMetadata(parsedOutput),
|
|
838
811
|
...contents,
|
|
@@ -842,9 +815,10 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
|
842
815
|
const de_ConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
843
816
|
const contents = map({});
|
|
844
817
|
const data = parsedOutput.body;
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
}
|
|
818
|
+
const doc = take(data, {
|
|
819
|
+
Message: __expectString,
|
|
820
|
+
});
|
|
821
|
+
Object.assign(contents, doc);
|
|
848
822
|
const exception = new ConfigurationException({
|
|
849
823
|
$metadata: deserializeMetadata(parsedOutput),
|
|
850
824
|
...contents,
|
|
@@ -854,9 +828,10 @@ const de_ConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
|
854
828
|
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
855
829
|
const contents = map({});
|
|
856
830
|
const data = parsedOutput.body;
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
831
|
+
const doc = take(data, {
|
|
832
|
+
Message: __expectString,
|
|
833
|
+
});
|
|
834
|
+
Object.assign(contents, doc);
|
|
860
835
|
const exception = new InvalidNextTokenException({
|
|
861
836
|
$metadata: deserializeMetadata(parsedOutput),
|
|
862
837
|
...contents,
|
|
@@ -866,9 +841,10 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
|
866
841
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
867
842
|
const contents = map({});
|
|
868
843
|
const data = parsedOutput.body;
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}
|
|
844
|
+
const doc = take(data, {
|
|
845
|
+
Message: __expectString,
|
|
846
|
+
});
|
|
847
|
+
Object.assign(contents, doc);
|
|
872
848
|
const exception = new LimitExceededException({
|
|
873
849
|
$metadata: deserializeMetadata(parsedOutput),
|
|
874
850
|
...contents,
|
|
@@ -878,9 +854,10 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
878
854
|
const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
879
855
|
const contents = map({});
|
|
880
856
|
const data = parsedOutput.body;
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
}
|
|
857
|
+
const doc = take(data, {
|
|
858
|
+
Message: __expectString,
|
|
859
|
+
});
|
|
860
|
+
Object.assign(contents, doc);
|
|
884
861
|
const exception = new ResourceAlreadyExistsException({
|
|
885
862
|
$metadata: deserializeMetadata(parsedOutput),
|
|
886
863
|
...contents,
|
|
@@ -890,9 +867,10 @@ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
|
890
867
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
891
868
|
const contents = map({});
|
|
892
869
|
const data = parsedOutput.body;
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
}
|
|
870
|
+
const doc = take(data, {
|
|
871
|
+
Message: __expectString,
|
|
872
|
+
});
|
|
873
|
+
Object.assign(contents, doc);
|
|
896
874
|
const exception = new ResourceNotFoundException({
|
|
897
875
|
$metadata: deserializeMetadata(parsedOutput),
|
|
898
876
|
...contents,
|
|
@@ -902,146 +880,16 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
902
880
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
903
881
|
const contents = map({});
|
|
904
882
|
const data = parsedOutput.body;
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
}
|
|
883
|
+
const doc = take(data, {
|
|
884
|
+
Message: __expectString,
|
|
885
|
+
});
|
|
886
|
+
Object.assign(contents, doc);
|
|
908
887
|
const exception = new ValidationException({
|
|
909
888
|
$metadata: deserializeMetadata(parsedOutput),
|
|
910
889
|
...contents,
|
|
911
890
|
});
|
|
912
891
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
913
892
|
};
|
|
914
|
-
const se_EventTypeIds = (input, context) => {
|
|
915
|
-
return input
|
|
916
|
-
.filter((e) => e != null)
|
|
917
|
-
.map((entry) => {
|
|
918
|
-
return entry;
|
|
919
|
-
});
|
|
920
|
-
};
|
|
921
|
-
const se_ListEventTypesFilter = (input, context) => {
|
|
922
|
-
return {
|
|
923
|
-
...(input.Name != null && { Name: input.Name }),
|
|
924
|
-
...(input.Value != null && { Value: input.Value }),
|
|
925
|
-
};
|
|
926
|
-
};
|
|
927
|
-
const se_ListEventTypesFilters = (input, context) => {
|
|
928
|
-
return input
|
|
929
|
-
.filter((e) => e != null)
|
|
930
|
-
.map((entry) => {
|
|
931
|
-
return se_ListEventTypesFilter(entry, context);
|
|
932
|
-
});
|
|
933
|
-
};
|
|
934
|
-
const se_ListNotificationRulesFilter = (input, context) => {
|
|
935
|
-
return {
|
|
936
|
-
...(input.Name != null && { Name: input.Name }),
|
|
937
|
-
...(input.Value != null && { Value: input.Value }),
|
|
938
|
-
};
|
|
939
|
-
};
|
|
940
|
-
const se_ListNotificationRulesFilters = (input, context) => {
|
|
941
|
-
return input
|
|
942
|
-
.filter((e) => e != null)
|
|
943
|
-
.map((entry) => {
|
|
944
|
-
return se_ListNotificationRulesFilter(entry, context);
|
|
945
|
-
});
|
|
946
|
-
};
|
|
947
|
-
const se_ListTargetsFilter = (input, context) => {
|
|
948
|
-
return {
|
|
949
|
-
...(input.Name != null && { Name: input.Name }),
|
|
950
|
-
...(input.Value != null && { Value: input.Value }),
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
const se_ListTargetsFilters = (input, context) => {
|
|
954
|
-
return input
|
|
955
|
-
.filter((e) => e != null)
|
|
956
|
-
.map((entry) => {
|
|
957
|
-
return se_ListTargetsFilter(entry, context);
|
|
958
|
-
});
|
|
959
|
-
};
|
|
960
|
-
const se_Tags = (input, context) => {
|
|
961
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
962
|
-
if (value === null) {
|
|
963
|
-
return acc;
|
|
964
|
-
}
|
|
965
|
-
acc[key] = value;
|
|
966
|
-
return acc;
|
|
967
|
-
}, {});
|
|
968
|
-
};
|
|
969
|
-
const se_Target = (input, context) => {
|
|
970
|
-
return {
|
|
971
|
-
...(input.TargetAddress != null && { TargetAddress: input.TargetAddress }),
|
|
972
|
-
...(input.TargetType != null && { TargetType: input.TargetType }),
|
|
973
|
-
};
|
|
974
|
-
};
|
|
975
|
-
const se_Targets = (input, context) => {
|
|
976
|
-
return input
|
|
977
|
-
.filter((e) => e != null)
|
|
978
|
-
.map((entry) => {
|
|
979
|
-
return se_Target(entry, context);
|
|
980
|
-
});
|
|
981
|
-
};
|
|
982
|
-
const de_EventTypeBatch = (output, context) => {
|
|
983
|
-
const retVal = (output || [])
|
|
984
|
-
.filter((e) => e != null)
|
|
985
|
-
.map((entry) => {
|
|
986
|
-
if (entry === null) {
|
|
987
|
-
return null;
|
|
988
|
-
}
|
|
989
|
-
return de_EventTypeSummary(entry, context);
|
|
990
|
-
});
|
|
991
|
-
return retVal;
|
|
992
|
-
};
|
|
993
|
-
const de_EventTypeSummary = (output, context) => {
|
|
994
|
-
return {
|
|
995
|
-
EventTypeId: __expectString(output.EventTypeId),
|
|
996
|
-
EventTypeName: __expectString(output.EventTypeName),
|
|
997
|
-
ResourceType: __expectString(output.ResourceType),
|
|
998
|
-
ServiceName: __expectString(output.ServiceName),
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
const de_NotificationRuleBatch = (output, context) => {
|
|
1002
|
-
const retVal = (output || [])
|
|
1003
|
-
.filter((e) => e != null)
|
|
1004
|
-
.map((entry) => {
|
|
1005
|
-
if (entry === null) {
|
|
1006
|
-
return null;
|
|
1007
|
-
}
|
|
1008
|
-
return de_NotificationRuleSummary(entry, context);
|
|
1009
|
-
});
|
|
1010
|
-
return retVal;
|
|
1011
|
-
};
|
|
1012
|
-
const de_NotificationRuleSummary = (output, context) => {
|
|
1013
|
-
return {
|
|
1014
|
-
Arn: __expectString(output.Arn),
|
|
1015
|
-
Id: __expectString(output.Id),
|
|
1016
|
-
};
|
|
1017
|
-
};
|
|
1018
|
-
const de_Tags = (output, context) => {
|
|
1019
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1020
|
-
if (value === null) {
|
|
1021
|
-
return acc;
|
|
1022
|
-
}
|
|
1023
|
-
acc[key] = __expectString(value);
|
|
1024
|
-
return acc;
|
|
1025
|
-
}, {});
|
|
1026
|
-
};
|
|
1027
|
-
const de_TargetsBatch = (output, context) => {
|
|
1028
|
-
const retVal = (output || [])
|
|
1029
|
-
.filter((e) => e != null)
|
|
1030
|
-
.map((entry) => {
|
|
1031
|
-
if (entry === null) {
|
|
1032
|
-
return null;
|
|
1033
|
-
}
|
|
1034
|
-
return de_TargetSummary(entry, context);
|
|
1035
|
-
});
|
|
1036
|
-
return retVal;
|
|
1037
|
-
};
|
|
1038
|
-
const de_TargetSummary = (output, context) => {
|
|
1039
|
-
return {
|
|
1040
|
-
TargetAddress: __expectString(output.TargetAddress),
|
|
1041
|
-
TargetStatus: __expectString(output.TargetStatus),
|
|
1042
|
-
TargetType: __expectString(output.TargetType),
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
893
|
const deserializeMetadata = (output) => ({
|
|
1046
894
|
httpStatusCode: output.statusCode,
|
|
1047
895
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|