@aws-sdk/client-rbin 3.312.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 +145 -346
- package/dist-es/protocols/Aws_restJson1.js +130 -331
- package/package.json +6 -6
|
@@ -12,16 +12,14 @@ const se_CreateRuleCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
|
|
24
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
Description: [],
|
|
17
|
+
LockConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
+
ResourceTags: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
+
ResourceType: [],
|
|
20
|
+
RetentionPeriod: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
}));
|
|
25
23
|
return new protocol_http_1.HttpRequest({
|
|
26
24
|
protocol,
|
|
27
25
|
hostname,
|
|
@@ -74,13 +72,13 @@ const se_ListRulesCommand = async (input, context) => {
|
|
|
74
72
|
};
|
|
75
73
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-rules";
|
|
76
74
|
let body;
|
|
77
|
-
body = JSON.stringify({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
75
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
76
|
+
LockState: [],
|
|
77
|
+
MaxResults: [],
|
|
78
|
+
NextToken: [],
|
|
79
|
+
ResourceTags: (_) => (0, smithy_client_1._json)(_),
|
|
80
|
+
ResourceType: [],
|
|
81
|
+
}));
|
|
84
82
|
return new protocol_http_1.HttpRequest({
|
|
85
83
|
protocol,
|
|
86
84
|
hostname,
|
|
@@ -117,11 +115,9 @@ const se_LockRuleCommand = async (input, context) => {
|
|
|
117
115
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}/lock";
|
|
118
116
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
|
|
119
117
|
let body;
|
|
120
|
-
body = JSON.stringify({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}),
|
|
124
|
-
});
|
|
118
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
119
|
+
LockConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
120
|
+
}));
|
|
125
121
|
return new protocol_http_1.HttpRequest({
|
|
126
122
|
protocol,
|
|
127
123
|
hostname,
|
|
@@ -141,9 +137,9 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
141
137
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
142
138
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
143
139
|
let body;
|
|
144
|
-
body = JSON.stringify({
|
|
145
|
-
|
|
146
|
-
});
|
|
140
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
141
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
142
|
+
}));
|
|
147
143
|
return new protocol_http_1.HttpRequest({
|
|
148
144
|
protocol,
|
|
149
145
|
hostname,
|
|
@@ -177,7 +173,7 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
177
173
|
const headers = {};
|
|
178
174
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
179
175
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
180
|
-
const query = map({
|
|
176
|
+
const query = (0, smithy_client_1.map)({
|
|
181
177
|
tagKeys: [
|
|
182
178
|
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
183
179
|
() => (input.TagKeys || []).map((_entry) => _entry),
|
|
@@ -204,12 +200,12 @@ const se_UpdateRuleCommand = async (input, context) => {
|
|
|
204
200
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}";
|
|
205
201
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
|
|
206
202
|
let body;
|
|
207
|
-
body = JSON.stringify({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
203
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
204
|
+
Description: [],
|
|
205
|
+
ResourceTags: (_) => (0, smithy_client_1._json)(_),
|
|
206
|
+
ResourceType: [],
|
|
207
|
+
RetentionPeriod: (_) => (0, smithy_client_1._json)(_),
|
|
208
|
+
}));
|
|
213
209
|
return new protocol_http_1.HttpRequest({
|
|
214
210
|
protocol,
|
|
215
211
|
hostname,
|
|
@@ -225,37 +221,22 @@ const de_CreateRuleCommand = async (output, context) => {
|
|
|
225
221
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
226
222
|
return de_CreateRuleCommandError(output, context);
|
|
227
223
|
}
|
|
228
|
-
const contents = map({
|
|
224
|
+
const contents = (0, smithy_client_1.map)({
|
|
229
225
|
$metadata: deserializeMetadata(output),
|
|
230
226
|
});
|
|
231
227
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (data.ResourceTags != null) {
|
|
245
|
-
contents.ResourceTags = de_ResourceTags(data.ResourceTags, context);
|
|
246
|
-
}
|
|
247
|
-
if (data.ResourceType != null) {
|
|
248
|
-
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
249
|
-
}
|
|
250
|
-
if (data.RetentionPeriod != null) {
|
|
251
|
-
contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context);
|
|
252
|
-
}
|
|
253
|
-
if (data.Status != null) {
|
|
254
|
-
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
255
|
-
}
|
|
256
|
-
if (data.Tags != null) {
|
|
257
|
-
contents.Tags = de_TagList(data.Tags, context);
|
|
258
|
-
}
|
|
228
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
229
|
+
Description: smithy_client_1.expectString,
|
|
230
|
+
Identifier: smithy_client_1.expectString,
|
|
231
|
+
LockConfiguration: smithy_client_1._json,
|
|
232
|
+
LockState: smithy_client_1.expectString,
|
|
233
|
+
ResourceTags: smithy_client_1._json,
|
|
234
|
+
ResourceType: smithy_client_1.expectString,
|
|
235
|
+
RetentionPeriod: smithy_client_1._json,
|
|
236
|
+
Status: smithy_client_1.expectString,
|
|
237
|
+
Tags: smithy_client_1._json,
|
|
238
|
+
});
|
|
239
|
+
Object.assign(contents, doc);
|
|
259
240
|
return contents;
|
|
260
241
|
};
|
|
261
242
|
exports.de_CreateRuleCommand = de_CreateRuleCommand;
|
|
@@ -277,10 +258,9 @@ const de_CreateRuleCommandError = async (output, context) => {
|
|
|
277
258
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
278
259
|
default:
|
|
279
260
|
const parsedBody = parsedOutput.body;
|
|
280
|
-
|
|
261
|
+
return throwDefaultError({
|
|
281
262
|
output,
|
|
282
263
|
parsedBody,
|
|
283
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
284
264
|
errorCode,
|
|
285
265
|
});
|
|
286
266
|
}
|
|
@@ -289,7 +269,7 @@ const de_DeleteRuleCommand = async (output, context) => {
|
|
|
289
269
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
290
270
|
return de_DeleteRuleCommandError(output, context);
|
|
291
271
|
}
|
|
292
|
-
const contents = map({
|
|
272
|
+
const contents = (0, smithy_client_1.map)({
|
|
293
273
|
$metadata: deserializeMetadata(output),
|
|
294
274
|
});
|
|
295
275
|
await collectBody(output.body, context);
|
|
@@ -317,10 +297,9 @@ const de_DeleteRuleCommandError = async (output, context) => {
|
|
|
317
297
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
318
298
|
default:
|
|
319
299
|
const parsedBody = parsedOutput.body;
|
|
320
|
-
|
|
300
|
+
return throwDefaultError({
|
|
321
301
|
output,
|
|
322
302
|
parsedBody,
|
|
323
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
324
303
|
errorCode,
|
|
325
304
|
});
|
|
326
305
|
}
|
|
@@ -329,37 +308,22 @@ const de_GetRuleCommand = async (output, context) => {
|
|
|
329
308
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
330
309
|
return de_GetRuleCommandError(output, context);
|
|
331
310
|
}
|
|
332
|
-
const contents = map({
|
|
311
|
+
const contents = (0, smithy_client_1.map)({
|
|
333
312
|
$metadata: deserializeMetadata(output),
|
|
334
313
|
});
|
|
335
314
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
if (data.LockState != null) {
|
|
349
|
-
contents.LockState = (0, smithy_client_1.expectString)(data.LockState);
|
|
350
|
-
}
|
|
351
|
-
if (data.ResourceTags != null) {
|
|
352
|
-
contents.ResourceTags = de_ResourceTags(data.ResourceTags, context);
|
|
353
|
-
}
|
|
354
|
-
if (data.ResourceType != null) {
|
|
355
|
-
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
356
|
-
}
|
|
357
|
-
if (data.RetentionPeriod != null) {
|
|
358
|
-
contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context);
|
|
359
|
-
}
|
|
360
|
-
if (data.Status != null) {
|
|
361
|
-
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
362
|
-
}
|
|
315
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
316
|
+
Description: smithy_client_1.expectString,
|
|
317
|
+
Identifier: smithy_client_1.expectString,
|
|
318
|
+
LockConfiguration: smithy_client_1._json,
|
|
319
|
+
LockEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
320
|
+
LockState: smithy_client_1.expectString,
|
|
321
|
+
ResourceTags: smithy_client_1._json,
|
|
322
|
+
ResourceType: smithy_client_1.expectString,
|
|
323
|
+
RetentionPeriod: smithy_client_1._json,
|
|
324
|
+
Status: smithy_client_1.expectString,
|
|
325
|
+
});
|
|
326
|
+
Object.assign(contents, doc);
|
|
363
327
|
return contents;
|
|
364
328
|
};
|
|
365
329
|
exports.de_GetRuleCommand = de_GetRuleCommand;
|
|
@@ -381,10 +345,9 @@ const de_GetRuleCommandError = async (output, context) => {
|
|
|
381
345
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
382
346
|
default:
|
|
383
347
|
const parsedBody = parsedOutput.body;
|
|
384
|
-
|
|
348
|
+
return throwDefaultError({
|
|
385
349
|
output,
|
|
386
350
|
parsedBody,
|
|
387
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
388
351
|
errorCode,
|
|
389
352
|
});
|
|
390
353
|
}
|
|
@@ -393,16 +356,15 @@ const de_ListRulesCommand = async (output, context) => {
|
|
|
393
356
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
394
357
|
return de_ListRulesCommandError(output, context);
|
|
395
358
|
}
|
|
396
|
-
const contents = map({
|
|
359
|
+
const contents = (0, smithy_client_1.map)({
|
|
397
360
|
$metadata: deserializeMetadata(output),
|
|
398
361
|
});
|
|
399
362
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
363
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
+
NextToken: smithy_client_1.expectString,
|
|
365
|
+
Rules: smithy_client_1._json,
|
|
366
|
+
});
|
|
367
|
+
Object.assign(contents, doc);
|
|
406
368
|
return contents;
|
|
407
369
|
};
|
|
408
370
|
exports.de_ListRulesCommand = de_ListRulesCommand;
|
|
@@ -421,10 +383,9 @@ const de_ListRulesCommandError = async (output, context) => {
|
|
|
421
383
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
422
384
|
default:
|
|
423
385
|
const parsedBody = parsedOutput.body;
|
|
424
|
-
|
|
386
|
+
return throwDefaultError({
|
|
425
387
|
output,
|
|
426
388
|
parsedBody,
|
|
427
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
428
389
|
errorCode,
|
|
429
390
|
});
|
|
430
391
|
}
|
|
@@ -433,13 +394,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
433
394
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
434
395
|
return de_ListTagsForResourceCommandError(output, context);
|
|
435
396
|
}
|
|
436
|
-
const contents = map({
|
|
397
|
+
const contents = (0, smithy_client_1.map)({
|
|
437
398
|
$metadata: deserializeMetadata(output),
|
|
438
399
|
});
|
|
439
400
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
401
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
+
Tags: smithy_client_1._json,
|
|
403
|
+
});
|
|
404
|
+
Object.assign(contents, doc);
|
|
443
405
|
return contents;
|
|
444
406
|
};
|
|
445
407
|
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
@@ -461,10 +423,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
|
461
423
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
462
424
|
default:
|
|
463
425
|
const parsedBody = parsedOutput.body;
|
|
464
|
-
|
|
426
|
+
return throwDefaultError({
|
|
465
427
|
output,
|
|
466
428
|
parsedBody,
|
|
467
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
468
429
|
errorCode,
|
|
469
430
|
});
|
|
470
431
|
}
|
|
@@ -473,34 +434,21 @@ const de_LockRuleCommand = async (output, context) => {
|
|
|
473
434
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
474
435
|
return de_LockRuleCommandError(output, context);
|
|
475
436
|
}
|
|
476
|
-
const contents = map({
|
|
437
|
+
const contents = (0, smithy_client_1.map)({
|
|
477
438
|
$metadata: deserializeMetadata(output),
|
|
478
439
|
});
|
|
479
440
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}
|
|
492
|
-
if (data.ResourceTags != null) {
|
|
493
|
-
contents.ResourceTags = de_ResourceTags(data.ResourceTags, context);
|
|
494
|
-
}
|
|
495
|
-
if (data.ResourceType != null) {
|
|
496
|
-
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
497
|
-
}
|
|
498
|
-
if (data.RetentionPeriod != null) {
|
|
499
|
-
contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context);
|
|
500
|
-
}
|
|
501
|
-
if (data.Status != null) {
|
|
502
|
-
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
503
|
-
}
|
|
441
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
442
|
+
Description: smithy_client_1.expectString,
|
|
443
|
+
Identifier: smithy_client_1.expectString,
|
|
444
|
+
LockConfiguration: smithy_client_1._json,
|
|
445
|
+
LockState: smithy_client_1.expectString,
|
|
446
|
+
ResourceTags: smithy_client_1._json,
|
|
447
|
+
ResourceType: smithy_client_1.expectString,
|
|
448
|
+
RetentionPeriod: smithy_client_1._json,
|
|
449
|
+
Status: smithy_client_1.expectString,
|
|
450
|
+
});
|
|
451
|
+
Object.assign(contents, doc);
|
|
504
452
|
return contents;
|
|
505
453
|
};
|
|
506
454
|
exports.de_LockRuleCommand = de_LockRuleCommand;
|
|
@@ -525,10 +473,9 @@ const de_LockRuleCommandError = async (output, context) => {
|
|
|
525
473
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
526
474
|
default:
|
|
527
475
|
const parsedBody = parsedOutput.body;
|
|
528
|
-
|
|
476
|
+
return throwDefaultError({
|
|
529
477
|
output,
|
|
530
478
|
parsedBody,
|
|
531
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
532
479
|
errorCode,
|
|
533
480
|
});
|
|
534
481
|
}
|
|
@@ -537,7 +484,7 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
537
484
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
538
485
|
return de_TagResourceCommandError(output, context);
|
|
539
486
|
}
|
|
540
|
-
const contents = map({
|
|
487
|
+
const contents = (0, smithy_client_1.map)({
|
|
541
488
|
$metadata: deserializeMetadata(output),
|
|
542
489
|
});
|
|
543
490
|
await collectBody(output.body, context);
|
|
@@ -565,10 +512,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
565
512
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
566
513
|
default:
|
|
567
514
|
const parsedBody = parsedOutput.body;
|
|
568
|
-
|
|
515
|
+
return throwDefaultError({
|
|
569
516
|
output,
|
|
570
517
|
parsedBody,
|
|
571
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
572
518
|
errorCode,
|
|
573
519
|
});
|
|
574
520
|
}
|
|
@@ -577,37 +523,22 @@ const de_UnlockRuleCommand = async (output, context) => {
|
|
|
577
523
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
524
|
return de_UnlockRuleCommandError(output, context);
|
|
579
525
|
}
|
|
580
|
-
const contents = map({
|
|
526
|
+
const contents = (0, smithy_client_1.map)({
|
|
581
527
|
$metadata: deserializeMetadata(output),
|
|
582
528
|
});
|
|
583
529
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
if (data.LockState != null) {
|
|
597
|
-
contents.LockState = (0, smithy_client_1.expectString)(data.LockState);
|
|
598
|
-
}
|
|
599
|
-
if (data.ResourceTags != null) {
|
|
600
|
-
contents.ResourceTags = de_ResourceTags(data.ResourceTags, context);
|
|
601
|
-
}
|
|
602
|
-
if (data.ResourceType != null) {
|
|
603
|
-
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
604
|
-
}
|
|
605
|
-
if (data.RetentionPeriod != null) {
|
|
606
|
-
contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context);
|
|
607
|
-
}
|
|
608
|
-
if (data.Status != null) {
|
|
609
|
-
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
610
|
-
}
|
|
530
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
531
|
+
Description: smithy_client_1.expectString,
|
|
532
|
+
Identifier: smithy_client_1.expectString,
|
|
533
|
+
LockConfiguration: smithy_client_1._json,
|
|
534
|
+
LockEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
535
|
+
LockState: smithy_client_1.expectString,
|
|
536
|
+
ResourceTags: smithy_client_1._json,
|
|
537
|
+
ResourceType: smithy_client_1.expectString,
|
|
538
|
+
RetentionPeriod: smithy_client_1._json,
|
|
539
|
+
Status: smithy_client_1.expectString,
|
|
540
|
+
});
|
|
541
|
+
Object.assign(contents, doc);
|
|
611
542
|
return contents;
|
|
612
543
|
};
|
|
613
544
|
exports.de_UnlockRuleCommand = de_UnlockRuleCommand;
|
|
@@ -632,10 +563,9 @@ const de_UnlockRuleCommandError = async (output, context) => {
|
|
|
632
563
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
633
564
|
default:
|
|
634
565
|
const parsedBody = parsedOutput.body;
|
|
635
|
-
|
|
566
|
+
return throwDefaultError({
|
|
636
567
|
output,
|
|
637
568
|
parsedBody,
|
|
638
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
639
569
|
errorCode,
|
|
640
570
|
});
|
|
641
571
|
}
|
|
@@ -644,7 +574,7 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
644
574
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
645
575
|
return de_UntagResourceCommandError(output, context);
|
|
646
576
|
}
|
|
647
|
-
const contents = map({
|
|
577
|
+
const contents = (0, smithy_client_1.map)({
|
|
648
578
|
$metadata: deserializeMetadata(output),
|
|
649
579
|
});
|
|
650
580
|
await collectBody(output.body, context);
|
|
@@ -669,10 +599,9 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
669
599
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
670
600
|
default:
|
|
671
601
|
const parsedBody = parsedOutput.body;
|
|
672
|
-
|
|
602
|
+
return throwDefaultError({
|
|
673
603
|
output,
|
|
674
604
|
parsedBody,
|
|
675
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
676
605
|
errorCode,
|
|
677
606
|
});
|
|
678
607
|
}
|
|
@@ -681,34 +610,21 @@ const de_UpdateRuleCommand = async (output, context) => {
|
|
|
681
610
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
682
611
|
return de_UpdateRuleCommandError(output, context);
|
|
683
612
|
}
|
|
684
|
-
const contents = map({
|
|
613
|
+
const contents = (0, smithy_client_1.map)({
|
|
685
614
|
$metadata: deserializeMetadata(output),
|
|
686
615
|
});
|
|
687
616
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
}
|
|
700
|
-
if (data.ResourceTags != null) {
|
|
701
|
-
contents.ResourceTags = de_ResourceTags(data.ResourceTags, context);
|
|
702
|
-
}
|
|
703
|
-
if (data.ResourceType != null) {
|
|
704
|
-
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
705
|
-
}
|
|
706
|
-
if (data.RetentionPeriod != null) {
|
|
707
|
-
contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context);
|
|
708
|
-
}
|
|
709
|
-
if (data.Status != null) {
|
|
710
|
-
contents.Status = (0, smithy_client_1.expectString)(data.Status);
|
|
711
|
-
}
|
|
617
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
618
|
+
Description: smithy_client_1.expectString,
|
|
619
|
+
Identifier: smithy_client_1.expectString,
|
|
620
|
+
LockEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
621
|
+
LockState: smithy_client_1.expectString,
|
|
622
|
+
ResourceTags: smithy_client_1._json,
|
|
623
|
+
ResourceType: smithy_client_1.expectString,
|
|
624
|
+
RetentionPeriod: smithy_client_1._json,
|
|
625
|
+
Status: smithy_client_1.expectString,
|
|
626
|
+
});
|
|
627
|
+
Object.assign(contents, doc);
|
|
712
628
|
return contents;
|
|
713
629
|
};
|
|
714
630
|
exports.de_UpdateRuleCommand = de_UpdateRuleCommand;
|
|
@@ -733,24 +649,22 @@ const de_UpdateRuleCommandError = async (output, context) => {
|
|
|
733
649
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
734
650
|
default:
|
|
735
651
|
const parsedBody = parsedOutput.body;
|
|
736
|
-
|
|
652
|
+
return throwDefaultError({
|
|
737
653
|
output,
|
|
738
654
|
parsedBody,
|
|
739
|
-
exceptionCtor: RbinServiceException_1.RbinServiceException,
|
|
740
655
|
errorCode,
|
|
741
656
|
});
|
|
742
657
|
}
|
|
743
658
|
};
|
|
744
|
-
const
|
|
659
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(RbinServiceException_1.RbinServiceException);
|
|
745
660
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
746
|
-
const contents = map({});
|
|
661
|
+
const contents = (0, smithy_client_1.map)({});
|
|
747
662
|
const data = parsedOutput.body;
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
}
|
|
663
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
664
|
+
Message: smithy_client_1.expectString,
|
|
665
|
+
Reason: smithy_client_1.expectString,
|
|
666
|
+
});
|
|
667
|
+
Object.assign(contents, doc);
|
|
754
668
|
const exception = new models_0_1.ConflictException({
|
|
755
669
|
$metadata: deserializeMetadata(parsedOutput),
|
|
756
670
|
...contents,
|
|
@@ -758,11 +672,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
758
672
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
759
673
|
};
|
|
760
674
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
761
|
-
const contents = map({});
|
|
675
|
+
const contents = (0, smithy_client_1.map)({});
|
|
762
676
|
const data = parsedOutput.body;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}
|
|
677
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
678
|
+
Message: smithy_client_1.expectString,
|
|
679
|
+
});
|
|
680
|
+
Object.assign(contents, doc);
|
|
766
681
|
const exception = new models_0_1.InternalServerException({
|
|
767
682
|
$metadata: deserializeMetadata(parsedOutput),
|
|
768
683
|
...contents,
|
|
@@ -770,14 +685,13 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
770
685
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
771
686
|
};
|
|
772
687
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
773
|
-
const contents = map({});
|
|
688
|
+
const contents = (0, smithy_client_1.map)({});
|
|
774
689
|
const data = parsedOutput.body;
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
690
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
691
|
+
Message: smithy_client_1.expectString,
|
|
692
|
+
Reason: smithy_client_1.expectString,
|
|
693
|
+
});
|
|
694
|
+
Object.assign(contents, doc);
|
|
781
695
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
782
696
|
$metadata: deserializeMetadata(parsedOutput),
|
|
783
697
|
...contents,
|
|
@@ -785,14 +699,13 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
785
699
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
786
700
|
};
|
|
787
701
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
788
|
-
const contents = map({});
|
|
702
|
+
const contents = (0, smithy_client_1.map)({});
|
|
789
703
|
const data = parsedOutput.body;
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
704
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
705
|
+
Message: smithy_client_1.expectString,
|
|
706
|
+
Reason: smithy_client_1.expectString,
|
|
707
|
+
});
|
|
708
|
+
Object.assign(contents, doc);
|
|
796
709
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
797
710
|
$metadata: deserializeMetadata(parsedOutput),
|
|
798
711
|
...contents,
|
|
@@ -800,133 +713,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
800
713
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
801
714
|
};
|
|
802
715
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
803
|
-
const contents = map({});
|
|
716
|
+
const contents = (0, smithy_client_1.map)({});
|
|
804
717
|
const data = parsedOutput.body;
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
718
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
719
|
+
Message: smithy_client_1.expectString,
|
|
720
|
+
Reason: smithy_client_1.expectString,
|
|
721
|
+
});
|
|
722
|
+
Object.assign(contents, doc);
|
|
811
723
|
const exception = new models_0_1.ValidationException({
|
|
812
724
|
$metadata: deserializeMetadata(parsedOutput),
|
|
813
725
|
...contents,
|
|
814
726
|
});
|
|
815
727
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
816
728
|
};
|
|
817
|
-
const se_LockConfiguration = (input, context) => {
|
|
818
|
-
return {
|
|
819
|
-
...(input.UnlockDelay != null && { UnlockDelay: se_UnlockDelay(input.UnlockDelay, context) }),
|
|
820
|
-
};
|
|
821
|
-
};
|
|
822
|
-
const se_ResourceTag = (input, context) => {
|
|
823
|
-
return {
|
|
824
|
-
...(input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey }),
|
|
825
|
-
...(input.ResourceTagValue != null && { ResourceTagValue: input.ResourceTagValue }),
|
|
826
|
-
};
|
|
827
|
-
};
|
|
828
|
-
const se_ResourceTags = (input, context) => {
|
|
829
|
-
return input
|
|
830
|
-
.filter((e) => e != null)
|
|
831
|
-
.map((entry) => {
|
|
832
|
-
return se_ResourceTag(entry, context);
|
|
833
|
-
});
|
|
834
|
-
};
|
|
835
|
-
const se_RetentionPeriod = (input, context) => {
|
|
836
|
-
return {
|
|
837
|
-
...(input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit }),
|
|
838
|
-
...(input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }),
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
const se_Tag = (input, context) => {
|
|
842
|
-
return {
|
|
843
|
-
...(input.Key != null && { Key: input.Key }),
|
|
844
|
-
...(input.Value != null && { Value: input.Value }),
|
|
845
|
-
};
|
|
846
|
-
};
|
|
847
|
-
const se_TagList = (input, context) => {
|
|
848
|
-
return input
|
|
849
|
-
.filter((e) => e != null)
|
|
850
|
-
.map((entry) => {
|
|
851
|
-
return se_Tag(entry, context);
|
|
852
|
-
});
|
|
853
|
-
};
|
|
854
|
-
const se_UnlockDelay = (input, context) => {
|
|
855
|
-
return {
|
|
856
|
-
...(input.UnlockDelayUnit != null && { UnlockDelayUnit: input.UnlockDelayUnit }),
|
|
857
|
-
...(input.UnlockDelayValue != null && { UnlockDelayValue: input.UnlockDelayValue }),
|
|
858
|
-
};
|
|
859
|
-
};
|
|
860
|
-
const de_LockConfiguration = (output, context) => {
|
|
861
|
-
return {
|
|
862
|
-
UnlockDelay: output.UnlockDelay != null ? de_UnlockDelay(output.UnlockDelay, context) : undefined,
|
|
863
|
-
};
|
|
864
|
-
};
|
|
865
|
-
const de_ResourceTag = (output, context) => {
|
|
866
|
-
return {
|
|
867
|
-
ResourceTagKey: (0, smithy_client_1.expectString)(output.ResourceTagKey),
|
|
868
|
-
ResourceTagValue: (0, smithy_client_1.expectString)(output.ResourceTagValue),
|
|
869
|
-
};
|
|
870
|
-
};
|
|
871
|
-
const de_ResourceTags = (output, context) => {
|
|
872
|
-
const retVal = (output || [])
|
|
873
|
-
.filter((e) => e != null)
|
|
874
|
-
.map((entry) => {
|
|
875
|
-
if (entry === null) {
|
|
876
|
-
return null;
|
|
877
|
-
}
|
|
878
|
-
return de_ResourceTag(entry, context);
|
|
879
|
-
});
|
|
880
|
-
return retVal;
|
|
881
|
-
};
|
|
882
|
-
const de_RetentionPeriod = (output, context) => {
|
|
883
|
-
return {
|
|
884
|
-
RetentionPeriodUnit: (0, smithy_client_1.expectString)(output.RetentionPeriodUnit),
|
|
885
|
-
RetentionPeriodValue: (0, smithy_client_1.expectInt32)(output.RetentionPeriodValue),
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
const de_RuleSummary = (output, context) => {
|
|
889
|
-
return {
|
|
890
|
-
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
891
|
-
Identifier: (0, smithy_client_1.expectString)(output.Identifier),
|
|
892
|
-
LockState: (0, smithy_client_1.expectString)(output.LockState),
|
|
893
|
-
RetentionPeriod: output.RetentionPeriod != null ? de_RetentionPeriod(output.RetentionPeriod, context) : undefined,
|
|
894
|
-
};
|
|
895
|
-
};
|
|
896
|
-
const de_RuleSummaryList = (output, context) => {
|
|
897
|
-
const retVal = (output || [])
|
|
898
|
-
.filter((e) => e != null)
|
|
899
|
-
.map((entry) => {
|
|
900
|
-
if (entry === null) {
|
|
901
|
-
return null;
|
|
902
|
-
}
|
|
903
|
-
return de_RuleSummary(entry, context);
|
|
904
|
-
});
|
|
905
|
-
return retVal;
|
|
906
|
-
};
|
|
907
|
-
const de_Tag = (output, context) => {
|
|
908
|
-
return {
|
|
909
|
-
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
910
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
const de_TagList = (output, context) => {
|
|
914
|
-
const retVal = (output || [])
|
|
915
|
-
.filter((e) => e != null)
|
|
916
|
-
.map((entry) => {
|
|
917
|
-
if (entry === null) {
|
|
918
|
-
return null;
|
|
919
|
-
}
|
|
920
|
-
return de_Tag(entry, context);
|
|
921
|
-
});
|
|
922
|
-
return retVal;
|
|
923
|
-
};
|
|
924
|
-
const de_UnlockDelay = (output, context) => {
|
|
925
|
-
return {
|
|
926
|
-
UnlockDelayUnit: (0, smithy_client_1.expectString)(output.UnlockDelayUnit),
|
|
927
|
-
UnlockDelayValue: (0, smithy_client_1.expectInt32)(output.UnlockDelayValue),
|
|
928
|
-
};
|
|
929
|
-
};
|
|
930
729
|
const deserializeMetadata = (output) => ({
|
|
931
730
|
httpStatusCode: output.statusCode,
|
|
932
731
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|