@aws-sdk/client-redshift-serverless 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,365 +1,245 @@
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
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "RedshiftServerless.ConvertRecoveryPointToSnapshot",
9
- };
6
+ const headers = sharedHeaders("ConvertRecoveryPointToSnapshot");
10
7
  let body;
11
- body = JSON.stringify(se_ConvertRecoveryPointToSnapshotRequest(input, context));
8
+ body = JSON.stringify(_json(input));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CreateEndpointAccessCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "RedshiftServerless.CreateEndpointAccess",
18
- };
12
+ const headers = sharedHeaders("CreateEndpointAccess");
19
13
  let body;
20
- body = JSON.stringify(se_CreateEndpointAccessRequest(input, context));
14
+ body = JSON.stringify(_json(input));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_CreateNamespaceCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "RedshiftServerless.CreateNamespace",
27
- };
18
+ const headers = sharedHeaders("CreateNamespace");
28
19
  let body;
29
- body = JSON.stringify(se_CreateNamespaceRequest(input, context));
20
+ body = JSON.stringify(_json(input));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_CreateSnapshotCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "RedshiftServerless.CreateSnapshot",
36
- };
24
+ const headers = sharedHeaders("CreateSnapshot");
37
25
  let body;
38
- body = JSON.stringify(se_CreateSnapshotRequest(input, context));
26
+ body = JSON.stringify(_json(input));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_CreateUsageLimitCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "RedshiftServerless.CreateUsageLimit",
45
- };
30
+ const headers = sharedHeaders("CreateUsageLimit");
46
31
  let body;
47
- body = JSON.stringify(se_CreateUsageLimitRequest(input, context));
32
+ body = JSON.stringify(_json(input));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_CreateWorkgroupCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "RedshiftServerless.CreateWorkgroup",
54
- };
36
+ const headers = sharedHeaders("CreateWorkgroup");
55
37
  let body;
56
- body = JSON.stringify(se_CreateWorkgroupRequest(input, context));
38
+ body = JSON.stringify(_json(input));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_DeleteEndpointAccessCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "RedshiftServerless.DeleteEndpointAccess",
63
- };
42
+ const headers = sharedHeaders("DeleteEndpointAccess");
64
43
  let body;
65
- body = JSON.stringify(se_DeleteEndpointAccessRequest(input, context));
44
+ body = JSON.stringify(_json(input));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DeleteNamespaceCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "RedshiftServerless.DeleteNamespace",
72
- };
48
+ const headers = sharedHeaders("DeleteNamespace");
73
49
  let body;
74
- body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
50
+ body = JSON.stringify(_json(input));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DeleteResourcePolicyCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "RedshiftServerless.DeleteResourcePolicy",
81
- };
54
+ const headers = sharedHeaders("DeleteResourcePolicy");
82
55
  let body;
83
- body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
56
+ body = JSON.stringify(_json(input));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_DeleteSnapshotCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "RedshiftServerless.DeleteSnapshot",
90
- };
60
+ const headers = sharedHeaders("DeleteSnapshot");
91
61
  let body;
92
- body = JSON.stringify(se_DeleteSnapshotRequest(input, context));
62
+ body = JSON.stringify(_json(input));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_DeleteUsageLimitCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "RedshiftServerless.DeleteUsageLimit",
99
- };
66
+ const headers = sharedHeaders("DeleteUsageLimit");
100
67
  let body;
101
- body = JSON.stringify(se_DeleteUsageLimitRequest(input, context));
68
+ body = JSON.stringify(_json(input));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_DeleteWorkgroupCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "RedshiftServerless.DeleteWorkgroup",
108
- };
72
+ const headers = sharedHeaders("DeleteWorkgroup");
109
73
  let body;
110
- body = JSON.stringify(se_DeleteWorkgroupRequest(input, context));
74
+ body = JSON.stringify(_json(input));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_GetCredentialsCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "RedshiftServerless.GetCredentials",
117
- };
78
+ const headers = sharedHeaders("GetCredentials");
118
79
  let body;
119
- body = JSON.stringify(se_GetCredentialsRequest(input, context));
80
+ body = JSON.stringify(_json(input));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_GetEndpointAccessCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "RedshiftServerless.GetEndpointAccess",
126
- };
84
+ const headers = sharedHeaders("GetEndpointAccess");
127
85
  let body;
128
- body = JSON.stringify(se_GetEndpointAccessRequest(input, context));
86
+ body = JSON.stringify(_json(input));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_GetNamespaceCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "RedshiftServerless.GetNamespace",
135
- };
90
+ const headers = sharedHeaders("GetNamespace");
136
91
  let body;
137
- body = JSON.stringify(se_GetNamespaceRequest(input, context));
92
+ body = JSON.stringify(_json(input));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_GetRecoveryPointCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "RedshiftServerless.GetRecoveryPoint",
144
- };
96
+ const headers = sharedHeaders("GetRecoveryPoint");
145
97
  let body;
146
- body = JSON.stringify(se_GetRecoveryPointRequest(input, context));
98
+ body = JSON.stringify(_json(input));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_GetResourcePolicyCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "RedshiftServerless.GetResourcePolicy",
153
- };
102
+ const headers = sharedHeaders("GetResourcePolicy");
154
103
  let body;
155
- body = JSON.stringify(se_GetResourcePolicyRequest(input, context));
104
+ body = JSON.stringify(_json(input));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_GetSnapshotCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "RedshiftServerless.GetSnapshot",
162
- };
108
+ const headers = sharedHeaders("GetSnapshot");
163
109
  let body;
164
- body = JSON.stringify(se_GetSnapshotRequest(input, context));
110
+ body = JSON.stringify(_json(input));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_GetTableRestoreStatusCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "RedshiftServerless.GetTableRestoreStatus",
171
- };
114
+ const headers = sharedHeaders("GetTableRestoreStatus");
172
115
  let body;
173
- body = JSON.stringify(se_GetTableRestoreStatusRequest(input, context));
116
+ body = JSON.stringify(_json(input));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_GetUsageLimitCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "RedshiftServerless.GetUsageLimit",
180
- };
120
+ const headers = sharedHeaders("GetUsageLimit");
181
121
  let body;
182
- body = JSON.stringify(se_GetUsageLimitRequest(input, context));
122
+ body = JSON.stringify(_json(input));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_GetWorkgroupCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "RedshiftServerless.GetWorkgroup",
189
- };
126
+ const headers = sharedHeaders("GetWorkgroup");
190
127
  let body;
191
- body = JSON.stringify(se_GetWorkgroupRequest(input, context));
128
+ body = JSON.stringify(_json(input));
192
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
130
  };
194
131
  export const se_ListEndpointAccessCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "RedshiftServerless.ListEndpointAccess",
198
- };
132
+ const headers = sharedHeaders("ListEndpointAccess");
199
133
  let body;
200
- body = JSON.stringify(se_ListEndpointAccessRequest(input, context));
134
+ body = JSON.stringify(_json(input));
201
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
136
  };
203
137
  export const se_ListNamespacesCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "RedshiftServerless.ListNamespaces",
207
- };
138
+ const headers = sharedHeaders("ListNamespaces");
208
139
  let body;
209
- body = JSON.stringify(se_ListNamespacesRequest(input, context));
140
+ body = JSON.stringify(_json(input));
210
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
142
  };
212
143
  export const se_ListRecoveryPointsCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "RedshiftServerless.ListRecoveryPoints",
216
- };
144
+ const headers = sharedHeaders("ListRecoveryPoints");
217
145
  let body;
218
146
  body = JSON.stringify(se_ListRecoveryPointsRequest(input, context));
219
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
148
  };
221
149
  export const se_ListSnapshotsCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "RedshiftServerless.ListSnapshots",
225
- };
150
+ const headers = sharedHeaders("ListSnapshots");
226
151
  let body;
227
152
  body = JSON.stringify(se_ListSnapshotsRequest(input, context));
228
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
154
  };
230
155
  export const se_ListTableRestoreStatusCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "RedshiftServerless.ListTableRestoreStatus",
234
- };
156
+ const headers = sharedHeaders("ListTableRestoreStatus");
235
157
  let body;
236
- body = JSON.stringify(se_ListTableRestoreStatusRequest(input, context));
158
+ body = JSON.stringify(_json(input));
237
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
160
  };
239
161
  export const se_ListTagsForResourceCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "RedshiftServerless.ListTagsForResource",
243
- };
162
+ const headers = sharedHeaders("ListTagsForResource");
244
163
  let body;
245
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
164
+ body = JSON.stringify(_json(input));
246
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
166
  };
248
167
  export const se_ListUsageLimitsCommand = async (input, context) => {
249
- const headers = {
250
- "content-type": "application/x-amz-json-1.1",
251
- "x-amz-target": "RedshiftServerless.ListUsageLimits",
252
- };
168
+ const headers = sharedHeaders("ListUsageLimits");
253
169
  let body;
254
- body = JSON.stringify(se_ListUsageLimitsRequest(input, context));
170
+ body = JSON.stringify(_json(input));
255
171
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
256
172
  };
257
173
  export const se_ListWorkgroupsCommand = async (input, context) => {
258
- const headers = {
259
- "content-type": "application/x-amz-json-1.1",
260
- "x-amz-target": "RedshiftServerless.ListWorkgroups",
261
- };
174
+ const headers = sharedHeaders("ListWorkgroups");
262
175
  let body;
263
- body = JSON.stringify(se_ListWorkgroupsRequest(input, context));
176
+ body = JSON.stringify(_json(input));
264
177
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
178
  };
266
179
  export const se_PutResourcePolicyCommand = async (input, context) => {
267
- const headers = {
268
- "content-type": "application/x-amz-json-1.1",
269
- "x-amz-target": "RedshiftServerless.PutResourcePolicy",
270
- };
180
+ const headers = sharedHeaders("PutResourcePolicy");
271
181
  let body;
272
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
182
+ body = JSON.stringify(_json(input));
273
183
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
184
  };
275
185
  export const se_RestoreFromRecoveryPointCommand = async (input, context) => {
276
- const headers = {
277
- "content-type": "application/x-amz-json-1.1",
278
- "x-amz-target": "RedshiftServerless.RestoreFromRecoveryPoint",
279
- };
186
+ const headers = sharedHeaders("RestoreFromRecoveryPoint");
280
187
  let body;
281
- body = JSON.stringify(se_RestoreFromRecoveryPointRequest(input, context));
188
+ body = JSON.stringify(_json(input));
282
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
283
190
  };
284
191
  export const se_RestoreFromSnapshotCommand = async (input, context) => {
285
- const headers = {
286
- "content-type": "application/x-amz-json-1.1",
287
- "x-amz-target": "RedshiftServerless.RestoreFromSnapshot",
288
- };
192
+ const headers = sharedHeaders("RestoreFromSnapshot");
289
193
  let body;
290
- body = JSON.stringify(se_RestoreFromSnapshotRequest(input, context));
194
+ body = JSON.stringify(_json(input));
291
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
292
196
  };
293
197
  export const se_RestoreTableFromSnapshotCommand = async (input, context) => {
294
- const headers = {
295
- "content-type": "application/x-amz-json-1.1",
296
- "x-amz-target": "RedshiftServerless.RestoreTableFromSnapshot",
297
- };
198
+ const headers = sharedHeaders("RestoreTableFromSnapshot");
298
199
  let body;
299
- body = JSON.stringify(se_RestoreTableFromSnapshotRequest(input, context));
200
+ body = JSON.stringify(_json(input));
300
201
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
202
  };
302
203
  export const se_TagResourceCommand = async (input, context) => {
303
- const headers = {
304
- "content-type": "application/x-amz-json-1.1",
305
- "x-amz-target": "RedshiftServerless.TagResource",
306
- };
204
+ const headers = sharedHeaders("TagResource");
307
205
  let body;
308
- body = JSON.stringify(se_TagResourceRequest(input, context));
206
+ body = JSON.stringify(_json(input));
309
207
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
310
208
  };
311
209
  export const se_UntagResourceCommand = async (input, context) => {
312
- const headers = {
313
- "content-type": "application/x-amz-json-1.1",
314
- "x-amz-target": "RedshiftServerless.UntagResource",
315
- };
210
+ const headers = sharedHeaders("UntagResource");
316
211
  let body;
317
- body = JSON.stringify(se_UntagResourceRequest(input, context));
212
+ body = JSON.stringify(_json(input));
318
213
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
319
214
  };
320
215
  export const se_UpdateEndpointAccessCommand = async (input, context) => {
321
- const headers = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "RedshiftServerless.UpdateEndpointAccess",
324
- };
216
+ const headers = sharedHeaders("UpdateEndpointAccess");
325
217
  let body;
326
- body = JSON.stringify(se_UpdateEndpointAccessRequest(input, context));
218
+ body = JSON.stringify(_json(input));
327
219
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
220
  };
329
221
  export const se_UpdateNamespaceCommand = async (input, context) => {
330
- const headers = {
331
- "content-type": "application/x-amz-json-1.1",
332
- "x-amz-target": "RedshiftServerless.UpdateNamespace",
333
- };
222
+ const headers = sharedHeaders("UpdateNamespace");
334
223
  let body;
335
- body = JSON.stringify(se_UpdateNamespaceRequest(input, context));
224
+ body = JSON.stringify(_json(input));
336
225
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
337
226
  };
338
227
  export const se_UpdateSnapshotCommand = async (input, context) => {
339
- const headers = {
340
- "content-type": "application/x-amz-json-1.1",
341
- "x-amz-target": "RedshiftServerless.UpdateSnapshot",
342
- };
228
+ const headers = sharedHeaders("UpdateSnapshot");
343
229
  let body;
344
- body = JSON.stringify(se_UpdateSnapshotRequest(input, context));
230
+ body = JSON.stringify(_json(input));
345
231
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
346
232
  };
347
233
  export const se_UpdateUsageLimitCommand = async (input, context) => {
348
- const headers = {
349
- "content-type": "application/x-amz-json-1.1",
350
- "x-amz-target": "RedshiftServerless.UpdateUsageLimit",
351
- };
234
+ const headers = sharedHeaders("UpdateUsageLimit");
352
235
  let body;
353
- body = JSON.stringify(se_UpdateUsageLimitRequest(input, context));
236
+ body = JSON.stringify(_json(input));
354
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
355
238
  };
356
239
  export const se_UpdateWorkgroupCommand = async (input, context) => {
357
- const headers = {
358
- "content-type": "application/x-amz-json-1.1",
359
- "x-amz-target": "RedshiftServerless.UpdateWorkgroup",
360
- };
240
+ const headers = sharedHeaders("UpdateWorkgroup");
361
241
  let body;
362
- body = JSON.stringify(se_UpdateWorkgroupRequest(input, context));
242
+ body = JSON.stringify(_json(input));
363
243
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
364
244
  };
365
245
  export const de_ConvertRecoveryPointToSnapshotCommand = async (output, context) => {
@@ -373,7 +253,7 @@ export const de_ConvertRecoveryPointToSnapshotCommand = async (output, context)
373
253
  $metadata: deserializeMetadata(output),
374
254
  ...contents,
375
255
  };
376
- return Promise.resolve(response);
256
+ return response;
377
257
  };
378
258
  const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) => {
379
259
  const parsedOutput = {
@@ -402,10 +282,9 @@ const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) =>
402
282
  throw await de_ValidationExceptionRes(parsedOutput, context);
403
283
  default:
404
284
  const parsedBody = parsedOutput.body;
405
- throwDefaultError({
285
+ return throwDefaultError({
406
286
  output,
407
287
  parsedBody,
408
- exceptionCtor: __BaseException,
409
288
  errorCode,
410
289
  });
411
290
  }
@@ -421,7 +300,7 @@ export const de_CreateEndpointAccessCommand = async (output, context) => {
421
300
  $metadata: deserializeMetadata(output),
422
301
  ...contents,
423
302
  };
424
- return Promise.resolve(response);
303
+ return response;
425
304
  };
426
305
  const de_CreateEndpointAccessCommandError = async (output, context) => {
427
306
  const parsedOutput = {
@@ -450,10 +329,9 @@ const de_CreateEndpointAccessCommandError = async (output, context) => {
450
329
  throw await de_ValidationExceptionRes(parsedOutput, context);
451
330
  default:
452
331
  const parsedBody = parsedOutput.body;
453
- throwDefaultError({
332
+ return throwDefaultError({
454
333
  output,
455
334
  parsedBody,
456
- exceptionCtor: __BaseException,
457
335
  errorCode,
458
336
  });
459
337
  }
@@ -469,7 +347,7 @@ export const de_CreateNamespaceCommand = async (output, context) => {
469
347
  $metadata: deserializeMetadata(output),
470
348
  ...contents,
471
349
  };
472
- return Promise.resolve(response);
350
+ return response;
473
351
  };
474
352
  const de_CreateNamespaceCommandError = async (output, context) => {
475
353
  const parsedOutput = {
@@ -492,10 +370,9 @@ const de_CreateNamespaceCommandError = async (output, context) => {
492
370
  throw await de_ValidationExceptionRes(parsedOutput, context);
493
371
  default:
494
372
  const parsedBody = parsedOutput.body;
495
- throwDefaultError({
373
+ return throwDefaultError({
496
374
  output,
497
375
  parsedBody,
498
- exceptionCtor: __BaseException,
499
376
  errorCode,
500
377
  });
501
378
  }
@@ -511,7 +388,7 @@ export const de_CreateSnapshotCommand = async (output, context) => {
511
388
  $metadata: deserializeMetadata(output),
512
389
  ...contents,
513
390
  };
514
- return Promise.resolve(response);
391
+ return response;
515
392
  };
516
393
  const de_CreateSnapshotCommandError = async (output, context) => {
517
394
  const parsedOutput = {
@@ -540,10 +417,9 @@ const de_CreateSnapshotCommandError = async (output, context) => {
540
417
  throw await de_ValidationExceptionRes(parsedOutput, context);
541
418
  default:
542
419
  const parsedBody = parsedOutput.body;
543
- throwDefaultError({
420
+ return throwDefaultError({
544
421
  output,
545
422
  parsedBody,
546
- exceptionCtor: __BaseException,
547
423
  errorCode,
548
424
  });
549
425
  }
@@ -554,12 +430,12 @@ export const de_CreateUsageLimitCommand = async (output, context) => {
554
430
  }
555
431
  const data = await parseBody(output.body, context);
556
432
  let contents = {};
557
- contents = de_CreateUsageLimitResponse(data, context);
433
+ contents = _json(data);
558
434
  const response = {
559
435
  $metadata: deserializeMetadata(output),
560
436
  ...contents,
561
437
  };
562
- return Promise.resolve(response);
438
+ return response;
563
439
  };
564
440
  const de_CreateUsageLimitCommandError = async (output, context) => {
565
441
  const parsedOutput = {
@@ -585,10 +461,9 @@ const de_CreateUsageLimitCommandError = async (output, context) => {
585
461
  throw await de_ValidationExceptionRes(parsedOutput, context);
586
462
  default:
587
463
  const parsedBody = parsedOutput.body;
588
- throwDefaultError({
464
+ return throwDefaultError({
589
465
  output,
590
466
  parsedBody,
591
- exceptionCtor: __BaseException,
592
467
  errorCode,
593
468
  });
594
469
  }
@@ -604,7 +479,7 @@ export const de_CreateWorkgroupCommand = async (output, context) => {
604
479
  $metadata: deserializeMetadata(output),
605
480
  ...contents,
606
481
  };
607
- return Promise.resolve(response);
482
+ return response;
608
483
  };
609
484
  const de_CreateWorkgroupCommandError = async (output, context) => {
610
485
  const parsedOutput = {
@@ -633,10 +508,9 @@ const de_CreateWorkgroupCommandError = async (output, context) => {
633
508
  throw await de_ValidationExceptionRes(parsedOutput, context);
634
509
  default:
635
510
  const parsedBody = parsedOutput.body;
636
- throwDefaultError({
511
+ return throwDefaultError({
637
512
  output,
638
513
  parsedBody,
639
- exceptionCtor: __BaseException,
640
514
  errorCode,
641
515
  });
642
516
  }
@@ -652,7 +526,7 @@ export const de_DeleteEndpointAccessCommand = async (output, context) => {
652
526
  $metadata: deserializeMetadata(output),
653
527
  ...contents,
654
528
  };
655
- return Promise.resolve(response);
529
+ return response;
656
530
  };
657
531
  const de_DeleteEndpointAccessCommandError = async (output, context) => {
658
532
  const parsedOutput = {
@@ -675,10 +549,9 @@ const de_DeleteEndpointAccessCommandError = async (output, context) => {
675
549
  throw await de_ValidationExceptionRes(parsedOutput, context);
676
550
  default:
677
551
  const parsedBody = parsedOutput.body;
678
- throwDefaultError({
552
+ return throwDefaultError({
679
553
  output,
680
554
  parsedBody,
681
- exceptionCtor: __BaseException,
682
555
  errorCode,
683
556
  });
684
557
  }
@@ -694,7 +567,7 @@ export const de_DeleteNamespaceCommand = async (output, context) => {
694
567
  $metadata: deserializeMetadata(output),
695
568
  ...contents,
696
569
  };
697
- return Promise.resolve(response);
570
+ return response;
698
571
  };
699
572
  const de_DeleteNamespaceCommandError = async (output, context) => {
700
573
  const parsedOutput = {
@@ -717,10 +590,9 @@ const de_DeleteNamespaceCommandError = async (output, context) => {
717
590
  throw await de_ValidationExceptionRes(parsedOutput, context);
718
591
  default:
719
592
  const parsedBody = parsedOutput.body;
720
- throwDefaultError({
593
+ return throwDefaultError({
721
594
  output,
722
595
  parsedBody,
723
- exceptionCtor: __BaseException,
724
596
  errorCode,
725
597
  });
726
598
  }
@@ -731,12 +603,12 @@ export const de_DeleteResourcePolicyCommand = async (output, context) => {
731
603
  }
732
604
  const data = await parseBody(output.body, context);
733
605
  let contents = {};
734
- contents = de_DeleteResourcePolicyResponse(data, context);
606
+ contents = _json(data);
735
607
  const response = {
736
608
  $metadata: deserializeMetadata(output),
737
609
  ...contents,
738
610
  };
739
- return Promise.resolve(response);
611
+ return response;
740
612
  };
741
613
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
742
614
  const parsedOutput = {
@@ -756,10 +628,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
756
628
  throw await de_ValidationExceptionRes(parsedOutput, context);
757
629
  default:
758
630
  const parsedBody = parsedOutput.body;
759
- throwDefaultError({
631
+ return throwDefaultError({
760
632
  output,
761
633
  parsedBody,
762
- exceptionCtor: __BaseException,
763
634
  errorCode,
764
635
  });
765
636
  }
@@ -775,7 +646,7 @@ export const de_DeleteSnapshotCommand = async (output, context) => {
775
646
  $metadata: deserializeMetadata(output),
776
647
  ...contents,
777
648
  };
778
- return Promise.resolve(response);
649
+ return response;
779
650
  };
780
651
  const de_DeleteSnapshotCommandError = async (output, context) => {
781
652
  const parsedOutput = {
@@ -798,10 +669,9 @@ const de_DeleteSnapshotCommandError = async (output, context) => {
798
669
  throw await de_ValidationExceptionRes(parsedOutput, context);
799
670
  default:
800
671
  const parsedBody = parsedOutput.body;
801
- throwDefaultError({
672
+ return throwDefaultError({
802
673
  output,
803
674
  parsedBody,
804
- exceptionCtor: __BaseException,
805
675
  errorCode,
806
676
  });
807
677
  }
@@ -812,12 +682,12 @@ export const de_DeleteUsageLimitCommand = async (output, context) => {
812
682
  }
813
683
  const data = await parseBody(output.body, context);
814
684
  let contents = {};
815
- contents = de_DeleteUsageLimitResponse(data, context);
685
+ contents = _json(data);
816
686
  const response = {
817
687
  $metadata: deserializeMetadata(output),
818
688
  ...contents,
819
689
  };
820
- return Promise.resolve(response);
690
+ return response;
821
691
  };
822
692
  const de_DeleteUsageLimitCommandError = async (output, context) => {
823
693
  const parsedOutput = {
@@ -840,10 +710,9 @@ const de_DeleteUsageLimitCommandError = async (output, context) => {
840
710
  throw await de_ValidationExceptionRes(parsedOutput, context);
841
711
  default:
842
712
  const parsedBody = parsedOutput.body;
843
- throwDefaultError({
713
+ return throwDefaultError({
844
714
  output,
845
715
  parsedBody,
846
- exceptionCtor: __BaseException,
847
716
  errorCode,
848
717
  });
849
718
  }
@@ -859,7 +728,7 @@ export const de_DeleteWorkgroupCommand = async (output, context) => {
859
728
  $metadata: deserializeMetadata(output),
860
729
  ...contents,
861
730
  };
862
- return Promise.resolve(response);
731
+ return response;
863
732
  };
864
733
  const de_DeleteWorkgroupCommandError = async (output, context) => {
865
734
  const parsedOutput = {
@@ -882,10 +751,9 @@ const de_DeleteWorkgroupCommandError = async (output, context) => {
882
751
  throw await de_ValidationExceptionRes(parsedOutput, context);
883
752
  default:
884
753
  const parsedBody = parsedOutput.body;
885
- throwDefaultError({
754
+ return throwDefaultError({
886
755
  output,
887
756
  parsedBody,
888
- exceptionCtor: __BaseException,
889
757
  errorCode,
890
758
  });
891
759
  }
@@ -901,7 +769,7 @@ export const de_GetCredentialsCommand = async (output, context) => {
901
769
  $metadata: deserializeMetadata(output),
902
770
  ...contents,
903
771
  };
904
- return Promise.resolve(response);
772
+ return response;
905
773
  };
906
774
  const de_GetCredentialsCommandError = async (output, context) => {
907
775
  const parsedOutput = {
@@ -921,10 +789,9 @@ const de_GetCredentialsCommandError = async (output, context) => {
921
789
  throw await de_ValidationExceptionRes(parsedOutput, context);
922
790
  default:
923
791
  const parsedBody = parsedOutput.body;
924
- throwDefaultError({
792
+ return throwDefaultError({
925
793
  output,
926
794
  parsedBody,
927
- exceptionCtor: __BaseException,
928
795
  errorCode,
929
796
  });
930
797
  }
@@ -940,7 +807,7 @@ export const de_GetEndpointAccessCommand = async (output, context) => {
940
807
  $metadata: deserializeMetadata(output),
941
808
  ...contents,
942
809
  };
943
- return Promise.resolve(response);
810
+ return response;
944
811
  };
945
812
  const de_GetEndpointAccessCommandError = async (output, context) => {
946
813
  const parsedOutput = {
@@ -963,10 +830,9 @@ const de_GetEndpointAccessCommandError = async (output, context) => {
963
830
  throw await de_ValidationExceptionRes(parsedOutput, context);
964
831
  default:
965
832
  const parsedBody = parsedOutput.body;
966
- throwDefaultError({
833
+ return throwDefaultError({
967
834
  output,
968
835
  parsedBody,
969
- exceptionCtor: __BaseException,
970
836
  errorCode,
971
837
  });
972
838
  }
@@ -982,7 +848,7 @@ export const de_GetNamespaceCommand = async (output, context) => {
982
848
  $metadata: deserializeMetadata(output),
983
849
  ...contents,
984
850
  };
985
- return Promise.resolve(response);
851
+ return response;
986
852
  };
987
853
  const de_GetNamespaceCommandError = async (output, context) => {
988
854
  const parsedOutput = {
@@ -1002,10 +868,9 @@ const de_GetNamespaceCommandError = async (output, context) => {
1002
868
  throw await de_ValidationExceptionRes(parsedOutput, context);
1003
869
  default:
1004
870
  const parsedBody = parsedOutput.body;
1005
- throwDefaultError({
871
+ return throwDefaultError({
1006
872
  output,
1007
873
  parsedBody,
1008
- exceptionCtor: __BaseException,
1009
874
  errorCode,
1010
875
  });
1011
876
  }
@@ -1021,7 +886,7 @@ export const de_GetRecoveryPointCommand = async (output, context) => {
1021
886
  $metadata: deserializeMetadata(output),
1022
887
  ...contents,
1023
888
  };
1024
- return Promise.resolve(response);
889
+ return response;
1025
890
  };
1026
891
  const de_GetRecoveryPointCommandError = async (output, context) => {
1027
892
  const parsedOutput = {
@@ -1044,10 +909,9 @@ const de_GetRecoveryPointCommandError = async (output, context) => {
1044
909
  throw await de_ValidationExceptionRes(parsedOutput, context);
1045
910
  default:
1046
911
  const parsedBody = parsedOutput.body;
1047
- throwDefaultError({
912
+ return throwDefaultError({
1048
913
  output,
1049
914
  parsedBody,
1050
- exceptionCtor: __BaseException,
1051
915
  errorCode,
1052
916
  });
1053
917
  }
@@ -1058,12 +922,12 @@ export const de_GetResourcePolicyCommand = async (output, context) => {
1058
922
  }
1059
923
  const data = await parseBody(output.body, context);
1060
924
  let contents = {};
1061
- contents = de_GetResourcePolicyResponse(data, context);
925
+ contents = _json(data);
1062
926
  const response = {
1063
927
  $metadata: deserializeMetadata(output),
1064
928
  ...contents,
1065
929
  };
1066
- return Promise.resolve(response);
930
+ return response;
1067
931
  };
1068
932
  const de_GetResourcePolicyCommandError = async (output, context) => {
1069
933
  const parsedOutput = {
@@ -1083,10 +947,9 @@ const de_GetResourcePolicyCommandError = async (output, context) => {
1083
947
  throw await de_ValidationExceptionRes(parsedOutput, context);
1084
948
  default:
1085
949
  const parsedBody = parsedOutput.body;
1086
- throwDefaultError({
950
+ return throwDefaultError({
1087
951
  output,
1088
952
  parsedBody,
1089
- exceptionCtor: __BaseException,
1090
953
  errorCode,
1091
954
  });
1092
955
  }
@@ -1102,7 +965,7 @@ export const de_GetSnapshotCommand = async (output, context) => {
1102
965
  $metadata: deserializeMetadata(output),
1103
966
  ...contents,
1104
967
  };
1105
- return Promise.resolve(response);
968
+ return response;
1106
969
  };
1107
970
  const de_GetSnapshotCommandError = async (output, context) => {
1108
971
  const parsedOutput = {
@@ -1122,10 +985,9 @@ const de_GetSnapshotCommandError = async (output, context) => {
1122
985
  throw await de_ValidationExceptionRes(parsedOutput, context);
1123
986
  default:
1124
987
  const parsedBody = parsedOutput.body;
1125
- throwDefaultError({
988
+ return throwDefaultError({
1126
989
  output,
1127
990
  parsedBody,
1128
- exceptionCtor: __BaseException,
1129
991
  errorCode,
1130
992
  });
1131
993
  }
@@ -1141,7 +1003,7 @@ export const de_GetTableRestoreStatusCommand = async (output, context) => {
1141
1003
  $metadata: deserializeMetadata(output),
1142
1004
  ...contents,
1143
1005
  };
1144
- return Promise.resolve(response);
1006
+ return response;
1145
1007
  };
1146
1008
  const de_GetTableRestoreStatusCommandError = async (output, context) => {
1147
1009
  const parsedOutput = {
@@ -1158,10 +1020,9 @@ const de_GetTableRestoreStatusCommandError = async (output, context) => {
1158
1020
  throw await de_ValidationExceptionRes(parsedOutput, context);
1159
1021
  default:
1160
1022
  const parsedBody = parsedOutput.body;
1161
- throwDefaultError({
1023
+ return throwDefaultError({
1162
1024
  output,
1163
1025
  parsedBody,
1164
- exceptionCtor: __BaseException,
1165
1026
  errorCode,
1166
1027
  });
1167
1028
  }
@@ -1172,12 +1033,12 @@ export const de_GetUsageLimitCommand = async (output, context) => {
1172
1033
  }
1173
1034
  const data = await parseBody(output.body, context);
1174
1035
  let contents = {};
1175
- contents = de_GetUsageLimitResponse(data, context);
1036
+ contents = _json(data);
1176
1037
  const response = {
1177
1038
  $metadata: deserializeMetadata(output),
1178
1039
  ...contents,
1179
1040
  };
1180
- return Promise.resolve(response);
1041
+ return response;
1181
1042
  };
1182
1043
  const de_GetUsageLimitCommandError = async (output, context) => {
1183
1044
  const parsedOutput = {
@@ -1200,10 +1061,9 @@ const de_GetUsageLimitCommandError = async (output, context) => {
1200
1061
  throw await de_ValidationExceptionRes(parsedOutput, context);
1201
1062
  default:
1202
1063
  const parsedBody = parsedOutput.body;
1203
- throwDefaultError({
1064
+ return throwDefaultError({
1204
1065
  output,
1205
1066
  parsedBody,
1206
- exceptionCtor: __BaseException,
1207
1067
  errorCode,
1208
1068
  });
1209
1069
  }
@@ -1219,7 +1079,7 @@ export const de_GetWorkgroupCommand = async (output, context) => {
1219
1079
  $metadata: deserializeMetadata(output),
1220
1080
  ...contents,
1221
1081
  };
1222
- return Promise.resolve(response);
1082
+ return response;
1223
1083
  };
1224
1084
  const de_GetWorkgroupCommandError = async (output, context) => {
1225
1085
  const parsedOutput = {
@@ -1239,10 +1099,9 @@ const de_GetWorkgroupCommandError = async (output, context) => {
1239
1099
  throw await de_ValidationExceptionRes(parsedOutput, context);
1240
1100
  default:
1241
1101
  const parsedBody = parsedOutput.body;
1242
- throwDefaultError({
1102
+ return throwDefaultError({
1243
1103
  output,
1244
1104
  parsedBody,
1245
- exceptionCtor: __BaseException,
1246
1105
  errorCode,
1247
1106
  });
1248
1107
  }
@@ -1258,7 +1117,7 @@ export const de_ListEndpointAccessCommand = async (output, context) => {
1258
1117
  $metadata: deserializeMetadata(output),
1259
1118
  ...contents,
1260
1119
  };
1261
- return Promise.resolve(response);
1120
+ return response;
1262
1121
  };
1263
1122
  const de_ListEndpointAccessCommandError = async (output, context) => {
1264
1123
  const parsedOutput = {
@@ -1281,10 +1140,9 @@ const de_ListEndpointAccessCommandError = async (output, context) => {
1281
1140
  throw await de_ValidationExceptionRes(parsedOutput, context);
1282
1141
  default:
1283
1142
  const parsedBody = parsedOutput.body;
1284
- throwDefaultError({
1143
+ return throwDefaultError({
1285
1144
  output,
1286
1145
  parsedBody,
1287
- exceptionCtor: __BaseException,
1288
1146
  errorCode,
1289
1147
  });
1290
1148
  }
@@ -1300,7 +1158,7 @@ export const de_ListNamespacesCommand = async (output, context) => {
1300
1158
  $metadata: deserializeMetadata(output),
1301
1159
  ...contents,
1302
1160
  };
1303
- return Promise.resolve(response);
1161
+ return response;
1304
1162
  };
1305
1163
  const de_ListNamespacesCommandError = async (output, context) => {
1306
1164
  const parsedOutput = {
@@ -1317,10 +1175,9 @@ const de_ListNamespacesCommandError = async (output, context) => {
1317
1175
  throw await de_ValidationExceptionRes(parsedOutput, context);
1318
1176
  default:
1319
1177
  const parsedBody = parsedOutput.body;
1320
- throwDefaultError({
1178
+ return throwDefaultError({
1321
1179
  output,
1322
1180
  parsedBody,
1323
- exceptionCtor: __BaseException,
1324
1181
  errorCode,
1325
1182
  });
1326
1183
  }
@@ -1336,7 +1193,7 @@ export const de_ListRecoveryPointsCommand = async (output, context) => {
1336
1193
  $metadata: deserializeMetadata(output),
1337
1194
  ...contents,
1338
1195
  };
1339
- return Promise.resolve(response);
1196
+ return response;
1340
1197
  };
1341
1198
  const de_ListRecoveryPointsCommandError = async (output, context) => {
1342
1199
  const parsedOutput = {
@@ -1353,10 +1210,9 @@ const de_ListRecoveryPointsCommandError = async (output, context) => {
1353
1210
  throw await de_ValidationExceptionRes(parsedOutput, context);
1354
1211
  default:
1355
1212
  const parsedBody = parsedOutput.body;
1356
- throwDefaultError({
1213
+ return throwDefaultError({
1357
1214
  output,
1358
1215
  parsedBody,
1359
- exceptionCtor: __BaseException,
1360
1216
  errorCode,
1361
1217
  });
1362
1218
  }
@@ -1372,7 +1228,7 @@ export const de_ListSnapshotsCommand = async (output, context) => {
1372
1228
  $metadata: deserializeMetadata(output),
1373
1229
  ...contents,
1374
1230
  };
1375
- return Promise.resolve(response);
1231
+ return response;
1376
1232
  };
1377
1233
  const de_ListSnapshotsCommandError = async (output, context) => {
1378
1234
  const parsedOutput = {
@@ -1392,10 +1248,9 @@ const de_ListSnapshotsCommandError = async (output, context) => {
1392
1248
  throw await de_ValidationExceptionRes(parsedOutput, context);
1393
1249
  default:
1394
1250
  const parsedBody = parsedOutput.body;
1395
- throwDefaultError({
1251
+ return throwDefaultError({
1396
1252
  output,
1397
1253
  parsedBody,
1398
- exceptionCtor: __BaseException,
1399
1254
  errorCode,
1400
1255
  });
1401
1256
  }
@@ -1411,7 +1266,7 @@ export const de_ListTableRestoreStatusCommand = async (output, context) => {
1411
1266
  $metadata: deserializeMetadata(output),
1412
1267
  ...contents,
1413
1268
  };
1414
- return Promise.resolve(response);
1269
+ return response;
1415
1270
  };
1416
1271
  const de_ListTableRestoreStatusCommandError = async (output, context) => {
1417
1272
  const parsedOutput = {
@@ -1431,10 +1286,9 @@ const de_ListTableRestoreStatusCommandError = async (output, context) => {
1431
1286
  throw await de_ValidationExceptionRes(parsedOutput, context);
1432
1287
  default:
1433
1288
  const parsedBody = parsedOutput.body;
1434
- throwDefaultError({
1289
+ return throwDefaultError({
1435
1290
  output,
1436
1291
  parsedBody,
1437
- exceptionCtor: __BaseException,
1438
1292
  errorCode,
1439
1293
  });
1440
1294
  }
@@ -1445,12 +1299,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1445
1299
  }
1446
1300
  const data = await parseBody(output.body, context);
1447
1301
  let contents = {};
1448
- contents = de_ListTagsForResourceResponse(data, context);
1302
+ contents = _json(data);
1449
1303
  const response = {
1450
1304
  $metadata: deserializeMetadata(output),
1451
1305
  ...contents,
1452
1306
  };
1453
- return Promise.resolve(response);
1307
+ return response;
1454
1308
  };
1455
1309
  const de_ListTagsForResourceCommandError = async (output, context) => {
1456
1310
  const parsedOutput = {
@@ -1473,10 +1327,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1473
1327
  throw await de_ValidationExceptionRes(parsedOutput, context);
1474
1328
  default:
1475
1329
  const parsedBody = parsedOutput.body;
1476
- throwDefaultError({
1330
+ return throwDefaultError({
1477
1331
  output,
1478
1332
  parsedBody,
1479
- exceptionCtor: __BaseException,
1480
1333
  errorCode,
1481
1334
  });
1482
1335
  }
@@ -1487,12 +1340,12 @@ export const de_ListUsageLimitsCommand = async (output, context) => {
1487
1340
  }
1488
1341
  const data = await parseBody(output.body, context);
1489
1342
  let contents = {};
1490
- contents = de_ListUsageLimitsResponse(data, context);
1343
+ contents = _json(data);
1491
1344
  const response = {
1492
1345
  $metadata: deserializeMetadata(output),
1493
1346
  ...contents,
1494
1347
  };
1495
- return Promise.resolve(response);
1348
+ return response;
1496
1349
  };
1497
1350
  const de_ListUsageLimitsCommandError = async (output, context) => {
1498
1351
  const parsedOutput = {
@@ -1518,10 +1371,9 @@ const de_ListUsageLimitsCommandError = async (output, context) => {
1518
1371
  throw await de_ValidationExceptionRes(parsedOutput, context);
1519
1372
  default:
1520
1373
  const parsedBody = parsedOutput.body;
1521
- throwDefaultError({
1374
+ return throwDefaultError({
1522
1375
  output,
1523
1376
  parsedBody,
1524
- exceptionCtor: __BaseException,
1525
1377
  errorCode,
1526
1378
  });
1527
1379
  }
@@ -1537,7 +1389,7 @@ export const de_ListWorkgroupsCommand = async (output, context) => {
1537
1389
  $metadata: deserializeMetadata(output),
1538
1390
  ...contents,
1539
1391
  };
1540
- return Promise.resolve(response);
1392
+ return response;
1541
1393
  };
1542
1394
  const de_ListWorkgroupsCommandError = async (output, context) => {
1543
1395
  const parsedOutput = {
@@ -1554,10 +1406,9 @@ const de_ListWorkgroupsCommandError = async (output, context) => {
1554
1406
  throw await de_ValidationExceptionRes(parsedOutput, context);
1555
1407
  default:
1556
1408
  const parsedBody = parsedOutput.body;
1557
- throwDefaultError({
1409
+ return throwDefaultError({
1558
1410
  output,
1559
1411
  parsedBody,
1560
- exceptionCtor: __BaseException,
1561
1412
  errorCode,
1562
1413
  });
1563
1414
  }
@@ -1568,12 +1419,12 @@ export const de_PutResourcePolicyCommand = async (output, context) => {
1568
1419
  }
1569
1420
  const data = await parseBody(output.body, context);
1570
1421
  let contents = {};
1571
- contents = de_PutResourcePolicyResponse(data, context);
1422
+ contents = _json(data);
1572
1423
  const response = {
1573
1424
  $metadata: deserializeMetadata(output),
1574
1425
  ...contents,
1575
1426
  };
1576
- return Promise.resolve(response);
1427
+ return response;
1577
1428
  };
1578
1429
  const de_PutResourcePolicyCommandError = async (output, context) => {
1579
1430
  const parsedOutput = {
@@ -1599,10 +1450,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
1599
1450
  throw await de_ValidationExceptionRes(parsedOutput, context);
1600
1451
  default:
1601
1452
  const parsedBody = parsedOutput.body;
1602
- throwDefaultError({
1453
+ return throwDefaultError({
1603
1454
  output,
1604
1455
  parsedBody,
1605
- exceptionCtor: __BaseException,
1606
1456
  errorCode,
1607
1457
  });
1608
1458
  }
@@ -1618,7 +1468,7 @@ export const de_RestoreFromRecoveryPointCommand = async (output, context) => {
1618
1468
  $metadata: deserializeMetadata(output),
1619
1469
  ...contents,
1620
1470
  };
1621
- return Promise.resolve(response);
1471
+ return response;
1622
1472
  };
1623
1473
  const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
1624
1474
  const parsedOutput = {
@@ -1641,10 +1491,9 @@ const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
1641
1491
  throw await de_ValidationExceptionRes(parsedOutput, context);
1642
1492
  default:
1643
1493
  const parsedBody = parsedOutput.body;
1644
- throwDefaultError({
1494
+ return throwDefaultError({
1645
1495
  output,
1646
1496
  parsedBody,
1647
- exceptionCtor: __BaseException,
1648
1497
  errorCode,
1649
1498
  });
1650
1499
  }
@@ -1660,7 +1509,7 @@ export const de_RestoreFromSnapshotCommand = async (output, context) => {
1660
1509
  $metadata: deserializeMetadata(output),
1661
1510
  ...contents,
1662
1511
  };
1663
- return Promise.resolve(response);
1512
+ return response;
1664
1513
  };
1665
1514
  const de_RestoreFromSnapshotCommandError = async (output, context) => {
1666
1515
  const parsedOutput = {
@@ -1686,10 +1535,9 @@ const de_RestoreFromSnapshotCommandError = async (output, context) => {
1686
1535
  throw await de_ValidationExceptionRes(parsedOutput, context);
1687
1536
  default:
1688
1537
  const parsedBody = parsedOutput.body;
1689
- throwDefaultError({
1538
+ return throwDefaultError({
1690
1539
  output,
1691
1540
  parsedBody,
1692
- exceptionCtor: __BaseException,
1693
1541
  errorCode,
1694
1542
  });
1695
1543
  }
@@ -1705,7 +1553,7 @@ export const de_RestoreTableFromSnapshotCommand = async (output, context) => {
1705
1553
  $metadata: deserializeMetadata(output),
1706
1554
  ...contents,
1707
1555
  };
1708
- return Promise.resolve(response);
1556
+ return response;
1709
1557
  };
1710
1558
  const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
1711
1559
  const parsedOutput = {
@@ -1728,10 +1576,9 @@ const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
1728
1576
  throw await de_ValidationExceptionRes(parsedOutput, context);
1729
1577
  default:
1730
1578
  const parsedBody = parsedOutput.body;
1731
- throwDefaultError({
1579
+ return throwDefaultError({
1732
1580
  output,
1733
1581
  parsedBody,
1734
- exceptionCtor: __BaseException,
1735
1582
  errorCode,
1736
1583
  });
1737
1584
  }
@@ -1742,12 +1589,12 @@ export const de_TagResourceCommand = async (output, context) => {
1742
1589
  }
1743
1590
  const data = await parseBody(output.body, context);
1744
1591
  let contents = {};
1745
- contents = de_TagResourceResponse(data, context);
1592
+ contents = _json(data);
1746
1593
  const response = {
1747
1594
  $metadata: deserializeMetadata(output),
1748
1595
  ...contents,
1749
1596
  };
1750
- return Promise.resolve(response);
1597
+ return response;
1751
1598
  };
1752
1599
  const de_TagResourceCommandError = async (output, context) => {
1753
1600
  const parsedOutput = {
@@ -1773,10 +1620,9 @@ const de_TagResourceCommandError = async (output, context) => {
1773
1620
  throw await de_ValidationExceptionRes(parsedOutput, context);
1774
1621
  default:
1775
1622
  const parsedBody = parsedOutput.body;
1776
- throwDefaultError({
1623
+ return throwDefaultError({
1777
1624
  output,
1778
1625
  parsedBody,
1779
- exceptionCtor: __BaseException,
1780
1626
  errorCode,
1781
1627
  });
1782
1628
  }
@@ -1787,12 +1633,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1787
1633
  }
1788
1634
  const data = await parseBody(output.body, context);
1789
1635
  let contents = {};
1790
- contents = de_UntagResourceResponse(data, context);
1636
+ contents = _json(data);
1791
1637
  const response = {
1792
1638
  $metadata: deserializeMetadata(output),
1793
1639
  ...contents,
1794
1640
  };
1795
- return Promise.resolve(response);
1641
+ return response;
1796
1642
  };
1797
1643
  const de_UntagResourceCommandError = async (output, context) => {
1798
1644
  const parsedOutput = {
@@ -1815,10 +1661,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1815
1661
  throw await de_ValidationExceptionRes(parsedOutput, context);
1816
1662
  default:
1817
1663
  const parsedBody = parsedOutput.body;
1818
- throwDefaultError({
1664
+ return throwDefaultError({
1819
1665
  output,
1820
1666
  parsedBody,
1821
- exceptionCtor: __BaseException,
1822
1667
  errorCode,
1823
1668
  });
1824
1669
  }
@@ -1834,7 +1679,7 @@ export const de_UpdateEndpointAccessCommand = async (output, context) => {
1834
1679
  $metadata: deserializeMetadata(output),
1835
1680
  ...contents,
1836
1681
  };
1837
- return Promise.resolve(response);
1682
+ return response;
1838
1683
  };
1839
1684
  const de_UpdateEndpointAccessCommandError = async (output, context) => {
1840
1685
  const parsedOutput = {
@@ -1860,10 +1705,9 @@ const de_UpdateEndpointAccessCommandError = async (output, context) => {
1860
1705
  throw await de_ValidationExceptionRes(parsedOutput, context);
1861
1706
  default:
1862
1707
  const parsedBody = parsedOutput.body;
1863
- throwDefaultError({
1708
+ return throwDefaultError({
1864
1709
  output,
1865
1710
  parsedBody,
1866
- exceptionCtor: __BaseException,
1867
1711
  errorCode,
1868
1712
  });
1869
1713
  }
@@ -1879,7 +1723,7 @@ export const de_UpdateNamespaceCommand = async (output, context) => {
1879
1723
  $metadata: deserializeMetadata(output),
1880
1724
  ...contents,
1881
1725
  };
1882
- return Promise.resolve(response);
1726
+ return response;
1883
1727
  };
1884
1728
  const de_UpdateNamespaceCommandError = async (output, context) => {
1885
1729
  const parsedOutput = {
@@ -1902,10 +1746,9 @@ const de_UpdateNamespaceCommandError = async (output, context) => {
1902
1746
  throw await de_ValidationExceptionRes(parsedOutput, context);
1903
1747
  default:
1904
1748
  const parsedBody = parsedOutput.body;
1905
- throwDefaultError({
1749
+ return throwDefaultError({
1906
1750
  output,
1907
1751
  parsedBody,
1908
- exceptionCtor: __BaseException,
1909
1752
  errorCode,
1910
1753
  });
1911
1754
  }
@@ -1921,7 +1764,7 @@ export const de_UpdateSnapshotCommand = async (output, context) => {
1921
1764
  $metadata: deserializeMetadata(output),
1922
1765
  ...contents,
1923
1766
  };
1924
- return Promise.resolve(response);
1767
+ return response;
1925
1768
  };
1926
1769
  const de_UpdateSnapshotCommandError = async (output, context) => {
1927
1770
  const parsedOutput = {
@@ -1944,10 +1787,9 @@ const de_UpdateSnapshotCommandError = async (output, context) => {
1944
1787
  throw await de_ValidationExceptionRes(parsedOutput, context);
1945
1788
  default:
1946
1789
  const parsedBody = parsedOutput.body;
1947
- throwDefaultError({
1790
+ return throwDefaultError({
1948
1791
  output,
1949
1792
  parsedBody,
1950
- exceptionCtor: __BaseException,
1951
1793
  errorCode,
1952
1794
  });
1953
1795
  }
@@ -1958,12 +1800,12 @@ export const de_UpdateUsageLimitCommand = async (output, context) => {
1958
1800
  }
1959
1801
  const data = await parseBody(output.body, context);
1960
1802
  let contents = {};
1961
- contents = de_UpdateUsageLimitResponse(data, context);
1803
+ contents = _json(data);
1962
1804
  const response = {
1963
1805
  $metadata: deserializeMetadata(output),
1964
1806
  ...contents,
1965
1807
  };
1966
- return Promise.resolve(response);
1808
+ return response;
1967
1809
  };
1968
1810
  const de_UpdateUsageLimitCommandError = async (output, context) => {
1969
1811
  const parsedOutput = {
@@ -1986,10 +1828,9 @@ const de_UpdateUsageLimitCommandError = async (output, context) => {
1986
1828
  throw await de_ValidationExceptionRes(parsedOutput, context);
1987
1829
  default:
1988
1830
  const parsedBody = parsedOutput.body;
1989
- throwDefaultError({
1831
+ return throwDefaultError({
1990
1832
  output,
1991
1833
  parsedBody,
1992
- exceptionCtor: __BaseException,
1993
1834
  errorCode,
1994
1835
  });
1995
1836
  }
@@ -2005,7 +1846,7 @@ export const de_UpdateWorkgroupCommand = async (output, context) => {
2005
1846
  $metadata: deserializeMetadata(output),
2006
1847
  ...contents,
2007
1848
  };
2008
- return Promise.resolve(response);
1849
+ return response;
2009
1850
  };
2010
1851
  const de_UpdateWorkgroupCommandError = async (output, context) => {
2011
1852
  const parsedOutput = {
@@ -2031,17 +1872,16 @@ const de_UpdateWorkgroupCommandError = async (output, context) => {
2031
1872
  throw await de_ValidationExceptionRes(parsedOutput, context);
2032
1873
  default:
2033
1874
  const parsedBody = parsedOutput.body;
2034
- throwDefaultError({
1875
+ return throwDefaultError({
2035
1876
  output,
2036
1877
  parsedBody,
2037
- exceptionCtor: __BaseException,
2038
1878
  errorCode,
2039
1879
  });
2040
1880
  }
2041
1881
  };
2042
1882
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2043
1883
  const body = parsedOutput.body;
2044
- const deserialized = de_AccessDeniedException(body, context);
1884
+ const deserialized = _json(body);
2045
1885
  const exception = new AccessDeniedException({
2046
1886
  $metadata: deserializeMetadata(parsedOutput),
2047
1887
  ...deserialized,
@@ -2050,7 +1890,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2050
1890
  };
2051
1891
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2052
1892
  const body = parsedOutput.body;
2053
- const deserialized = de_ConflictException(body, context);
1893
+ const deserialized = _json(body);
2054
1894
  const exception = new ConflictException({
2055
1895
  $metadata: deserializeMetadata(parsedOutput),
2056
1896
  ...deserialized,
@@ -2059,7 +1899,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2059
1899
  };
2060
1900
  const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
2061
1901
  const body = parsedOutput.body;
2062
- const deserialized = de_InsufficientCapacityException(body, context);
1902
+ const deserialized = _json(body);
2063
1903
  const exception = new InsufficientCapacityException({
2064
1904
  $metadata: deserializeMetadata(parsedOutput),
2065
1905
  ...deserialized,
@@ -2068,7 +1908,7 @@ const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
2068
1908
  };
2069
1909
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2070
1910
  const body = parsedOutput.body;
2071
- const deserialized = de_InternalServerException(body, context);
1911
+ const deserialized = _json(body);
2072
1912
  const exception = new InternalServerException({
2073
1913
  $metadata: deserializeMetadata(parsedOutput),
2074
1914
  ...deserialized,
@@ -2077,7 +1917,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2077
1917
  };
2078
1918
  const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
2079
1919
  const body = parsedOutput.body;
2080
- const deserialized = de_InvalidPaginationException(body, context);
1920
+ const deserialized = _json(body);
2081
1921
  const exception = new InvalidPaginationException({
2082
1922
  $metadata: deserializeMetadata(parsedOutput),
2083
1923
  ...deserialized,
@@ -2086,7 +1926,7 @@ const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
2086
1926
  };
2087
1927
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2088
1928
  const body = parsedOutput.body;
2089
- const deserialized = de_ResourceNotFoundException(body, context);
1929
+ const deserialized = _json(body);
2090
1930
  const exception = new ResourceNotFoundException({
2091
1931
  $metadata: deserializeMetadata(parsedOutput),
2092
1932
  ...deserialized,
@@ -2095,7 +1935,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2095
1935
  };
2096
1936
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2097
1937
  const body = parsedOutput.body;
2098
- const deserialized = de_ServiceQuotaExceededException(body, context);
1938
+ const deserialized = _json(body);
2099
1939
  const exception = new ServiceQuotaExceededException({
2100
1940
  $metadata: deserializeMetadata(parsedOutput),
2101
1941
  ...deserialized,
@@ -2104,7 +1944,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2104
1944
  };
2105
1945
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2106
1946
  const body = parsedOutput.body;
2107
- const deserialized = de_ThrottlingException(body, context);
1947
+ const deserialized = _json(body);
2108
1948
  const exception = new ThrottlingException({
2109
1949
  $metadata: deserializeMetadata(parsedOutput),
2110
1950
  ...deserialized,
@@ -2113,7 +1953,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2113
1953
  };
2114
1954
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2115
1955
  const body = parsedOutput.body;
2116
- const deserialized = de_TooManyTagsException(body, context);
1956
+ const deserialized = _json(body);
2117
1957
  const exception = new TooManyTagsException({
2118
1958
  $metadata: deserializeMetadata(parsedOutput),
2119
1959
  ...deserialized,
@@ -2122,1009 +1962,335 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2122
1962
  };
2123
1963
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2124
1964
  const body = parsedOutput.body;
2125
- const deserialized = de_ValidationException(body, context);
1965
+ const deserialized = _json(body);
2126
1966
  const exception = new ValidationException({
2127
1967
  $metadata: deserializeMetadata(parsedOutput),
2128
1968
  ...deserialized,
2129
1969
  });
2130
1970
  return __decorateServiceException(exception, body);
2131
1971
  };
2132
- const se_ConfigParameter = (input, context) => {
2133
- return {
2134
- ...(input.parameterKey != null && { parameterKey: input.parameterKey }),
2135
- ...(input.parameterValue != null && { parameterValue: input.parameterValue }),
2136
- };
2137
- };
2138
- const se_ConfigParameterList = (input, context) => {
2139
- return input
2140
- .filter((e) => e != null)
2141
- .map((entry) => {
2142
- return se_ConfigParameter(entry, context);
2143
- });
2144
- };
2145
- const se_ConvertRecoveryPointToSnapshotRequest = (input, context) => {
2146
- return {
2147
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2148
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2149
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2150
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2151
- };
2152
- };
2153
- const se_CreateEndpointAccessRequest = (input, context) => {
2154
- return {
2155
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2156
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2157
- ...(input.vpcSecurityGroupIds != null && {
2158
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2159
- }),
2160
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2161
- };
2162
- };
2163
- const se_CreateNamespaceRequest = (input, context) => {
2164
- return {
2165
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2166
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2167
- ...(input.dbName != null && { dbName: input.dbName }),
2168
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2169
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2170
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2171
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2172
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2173
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2174
- };
2175
- };
2176
- const se_CreateSnapshotRequest = (input, context) => {
2177
- return {
2178
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2179
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2180
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2181
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2182
- };
2183
- };
2184
- const se_CreateUsageLimitRequest = (input, context) => {
2185
- return {
2186
- ...(input.amount != null && { amount: input.amount }),
2187
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2188
- ...(input.period != null && { period: input.period }),
2189
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2190
- ...(input.usageType != null && { usageType: input.usageType }),
2191
- };
2192
- };
2193
- const se_CreateWorkgroupRequest = (input, context) => {
2194
- return {
2195
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2196
- ...(input.configParameters != null && {
2197
- configParameters: se_ConfigParameterList(input.configParameters, context),
2198
- }),
2199
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2200
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2201
- ...(input.port != null && { port: input.port }),
2202
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2203
- ...(input.securityGroupIds != null && {
2204
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2205
- }),
2206
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2207
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2208
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2209
- };
2210
- };
2211
- const se_DeleteEndpointAccessRequest = (input, context) => {
2212
- return {
2213
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2214
- };
2215
- };
2216
- const se_DeleteNamespaceRequest = (input, context) => {
2217
- return {
2218
- ...(input.finalSnapshotName != null && { finalSnapshotName: input.finalSnapshotName }),
2219
- ...(input.finalSnapshotRetentionPeriod != null && {
2220
- finalSnapshotRetentionPeriod: input.finalSnapshotRetentionPeriod,
2221
- }),
2222
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2223
- };
2224
- };
2225
- const se_DeleteResourcePolicyRequest = (input, context) => {
2226
- return {
2227
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2228
- };
2229
- };
2230
- const se_DeleteSnapshotRequest = (input, context) => {
2231
- return {
2232
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2233
- };
2234
- };
2235
- const se_DeleteUsageLimitRequest = (input, context) => {
2236
- return {
2237
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2238
- };
2239
- };
2240
- const se_DeleteWorkgroupRequest = (input, context) => {
2241
- return {
2242
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2243
- };
2244
- };
2245
- const se_GetCredentialsRequest = (input, context) => {
2246
- return {
2247
- ...(input.dbName != null && { dbName: input.dbName }),
2248
- ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }),
2249
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2250
- };
2251
- };
2252
- const se_GetEndpointAccessRequest = (input, context) => {
2253
- return {
2254
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2255
- };
2256
- };
2257
- const se_GetNamespaceRequest = (input, context) => {
2258
- return {
2259
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2260
- };
2261
- };
2262
- const se_GetRecoveryPointRequest = (input, context) => {
2263
- return {
2264
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2265
- };
2266
- };
2267
- const se_GetResourcePolicyRequest = (input, context) => {
2268
- return {
2269
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2270
- };
2271
- };
2272
- const se_GetSnapshotRequest = (input, context) => {
2273
- return {
2274
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2275
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2276
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2277
- };
2278
- };
2279
- const se_GetTableRestoreStatusRequest = (input, context) => {
2280
- return {
2281
- ...(input.tableRestoreRequestId != null && { tableRestoreRequestId: input.tableRestoreRequestId }),
2282
- };
2283
- };
2284
- const se_GetUsageLimitRequest = (input, context) => {
2285
- return {
2286
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2287
- };
2288
- };
2289
- const se_GetWorkgroupRequest = (input, context) => {
2290
- return {
2291
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2292
- };
2293
- };
2294
- const se_IamRoleArnList = (input, context) => {
2295
- return input
2296
- .filter((e) => e != null)
2297
- .map((entry) => {
2298
- return entry;
2299
- });
2300
- };
2301
- const se_ListEndpointAccessRequest = (input, context) => {
2302
- return {
2303
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2304
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2305
- ...(input.vpcId != null && { vpcId: input.vpcId }),
2306
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2307
- };
2308
- };
2309
- const se_ListNamespacesRequest = (input, context) => {
2310
- return {
2311
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2312
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2313
- };
2314
- };
2315
1972
  const se_ListRecoveryPointsRequest = (input, context) => {
2316
- return {
2317
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2318
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2319
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2320
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2321
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2322
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2323
- };
2324
- };
2325
- const se_ListSnapshotsRequest = (input, context) => {
2326
- return {
2327
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2328
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2329
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2330
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2331
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2332
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2333
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2334
- };
2335
- };
2336
- const se_ListTableRestoreStatusRequest = (input, context) => {
2337
- return {
2338
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2339
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2340
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2341
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2342
- };
2343
- };
2344
- const se_ListTagsForResourceRequest = (input, context) => {
2345
- return {
2346
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2347
- };
2348
- };
2349
- const se_ListUsageLimitsRequest = (input, context) => {
2350
- return {
2351
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2352
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2353
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2354
- ...(input.usageType != null && { usageType: input.usageType }),
2355
- };
2356
- };
2357
- const se_ListWorkgroupsRequest = (input, context) => {
2358
- return {
2359
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2360
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2361
- };
2362
- };
2363
- const se_LogExportList = (input, context) => {
2364
- return input
2365
- .filter((e) => e != null)
2366
- .map((entry) => {
2367
- return entry;
2368
- });
2369
- };
2370
- const se_PutResourcePolicyRequest = (input, context) => {
2371
- return {
2372
- ...(input.policy != null && { policy: input.policy }),
2373
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2374
- };
2375
- };
2376
- const se_RestoreFromRecoveryPointRequest = (input, context) => {
2377
- return {
2378
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2379
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2380
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2381
- };
2382
- };
2383
- const se_RestoreFromSnapshotRequest = (input, context) => {
2384
- return {
2385
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2386
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2387
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2388
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2389
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2390
- };
2391
- };
2392
- const se_RestoreTableFromSnapshotRequest = (input, context) => {
2393
- return {
2394
- ...(input.activateCaseSensitiveIdentifier != null && {
2395
- activateCaseSensitiveIdentifier: input.activateCaseSensitiveIdentifier,
2396
- }),
2397
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2398
- ...(input.newTableName != null && { newTableName: input.newTableName }),
2399
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2400
- ...(input.sourceDatabaseName != null && { sourceDatabaseName: input.sourceDatabaseName }),
2401
- ...(input.sourceSchemaName != null && { sourceSchemaName: input.sourceSchemaName }),
2402
- ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }),
2403
- ...(input.targetDatabaseName != null && { targetDatabaseName: input.targetDatabaseName }),
2404
- ...(input.targetSchemaName != null && { targetSchemaName: input.targetSchemaName }),
2405
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2406
- };
2407
- };
2408
- const se_SecurityGroupIdList = (input, context) => {
2409
- return input
2410
- .filter((e) => e != null)
2411
- .map((entry) => {
2412
- return entry;
2413
- });
2414
- };
2415
- const se_SubnetIdList = (input, context) => {
2416
- return input
2417
- .filter((e) => e != null)
2418
- .map((entry) => {
2419
- return entry;
2420
- });
2421
- };
2422
- const se_Tag = (input, context) => {
2423
- return {
2424
- ...(input.key != null && { key: input.key }),
2425
- ...(input.value != null && { value: input.value }),
2426
- };
2427
- };
2428
- const se_TagKeyList = (input, context) => {
2429
- return input
2430
- .filter((e) => e != null)
2431
- .map((entry) => {
2432
- return entry;
2433
- });
2434
- };
2435
- const se_TagList = (input, context) => {
2436
- return input
2437
- .filter((e) => e != null)
2438
- .map((entry) => {
2439
- return se_Tag(entry, context);
2440
- });
2441
- };
2442
- const se_TagResourceRequest = (input, context) => {
2443
- return {
2444
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2445
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2446
- };
2447
- };
2448
- const se_UntagResourceRequest = (input, context) => {
2449
- return {
2450
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2451
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
2452
- };
2453
- };
2454
- const se_UpdateEndpointAccessRequest = (input, context) => {
2455
- return {
2456
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2457
- ...(input.vpcSecurityGroupIds != null && {
2458
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2459
- }),
2460
- };
2461
- };
2462
- const se_UpdateNamespaceRequest = (input, context) => {
2463
- return {
2464
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2465
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2466
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2467
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2468
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2469
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2470
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2471
- };
2472
- };
2473
- const se_UpdateSnapshotRequest = (input, context) => {
2474
- return {
2475
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2476
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2477
- };
2478
- };
2479
- const se_UpdateUsageLimitRequest = (input, context) => {
2480
- return {
2481
- ...(input.amount != null && { amount: input.amount }),
2482
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2483
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2484
- };
2485
- };
2486
- const se_UpdateWorkgroupRequest = (input, context) => {
2487
- return {
2488
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2489
- ...(input.configParameters != null && {
2490
- configParameters: se_ConfigParameterList(input.configParameters, context),
2491
- }),
2492
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2493
- ...(input.port != null && { port: input.port }),
2494
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2495
- ...(input.securityGroupIds != null && {
2496
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2497
- }),
2498
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2499
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2500
- };
2501
- };
2502
- const se_VpcSecurityGroupIdList = (input, context) => {
2503
- return input
2504
- .filter((e) => e != null)
2505
- .map((entry) => {
2506
- 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),
2507
1980
  });
2508
1981
  };
2509
- const de_AccessDeniedException = (output, context) => {
2510
- return {
2511
- code: __expectString(output.code),
2512
- message: __expectString(output.message),
2513
- };
2514
- };
2515
- const de_AccountIdList = (output, context) => {
2516
- const retVal = (output || [])
2517
- .filter((e) => e != null)
2518
- .map((entry) => {
2519
- if (entry === null) {
2520
- return null;
2521
- }
2522
- return __expectString(entry);
2523
- });
2524
- return retVal;
2525
- };
2526
- const de_ConfigParameter = (output, context) => {
2527
- return {
2528
- parameterKey: __expectString(output.parameterKey),
2529
- parameterValue: __expectString(output.parameterValue),
2530
- };
2531
- };
2532
- const de_ConfigParameterList = (output, context) => {
2533
- const retVal = (output || [])
2534
- .filter((e) => e != null)
2535
- .map((entry) => {
2536
- if (entry === null) {
2537
- return null;
2538
- }
2539
- 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),
2540
1991
  });
2541
- return retVal;
2542
- };
2543
- const de_ConflictException = (output, context) => {
2544
- return {
2545
- message: __expectString(output.message),
2546
- };
2547
1992
  };
2548
1993
  const de_ConvertRecoveryPointToSnapshotResponse = (output, context) => {
2549
- return {
2550
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2551
- };
1994
+ return take(output, {
1995
+ snapshot: (_) => de_Snapshot(_, context),
1996
+ });
2552
1997
  };
2553
1998
  const de_CreateEndpointAccessResponse = (output, context) => {
2554
- return {
2555
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2556
- };
1999
+ return take(output, {
2000
+ endpoint: (_) => de_EndpointAccess(_, context),
2001
+ });
2557
2002
  };
2558
2003
  const de_CreateNamespaceResponse = (output, context) => {
2559
- return {
2560
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2561
- };
2004
+ return take(output, {
2005
+ namespace: (_) => de_Namespace(_, context),
2006
+ });
2562
2007
  };
2563
2008
  const de_CreateSnapshotResponse = (output, context) => {
2564
- return {
2565
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2566
- };
2567
- };
2568
- const de_CreateUsageLimitResponse = (output, context) => {
2569
- return {
2570
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2571
- };
2009
+ return take(output, {
2010
+ snapshot: (_) => de_Snapshot(_, context),
2011
+ });
2572
2012
  };
2573
2013
  const de_CreateWorkgroupResponse = (output, context) => {
2574
- return {
2575
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2576
- };
2014
+ return take(output, {
2015
+ workgroup: (_) => de_Workgroup(_, context),
2016
+ });
2577
2017
  };
2578
2018
  const de_DeleteEndpointAccessResponse = (output, context) => {
2579
- return {
2580
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2581
- };
2019
+ return take(output, {
2020
+ endpoint: (_) => de_EndpointAccess(_, context),
2021
+ });
2582
2022
  };
2583
2023
  const de_DeleteNamespaceResponse = (output, context) => {
2584
- return {
2585
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2586
- };
2587
- };
2588
- const de_DeleteResourcePolicyResponse = (output, context) => {
2589
- return {};
2024
+ return take(output, {
2025
+ namespace: (_) => de_Namespace(_, context),
2026
+ });
2590
2027
  };
2591
2028
  const de_DeleteSnapshotResponse = (output, context) => {
2592
- return {
2593
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2594
- };
2595
- };
2596
- const de_DeleteUsageLimitResponse = (output, context) => {
2597
- return {
2598
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2599
- };
2029
+ return take(output, {
2030
+ snapshot: (_) => de_Snapshot(_, context),
2031
+ });
2600
2032
  };
2601
2033
  const de_DeleteWorkgroupResponse = (output, context) => {
2602
- return {
2603
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2604
- };
2605
- };
2606
- const de_Endpoint = (output, context) => {
2607
- return {
2608
- address: __expectString(output.address),
2609
- port: __expectInt32(output.port),
2610
- vpcEndpoints: output.vpcEndpoints != null ? de_VpcEndpointList(output.vpcEndpoints, context) : undefined,
2611
- };
2034
+ return take(output, {
2035
+ workgroup: (_) => de_Workgroup(_, context),
2036
+ });
2612
2037
  };
2613
2038
  const de_EndpointAccess = (output, context) => {
2614
- return {
2615
- address: __expectString(output.address),
2616
- endpointArn: __expectString(output.endpointArn),
2617
- endpointCreateTime: output.endpointCreateTime != null
2618
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endpointCreateTime))
2619
- : undefined,
2620
- endpointName: __expectString(output.endpointName),
2621
- endpointStatus: __expectString(output.endpointStatus),
2622
- port: __expectInt32(output.port),
2623
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
2624
- vpcEndpoint: output.vpcEndpoint != null ? de_VpcEndpoint(output.vpcEndpoint, context) : undefined,
2625
- vpcSecurityGroups: output.vpcSecurityGroups != null
2626
- ? de_VpcSecurityGroupMembershipList(output.vpcSecurityGroups, context)
2627
- : undefined,
2628
- workgroupName: __expectString(output.workgroupName),
2629
- };
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
+ });
2630
2051
  };
2631
2052
  const de_EndpointAccessList = (output, context) => {
2632
2053
  const retVal = (output || [])
2633
2054
  .filter((e) => e != null)
2634
2055
  .map((entry) => {
2635
- if (entry === null) {
2636
- return null;
2637
- }
2638
2056
  return de_EndpointAccess(entry, context);
2639
2057
  });
2640
2058
  return retVal;
2641
2059
  };
2642
2060
  const de_GetCredentialsResponse = (output, context) => {
2643
- return {
2644
- dbPassword: __expectString(output.dbPassword),
2645
- dbUser: __expectString(output.dbUser),
2646
- expiration: output.expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiration))) : undefined,
2647
- nextRefreshTime: output.nextRefreshTime != null
2648
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.nextRefreshTime)))
2649
- : undefined,
2650
- };
2061
+ return take(output, {
2062
+ dbPassword: __expectString,
2063
+ dbUser: __expectString,
2064
+ expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2065
+ nextRefreshTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2066
+ });
2651
2067
  };
2652
2068
  const de_GetEndpointAccessResponse = (output, context) => {
2653
- return {
2654
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2655
- };
2069
+ return take(output, {
2070
+ endpoint: (_) => de_EndpointAccess(_, context),
2071
+ });
2656
2072
  };
2657
2073
  const de_GetNamespaceResponse = (output, context) => {
2658
- return {
2659
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2660
- };
2074
+ return take(output, {
2075
+ namespace: (_) => de_Namespace(_, context),
2076
+ });
2661
2077
  };
2662
2078
  const de_GetRecoveryPointResponse = (output, context) => {
2663
- return {
2664
- recoveryPoint: output.recoveryPoint != null ? de_RecoveryPoint(output.recoveryPoint, context) : undefined,
2665
- };
2666
- };
2667
- const de_GetResourcePolicyResponse = (output, context) => {
2668
- return {
2669
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2670
- };
2079
+ return take(output, {
2080
+ recoveryPoint: (_) => de_RecoveryPoint(_, context),
2081
+ });
2671
2082
  };
2672
2083
  const de_GetSnapshotResponse = (output, context) => {
2673
- return {
2674
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2675
- };
2084
+ return take(output, {
2085
+ snapshot: (_) => de_Snapshot(_, context),
2086
+ });
2676
2087
  };
2677
2088
  const de_GetTableRestoreStatusResponse = (output, context) => {
2678
- return {
2679
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2680
- };
2681
- };
2682
- const de_GetUsageLimitResponse = (output, context) => {
2683
- return {
2684
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2685
- };
2089
+ return take(output, {
2090
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2091
+ });
2686
2092
  };
2687
2093
  const de_GetWorkgroupResponse = (output, context) => {
2688
- return {
2689
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2690
- };
2691
- };
2692
- const de_IamRoleArnList = (output, context) => {
2693
- const retVal = (output || [])
2694
- .filter((e) => e != null)
2695
- .map((entry) => {
2696
- if (entry === null) {
2697
- return null;
2698
- }
2699
- return __expectString(entry);
2094
+ return take(output, {
2095
+ workgroup: (_) => de_Workgroup(_, context),
2700
2096
  });
2701
- return retVal;
2702
- };
2703
- const de_InsufficientCapacityException = (output, context) => {
2704
- return {
2705
- message: __expectString(output.message),
2706
- };
2707
- };
2708
- const de_InternalServerException = (output, context) => {
2709
- return {
2710
- message: __expectString(output.message),
2711
- };
2712
- };
2713
- const de_InvalidPaginationException = (output, context) => {
2714
- return {
2715
- message: __expectString(output.message),
2716
- };
2717
2097
  };
2718
2098
  const de_ListEndpointAccessResponse = (output, context) => {
2719
- return {
2720
- endpoints: output.endpoints != null ? de_EndpointAccessList(output.endpoints, context) : undefined,
2721
- nextToken: __expectString(output.nextToken),
2722
- };
2099
+ return take(output, {
2100
+ endpoints: (_) => de_EndpointAccessList(_, context),
2101
+ nextToken: __expectString,
2102
+ });
2723
2103
  };
2724
2104
  const de_ListNamespacesResponse = (output, context) => {
2725
- return {
2726
- namespaces: output.namespaces != null ? de_NamespaceList(output.namespaces, context) : undefined,
2727
- nextToken: __expectString(output.nextToken),
2728
- };
2105
+ return take(output, {
2106
+ namespaces: (_) => de_NamespaceList(_, context),
2107
+ nextToken: __expectString,
2108
+ });
2729
2109
  };
2730
2110
  const de_ListRecoveryPointsResponse = (output, context) => {
2731
- return {
2732
- nextToken: __expectString(output.nextToken),
2733
- recoveryPoints: output.recoveryPoints != null ? de_RecoveryPointList(output.recoveryPoints, context) : undefined,
2734
- };
2111
+ return take(output, {
2112
+ nextToken: __expectString,
2113
+ recoveryPoints: (_) => de_RecoveryPointList(_, context),
2114
+ });
2735
2115
  };
2736
2116
  const de_ListSnapshotsResponse = (output, context) => {
2737
- return {
2738
- nextToken: __expectString(output.nextToken),
2739
- snapshots: output.snapshots != null ? de_SnapshotList(output.snapshots, context) : undefined,
2740
- };
2117
+ return take(output, {
2118
+ nextToken: __expectString,
2119
+ snapshots: (_) => de_SnapshotList(_, context),
2120
+ });
2741
2121
  };
2742
2122
  const de_ListTableRestoreStatusResponse = (output, context) => {
2743
- return {
2744
- nextToken: __expectString(output.nextToken),
2745
- tableRestoreStatuses: output.tableRestoreStatuses != null ? de_TableRestoreStatusList(output.tableRestoreStatuses, context) : undefined,
2746
- };
2747
- };
2748
- const de_ListTagsForResourceResponse = (output, context) => {
2749
- return {
2750
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
2751
- };
2752
- };
2753
- const de_ListUsageLimitsResponse = (output, context) => {
2754
- return {
2755
- nextToken: __expectString(output.nextToken),
2756
- usageLimits: output.usageLimits != null ? de_UsageLimits(output.usageLimits, context) : undefined,
2757
- };
2123
+ return take(output, {
2124
+ nextToken: __expectString,
2125
+ tableRestoreStatuses: (_) => de_TableRestoreStatusList(_, context),
2126
+ });
2758
2127
  };
2759
2128
  const de_ListWorkgroupsResponse = (output, context) => {
2760
- return {
2761
- nextToken: __expectString(output.nextToken),
2762
- workgroups: output.workgroups != null ? de_WorkgroupList(output.workgroups, context) : undefined,
2763
- };
2764
- };
2765
- const de_LogExportList = (output, context) => {
2766
- const retVal = (output || [])
2767
- .filter((e) => e != null)
2768
- .map((entry) => {
2769
- if (entry === null) {
2770
- return null;
2771
- }
2772
- return __expectString(entry);
2129
+ return take(output, {
2130
+ nextToken: __expectString,
2131
+ workgroups: (_) => de_WorkgroupList(_, context),
2773
2132
  });
2774
- return retVal;
2775
2133
  };
2776
2134
  const de_Namespace = (output, context) => {
2777
- return {
2778
- adminUsername: __expectString(output.adminUsername),
2779
- creationDate: output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined,
2780
- dbName: __expectString(output.dbName),
2781
- defaultIamRoleArn: __expectString(output.defaultIamRoleArn),
2782
- iamRoles: output.iamRoles != null ? de_IamRoleArnList(output.iamRoles, context) : undefined,
2783
- kmsKeyId: __expectString(output.kmsKeyId),
2784
- logExports: output.logExports != null ? de_LogExportList(output.logExports, context) : undefined,
2785
- namespaceArn: __expectString(output.namespaceArn),
2786
- namespaceId: __expectString(output.namespaceId),
2787
- namespaceName: __expectString(output.namespaceName),
2788
- status: __expectString(output.status),
2789
- };
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
+ });
2790
2148
  };
2791
2149
  const de_NamespaceList = (output, context) => {
2792
2150
  const retVal = (output || [])
2793
2151
  .filter((e) => e != null)
2794
2152
  .map((entry) => {
2795
- if (entry === null) {
2796
- return null;
2797
- }
2798
2153
  return de_Namespace(entry, context);
2799
2154
  });
2800
2155
  return retVal;
2801
2156
  };
2802
- const de_NetworkInterface = (output, context) => {
2803
- return {
2804
- availabilityZone: __expectString(output.availabilityZone),
2805
- networkInterfaceId: __expectString(output.networkInterfaceId),
2806
- privateIpAddress: __expectString(output.privateIpAddress),
2807
- subnetId: __expectString(output.subnetId),
2808
- };
2809
- };
2810
- const de_NetworkInterfaceList = (output, context) => {
2811
- const retVal = (output || [])
2812
- .filter((e) => e != null)
2813
- .map((entry) => {
2814
- if (entry === null) {
2815
- return null;
2816
- }
2817
- return de_NetworkInterface(entry, context);
2818
- });
2819
- return retVal;
2820
- };
2821
- const de_PutResourcePolicyResponse = (output, context) => {
2822
- return {
2823
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2824
- };
2825
- };
2826
2157
  const de_RecoveryPoint = (output, context) => {
2827
- return {
2828
- namespaceArn: __expectString(output.namespaceArn),
2829
- namespaceName: __expectString(output.namespaceName),
2830
- recoveryPointCreateTime: output.recoveryPointCreateTime != null
2831
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.recoveryPointCreateTime))
2832
- : undefined,
2833
- recoveryPointId: __expectString(output.recoveryPointId),
2834
- totalSizeInMegaBytes: __limitedParseDouble(output.totalSizeInMegaBytes),
2835
- workgroupName: __expectString(output.workgroupName),
2836
- };
2158
+ return take(output, {
2159
+ namespaceArn: __expectString,
2160
+ namespaceName: __expectString,
2161
+ recoveryPointCreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2162
+ recoveryPointId: __expectString,
2163
+ totalSizeInMegaBytes: __limitedParseDouble,
2164
+ workgroupName: __expectString,
2165
+ });
2837
2166
  };
2838
2167
  const de_RecoveryPointList = (output, context) => {
2839
2168
  const retVal = (output || [])
2840
2169
  .filter((e) => e != null)
2841
2170
  .map((entry) => {
2842
- if (entry === null) {
2843
- return null;
2844
- }
2845
2171
  return de_RecoveryPoint(entry, context);
2846
2172
  });
2847
2173
  return retVal;
2848
2174
  };
2849
- const de_ResourceNotFoundException = (output, context) => {
2850
- return {
2851
- message: __expectString(output.message),
2852
- resourceName: __expectString(output.resourceName),
2853
- };
2854
- };
2855
- const de_ResourcePolicy = (output, context) => {
2856
- return {
2857
- policy: __expectString(output.policy),
2858
- resourceArn: __expectString(output.resourceArn),
2859
- };
2860
- };
2861
2175
  const de_RestoreFromRecoveryPointResponse = (output, context) => {
2862
- return {
2863
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2864
- recoveryPointId: __expectString(output.recoveryPointId),
2865
- };
2176
+ return take(output, {
2177
+ namespace: (_) => de_Namespace(_, context),
2178
+ recoveryPointId: __expectString,
2179
+ });
2866
2180
  };
2867
2181
  const de_RestoreFromSnapshotResponse = (output, context) => {
2868
- return {
2869
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2870
- ownerAccount: __expectString(output.ownerAccount),
2871
- snapshotName: __expectString(output.snapshotName),
2872
- };
2182
+ return take(output, {
2183
+ namespace: (_) => de_Namespace(_, context),
2184
+ ownerAccount: __expectString,
2185
+ snapshotName: __expectString,
2186
+ });
2873
2187
  };
2874
2188
  const de_RestoreTableFromSnapshotResponse = (output, context) => {
2875
- return {
2876
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2877
- };
2878
- };
2879
- const de_SecurityGroupIdList = (output, context) => {
2880
- const retVal = (output || [])
2881
- .filter((e) => e != null)
2882
- .map((entry) => {
2883
- if (entry === null) {
2884
- return null;
2885
- }
2886
- return __expectString(entry);
2189
+ return take(output, {
2190
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2887
2191
  });
2888
- return retVal;
2889
- };
2890
- const de_ServiceQuotaExceededException = (output, context) => {
2891
- return {
2892
- message: __expectString(output.message),
2893
- };
2894
2192
  };
2895
2193
  const de_Snapshot = (output, context) => {
2896
- return {
2897
- accountsWithProvisionedRestoreAccess: output.accountsWithProvisionedRestoreAccess != null
2898
- ? de_AccountIdList(output.accountsWithProvisionedRestoreAccess, context)
2899
- : undefined,
2900
- accountsWithRestoreAccess: output.accountsWithRestoreAccess != null
2901
- ? de_AccountIdList(output.accountsWithRestoreAccess, context)
2902
- : undefined,
2903
- actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble(output.actualIncrementalBackupSizeInMegaBytes),
2904
- adminUsername: __expectString(output.adminUsername),
2905
- backupProgressInMegaBytes: __limitedParseDouble(output.backupProgressInMegaBytes),
2906
- currentBackupRateInMegaBytesPerSecond: __limitedParseDouble(output.currentBackupRateInMegaBytesPerSecond),
2907
- elapsedTimeInSeconds: __expectLong(output.elapsedTimeInSeconds),
2908
- estimatedSecondsToCompletion: __expectLong(output.estimatedSecondsToCompletion),
2909
- kmsKeyId: __expectString(output.kmsKeyId),
2910
- namespaceArn: __expectString(output.namespaceArn),
2911
- namespaceName: __expectString(output.namespaceName),
2912
- ownerAccount: __expectString(output.ownerAccount),
2913
- snapshotArn: __expectString(output.snapshotArn),
2914
- snapshotCreateTime: output.snapshotCreateTime != null
2915
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotCreateTime))
2916
- : undefined,
2917
- snapshotName: __expectString(output.snapshotName),
2918
- snapshotRemainingDays: __expectInt32(output.snapshotRemainingDays),
2919
- snapshotRetentionPeriod: __expectInt32(output.snapshotRetentionPeriod),
2920
- snapshotRetentionStartTime: output.snapshotRetentionStartTime != null
2921
- ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotRetentionStartTime))
2922
- : undefined,
2923
- status: __expectString(output.status),
2924
- totalBackupSizeInMegaBytes: __limitedParseDouble(output.totalBackupSizeInMegaBytes),
2925
- };
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
+ });
2926
2216
  };
2927
2217
  const de_SnapshotList = (output, context) => {
2928
2218
  const retVal = (output || [])
2929
2219
  .filter((e) => e != null)
2930
2220
  .map((entry) => {
2931
- if (entry === null) {
2932
- return null;
2933
- }
2934
2221
  return de_Snapshot(entry, context);
2935
2222
  });
2936
2223
  return retVal;
2937
2224
  };
2938
- const de_SubnetIdList = (output, context) => {
2939
- const retVal = (output || [])
2940
- .filter((e) => e != null)
2941
- .map((entry) => {
2942
- if (entry === null) {
2943
- return null;
2944
- }
2945
- return __expectString(entry);
2946
- });
2947
- return retVal;
2948
- };
2949
2225
  const de_TableRestoreStatus = (output, context) => {
2950
- return {
2951
- message: __expectString(output.message),
2952
- namespaceName: __expectString(output.namespaceName),
2953
- newTableName: __expectString(output.newTableName),
2954
- progressInMegaBytes: __expectLong(output.progressInMegaBytes),
2955
- requestTime: output.requestTime != null
2956
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestTime)))
2957
- : undefined,
2958
- snapshotName: __expectString(output.snapshotName),
2959
- sourceDatabaseName: __expectString(output.sourceDatabaseName),
2960
- sourceSchemaName: __expectString(output.sourceSchemaName),
2961
- sourceTableName: __expectString(output.sourceTableName),
2962
- status: __expectString(output.status),
2963
- tableRestoreRequestId: __expectString(output.tableRestoreRequestId),
2964
- targetDatabaseName: __expectString(output.targetDatabaseName),
2965
- targetSchemaName: __expectString(output.targetSchemaName),
2966
- totalDataInMegaBytes: __expectLong(output.totalDataInMegaBytes),
2967
- workgroupName: __expectString(output.workgroupName),
2968
- };
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
+ });
2969
2243
  };
2970
2244
  const de_TableRestoreStatusList = (output, context) => {
2971
2245
  const retVal = (output || [])
2972
2246
  .filter((e) => e != null)
2973
2247
  .map((entry) => {
2974
- if (entry === null) {
2975
- return null;
2976
- }
2977
2248
  return de_TableRestoreStatus(entry, context);
2978
2249
  });
2979
2250
  return retVal;
2980
2251
  };
2981
- const de_Tag = (output, context) => {
2982
- return {
2983
- key: __expectString(output.key),
2984
- value: __expectString(output.value),
2985
- };
2986
- };
2987
- const de_TagList = (output, context) => {
2988
- const retVal = (output || [])
2989
- .filter((e) => e != null)
2990
- .map((entry) => {
2991
- if (entry === null) {
2992
- return null;
2993
- }
2994
- return de_Tag(entry, context);
2995
- });
2996
- return retVal;
2997
- };
2998
- const de_TagResourceResponse = (output, context) => {
2999
- return {};
3000
- };
3001
- const de_ThrottlingException = (output, context) => {
3002
- return {
3003
- code: __expectString(output.code),
3004
- message: __expectString(output.message),
3005
- };
3006
- };
3007
- const de_TooManyTagsException = (output, context) => {
3008
- return {
3009
- message: __expectString(output.message),
3010
- resourceName: __expectString(output.resourceName),
3011
- };
3012
- };
3013
- const de_UntagResourceResponse = (output, context) => {
3014
- return {};
3015
- };
3016
2252
  const de_UpdateEndpointAccessResponse = (output, context) => {
3017
- return {
3018
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
3019
- };
2253
+ return take(output, {
2254
+ endpoint: (_) => de_EndpointAccess(_, context),
2255
+ });
3020
2256
  };
3021
2257
  const de_UpdateNamespaceResponse = (output, context) => {
3022
- return {
3023
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
3024
- };
3025
- };
3026
- const de_UpdateSnapshotResponse = (output, context) => {
3027
- return {
3028
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
3029
- };
3030
- };
3031
- const de_UpdateUsageLimitResponse = (output, context) => {
3032
- return {
3033
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
3034
- };
3035
- };
3036
- const de_UpdateWorkgroupResponse = (output, context) => {
3037
- return {
3038
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
3039
- };
3040
- };
3041
- const de_UsageLimit = (output, context) => {
3042
- return {
3043
- amount: __expectLong(output.amount),
3044
- breachAction: __expectString(output.breachAction),
3045
- period: __expectString(output.period),
3046
- resourceArn: __expectString(output.resourceArn),
3047
- usageLimitArn: __expectString(output.usageLimitArn),
3048
- usageLimitId: __expectString(output.usageLimitId),
3049
- usageType: __expectString(output.usageType),
3050
- };
3051
- };
3052
- const de_UsageLimits = (output, context) => {
3053
- const retVal = (output || [])
3054
- .filter((e) => e != null)
3055
- .map((entry) => {
3056
- if (entry === null) {
3057
- return null;
3058
- }
3059
- return de_UsageLimit(entry, context);
2258
+ return take(output, {
2259
+ namespace: (_) => de_Namespace(_, context),
3060
2260
  });
3061
- return retVal;
3062
- };
3063
- const de_ValidationException = (output, context) => {
3064
- return {
3065
- message: __expectString(output.message),
3066
- };
3067
- };
3068
- const de_VpcEndpoint = (output, context) => {
3069
- return {
3070
- networkInterfaces: output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined,
3071
- vpcEndpointId: __expectString(output.vpcEndpointId),
3072
- vpcId: __expectString(output.vpcId),
3073
- };
3074
2261
  };
3075
- const de_VpcEndpointList = (output, context) => {
3076
- const retVal = (output || [])
3077
- .filter((e) => e != null)
3078
- .map((entry) => {
3079
- if (entry === null) {
3080
- return null;
3081
- }
3082
- return de_VpcEndpoint(entry, context);
2262
+ const de_UpdateSnapshotResponse = (output, context) => {
2263
+ return take(output, {
2264
+ snapshot: (_) => de_Snapshot(_, context),
3083
2265
  });
3084
- return retVal;
3085
- };
3086
- const de_VpcSecurityGroupMembership = (output, context) => {
3087
- return {
3088
- status: __expectString(output.status),
3089
- vpcSecurityGroupId: __expectString(output.vpcSecurityGroupId),
3090
- };
3091
2266
  };
3092
- const de_VpcSecurityGroupMembershipList = (output, context) => {
3093
- const retVal = (output || [])
3094
- .filter((e) => e != null)
3095
- .map((entry) => {
3096
- if (entry === null) {
3097
- return null;
3098
- }
3099
- return de_VpcSecurityGroupMembership(entry, context);
2267
+ const de_UpdateWorkgroupResponse = (output, context) => {
2268
+ return take(output, {
2269
+ workgroup: (_) => de_Workgroup(_, context),
3100
2270
  });
3101
- return retVal;
3102
2271
  };
3103
2272
  const de_Workgroup = (output, context) => {
3104
- return {
3105
- baseCapacity: __expectInt32(output.baseCapacity),
3106
- configParameters: output.configParameters != null ? de_ConfigParameterList(output.configParameters, context) : undefined,
3107
- creationDate: output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined,
3108
- endpoint: output.endpoint != null ? de_Endpoint(output.endpoint, context) : undefined,
3109
- enhancedVpcRouting: __expectBoolean(output.enhancedVpcRouting),
3110
- namespaceName: __expectString(output.namespaceName),
3111
- port: __expectInt32(output.port),
3112
- publiclyAccessible: __expectBoolean(output.publiclyAccessible),
3113
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined,
3114
- status: __expectString(output.status),
3115
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
3116
- workgroupArn: __expectString(output.workgroupArn),
3117
- workgroupId: __expectString(output.workgroupId),
3118
- workgroupName: __expectString(output.workgroupName),
3119
- };
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
+ });
3120
2289
  };
3121
2290
  const de_WorkgroupList = (output, context) => {
3122
2291
  const retVal = (output || [])
3123
2292
  .filter((e) => e != null)
3124
2293
  .map((entry) => {
3125
- if (entry === null) {
3126
- return null;
3127
- }
3128
2294
  return de_Workgroup(entry, context);
3129
2295
  });
3130
2296
  return retVal;
@@ -3142,6 +2308,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
3142
2308
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3143
2309
  };
3144
2310
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2311
+ const throwDefaultError = withBaseException(__BaseException);
3145
2312
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3146
2313
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3147
2314
  const contents = {
@@ -3160,6 +2327,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
3160
2327
  }
3161
2328
  return new __HttpRequest(contents);
3162
2329
  };
2330
+ function sharedHeaders(operation) {
2331
+ return {
2332
+ "content-type": "application/x-amz-json-1.1",
2333
+ "x-amz-target": `RedshiftServerless.${operation}`,
2334
+ };
2335
+ }
3163
2336
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3164
2337
  if (encoded.length) {
3165
2338
  return JSON.parse(encoded);