@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.
@@ -7,402 +7,282 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const RedshiftServerlessServiceException_1 = require("../models/RedshiftServerlessServiceException");
9
9
  const se_ConvertRecoveryPointToSnapshotCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.1",
12
- "x-amz-target": "RedshiftServerless.ConvertRecoveryPointToSnapshot",
13
- };
10
+ const headers = sharedHeaders("ConvertRecoveryPointToSnapshot");
14
11
  let body;
15
- body = JSON.stringify(se_ConvertRecoveryPointToSnapshotRequest(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_ConvertRecoveryPointToSnapshotCommand = se_ConvertRecoveryPointToSnapshotCommand;
19
16
  const se_CreateEndpointAccessCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "RedshiftServerless.CreateEndpointAccess",
23
- };
17
+ const headers = sharedHeaders("CreateEndpointAccess");
24
18
  let body;
25
- body = JSON.stringify(se_CreateEndpointAccessRequest(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateEndpointAccessCommand = se_CreateEndpointAccessCommand;
29
23
  const se_CreateNamespaceCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.1",
32
- "x-amz-target": "RedshiftServerless.CreateNamespace",
33
- };
24
+ const headers = sharedHeaders("CreateNamespace");
34
25
  let body;
35
- body = JSON.stringify(se_CreateNamespaceRequest(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_CreateNamespaceCommand = se_CreateNamespaceCommand;
39
30
  const se_CreateSnapshotCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.1",
42
- "x-amz-target": "RedshiftServerless.CreateSnapshot",
43
- };
31
+ const headers = sharedHeaders("CreateSnapshot");
44
32
  let body;
45
- body = JSON.stringify(se_CreateSnapshotRequest(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_CreateSnapshotCommand = se_CreateSnapshotCommand;
49
37
  const se_CreateUsageLimitCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.1",
52
- "x-amz-target": "RedshiftServerless.CreateUsageLimit",
53
- };
38
+ const headers = sharedHeaders("CreateUsageLimit");
54
39
  let body;
55
- body = JSON.stringify(se_CreateUsageLimitRequest(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_CreateUsageLimitCommand = se_CreateUsageLimitCommand;
59
44
  const se_CreateWorkgroupCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "RedshiftServerless.CreateWorkgroup",
63
- };
45
+ const headers = sharedHeaders("CreateWorkgroup");
64
46
  let body;
65
- body = JSON.stringify(se_CreateWorkgroupRequest(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_CreateWorkgroupCommand = se_CreateWorkgroupCommand;
69
51
  const se_DeleteEndpointAccessCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "RedshiftServerless.DeleteEndpointAccess",
73
- };
52
+ const headers = sharedHeaders("DeleteEndpointAccess");
74
53
  let body;
75
- body = JSON.stringify(se_DeleteEndpointAccessRequest(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_DeleteEndpointAccessCommand = se_DeleteEndpointAccessCommand;
79
58
  const se_DeleteNamespaceCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.1",
82
- "x-amz-target": "RedshiftServerless.DeleteNamespace",
83
- };
59
+ const headers = sharedHeaders("DeleteNamespace");
84
60
  let body;
85
- body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
63
  };
88
64
  exports.se_DeleteNamespaceCommand = se_DeleteNamespaceCommand;
89
65
  const se_DeleteResourcePolicyCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.1",
92
- "x-amz-target": "RedshiftServerless.DeleteResourcePolicy",
93
- };
66
+ const headers = sharedHeaders("DeleteResourcePolicy");
94
67
  let body;
95
- body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
96
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
70
  };
98
71
  exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
99
72
  const se_DeleteSnapshotCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.1",
102
- "x-amz-target": "RedshiftServerless.DeleteSnapshot",
103
- };
73
+ const headers = sharedHeaders("DeleteSnapshot");
104
74
  let body;
105
- body = JSON.stringify(se_DeleteSnapshotRequest(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_DeleteSnapshotCommand = se_DeleteSnapshotCommand;
109
79
  const se_DeleteUsageLimitCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.1",
112
- "x-amz-target": "RedshiftServerless.DeleteUsageLimit",
113
- };
80
+ const headers = sharedHeaders("DeleteUsageLimit");
114
81
  let body;
115
- body = JSON.stringify(se_DeleteUsageLimitRequest(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_DeleteUsageLimitCommand = se_DeleteUsageLimitCommand;
119
86
  const se_DeleteWorkgroupCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.1",
122
- "x-amz-target": "RedshiftServerless.DeleteWorkgroup",
123
- };
87
+ const headers = sharedHeaders("DeleteWorkgroup");
124
88
  let body;
125
- body = JSON.stringify(se_DeleteWorkgroupRequest(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_DeleteWorkgroupCommand = se_DeleteWorkgroupCommand;
129
93
  const se_GetCredentialsCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "RedshiftServerless.GetCredentials",
133
- };
94
+ const headers = sharedHeaders("GetCredentials");
134
95
  let body;
135
- body = JSON.stringify(se_GetCredentialsRequest(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
98
  };
138
99
  exports.se_GetCredentialsCommand = se_GetCredentialsCommand;
139
100
  const se_GetEndpointAccessCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.1",
142
- "x-amz-target": "RedshiftServerless.GetEndpointAccess",
143
- };
101
+ const headers = sharedHeaders("GetEndpointAccess");
144
102
  let body;
145
- body = JSON.stringify(se_GetEndpointAccessRequest(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
105
  };
148
106
  exports.se_GetEndpointAccessCommand = se_GetEndpointAccessCommand;
149
107
  const se_GetNamespaceCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "RedshiftServerless.GetNamespace",
153
- };
108
+ const headers = sharedHeaders("GetNamespace");
154
109
  let body;
155
- body = JSON.stringify(se_GetNamespaceRequest(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
156
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
112
  };
158
113
  exports.se_GetNamespaceCommand = se_GetNamespaceCommand;
159
114
  const se_GetRecoveryPointCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "RedshiftServerless.GetRecoveryPoint",
163
- };
115
+ const headers = sharedHeaders("GetRecoveryPoint");
164
116
  let body;
165
- body = JSON.stringify(se_GetRecoveryPointRequest(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
166
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
119
  };
168
120
  exports.se_GetRecoveryPointCommand = se_GetRecoveryPointCommand;
169
121
  const se_GetResourcePolicyCommand = async (input, context) => {
170
- const headers = {
171
- "content-type": "application/x-amz-json-1.1",
172
- "x-amz-target": "RedshiftServerless.GetResourcePolicy",
173
- };
122
+ const headers = sharedHeaders("GetResourcePolicy");
174
123
  let body;
175
- body = JSON.stringify(se_GetResourcePolicyRequest(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
176
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
126
  };
178
127
  exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
179
128
  const se_GetSnapshotCommand = async (input, context) => {
180
- const headers = {
181
- "content-type": "application/x-amz-json-1.1",
182
- "x-amz-target": "RedshiftServerless.GetSnapshot",
183
- };
129
+ const headers = sharedHeaders("GetSnapshot");
184
130
  let body;
185
- body = JSON.stringify(se_GetSnapshotRequest(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
186
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
187
133
  };
188
134
  exports.se_GetSnapshotCommand = se_GetSnapshotCommand;
189
135
  const se_GetTableRestoreStatusCommand = async (input, context) => {
190
- const headers = {
191
- "content-type": "application/x-amz-json-1.1",
192
- "x-amz-target": "RedshiftServerless.GetTableRestoreStatus",
193
- };
136
+ const headers = sharedHeaders("GetTableRestoreStatus");
194
137
  let body;
195
- body = JSON.stringify(se_GetTableRestoreStatusRequest(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
196
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
140
  };
198
141
  exports.se_GetTableRestoreStatusCommand = se_GetTableRestoreStatusCommand;
199
142
  const se_GetUsageLimitCommand = async (input, context) => {
200
- const headers = {
201
- "content-type": "application/x-amz-json-1.1",
202
- "x-amz-target": "RedshiftServerless.GetUsageLimit",
203
- };
143
+ const headers = sharedHeaders("GetUsageLimit");
204
144
  let body;
205
- body = JSON.stringify(se_GetUsageLimitRequest(input, context));
145
+ body = JSON.stringify((0, smithy_client_1._json)(input));
206
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
207
147
  };
208
148
  exports.se_GetUsageLimitCommand = se_GetUsageLimitCommand;
209
149
  const se_GetWorkgroupCommand = async (input, context) => {
210
- const headers = {
211
- "content-type": "application/x-amz-json-1.1",
212
- "x-amz-target": "RedshiftServerless.GetWorkgroup",
213
- };
150
+ const headers = sharedHeaders("GetWorkgroup");
214
151
  let body;
215
- body = JSON.stringify(se_GetWorkgroupRequest(input, context));
152
+ body = JSON.stringify((0, smithy_client_1._json)(input));
216
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
154
  };
218
155
  exports.se_GetWorkgroupCommand = se_GetWorkgroupCommand;
219
156
  const se_ListEndpointAccessCommand = async (input, context) => {
220
- const headers = {
221
- "content-type": "application/x-amz-json-1.1",
222
- "x-amz-target": "RedshiftServerless.ListEndpointAccess",
223
- };
157
+ const headers = sharedHeaders("ListEndpointAccess");
224
158
  let body;
225
- body = JSON.stringify(se_ListEndpointAccessRequest(input, context));
159
+ body = JSON.stringify((0, smithy_client_1._json)(input));
226
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
161
  };
228
162
  exports.se_ListEndpointAccessCommand = se_ListEndpointAccessCommand;
229
163
  const se_ListNamespacesCommand = async (input, context) => {
230
- const headers = {
231
- "content-type": "application/x-amz-json-1.1",
232
- "x-amz-target": "RedshiftServerless.ListNamespaces",
233
- };
164
+ const headers = sharedHeaders("ListNamespaces");
234
165
  let body;
235
- body = JSON.stringify(se_ListNamespacesRequest(input, context));
166
+ body = JSON.stringify((0, smithy_client_1._json)(input));
236
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
237
168
  };
238
169
  exports.se_ListNamespacesCommand = se_ListNamespacesCommand;
239
170
  const se_ListRecoveryPointsCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "RedshiftServerless.ListRecoveryPoints",
243
- };
171
+ const headers = sharedHeaders("ListRecoveryPoints");
244
172
  let body;
245
173
  body = JSON.stringify(se_ListRecoveryPointsRequest(input, context));
246
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
175
  };
248
176
  exports.se_ListRecoveryPointsCommand = se_ListRecoveryPointsCommand;
249
177
  const se_ListSnapshotsCommand = async (input, context) => {
250
- const headers = {
251
- "content-type": "application/x-amz-json-1.1",
252
- "x-amz-target": "RedshiftServerless.ListSnapshots",
253
- };
178
+ const headers = sharedHeaders("ListSnapshots");
254
179
  let body;
255
180
  body = JSON.stringify(se_ListSnapshotsRequest(input, context));
256
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
182
  };
258
183
  exports.se_ListSnapshotsCommand = se_ListSnapshotsCommand;
259
184
  const se_ListTableRestoreStatusCommand = async (input, context) => {
260
- const headers = {
261
- "content-type": "application/x-amz-json-1.1",
262
- "x-amz-target": "RedshiftServerless.ListTableRestoreStatus",
263
- };
185
+ const headers = sharedHeaders("ListTableRestoreStatus");
264
186
  let body;
265
- body = JSON.stringify(se_ListTableRestoreStatusRequest(input, context));
187
+ body = JSON.stringify((0, smithy_client_1._json)(input));
266
188
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
267
189
  };
268
190
  exports.se_ListTableRestoreStatusCommand = se_ListTableRestoreStatusCommand;
269
191
  const se_ListTagsForResourceCommand = async (input, context) => {
270
- const headers = {
271
- "content-type": "application/x-amz-json-1.1",
272
- "x-amz-target": "RedshiftServerless.ListTagsForResource",
273
- };
192
+ const headers = sharedHeaders("ListTagsForResource");
274
193
  let body;
275
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
194
+ body = JSON.stringify((0, smithy_client_1._json)(input));
276
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
277
196
  };
278
197
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
279
198
  const se_ListUsageLimitsCommand = async (input, context) => {
280
- const headers = {
281
- "content-type": "application/x-amz-json-1.1",
282
- "x-amz-target": "RedshiftServerless.ListUsageLimits",
283
- };
199
+ const headers = sharedHeaders("ListUsageLimits");
284
200
  let body;
285
- body = JSON.stringify(se_ListUsageLimitsRequest(input, context));
201
+ body = JSON.stringify((0, smithy_client_1._json)(input));
286
202
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
203
  };
288
204
  exports.se_ListUsageLimitsCommand = se_ListUsageLimitsCommand;
289
205
  const se_ListWorkgroupsCommand = async (input, context) => {
290
- const headers = {
291
- "content-type": "application/x-amz-json-1.1",
292
- "x-amz-target": "RedshiftServerless.ListWorkgroups",
293
- };
206
+ const headers = sharedHeaders("ListWorkgroups");
294
207
  let body;
295
- body = JSON.stringify(se_ListWorkgroupsRequest(input, context));
208
+ body = JSON.stringify((0, smithy_client_1._json)(input));
296
209
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
297
210
  };
298
211
  exports.se_ListWorkgroupsCommand = se_ListWorkgroupsCommand;
299
212
  const se_PutResourcePolicyCommand = async (input, context) => {
300
- const headers = {
301
- "content-type": "application/x-amz-json-1.1",
302
- "x-amz-target": "RedshiftServerless.PutResourcePolicy",
303
- };
213
+ const headers = sharedHeaders("PutResourcePolicy");
304
214
  let body;
305
- body = JSON.stringify(se_PutResourcePolicyRequest(input, context));
215
+ body = JSON.stringify((0, smithy_client_1._json)(input));
306
216
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
307
217
  };
308
218
  exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
309
219
  const se_RestoreFromRecoveryPointCommand = async (input, context) => {
310
- const headers = {
311
- "content-type": "application/x-amz-json-1.1",
312
- "x-amz-target": "RedshiftServerless.RestoreFromRecoveryPoint",
313
- };
220
+ const headers = sharedHeaders("RestoreFromRecoveryPoint");
314
221
  let body;
315
- body = JSON.stringify(se_RestoreFromRecoveryPointRequest(input, context));
222
+ body = JSON.stringify((0, smithy_client_1._json)(input));
316
223
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
224
  };
318
225
  exports.se_RestoreFromRecoveryPointCommand = se_RestoreFromRecoveryPointCommand;
319
226
  const se_RestoreFromSnapshotCommand = async (input, context) => {
320
- const headers = {
321
- "content-type": "application/x-amz-json-1.1",
322
- "x-amz-target": "RedshiftServerless.RestoreFromSnapshot",
323
- };
227
+ const headers = sharedHeaders("RestoreFromSnapshot");
324
228
  let body;
325
- body = JSON.stringify(se_RestoreFromSnapshotRequest(input, context));
229
+ body = JSON.stringify((0, smithy_client_1._json)(input));
326
230
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
327
231
  };
328
232
  exports.se_RestoreFromSnapshotCommand = se_RestoreFromSnapshotCommand;
329
233
  const se_RestoreTableFromSnapshotCommand = async (input, context) => {
330
- const headers = {
331
- "content-type": "application/x-amz-json-1.1",
332
- "x-amz-target": "RedshiftServerless.RestoreTableFromSnapshot",
333
- };
234
+ const headers = sharedHeaders("RestoreTableFromSnapshot");
334
235
  let body;
335
- body = JSON.stringify(se_RestoreTableFromSnapshotRequest(input, context));
236
+ body = JSON.stringify((0, smithy_client_1._json)(input));
336
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
337
238
  };
338
239
  exports.se_RestoreTableFromSnapshotCommand = se_RestoreTableFromSnapshotCommand;
339
240
  const se_TagResourceCommand = async (input, context) => {
340
- const headers = {
341
- "content-type": "application/x-amz-json-1.1",
342
- "x-amz-target": "RedshiftServerless.TagResource",
343
- };
241
+ const headers = sharedHeaders("TagResource");
344
242
  let body;
345
- body = JSON.stringify(se_TagResourceRequest(input, context));
243
+ body = JSON.stringify((0, smithy_client_1._json)(input));
346
244
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
347
245
  };
348
246
  exports.se_TagResourceCommand = se_TagResourceCommand;
349
247
  const se_UntagResourceCommand = async (input, context) => {
350
- const headers = {
351
- "content-type": "application/x-amz-json-1.1",
352
- "x-amz-target": "RedshiftServerless.UntagResource",
353
- };
248
+ const headers = sharedHeaders("UntagResource");
354
249
  let body;
355
- body = JSON.stringify(se_UntagResourceRequest(input, context));
250
+ body = JSON.stringify((0, smithy_client_1._json)(input));
356
251
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
357
252
  };
358
253
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
359
254
  const se_UpdateEndpointAccessCommand = async (input, context) => {
360
- const headers = {
361
- "content-type": "application/x-amz-json-1.1",
362
- "x-amz-target": "RedshiftServerless.UpdateEndpointAccess",
363
- };
255
+ const headers = sharedHeaders("UpdateEndpointAccess");
364
256
  let body;
365
- body = JSON.stringify(se_UpdateEndpointAccessRequest(input, context));
257
+ body = JSON.stringify((0, smithy_client_1._json)(input));
366
258
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
367
259
  };
368
260
  exports.se_UpdateEndpointAccessCommand = se_UpdateEndpointAccessCommand;
369
261
  const se_UpdateNamespaceCommand = async (input, context) => {
370
- const headers = {
371
- "content-type": "application/x-amz-json-1.1",
372
- "x-amz-target": "RedshiftServerless.UpdateNamespace",
373
- };
262
+ const headers = sharedHeaders("UpdateNamespace");
374
263
  let body;
375
- body = JSON.stringify(se_UpdateNamespaceRequest(input, context));
264
+ body = JSON.stringify((0, smithy_client_1._json)(input));
376
265
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
377
266
  };
378
267
  exports.se_UpdateNamespaceCommand = se_UpdateNamespaceCommand;
379
268
  const se_UpdateSnapshotCommand = async (input, context) => {
380
- const headers = {
381
- "content-type": "application/x-amz-json-1.1",
382
- "x-amz-target": "RedshiftServerless.UpdateSnapshot",
383
- };
269
+ const headers = sharedHeaders("UpdateSnapshot");
384
270
  let body;
385
- body = JSON.stringify(se_UpdateSnapshotRequest(input, context));
271
+ body = JSON.stringify((0, smithy_client_1._json)(input));
386
272
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
387
273
  };
388
274
  exports.se_UpdateSnapshotCommand = se_UpdateSnapshotCommand;
389
275
  const se_UpdateUsageLimitCommand = async (input, context) => {
390
- const headers = {
391
- "content-type": "application/x-amz-json-1.1",
392
- "x-amz-target": "RedshiftServerless.UpdateUsageLimit",
393
- };
276
+ const headers = sharedHeaders("UpdateUsageLimit");
394
277
  let body;
395
- body = JSON.stringify(se_UpdateUsageLimitRequest(input, context));
278
+ body = JSON.stringify((0, smithy_client_1._json)(input));
396
279
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
397
280
  };
398
281
  exports.se_UpdateUsageLimitCommand = se_UpdateUsageLimitCommand;
399
282
  const se_UpdateWorkgroupCommand = async (input, context) => {
400
- const headers = {
401
- "content-type": "application/x-amz-json-1.1",
402
- "x-amz-target": "RedshiftServerless.UpdateWorkgroup",
403
- };
283
+ const headers = sharedHeaders("UpdateWorkgroup");
404
284
  let body;
405
- body = JSON.stringify(se_UpdateWorkgroupRequest(input, context));
285
+ body = JSON.stringify((0, smithy_client_1._json)(input));
406
286
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
407
287
  };
408
288
  exports.se_UpdateWorkgroupCommand = se_UpdateWorkgroupCommand;
@@ -417,7 +297,7 @@ const de_ConvertRecoveryPointToSnapshotCommand = async (output, context) => {
417
297
  $metadata: deserializeMetadata(output),
418
298
  ...contents,
419
299
  };
420
- return Promise.resolve(response);
300
+ return response;
421
301
  };
422
302
  exports.de_ConvertRecoveryPointToSnapshotCommand = de_ConvertRecoveryPointToSnapshotCommand;
423
303
  const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) => {
@@ -447,10 +327,9 @@ const de_ConvertRecoveryPointToSnapshotCommandError = async (output, context) =>
447
327
  throw await de_ValidationExceptionRes(parsedOutput, context);
448
328
  default:
449
329
  const parsedBody = parsedOutput.body;
450
- (0, smithy_client_1.throwDefaultError)({
330
+ return throwDefaultError({
451
331
  output,
452
332
  parsedBody,
453
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
454
333
  errorCode,
455
334
  });
456
335
  }
@@ -466,7 +345,7 @@ const de_CreateEndpointAccessCommand = async (output, context) => {
466
345
  $metadata: deserializeMetadata(output),
467
346
  ...contents,
468
347
  };
469
- return Promise.resolve(response);
348
+ return response;
470
349
  };
471
350
  exports.de_CreateEndpointAccessCommand = de_CreateEndpointAccessCommand;
472
351
  const de_CreateEndpointAccessCommandError = async (output, context) => {
@@ -496,10 +375,9 @@ const de_CreateEndpointAccessCommandError = async (output, context) => {
496
375
  throw await de_ValidationExceptionRes(parsedOutput, context);
497
376
  default:
498
377
  const parsedBody = parsedOutput.body;
499
- (0, smithy_client_1.throwDefaultError)({
378
+ return throwDefaultError({
500
379
  output,
501
380
  parsedBody,
502
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
503
381
  errorCode,
504
382
  });
505
383
  }
@@ -515,7 +393,7 @@ const de_CreateNamespaceCommand = async (output, context) => {
515
393
  $metadata: deserializeMetadata(output),
516
394
  ...contents,
517
395
  };
518
- return Promise.resolve(response);
396
+ return response;
519
397
  };
520
398
  exports.de_CreateNamespaceCommand = de_CreateNamespaceCommand;
521
399
  const de_CreateNamespaceCommandError = async (output, context) => {
@@ -539,10 +417,9 @@ const de_CreateNamespaceCommandError = async (output, context) => {
539
417
  throw await de_ValidationExceptionRes(parsedOutput, context);
540
418
  default:
541
419
  const parsedBody = parsedOutput.body;
542
- (0, smithy_client_1.throwDefaultError)({
420
+ return throwDefaultError({
543
421
  output,
544
422
  parsedBody,
545
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
546
423
  errorCode,
547
424
  });
548
425
  }
@@ -558,7 +435,7 @@ const de_CreateSnapshotCommand = async (output, context) => {
558
435
  $metadata: deserializeMetadata(output),
559
436
  ...contents,
560
437
  };
561
- return Promise.resolve(response);
438
+ return response;
562
439
  };
563
440
  exports.de_CreateSnapshotCommand = de_CreateSnapshotCommand;
564
441
  const de_CreateSnapshotCommandError = async (output, context) => {
@@ -588,10 +465,9 @@ const de_CreateSnapshotCommandError = async (output, context) => {
588
465
  throw await de_ValidationExceptionRes(parsedOutput, context);
589
466
  default:
590
467
  const parsedBody = parsedOutput.body;
591
- (0, smithy_client_1.throwDefaultError)({
468
+ return throwDefaultError({
592
469
  output,
593
470
  parsedBody,
594
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
595
471
  errorCode,
596
472
  });
597
473
  }
@@ -602,12 +478,12 @@ const de_CreateUsageLimitCommand = async (output, context) => {
602
478
  }
603
479
  const data = await parseBody(output.body, context);
604
480
  let contents = {};
605
- contents = de_CreateUsageLimitResponse(data, context);
481
+ contents = (0, smithy_client_1._json)(data);
606
482
  const response = {
607
483
  $metadata: deserializeMetadata(output),
608
484
  ...contents,
609
485
  };
610
- return Promise.resolve(response);
486
+ return response;
611
487
  };
612
488
  exports.de_CreateUsageLimitCommand = de_CreateUsageLimitCommand;
613
489
  const de_CreateUsageLimitCommandError = async (output, context) => {
@@ -634,10 +510,9 @@ const de_CreateUsageLimitCommandError = async (output, context) => {
634
510
  throw await de_ValidationExceptionRes(parsedOutput, context);
635
511
  default:
636
512
  const parsedBody = parsedOutput.body;
637
- (0, smithy_client_1.throwDefaultError)({
513
+ return throwDefaultError({
638
514
  output,
639
515
  parsedBody,
640
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
641
516
  errorCode,
642
517
  });
643
518
  }
@@ -653,7 +528,7 @@ const de_CreateWorkgroupCommand = async (output, context) => {
653
528
  $metadata: deserializeMetadata(output),
654
529
  ...contents,
655
530
  };
656
- return Promise.resolve(response);
531
+ return response;
657
532
  };
658
533
  exports.de_CreateWorkgroupCommand = de_CreateWorkgroupCommand;
659
534
  const de_CreateWorkgroupCommandError = async (output, context) => {
@@ -683,10 +558,9 @@ const de_CreateWorkgroupCommandError = async (output, context) => {
683
558
  throw await de_ValidationExceptionRes(parsedOutput, context);
684
559
  default:
685
560
  const parsedBody = parsedOutput.body;
686
- (0, smithy_client_1.throwDefaultError)({
561
+ return throwDefaultError({
687
562
  output,
688
563
  parsedBody,
689
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
690
564
  errorCode,
691
565
  });
692
566
  }
@@ -702,7 +576,7 @@ const de_DeleteEndpointAccessCommand = async (output, context) => {
702
576
  $metadata: deserializeMetadata(output),
703
577
  ...contents,
704
578
  };
705
- return Promise.resolve(response);
579
+ return response;
706
580
  };
707
581
  exports.de_DeleteEndpointAccessCommand = de_DeleteEndpointAccessCommand;
708
582
  const de_DeleteEndpointAccessCommandError = async (output, context) => {
@@ -726,10 +600,9 @@ const de_DeleteEndpointAccessCommandError = async (output, context) => {
726
600
  throw await de_ValidationExceptionRes(parsedOutput, context);
727
601
  default:
728
602
  const parsedBody = parsedOutput.body;
729
- (0, smithy_client_1.throwDefaultError)({
603
+ return throwDefaultError({
730
604
  output,
731
605
  parsedBody,
732
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
733
606
  errorCode,
734
607
  });
735
608
  }
@@ -745,7 +618,7 @@ const de_DeleteNamespaceCommand = async (output, context) => {
745
618
  $metadata: deserializeMetadata(output),
746
619
  ...contents,
747
620
  };
748
- return Promise.resolve(response);
621
+ return response;
749
622
  };
750
623
  exports.de_DeleteNamespaceCommand = de_DeleteNamespaceCommand;
751
624
  const de_DeleteNamespaceCommandError = async (output, context) => {
@@ -769,10 +642,9 @@ const de_DeleteNamespaceCommandError = async (output, context) => {
769
642
  throw await de_ValidationExceptionRes(parsedOutput, context);
770
643
  default:
771
644
  const parsedBody = parsedOutput.body;
772
- (0, smithy_client_1.throwDefaultError)({
645
+ return throwDefaultError({
773
646
  output,
774
647
  parsedBody,
775
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
776
648
  errorCode,
777
649
  });
778
650
  }
@@ -783,12 +655,12 @@ const de_DeleteResourcePolicyCommand = async (output, context) => {
783
655
  }
784
656
  const data = await parseBody(output.body, context);
785
657
  let contents = {};
786
- contents = de_DeleteResourcePolicyResponse(data, context);
658
+ contents = (0, smithy_client_1._json)(data);
787
659
  const response = {
788
660
  $metadata: deserializeMetadata(output),
789
661
  ...contents,
790
662
  };
791
- return Promise.resolve(response);
663
+ return response;
792
664
  };
793
665
  exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
794
666
  const de_DeleteResourcePolicyCommandError = async (output, context) => {
@@ -809,10 +681,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
809
681
  throw await de_ValidationExceptionRes(parsedOutput, context);
810
682
  default:
811
683
  const parsedBody = parsedOutput.body;
812
- (0, smithy_client_1.throwDefaultError)({
684
+ return throwDefaultError({
813
685
  output,
814
686
  parsedBody,
815
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
816
687
  errorCode,
817
688
  });
818
689
  }
@@ -828,7 +699,7 @@ const de_DeleteSnapshotCommand = async (output, context) => {
828
699
  $metadata: deserializeMetadata(output),
829
700
  ...contents,
830
701
  };
831
- return Promise.resolve(response);
702
+ return response;
832
703
  };
833
704
  exports.de_DeleteSnapshotCommand = de_DeleteSnapshotCommand;
834
705
  const de_DeleteSnapshotCommandError = async (output, context) => {
@@ -852,10 +723,9 @@ const de_DeleteSnapshotCommandError = async (output, context) => {
852
723
  throw await de_ValidationExceptionRes(parsedOutput, context);
853
724
  default:
854
725
  const parsedBody = parsedOutput.body;
855
- (0, smithy_client_1.throwDefaultError)({
726
+ return throwDefaultError({
856
727
  output,
857
728
  parsedBody,
858
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
859
729
  errorCode,
860
730
  });
861
731
  }
@@ -866,12 +736,12 @@ const de_DeleteUsageLimitCommand = async (output, context) => {
866
736
  }
867
737
  const data = await parseBody(output.body, context);
868
738
  let contents = {};
869
- contents = de_DeleteUsageLimitResponse(data, context);
739
+ contents = (0, smithy_client_1._json)(data);
870
740
  const response = {
871
741
  $metadata: deserializeMetadata(output),
872
742
  ...contents,
873
743
  };
874
- return Promise.resolve(response);
744
+ return response;
875
745
  };
876
746
  exports.de_DeleteUsageLimitCommand = de_DeleteUsageLimitCommand;
877
747
  const de_DeleteUsageLimitCommandError = async (output, context) => {
@@ -895,10 +765,9 @@ const de_DeleteUsageLimitCommandError = async (output, context) => {
895
765
  throw await de_ValidationExceptionRes(parsedOutput, context);
896
766
  default:
897
767
  const parsedBody = parsedOutput.body;
898
- (0, smithy_client_1.throwDefaultError)({
768
+ return throwDefaultError({
899
769
  output,
900
770
  parsedBody,
901
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
902
771
  errorCode,
903
772
  });
904
773
  }
@@ -914,7 +783,7 @@ const de_DeleteWorkgroupCommand = async (output, context) => {
914
783
  $metadata: deserializeMetadata(output),
915
784
  ...contents,
916
785
  };
917
- return Promise.resolve(response);
786
+ return response;
918
787
  };
919
788
  exports.de_DeleteWorkgroupCommand = de_DeleteWorkgroupCommand;
920
789
  const de_DeleteWorkgroupCommandError = async (output, context) => {
@@ -938,10 +807,9 @@ const de_DeleteWorkgroupCommandError = async (output, context) => {
938
807
  throw await de_ValidationExceptionRes(parsedOutput, context);
939
808
  default:
940
809
  const parsedBody = parsedOutput.body;
941
- (0, smithy_client_1.throwDefaultError)({
810
+ return throwDefaultError({
942
811
  output,
943
812
  parsedBody,
944
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
945
813
  errorCode,
946
814
  });
947
815
  }
@@ -957,7 +825,7 @@ const de_GetCredentialsCommand = async (output, context) => {
957
825
  $metadata: deserializeMetadata(output),
958
826
  ...contents,
959
827
  };
960
- return Promise.resolve(response);
828
+ return response;
961
829
  };
962
830
  exports.de_GetCredentialsCommand = de_GetCredentialsCommand;
963
831
  const de_GetCredentialsCommandError = async (output, context) => {
@@ -978,10 +846,9 @@ const de_GetCredentialsCommandError = async (output, context) => {
978
846
  throw await de_ValidationExceptionRes(parsedOutput, context);
979
847
  default:
980
848
  const parsedBody = parsedOutput.body;
981
- (0, smithy_client_1.throwDefaultError)({
849
+ return throwDefaultError({
982
850
  output,
983
851
  parsedBody,
984
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
985
852
  errorCode,
986
853
  });
987
854
  }
@@ -997,7 +864,7 @@ const de_GetEndpointAccessCommand = async (output, context) => {
997
864
  $metadata: deserializeMetadata(output),
998
865
  ...contents,
999
866
  };
1000
- return Promise.resolve(response);
867
+ return response;
1001
868
  };
1002
869
  exports.de_GetEndpointAccessCommand = de_GetEndpointAccessCommand;
1003
870
  const de_GetEndpointAccessCommandError = async (output, context) => {
@@ -1021,10 +888,9 @@ const de_GetEndpointAccessCommandError = async (output, context) => {
1021
888
  throw await de_ValidationExceptionRes(parsedOutput, context);
1022
889
  default:
1023
890
  const parsedBody = parsedOutput.body;
1024
- (0, smithy_client_1.throwDefaultError)({
891
+ return throwDefaultError({
1025
892
  output,
1026
893
  parsedBody,
1027
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1028
894
  errorCode,
1029
895
  });
1030
896
  }
@@ -1040,7 +906,7 @@ const de_GetNamespaceCommand = async (output, context) => {
1040
906
  $metadata: deserializeMetadata(output),
1041
907
  ...contents,
1042
908
  };
1043
- return Promise.resolve(response);
909
+ return response;
1044
910
  };
1045
911
  exports.de_GetNamespaceCommand = de_GetNamespaceCommand;
1046
912
  const de_GetNamespaceCommandError = async (output, context) => {
@@ -1061,10 +927,9 @@ const de_GetNamespaceCommandError = async (output, context) => {
1061
927
  throw await de_ValidationExceptionRes(parsedOutput, context);
1062
928
  default:
1063
929
  const parsedBody = parsedOutput.body;
1064
- (0, smithy_client_1.throwDefaultError)({
930
+ return throwDefaultError({
1065
931
  output,
1066
932
  parsedBody,
1067
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1068
933
  errorCode,
1069
934
  });
1070
935
  }
@@ -1080,7 +945,7 @@ const de_GetRecoveryPointCommand = async (output, context) => {
1080
945
  $metadata: deserializeMetadata(output),
1081
946
  ...contents,
1082
947
  };
1083
- return Promise.resolve(response);
948
+ return response;
1084
949
  };
1085
950
  exports.de_GetRecoveryPointCommand = de_GetRecoveryPointCommand;
1086
951
  const de_GetRecoveryPointCommandError = async (output, context) => {
@@ -1104,10 +969,9 @@ const de_GetRecoveryPointCommandError = async (output, context) => {
1104
969
  throw await de_ValidationExceptionRes(parsedOutput, context);
1105
970
  default:
1106
971
  const parsedBody = parsedOutput.body;
1107
- (0, smithy_client_1.throwDefaultError)({
972
+ return throwDefaultError({
1108
973
  output,
1109
974
  parsedBody,
1110
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1111
975
  errorCode,
1112
976
  });
1113
977
  }
@@ -1118,12 +982,12 @@ const de_GetResourcePolicyCommand = async (output, context) => {
1118
982
  }
1119
983
  const data = await parseBody(output.body, context);
1120
984
  let contents = {};
1121
- contents = de_GetResourcePolicyResponse(data, context);
985
+ contents = (0, smithy_client_1._json)(data);
1122
986
  const response = {
1123
987
  $metadata: deserializeMetadata(output),
1124
988
  ...contents,
1125
989
  };
1126
- return Promise.resolve(response);
990
+ return response;
1127
991
  };
1128
992
  exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
1129
993
  const de_GetResourcePolicyCommandError = async (output, context) => {
@@ -1144,10 +1008,9 @@ const de_GetResourcePolicyCommandError = async (output, context) => {
1144
1008
  throw await de_ValidationExceptionRes(parsedOutput, context);
1145
1009
  default:
1146
1010
  const parsedBody = parsedOutput.body;
1147
- (0, smithy_client_1.throwDefaultError)({
1011
+ return throwDefaultError({
1148
1012
  output,
1149
1013
  parsedBody,
1150
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1151
1014
  errorCode,
1152
1015
  });
1153
1016
  }
@@ -1163,7 +1026,7 @@ const de_GetSnapshotCommand = async (output, context) => {
1163
1026
  $metadata: deserializeMetadata(output),
1164
1027
  ...contents,
1165
1028
  };
1166
- return Promise.resolve(response);
1029
+ return response;
1167
1030
  };
1168
1031
  exports.de_GetSnapshotCommand = de_GetSnapshotCommand;
1169
1032
  const de_GetSnapshotCommandError = async (output, context) => {
@@ -1184,10 +1047,9 @@ const de_GetSnapshotCommandError = async (output, context) => {
1184
1047
  throw await de_ValidationExceptionRes(parsedOutput, context);
1185
1048
  default:
1186
1049
  const parsedBody = parsedOutput.body;
1187
- (0, smithy_client_1.throwDefaultError)({
1050
+ return throwDefaultError({
1188
1051
  output,
1189
1052
  parsedBody,
1190
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1191
1053
  errorCode,
1192
1054
  });
1193
1055
  }
@@ -1203,7 +1065,7 @@ const de_GetTableRestoreStatusCommand = async (output, context) => {
1203
1065
  $metadata: deserializeMetadata(output),
1204
1066
  ...contents,
1205
1067
  };
1206
- return Promise.resolve(response);
1068
+ return response;
1207
1069
  };
1208
1070
  exports.de_GetTableRestoreStatusCommand = de_GetTableRestoreStatusCommand;
1209
1071
  const de_GetTableRestoreStatusCommandError = async (output, context) => {
@@ -1221,10 +1083,9 @@ const de_GetTableRestoreStatusCommandError = async (output, context) => {
1221
1083
  throw await de_ValidationExceptionRes(parsedOutput, context);
1222
1084
  default:
1223
1085
  const parsedBody = parsedOutput.body;
1224
- (0, smithy_client_1.throwDefaultError)({
1086
+ return throwDefaultError({
1225
1087
  output,
1226
1088
  parsedBody,
1227
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1228
1089
  errorCode,
1229
1090
  });
1230
1091
  }
@@ -1235,12 +1096,12 @@ const de_GetUsageLimitCommand = async (output, context) => {
1235
1096
  }
1236
1097
  const data = await parseBody(output.body, context);
1237
1098
  let contents = {};
1238
- contents = de_GetUsageLimitResponse(data, context);
1099
+ contents = (0, smithy_client_1._json)(data);
1239
1100
  const response = {
1240
1101
  $metadata: deserializeMetadata(output),
1241
1102
  ...contents,
1242
1103
  };
1243
- return Promise.resolve(response);
1104
+ return response;
1244
1105
  };
1245
1106
  exports.de_GetUsageLimitCommand = de_GetUsageLimitCommand;
1246
1107
  const de_GetUsageLimitCommandError = async (output, context) => {
@@ -1264,10 +1125,9 @@ const de_GetUsageLimitCommandError = async (output, context) => {
1264
1125
  throw await de_ValidationExceptionRes(parsedOutput, context);
1265
1126
  default:
1266
1127
  const parsedBody = parsedOutput.body;
1267
- (0, smithy_client_1.throwDefaultError)({
1128
+ return throwDefaultError({
1268
1129
  output,
1269
1130
  parsedBody,
1270
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1271
1131
  errorCode,
1272
1132
  });
1273
1133
  }
@@ -1283,7 +1143,7 @@ const de_GetWorkgroupCommand = async (output, context) => {
1283
1143
  $metadata: deserializeMetadata(output),
1284
1144
  ...contents,
1285
1145
  };
1286
- return Promise.resolve(response);
1146
+ return response;
1287
1147
  };
1288
1148
  exports.de_GetWorkgroupCommand = de_GetWorkgroupCommand;
1289
1149
  const de_GetWorkgroupCommandError = async (output, context) => {
@@ -1304,10 +1164,9 @@ const de_GetWorkgroupCommandError = async (output, context) => {
1304
1164
  throw await de_ValidationExceptionRes(parsedOutput, context);
1305
1165
  default:
1306
1166
  const parsedBody = parsedOutput.body;
1307
- (0, smithy_client_1.throwDefaultError)({
1167
+ return throwDefaultError({
1308
1168
  output,
1309
1169
  parsedBody,
1310
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1311
1170
  errorCode,
1312
1171
  });
1313
1172
  }
@@ -1323,7 +1182,7 @@ const de_ListEndpointAccessCommand = async (output, context) => {
1323
1182
  $metadata: deserializeMetadata(output),
1324
1183
  ...contents,
1325
1184
  };
1326
- return Promise.resolve(response);
1185
+ return response;
1327
1186
  };
1328
1187
  exports.de_ListEndpointAccessCommand = de_ListEndpointAccessCommand;
1329
1188
  const de_ListEndpointAccessCommandError = async (output, context) => {
@@ -1347,10 +1206,9 @@ const de_ListEndpointAccessCommandError = async (output, context) => {
1347
1206
  throw await de_ValidationExceptionRes(parsedOutput, context);
1348
1207
  default:
1349
1208
  const parsedBody = parsedOutput.body;
1350
- (0, smithy_client_1.throwDefaultError)({
1209
+ return throwDefaultError({
1351
1210
  output,
1352
1211
  parsedBody,
1353
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1354
1212
  errorCode,
1355
1213
  });
1356
1214
  }
@@ -1366,7 +1224,7 @@ const de_ListNamespacesCommand = async (output, context) => {
1366
1224
  $metadata: deserializeMetadata(output),
1367
1225
  ...contents,
1368
1226
  };
1369
- return Promise.resolve(response);
1227
+ return response;
1370
1228
  };
1371
1229
  exports.de_ListNamespacesCommand = de_ListNamespacesCommand;
1372
1230
  const de_ListNamespacesCommandError = async (output, context) => {
@@ -1384,10 +1242,9 @@ const de_ListNamespacesCommandError = async (output, context) => {
1384
1242
  throw await de_ValidationExceptionRes(parsedOutput, context);
1385
1243
  default:
1386
1244
  const parsedBody = parsedOutput.body;
1387
- (0, smithy_client_1.throwDefaultError)({
1245
+ return throwDefaultError({
1388
1246
  output,
1389
1247
  parsedBody,
1390
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1391
1248
  errorCode,
1392
1249
  });
1393
1250
  }
@@ -1403,7 +1260,7 @@ const de_ListRecoveryPointsCommand = async (output, context) => {
1403
1260
  $metadata: deserializeMetadata(output),
1404
1261
  ...contents,
1405
1262
  };
1406
- return Promise.resolve(response);
1263
+ return response;
1407
1264
  };
1408
1265
  exports.de_ListRecoveryPointsCommand = de_ListRecoveryPointsCommand;
1409
1266
  const de_ListRecoveryPointsCommandError = async (output, context) => {
@@ -1421,10 +1278,9 @@ const de_ListRecoveryPointsCommandError = async (output, context) => {
1421
1278
  throw await de_ValidationExceptionRes(parsedOutput, context);
1422
1279
  default:
1423
1280
  const parsedBody = parsedOutput.body;
1424
- (0, smithy_client_1.throwDefaultError)({
1281
+ return throwDefaultError({
1425
1282
  output,
1426
1283
  parsedBody,
1427
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1428
1284
  errorCode,
1429
1285
  });
1430
1286
  }
@@ -1440,7 +1296,7 @@ const de_ListSnapshotsCommand = async (output, context) => {
1440
1296
  $metadata: deserializeMetadata(output),
1441
1297
  ...contents,
1442
1298
  };
1443
- return Promise.resolve(response);
1299
+ return response;
1444
1300
  };
1445
1301
  exports.de_ListSnapshotsCommand = de_ListSnapshotsCommand;
1446
1302
  const de_ListSnapshotsCommandError = async (output, context) => {
@@ -1461,10 +1317,9 @@ const de_ListSnapshotsCommandError = async (output, context) => {
1461
1317
  throw await de_ValidationExceptionRes(parsedOutput, context);
1462
1318
  default:
1463
1319
  const parsedBody = parsedOutput.body;
1464
- (0, smithy_client_1.throwDefaultError)({
1320
+ return throwDefaultError({
1465
1321
  output,
1466
1322
  parsedBody,
1467
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1468
1323
  errorCode,
1469
1324
  });
1470
1325
  }
@@ -1480,7 +1335,7 @@ const de_ListTableRestoreStatusCommand = async (output, context) => {
1480
1335
  $metadata: deserializeMetadata(output),
1481
1336
  ...contents,
1482
1337
  };
1483
- return Promise.resolve(response);
1338
+ return response;
1484
1339
  };
1485
1340
  exports.de_ListTableRestoreStatusCommand = de_ListTableRestoreStatusCommand;
1486
1341
  const de_ListTableRestoreStatusCommandError = async (output, context) => {
@@ -1501,10 +1356,9 @@ const de_ListTableRestoreStatusCommandError = async (output, context) => {
1501
1356
  throw await de_ValidationExceptionRes(parsedOutput, context);
1502
1357
  default:
1503
1358
  const parsedBody = parsedOutput.body;
1504
- (0, smithy_client_1.throwDefaultError)({
1359
+ return throwDefaultError({
1505
1360
  output,
1506
1361
  parsedBody,
1507
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1508
1362
  errorCode,
1509
1363
  });
1510
1364
  }
@@ -1515,12 +1369,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1515
1369
  }
1516
1370
  const data = await parseBody(output.body, context);
1517
1371
  let contents = {};
1518
- contents = de_ListTagsForResourceResponse(data, context);
1372
+ contents = (0, smithy_client_1._json)(data);
1519
1373
  const response = {
1520
1374
  $metadata: deserializeMetadata(output),
1521
1375
  ...contents,
1522
1376
  };
1523
- return Promise.resolve(response);
1377
+ return response;
1524
1378
  };
1525
1379
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1526
1380
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1544,10 +1398,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1544
1398
  throw await de_ValidationExceptionRes(parsedOutput, context);
1545
1399
  default:
1546
1400
  const parsedBody = parsedOutput.body;
1547
- (0, smithy_client_1.throwDefaultError)({
1401
+ return throwDefaultError({
1548
1402
  output,
1549
1403
  parsedBody,
1550
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1551
1404
  errorCode,
1552
1405
  });
1553
1406
  }
@@ -1558,12 +1411,12 @@ const de_ListUsageLimitsCommand = async (output, context) => {
1558
1411
  }
1559
1412
  const data = await parseBody(output.body, context);
1560
1413
  let contents = {};
1561
- contents = de_ListUsageLimitsResponse(data, context);
1414
+ contents = (0, smithy_client_1._json)(data);
1562
1415
  const response = {
1563
1416
  $metadata: deserializeMetadata(output),
1564
1417
  ...contents,
1565
1418
  };
1566
- return Promise.resolve(response);
1419
+ return response;
1567
1420
  };
1568
1421
  exports.de_ListUsageLimitsCommand = de_ListUsageLimitsCommand;
1569
1422
  const de_ListUsageLimitsCommandError = async (output, context) => {
@@ -1590,10 +1443,9 @@ const de_ListUsageLimitsCommandError = async (output, context) => {
1590
1443
  throw await de_ValidationExceptionRes(parsedOutput, context);
1591
1444
  default:
1592
1445
  const parsedBody = parsedOutput.body;
1593
- (0, smithy_client_1.throwDefaultError)({
1446
+ return throwDefaultError({
1594
1447
  output,
1595
1448
  parsedBody,
1596
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1597
1449
  errorCode,
1598
1450
  });
1599
1451
  }
@@ -1609,7 +1461,7 @@ const de_ListWorkgroupsCommand = async (output, context) => {
1609
1461
  $metadata: deserializeMetadata(output),
1610
1462
  ...contents,
1611
1463
  };
1612
- return Promise.resolve(response);
1464
+ return response;
1613
1465
  };
1614
1466
  exports.de_ListWorkgroupsCommand = de_ListWorkgroupsCommand;
1615
1467
  const de_ListWorkgroupsCommandError = async (output, context) => {
@@ -1627,10 +1479,9 @@ const de_ListWorkgroupsCommandError = async (output, context) => {
1627
1479
  throw await de_ValidationExceptionRes(parsedOutput, context);
1628
1480
  default:
1629
1481
  const parsedBody = parsedOutput.body;
1630
- (0, smithy_client_1.throwDefaultError)({
1482
+ return throwDefaultError({
1631
1483
  output,
1632
1484
  parsedBody,
1633
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1634
1485
  errorCode,
1635
1486
  });
1636
1487
  }
@@ -1641,12 +1492,12 @@ const de_PutResourcePolicyCommand = async (output, context) => {
1641
1492
  }
1642
1493
  const data = await parseBody(output.body, context);
1643
1494
  let contents = {};
1644
- contents = de_PutResourcePolicyResponse(data, context);
1495
+ contents = (0, smithy_client_1._json)(data);
1645
1496
  const response = {
1646
1497
  $metadata: deserializeMetadata(output),
1647
1498
  ...contents,
1648
1499
  };
1649
- return Promise.resolve(response);
1500
+ return response;
1650
1501
  };
1651
1502
  exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
1652
1503
  const de_PutResourcePolicyCommandError = async (output, context) => {
@@ -1673,10 +1524,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
1673
1524
  throw await de_ValidationExceptionRes(parsedOutput, context);
1674
1525
  default:
1675
1526
  const parsedBody = parsedOutput.body;
1676
- (0, smithy_client_1.throwDefaultError)({
1527
+ return throwDefaultError({
1677
1528
  output,
1678
1529
  parsedBody,
1679
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1680
1530
  errorCode,
1681
1531
  });
1682
1532
  }
@@ -1692,7 +1542,7 @@ const de_RestoreFromRecoveryPointCommand = async (output, context) => {
1692
1542
  $metadata: deserializeMetadata(output),
1693
1543
  ...contents,
1694
1544
  };
1695
- return Promise.resolve(response);
1545
+ return response;
1696
1546
  };
1697
1547
  exports.de_RestoreFromRecoveryPointCommand = de_RestoreFromRecoveryPointCommand;
1698
1548
  const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
@@ -1716,10 +1566,9 @@ const de_RestoreFromRecoveryPointCommandError = async (output, context) => {
1716
1566
  throw await de_ValidationExceptionRes(parsedOutput, context);
1717
1567
  default:
1718
1568
  const parsedBody = parsedOutput.body;
1719
- (0, smithy_client_1.throwDefaultError)({
1569
+ return throwDefaultError({
1720
1570
  output,
1721
1571
  parsedBody,
1722
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1723
1572
  errorCode,
1724
1573
  });
1725
1574
  }
@@ -1735,7 +1584,7 @@ const de_RestoreFromSnapshotCommand = async (output, context) => {
1735
1584
  $metadata: deserializeMetadata(output),
1736
1585
  ...contents,
1737
1586
  };
1738
- return Promise.resolve(response);
1587
+ return response;
1739
1588
  };
1740
1589
  exports.de_RestoreFromSnapshotCommand = de_RestoreFromSnapshotCommand;
1741
1590
  const de_RestoreFromSnapshotCommandError = async (output, context) => {
@@ -1762,10 +1611,9 @@ const de_RestoreFromSnapshotCommandError = async (output, context) => {
1762
1611
  throw await de_ValidationExceptionRes(parsedOutput, context);
1763
1612
  default:
1764
1613
  const parsedBody = parsedOutput.body;
1765
- (0, smithy_client_1.throwDefaultError)({
1614
+ return throwDefaultError({
1766
1615
  output,
1767
1616
  parsedBody,
1768
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1769
1617
  errorCode,
1770
1618
  });
1771
1619
  }
@@ -1781,7 +1629,7 @@ const de_RestoreTableFromSnapshotCommand = async (output, context) => {
1781
1629
  $metadata: deserializeMetadata(output),
1782
1630
  ...contents,
1783
1631
  };
1784
- return Promise.resolve(response);
1632
+ return response;
1785
1633
  };
1786
1634
  exports.de_RestoreTableFromSnapshotCommand = de_RestoreTableFromSnapshotCommand;
1787
1635
  const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
@@ -1805,10 +1653,9 @@ const de_RestoreTableFromSnapshotCommandError = async (output, context) => {
1805
1653
  throw await de_ValidationExceptionRes(parsedOutput, context);
1806
1654
  default:
1807
1655
  const parsedBody = parsedOutput.body;
1808
- (0, smithy_client_1.throwDefaultError)({
1656
+ return throwDefaultError({
1809
1657
  output,
1810
1658
  parsedBody,
1811
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1812
1659
  errorCode,
1813
1660
  });
1814
1661
  }
@@ -1819,12 +1666,12 @@ const de_TagResourceCommand = async (output, context) => {
1819
1666
  }
1820
1667
  const data = await parseBody(output.body, context);
1821
1668
  let contents = {};
1822
- contents = de_TagResourceResponse(data, context);
1669
+ contents = (0, smithy_client_1._json)(data);
1823
1670
  const response = {
1824
1671
  $metadata: deserializeMetadata(output),
1825
1672
  ...contents,
1826
1673
  };
1827
- return Promise.resolve(response);
1674
+ return response;
1828
1675
  };
1829
1676
  exports.de_TagResourceCommand = de_TagResourceCommand;
1830
1677
  const de_TagResourceCommandError = async (output, context) => {
@@ -1851,10 +1698,9 @@ const de_TagResourceCommandError = async (output, context) => {
1851
1698
  throw await de_ValidationExceptionRes(parsedOutput, context);
1852
1699
  default:
1853
1700
  const parsedBody = parsedOutput.body;
1854
- (0, smithy_client_1.throwDefaultError)({
1701
+ return throwDefaultError({
1855
1702
  output,
1856
1703
  parsedBody,
1857
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1858
1704
  errorCode,
1859
1705
  });
1860
1706
  }
@@ -1865,12 +1711,12 @@ const de_UntagResourceCommand = async (output, context) => {
1865
1711
  }
1866
1712
  const data = await parseBody(output.body, context);
1867
1713
  let contents = {};
1868
- contents = de_UntagResourceResponse(data, context);
1714
+ contents = (0, smithy_client_1._json)(data);
1869
1715
  const response = {
1870
1716
  $metadata: deserializeMetadata(output),
1871
1717
  ...contents,
1872
1718
  };
1873
- return Promise.resolve(response);
1719
+ return response;
1874
1720
  };
1875
1721
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
1876
1722
  const de_UntagResourceCommandError = async (output, context) => {
@@ -1894,10 +1740,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1894
1740
  throw await de_ValidationExceptionRes(parsedOutput, context);
1895
1741
  default:
1896
1742
  const parsedBody = parsedOutput.body;
1897
- (0, smithy_client_1.throwDefaultError)({
1743
+ return throwDefaultError({
1898
1744
  output,
1899
1745
  parsedBody,
1900
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1901
1746
  errorCode,
1902
1747
  });
1903
1748
  }
@@ -1913,7 +1758,7 @@ const de_UpdateEndpointAccessCommand = async (output, context) => {
1913
1758
  $metadata: deserializeMetadata(output),
1914
1759
  ...contents,
1915
1760
  };
1916
- return Promise.resolve(response);
1761
+ return response;
1917
1762
  };
1918
1763
  exports.de_UpdateEndpointAccessCommand = de_UpdateEndpointAccessCommand;
1919
1764
  const de_UpdateEndpointAccessCommandError = async (output, context) => {
@@ -1940,10 +1785,9 @@ const de_UpdateEndpointAccessCommandError = async (output, context) => {
1940
1785
  throw await de_ValidationExceptionRes(parsedOutput, context);
1941
1786
  default:
1942
1787
  const parsedBody = parsedOutput.body;
1943
- (0, smithy_client_1.throwDefaultError)({
1788
+ return throwDefaultError({
1944
1789
  output,
1945
1790
  parsedBody,
1946
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1947
1791
  errorCode,
1948
1792
  });
1949
1793
  }
@@ -1959,7 +1803,7 @@ const de_UpdateNamespaceCommand = async (output, context) => {
1959
1803
  $metadata: deserializeMetadata(output),
1960
1804
  ...contents,
1961
1805
  };
1962
- return Promise.resolve(response);
1806
+ return response;
1963
1807
  };
1964
1808
  exports.de_UpdateNamespaceCommand = de_UpdateNamespaceCommand;
1965
1809
  const de_UpdateNamespaceCommandError = async (output, context) => {
@@ -1983,10 +1827,9 @@ const de_UpdateNamespaceCommandError = async (output, context) => {
1983
1827
  throw await de_ValidationExceptionRes(parsedOutput, context);
1984
1828
  default:
1985
1829
  const parsedBody = parsedOutput.body;
1986
- (0, smithy_client_1.throwDefaultError)({
1830
+ return throwDefaultError({
1987
1831
  output,
1988
1832
  parsedBody,
1989
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
1990
1833
  errorCode,
1991
1834
  });
1992
1835
  }
@@ -2002,7 +1845,7 @@ const de_UpdateSnapshotCommand = async (output, context) => {
2002
1845
  $metadata: deserializeMetadata(output),
2003
1846
  ...contents,
2004
1847
  };
2005
- return Promise.resolve(response);
1848
+ return response;
2006
1849
  };
2007
1850
  exports.de_UpdateSnapshotCommand = de_UpdateSnapshotCommand;
2008
1851
  const de_UpdateSnapshotCommandError = async (output, context) => {
@@ -2026,10 +1869,9 @@ const de_UpdateSnapshotCommandError = async (output, context) => {
2026
1869
  throw await de_ValidationExceptionRes(parsedOutput, context);
2027
1870
  default:
2028
1871
  const parsedBody = parsedOutput.body;
2029
- (0, smithy_client_1.throwDefaultError)({
1872
+ return throwDefaultError({
2030
1873
  output,
2031
1874
  parsedBody,
2032
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
2033
1875
  errorCode,
2034
1876
  });
2035
1877
  }
@@ -2040,12 +1882,12 @@ const de_UpdateUsageLimitCommand = async (output, context) => {
2040
1882
  }
2041
1883
  const data = await parseBody(output.body, context);
2042
1884
  let contents = {};
2043
- contents = de_UpdateUsageLimitResponse(data, context);
1885
+ contents = (0, smithy_client_1._json)(data);
2044
1886
  const response = {
2045
1887
  $metadata: deserializeMetadata(output),
2046
1888
  ...contents,
2047
1889
  };
2048
- return Promise.resolve(response);
1890
+ return response;
2049
1891
  };
2050
1892
  exports.de_UpdateUsageLimitCommand = de_UpdateUsageLimitCommand;
2051
1893
  const de_UpdateUsageLimitCommandError = async (output, context) => {
@@ -2069,10 +1911,9 @@ const de_UpdateUsageLimitCommandError = async (output, context) => {
2069
1911
  throw await de_ValidationExceptionRes(parsedOutput, context);
2070
1912
  default:
2071
1913
  const parsedBody = parsedOutput.body;
2072
- (0, smithy_client_1.throwDefaultError)({
1914
+ return throwDefaultError({
2073
1915
  output,
2074
1916
  parsedBody,
2075
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
2076
1917
  errorCode,
2077
1918
  });
2078
1919
  }
@@ -2088,7 +1929,7 @@ const de_UpdateWorkgroupCommand = async (output, context) => {
2088
1929
  $metadata: deserializeMetadata(output),
2089
1930
  ...contents,
2090
1931
  };
2091
- return Promise.resolve(response);
1932
+ return response;
2092
1933
  };
2093
1934
  exports.de_UpdateWorkgroupCommand = de_UpdateWorkgroupCommand;
2094
1935
  const de_UpdateWorkgroupCommandError = async (output, context) => {
@@ -2115,17 +1956,16 @@ const de_UpdateWorkgroupCommandError = async (output, context) => {
2115
1956
  throw await de_ValidationExceptionRes(parsedOutput, context);
2116
1957
  default:
2117
1958
  const parsedBody = parsedOutput.body;
2118
- (0, smithy_client_1.throwDefaultError)({
1959
+ return throwDefaultError({
2119
1960
  output,
2120
1961
  parsedBody,
2121
- exceptionCtor: RedshiftServerlessServiceException_1.RedshiftServerlessServiceException,
2122
1962
  errorCode,
2123
1963
  });
2124
1964
  }
2125
1965
  };
2126
1966
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2127
1967
  const body = parsedOutput.body;
2128
- const deserialized = de_AccessDeniedException(body, context);
1968
+ const deserialized = (0, smithy_client_1._json)(body);
2129
1969
  const exception = new models_0_1.AccessDeniedException({
2130
1970
  $metadata: deserializeMetadata(parsedOutput),
2131
1971
  ...deserialized,
@@ -2134,7 +1974,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2134
1974
  };
2135
1975
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
2136
1976
  const body = parsedOutput.body;
2137
- const deserialized = de_ConflictException(body, context);
1977
+ const deserialized = (0, smithy_client_1._json)(body);
2138
1978
  const exception = new models_0_1.ConflictException({
2139
1979
  $metadata: deserializeMetadata(parsedOutput),
2140
1980
  ...deserialized,
@@ -2143,7 +1983,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2143
1983
  };
2144
1984
  const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
2145
1985
  const body = parsedOutput.body;
2146
- const deserialized = de_InsufficientCapacityException(body, context);
1986
+ const deserialized = (0, smithy_client_1._json)(body);
2147
1987
  const exception = new models_0_1.InsufficientCapacityException({
2148
1988
  $metadata: deserializeMetadata(parsedOutput),
2149
1989
  ...deserialized,
@@ -2152,7 +1992,7 @@ const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
2152
1992
  };
2153
1993
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2154
1994
  const body = parsedOutput.body;
2155
- const deserialized = de_InternalServerException(body, context);
1995
+ const deserialized = (0, smithy_client_1._json)(body);
2156
1996
  const exception = new models_0_1.InternalServerException({
2157
1997
  $metadata: deserializeMetadata(parsedOutput),
2158
1998
  ...deserialized,
@@ -2161,7 +2001,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2161
2001
  };
2162
2002
  const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
2163
2003
  const body = parsedOutput.body;
2164
- const deserialized = de_InvalidPaginationException(body, context);
2004
+ const deserialized = (0, smithy_client_1._json)(body);
2165
2005
  const exception = new models_0_1.InvalidPaginationException({
2166
2006
  $metadata: deserializeMetadata(parsedOutput),
2167
2007
  ...deserialized,
@@ -2170,7 +2010,7 @@ const de_InvalidPaginationExceptionRes = async (parsedOutput, context) => {
2170
2010
  };
2171
2011
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2172
2012
  const body = parsedOutput.body;
2173
- const deserialized = de_ResourceNotFoundException(body, context);
2013
+ const deserialized = (0, smithy_client_1._json)(body);
2174
2014
  const exception = new models_0_1.ResourceNotFoundException({
2175
2015
  $metadata: deserializeMetadata(parsedOutput),
2176
2016
  ...deserialized,
@@ -2179,7 +2019,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2179
2019
  };
2180
2020
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2181
2021
  const body = parsedOutput.body;
2182
- const deserialized = de_ServiceQuotaExceededException(body, context);
2022
+ const deserialized = (0, smithy_client_1._json)(body);
2183
2023
  const exception = new models_0_1.ServiceQuotaExceededException({
2184
2024
  $metadata: deserializeMetadata(parsedOutput),
2185
2025
  ...deserialized,
@@ -2188,7 +2028,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2188
2028
  };
2189
2029
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2190
2030
  const body = parsedOutput.body;
2191
- const deserialized = de_ThrottlingException(body, context);
2031
+ const deserialized = (0, smithy_client_1._json)(body);
2192
2032
  const exception = new models_0_1.ThrottlingException({
2193
2033
  $metadata: deserializeMetadata(parsedOutput),
2194
2034
  ...deserialized,
@@ -2197,7 +2037,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2197
2037
  };
2198
2038
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2199
2039
  const body = parsedOutput.body;
2200
- const deserialized = de_TooManyTagsException(body, context);
2040
+ const deserialized = (0, smithy_client_1._json)(body);
2201
2041
  const exception = new models_0_1.TooManyTagsException({
2202
2042
  $metadata: deserializeMetadata(parsedOutput),
2203
2043
  ...deserialized,
@@ -2206,1009 +2046,335 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2206
2046
  };
2207
2047
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
2208
2048
  const body = parsedOutput.body;
2209
- const deserialized = de_ValidationException(body, context);
2049
+ const deserialized = (0, smithy_client_1._json)(body);
2210
2050
  const exception = new models_0_1.ValidationException({
2211
2051
  $metadata: deserializeMetadata(parsedOutput),
2212
2052
  ...deserialized,
2213
2053
  });
2214
2054
  return (0, smithy_client_1.decorateServiceException)(exception, body);
2215
2055
  };
2216
- const se_ConfigParameter = (input, context) => {
2217
- return {
2218
- ...(input.parameterKey != null && { parameterKey: input.parameterKey }),
2219
- ...(input.parameterValue != null && { parameterValue: input.parameterValue }),
2220
- };
2221
- };
2222
- const se_ConfigParameterList = (input, context) => {
2223
- return input
2224
- .filter((e) => e != null)
2225
- .map((entry) => {
2226
- return se_ConfigParameter(entry, context);
2227
- });
2228
- };
2229
- const se_ConvertRecoveryPointToSnapshotRequest = (input, context) => {
2230
- return {
2231
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2232
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2233
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2234
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2235
- };
2236
- };
2237
- const se_CreateEndpointAccessRequest = (input, context) => {
2238
- return {
2239
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2240
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2241
- ...(input.vpcSecurityGroupIds != null && {
2242
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2243
- }),
2244
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2245
- };
2246
- };
2247
- const se_CreateNamespaceRequest = (input, context) => {
2248
- return {
2249
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2250
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2251
- ...(input.dbName != null && { dbName: input.dbName }),
2252
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2253
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2254
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2255
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2256
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2257
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2258
- };
2259
- };
2260
- const se_CreateSnapshotRequest = (input, context) => {
2261
- return {
2262
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2263
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2264
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2265
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2266
- };
2267
- };
2268
- const se_CreateUsageLimitRequest = (input, context) => {
2269
- return {
2270
- ...(input.amount != null && { amount: input.amount }),
2271
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2272
- ...(input.period != null && { period: input.period }),
2273
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2274
- ...(input.usageType != null && { usageType: input.usageType }),
2275
- };
2276
- };
2277
- const se_CreateWorkgroupRequest = (input, context) => {
2278
- return {
2279
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2280
- ...(input.configParameters != null && {
2281
- configParameters: se_ConfigParameterList(input.configParameters, context),
2282
- }),
2283
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2284
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2285
- ...(input.port != null && { port: input.port }),
2286
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2287
- ...(input.securityGroupIds != null && {
2288
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2289
- }),
2290
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2291
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2292
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2293
- };
2294
- };
2295
- const se_DeleteEndpointAccessRequest = (input, context) => {
2296
- return {
2297
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2298
- };
2299
- };
2300
- const se_DeleteNamespaceRequest = (input, context) => {
2301
- return {
2302
- ...(input.finalSnapshotName != null && { finalSnapshotName: input.finalSnapshotName }),
2303
- ...(input.finalSnapshotRetentionPeriod != null && {
2304
- finalSnapshotRetentionPeriod: input.finalSnapshotRetentionPeriod,
2305
- }),
2306
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2307
- };
2308
- };
2309
- const se_DeleteResourcePolicyRequest = (input, context) => {
2310
- return {
2311
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2312
- };
2313
- };
2314
- const se_DeleteSnapshotRequest = (input, context) => {
2315
- return {
2316
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2317
- };
2318
- };
2319
- const se_DeleteUsageLimitRequest = (input, context) => {
2320
- return {
2321
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2322
- };
2323
- };
2324
- const se_DeleteWorkgroupRequest = (input, context) => {
2325
- return {
2326
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2327
- };
2328
- };
2329
- const se_GetCredentialsRequest = (input, context) => {
2330
- return {
2331
- ...(input.dbName != null && { dbName: input.dbName }),
2332
- ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }),
2333
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2334
- };
2335
- };
2336
- const se_GetEndpointAccessRequest = (input, context) => {
2337
- return {
2338
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2339
- };
2340
- };
2341
- const se_GetNamespaceRequest = (input, context) => {
2342
- return {
2343
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2344
- };
2345
- };
2346
- const se_GetRecoveryPointRequest = (input, context) => {
2347
- return {
2348
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2349
- };
2350
- };
2351
- const se_GetResourcePolicyRequest = (input, context) => {
2352
- return {
2353
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2354
- };
2355
- };
2356
- const se_GetSnapshotRequest = (input, context) => {
2357
- return {
2358
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2359
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2360
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2361
- };
2362
- };
2363
- const se_GetTableRestoreStatusRequest = (input, context) => {
2364
- return {
2365
- ...(input.tableRestoreRequestId != null && { tableRestoreRequestId: input.tableRestoreRequestId }),
2366
- };
2367
- };
2368
- const se_GetUsageLimitRequest = (input, context) => {
2369
- return {
2370
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2371
- };
2372
- };
2373
- const se_GetWorkgroupRequest = (input, context) => {
2374
- return {
2375
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2376
- };
2377
- };
2378
- const se_IamRoleArnList = (input, context) => {
2379
- return input
2380
- .filter((e) => e != null)
2381
- .map((entry) => {
2382
- return entry;
2383
- });
2384
- };
2385
- const se_ListEndpointAccessRequest = (input, context) => {
2386
- return {
2387
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2388
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2389
- ...(input.vpcId != null && { vpcId: input.vpcId }),
2390
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2391
- };
2392
- };
2393
- const se_ListNamespacesRequest = (input, context) => {
2394
- return {
2395
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2396
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2397
- };
2398
- };
2399
2056
  const se_ListRecoveryPointsRequest = (input, context) => {
2400
- return {
2401
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2402
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2403
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2404
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2405
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2406
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2407
- };
2408
- };
2409
- const se_ListSnapshotsRequest = (input, context) => {
2410
- return {
2411
- ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
2412
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2413
- ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }),
2414
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2415
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2416
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2417
- ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
2418
- };
2419
- };
2420
- const se_ListTableRestoreStatusRequest = (input, context) => {
2421
- return {
2422
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2423
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2424
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2425
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2426
- };
2427
- };
2428
- const se_ListTagsForResourceRequest = (input, context) => {
2429
- return {
2430
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2431
- };
2432
- };
2433
- const se_ListUsageLimitsRequest = (input, context) => {
2434
- return {
2435
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2436
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2437
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2438
- ...(input.usageType != null && { usageType: input.usageType }),
2439
- };
2440
- };
2441
- const se_ListWorkgroupsRequest = (input, context) => {
2442
- return {
2443
- ...(input.maxResults != null && { maxResults: input.maxResults }),
2444
- ...(input.nextToken != null && { nextToken: input.nextToken }),
2445
- };
2446
- };
2447
- const se_LogExportList = (input, context) => {
2448
- return input
2449
- .filter((e) => e != null)
2450
- .map((entry) => {
2451
- return entry;
2452
- });
2453
- };
2454
- const se_PutResourcePolicyRequest = (input, context) => {
2455
- return {
2456
- ...(input.policy != null && { policy: input.policy }),
2457
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2458
- };
2459
- };
2460
- const se_RestoreFromRecoveryPointRequest = (input, context) => {
2461
- return {
2462
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2463
- ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }),
2464
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2465
- };
2466
- };
2467
- const se_RestoreFromSnapshotRequest = (input, context) => {
2468
- return {
2469
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2470
- ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }),
2471
- ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }),
2472
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2473
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2474
- };
2475
- };
2476
- const se_RestoreTableFromSnapshotRequest = (input, context) => {
2477
- return {
2478
- ...(input.activateCaseSensitiveIdentifier != null && {
2479
- activateCaseSensitiveIdentifier: input.activateCaseSensitiveIdentifier,
2480
- }),
2481
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2482
- ...(input.newTableName != null && { newTableName: input.newTableName }),
2483
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2484
- ...(input.sourceDatabaseName != null && { sourceDatabaseName: input.sourceDatabaseName }),
2485
- ...(input.sourceSchemaName != null && { sourceSchemaName: input.sourceSchemaName }),
2486
- ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }),
2487
- ...(input.targetDatabaseName != null && { targetDatabaseName: input.targetDatabaseName }),
2488
- ...(input.targetSchemaName != null && { targetSchemaName: input.targetSchemaName }),
2489
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2490
- };
2491
- };
2492
- const se_SecurityGroupIdList = (input, context) => {
2493
- return input
2494
- .filter((e) => e != null)
2495
- .map((entry) => {
2496
- return entry;
2497
- });
2498
- };
2499
- const se_SubnetIdList = (input, context) => {
2500
- return input
2501
- .filter((e) => e != null)
2502
- .map((entry) => {
2503
- return entry;
2504
- });
2505
- };
2506
- const se_Tag = (input, context) => {
2507
- return {
2508
- ...(input.key != null && { key: input.key }),
2509
- ...(input.value != null && { value: input.value }),
2510
- };
2511
- };
2512
- const se_TagKeyList = (input, context) => {
2513
- return input
2514
- .filter((e) => e != null)
2515
- .map((entry) => {
2516
- return entry;
2517
- });
2518
- };
2519
- const se_TagList = (input, context) => {
2520
- return input
2521
- .filter((e) => e != null)
2522
- .map((entry) => {
2523
- return se_Tag(entry, context);
2524
- });
2525
- };
2526
- const se_TagResourceRequest = (input, context) => {
2527
- return {
2528
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2529
- ...(input.tags != null && { tags: se_TagList(input.tags, context) }),
2530
- };
2531
- };
2532
- const se_UntagResourceRequest = (input, context) => {
2533
- return {
2534
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2535
- ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }),
2536
- };
2537
- };
2538
- const se_UpdateEndpointAccessRequest = (input, context) => {
2539
- return {
2540
- ...(input.endpointName != null && { endpointName: input.endpointName }),
2541
- ...(input.vpcSecurityGroupIds != null && {
2542
- vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context),
2543
- }),
2544
- };
2545
- };
2546
- const se_UpdateNamespaceRequest = (input, context) => {
2547
- return {
2548
- ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }),
2549
- ...(input.adminUsername != null && { adminUsername: input.adminUsername }),
2550
- ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }),
2551
- ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }),
2552
- ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
2553
- ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }),
2554
- ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
2555
- };
2556
- };
2557
- const se_UpdateSnapshotRequest = (input, context) => {
2558
- return {
2559
- ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }),
2560
- ...(input.snapshotName != null && { snapshotName: input.snapshotName }),
2561
- };
2562
- };
2563
- const se_UpdateUsageLimitRequest = (input, context) => {
2564
- return {
2565
- ...(input.amount != null && { amount: input.amount }),
2566
- ...(input.breachAction != null && { breachAction: input.breachAction }),
2567
- ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }),
2568
- };
2569
- };
2570
- const se_UpdateWorkgroupRequest = (input, context) => {
2571
- return {
2572
- ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }),
2573
- ...(input.configParameters != null && {
2574
- configParameters: se_ConfigParameterList(input.configParameters, context),
2575
- }),
2576
- ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }),
2577
- ...(input.port != null && { port: input.port }),
2578
- ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }),
2579
- ...(input.securityGroupIds != null && {
2580
- securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context),
2581
- }),
2582
- ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }),
2583
- ...(input.workgroupName != null && { workgroupName: input.workgroupName }),
2584
- };
2585
- };
2586
- const se_VpcSecurityGroupIdList = (input, context) => {
2587
- return input
2588
- .filter((e) => e != null)
2589
- .map((entry) => {
2590
- return entry;
2057
+ return (0, smithy_client_1.take)(input, {
2058
+ endTime: (_) => Math.round(_.getTime() / 1000),
2059
+ maxResults: [],
2060
+ namespaceArn: [],
2061
+ namespaceName: [],
2062
+ nextToken: [],
2063
+ startTime: (_) => Math.round(_.getTime() / 1000),
2591
2064
  });
2592
2065
  };
2593
- const de_AccessDeniedException = (output, context) => {
2594
- return {
2595
- code: (0, smithy_client_1.expectString)(output.code),
2596
- message: (0, smithy_client_1.expectString)(output.message),
2597
- };
2598
- };
2599
- const de_AccountIdList = (output, context) => {
2600
- const retVal = (output || [])
2601
- .filter((e) => e != null)
2602
- .map((entry) => {
2603
- if (entry === null) {
2604
- return null;
2605
- }
2606
- return (0, smithy_client_1.expectString)(entry);
2607
- });
2608
- return retVal;
2609
- };
2610
- const de_ConfigParameter = (output, context) => {
2611
- return {
2612
- parameterKey: (0, smithy_client_1.expectString)(output.parameterKey),
2613
- parameterValue: (0, smithy_client_1.expectString)(output.parameterValue),
2614
- };
2615
- };
2616
- const de_ConfigParameterList = (output, context) => {
2617
- const retVal = (output || [])
2618
- .filter((e) => e != null)
2619
- .map((entry) => {
2620
- if (entry === null) {
2621
- return null;
2622
- }
2623
- return de_ConfigParameter(entry, context);
2066
+ const se_ListSnapshotsRequest = (input, context) => {
2067
+ return (0, smithy_client_1.take)(input, {
2068
+ endTime: (_) => Math.round(_.getTime() / 1000),
2069
+ maxResults: [],
2070
+ namespaceArn: [],
2071
+ namespaceName: [],
2072
+ nextToken: [],
2073
+ ownerAccount: [],
2074
+ startTime: (_) => Math.round(_.getTime() / 1000),
2624
2075
  });
2625
- return retVal;
2626
- };
2627
- const de_ConflictException = (output, context) => {
2628
- return {
2629
- message: (0, smithy_client_1.expectString)(output.message),
2630
- };
2631
2076
  };
2632
2077
  const de_ConvertRecoveryPointToSnapshotResponse = (output, context) => {
2633
- return {
2634
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2635
- };
2078
+ return (0, smithy_client_1.take)(output, {
2079
+ snapshot: (_) => de_Snapshot(_, context),
2080
+ });
2636
2081
  };
2637
2082
  const de_CreateEndpointAccessResponse = (output, context) => {
2638
- return {
2639
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2640
- };
2083
+ return (0, smithy_client_1.take)(output, {
2084
+ endpoint: (_) => de_EndpointAccess(_, context),
2085
+ });
2641
2086
  };
2642
2087
  const de_CreateNamespaceResponse = (output, context) => {
2643
- return {
2644
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2645
- };
2088
+ return (0, smithy_client_1.take)(output, {
2089
+ namespace: (_) => de_Namespace(_, context),
2090
+ });
2646
2091
  };
2647
2092
  const de_CreateSnapshotResponse = (output, context) => {
2648
- return {
2649
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2650
- };
2651
- };
2652
- const de_CreateUsageLimitResponse = (output, context) => {
2653
- return {
2654
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2655
- };
2093
+ return (0, smithy_client_1.take)(output, {
2094
+ snapshot: (_) => de_Snapshot(_, context),
2095
+ });
2656
2096
  };
2657
2097
  const de_CreateWorkgroupResponse = (output, context) => {
2658
- return {
2659
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2660
- };
2098
+ return (0, smithy_client_1.take)(output, {
2099
+ workgroup: (_) => de_Workgroup(_, context),
2100
+ });
2661
2101
  };
2662
2102
  const de_DeleteEndpointAccessResponse = (output, context) => {
2663
- return {
2664
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2665
- };
2103
+ return (0, smithy_client_1.take)(output, {
2104
+ endpoint: (_) => de_EndpointAccess(_, context),
2105
+ });
2666
2106
  };
2667
2107
  const de_DeleteNamespaceResponse = (output, context) => {
2668
- return {
2669
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2670
- };
2671
- };
2672
- const de_DeleteResourcePolicyResponse = (output, context) => {
2673
- return {};
2108
+ return (0, smithy_client_1.take)(output, {
2109
+ namespace: (_) => de_Namespace(_, context),
2110
+ });
2674
2111
  };
2675
2112
  const de_DeleteSnapshotResponse = (output, context) => {
2676
- return {
2677
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2678
- };
2679
- };
2680
- const de_DeleteUsageLimitResponse = (output, context) => {
2681
- return {
2682
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2683
- };
2113
+ return (0, smithy_client_1.take)(output, {
2114
+ snapshot: (_) => de_Snapshot(_, context),
2115
+ });
2684
2116
  };
2685
2117
  const de_DeleteWorkgroupResponse = (output, context) => {
2686
- return {
2687
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2688
- };
2689
- };
2690
- const de_Endpoint = (output, context) => {
2691
- return {
2692
- address: (0, smithy_client_1.expectString)(output.address),
2693
- port: (0, smithy_client_1.expectInt32)(output.port),
2694
- vpcEndpoints: output.vpcEndpoints != null ? de_VpcEndpointList(output.vpcEndpoints, context) : undefined,
2695
- };
2118
+ return (0, smithy_client_1.take)(output, {
2119
+ workgroup: (_) => de_Workgroup(_, context),
2120
+ });
2696
2121
  };
2697
2122
  const de_EndpointAccess = (output, context) => {
2698
- return {
2699
- address: (0, smithy_client_1.expectString)(output.address),
2700
- endpointArn: (0, smithy_client_1.expectString)(output.endpointArn),
2701
- endpointCreateTime: output.endpointCreateTime != null
2702
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.endpointCreateTime))
2703
- : undefined,
2704
- endpointName: (0, smithy_client_1.expectString)(output.endpointName),
2705
- endpointStatus: (0, smithy_client_1.expectString)(output.endpointStatus),
2706
- port: (0, smithy_client_1.expectInt32)(output.port),
2707
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
2708
- vpcEndpoint: output.vpcEndpoint != null ? de_VpcEndpoint(output.vpcEndpoint, context) : undefined,
2709
- vpcSecurityGroups: output.vpcSecurityGroups != null
2710
- ? de_VpcSecurityGroupMembershipList(output.vpcSecurityGroups, context)
2711
- : undefined,
2712
- workgroupName: (0, smithy_client_1.expectString)(output.workgroupName),
2713
- };
2123
+ return (0, smithy_client_1.take)(output, {
2124
+ address: smithy_client_1.expectString,
2125
+ endpointArn: smithy_client_1.expectString,
2126
+ endpointCreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2127
+ endpointName: smithy_client_1.expectString,
2128
+ endpointStatus: smithy_client_1.expectString,
2129
+ port: smithy_client_1.expectInt32,
2130
+ subnetIds: smithy_client_1._json,
2131
+ vpcEndpoint: smithy_client_1._json,
2132
+ vpcSecurityGroups: smithy_client_1._json,
2133
+ workgroupName: smithy_client_1.expectString,
2134
+ });
2714
2135
  };
2715
2136
  const de_EndpointAccessList = (output, context) => {
2716
2137
  const retVal = (output || [])
2717
2138
  .filter((e) => e != null)
2718
2139
  .map((entry) => {
2719
- if (entry === null) {
2720
- return null;
2721
- }
2722
2140
  return de_EndpointAccess(entry, context);
2723
2141
  });
2724
2142
  return retVal;
2725
2143
  };
2726
2144
  const de_GetCredentialsResponse = (output, context) => {
2727
- return {
2728
- dbPassword: (0, smithy_client_1.expectString)(output.dbPassword),
2729
- dbUser: (0, smithy_client_1.expectString)(output.dbUser),
2730
- expiration: output.expiration != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.expiration))) : undefined,
2731
- nextRefreshTime: output.nextRefreshTime != null
2732
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.nextRefreshTime)))
2733
- : undefined,
2734
- };
2145
+ return (0, smithy_client_1.take)(output, {
2146
+ dbPassword: smithy_client_1.expectString,
2147
+ dbUser: smithy_client_1.expectString,
2148
+ expiration: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2149
+ nextRefreshTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2150
+ });
2735
2151
  };
2736
2152
  const de_GetEndpointAccessResponse = (output, context) => {
2737
- return {
2738
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
2739
- };
2153
+ return (0, smithy_client_1.take)(output, {
2154
+ endpoint: (_) => de_EndpointAccess(_, context),
2155
+ });
2740
2156
  };
2741
2157
  const de_GetNamespaceResponse = (output, context) => {
2742
- return {
2743
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2744
- };
2158
+ return (0, smithy_client_1.take)(output, {
2159
+ namespace: (_) => de_Namespace(_, context),
2160
+ });
2745
2161
  };
2746
2162
  const de_GetRecoveryPointResponse = (output, context) => {
2747
- return {
2748
- recoveryPoint: output.recoveryPoint != null ? de_RecoveryPoint(output.recoveryPoint, context) : undefined,
2749
- };
2750
- };
2751
- const de_GetResourcePolicyResponse = (output, context) => {
2752
- return {
2753
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2754
- };
2163
+ return (0, smithy_client_1.take)(output, {
2164
+ recoveryPoint: (_) => de_RecoveryPoint(_, context),
2165
+ });
2755
2166
  };
2756
2167
  const de_GetSnapshotResponse = (output, context) => {
2757
- return {
2758
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
2759
- };
2168
+ return (0, smithy_client_1.take)(output, {
2169
+ snapshot: (_) => de_Snapshot(_, context),
2170
+ });
2760
2171
  };
2761
2172
  const de_GetTableRestoreStatusResponse = (output, context) => {
2762
- return {
2763
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2764
- };
2765
- };
2766
- const de_GetUsageLimitResponse = (output, context) => {
2767
- return {
2768
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
2769
- };
2173
+ return (0, smithy_client_1.take)(output, {
2174
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2175
+ });
2770
2176
  };
2771
2177
  const de_GetWorkgroupResponse = (output, context) => {
2772
- return {
2773
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
2774
- };
2775
- };
2776
- const de_IamRoleArnList = (output, context) => {
2777
- const retVal = (output || [])
2778
- .filter((e) => e != null)
2779
- .map((entry) => {
2780
- if (entry === null) {
2781
- return null;
2782
- }
2783
- return (0, smithy_client_1.expectString)(entry);
2178
+ return (0, smithy_client_1.take)(output, {
2179
+ workgroup: (_) => de_Workgroup(_, context),
2784
2180
  });
2785
- return retVal;
2786
- };
2787
- const de_InsufficientCapacityException = (output, context) => {
2788
- return {
2789
- message: (0, smithy_client_1.expectString)(output.message),
2790
- };
2791
- };
2792
- const de_InternalServerException = (output, context) => {
2793
- return {
2794
- message: (0, smithy_client_1.expectString)(output.message),
2795
- };
2796
- };
2797
- const de_InvalidPaginationException = (output, context) => {
2798
- return {
2799
- message: (0, smithy_client_1.expectString)(output.message),
2800
- };
2801
2181
  };
2802
2182
  const de_ListEndpointAccessResponse = (output, context) => {
2803
- return {
2804
- endpoints: output.endpoints != null ? de_EndpointAccessList(output.endpoints, context) : undefined,
2805
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2806
- };
2183
+ return (0, smithy_client_1.take)(output, {
2184
+ endpoints: (_) => de_EndpointAccessList(_, context),
2185
+ nextToken: smithy_client_1.expectString,
2186
+ });
2807
2187
  };
2808
2188
  const de_ListNamespacesResponse = (output, context) => {
2809
- return {
2810
- namespaces: output.namespaces != null ? de_NamespaceList(output.namespaces, context) : undefined,
2811
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2812
- };
2189
+ return (0, smithy_client_1.take)(output, {
2190
+ namespaces: (_) => de_NamespaceList(_, context),
2191
+ nextToken: smithy_client_1.expectString,
2192
+ });
2813
2193
  };
2814
2194
  const de_ListRecoveryPointsResponse = (output, context) => {
2815
- return {
2816
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2817
- recoveryPoints: output.recoveryPoints != null ? de_RecoveryPointList(output.recoveryPoints, context) : undefined,
2818
- };
2195
+ return (0, smithy_client_1.take)(output, {
2196
+ nextToken: smithy_client_1.expectString,
2197
+ recoveryPoints: (_) => de_RecoveryPointList(_, context),
2198
+ });
2819
2199
  };
2820
2200
  const de_ListSnapshotsResponse = (output, context) => {
2821
- return {
2822
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2823
- snapshots: output.snapshots != null ? de_SnapshotList(output.snapshots, context) : undefined,
2824
- };
2201
+ return (0, smithy_client_1.take)(output, {
2202
+ nextToken: smithy_client_1.expectString,
2203
+ snapshots: (_) => de_SnapshotList(_, context),
2204
+ });
2825
2205
  };
2826
2206
  const de_ListTableRestoreStatusResponse = (output, context) => {
2827
- return {
2828
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2829
- tableRestoreStatuses: output.tableRestoreStatuses != null ? de_TableRestoreStatusList(output.tableRestoreStatuses, context) : undefined,
2830
- };
2831
- };
2832
- const de_ListTagsForResourceResponse = (output, context) => {
2833
- return {
2834
- tags: output.tags != null ? de_TagList(output.tags, context) : undefined,
2835
- };
2836
- };
2837
- const de_ListUsageLimitsResponse = (output, context) => {
2838
- return {
2839
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2840
- usageLimits: output.usageLimits != null ? de_UsageLimits(output.usageLimits, context) : undefined,
2841
- };
2207
+ return (0, smithy_client_1.take)(output, {
2208
+ nextToken: smithy_client_1.expectString,
2209
+ tableRestoreStatuses: (_) => de_TableRestoreStatusList(_, context),
2210
+ });
2842
2211
  };
2843
2212
  const de_ListWorkgroupsResponse = (output, context) => {
2844
- return {
2845
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
2846
- workgroups: output.workgroups != null ? de_WorkgroupList(output.workgroups, context) : undefined,
2847
- };
2848
- };
2849
- const de_LogExportList = (output, context) => {
2850
- const retVal = (output || [])
2851
- .filter((e) => e != null)
2852
- .map((entry) => {
2853
- if (entry === null) {
2854
- return null;
2855
- }
2856
- return (0, smithy_client_1.expectString)(entry);
2213
+ return (0, smithy_client_1.take)(output, {
2214
+ nextToken: smithy_client_1.expectString,
2215
+ workgroups: (_) => de_WorkgroupList(_, context),
2857
2216
  });
2858
- return retVal;
2859
2217
  };
2860
2218
  const de_Namespace = (output, context) => {
2861
- return {
2862
- adminUsername: (0, smithy_client_1.expectString)(output.adminUsername),
2863
- creationDate: output.creationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationDate)) : undefined,
2864
- dbName: (0, smithy_client_1.expectString)(output.dbName),
2865
- defaultIamRoleArn: (0, smithy_client_1.expectString)(output.defaultIamRoleArn),
2866
- iamRoles: output.iamRoles != null ? de_IamRoleArnList(output.iamRoles, context) : undefined,
2867
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
2868
- logExports: output.logExports != null ? de_LogExportList(output.logExports, context) : undefined,
2869
- namespaceArn: (0, smithy_client_1.expectString)(output.namespaceArn),
2870
- namespaceId: (0, smithy_client_1.expectString)(output.namespaceId),
2871
- namespaceName: (0, smithy_client_1.expectString)(output.namespaceName),
2872
- status: (0, smithy_client_1.expectString)(output.status),
2873
- };
2219
+ return (0, smithy_client_1.take)(output, {
2220
+ adminUsername: smithy_client_1.expectString,
2221
+ creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2222
+ dbName: smithy_client_1.expectString,
2223
+ defaultIamRoleArn: smithy_client_1.expectString,
2224
+ iamRoles: smithy_client_1._json,
2225
+ kmsKeyId: smithy_client_1.expectString,
2226
+ logExports: smithy_client_1._json,
2227
+ namespaceArn: smithy_client_1.expectString,
2228
+ namespaceId: smithy_client_1.expectString,
2229
+ namespaceName: smithy_client_1.expectString,
2230
+ status: smithy_client_1.expectString,
2231
+ });
2874
2232
  };
2875
2233
  const de_NamespaceList = (output, context) => {
2876
2234
  const retVal = (output || [])
2877
2235
  .filter((e) => e != null)
2878
2236
  .map((entry) => {
2879
- if (entry === null) {
2880
- return null;
2881
- }
2882
2237
  return de_Namespace(entry, context);
2883
2238
  });
2884
2239
  return retVal;
2885
2240
  };
2886
- const de_NetworkInterface = (output, context) => {
2887
- return {
2888
- availabilityZone: (0, smithy_client_1.expectString)(output.availabilityZone),
2889
- networkInterfaceId: (0, smithy_client_1.expectString)(output.networkInterfaceId),
2890
- privateIpAddress: (0, smithy_client_1.expectString)(output.privateIpAddress),
2891
- subnetId: (0, smithy_client_1.expectString)(output.subnetId),
2892
- };
2893
- };
2894
- const de_NetworkInterfaceList = (output, context) => {
2895
- const retVal = (output || [])
2896
- .filter((e) => e != null)
2897
- .map((entry) => {
2898
- if (entry === null) {
2899
- return null;
2900
- }
2901
- return de_NetworkInterface(entry, context);
2902
- });
2903
- return retVal;
2904
- };
2905
- const de_PutResourcePolicyResponse = (output, context) => {
2906
- return {
2907
- resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined,
2908
- };
2909
- };
2910
2241
  const de_RecoveryPoint = (output, context) => {
2911
- return {
2912
- namespaceArn: (0, smithy_client_1.expectString)(output.namespaceArn),
2913
- namespaceName: (0, smithy_client_1.expectString)(output.namespaceName),
2914
- recoveryPointCreateTime: output.recoveryPointCreateTime != null
2915
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.recoveryPointCreateTime))
2916
- : undefined,
2917
- recoveryPointId: (0, smithy_client_1.expectString)(output.recoveryPointId),
2918
- totalSizeInMegaBytes: (0, smithy_client_1.limitedParseDouble)(output.totalSizeInMegaBytes),
2919
- workgroupName: (0, smithy_client_1.expectString)(output.workgroupName),
2920
- };
2242
+ return (0, smithy_client_1.take)(output, {
2243
+ namespaceArn: smithy_client_1.expectString,
2244
+ namespaceName: smithy_client_1.expectString,
2245
+ recoveryPointCreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2246
+ recoveryPointId: smithy_client_1.expectString,
2247
+ totalSizeInMegaBytes: smithy_client_1.limitedParseDouble,
2248
+ workgroupName: smithy_client_1.expectString,
2249
+ });
2921
2250
  };
2922
2251
  const de_RecoveryPointList = (output, context) => {
2923
2252
  const retVal = (output || [])
2924
2253
  .filter((e) => e != null)
2925
2254
  .map((entry) => {
2926
- if (entry === null) {
2927
- return null;
2928
- }
2929
2255
  return de_RecoveryPoint(entry, context);
2930
2256
  });
2931
2257
  return retVal;
2932
2258
  };
2933
- const de_ResourceNotFoundException = (output, context) => {
2934
- return {
2935
- message: (0, smithy_client_1.expectString)(output.message),
2936
- resourceName: (0, smithy_client_1.expectString)(output.resourceName),
2937
- };
2938
- };
2939
- const de_ResourcePolicy = (output, context) => {
2940
- return {
2941
- policy: (0, smithy_client_1.expectString)(output.policy),
2942
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
2943
- };
2944
- };
2945
2259
  const de_RestoreFromRecoveryPointResponse = (output, context) => {
2946
- return {
2947
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2948
- recoveryPointId: (0, smithy_client_1.expectString)(output.recoveryPointId),
2949
- };
2260
+ return (0, smithy_client_1.take)(output, {
2261
+ namespace: (_) => de_Namespace(_, context),
2262
+ recoveryPointId: smithy_client_1.expectString,
2263
+ });
2950
2264
  };
2951
2265
  const de_RestoreFromSnapshotResponse = (output, context) => {
2952
- return {
2953
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
2954
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
2955
- snapshotName: (0, smithy_client_1.expectString)(output.snapshotName),
2956
- };
2266
+ return (0, smithy_client_1.take)(output, {
2267
+ namespace: (_) => de_Namespace(_, context),
2268
+ ownerAccount: smithy_client_1.expectString,
2269
+ snapshotName: smithy_client_1.expectString,
2270
+ });
2957
2271
  };
2958
2272
  const de_RestoreTableFromSnapshotResponse = (output, context) => {
2959
- return {
2960
- tableRestoreStatus: output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined,
2961
- };
2962
- };
2963
- const de_SecurityGroupIdList = (output, context) => {
2964
- const retVal = (output || [])
2965
- .filter((e) => e != null)
2966
- .map((entry) => {
2967
- if (entry === null) {
2968
- return null;
2969
- }
2970
- return (0, smithy_client_1.expectString)(entry);
2273
+ return (0, smithy_client_1.take)(output, {
2274
+ tableRestoreStatus: (_) => de_TableRestoreStatus(_, context),
2971
2275
  });
2972
- return retVal;
2973
- };
2974
- const de_ServiceQuotaExceededException = (output, context) => {
2975
- return {
2976
- message: (0, smithy_client_1.expectString)(output.message),
2977
- };
2978
2276
  };
2979
2277
  const de_Snapshot = (output, context) => {
2980
- return {
2981
- accountsWithProvisionedRestoreAccess: output.accountsWithProvisionedRestoreAccess != null
2982
- ? de_AccountIdList(output.accountsWithProvisionedRestoreAccess, context)
2983
- : undefined,
2984
- accountsWithRestoreAccess: output.accountsWithRestoreAccess != null
2985
- ? de_AccountIdList(output.accountsWithRestoreAccess, context)
2986
- : undefined,
2987
- actualIncrementalBackupSizeInMegaBytes: (0, smithy_client_1.limitedParseDouble)(output.actualIncrementalBackupSizeInMegaBytes),
2988
- adminUsername: (0, smithy_client_1.expectString)(output.adminUsername),
2989
- backupProgressInMegaBytes: (0, smithy_client_1.limitedParseDouble)(output.backupProgressInMegaBytes),
2990
- currentBackupRateInMegaBytesPerSecond: (0, smithy_client_1.limitedParseDouble)(output.currentBackupRateInMegaBytesPerSecond),
2991
- elapsedTimeInSeconds: (0, smithy_client_1.expectLong)(output.elapsedTimeInSeconds),
2992
- estimatedSecondsToCompletion: (0, smithy_client_1.expectLong)(output.estimatedSecondsToCompletion),
2993
- kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
2994
- namespaceArn: (0, smithy_client_1.expectString)(output.namespaceArn),
2995
- namespaceName: (0, smithy_client_1.expectString)(output.namespaceName),
2996
- ownerAccount: (0, smithy_client_1.expectString)(output.ownerAccount),
2997
- snapshotArn: (0, smithy_client_1.expectString)(output.snapshotArn),
2998
- snapshotCreateTime: output.snapshotCreateTime != null
2999
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.snapshotCreateTime))
3000
- : undefined,
3001
- snapshotName: (0, smithy_client_1.expectString)(output.snapshotName),
3002
- snapshotRemainingDays: (0, smithy_client_1.expectInt32)(output.snapshotRemainingDays),
3003
- snapshotRetentionPeriod: (0, smithy_client_1.expectInt32)(output.snapshotRetentionPeriod),
3004
- snapshotRetentionStartTime: output.snapshotRetentionStartTime != null
3005
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.snapshotRetentionStartTime))
3006
- : undefined,
3007
- status: (0, smithy_client_1.expectString)(output.status),
3008
- totalBackupSizeInMegaBytes: (0, smithy_client_1.limitedParseDouble)(output.totalBackupSizeInMegaBytes),
3009
- };
2278
+ return (0, smithy_client_1.take)(output, {
2279
+ accountsWithProvisionedRestoreAccess: smithy_client_1._json,
2280
+ accountsWithRestoreAccess: smithy_client_1._json,
2281
+ actualIncrementalBackupSizeInMegaBytes: smithy_client_1.limitedParseDouble,
2282
+ adminUsername: smithy_client_1.expectString,
2283
+ backupProgressInMegaBytes: smithy_client_1.limitedParseDouble,
2284
+ currentBackupRateInMegaBytesPerSecond: smithy_client_1.limitedParseDouble,
2285
+ elapsedTimeInSeconds: smithy_client_1.expectLong,
2286
+ estimatedSecondsToCompletion: smithy_client_1.expectLong,
2287
+ kmsKeyId: smithy_client_1.expectString,
2288
+ namespaceArn: smithy_client_1.expectString,
2289
+ namespaceName: smithy_client_1.expectString,
2290
+ ownerAccount: smithy_client_1.expectString,
2291
+ snapshotArn: smithy_client_1.expectString,
2292
+ snapshotCreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2293
+ snapshotName: smithy_client_1.expectString,
2294
+ snapshotRemainingDays: smithy_client_1.expectInt32,
2295
+ snapshotRetentionPeriod: smithy_client_1.expectInt32,
2296
+ snapshotRetentionStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2297
+ status: smithy_client_1.expectString,
2298
+ totalBackupSizeInMegaBytes: smithy_client_1.limitedParseDouble,
2299
+ });
3010
2300
  };
3011
2301
  const de_SnapshotList = (output, context) => {
3012
2302
  const retVal = (output || [])
3013
2303
  .filter((e) => e != null)
3014
2304
  .map((entry) => {
3015
- if (entry === null) {
3016
- return null;
3017
- }
3018
2305
  return de_Snapshot(entry, context);
3019
2306
  });
3020
2307
  return retVal;
3021
2308
  };
3022
- const de_SubnetIdList = (output, context) => {
3023
- const retVal = (output || [])
3024
- .filter((e) => e != null)
3025
- .map((entry) => {
3026
- if (entry === null) {
3027
- return null;
3028
- }
3029
- return (0, smithy_client_1.expectString)(entry);
3030
- });
3031
- return retVal;
3032
- };
3033
2309
  const de_TableRestoreStatus = (output, context) => {
3034
- return {
3035
- message: (0, smithy_client_1.expectString)(output.message),
3036
- namespaceName: (0, smithy_client_1.expectString)(output.namespaceName),
3037
- newTableName: (0, smithy_client_1.expectString)(output.newTableName),
3038
- progressInMegaBytes: (0, smithy_client_1.expectLong)(output.progressInMegaBytes),
3039
- requestTime: output.requestTime != null
3040
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.requestTime)))
3041
- : undefined,
3042
- snapshotName: (0, smithy_client_1.expectString)(output.snapshotName),
3043
- sourceDatabaseName: (0, smithy_client_1.expectString)(output.sourceDatabaseName),
3044
- sourceSchemaName: (0, smithy_client_1.expectString)(output.sourceSchemaName),
3045
- sourceTableName: (0, smithy_client_1.expectString)(output.sourceTableName),
3046
- status: (0, smithy_client_1.expectString)(output.status),
3047
- tableRestoreRequestId: (0, smithy_client_1.expectString)(output.tableRestoreRequestId),
3048
- targetDatabaseName: (0, smithy_client_1.expectString)(output.targetDatabaseName),
3049
- targetSchemaName: (0, smithy_client_1.expectString)(output.targetSchemaName),
3050
- totalDataInMegaBytes: (0, smithy_client_1.expectLong)(output.totalDataInMegaBytes),
3051
- workgroupName: (0, smithy_client_1.expectString)(output.workgroupName),
3052
- };
2310
+ return (0, smithy_client_1.take)(output, {
2311
+ message: smithy_client_1.expectString,
2312
+ namespaceName: smithy_client_1.expectString,
2313
+ newTableName: smithy_client_1.expectString,
2314
+ progressInMegaBytes: smithy_client_1.expectLong,
2315
+ requestTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2316
+ snapshotName: smithy_client_1.expectString,
2317
+ sourceDatabaseName: smithy_client_1.expectString,
2318
+ sourceSchemaName: smithy_client_1.expectString,
2319
+ sourceTableName: smithy_client_1.expectString,
2320
+ status: smithy_client_1.expectString,
2321
+ tableRestoreRequestId: smithy_client_1.expectString,
2322
+ targetDatabaseName: smithy_client_1.expectString,
2323
+ targetSchemaName: smithy_client_1.expectString,
2324
+ totalDataInMegaBytes: smithy_client_1.expectLong,
2325
+ workgroupName: smithy_client_1.expectString,
2326
+ });
3053
2327
  };
3054
2328
  const de_TableRestoreStatusList = (output, context) => {
3055
2329
  const retVal = (output || [])
3056
2330
  .filter((e) => e != null)
3057
2331
  .map((entry) => {
3058
- if (entry === null) {
3059
- return null;
3060
- }
3061
2332
  return de_TableRestoreStatus(entry, context);
3062
2333
  });
3063
2334
  return retVal;
3064
2335
  };
3065
- const de_Tag = (output, context) => {
3066
- return {
3067
- key: (0, smithy_client_1.expectString)(output.key),
3068
- value: (0, smithy_client_1.expectString)(output.value),
3069
- };
3070
- };
3071
- const de_TagList = (output, context) => {
3072
- const retVal = (output || [])
3073
- .filter((e) => e != null)
3074
- .map((entry) => {
3075
- if (entry === null) {
3076
- return null;
3077
- }
3078
- return de_Tag(entry, context);
3079
- });
3080
- return retVal;
3081
- };
3082
- const de_TagResourceResponse = (output, context) => {
3083
- return {};
3084
- };
3085
- const de_ThrottlingException = (output, context) => {
3086
- return {
3087
- code: (0, smithy_client_1.expectString)(output.code),
3088
- message: (0, smithy_client_1.expectString)(output.message),
3089
- };
3090
- };
3091
- const de_TooManyTagsException = (output, context) => {
3092
- return {
3093
- message: (0, smithy_client_1.expectString)(output.message),
3094
- resourceName: (0, smithy_client_1.expectString)(output.resourceName),
3095
- };
3096
- };
3097
- const de_UntagResourceResponse = (output, context) => {
3098
- return {};
3099
- };
3100
2336
  const de_UpdateEndpointAccessResponse = (output, context) => {
3101
- return {
3102
- endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined,
3103
- };
2337
+ return (0, smithy_client_1.take)(output, {
2338
+ endpoint: (_) => de_EndpointAccess(_, context),
2339
+ });
3104
2340
  };
3105
2341
  const de_UpdateNamespaceResponse = (output, context) => {
3106
- return {
3107
- namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined,
3108
- };
3109
- };
3110
- const de_UpdateSnapshotResponse = (output, context) => {
3111
- return {
3112
- snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined,
3113
- };
3114
- };
3115
- const de_UpdateUsageLimitResponse = (output, context) => {
3116
- return {
3117
- usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined,
3118
- };
3119
- };
3120
- const de_UpdateWorkgroupResponse = (output, context) => {
3121
- return {
3122
- workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined,
3123
- };
3124
- };
3125
- const de_UsageLimit = (output, context) => {
3126
- return {
3127
- amount: (0, smithy_client_1.expectLong)(output.amount),
3128
- breachAction: (0, smithy_client_1.expectString)(output.breachAction),
3129
- period: (0, smithy_client_1.expectString)(output.period),
3130
- resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
3131
- usageLimitArn: (0, smithy_client_1.expectString)(output.usageLimitArn),
3132
- usageLimitId: (0, smithy_client_1.expectString)(output.usageLimitId),
3133
- usageType: (0, smithy_client_1.expectString)(output.usageType),
3134
- };
3135
- };
3136
- const de_UsageLimits = (output, context) => {
3137
- const retVal = (output || [])
3138
- .filter((e) => e != null)
3139
- .map((entry) => {
3140
- if (entry === null) {
3141
- return null;
3142
- }
3143
- return de_UsageLimit(entry, context);
2342
+ return (0, smithy_client_1.take)(output, {
2343
+ namespace: (_) => de_Namespace(_, context),
3144
2344
  });
3145
- return retVal;
3146
- };
3147
- const de_ValidationException = (output, context) => {
3148
- return {
3149
- message: (0, smithy_client_1.expectString)(output.message),
3150
- };
3151
- };
3152
- const de_VpcEndpoint = (output, context) => {
3153
- return {
3154
- networkInterfaces: output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined,
3155
- vpcEndpointId: (0, smithy_client_1.expectString)(output.vpcEndpointId),
3156
- vpcId: (0, smithy_client_1.expectString)(output.vpcId),
3157
- };
3158
2345
  };
3159
- const de_VpcEndpointList = (output, context) => {
3160
- const retVal = (output || [])
3161
- .filter((e) => e != null)
3162
- .map((entry) => {
3163
- if (entry === null) {
3164
- return null;
3165
- }
3166
- return de_VpcEndpoint(entry, context);
2346
+ const de_UpdateSnapshotResponse = (output, context) => {
2347
+ return (0, smithy_client_1.take)(output, {
2348
+ snapshot: (_) => de_Snapshot(_, context),
3167
2349
  });
3168
- return retVal;
3169
- };
3170
- const de_VpcSecurityGroupMembership = (output, context) => {
3171
- return {
3172
- status: (0, smithy_client_1.expectString)(output.status),
3173
- vpcSecurityGroupId: (0, smithy_client_1.expectString)(output.vpcSecurityGroupId),
3174
- };
3175
2350
  };
3176
- const de_VpcSecurityGroupMembershipList = (output, context) => {
3177
- const retVal = (output || [])
3178
- .filter((e) => e != null)
3179
- .map((entry) => {
3180
- if (entry === null) {
3181
- return null;
3182
- }
3183
- return de_VpcSecurityGroupMembership(entry, context);
2351
+ const de_UpdateWorkgroupResponse = (output, context) => {
2352
+ return (0, smithy_client_1.take)(output, {
2353
+ workgroup: (_) => de_Workgroup(_, context),
3184
2354
  });
3185
- return retVal;
3186
2355
  };
3187
2356
  const de_Workgroup = (output, context) => {
3188
- return {
3189
- baseCapacity: (0, smithy_client_1.expectInt32)(output.baseCapacity),
3190
- configParameters: output.configParameters != null ? de_ConfigParameterList(output.configParameters, context) : undefined,
3191
- creationDate: output.creationDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.creationDate)) : undefined,
3192
- endpoint: output.endpoint != null ? de_Endpoint(output.endpoint, context) : undefined,
3193
- enhancedVpcRouting: (0, smithy_client_1.expectBoolean)(output.enhancedVpcRouting),
3194
- namespaceName: (0, smithy_client_1.expectString)(output.namespaceName),
3195
- port: (0, smithy_client_1.expectInt32)(output.port),
3196
- publiclyAccessible: (0, smithy_client_1.expectBoolean)(output.publiclyAccessible),
3197
- securityGroupIds: output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined,
3198
- status: (0, smithy_client_1.expectString)(output.status),
3199
- subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined,
3200
- workgroupArn: (0, smithy_client_1.expectString)(output.workgroupArn),
3201
- workgroupId: (0, smithy_client_1.expectString)(output.workgroupId),
3202
- workgroupName: (0, smithy_client_1.expectString)(output.workgroupName),
3203
- };
2357
+ return (0, smithy_client_1.take)(output, {
2358
+ baseCapacity: smithy_client_1.expectInt32,
2359
+ configParameters: smithy_client_1._json,
2360
+ creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2361
+ endpoint: smithy_client_1._json,
2362
+ enhancedVpcRouting: smithy_client_1.expectBoolean,
2363
+ namespaceName: smithy_client_1.expectString,
2364
+ port: smithy_client_1.expectInt32,
2365
+ publiclyAccessible: smithy_client_1.expectBoolean,
2366
+ securityGroupIds: smithy_client_1._json,
2367
+ status: smithy_client_1.expectString,
2368
+ subnetIds: smithy_client_1._json,
2369
+ workgroupArn: smithy_client_1.expectString,
2370
+ workgroupId: smithy_client_1.expectString,
2371
+ workgroupName: smithy_client_1.expectString,
2372
+ });
3204
2373
  };
3205
2374
  const de_WorkgroupList = (output, context) => {
3206
2375
  const retVal = (output || [])
3207
2376
  .filter((e) => e != null)
3208
2377
  .map((entry) => {
3209
- if (entry === null) {
3210
- return null;
3211
- }
3212
2378
  return de_Workgroup(entry, context);
3213
2379
  });
3214
2380
  return retVal;
@@ -3226,6 +2392,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
3226
2392
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3227
2393
  };
3228
2394
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2395
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(RedshiftServerlessServiceException_1.RedshiftServerlessServiceException);
3229
2396
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3230
2397
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3231
2398
  const contents = {
@@ -3244,6 +2411,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
3244
2411
  }
3245
2412
  return new protocol_http_1.HttpRequest(contents);
3246
2413
  };
2414
+ function sharedHeaders(operation) {
2415
+ return {
2416
+ "content-type": "application/x-amz-json-1.1",
2417
+ "x-amz-target": `RedshiftServerless.${operation}`,
2418
+ };
2419
+ }
3247
2420
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3248
2421
  if (encoded.length) {
3249
2422
  return JSON.parse(encoded);