@aws-sdk/client-redshift-serverless 3.312.0 → 3.316.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.
@@ -1,143 +1,143 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, ConflictException, InsufficientCapacityException, InternalServerException, InvalidPaginationException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
4
4
  import { RedshiftServerlessServiceException as __BaseException } from "../models/RedshiftServerlessServiceException";
5
5
  export const se_ConvertRecoveryPointToSnapshotCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("ConvertRecoveryPointToSnapshot");
7
7
  let body;
8
- body = JSON.stringify(se_ConvertRecoveryPointToSnapshotRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_CreateEndpointAccessCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("CreateEndpointAccess");
13
13
  let body;
14
- body = JSON.stringify(se_CreateEndpointAccessRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_CreateNamespaceCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("CreateNamespace");
19
19
  let body;
20
- body = JSON.stringify(se_CreateNamespaceRequest(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_CreateSnapshotCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("CreateSnapshot");
25
25
  let body;
26
- body = JSON.stringify(se_CreateSnapshotRequest(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_CreateUsageLimitCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("CreateUsageLimit");
31
31
  let body;
32
- body = JSON.stringify(se_CreateUsageLimitRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_CreateWorkgroupCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("CreateWorkgroup");
37
37
  let body;
38
- body = JSON.stringify(se_CreateWorkgroupRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_DeleteEndpointAccessCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("DeleteEndpointAccess");
43
43
  let body;
44
- body = JSON.stringify(se_DeleteEndpointAccessRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_DeleteNamespaceCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("DeleteNamespace");
49
49
  let body;
50
- body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("DeleteResourcePolicy");
55
55
  let body;
56
- body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_DeleteSnapshotCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DeleteSnapshot");
61
61
  let body;
62
- body = JSON.stringify(se_DeleteSnapshotRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_DeleteUsageLimitCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("DeleteUsageLimit");
67
67
  let body;
68
- body = JSON.stringify(se_DeleteUsageLimitRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_DeleteWorkgroupCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("DeleteWorkgroup");
73
73
  let body;
74
- body = JSON.stringify(se_DeleteWorkgroupRequest(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_GetCredentialsCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("GetCredentials");
79
79
  let body;
80
- body = JSON.stringify(se_GetCredentialsRequest(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const se_GetEndpointAccessCommand = async (input, context) => {
84
84
  const headers = sharedHeaders("GetEndpointAccess");
85
85
  let body;
86
- body = JSON.stringify(se_GetEndpointAccessRequest(input, context));
86
+ body = JSON.stringify(_json(input));
87
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
88
  };
89
89
  export const se_GetNamespaceCommand = async (input, context) => {
90
90
  const headers = sharedHeaders("GetNamespace");
91
91
  let body;
92
- body = JSON.stringify(se_GetNamespaceRequest(input, context));
92
+ body = JSON.stringify(_json(input));
93
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
94
  };
95
95
  export const se_GetRecoveryPointCommand = async (input, context) => {
96
96
  const headers = sharedHeaders("GetRecoveryPoint");
97
97
  let body;
98
- body = JSON.stringify(se_GetRecoveryPointRequest(input, context));
98
+ body = JSON.stringify(_json(input));
99
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
100
  };
101
101
  export const se_GetResourcePolicyCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("GetResourcePolicy");
103
103
  let body;
104
- body = JSON.stringify(se_GetResourcePolicyRequest(input, context));
104
+ body = JSON.stringify(_json(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  export const se_GetSnapshotCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("GetSnapshot");
109
109
  let body;
110
- body = JSON.stringify(se_GetSnapshotRequest(input, context));
110
+ body = JSON.stringify(_json(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  export const se_GetTableRestoreStatusCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("GetTableRestoreStatus");
115
115
  let body;
116
- body = JSON.stringify(se_GetTableRestoreStatusRequest(input, context));
116
+ body = JSON.stringify(_json(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  export const se_GetUsageLimitCommand = async (input, context) => {
120
120
  const headers = sharedHeaders("GetUsageLimit");
121
121
  let body;
122
- body = JSON.stringify(se_GetUsageLimitRequest(input, context));
122
+ body = JSON.stringify(_json(input));
123
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
124
  };
125
125
  export const se_GetWorkgroupCommand = async (input, context) => {
126
126
  const headers = sharedHeaders("GetWorkgroup");
127
127
  let body;
128
- body = JSON.stringify(se_GetWorkgroupRequest(input, context));
128
+ body = JSON.stringify(_json(input));
129
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
130
  };
131
131
  export const se_ListEndpointAccessCommand = async (input, context) => {
132
132
  const headers = sharedHeaders("ListEndpointAccess");
133
133
  let body;
134
- body = JSON.stringify(se_ListEndpointAccessRequest(input, context));
134
+ body = JSON.stringify(_json(input));
135
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
136
  };
137
137
  export const se_ListNamespacesCommand = async (input, context) => {
138
138
  const headers = sharedHeaders("ListNamespaces");
139
139
  let body;
140
- body = JSON.stringify(se_ListNamespacesRequest(input, context));
140
+ body = JSON.stringify(_json(input));
141
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
142
  };
143
143
  export const se_ListRecoveryPointsCommand = async (input, context) => {
@@ -155,91 +155,91 @@ export const se_ListSnapshotsCommand = async (input, context) => {
155
155
  export const se_ListTableRestoreStatusCommand = async (input, context) => {
156
156
  const headers = sharedHeaders("ListTableRestoreStatus");
157
157
  let body;
158
- body = JSON.stringify(se_ListTableRestoreStatusRequest(input, context));
158
+ body = JSON.stringify(_json(input));
159
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
160
160
  };
161
161
  export const se_ListTagsForResourceCommand = async (input, context) => {
162
162
  const headers = sharedHeaders("ListTagsForResource");
163
163
  let body;
164
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
164
+ body = JSON.stringify(_json(input));
165
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
166
  };
167
167
  export const se_ListUsageLimitsCommand = async (input, context) => {
168
168
  const headers = sharedHeaders("ListUsageLimits");
169
169
  let body;
170
- body = JSON.stringify(se_ListUsageLimitsRequest(input, context));
170
+ body = JSON.stringify(_json(input));
171
171
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
172
172
  };
173
173
  export const se_ListWorkgroupsCommand = async (input, context) => {
174
174
  const headers = sharedHeaders("ListWorkgroups");
175
175
  let body;
176
- body = JSON.stringify(se_ListWorkgroupsRequest(input, context));
176
+ body = JSON.stringify(_json(input));
177
177
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
178
178
  };
179
179
  export const se_PutResourcePolicyCommand = async (input, context) => {
180
180
  const headers = sharedHeaders("PutResourcePolicy");
181
181
  let body;
182
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
182
+ body = JSON.stringify(_json(input));
183
183
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
184
  };
185
185
  export const se_RestoreFromRecoveryPointCommand = async (input, context) => {
186
186
  const headers = sharedHeaders("RestoreFromRecoveryPoint");
187
187
  let body;
188
- body = JSON.stringify(se_RestoreFromRecoveryPointRequest(input, context));
188
+ body = JSON.stringify(_json(input));
189
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
190
190
  };
191
191
  export const se_RestoreFromSnapshotCommand = async (input, context) => {
192
192
  const headers = sharedHeaders("RestoreFromSnapshot");
193
193
  let body;
194
- body = JSON.stringify(se_RestoreFromSnapshotRequest(input, context));
194
+ body = JSON.stringify(_json(input));
195
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
196
  };
197
197
  export const se_RestoreTableFromSnapshotCommand = async (input, context) => {
198
198
  const headers = sharedHeaders("RestoreTableFromSnapshot");
199
199
  let body;
200
- body = JSON.stringify(se_RestoreTableFromSnapshotRequest(input, context));
200
+ body = JSON.stringify(_json(input));
201
201
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
202
  };
203
203
  export const se_TagResourceCommand = async (input, context) => {
204
204
  const headers = sharedHeaders("TagResource");
205
205
  let body;
206
- body = JSON.stringify(se_TagResourceRequest(input, context));
206
+ body = JSON.stringify(_json(input));
207
207
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
208
208
  };
209
209
  export const se_UntagResourceCommand = async (input, context) => {
210
210
  const headers = sharedHeaders("UntagResource");
211
211
  let body;
212
- body = JSON.stringify(se_UntagResourceRequest(input, context));
212
+ body = JSON.stringify(_json(input));
213
213
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
214
214
  };
215
215
  export const se_UpdateEndpointAccessCommand = async (input, context) => {
216
216
  const headers = sharedHeaders("UpdateEndpointAccess");
217
217
  let body;
218
- body = JSON.stringify(se_UpdateEndpointAccessRequest(input, context));
218
+ body = JSON.stringify(_json(input));
219
219
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
220
  };
221
221
  export const se_UpdateNamespaceCommand = async (input, context) => {
222
222
  const headers = sharedHeaders("UpdateNamespace");
223
223
  let body;
224
- body = JSON.stringify(se_UpdateNamespaceRequest(input, context));
224
+ body = JSON.stringify(_json(input));
225
225
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
226
226
  };
227
227
  export const se_UpdateSnapshotCommand = async (input, context) => {
228
228
  const headers = sharedHeaders("UpdateSnapshot");
229
229
  let body;
230
- body = JSON.stringify(se_UpdateSnapshotRequest(input, context));
230
+ body = JSON.stringify(_json(input));
231
231
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
232
232
  };
233
233
  export const se_UpdateUsageLimitCommand = async (input, context) => {
234
234
  const headers = sharedHeaders("UpdateUsageLimit");
235
235
  let body;
236
- body = JSON.stringify(se_UpdateUsageLimitRequest(input, context));
236
+ body = JSON.stringify(_json(input));
237
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
238
  };
239
239
  export const se_UpdateWorkgroupCommand = async (input, context) => {
240
240
  const headers = sharedHeaders("UpdateWorkgroup");
241
241
  let body;
242
- body = JSON.stringify(se_UpdateWorkgroupRequest(input, context));
242
+ body = JSON.stringify(_json(input));
243
243
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
244
244
  };
245
245
  export const de_ConvertRecoveryPointToSnapshotCommand = async (output, context) => {
@@ -253,7 +253,7 @@ export const de_ConvertRecoveryPointToSnapshotCommand = async (output, context)
253
253
  $metadata: deserializeMetadata(output),
254
254
  ...contents,
255
255
  };
256
- return Promise.resolve(response);
256
+ return response;
257
257
  };
258
258
  const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) => {
259
259
  const parsedOutput = {
@@ -282,10 +282,9 @@ const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) =>
282
282
  throw await de_ValidationExceptionRes(parsedOutput, context);
283
283
  default:
284
284
  const parsedBody = parsedOutput.body;
285
- throwDefaultError({
285
+ return throwDefaultError({
286
286
  output,
287
287
  parsedBody,
288
- exceptionCtor: __BaseException,
289
288
  errorCode,
290
289
  });
291
290
  }
@@ -301,7 +300,7 @@ export const de_CreateEndpointAccessCommand = async (output, context) => {
301
300
  $metadata: deserializeMetadata(output),
302
301
  ...contents,
303
302
  };
304
- return Promise.resolve(response);
303
+ return response;
305
304
  };
306
305
  const de_CreateEndpointAccessCommandError = async (output, context) => {
307
306
  const parsedOutput = {
@@ -330,10 +329,9 @@ const de_CreateEndpointAccessCommandError = async (output, context) => {
330
329
  throw await de_ValidationExceptionRes(parsedOutput, context);
331
330
  default:
332
331
  const parsedBody = parsedOutput.body;
333
- throwDefaultError({
332
+ return throwDefaultError({
334
333
  output,
335
334
  parsedBody,
336
- exceptionCtor: __BaseException,
337
335
  errorCode,
338
336
  });
339
337
  }
@@ -349,7 +347,7 @@ export const de_CreateNamespaceCommand = async (output, context) => {
349
347
  $metadata: deserializeMetadata(output),
350
348
  ...contents,
351
349
  };
352
- return Promise.resolve(response);
350
+ return response;
353
351
  };
354
352
  const de_CreateNamespaceCommandError = async (output, context) => {
355
353
  const parsedOutput = {
@@ -372,10 +370,9 @@ const de_CreateNamespaceCommandError = async (output, context) => {
372
370
  throw await de_ValidationExceptionRes(parsedOutput, context);
373
371
  default:
374
372
  const parsedBody = parsedOutput.body;
375
- throwDefaultError({
373
+ return throwDefaultError({
376
374
  output,
377
375
  parsedBody,
378
- exceptionCtor: __BaseException,
379
376
  errorCode,
380
377
  });
381
378
  }
@@ -391,7 +388,7 @@ export const de_CreateSnapshotCommand = async (output, context) => {
391
388
  $metadata: deserializeMetadata(output),
392
389
  ...contents,
393
390
  };
394
- return Promise.resolve(response);
391
+ return response;
395
392
  };
396
393
  const de_CreateSnapshotCommandError = async (output, context) => {
397
394
  const parsedOutput = {
@@ -420,10 +417,9 @@ const de_CreateSnapshotCommandError = async (output, context) => {
420
417
  throw await de_ValidationExceptionRes(parsedOutput, context);
421
418
  default:
422
419
  const parsedBody = parsedOutput.body;
423
- throwDefaultError({
420
+ return throwDefaultError({
424
421
  output,
425
422
  parsedBody,
426
- exceptionCtor: __BaseException,
427
423
  errorCode,
428
424
  });
429
425
  }
@@ -434,12 +430,12 @@ export const de_CreateUsageLimitCommand = async (output, context) => {
434
430
  }
435
431
  const data = await parseBody(output.body, context);
436
432
  let contents = {};
437
- contents = de_CreateUsageLimitResponse(data, context);
433
+ contents = _json(data);
438
434
  const response = {
439
435
  $metadata: deserializeMetadata(output),
440
436
  ...contents,
441
437
  };
442
- return Promise.resolve(response);
438
+ return response;
443
439
  };
444
440
  const de_CreateUsageLimitCommandError = async (output, context) => {
445
441
  const parsedOutput = {
@@ -465,10 +461,9 @@ const de_CreateUsageLimitCommandError = async (output, context) => {
465
461
  throw await de_ValidationExceptionRes(parsedOutput, context);
466
462
  default:
467
463
  const parsedBody = parsedOutput.body;
468
- throwDefaultError({
464
+ return throwDefaultError({
469
465
  output,
470
466
  parsedBody,
471
- exceptionCtor: __BaseException,
472
467
  errorCode,
473
468
  });
474
469
  }
@@ -484,7 +479,7 @@ export const de_CreateWorkgroupCommand = async (output, context) => {
484
479
  $metadata: deserializeMetadata(output),
485
480
  ...contents,
486
481
  };
487
- return Promise.resolve(response);
482
+ return response;
488
483
  };
489
484
  const de_CreateWorkgroupCommandError = async (output, context) => {
490
485
  const parsedOutput = {
@@ -513,10 +508,9 @@ const de_CreateWorkgroupCommandError = async (output, context) => {
513
508
  throw await de_ValidationExceptionRes(parsedOutput, context);
514
509
  default:
515
510
  const parsedBody = parsedOutput.body;
516
- throwDefaultError({
511
+ return throwDefaultError({
517
512
  output,
518
513
  parsedBody,
519
- exceptionCtor: __BaseException,
520
514
  errorCode,
521
515
  });
522
516
  }
@@ -532,7 +526,7 @@ export const de_DeleteEndpointAccessCommand = async (output, context) => {
532
526
  $metadata: deserializeMetadata(output),
533
527
  ...contents,
534
528
  };
535
- return Promise.resolve(response);
529
+ return response;
536
530
  };
537
531
  const de_DeleteEndpointAccessCommandError = async (output, context) => {
538
532
  const parsedOutput = {
@@ -555,10 +549,9 @@ const de_DeleteEndpointAccessCommandError = async (output, context) => {
555
549
  throw await de_ValidationExceptionRes(parsedOutput, context);
556
550
  default:
557
551
  const parsedBody = parsedOutput.body;
558
- throwDefaultError({
552
+ return throwDefaultError({
559
553
  output,
560
554
  parsedBody,
561
- exceptionCtor: __BaseException,
562
555
  errorCode,
563
556
  });
564
557
  }
@@ -574,7 +567,7 @@ export const de_DeleteNamespaceCommand = async (output, context) => {
574
567
  $metadata: deserializeMetadata(output),
575
568
  ...contents,
576
569
  };
577
- return Promise.resolve(response);
570
+ return response;
578
571
  };
579
572
  const de_DeleteNamespaceCommandError = async (output, context) => {
580
573
  const parsedOutput = {
@@ -597,10 +590,9 @@ const de_DeleteNamespaceCommandError = async (output, context) => {
597
590
  throw await de_ValidationExceptionRes(parsedOutput, context);
598
591
  default:
599
592
  const parsedBody = parsedOutput.body;
600
- throwDefaultError({
593
+ return throwDefaultError({
601
594
  output,
602
595
  parsedBody,
603
- exceptionCtor: __BaseException,
604
596
  errorCode,
605
597
  });
606
598
  }
@@ -611,12 +603,12 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
611
603
  }
612
604
  const data = await parseBody(output.body, context);
613
605
  let contents = {};
614
- contents = de_DeleteResourcePolicyResponse(data, context);
606
+ contents = _json(data);
615
607
  const response = {
616
608
  $metadata: deserializeMetadata(output),
617
609
  ...contents,
618
610
  };
619
- return Promise.resolve(response);
611
+ return response;
620
612
  };
621
613
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
622
614
  const parsedOutput = {
@@ -636,10 +628,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
636
628
  throw await de_ValidationExceptionRes(parsedOutput, context);
637
629
  default:
638
630
  const parsedBody = parsedOutput.body;
639
- throwDefaultError({
631
+ return throwDefaultError({
640
632
  output,
641
633
  parsedBody,
642
- exceptionCtor: __BaseException,
643
634
  errorCode,
644
635
  });
645
636
  }
@@ -655,7 +646,7 @@ export const de_DeleteSnapshotCommand = async (output, context) => {
655
646
  $metadata: deserializeMetadata(output),
656
647
  ...contents,
657
648
  };
658
- return Promise.resolve(response);
649
+ return response;
659
650
  };
660
651
  const de_DeleteSnapshotCommandError = async (output, context) => {
661
652
  const parsedOutput = {
@@ -678,10 +669,9 @@ const de_DeleteSnapshotCommandError = async (output, context) => {
678
669
  throw await de_ValidationExceptionRes(parsedOutput, context);
679
670
  default:
680
671
  const parsedBody = parsedOutput.body;
681
- throwDefaultError({
672
+ return throwDefaultError({
682
673
  output,
683
674
  parsedBody,
684
- exceptionCtor: __BaseException,
685
675
  errorCode,
686
676
  });
687
677
  }
@@ -692,12 +682,12 @@ export const de_DeleteUsageLimitCommand = async (output, context) => {
692
682
  }
693
683
  const data = await parseBody(output.body, context);
694
684
  let contents = {};
695
- contents = de_DeleteUsageLimitResponse(data, context);
685
+ contents = _json(data);
696
686
  const response = {
697
687
  $metadata: deserializeMetadata(output),
698
688
  ...contents,
699
689
  };
700
- return Promise.resolve(response);
690
+ return response;
701
691
  };
702
692
  const de_DeleteUsageLimitCommandError = async (output, context) => {
703
693
  const parsedOutput = {
@@ -720,10 +710,9 @@ const de_DeleteUsageLimitCommandError = async (output, context) => {
720
710
  throw await de_ValidationExceptionRes(parsedOutput, context);
721
711
  default:
722
712
  const parsedBody = parsedOutput.body;
723
- throwDefaultError({
713
+ return throwDefaultError({
724
714
  output,
725
715
  parsedBody,
726
- exceptionCtor: __BaseException,
727
716
  errorCode,
728
717
  });
729
718
  }
@@ -739,7 +728,7 @@ export const de_DeleteWorkgroupCommand = async (output, context) => {
739
728
  $metadata: deserializeMetadata(output),
740
729
  ...contents,
741
730
  };
742
- return Promise.resolve(response);
731
+ return response;
743
732
  };
744
733
  const de_DeleteWorkgroupCommandError = async (output, context) => {
745
734
  const parsedOutput = {
@@ -762,10 +751,9 @@ const de_DeleteWorkgroupCommandError = async (output, context) => {
762
751
  throw await de_ValidationExceptionRes(parsedOutput, context);
763
752
  default:
764
753
  const parsedBody = parsedOutput.body;
765
- throwDefaultError({
754
+ return throwDefaultError({
766
755
  output,
767
756
  parsedBody,
768
- exceptionCtor: __BaseException,
769
757
  errorCode,
770
758
  });
771
759
  }
@@ -781,7 +769,7 @@ export const de_GetCredentialsCommand = async (output, context) => {
781
769
  $metadata: deserializeMetadata(output),
782
770
  ...contents,
783
771
  };
784
- return Promise.resolve(response);
772
+ return response;
785
773
  };
786
774
  const de_GetCredentialsCommandError = async (output, context) => {
787
775
  const parsedOutput = {
@@ -801,10 +789,9 @@ const de_GetCredentialsCommandError = async (output, context) => {
801
789
  throw await de_ValidationExceptionRes(parsedOutput, context);
802
790
  default:
803
791
  const parsedBody = parsedOutput.body;
804
- throwDefaultError({
792
+ return throwDefaultError({
805
793
  output,
806
794
  parsedBody,
807
- exceptionCtor: __BaseException,
808
795
  errorCode,
809
796
  });
810
797
  }
@@ -820,7 +807,7 @@ export const de_GetEndpointAccessCommand = async (output, context) => {
820
807
  $metadata: deserializeMetadata(output),
821
808
  ...contents,
822
809
  };
823
- return Promise.resolve(response);
810
+ return response;
824
811
  };
825
812
  const de_GetEndpointAccessCommandError = async (output, context) => {
826
813
  const parsedOutput = {
@@ -843,10 +830,9 @@ const de_GetEndpointAccessCommandError = async (output, context) => {
843
830
  throw await de_ValidationExceptionRes(parsedOutput, context);
844
831
  default:
845
832
  const parsedBody = parsedOutput.body;
846
- throwDefaultError({
833
+ return throwDefaultError({
847
834
  output,
848
835
  parsedBody,
849
- exceptionCtor: __BaseException,
850
836
  errorCode,
851
837
  });
852
838
  }
@@ -862,7 +848,7 @@ export const de_GetNamespaceCommand = async (output, context) => {
862
848
  $metadata: deserializeMetadata(output),
863
849
  ...contents,
864
850
  };
865
- return Promise.resolve(response);
851
+ return response;
866
852
  };
867
853
  const de_GetNamespaceCommandError = async (output, context) => {
868
854
  const parsedOutput = {
@@ -882,10 +868,9 @@ const de_GetNamespaceCommandError = async (output, context) => {
882
868
  throw await de_ValidationExceptionRes(parsedOutput, context);
883
869
  default:
884
870
  const parsedBody = parsedOutput.body;
885
- throwDefaultError({
871
+ return throwDefaultError({
886
872
  output,
887
873
  parsedBody,
888
- exceptionCtor: __BaseException,
889
874
  errorCode,
890
875
  });
891
876
  }
@@ -901,7 +886,7 @@ export const de_GetRecoveryPointCommand = async (output, context) => {
901
886
  $metadata: deserializeMetadata(output),
902
887
  ...contents,
903
888
  };
904
- return Promise.resolve(response);
889
+ return response;
905
890
  };
906
891
  const de_GetRecoveryPointCommandError = async (output, context) => {
907
892
  const parsedOutput = {
@@ -924,10 +909,9 @@ const de_GetRecoveryPointCommandError = async (output, context) => {
924
909
  throw await de_ValidationExceptionRes(parsedOutput, context);
925
910
  default:
926
911
  const parsedBody = parsedOutput.body;
927
- throwDefaultError({
912
+ return throwDefaultError({
928
913
  output,
929
914
  parsedBody,
930
- exceptionCtor: __BaseException,
931
915
  errorCode,
932
916
  });
933
917
  }
@@ -938,12 +922,12 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
938
922
  }
939
923
  const data = await parseBody(output.body, context);
940
924
  let contents = {};
941
- contents = de_GetResourcePolicyResponse(data, context);
925
+ contents = _json(data);
942
926
  const response = {
943
927
  $metadata: deserializeMetadata(output),
944
928
  ...contents,
945
929
  };
946
- return Promise.resolve(response);
930
+ return response;
947
931
  };
948
932
  const de_GetResourcePolicyCommandError = async (output, context) => {
949
933
  const parsedOutput = {
@@ -963,10 +947,9 @@ const de_GetResourcePolicyCommandError = async (output, context) => {
963
947
  throw await de_ValidationExceptionRes(parsedOutput, context);
964
948
  default:
965
949
  const parsedBody = parsedOutput.body;
966
- throwDefaultError({
950
+ return throwDefaultError({
967
951
  output,
968
952
  parsedBody,
969
- exceptionCtor: __BaseException,
970
953
  errorCode,
971
954
  });
972
955
  }
@@ -982,7 +965,7 @@ export const de_GetSnapshotCommand = async (output, context) => {
982
965
  $metadata: deserializeMetadata(output),
983
966
  ...contents,
984
967
  };
985
- return Promise.resolve(response);
968
+ return response;
986
969
  };
987
970
  const de_GetSnapshotCommandError = async (output, context) => {
988
971
  const parsedOutput = {
@@ -1002,10 +985,9 @@ const de_GetSnapshotCommandError = async (output, context) => {
1002
985
  throw await de_ValidationExceptionRes(parsedOutput, context);
1003
986
  default:
1004
987
  const parsedBody = parsedOutput.body;
1005
- throwDefaultError({
988
+ return throwDefaultError({
1006
989
  output,
1007
990
  parsedBody,
1008
- exceptionCtor: __BaseException,
1009
991
  errorCode,
1010
992
  });
1011
993
  }
@@ -1021,7 +1003,7 @@ export const de_GetTableRestoreStatusCommand = async (output, context) => {
1021
1003
  $metadata: deserializeMetadata(output),
1022
1004
  ...contents,
1023
1005
  };
1024
- return Promise.resolve(response);
1006
+ return response;
1025
1007
  };
1026
1008
  const de_GetTableRestoreStatusCommandError = async (output, context) => {
1027
1009
  const parsedOutput = {
@@ -1038,10 +1020,9 @@ const de_GetTableRestoreStatusCommandError = async (output, context) => {
1038
1020
  throw await de_ValidationExceptionRes(parsedOutput, context);
1039
1021
  default:
1040
1022
  const parsedBody = parsedOutput.body;
1041
- throwDefaultError({
1023
+ return throwDefaultError({
1042
1024
  output,
1043
1025
  parsedBody,
1044
- exceptionCtor: __BaseException,
1045
1026
  errorCode,
1046
1027
  });
1047
1028
  }
@@ -1052,12 +1033,12 @@ export const de_GetUsageLimitCommand = async (output, context) => {
1052
1033
  }
1053
1034
  const data = await parseBody(output.body, context);
1054
1035
  let contents = {};
1055
- contents = de_GetUsageLimitResponse(data, context);
1036
+ contents = _json(data);
1056
1037
  const response = {
1057
1038
  $metadata: deserializeMetadata(output),
1058
1039
  ...contents,
1059
1040
  };
1060
- return Promise.resolve(response);
1041
+ return response;
1061
1042
  };
1062
1043
  const de_GetUsageLimitCommandError = async (output, context) => {
1063
1044
  const parsedOutput = {
@@ -1080,10 +1061,9 @@ const de_GetUsageLimitCommandError = async (output, context) => {
1080
1061
  throw await de_ValidationExceptionRes(parsedOutput, context);
1081
1062
  default:
1082
1063
  const parsedBody = parsedOutput.body;
1083
- throwDefaultError({
1064
+ return throwDefaultError({
1084
1065
  output,
1085
1066
  parsedBody,
1086
- exceptionCtor: __BaseException,
1087
1067
  errorCode,
1088
1068
  });
1089
1069
  }
@@ -1099,7 +1079,7 @@ export const de_GetWorkgroupCommand = async (output, context) => {
1099
1079
  $metadata: deserializeMetadata(output),
1100
1080
  ...contents,
1101
1081
  };
1102
- return Promise.resolve(response);
1082
+ return response;
1103
1083
  };
1104
1084
  const de_GetWorkgroupCommandError = async (output, context) => {
1105
1085
  const parsedOutput = {
@@ -1119,10 +1099,9 @@ const de_GetWorkgroupCommandError = async (output, context) => {
1119
1099
  throw await de_ValidationExceptionRes(parsedOutput, context);
1120
1100
  default:
1121
1101
  const parsedBody = parsedOutput.body;
1122
- throwDefaultError({
1102
+ return throwDefaultError({
1123
1103
  output,
1124
1104
  parsedBody,
1125
- exceptionCtor: __BaseException,
1126
1105
  errorCode,
1127
1106
  });
1128
1107
  }
@@ -1138,7 +1117,7 @@ export const de_ListEndpointAccessCommand = async (output, context) => {
1138
1117
  $metadata: deserializeMetadata(output),
1139
1118
  ...contents,
1140
1119
  };
1141
- return Promise.resolve(response);
1120
+ return response;
1142
1121
  };
1143
1122
  const de_ListEndpointAccessCommandError = async (output, context) => {
1144
1123
  const parsedOutput = {
@@ -1161,10 +1140,9 @@ const de_ListEndpointAccessCommandError = async (output, context) => {
1161
1140
  throw await de_ValidationExceptionRes(parsedOutput, context);
1162
1141
  default:
1163
1142
  const parsedBody = parsedOutput.body;
1164
- throwDefaultError({
1143
+ return throwDefaultError({
1165
1144
  output,
1166
1145
  parsedBody,
1167
- exceptionCtor: __BaseException,
1168
1146
  errorCode,
1169
1147
  });
1170
1148
  }
@@ -1180,7 +1158,7 @@ export const de_ListNamespacesCommand = async (output, context) => {
1180
1158
  $metadata: deserializeMetadata(output),
1181
1159
  ...contents,
1182
1160
  };
1183
- return Promise.resolve(response);
1161
+ return response;
1184
1162
  };
1185
1163
  const de_ListNamespacesCommandError = async (output, context) => {
1186
1164
  const parsedOutput = {
@@ -1197,10 +1175,9 @@ const de_ListNamespacesCommandError = async (output, context) => {
1197
1175
  throw await de_ValidationExceptionRes(parsedOutput, context);
1198
1176
  default:
1199
1177
  const parsedBody = parsedOutput.body;
1200
- throwDefaultError({
1178
+ return throwDefaultError({
1201
1179
  output,
1202
1180
  parsedBody,
1203
- exceptionCtor: __BaseException,
1204
1181
  errorCode,
1205
1182
  });
1206
1183
  }
@@ -1216,7 +1193,7 @@ export const de_ListRecoveryPointsCommand = async (output, context) => {
1216
1193
  $metadata: deserializeMetadata(output),
1217
1194
  ...contents,
1218
1195
  };
1219
- return Promise.resolve(response);
1196
+ return response;
1220
1197
  };
1221
1198
  const de_ListRecoveryPointsCommandError = async (output, context) => {
1222
1199
  const parsedOutput = {
@@ -1233,10 +1210,9 @@ const de_ListRecoveryPointsCommandError = async (output, context) => {
1233
1210
  throw await de_ValidationExceptionRes(parsedOutput, context);
1234
1211
  default:
1235
1212
  const parsedBody = parsedOutput.body;
1236
- throwDefaultError({
1213
+ return throwDefaultError({
1237
1214
  output,
1238
1215
  parsedBody,
1239
- exceptionCtor: __BaseException,
1240
1216
  errorCode,
1241
1217
  });
1242
1218
  }
@@ -1252,7 +1228,7 @@ export const de_ListSnapshotsCommand = async (output, context) => {
1252
1228
  $metadata: deserializeMetadata(output),
1253
1229
  ...contents,
1254
1230
  };
1255
- return Promise.resolve(response);
1231
+ return response;
1256
1232
  };
1257
1233
  const de_ListSnapshotsCommandError = async (output, context) => {
1258
1234
  const parsedOutput = {
@@ -1272,10 +1248,9 @@ const de_ListSnapshotsCommandError = async (output, context) => {
1272
1248
  throw await de_ValidationExceptionRes(parsedOutput, context);
1273
1249
  default:
1274
1250
  const parsedBody = parsedOutput.body;
1275
- throwDefaultError({
1251
+ return throwDefaultError({
1276
1252
  output,
1277
1253
  parsedBody,
1278
- exceptionCtor: __BaseException,
1279
1254
  errorCode,
1280
1255
  });
1281
1256
  }
@@ -1291,7 +1266,7 @@ export const de_ListTableRestoreStatusCommand = async (output, context) => {
1291
1266
  $metadata: deserializeMetadata(output),
1292
1267
  ...contents,
1293
1268
  };
1294
- return Promise.resolve(response);
1269
+ return response;
1295
1270
  };
1296
1271
  const de_ListTableRestoreStatusCommandError = async (output, context) => {
1297
1272
  const parsedOutput = {
@@ -1311,10 +1286,9 @@ const de_ListTableRestoreStatusCommandError = async (output, context) => {
1311
1286
  throw await de_ValidationExceptionRes(parsedOutput, context);
1312
1287
  default:
1313
1288
  const parsedBody = parsedOutput.body;
1314
- throwDefaultError({
1289
+ return throwDefaultError({
1315
1290
  output,
1316
1291
  parsedBody,
1317
- exceptionCtor: __BaseException,
1318
1292
  errorCode,
1319
1293
  });
1320
1294
  }
@@ -1325,12 +1299,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1325
1299
  }
1326
1300
  const data = await parseBody(output.body, context);
1327
1301
  let contents = {};
1328
- contents = de_ListTagsForResourceResponse(data, context);
1302
+ contents = _json(data);
1329
1303
  const response = {
1330
1304
  $metadata: deserializeMetadata(output),
1331
1305
  ...contents,
1332
1306
  };
1333
- return Promise.resolve(response);
1307
+ return response;
1334
1308
  };
1335
1309
  const de_ListTagsForResourceCommandError = async (output, context) => {
1336
1310
  const parsedOutput = {
@@ -1353,10 +1327,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1353
1327
  throw await de_ValidationExceptionRes(parsedOutput, context);
1354
1328
  default:
1355
1329
  const parsedBody = parsedOutput.body;
1356
- throwDefaultError({
1330
+ return throwDefaultError({
1357
1331
  output,
1358
1332
  parsedBody,
1359
- exceptionCtor: __BaseException,
1360
1333
  errorCode,
1361
1334
  });
1362
1335
  }
@@ -1367,12 +1340,12 @@ export const de_ListUsageLimitsCommand = async (output, context) => {
1367
1340
  }
1368
1341
  const data = await parseBody(output.body, context);
1369
1342
  let contents = {};
1370
- contents = de_ListUsageLimitsResponse(data, context);
1343
+ contents = _json(data);
1371
1344
  const response = {
1372
1345
  $metadata: deserializeMetadata(output),
1373
1346
  ...contents,
1374
1347
  };
1375
- return Promise.resolve(response);
1348
+ return response;
1376
1349
  };
1377
1350
  const de_ListUsageLimitsCommandError = async (output, context) => {
1378
1351
  const parsedOutput = {
@@ -1398,10 +1371,9 @@ const de_ListUsageLimitsCommandError = async (output, context) => {
1398
1371
  throw await de_ValidationExceptionRes(parsedOutput, context);
1399
1372
  default:
1400
1373
  const parsedBody = parsedOutput.body;
1401
- throwDefaultError({
1374
+ return throwDefaultError({
1402
1375
  output,
1403
1376
  parsedBody,
1404
- exceptionCtor: __BaseException,
1405
1377
  errorCode,
1406
1378
  });
1407
1379
  }
@@ -1417,7 +1389,7 @@ export const de_ListWorkgroupsCommand = async (output, context) => {
1417
1389
  $metadata: deserializeMetadata(output),
1418
1390
  ...contents,
1419
1391
  };
1420
- return Promise.resolve(response);
1392
+ return response;
1421
1393
  };
1422
1394
  const de_ListWorkgroupsCommandError = async (output, context) => {
1423
1395
  const parsedOutput = {
@@ -1434,10 +1406,9 @@ const de_ListWorkgroupsCommandError = async (output, context) => {
1434
1406
  throw await de_ValidationExceptionRes(parsedOutput, context);
1435
1407
  default:
1436
1408
  const parsedBody = parsedOutput.body;
1437
- throwDefaultError({
1409
+ return throwDefaultError({
1438
1410
  output,
1439
1411
  parsedBody,
1440
- exceptionCtor: __BaseException,
1441
1412
  errorCode,
1442
1413
  });
1443
1414
  }
@@ -1448,12 +1419,12 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
1448
1419
  }
1449
1420
  const data = await parseBody(output.body, context);
1450
1421
  let contents = {};
1451
- contents = de_PutResourcePolicyResponse(data, context);
1422
+ contents = _json(data);
1452
1423
  const response = {
1453
1424
  $metadata: deserializeMetadata(output),
1454
1425
  ...contents,
1455
1426
  };
1456
- return Promise.resolve(response);
1427
+ return response;
1457
1428
  };
1458
1429
  const de_PutResourcePolicyCommandError = async (output, context) => {
1459
1430
  const parsedOutput = {
@@ -1479,10 +1450,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
1479
1450
  throw await de_ValidationExceptionRes(parsedOutput, context);
1480
1451
  default:
1481
1452
  const parsedBody = parsedOutput.body;
1482
- throwDefaultError({
1453
+ return throwDefaultError({
1483
1454
  output,
1484
1455
  parsedBody,
1485
- exceptionCtor: __BaseException,
1486
1456
  errorCode,
1487
1457
  });
1488
1458
  }
@@ -1498,7 +1468,7 @@ export const de_RestoreFromRecoveryPointCommand = async (output, context) => {
1498
1468
  $metadata: deserializeMetadata(output),
1499
1469
  ...contents,
1500
1470
  };
1501
- return Promise.resolve(response);
1471
+ return response;
1502
1472
  };
1503
1473
  const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
1504
1474
  const parsedOutput = {
@@ -1521,10 +1491,9 @@ const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
1521
1491
  throw await de_ValidationExceptionRes(parsedOutput, context);
1522
1492
  default:
1523
1493
  const parsedBody = parsedOutput.body;
1524
- throwDefaultError({
1494
+ return throwDefaultError({
1525
1495
  output,
1526
1496
  parsedBody,
1527
- exceptionCtor: __BaseException,
1528
1497
  errorCode,
1529
1498
  });
1530
1499
  }
@@ -1540,7 +1509,7 @@ export const de_RestoreFromSnapshotCommand = async (output, context) => {
1540
1509
  $metadata: deserializeMetadata(output),
1541
1510
  ...contents,
1542
1511
  };
1543
- return Promise.resolve(response);
1512
+ return response;
1544
1513
  };
1545
1514
  const de_RestoreFromSnapshotCommandError = async (output, context) => {
1546
1515
  const parsedOutput = {
@@ -1566,10 +1535,9 @@ const de_RestoreFromSnapshotCommandError = async (output, context) => {
1566
1535
  throw await de_ValidationExceptionRes(parsedOutput, context);
1567
1536
  default:
1568
1537
  const parsedBody = parsedOutput.body;
1569
- throwDefaultError({
1538
+ return throwDefaultError({
1570
1539
  output,
1571
1540
  parsedBody,
1572
- exceptionCtor: __BaseException,
1573
1541
  errorCode,
1574
1542
  });
1575
1543
  }
@@ -1585,7 +1553,7 @@ export const de_RestoreTableFromSnapshotCommand = async (output, context) => {
1585
1553
  $metadata: deserializeMetadata(output),
1586
1554
  ...contents,
1587
1555
  };
1588
- return Promise.resolve(response);
1556
+ return response;
1589
1557
  };
1590
1558
  const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
1591
1559
  const parsedOutput = {
@@ -1608,10 +1576,9 @@ const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
1608
1576
  throw await de_ValidationExceptionRes(parsedOutput, context);
1609
1577
  default:
1610
1578
  const parsedBody = parsedOutput.body;
1611
- throwDefaultError({
1579
+ return throwDefaultError({
1612
1580
  output,
1613
1581
  parsedBody,
1614
- exceptionCtor: __BaseException,
1615
1582
  errorCode,
1616
1583
  });
1617
1584
  }
@@ -1622,12 +1589,12 @@ export const de_TagResourceCommand = async (output, context) => {
1622
1589
  }
1623
1590
  const data = await parseBody(output.body, context);
1624
1591
  let contents = {};
1625
- contents = de_TagResourceResponse(data, context);
1592
+ contents = _json(data);
1626
1593
  const response = {
1627
1594
  $metadata: deserializeMetadata(output),
1628
1595
  ...contents,
1629
1596
  };
1630
- return Promise.resolve(response);
1597
+ return response;
1631
1598
  };
1632
1599
  const de_TagResourceCommandError = async (output, context) => {
1633
1600
  const parsedOutput = {
@@ -1653,10 +1620,9 @@ const de_TagResourceCommandError = async (output, context) => {
1653
1620
  throw await de_ValidationExceptionRes(parsedOutput, context);
1654
1621
  default:
1655
1622
  const parsedBody = parsedOutput.body;
1656
- throwDefaultError({
1623
+ return throwDefaultError({
1657
1624
  output,
1658
1625
  parsedBody,
1659
- exceptionCtor: __BaseException,
1660
1626
  errorCode,
1661
1627
  });
1662
1628
  }
@@ -1667,12 +1633,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1667
1633
  }
1668
1634
  const data = await parseBody(output.body, context);
1669
1635
  let contents = {};
1670
- contents = de_UntagResourceResponse(data, context);
1636
+ contents = _json(data);
1671
1637
  const response = {
1672
1638
  $metadata: deserializeMetadata(output),
1673
1639
  ...contents,
1674
1640
  };
1675
- return Promise.resolve(response);
1641
+ return response;
1676
1642
  };
1677
1643
  const de_UntagResourceCommandError = async (output, context) => {
1678
1644
  const parsedOutput = {
@@ -1695,10 +1661,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1695
1661
  throw await de_ValidationExceptionRes(parsedOutput, context);
1696
1662
  default:
1697
1663
  const parsedBody = parsedOutput.body;
1698
- throwDefaultError({
1664
+ return throwDefaultError({
1699
1665
  output,
1700
1666
  parsedBody,
1701
- exceptionCtor: __BaseException,
1702
1667
  errorCode,
1703
1668
  });
1704
1669
  }
@@ -1714,7 +1679,7 @@ export const de_UpdateEndpointAccessCommand = async (output, context) => {
1714
1679
  $metadata: deserializeMetadata(output),
1715
1680
  ...contents,
1716
1681
  };
1717
- return Promise.resolve(response);
1682
+ return response;
1718
1683
  };
1719
1684
  const de_UpdateEndpointAccessCommandError = async (output, context) => {
1720
1685
  const parsedOutput = {
@@ -1740,10 +1705,9 @@ const de_UpdateEndpointAccessCommandError = async (output, context) => {
1740
1705
  throw await de_ValidationExceptionRes(parsedOutput, context);
1741
1706
  default:
1742
1707
  const parsedBody = parsedOutput.body;
1743
- throwDefaultError({
1708
+ return throwDefaultError({
1744
1709
  output,
1745
1710
  parsedBody,
1746
- exceptionCtor: __BaseException,
1747
1711
  errorCode,
1748
1712
  });
1749
1713
  }
@@ -1759,7 +1723,7 @@ export const de_UpdateNamespaceCommand = async (output, context) => {
1759
1723
  $metadata: deserializeMetadata(output),
1760
1724
  ...contents,
1761
1725
  };
1762
- return Promise.resolve(response);
1726
+ return response;
1763
1727
  };
1764
1728
  const de_UpdateNamespaceCommandError = async (output, context) => {
1765
1729
  const parsedOutput = {
@@ -1782,10 +1746,9 @@ const de_UpdateNamespaceCommandError = async (output, context) => {
1782
1746
  throw await de_ValidationExceptionRes(parsedOutput, context);
1783
1747
  default:
1784
1748
  const parsedBody = parsedOutput.body;
1785
- throwDefaultError({
1749
+ return throwDefaultError({
1786
1750
  output,
1787
1751
  parsedBody,
1788
- exceptionCtor: __BaseException,
1789
1752
  errorCode,
1790
1753
  });
1791
1754
  }
@@ -1801,7 +1764,7 @@ export const de_UpdateSnapshotCommand = async (output, context) => {
1801
1764
  $metadata: deserializeMetadata(output),
1802
1765
  ...contents,
1803
1766
  };
1804
- return Promise.resolve(response);
1767
+ return response;
1805
1768
  };
1806
1769
  const de_UpdateSnapshotCommandError = async (output, context) => {
1807
1770
  const parsedOutput = {
@@ -1824,10 +1787,9 @@ const de_UpdateSnapshotCommandError = async (output, context) => {
1824
1787
  throw await de_ValidationExceptionRes(parsedOutput, context);
1825
1788
  default:
1826
1789
  const parsedBody = parsedOutput.body;
1827
- throwDefaultError({
1790
+ return throwDefaultError({
1828
1791
  output,
1829
1792
  parsedBody,
1830
- exceptionCtor: __BaseException,
1831
1793
  errorCode,
1832
1794
  });
1833
1795
  }
@@ -1838,12 +1800,12 @@ export const de_UpdateUsageLimitCommand = async (output, context) => {
1838
1800
  }
1839
1801
  const data = await parseBody(output.body, context);
1840
1802
  let contents = {};
1841
- contents = de_UpdateUsageLimitResponse(data, context);
1803
+ contents = _json(data);
1842
1804
  const response = {
1843
1805
  $metadata: deserializeMetadata(output),
1844
1806
  ...contents,
1845
1807
  };
1846
- return Promise.resolve(response);
1808
+ return response;
1847
1809
  };
1848
1810
  const de_UpdateUsageLimitCommandError = async (output, context) => {
1849
1811
  const parsedOutput = {
@@ -1866,10 +1828,9 @@ const de_UpdateUsageLimitCommandError = async (output, context) => {
1866
1828
  throw await de_ValidationExceptionRes(parsedOutput, context);
1867
1829
  default:
1868
1830
  const parsedBody = parsedOutput.body;
1869
- throwDefaultError({
1831
+ return throwDefaultError({
1870
1832
  output,
1871
1833
  parsedBody,
1872
- exceptionCtor: __BaseException,
1873
1834
  errorCode,
1874
1835
  });
1875
1836
  }
@@ -1885,7 +1846,7 @@ export const de_UpdateWorkgroupCommand = async (output, context) => {
1885
1846
  $metadata: deserializeMetadata(output),
1886
1847
  ...contents,
1887
1848
  };
1888
- return Promise.resolve(response);
1849
+ return response;
1889
1850
  };
1890
1851
  const de_UpdateWorkgroupCommandError = async (output, context) => {
1891
1852
  const parsedOutput = {
@@ -1911,17 +1872,16 @@ const de_UpdateWorkgroupCommandError = async (output, context) => {
1911
1872
  throw await de_ValidationExceptionRes(parsedOutput, context);
1912
1873
  default:
1913
1874
  const parsedBody = parsedOutput.body;
1914
- throwDefaultError({
1875
+ return throwDefaultError({
1915
1876
  output,
1916
1877
  parsedBody,
1917
- exceptionCtor: __BaseException,
1918
1878
  errorCode,
1919
1879
  });
1920
1880
  }
1921
1881
  };
1922
1882
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1923
1883
  const body = parsedOutput.body;
1924
- const deserialized = de_AccessDeniedException(body, context);
1884
+ const deserialized = _json(body);
1925
1885
  const exception = new AccessDeniedException({
1926
1886
  $metadata: deserializeMetadata(parsedOutput),
1927
1887
  ...deserialized,
@@ -1930,7 +1890,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1930
1890
  };
1931
1891
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1932
1892
  const body = parsedOutput.body;
1933
- const deserialized = de_ConflictException(body, context);
1893
+ const deserialized = _json(body);
1934
1894
  const exception = new ConflictException({
1935
1895
  $metadata: deserializeMetadata(parsedOutput),
1936
1896
  ...deserialized,
@@ -1939,7 +1899,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1939
1899
  };
1940
1900
  const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
1941
1901
  const body = parsedOutput.body;
1942
- const deserialized = de_InsufficientCapacityException(body, context);
1902
+ const deserialized = _json(body);
1943
1903
  const exception = new InsufficientCapacityException({
1944
1904
  $metadata: deserializeMetadata(parsedOutput),
1945
1905
  ...deserialized,
@@ -1948,7 +1908,7 @@ const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
1948
1908
  };
1949
1909
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1950
1910
  const body = parsedOutput.body;
1951
- const deserialized = de_InternalServerException(body, context);
1911
+ const deserialized = _json(body);
1952
1912
  const exception = new InternalServerException({
1953
1913
  $metadata: deserializeMetadata(parsedOutput),
1954
1914
  ...deserialized,
@@ -1957,7 +1917,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1957
1917
  };
1958
1918
  const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
1959
1919
  const body = parsedOutput.body;
1960
- const deserialized = de_InvalidPaginationException(body, context);
1920
+ const deserialized = _json(body);
1961
1921
  const exception = new InvalidPaginationException({
1962
1922
  $metadata: deserializeMetadata(parsedOutput),
1963
1923
  ...deserialized,
@@ -1966,7 +1926,7 @@ const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
1966
1926
  };
1967
1927
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1968
1928
  const body = parsedOutput.body;
1969
- const deserialized = de_ResourceNotFoundException(body, context);
1929
+ const deserialized = _json(body);
1970
1930
  const exception = new ResourceNotFoundException({
1971
1931
  $metadata: deserializeMetadata(parsedOutput),
1972
1932
  ...deserialized,
@@ -1975,7 +1935,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1975
1935
  };
1976
1936
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1977
1937
  const body = parsedOutput.body;
1978
- const deserialized = de_ServiceQuotaExceededException(body, context);
1938
+ const deserialized = _json(body);
1979
1939
  const exception = new ServiceQuotaExceededException({
1980
1940
  $metadata: deserializeMetadata(parsedOutput),
1981
1941
  ...deserialized,
@@ -1984,7 +1944,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1984
1944
  };
1985
1945
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1986
1946
  const body = parsedOutput.body;
1987
- const deserialized = de_ThrottlingException(body, context);
1947
+ const deserialized = _json(body);
1988
1948
  const exception = new ThrottlingException({
1989
1949
  $metadata: deserializeMetadata(parsedOutput),
1990
1950
  ...deserialized,
@@ -1993,7 +1953,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1993
1953
  };
1994
1954
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1995
1955
  const body = parsedOutput.body;
1996
- const deserialized = de_TooManyTagsException(body, context);
1956
+ const deserialized = _json(body);
1997
1957
  const exception = new TooManyTagsException({
1998
1958
  $metadata: deserializeMetadata(parsedOutput),
1999
1959
  ...deserialized,
@@ -2002,1009 +1962,335 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2002
1962
  };
2003
1963
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2004
1964
  const body = parsedOutput.body;
2005
- const deserialized = de_ValidationException(body, context);
1965
+ const deserialized = _json(body);
2006
1966
  const exception = new ValidationException({
2007
1967
  $metadata: deserializeMetadata(parsedOutput),
2008
1968
  ...deserialized,
2009
1969
  });
2010
1970
  return __decorateServiceException(exception, body);
2011
1971
  };
2012
- const se_ConfigParameter = (input, context) => {
2013
- return {
2014
- ...(input.parameterKey != null && { parameterKey: input.parameterKey }),
2015
- ...(input.parameterValue != null && { parameterValue: input.parameterValue }),
2016
- };
2017
- };
2018
- const se_ConfigParameterList = (input, context) => {
2019
- return input
2020
- .filter((e) => e != null)
2021
- .map((entry) => {
2022
- return se_ConfigParameter(entry, context);
2023
- });
2024
- };
2025
- const se_ConvertRecoveryPointToSnapshotRequest = (input, context) => {
2026
- return {
2027
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2028
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2029
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2030
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2031
- };
2032
- };
2033
- const se_CreateEndpointAccessRequest = (input, context) => {
2034
- return {
2035
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2036
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2037
- ...(input.vpcSecurityGroupIds != null && {
2038
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2039
- }),
2040
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2041
- };
2042
- };
2043
- const se_CreateNamespaceRequest = (input, context) => {
2044
- return {
2045
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2046
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2047
- ...(input.dbName != null && { dbName: input.dbName }),
2048
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2049
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2050
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2051
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2052
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2053
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2054
- };
2055
- };
2056
- const se_CreateSnapshotRequest = (input, context) => {
2057
- return {
2058
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2059
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2060
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2061
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2062
- };
2063
- };
2064
- const se_CreateUsageLimitRequest = (input, context) => {
2065
- return {
2066
- ...(input.amount != null && { amount: input.amount }),
2067
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2068
- ...(input.period != null && { period: input.period }),
2069
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2070
- ...(input.usageType != null && { usageType: input.usageType }),
2071
- };
2072
- };
2073
- const se_CreateWorkgroupRequest = (input, context) => {
2074
- return {
2075
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2076
- ...(input.configParameters != null && {
2077
- configParameters: se_ConfigParameterList(input.configParameters, context),
2078
- }),
2079
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2080
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2081
- ...(input.port != null && { port: input.port }),
2082
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2083
- ...(input.securityGroupIds != null && {
2084
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2085
- }),
2086
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2087
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2088
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2089
- };
2090
- };
2091
- const se_DeleteEndpointAccessRequest = (input, context) => {
2092
- return {
2093
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2094
- };
2095
- };
2096
- const se_DeleteNamespaceRequest = (input, context) => {
2097
- return {
2098
- ...(input.finalSnapshotName != null && { finalSnapshotName: input.finalSnapshotName }),
2099
- ...(input.finalSnapshotRetentionPeriod != null && {
2100
- finalSnapshotRetentionPeriod: input.finalSnapshotRetentionPeriod,
2101
- }),
2102
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2103
- };
2104
- };
2105
- const se_DeleteResourcePolicyRequest = (input, context) => {
2106
- return {
2107
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2108
- };
2109
- };
2110
- const se_DeleteSnapshotRequest = (input, context) => {
2111
- return {
2112
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2113
- };
2114
- };
2115
- const se_DeleteUsageLimitRequest = (input, context) => {
2116
- return {
2117
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2118
- };
2119
- };
2120
- const se_DeleteWorkgroupRequest = (input, context) => {
2121
- return {
2122
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2123
- };
2124
- };
2125
- const se_GetCredentialsRequest = (input, context) => {
2126
- return {
2127
- ...(input.dbName != null && { dbName: input.dbName }),
2128
- ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }),
2129
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2130
- };
2131
- };
2132
- const se_GetEndpointAccessRequest = (input, context) => {
2133
- return {
2134
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2135
- };
2136
- };
2137
- const se_GetNamespaceRequest = (input, context) => {
2138
- return {
2139
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2140
- };
2141
- };
2142
- const se_GetRecoveryPointRequest = (input, context) => {
2143
- return {
2144
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2145
- };
2146
- };
2147
- const se_GetResourcePolicyRequest = (input, context) => {
2148
- return {
2149
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2150
- };
2151
- };
2152
- const se_GetSnapshotRequest = (input, context) => {
2153
- return {
2154
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2155
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2156
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2157
- };
2158
- };
2159
- const se_GetTableRestoreStatusRequest = (input, context) => {
2160
- return {
2161
- ...(input.tableRestoreRequestId != null && { tableRestoreRequestId: input.tableRestoreRequestId }),
2162
- };
2163
- };
2164
- const se_GetUsageLimitRequest = (input, context) => {
2165
- return {
2166
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2167
- };
2168
- };
2169
- const se_GetWorkgroupRequest = (input, context) => {
2170
- return {
2171
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2172
- };
2173
- };
2174
- const se_IamRoleArnList = (input, context) => {
2175
- return input
2176
- .filter((e) => e != null)
2177
- .map((entry) => {
2178
- return entry;
2179
- });
2180
- };
2181
- const se_ListEndpointAccessRequest = (input, context) => {
2182
- return {
2183
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2184
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2185
- ...(input.vpcId != null && { vpcId: input.vpcId }),
2186
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2187
- };
2188
- };
2189
- const se_ListNamespacesRequest = (input, context) => {
2190
- return {
2191
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2192
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2193
- };
2194
- };
2195
1972
  const se_ListRecoveryPointsRequest = (input, context) => {
2196
- return {
2197
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2198
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2199
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2200
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2201
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2202
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2203
- };
2204
- };
2205
- const se_ListSnapshotsRequest = (input, context) => {
2206
- return {
2207
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2208
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2209
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2210
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2211
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2212
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2213
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2214
- };
2215
- };
2216
- const se_ListTableRestoreStatusRequest = (input, context) => {
2217
- return {
2218
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2219
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2220
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2221
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2222
- };
2223
- };
2224
- const se_ListTagsForResourceRequest = (input, context) => {
2225
- return {
2226
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2227
- };
2228
- };
2229
- const se_ListUsageLimitsRequest = (input, context) => {
2230
- return {
2231
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2232
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2233
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2234
- ...(input.usageType != null && { usageType: input.usageType }),
2235
- };
2236
- };
2237
- const se_ListWorkgroupsRequest = (input, context) => {
2238
- return {
2239
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2240
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2241
- };
2242
- };
2243
- const se_LogExportList = (input, context) => {
2244
- return input
2245
- .filter((e) => e != null)
2246
- .map((entry) => {
2247
- return entry;
2248
- });
2249
- };
2250
- const se_PutResourcePolicyRequest = (input, context) => {
2251
- return {
2252
- ...(input.policy != null && { policy: input.policy }),
2253
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2254
- };
2255
- };
2256
- const se_RestoreFromRecoveryPointRequest = (input, context) => {
2257
- return {
2258
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2259
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2260
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2261
- };
2262
- };
2263
- const se_RestoreFromSnapshotRequest = (input, context) => {
2264
- return {
2265
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2266
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2267
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2268
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2269
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2270
- };
2271
- };
2272
- const se_RestoreTableFromSnapshotRequest = (input, context) => {
2273
- return {
2274
- ...(input.activateCaseSensitiveIdentifier != null && {
2275
- activateCaseSensitiveIdentifier: input.activateCaseSensitiveIdentifier,
2276
- }),
2277
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2278
- ...(input.newTableName != null && { newTableName: input.newTableName }),
2279
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2280
- ...(input.sourceDatabaseName != null && { sourceDatabaseName: input.sourceDatabaseName }),
2281
- ...(input.sourceSchemaName != null && { sourceSchemaName: input.sourceSchemaName }),
2282
- ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }),
2283
- ...(input.targetDatabaseName != null && { targetDatabaseName: input.targetDatabaseName }),
2284
- ...(input.targetSchemaName != null && { targetSchemaName: input.targetSchemaName }),
2285
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2286
- };
2287
- };
2288
- const se_SecurityGroupIdList = (input, context) => {
2289
- return input
2290
- .filter((e) => e != null)
2291
- .map((entry) => {
2292
- return entry;
2293
- });
2294
- };
2295
- const se_SubnetIdList = (input, context) => {
2296
- return input
2297
- .filter((e) => e != null)
2298
- .map((entry) => {
2299
- return entry;
2300
- });
2301
- };
2302
- const se_Tag = (input, context) => {
2303
- return {
2304
- ...(input.key != null && { key: input.key }),
2305
- ...(input.value != null && { value: input.value }),
2306
- };
2307
- };
2308
- const se_TagKeyList = (input, context) => {
2309
- return input
2310
- .filter((e) => e != null)
2311
- .map((entry) => {
2312
- return entry;
2313
- });
2314
- };
2315
- const se_TagList = (input, context) => {
2316
- return input
2317
- .filter((e) => e != null)
2318
- .map((entry) => {
2319
- return se_Tag(entry, context);
2320
- });
2321
- };
2322
- const se_TagResourceRequest = (input, context) => {
2323
- return {
2324
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2325
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2326
- };
2327
- };
2328
- const se_UntagResourceRequest = (input, context) => {
2329
- return {
2330
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2331
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
2332
- };
2333
- };
2334
- const se_UpdateEndpointAccessRequest = (input, context) => {
2335
- return {
2336
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2337
- ...(input.vpcSecurityGroupIds != null && {
2338
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2339
- }),
2340
- };
2341
- };
2342
- const se_UpdateNamespaceRequest = (input, context) => {
2343
- return {
2344
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2345
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2346
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2347
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2348
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2349
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2350
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2351
- };
2352
- };
2353
- const se_UpdateSnapshotRequest = (input, context) => {
2354
- return {
2355
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2356
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2357
- };
2358
- };
2359
- const se_UpdateUsageLimitRequest = (input, context) => {
2360
- return {
2361
- ...(input.amount != null && { amount: input.amount }),
2362
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2363
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2364
- };
2365
- };
2366
- const se_UpdateWorkgroupRequest = (input, context) => {
2367
- return {
2368
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2369
- ...(input.configParameters != null && {
2370
- configParameters: se_ConfigParameterList(input.configParameters, context),
2371
- }),
2372
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2373
- ...(input.port != null && { port: input.port }),
2374
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2375
- ...(input.securityGroupIds != null && {
2376
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2377
- }),
2378
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2379
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2380
- };
2381
- };
2382
- const se_VpcSecurityGroupIdList = (input, context) => {
2383
- return input
2384
- .filter((e) => e != null)
2385
- .map((entry) => {
2386
- return entry;
1973
+ return take(input, {
1974
+ endTime: (_) => Math.round(_.getTime() / 1000),
1975
+ maxResults: [],
1976
+ namespaceArn: [],
1977
+ namespaceName: [],
1978
+ nextToken: [],
1979
+ startTime: (_) => Math.round(_.getTime() / 1000),
2387
1980
  });
2388
1981
  };
2389
- const de_AccessDeniedException = (output, context) => {
2390
- return {
2391
- code: __expectString(output.code),
2392
- message: __expectString(output.message),
2393
- };
2394
- };
2395
- const de_AccountIdList = (output, context) => {
2396
- const retVal = (output || [])
2397
- .filter((e) => e != null)
2398
- .map((entry) => {
2399
- if (entry === null) {
2400
- return null;
2401
- }
2402
- return __expectString(entry);
2403
- });
2404
- return retVal;
2405
- };
2406
- const de_ConfigParameter = (output, context) => {
2407
- return {
2408
- parameterKey: __expectString(output.parameterKey),
2409
- parameterValue: __expectString(output.parameterValue),
2410
- };
2411
- };
2412
- const de_ConfigParameterList = (output, context) => {
2413
- const retVal = (output || [])
2414
- .filter((e) => e != null)
2415
- .map((entry) => {
2416
- if (entry === null) {
2417
- return null;
2418
- }
2419
- return de_ConfigParameter(entry, context);
1982
+ const se_ListSnapshotsRequest = (input, context) => {
1983
+ return take(input, {
1984
+ endTime: (_) => Math.round(_.getTime() / 1000),
1985
+ maxResults: [],
1986
+ namespaceArn: [],
1987
+ namespaceName: [],
1988
+ nextToken: [],
1989
+ ownerAccount: [],
1990
+ startTime: (_) => Math.round(_.getTime() / 1000),
2420
1991
  });
2421
- return retVal;
2422
- };
2423
- const de_ConflictException = (output, context) => {
2424
- return {
2425
- message: __expectString(output.message),
2426
- };
2427
1992
  };
2428
1993
  const de_ConvertRecoveryPointToSnapshotResponse = (output, context) => {
2429
- return {
2430
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2431
- };
1994
+ return take(output, {
1995
+ snapshot: (_) => de_Snapshot(_, context),
1996
+ });
2432
1997
  };
2433
1998
  const de_CreateEndpointAccessResponse = (output, context) => {
2434
- return {
2435
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2436
- };
1999
+ return take(output, {
2000
+ endpoint: (_) => de_EndpointAccess(_, context),
2001
+ });
2437
2002
  };
2438
2003
  const de_CreateNamespaceResponse = (output, context) => {
2439
- return {
2440
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2441
- };
2004
+ return take(output, {
2005
+ namespace: (_) => de_Namespace(_, context),
2006
+ });
2442
2007
  };
2443
2008
  const de_CreateSnapshotResponse = (output, context) => {
2444
- return {
2445
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2446
- };
2447
- };
2448
- const de_CreateUsageLimitResponse = (output, context) => {
2449
- return {
2450
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2451
- };
2009
+ return take(output, {
2010
+ snapshot: (_) => de_Snapshot(_, context),
2011
+ });
2452
2012
  };
2453
2013
  const de_CreateWorkgroupResponse = (output, context) => {
2454
- return {
2455
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2456
- };
2014
+ return take(output, {
2015
+ workgroup: (_) => de_Workgroup(_, context),
2016
+ });
2457
2017
  };
2458
2018
  const de_DeleteEndpointAccessResponse = (output, context) => {
2459
- return {
2460
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2461
- };
2019
+ return take(output, {
2020
+ endpoint: (_) => de_EndpointAccess(_, context),
2021
+ });
2462
2022
  };
2463
2023
  const de_DeleteNamespaceResponse = (output, context) => {
2464
- return {
2465
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2466
- };
2467
- };
2468
- const de_DeleteResourcePolicyResponse = (output, context) => {
2469
- return {};
2024
+ return take(output, {
2025
+ namespace: (_) => de_Namespace(_, context),
2026
+ });
2470
2027
  };
2471
2028
  const de_DeleteSnapshotResponse = (output, context) => {
2472
- return {
2473
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2474
- };
2475
- };
2476
- const de_DeleteUsageLimitResponse = (output, context) => {
2477
- return {
2478
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2479
- };
2029
+ return take(output, {
2030
+ snapshot: (_) => de_Snapshot(_, context),
2031
+ });
2480
2032
  };
2481
2033
  const de_DeleteWorkgroupResponse = (output, context) => {
2482
- return {
2483
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2484
- };
2485
- };
2486
- const de_Endpoint = (output, context) => {
2487
- return {
2488
- address: __expectString(output.address),
2489
- port: __expectInt32(output.port),
2490
- vpcEndpoints: output.vpcEndpoints != null ? de_VpcEndpointList(output.vpcEndpoints, context) : undefined,
2491
- };
2034
+ return take(output, {
2035
+ workgroup: (_) => de_Workgroup(_, context),
2036
+ });
2492
2037
  };
2493
2038
  const de_EndpointAccess = (output, context) => {
2494
- return {
2495
- address: __expectString(output.address),
2496
- endpointArn: __expectString(output.endpointArn),
2497
- endpointCreateTime: output.endpointCreateTime != null
2498
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endpointCreateTime))
2499
- : undefined,
2500
- endpointName: __expectString(output.endpointName),
2501
- endpointStatus: __expectString(output.endpointStatus),
2502
- port: __expectInt32(output.port),
2503
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
2504
- vpcEndpoint: output.vpcEndpoint != null ? de_VpcEndpoint(output.vpcEndpoint, context) : undefined,
2505
- vpcSecurityGroups: output.vpcSecurityGroups != null
2506
- ? de_VpcSecurityGroupMembershipList(output.vpcSecurityGroups, context)
2507
- : undefined,
2508
- workgroupName: __expectString(output.workgroupName),
2509
- };
2039
+ return take(output, {
2040
+ address: __expectString,
2041
+ endpointArn: __expectString,
2042
+ endpointCreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2043
+ endpointName: __expectString,
2044
+ endpointStatus: __expectString,
2045
+ port: __expectInt32,
2046
+ subnetIds: _json,
2047
+ vpcEndpoint: _json,
2048
+ vpcSecurityGroups: _json,
2049
+ workgroupName: __expectString,
2050
+ });
2510
2051
  };
2511
2052
  const de_EndpointAccessList = (output, context) => {
2512
2053
  const retVal = (output || [])
2513
2054
  .filter((e) => e != null)
2514
2055
  .map((entry) => {
2515
- if (entry === null) {
2516
- return null;
2517
- }
2518
2056
  return de_EndpointAccess(entry, context);
2519
2057
  });
2520
2058
  return retVal;
2521
2059
  };
2522
2060
  const de_GetCredentialsResponse = (output, context) => {
2523
- return {
2524
- dbPassword: __expectString(output.dbPassword),
2525
- dbUser: __expectString(output.dbUser),
2526
- expiration: output.expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiration))) : undefined,
2527
- nextRefreshTime: output.nextRefreshTime != null
2528
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.nextRefreshTime)))
2529
- : undefined,
2530
- };
2061
+ return take(output, {
2062
+ dbPassword: __expectString,
2063
+ dbUser: __expectString,
2064
+ expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2065
+ nextRefreshTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2066
+ });
2531
2067
  };
2532
2068
  const de_GetEndpointAccessResponse = (output, context) => {
2533
- return {
2534
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2535
- };
2069
+ return take(output, {
2070
+ endpoint: (_) => de_EndpointAccess(_, context),
2071
+ });
2536
2072
  };
2537
2073
  const de_GetNamespaceResponse = (output, context) => {
2538
- return {
2539
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2540
- };
2074
+ return take(output, {
2075
+ namespace: (_) => de_Namespace(_, context),
2076
+ });
2541
2077
  };
2542
2078
  const de_GetRecoveryPointResponse = (output, context) => {
2543
- return {
2544
- recoveryPoint: output.recoveryPoint != null ? de_RecoveryPoint(output.recoveryPoint, context) : undefined,
2545
- };
2546
- };
2547
- const de_GetResourcePolicyResponse = (output, context) => {
2548
- return {
2549
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2550
- };
2079
+ return take(output, {
2080
+ recoveryPoint: (_) => de_RecoveryPoint(_, context),
2081
+ });
2551
2082
  };
2552
2083
  const de_GetSnapshotResponse = (output, context) => {
2553
- return {
2554
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2555
- };
2084
+ return take(output, {
2085
+ snapshot: (_) => de_Snapshot(_, context),
2086
+ });
2556
2087
  };
2557
2088
  const de_GetTableRestoreStatusResponse = (output, context) => {
2558
- return {
2559
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2560
- };
2561
- };
2562
- const de_GetUsageLimitResponse = (output, context) => {
2563
- return {
2564
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2565
- };
2089
+ return take(output, {
2090
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2091
+ });
2566
2092
  };
2567
2093
  const de_GetWorkgroupResponse = (output, context) => {
2568
- return {
2569
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2570
- };
2571
- };
2572
- const de_IamRoleArnList = (output, context) => {
2573
- const retVal = (output || [])
2574
- .filter((e) => e != null)
2575
- .map((entry) => {
2576
- if (entry === null) {
2577
- return null;
2578
- }
2579
- return __expectString(entry);
2094
+ return take(output, {
2095
+ workgroup: (_) => de_Workgroup(_, context),
2580
2096
  });
2581
- return retVal;
2582
- };
2583
- const de_InsufficientCapacityException = (output, context) => {
2584
- return {
2585
- message: __expectString(output.message),
2586
- };
2587
- };
2588
- const de_InternalServerException = (output, context) => {
2589
- return {
2590
- message: __expectString(output.message),
2591
- };
2592
- };
2593
- const de_InvalidPaginationException = (output, context) => {
2594
- return {
2595
- message: __expectString(output.message),
2596
- };
2597
2097
  };
2598
2098
  const de_ListEndpointAccessResponse = (output, context) => {
2599
- return {
2600
- endpoints: output.endpoints != null ? de_EndpointAccessList(output.endpoints, context) : undefined,
2601
- nextToken: __expectString(output.nextToken),
2602
- };
2099
+ return take(output, {
2100
+ endpoints: (_) => de_EndpointAccessList(_, context),
2101
+ nextToken: __expectString,
2102
+ });
2603
2103
  };
2604
2104
  const de_ListNamespacesResponse = (output, context) => {
2605
- return {
2606
- namespaces: output.namespaces != null ? de_NamespaceList(output.namespaces, context) : undefined,
2607
- nextToken: __expectString(output.nextToken),
2608
- };
2105
+ return take(output, {
2106
+ namespaces: (_) => de_NamespaceList(_, context),
2107
+ nextToken: __expectString,
2108
+ });
2609
2109
  };
2610
2110
  const de_ListRecoveryPointsResponse = (output, context) => {
2611
- return {
2612
- nextToken: __expectString(output.nextToken),
2613
- recoveryPoints: output.recoveryPoints != null ? de_RecoveryPointList(output.recoveryPoints, context) : undefined,
2614
- };
2111
+ return take(output, {
2112
+ nextToken: __expectString,
2113
+ recoveryPoints: (_) => de_RecoveryPointList(_, context),
2114
+ });
2615
2115
  };
2616
2116
  const de_ListSnapshotsResponse = (output, context) => {
2617
- return {
2618
- nextToken: __expectString(output.nextToken),
2619
- snapshots: output.snapshots != null ? de_SnapshotList(output.snapshots, context) : undefined,
2620
- };
2117
+ return take(output, {
2118
+ nextToken: __expectString,
2119
+ snapshots: (_) => de_SnapshotList(_, context),
2120
+ });
2621
2121
  };
2622
2122
  const de_ListTableRestoreStatusResponse = (output, context) => {
2623
- return {
2624
- nextToken: __expectString(output.nextToken),
2625
- tableRestoreStatuses: output.tableRestoreStatuses != null ? de_TableRestoreStatusList(output.tableRestoreStatuses, context) : undefined,
2626
- };
2627
- };
2628
- const de_ListTagsForResourceResponse = (output, context) => {
2629
- return {
2630
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
2631
- };
2632
- };
2633
- const de_ListUsageLimitsResponse = (output, context) => {
2634
- return {
2635
- nextToken: __expectString(output.nextToken),
2636
- usageLimits: output.usageLimits != null ? de_UsageLimits(output.usageLimits, context) : undefined,
2637
- };
2123
+ return take(output, {
2124
+ nextToken: __expectString,
2125
+ tableRestoreStatuses: (_) => de_TableRestoreStatusList(_, context),
2126
+ });
2638
2127
  };
2639
2128
  const de_ListWorkgroupsResponse = (output, context) => {
2640
- return {
2641
- nextToken: __expectString(output.nextToken),
2642
- workgroups: output.workgroups != null ? de_WorkgroupList(output.workgroups, context) : undefined,
2643
- };
2644
- };
2645
- const de_LogExportList = (output, context) => {
2646
- const retVal = (output || [])
2647
- .filter((e) => e != null)
2648
- .map((entry) => {
2649
- if (entry === null) {
2650
- return null;
2651
- }
2652
- return __expectString(entry);
2129
+ return take(output, {
2130
+ nextToken: __expectString,
2131
+ workgroups: (_) => de_WorkgroupList(_, context),
2653
2132
  });
2654
- return retVal;
2655
2133
  };
2656
2134
  const de_Namespace = (output, context) => {
2657
- return {
2658
- adminUsername: __expectString(output.adminUsername),
2659
- creationDate: output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined,
2660
- dbName: __expectString(output.dbName),
2661
- defaultIamRoleArn: __expectString(output.defaultIamRoleArn),
2662
- iamRoles: output.iamRoles != null ? de_IamRoleArnList(output.iamRoles, context) : undefined,
2663
- kmsKeyId: __expectString(output.kmsKeyId),
2664
- logExports: output.logExports != null ? de_LogExportList(output.logExports, context) : undefined,
2665
- namespaceArn: __expectString(output.namespaceArn),
2666
- namespaceId: __expectString(output.namespaceId),
2667
- namespaceName: __expectString(output.namespaceName),
2668
- status: __expectString(output.status),
2669
- };
2135
+ return take(output, {
2136
+ adminUsername: __expectString,
2137
+ creationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2138
+ dbName: __expectString,
2139
+ defaultIamRoleArn: __expectString,
2140
+ iamRoles: _json,
2141
+ kmsKeyId: __expectString,
2142
+ logExports: _json,
2143
+ namespaceArn: __expectString,
2144
+ namespaceId: __expectString,
2145
+ namespaceName: __expectString,
2146
+ status: __expectString,
2147
+ });
2670
2148
  };
2671
2149
  const de_NamespaceList = (output, context) => {
2672
2150
  const retVal = (output || [])
2673
2151
  .filter((e) => e != null)
2674
2152
  .map((entry) => {
2675
- if (entry === null) {
2676
- return null;
2677
- }
2678
2153
  return de_Namespace(entry, context);
2679
2154
  });
2680
2155
  return retVal;
2681
2156
  };
2682
- const de_NetworkInterface = (output, context) => {
2683
- return {
2684
- availabilityZone: __expectString(output.availabilityZone),
2685
- networkInterfaceId: __expectString(output.networkInterfaceId),
2686
- privateIpAddress: __expectString(output.privateIpAddress),
2687
- subnetId: __expectString(output.subnetId),
2688
- };
2689
- };
2690
- const de_NetworkInterfaceList = (output, context) => {
2691
- const retVal = (output || [])
2692
- .filter((e) => e != null)
2693
- .map((entry) => {
2694
- if (entry === null) {
2695
- return null;
2696
- }
2697
- return de_NetworkInterface(entry, context);
2698
- });
2699
- return retVal;
2700
- };
2701
- const de_PutResourcePolicyResponse = (output, context) => {
2702
- return {
2703
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2704
- };
2705
- };
2706
2157
  const de_RecoveryPoint = (output, context) => {
2707
- return {
2708
- namespaceArn: __expectString(output.namespaceArn),
2709
- namespaceName: __expectString(output.namespaceName),
2710
- recoveryPointCreateTime: output.recoveryPointCreateTime != null
2711
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.recoveryPointCreateTime))
2712
- : undefined,
2713
- recoveryPointId: __expectString(output.recoveryPointId),
2714
- totalSizeInMegaBytes: __limitedParseDouble(output.totalSizeInMegaBytes),
2715
- workgroupName: __expectString(output.workgroupName),
2716
- };
2158
+ return take(output, {
2159
+ namespaceArn: __expectString,
2160
+ namespaceName: __expectString,
2161
+ recoveryPointCreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2162
+ recoveryPointId: __expectString,
2163
+ totalSizeInMegaBytes: __limitedParseDouble,
2164
+ workgroupName: __expectString,
2165
+ });
2717
2166
  };
2718
2167
  const de_RecoveryPointList = (output, context) => {
2719
2168
  const retVal = (output || [])
2720
2169
  .filter((e) => e != null)
2721
2170
  .map((entry) => {
2722
- if (entry === null) {
2723
- return null;
2724
- }
2725
2171
  return de_RecoveryPoint(entry, context);
2726
2172
  });
2727
2173
  return retVal;
2728
2174
  };
2729
- const de_ResourceNotFoundException = (output, context) => {
2730
- return {
2731
- message: __expectString(output.message),
2732
- resourceName: __expectString(output.resourceName),
2733
- };
2734
- };
2735
- const de_ResourcePolicy = (output, context) => {
2736
- return {
2737
- policy: __expectString(output.policy),
2738
- resourceArn: __expectString(output.resourceArn),
2739
- };
2740
- };
2741
2175
  const de_RestoreFromRecoveryPointResponse = (output, context) => {
2742
- return {
2743
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2744
- recoveryPointId: __expectString(output.recoveryPointId),
2745
- };
2176
+ return take(output, {
2177
+ namespace: (_) => de_Namespace(_, context),
2178
+ recoveryPointId: __expectString,
2179
+ });
2746
2180
  };
2747
2181
  const de_RestoreFromSnapshotResponse = (output, context) => {
2748
- return {
2749
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2750
- ownerAccount: __expectString(output.ownerAccount),
2751
- snapshotName: __expectString(output.snapshotName),
2752
- };
2182
+ return take(output, {
2183
+ namespace: (_) => de_Namespace(_, context),
2184
+ ownerAccount: __expectString,
2185
+ snapshotName: __expectString,
2186
+ });
2753
2187
  };
2754
2188
  const de_RestoreTableFromSnapshotResponse = (output, context) => {
2755
- return {
2756
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2757
- };
2758
- };
2759
- const de_SecurityGroupIdList = (output, context) => {
2760
- const retVal = (output || [])
2761
- .filter((e) => e != null)
2762
- .map((entry) => {
2763
- if (entry === null) {
2764
- return null;
2765
- }
2766
- return __expectString(entry);
2189
+ return take(output, {
2190
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2767
2191
  });
2768
- return retVal;
2769
- };
2770
- const de_ServiceQuotaExceededException = (output, context) => {
2771
- return {
2772
- message: __expectString(output.message),
2773
- };
2774
2192
  };
2775
2193
  const de_Snapshot = (output, context) => {
2776
- return {
2777
- accountsWithProvisionedRestoreAccess: output.accountsWithProvisionedRestoreAccess != null
2778
- ? de_AccountIdList(output.accountsWithProvisionedRestoreAccess, context)
2779
- : undefined,
2780
- accountsWithRestoreAccess: output.accountsWithRestoreAccess != null
2781
- ? de_AccountIdList(output.accountsWithRestoreAccess, context)
2782
- : undefined,
2783
- actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble(output.actualIncrementalBackupSizeInMegaBytes),
2784
- adminUsername: __expectString(output.adminUsername),
2785
- backupProgressInMegaBytes: __limitedParseDouble(output.backupProgressInMegaBytes),
2786
- currentBackupRateInMegaBytesPerSecond: __limitedParseDouble(output.currentBackupRateInMegaBytesPerSecond),
2787
- elapsedTimeInSeconds: __expectLong(output.elapsedTimeInSeconds),
2788
- estimatedSecondsToCompletion: __expectLong(output.estimatedSecondsToCompletion),
2789
- kmsKeyId: __expectString(output.kmsKeyId),
2790
- namespaceArn: __expectString(output.namespaceArn),
2791
- namespaceName: __expectString(output.namespaceName),
2792
- ownerAccount: __expectString(output.ownerAccount),
2793
- snapshotArn: __expectString(output.snapshotArn),
2794
- snapshotCreateTime: output.snapshotCreateTime != null
2795
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotCreateTime))
2796
- : undefined,
2797
- snapshotName: __expectString(output.snapshotName),
2798
- snapshotRemainingDays: __expectInt32(output.snapshotRemainingDays),
2799
- snapshotRetentionPeriod: __expectInt32(output.snapshotRetentionPeriod),
2800
- snapshotRetentionStartTime: output.snapshotRetentionStartTime != null
2801
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotRetentionStartTime))
2802
- : undefined,
2803
- status: __expectString(output.status),
2804
- totalBackupSizeInMegaBytes: __limitedParseDouble(output.totalBackupSizeInMegaBytes),
2805
- };
2194
+ return take(output, {
2195
+ accountsWithProvisionedRestoreAccess: _json,
2196
+ accountsWithRestoreAccess: _json,
2197
+ actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble,
2198
+ adminUsername: __expectString,
2199
+ backupProgressInMegaBytes: __limitedParseDouble,
2200
+ currentBackupRateInMegaBytesPerSecond: __limitedParseDouble,
2201
+ elapsedTimeInSeconds: __expectLong,
2202
+ estimatedSecondsToCompletion: __expectLong,
2203
+ kmsKeyId: __expectString,
2204
+ namespaceArn: __expectString,
2205
+ namespaceName: __expectString,
2206
+ ownerAccount: __expectString,
2207
+ snapshotArn: __expectString,
2208
+ snapshotCreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2209
+ snapshotName: __expectString,
2210
+ snapshotRemainingDays: __expectInt32,
2211
+ snapshotRetentionPeriod: __expectInt32,
2212
+ snapshotRetentionStartTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2213
+ status: __expectString,
2214
+ totalBackupSizeInMegaBytes: __limitedParseDouble,
2215
+ });
2806
2216
  };
2807
2217
  const de_SnapshotList = (output, context) => {
2808
2218
  const retVal = (output || [])
2809
2219
  .filter((e) => e != null)
2810
2220
  .map((entry) => {
2811
- if (entry === null) {
2812
- return null;
2813
- }
2814
2221
  return de_Snapshot(entry, context);
2815
2222
  });
2816
2223
  return retVal;
2817
2224
  };
2818
- const de_SubnetIdList = (output, context) => {
2819
- const retVal = (output || [])
2820
- .filter((e) => e != null)
2821
- .map((entry) => {
2822
- if (entry === null) {
2823
- return null;
2824
- }
2825
- return __expectString(entry);
2826
- });
2827
- return retVal;
2828
- };
2829
2225
  const de_TableRestoreStatus = (output, context) => {
2830
- return {
2831
- message: __expectString(output.message),
2832
- namespaceName: __expectString(output.namespaceName),
2833
- newTableName: __expectString(output.newTableName),
2834
- progressInMegaBytes: __expectLong(output.progressInMegaBytes),
2835
- requestTime: output.requestTime != null
2836
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestTime)))
2837
- : undefined,
2838
- snapshotName: __expectString(output.snapshotName),
2839
- sourceDatabaseName: __expectString(output.sourceDatabaseName),
2840
- sourceSchemaName: __expectString(output.sourceSchemaName),
2841
- sourceTableName: __expectString(output.sourceTableName),
2842
- status: __expectString(output.status),
2843
- tableRestoreRequestId: __expectString(output.tableRestoreRequestId),
2844
- targetDatabaseName: __expectString(output.targetDatabaseName),
2845
- targetSchemaName: __expectString(output.targetSchemaName),
2846
- totalDataInMegaBytes: __expectLong(output.totalDataInMegaBytes),
2847
- workgroupName: __expectString(output.workgroupName),
2848
- };
2226
+ return take(output, {
2227
+ message: __expectString,
2228
+ namespaceName: __expectString,
2229
+ newTableName: __expectString,
2230
+ progressInMegaBytes: __expectLong,
2231
+ requestTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2232
+ snapshotName: __expectString,
2233
+ sourceDatabaseName: __expectString,
2234
+ sourceSchemaName: __expectString,
2235
+ sourceTableName: __expectString,
2236
+ status: __expectString,
2237
+ tableRestoreRequestId: __expectString,
2238
+ targetDatabaseName: __expectString,
2239
+ targetSchemaName: __expectString,
2240
+ totalDataInMegaBytes: __expectLong,
2241
+ workgroupName: __expectString,
2242
+ });
2849
2243
  };
2850
2244
  const de_TableRestoreStatusList = (output, context) => {
2851
2245
  const retVal = (output || [])
2852
2246
  .filter((e) => e != null)
2853
2247
  .map((entry) => {
2854
- if (entry === null) {
2855
- return null;
2856
- }
2857
2248
  return de_TableRestoreStatus(entry, context);
2858
2249
  });
2859
2250
  return retVal;
2860
2251
  };
2861
- const de_Tag = (output, context) => {
2862
- return {
2863
- key: __expectString(output.key),
2864
- value: __expectString(output.value),
2865
- };
2866
- };
2867
- const de_TagList = (output, context) => {
2868
- const retVal = (output || [])
2869
- .filter((e) => e != null)
2870
- .map((entry) => {
2871
- if (entry === null) {
2872
- return null;
2873
- }
2874
- return de_Tag(entry, context);
2875
- });
2876
- return retVal;
2877
- };
2878
- const de_TagResourceResponse = (output, context) => {
2879
- return {};
2880
- };
2881
- const de_ThrottlingException = (output, context) => {
2882
- return {
2883
- code: __expectString(output.code),
2884
- message: __expectString(output.message),
2885
- };
2886
- };
2887
- const de_TooManyTagsException = (output, context) => {
2888
- return {
2889
- message: __expectString(output.message),
2890
- resourceName: __expectString(output.resourceName),
2891
- };
2892
- };
2893
- const de_UntagResourceResponse = (output, context) => {
2894
- return {};
2895
- };
2896
2252
  const de_UpdateEndpointAccessResponse = (output, context) => {
2897
- return {
2898
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2899
- };
2253
+ return take(output, {
2254
+ endpoint: (_) => de_EndpointAccess(_, context),
2255
+ });
2900
2256
  };
2901
2257
  const de_UpdateNamespaceResponse = (output, context) => {
2902
- return {
2903
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2904
- };
2905
- };
2906
- const de_UpdateSnapshotResponse = (output, context) => {
2907
- return {
2908
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2909
- };
2910
- };
2911
- const de_UpdateUsageLimitResponse = (output, context) => {
2912
- return {
2913
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2914
- };
2915
- };
2916
- const de_UpdateWorkgroupResponse = (output, context) => {
2917
- return {
2918
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2919
- };
2920
- };
2921
- const de_UsageLimit = (output, context) => {
2922
- return {
2923
- amount: __expectLong(output.amount),
2924
- breachAction: __expectString(output.breachAction),
2925
- period: __expectString(output.period),
2926
- resourceArn: __expectString(output.resourceArn),
2927
- usageLimitArn: __expectString(output.usageLimitArn),
2928
- usageLimitId: __expectString(output.usageLimitId),
2929
- usageType: __expectString(output.usageType),
2930
- };
2931
- };
2932
- const de_UsageLimits = (output, context) => {
2933
- const retVal = (output || [])
2934
- .filter((e) => e != null)
2935
- .map((entry) => {
2936
- if (entry === null) {
2937
- return null;
2938
- }
2939
- return de_UsageLimit(entry, context);
2258
+ return take(output, {
2259
+ namespace: (_) => de_Namespace(_, context),
2940
2260
  });
2941
- return retVal;
2942
2261
  };
2943
- const de_ValidationException = (output, context) => {
2944
- return {
2945
- message: __expectString(output.message),
2946
- };
2947
- };
2948
- const de_VpcEndpoint = (output, context) => {
2949
- return {
2950
- networkInterfaces: output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined,
2951
- vpcEndpointId: __expectString(output.vpcEndpointId),
2952
- vpcId: __expectString(output.vpcId),
2953
- };
2954
- };
2955
- const de_VpcEndpointList = (output, context) => {
2956
- const retVal = (output || [])
2957
- .filter((e) => e != null)
2958
- .map((entry) => {
2959
- if (entry === null) {
2960
- return null;
2961
- }
2962
- return de_VpcEndpoint(entry, context);
2262
+ const de_UpdateSnapshotResponse = (output, context) => {
2263
+ return take(output, {
2264
+ snapshot: (_) => de_Snapshot(_, context),
2963
2265
  });
2964
- return retVal;
2965
2266
  };
2966
- const de_VpcSecurityGroupMembership = (output, context) => {
2967
- return {
2968
- status: __expectString(output.status),
2969
- vpcSecurityGroupId: __expectString(output.vpcSecurityGroupId),
2970
- };
2971
- };
2972
- const de_VpcSecurityGroupMembershipList = (output, context) => {
2973
- const retVal = (output || [])
2974
- .filter((e) => e != null)
2975
- .map((entry) => {
2976
- if (entry === null) {
2977
- return null;
2978
- }
2979
- return de_VpcSecurityGroupMembership(entry, context);
2267
+ const de_UpdateWorkgroupResponse = (output, context) => {
2268
+ return take(output, {
2269
+ workgroup: (_) => de_Workgroup(_, context),
2980
2270
  });
2981
- return retVal;
2982
2271
  };
2983
2272
  const de_Workgroup = (output, context) => {
2984
- return {
2985
- baseCapacity: __expectInt32(output.baseCapacity),
2986
- configParameters: output.configParameters != null ? de_ConfigParameterList(output.configParameters, context) : undefined,
2987
- creationDate: output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined,
2988
- endpoint: output.endpoint != null ? de_Endpoint(output.endpoint, context) : undefined,
2989
- enhancedVpcRouting: __expectBoolean(output.enhancedVpcRouting),
2990
- namespaceName: __expectString(output.namespaceName),
2991
- port: __expectInt32(output.port),
2992
- publiclyAccessible: __expectBoolean(output.publiclyAccessible),
2993
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined,
2994
- status: __expectString(output.status),
2995
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
2996
- workgroupArn: __expectString(output.workgroupArn),
2997
- workgroupId: __expectString(output.workgroupId),
2998
- workgroupName: __expectString(output.workgroupName),
2999
- };
2273
+ return take(output, {
2274
+ baseCapacity: __expectInt32,
2275
+ configParameters: _json,
2276
+ creationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2277
+ endpoint: _json,
2278
+ enhancedVpcRouting: __expectBoolean,
2279
+ namespaceName: __expectString,
2280
+ port: __expectInt32,
2281
+ publiclyAccessible: __expectBoolean,
2282
+ securityGroupIds: _json,
2283
+ status: __expectString,
2284
+ subnetIds: _json,
2285
+ workgroupArn: __expectString,
2286
+ workgroupId: __expectString,
2287
+ workgroupName: __expectString,
2288
+ });
3000
2289
  };
3001
2290
  const de_WorkgroupList = (output, context) => {
3002
2291
  const retVal = (output || [])
3003
2292
  .filter((e) => e != null)
3004
2293
  .map((entry) => {
3005
- if (entry === null) {
3006
- return null;
3007
- }
3008
2294
  return de_Workgroup(entry, context);
3009
2295
  });
3010
2296
  return retVal;
@@ -3022,6 +2308,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
3022
2308
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3023
2309
  };
3024
2310
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2311
+ const throwDefaultError = withBaseException(__BaseException);
3025
2312
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3026
2313
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3027
2314
  const contents = {