@aws-sdk/client-redshift-data 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,102 +7,72 @@ const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const RedshiftDataServiceException_1 = require("../models/RedshiftDataServiceException");
9
9
  const se_BatchExecuteStatementCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.1",
12
- "x-amz-target": "RedshiftData.BatchExecuteStatement",
13
- };
10
+ const headers = sharedHeaders("BatchExecuteStatement");
14
11
  let body;
15
12
  body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_BatchExecuteStatementCommand = se_BatchExecuteStatementCommand;
19
16
  const se_CancelStatementCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "RedshiftData.CancelStatement",
23
- };
17
+ const headers = sharedHeaders("CancelStatement");
24
18
  let body;
25
- body = JSON.stringify(se_CancelStatementRequest(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_CancelStatementCommand = se_CancelStatementCommand;
29
23
  const se_DescribeStatementCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.1",
32
- "x-amz-target": "RedshiftData.DescribeStatement",
33
- };
24
+ const headers = sharedHeaders("DescribeStatement");
34
25
  let body;
35
- body = JSON.stringify(se_DescribeStatementRequest(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_DescribeStatementCommand = se_DescribeStatementCommand;
39
30
  const se_DescribeTableCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.1",
42
- "x-amz-target": "RedshiftData.DescribeTable",
43
- };
31
+ const headers = sharedHeaders("DescribeTable");
44
32
  let body;
45
- body = JSON.stringify(se_DescribeTableRequest(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_DescribeTableCommand = se_DescribeTableCommand;
49
37
  const se_ExecuteStatementCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.1",
52
- "x-amz-target": "RedshiftData.ExecuteStatement",
53
- };
38
+ const headers = sharedHeaders("ExecuteStatement");
54
39
  let body;
55
40
  body = JSON.stringify(se_ExecuteStatementInput(input, context));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_ExecuteStatementCommand = se_ExecuteStatementCommand;
59
44
  const se_GetStatementResultCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "RedshiftData.GetStatementResult",
63
- };
45
+ const headers = sharedHeaders("GetStatementResult");
64
46
  let body;
65
- body = JSON.stringify(se_GetStatementResultRequest(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_GetStatementResultCommand = se_GetStatementResultCommand;
69
51
  const se_ListDatabasesCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "RedshiftData.ListDatabases",
73
- };
52
+ const headers = sharedHeaders("ListDatabases");
74
53
  let body;
75
- body = JSON.stringify(se_ListDatabasesRequest(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_ListDatabasesCommand = se_ListDatabasesCommand;
79
58
  const se_ListSchemasCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.1",
82
- "x-amz-target": "RedshiftData.ListSchemas",
83
- };
59
+ const headers = sharedHeaders("ListSchemas");
84
60
  let body;
85
- body = JSON.stringify(se_ListSchemasRequest(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_ListSchemasCommand = se_ListSchemasCommand;
89
65
  const se_ListStatementsCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.1",
92
- "x-amz-target": "RedshiftData.ListStatements",
93
- };
66
+ const headers = sharedHeaders("ListStatements");
94
67
  let body;
95
- body = JSON.stringify(se_ListStatementsRequest(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_ListStatementsCommand = se_ListStatementsCommand;
99
72
  const se_ListTablesCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.1",
102
- "x-amz-target": "RedshiftData.ListTables",
103
- };
73
+ const headers = sharedHeaders("ListTables");
104
74
  let body;
105
- body = JSON.stringify(se_ListTablesRequest(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_ListTablesCommand = se_ListTablesCommand;
@@ -117,7 +87,7 @@ const de_BatchExecuteStatementCommand = async (output, context) => {
117
87
  $metadata: deserializeMetadata(output),
118
88
  ...contents,
119
89
  };
120
- return Promise.resolve(response);
90
+ return response;
121
91
  };
122
92
  exports.de_BatchExecuteStatementCommand = de_BatchExecuteStatementCommand;
123
93
  const de_BatchExecuteStatementCommandError = async (output, context) => {
@@ -138,10 +108,9 @@ const de_BatchExecuteStatementCommandError = async (output, context) => {
138
108
  throw await de_ValidationExceptionRes(parsedOutput, context);
139
109
  default:
140
110
  const parsedBody = parsedOutput.body;
141
- (0, smithy_client_1.throwDefaultError)({
111
+ return throwDefaultError({
142
112
  output,
143
113
  parsedBody,
144
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
145
114
  errorCode,
146
115
  });
147
116
  }
@@ -152,12 +121,12 @@ const de_CancelStatementCommand = async (output, context) => {
152
121
  }
153
122
  const data = await parseBody(output.body, context);
154
123
  let contents = {};
155
- contents = de_CancelStatementResponse(data, context);
124
+ contents = (0, smithy_client_1._json)(data);
156
125
  const response = {
157
126
  $metadata: deserializeMetadata(output),
158
127
  ...contents,
159
128
  };
160
- return Promise.resolve(response);
129
+ return response;
161
130
  };
162
131
  exports.de_CancelStatementCommand = de_CancelStatementCommand;
163
132
  const de_CancelStatementCommandError = async (output, context) => {
@@ -181,10 +150,9 @@ const de_CancelStatementCommandError = async (output, context) => {
181
150
  throw await de_ValidationExceptionRes(parsedOutput, context);
182
151
  default:
183
152
  const parsedBody = parsedOutput.body;
184
- (0, smithy_client_1.throwDefaultError)({
153
+ return throwDefaultError({
185
154
  output,
186
155
  parsedBody,
187
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
188
156
  errorCode,
189
157
  });
190
158
  }
@@ -200,7 +168,7 @@ const de_DescribeStatementCommand = async (output, context) => {
200
168
  $metadata: deserializeMetadata(output),
201
169
  ...contents,
202
170
  };
203
- return Promise.resolve(response);
171
+ return response;
204
172
  };
205
173
  exports.de_DescribeStatementCommand = de_DescribeStatementCommand;
206
174
  const de_DescribeStatementCommandError = async (output, context) => {
@@ -221,10 +189,9 @@ const de_DescribeStatementCommandError = async (output, context) => {
221
189
  throw await de_ValidationExceptionRes(parsedOutput, context);
222
190
  default:
223
191
  const parsedBody = parsedOutput.body;
224
- (0, smithy_client_1.throwDefaultError)({
192
+ return throwDefaultError({
225
193
  output,
226
194
  parsedBody,
227
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
228
195
  errorCode,
229
196
  });
230
197
  }
@@ -235,12 +202,12 @@ const de_DescribeTableCommand = async (output, context) => {
235
202
  }
236
203
  const data = await parseBody(output.body, context);
237
204
  let contents = {};
238
- contents = de_DescribeTableResponse(data, context);
205
+ contents = (0, smithy_client_1._json)(data);
239
206
  const response = {
240
207
  $metadata: deserializeMetadata(output),
241
208
  ...contents,
242
209
  };
243
- return Promise.resolve(response);
210
+ return response;
244
211
  };
245
212
  exports.de_DescribeTableCommand = de_DescribeTableCommand;
246
213
  const de_DescribeTableCommandError = async (output, context) => {
@@ -261,10 +228,9 @@ const de_DescribeTableCommandError = async (output, context) => {
261
228
  throw await de_ValidationExceptionRes(parsedOutput, context);
262
229
  default:
263
230
  const parsedBody = parsedOutput.body;
264
- (0, smithy_client_1.throwDefaultError)({
231
+ return throwDefaultError({
265
232
  output,
266
233
  parsedBody,
267
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
268
234
  errorCode,
269
235
  });
270
236
  }
@@ -280,7 +246,7 @@ const de_ExecuteStatementCommand = async (output, context) => {
280
246
  $metadata: deserializeMetadata(output),
281
247
  ...contents,
282
248
  };
283
- return Promise.resolve(response);
249
+ return response;
284
250
  };
285
251
  exports.de_ExecuteStatementCommand = de_ExecuteStatementCommand;
286
252
  const de_ExecuteStatementCommandError = async (output, context) => {
@@ -301,10 +267,9 @@ const de_ExecuteStatementCommandError = async (output, context) => {
301
267
  throw await de_ValidationExceptionRes(parsedOutput, context);
302
268
  default:
303
269
  const parsedBody = parsedOutput.body;
304
- (0, smithy_client_1.throwDefaultError)({
270
+ return throwDefaultError({
305
271
  output,
306
272
  parsedBody,
307
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
308
273
  errorCode,
309
274
  });
310
275
  }
@@ -320,7 +285,7 @@ const de_GetStatementResultCommand = async (output, context) => {
320
285
  $metadata: deserializeMetadata(output),
321
286
  ...contents,
322
287
  };
323
- return Promise.resolve(response);
288
+ return response;
324
289
  };
325
290
  exports.de_GetStatementResultCommand = de_GetStatementResultCommand;
326
291
  const de_GetStatementResultCommandError = async (output, context) => {
@@ -341,10 +306,9 @@ const de_GetStatementResultCommandError = async (output, context) => {
341
306
  throw await de_ValidationExceptionRes(parsedOutput, context);
342
307
  default:
343
308
  const parsedBody = parsedOutput.body;
344
- (0, smithy_client_1.throwDefaultError)({
309
+ return throwDefaultError({
345
310
  output,
346
311
  parsedBody,
347
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
348
312
  errorCode,
349
313
  });
350
314
  }
@@ -355,12 +319,12 @@ const de_ListDatabasesCommand = async (output, context) => {
355
319
  }
356
320
  const data = await parseBody(output.body, context);
357
321
  let contents = {};
358
- contents = de_ListDatabasesResponse(data, context);
322
+ contents = (0, smithy_client_1._json)(data);
359
323
  const response = {
360
324
  $metadata: deserializeMetadata(output),
361
325
  ...contents,
362
326
  };
363
- return Promise.resolve(response);
327
+ return response;
364
328
  };
365
329
  exports.de_ListDatabasesCommand = de_ListDatabasesCommand;
366
330
  const de_ListDatabasesCommandError = async (output, context) => {
@@ -381,10 +345,9 @@ const de_ListDatabasesCommandError = async (output, context) => {
381
345
  throw await de_ValidationExceptionRes(parsedOutput, context);
382
346
  default:
383
347
  const parsedBody = parsedOutput.body;
384
- (0, smithy_client_1.throwDefaultError)({
348
+ return throwDefaultError({
385
349
  output,
386
350
  parsedBody,
387
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
388
351
  errorCode,
389
352
  });
390
353
  }
@@ -395,12 +358,12 @@ const de_ListSchemasCommand = async (output, context) => {
395
358
  }
396
359
  const data = await parseBody(output.body, context);
397
360
  let contents = {};
398
- contents = de_ListSchemasResponse(data, context);
361
+ contents = (0, smithy_client_1._json)(data);
399
362
  const response = {
400
363
  $metadata: deserializeMetadata(output),
401
364
  ...contents,
402
365
  };
403
- return Promise.resolve(response);
366
+ return response;
404
367
  };
405
368
  exports.de_ListSchemasCommand = de_ListSchemasCommand;
406
369
  const de_ListSchemasCommandError = async (output, context) => {
@@ -421,10 +384,9 @@ const de_ListSchemasCommandError = async (output, context) => {
421
384
  throw await de_ValidationExceptionRes(parsedOutput, context);
422
385
  default:
423
386
  const parsedBody = parsedOutput.body;
424
- (0, smithy_client_1.throwDefaultError)({
387
+ return throwDefaultError({
425
388
  output,
426
389
  parsedBody,
427
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
428
390
  errorCode,
429
391
  });
430
392
  }
@@ -440,7 +402,7 @@ const de_ListStatementsCommand = async (output, context) => {
440
402
  $metadata: deserializeMetadata(output),
441
403
  ...contents,
442
404
  };
443
- return Promise.resolve(response);
405
+ return response;
444
406
  };
445
407
  exports.de_ListStatementsCommand = de_ListStatementsCommand;
446
408
  const de_ListStatementsCommandError = async (output, context) => {
@@ -458,10 +420,9 @@ const de_ListStatementsCommandError = async (output, context) => {
458
420
  throw await de_ValidationExceptionRes(parsedOutput, context);
459
421
  default:
460
422
  const parsedBody = parsedOutput.body;
461
- (0, smithy_client_1.throwDefaultError)({
423
+ return throwDefaultError({
462
424
  output,
463
425
  parsedBody,
464
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
465
426
  errorCode,
466
427
  });
467
428
  }
@@ -472,12 +433,12 @@ const de_ListTablesCommand = async (output, context) => {
472
433
  }
473
434
  const data = await parseBody(output.body, context);
474
435
  let contents = {};
475
- contents = de_ListTablesResponse(data, context);
436
+ contents = (0, smithy_client_1._json)(data);
476
437
  const response = {
477
438
  $metadata: deserializeMetadata(output),
478
439
  ...contents,
479
440
  };
480
- return Promise.resolve(response);
441
+ return response;
481
442
  };
482
443
  exports.de_ListTablesCommand = de_ListTablesCommand;
483
444
  const de_ListTablesCommandError = async (output, context) => {
@@ -498,17 +459,16 @@ const de_ListTablesCommandError = async (output, context) => {
498
459
  throw await de_ValidationExceptionRes(parsedOutput, context);
499
460
  default:
500
461
  const parsedBody = parsedOutput.body;
501
- (0, smithy_client_1.throwDefaultError)({
462
+ return throwDefaultError({
502
463
  output,
503
464
  parsedBody,
504
- exceptionCtor: RedshiftDataServiceException_1.RedshiftDataServiceException,
505
465
  errorCode,
506
466
  });
507
467
  }
508
468
  };
509
469
  const de_ActiveStatementsExceededExceptionRes = async (parsedOutput, context) => {
510
470
  const body = parsedOutput.body;
511
- const deserialized = de_ActiveStatementsExceededException(body, context);
471
+ const deserialized = (0, smithy_client_1._json)(body);
512
472
  const exception = new models_0_1.ActiveStatementsExceededException({
513
473
  $metadata: deserializeMetadata(parsedOutput),
514
474
  ...deserialized,
@@ -517,7 +477,7 @@ const de_ActiveStatementsExceededExceptionRes = async (parsedOutput, context) =>
517
477
  };
518
478
  const de_BatchExecuteStatementExceptionRes = async (parsedOutput, context) => {
519
479
  const body = parsedOutput.body;
520
- const deserialized = de_BatchExecuteStatementException(body, context);
480
+ const deserialized = (0, smithy_client_1._json)(body);
521
481
  const exception = new models_0_1.BatchExecuteStatementException({
522
482
  $metadata: deserializeMetadata(parsedOutput),
523
483
  ...deserialized,
@@ -526,7 +486,7 @@ const de_BatchExecuteStatementExceptionRes = async (parsedOutput, context) => {
526
486
  };
527
487
  const de_DatabaseConnectionExceptionRes = async (parsedOutput, context) => {
528
488
  const body = parsedOutput.body;
529
- const deserialized = de_DatabaseConnectionException(body, context);
489
+ const deserialized = (0, smithy_client_1._json)(body);
530
490
  const exception = new models_0_1.DatabaseConnectionException({
531
491
  $metadata: deserializeMetadata(parsedOutput),
532
492
  ...deserialized,
@@ -535,7 +495,7 @@ const de_DatabaseConnectionExceptionRes = async (parsedOutput, context) => {
535
495
  };
536
496
  const de_ExecuteStatementExceptionRes = async (parsedOutput, context) => {
537
497
  const body = parsedOutput.body;
538
- const deserialized = de_ExecuteStatementException(body, context);
498
+ const deserialized = (0, smithy_client_1._json)(body);
539
499
  const exception = new models_0_1.ExecuteStatementException({
540
500
  $metadata: deserializeMetadata(parsedOutput),
541
501
  ...deserialized,
@@ -544,7 +504,7 @@ const de_ExecuteStatementExceptionRes = async (parsedOutput, context) => {
544
504
  };
545
505
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
546
506
  const body = parsedOutput.body;
547
- const deserialized = de_InternalServerException(body, context);
507
+ const deserialized = (0, smithy_client_1._json)(body);
548
508
  const exception = new models_0_1.InternalServerException({
549
509
  $metadata: deserializeMetadata(parsedOutput),
550
510
  ...deserialized,
@@ -553,7 +513,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
553
513
  };
554
514
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
555
515
  const body = parsedOutput.body;
556
- const deserialized = de_ResourceNotFoundException(body, context);
516
+ const deserialized = (0, smithy_client_1._json)(body);
557
517
  const exception = new models_0_1.ResourceNotFoundException({
558
518
  $metadata: deserializeMetadata(parsedOutput),
559
519
  ...deserialized,
@@ -562,7 +522,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
562
522
  };
563
523
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
564
524
  const body = parsedOutput.body;
565
- const deserialized = de_ValidationException(body, context);
525
+ const deserialized = (0, smithy_client_1._json)(body);
566
526
  const exception = new models_0_1.ValidationException({
567
527
  $metadata: deserializeMetadata(parsedOutput),
568
528
  ...deserialized,
@@ -570,257 +530,76 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
570
530
  return (0, smithy_client_1.decorateServiceException)(exception, body);
571
531
  };
572
532
  const se_BatchExecuteStatementInput = (input, context) => {
573
- return {
574
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
575
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
576
- ...(input.Database != null && { Database: input.Database }),
577
- ...(input.DbUser != null && { DbUser: input.DbUser }),
578
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
579
- ...(input.Sqls != null && { Sqls: se_SqlList(input.Sqls, context) }),
580
- ...(input.StatementName != null && { StatementName: input.StatementName }),
581
- ...(input.WithEvent != null && { WithEvent: input.WithEvent }),
582
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
583
- };
584
- };
585
- const se_CancelStatementRequest = (input, context) => {
586
- return {
587
- ...(input.Id != null && { Id: input.Id }),
588
- };
589
- };
590
- const se_DescribeStatementRequest = (input, context) => {
591
- return {
592
- ...(input.Id != null && { Id: input.Id }),
593
- };
594
- };
595
- const se_DescribeTableRequest = (input, context) => {
596
- return {
597
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
598
- ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
599
- ...(input.Database != null && { Database: input.Database }),
600
- ...(input.DbUser != null && { DbUser: input.DbUser }),
601
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
602
- ...(input.NextToken != null && { NextToken: input.NextToken }),
603
- ...(input.Schema != null && { Schema: input.Schema }),
604
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
605
- ...(input.Table != null && { Table: input.Table }),
606
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
607
- };
608
- };
609
- const se_ExecuteStatementInput = (input, context) => {
610
- return {
611
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
612
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
613
- ...(input.Database != null && { Database: input.Database }),
614
- ...(input.DbUser != null && { DbUser: input.DbUser }),
615
- ...(input.Parameters != null && { Parameters: se_SqlParametersList(input.Parameters, context) }),
616
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
617
- ...(input.Sql != null && { Sql: input.Sql }),
618
- ...(input.StatementName != null && { StatementName: input.StatementName }),
619
- ...(input.WithEvent != null && { WithEvent: input.WithEvent }),
620
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
621
- };
622
- };
623
- const se_GetStatementResultRequest = (input, context) => {
624
- return {
625
- ...(input.Id != null && { Id: input.Id }),
626
- ...(input.NextToken != null && { NextToken: input.NextToken }),
627
- };
628
- };
629
- const se_ListDatabasesRequest = (input, context) => {
630
- return {
631
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
632
- ...(input.Database != null && { Database: input.Database }),
633
- ...(input.DbUser != null && { DbUser: input.DbUser }),
634
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
635
- ...(input.NextToken != null && { NextToken: input.NextToken }),
636
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
637
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
638
- };
639
- };
640
- const se_ListSchemasRequest = (input, context) => {
641
- return {
642
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
643
- ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
644
- ...(input.Database != null && { Database: input.Database }),
645
- ...(input.DbUser != null && { DbUser: input.DbUser }),
646
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
647
- ...(input.NextToken != null && { NextToken: input.NextToken }),
648
- ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
649
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
650
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
651
- };
652
- };
653
- const se_ListStatementsRequest = (input, context) => {
654
- return {
655
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
656
- ...(input.NextToken != null && { NextToken: input.NextToken }),
657
- ...(input.RoleLevel != null && { RoleLevel: input.RoleLevel }),
658
- ...(input.StatementName != null && { StatementName: input.StatementName }),
659
- ...(input.Status != null && { Status: input.Status }),
660
- };
661
- };
662
- const se_ListTablesRequest = (input, context) => {
663
- return {
664
- ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
665
- ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
666
- ...(input.Database != null && { Database: input.Database }),
667
- ...(input.DbUser != null && { DbUser: input.DbUser }),
668
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
669
- ...(input.NextToken != null && { NextToken: input.NextToken }),
670
- ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
671
- ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
672
- ...(input.TablePattern != null && { TablePattern: input.TablePattern }),
673
- ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
674
- };
675
- };
676
- const se_SqlList = (input, context) => {
677
- return input
678
- .filter((e) => e != null)
679
- .map((entry) => {
680
- return entry;
533
+ return (0, smithy_client_1.take)(input, {
534
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
535
+ ClusterIdentifier: [],
536
+ Database: [],
537
+ DbUser: [],
538
+ SecretArn: [],
539
+ Sqls: smithy_client_1._json,
540
+ StatementName: [],
541
+ WithEvent: [],
542
+ WorkgroupName: [],
681
543
  });
682
544
  };
683
- const se_SqlParameter = (input, context) => {
684
- return {
685
- ...(input.name != null && { name: input.name }),
686
- ...(input.value != null && { value: input.value }),
687
- };
688
- };
689
- const se_SqlParametersList = (input, context) => {
690
- return input
691
- .filter((e) => e != null)
692
- .map((entry) => {
693
- return se_SqlParameter(entry, context);
545
+ const se_ExecuteStatementInput = (input, context) => {
546
+ return (0, smithy_client_1.take)(input, {
547
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
548
+ ClusterIdentifier: [],
549
+ Database: [],
550
+ DbUser: [],
551
+ Parameters: smithy_client_1._json,
552
+ SecretArn: [],
553
+ Sql: [],
554
+ StatementName: [],
555
+ WithEvent: [],
556
+ WorkgroupName: [],
694
557
  });
695
558
  };
696
- const de_ActiveStatementsExceededException = (output, context) => {
697
- return {
698
- Message: (0, smithy_client_1.expectString)(output.Message),
699
- };
700
- };
701
- const de_BatchExecuteStatementException = (output, context) => {
702
- return {
703
- Message: (0, smithy_client_1.expectString)(output.Message),
704
- StatementId: (0, smithy_client_1.expectString)(output.StatementId),
705
- };
706
- };
707
559
  const de_BatchExecuteStatementOutput = (output, context) => {
708
- return {
709
- ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
710
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
711
- Database: (0, smithy_client_1.expectString)(output.Database),
712
- DbUser: (0, smithy_client_1.expectString)(output.DbUser),
713
- Id: (0, smithy_client_1.expectString)(output.Id),
714
- SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
715
- WorkgroupName: (0, smithy_client_1.expectString)(output.WorkgroupName),
716
- };
717
- };
718
- const de_CancelStatementResponse = (output, context) => {
719
- return {
720
- Status: (0, smithy_client_1.expectBoolean)(output.Status),
721
- };
722
- };
723
- const de_ColumnList = (output, context) => {
724
- const retVal = (output || [])
725
- .filter((e) => e != null)
726
- .map((entry) => {
727
- if (entry === null) {
728
- return null;
729
- }
730
- return de_ColumnMetadata(entry, context);
731
- });
732
- return retVal;
733
- };
734
- const de_ColumnMetadata = (output, context) => {
735
- return {
736
- columnDefault: (0, smithy_client_1.expectString)(output.columnDefault),
737
- isCaseSensitive: (0, smithy_client_1.expectBoolean)(output.isCaseSensitive),
738
- isCurrency: (0, smithy_client_1.expectBoolean)(output.isCurrency),
739
- isSigned: (0, smithy_client_1.expectBoolean)(output.isSigned),
740
- label: (0, smithy_client_1.expectString)(output.label),
741
- length: (0, smithy_client_1.expectInt32)(output.length),
742
- name: (0, smithy_client_1.expectString)(output.name),
743
- nullable: (0, smithy_client_1.expectInt32)(output.nullable),
744
- precision: (0, smithy_client_1.expectInt32)(output.precision),
745
- scale: (0, smithy_client_1.expectInt32)(output.scale),
746
- schemaName: (0, smithy_client_1.expectString)(output.schemaName),
747
- tableName: (0, smithy_client_1.expectString)(output.tableName),
748
- typeName: (0, smithy_client_1.expectString)(output.typeName),
749
- };
750
- };
751
- const de_ColumnMetadataList = (output, context) => {
752
- const retVal = (output || [])
753
- .filter((e) => e != null)
754
- .map((entry) => {
755
- if (entry === null) {
756
- return null;
757
- }
758
- return de_ColumnMetadata(entry, context);
560
+ return (0, smithy_client_1.take)(output, {
561
+ ClusterIdentifier: smithy_client_1.expectString,
562
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
563
+ Database: smithy_client_1.expectString,
564
+ DbUser: smithy_client_1.expectString,
565
+ Id: smithy_client_1.expectString,
566
+ SecretArn: smithy_client_1.expectString,
567
+ WorkgroupName: smithy_client_1.expectString,
759
568
  });
760
- return retVal;
761
- };
762
- const de_DatabaseConnectionException = (output, context) => {
763
- return {
764
- Message: (0, smithy_client_1.expectString)(output.Message),
765
- };
766
- };
767
- const de_DatabaseList = (output, context) => {
768
- const retVal = (output || [])
769
- .filter((e) => e != null)
770
- .map((entry) => {
771
- if (entry === null) {
772
- return null;
773
- }
774
- return (0, smithy_client_1.expectString)(entry);
775
- });
776
- return retVal;
777
569
  };
778
570
  const de_DescribeStatementResponse = (output, context) => {
779
- return {
780
- ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
781
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
782
- Database: (0, smithy_client_1.expectString)(output.Database),
783
- DbUser: (0, smithy_client_1.expectString)(output.DbUser),
784
- Duration: (0, smithy_client_1.expectLong)(output.Duration),
785
- Error: (0, smithy_client_1.expectString)(output.Error),
786
- HasResultSet: (0, smithy_client_1.expectBoolean)(output.HasResultSet),
787
- Id: (0, smithy_client_1.expectString)(output.Id),
788
- QueryParameters: output.QueryParameters != null ? de_SqlParametersList(output.QueryParameters, context) : undefined,
789
- QueryString: (0, smithy_client_1.expectString)(output.QueryString),
790
- RedshiftPid: (0, smithy_client_1.expectLong)(output.RedshiftPid),
791
- RedshiftQueryId: (0, smithy_client_1.expectLong)(output.RedshiftQueryId),
792
- ResultRows: (0, smithy_client_1.expectLong)(output.ResultRows),
793
- ResultSize: (0, smithy_client_1.expectLong)(output.ResultSize),
794
- SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
795
- Status: (0, smithy_client_1.expectString)(output.Status),
796
- SubStatements: output.SubStatements != null ? de_SubStatementList(output.SubStatements, context) : undefined,
797
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
798
- WorkgroupName: (0, smithy_client_1.expectString)(output.WorkgroupName),
799
- };
800
- };
801
- const de_DescribeTableResponse = (output, context) => {
802
- return {
803
- ColumnList: output.ColumnList != null ? de_ColumnList(output.ColumnList, context) : undefined,
804
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
805
- TableName: (0, smithy_client_1.expectString)(output.TableName),
806
- };
807
- };
808
- const de_ExecuteStatementException = (output, context) => {
809
- return {
810
- Message: (0, smithy_client_1.expectString)(output.Message),
811
- StatementId: (0, smithy_client_1.expectString)(output.StatementId),
812
- };
571
+ return (0, smithy_client_1.take)(output, {
572
+ ClusterIdentifier: smithy_client_1.expectString,
573
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
574
+ Database: smithy_client_1.expectString,
575
+ DbUser: smithy_client_1.expectString,
576
+ Duration: smithy_client_1.expectLong,
577
+ Error: smithy_client_1.expectString,
578
+ HasResultSet: smithy_client_1.expectBoolean,
579
+ Id: smithy_client_1.expectString,
580
+ QueryParameters: smithy_client_1._json,
581
+ QueryString: smithy_client_1.expectString,
582
+ RedshiftPid: smithy_client_1.expectLong,
583
+ RedshiftQueryId: smithy_client_1.expectLong,
584
+ ResultRows: smithy_client_1.expectLong,
585
+ ResultSize: smithy_client_1.expectLong,
586
+ SecretArn: smithy_client_1.expectString,
587
+ Status: smithy_client_1.expectString,
588
+ SubStatements: (_) => de_SubStatementList(_, context),
589
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
590
+ WorkgroupName: smithy_client_1.expectString,
591
+ });
813
592
  };
814
593
  const de_ExecuteStatementOutput = (output, context) => {
815
- return {
816
- ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
817
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
818
- Database: (0, smithy_client_1.expectString)(output.Database),
819
- DbUser: (0, smithy_client_1.expectString)(output.DbUser),
820
- Id: (0, smithy_client_1.expectString)(output.Id),
821
- SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
822
- WorkgroupName: (0, smithy_client_1.expectString)(output.WorkgroupName),
823
- };
594
+ return (0, smithy_client_1.take)(output, {
595
+ ClusterIdentifier: smithy_client_1.expectString,
596
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
597
+ Database: smithy_client_1.expectString,
598
+ DbUser: smithy_client_1.expectString,
599
+ Id: smithy_client_1.expectString,
600
+ SecretArn: smithy_client_1.expectString,
601
+ WorkgroupName: smithy_client_1.expectString,
602
+ });
824
603
  };
825
604
  const de_Field = (output, context) => {
826
605
  if (output.blobValue != null) {
@@ -849,180 +628,77 @@ const de_FieldList = (output, context) => {
849
628
  const retVal = (output || [])
850
629
  .filter((e) => e != null)
851
630
  .map((entry) => {
852
- if (entry === null) {
853
- return null;
854
- }
855
631
  return de_Field((0, smithy_client_1.expectUnion)(entry), context);
856
632
  });
857
633
  return retVal;
858
634
  };
859
635
  const de_GetStatementResultResponse = (output, context) => {
860
- return {
861
- ColumnMetadata: output.ColumnMetadata != null ? de_ColumnMetadataList(output.ColumnMetadata, context) : undefined,
862
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
863
- Records: output.Records != null ? de_SqlRecords(output.Records, context) : undefined,
864
- TotalNumRows: (0, smithy_client_1.expectLong)(output.TotalNumRows),
865
- };
866
- };
867
- const de_InternalServerException = (output, context) => {
868
- return {
869
- Message: (0, smithy_client_1.expectString)(output.Message),
870
- };
871
- };
872
- const de_ListDatabasesResponse = (output, context) => {
873
- return {
874
- Databases: output.Databases != null ? de_DatabaseList(output.Databases, context) : undefined,
875
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
876
- };
877
- };
878
- const de_ListSchemasResponse = (output, context) => {
879
- return {
880
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
881
- Schemas: output.Schemas != null ? de_SchemaList(output.Schemas, context) : undefined,
882
- };
883
- };
884
- const de_ListStatementsResponse = (output, context) => {
885
- return {
886
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
887
- Statements: output.Statements != null ? de_StatementList(output.Statements, context) : undefined,
888
- };
889
- };
890
- const de_ListTablesResponse = (output, context) => {
891
- return {
892
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
893
- Tables: output.Tables != null ? de_TableList(output.Tables, context) : undefined,
894
- };
895
- };
896
- const de_ResourceNotFoundException = (output, context) => {
897
- return {
898
- Message: (0, smithy_client_1.expectString)(output.Message),
899
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
900
- };
901
- };
902
- const de_SchemaList = (output, context) => {
903
- const retVal = (output || [])
904
- .filter((e) => e != null)
905
- .map((entry) => {
906
- if (entry === null) {
907
- return null;
908
- }
909
- return (0, smithy_client_1.expectString)(entry);
636
+ return (0, smithy_client_1.take)(output, {
637
+ ColumnMetadata: smithy_client_1._json,
638
+ NextToken: smithy_client_1.expectString,
639
+ Records: (_) => de_SqlRecords(_, context),
640
+ TotalNumRows: smithy_client_1.expectLong,
910
641
  });
911
- return retVal;
912
- };
913
- const de_SqlParameter = (output, context) => {
914
- return {
915
- name: (0, smithy_client_1.expectString)(output.name),
916
- value: (0, smithy_client_1.expectString)(output.value),
917
- };
918
642
  };
919
- const de_SqlParametersList = (output, context) => {
920
- const retVal = (output || [])
921
- .filter((e) => e != null)
922
- .map((entry) => {
923
- if (entry === null) {
924
- return null;
925
- }
926
- return de_SqlParameter(entry, context);
643
+ const de_ListStatementsResponse = (output, context) => {
644
+ return (0, smithy_client_1.take)(output, {
645
+ NextToken: smithy_client_1.expectString,
646
+ Statements: (_) => de_StatementList(_, context),
927
647
  });
928
- return retVal;
929
648
  };
930
649
  const de_SqlRecords = (output, context) => {
931
650
  const retVal = (output || [])
932
651
  .filter((e) => e != null)
933
652
  .map((entry) => {
934
- if (entry === null) {
935
- return null;
936
- }
937
653
  return de_FieldList(entry, context);
938
654
  });
939
655
  return retVal;
940
656
  };
941
657
  const de_StatementData = (output, context) => {
942
- return {
943
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
944
- Id: (0, smithy_client_1.expectString)(output.Id),
945
- IsBatchStatement: (0, smithy_client_1.expectBoolean)(output.IsBatchStatement),
946
- QueryParameters: output.QueryParameters != null ? de_SqlParametersList(output.QueryParameters, context) : undefined,
947
- QueryString: (0, smithy_client_1.expectString)(output.QueryString),
948
- QueryStrings: output.QueryStrings != null ? de_StatementStringList(output.QueryStrings, context) : undefined,
949
- SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
950
- StatementName: (0, smithy_client_1.expectString)(output.StatementName),
951
- Status: (0, smithy_client_1.expectString)(output.Status),
952
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
953
- };
658
+ return (0, smithy_client_1.take)(output, {
659
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
660
+ Id: smithy_client_1.expectString,
661
+ IsBatchStatement: smithy_client_1.expectBoolean,
662
+ QueryParameters: smithy_client_1._json,
663
+ QueryString: smithy_client_1.expectString,
664
+ QueryStrings: smithy_client_1._json,
665
+ SecretArn: smithy_client_1.expectString,
666
+ StatementName: smithy_client_1.expectString,
667
+ Status: smithy_client_1.expectString,
668
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
669
+ });
954
670
  };
955
671
  const de_StatementList = (output, context) => {
956
672
  const retVal = (output || [])
957
673
  .filter((e) => e != null)
958
674
  .map((entry) => {
959
- if (entry === null) {
960
- return null;
961
- }
962
675
  return de_StatementData(entry, context);
963
676
  });
964
677
  return retVal;
965
678
  };
966
- const de_StatementStringList = (output, context) => {
967
- const retVal = (output || [])
968
- .filter((e) => e != null)
969
- .map((entry) => {
970
- if (entry === null) {
971
- return null;
972
- }
973
- return (0, smithy_client_1.expectString)(entry);
974
- });
975
- return retVal;
976
- };
977
679
  const de_SubStatementData = (output, context) => {
978
- return {
979
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
980
- Duration: (0, smithy_client_1.expectLong)(output.Duration),
981
- Error: (0, smithy_client_1.expectString)(output.Error),
982
- HasResultSet: (0, smithy_client_1.expectBoolean)(output.HasResultSet),
983
- Id: (0, smithy_client_1.expectString)(output.Id),
984
- QueryString: (0, smithy_client_1.expectString)(output.QueryString),
985
- RedshiftQueryId: (0, smithy_client_1.expectLong)(output.RedshiftQueryId),
986
- ResultRows: (0, smithy_client_1.expectLong)(output.ResultRows),
987
- ResultSize: (0, smithy_client_1.expectLong)(output.ResultSize),
988
- Status: (0, smithy_client_1.expectString)(output.Status),
989
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
990
- };
680
+ return (0, smithy_client_1.take)(output, {
681
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
682
+ Duration: smithy_client_1.expectLong,
683
+ Error: smithy_client_1.expectString,
684
+ HasResultSet: smithy_client_1.expectBoolean,
685
+ Id: smithy_client_1.expectString,
686
+ QueryString: smithy_client_1.expectString,
687
+ RedshiftQueryId: smithy_client_1.expectLong,
688
+ ResultRows: smithy_client_1.expectLong,
689
+ ResultSize: smithy_client_1.expectLong,
690
+ Status: smithy_client_1.expectString,
691
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
692
+ });
991
693
  };
992
694
  const de_SubStatementList = (output, context) => {
993
695
  const retVal = (output || [])
994
696
  .filter((e) => e != null)
995
697
  .map((entry) => {
996
- if (entry === null) {
997
- return null;
998
- }
999
698
  return de_SubStatementData(entry, context);
1000
699
  });
1001
700
  return retVal;
1002
701
  };
1003
- const de_TableList = (output, context) => {
1004
- const retVal = (output || [])
1005
- .filter((e) => e != null)
1006
- .map((entry) => {
1007
- if (entry === null) {
1008
- return null;
1009
- }
1010
- return de_TableMember(entry, context);
1011
- });
1012
- return retVal;
1013
- };
1014
- const de_TableMember = (output, context) => {
1015
- return {
1016
- name: (0, smithy_client_1.expectString)(output.name),
1017
- schema: (0, smithy_client_1.expectString)(output.schema),
1018
- type: (0, smithy_client_1.expectString)(output.type),
1019
- };
1020
- };
1021
- const de_ValidationException = (output, context) => {
1022
- return {
1023
- Message: (0, smithy_client_1.expectString)(output.Message),
1024
- };
1025
- };
1026
702
  const deserializeMetadata = (output) => ({
1027
703
  httpStatusCode: output.statusCode,
1028
704
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1036,6 +712,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1036
712
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1037
713
  };
1038
714
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
715
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(RedshiftDataServiceException_1.RedshiftDataServiceException);
1039
716
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1040
717
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1041
718
  const contents = {
@@ -1054,6 +731,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1054
731
  }
1055
732
  return new protocol_http_1.HttpRequest(contents);
1056
733
  };
734
+ function sharedHeaders(operation) {
735
+ return {
736
+ "content-type": "application/x-amz-json-1.1",
737
+ "x-amz-target": `RedshiftData.${operation}`,
738
+ };
739
+ }
1057
740
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1058
741
  if (encoded.length) {
1059
742
  return JSON.parse(encoded);