@aws-sdk/client-redshift-data 3.118.1 → 3.128.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.
@@ -125,8 +125,7 @@ const deserializeAws_json1_1BatchExecuteStatementCommandError = async (output, c
125
125
  body: await parseBody(output.body, context),
126
126
  };
127
127
  let response;
128
- let errorCode = "UnknownError";
129
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
128
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
130
129
  switch (errorCode) {
131
130
  case "ActiveStatementsExceededException":
132
131
  case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
@@ -139,10 +138,12 @@ const deserializeAws_json1_1BatchExecuteStatementCommandError = async (output, c
139
138
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
140
139
  default:
141
140
  const parsedBody = parsedOutput.body;
141
+ const $metadata = deserializeMetadata(output);
142
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
142
143
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
143
- name: parsedBody.code || parsedBody.Code || errorCode,
144
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
144
145
  $fault: "client",
145
- $metadata: deserializeMetadata(output),
146
+ $metadata,
146
147
  });
147
148
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
148
149
  }
@@ -167,8 +168,7 @@ const deserializeAws_json1_1CancelStatementCommandError = async (output, context
167
168
  body: await parseBody(output.body, context),
168
169
  };
169
170
  let response;
170
- let errorCode = "UnknownError";
171
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
171
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
172
172
  switch (errorCode) {
173
173
  case "DatabaseConnectionException":
174
174
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
@@ -184,10 +184,12 @@ const deserializeAws_json1_1CancelStatementCommandError = async (output, context
184
184
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
185
185
  default:
186
186
  const parsedBody = parsedOutput.body;
187
+ const $metadata = deserializeMetadata(output);
188
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
187
189
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
188
- name: parsedBody.code || parsedBody.Code || errorCode,
190
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
189
191
  $fault: "client",
190
- $metadata: deserializeMetadata(output),
192
+ $metadata,
191
193
  });
192
194
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
193
195
  }
@@ -212,8 +214,7 @@ const deserializeAws_json1_1DescribeStatementCommandError = async (output, conte
212
214
  body: await parseBody(output.body, context),
213
215
  };
214
216
  let response;
215
- let errorCode = "UnknownError";
216
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
217
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
217
218
  switch (errorCode) {
218
219
  case "InternalServerException":
219
220
  case "com.amazonaws.redshiftdata#InternalServerException":
@@ -226,10 +227,12 @@ const deserializeAws_json1_1DescribeStatementCommandError = async (output, conte
226
227
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
227
228
  default:
228
229
  const parsedBody = parsedOutput.body;
230
+ const $metadata = deserializeMetadata(output);
231
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
229
232
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
230
- name: parsedBody.code || parsedBody.Code || errorCode,
233
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
231
234
  $fault: "client",
232
- $metadata: deserializeMetadata(output),
235
+ $metadata,
233
236
  });
234
237
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
235
238
  }
@@ -254,8 +257,7 @@ const deserializeAws_json1_1DescribeTableCommandError = async (output, context)
254
257
  body: await parseBody(output.body, context),
255
258
  };
256
259
  let response;
257
- let errorCode = "UnknownError";
258
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
260
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
259
261
  switch (errorCode) {
260
262
  case "DatabaseConnectionException":
261
263
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
@@ -268,10 +270,12 @@ const deserializeAws_json1_1DescribeTableCommandError = async (output, context)
268
270
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
269
271
  default:
270
272
  const parsedBody = parsedOutput.body;
273
+ const $metadata = deserializeMetadata(output);
274
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
271
275
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
272
- name: parsedBody.code || parsedBody.Code || errorCode,
276
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
273
277
  $fault: "client",
274
- $metadata: deserializeMetadata(output),
278
+ $metadata,
275
279
  });
276
280
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
277
281
  }
@@ -296,8 +300,7 @@ const deserializeAws_json1_1ExecuteStatementCommandError = async (output, contex
296
300
  body: await parseBody(output.body, context),
297
301
  };
298
302
  let response;
299
- let errorCode = "UnknownError";
300
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
303
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
301
304
  switch (errorCode) {
302
305
  case "ActiveStatementsExceededException":
303
306
  case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
@@ -310,10 +313,12 @@ const deserializeAws_json1_1ExecuteStatementCommandError = async (output, contex
310
313
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
311
314
  default:
312
315
  const parsedBody = parsedOutput.body;
316
+ const $metadata = deserializeMetadata(output);
317
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
313
318
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
314
- name: parsedBody.code || parsedBody.Code || errorCode,
319
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
315
320
  $fault: "client",
316
- $metadata: deserializeMetadata(output),
321
+ $metadata,
317
322
  });
318
323
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
319
324
  }
@@ -338,8 +343,7 @@ const deserializeAws_json1_1GetStatementResultCommandError = async (output, cont
338
343
  body: await parseBody(output.body, context),
339
344
  };
340
345
  let response;
341
- let errorCode = "UnknownError";
342
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
346
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
343
347
  switch (errorCode) {
344
348
  case "InternalServerException":
345
349
  case "com.amazonaws.redshiftdata#InternalServerException":
@@ -352,10 +356,12 @@ const deserializeAws_json1_1GetStatementResultCommandError = async (output, cont
352
356
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
353
357
  default:
354
358
  const parsedBody = parsedOutput.body;
359
+ const $metadata = deserializeMetadata(output);
360
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
355
361
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
356
- name: parsedBody.code || parsedBody.Code || errorCode,
362
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
357
363
  $fault: "client",
358
- $metadata: deserializeMetadata(output),
364
+ $metadata,
359
365
  });
360
366
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
361
367
  }
@@ -380,8 +386,7 @@ const deserializeAws_json1_1ListDatabasesCommandError = async (output, context)
380
386
  body: await parseBody(output.body, context),
381
387
  };
382
388
  let response;
383
- let errorCode = "UnknownError";
384
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
385
390
  switch (errorCode) {
386
391
  case "DatabaseConnectionException":
387
392
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
@@ -394,10 +399,12 @@ const deserializeAws_json1_1ListDatabasesCommandError = async (output, context)
394
399
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
395
400
  default:
396
401
  const parsedBody = parsedOutput.body;
402
+ const $metadata = deserializeMetadata(output);
403
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
397
404
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
398
- name: parsedBody.code || parsedBody.Code || errorCode,
405
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
399
406
  $fault: "client",
400
- $metadata: deserializeMetadata(output),
407
+ $metadata,
401
408
  });
402
409
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
403
410
  }
@@ -422,8 +429,7 @@ const deserializeAws_json1_1ListSchemasCommandError = async (output, context) =>
422
429
  body: await parseBody(output.body, context),
423
430
  };
424
431
  let response;
425
- let errorCode = "UnknownError";
426
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
427
433
  switch (errorCode) {
428
434
  case "DatabaseConnectionException":
429
435
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
@@ -436,10 +442,12 @@ const deserializeAws_json1_1ListSchemasCommandError = async (output, context) =>
436
442
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
437
443
  default:
438
444
  const parsedBody = parsedOutput.body;
445
+ const $metadata = deserializeMetadata(output);
446
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
439
447
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
440
- name: parsedBody.code || parsedBody.Code || errorCode,
448
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
441
449
  $fault: "client",
442
- $metadata: deserializeMetadata(output),
450
+ $metadata,
443
451
  });
444
452
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
445
453
  }
@@ -464,8 +472,7 @@ const deserializeAws_json1_1ListStatementsCommandError = async (output, context)
464
472
  body: await parseBody(output.body, context),
465
473
  };
466
474
  let response;
467
- let errorCode = "UnknownError";
468
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
475
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
469
476
  switch (errorCode) {
470
477
  case "InternalServerException":
471
478
  case "com.amazonaws.redshiftdata#InternalServerException":
@@ -475,10 +482,12 @@ const deserializeAws_json1_1ListStatementsCommandError = async (output, context)
475
482
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
476
483
  default:
477
484
  const parsedBody = parsedOutput.body;
485
+ const $metadata = deserializeMetadata(output);
486
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
478
487
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
479
- name: parsedBody.code || parsedBody.Code || errorCode,
488
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
480
489
  $fault: "client",
481
- $metadata: deserializeMetadata(output),
490
+ $metadata,
482
491
  });
483
492
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
484
493
  }
@@ -503,8 +512,7 @@ const deserializeAws_json1_1ListTablesCommandError = async (output, context) =>
503
512
  body: await parseBody(output.body, context),
504
513
  };
505
514
  let response;
506
- let errorCode = "UnknownError";
507
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
515
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
508
516
  switch (errorCode) {
509
517
  case "DatabaseConnectionException":
510
518
  case "com.amazonaws.redshiftdata#DatabaseConnectionException":
@@ -517,10 +525,12 @@ const deserializeAws_json1_1ListTablesCommandError = async (output, context) =>
517
525
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
518
526
  default:
519
527
  const parsedBody = parsedOutput.body;
528
+ const $metadata = deserializeMetadata(output);
529
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
520
530
  response = new RedshiftDataServiceException_1.RedshiftDataServiceException({
521
- name: parsedBody.code || parsedBody.Code || errorCode,
531
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
522
532
  $fault: "client",
523
- $metadata: deserializeMetadata(output),
533
+ $metadata,
524
534
  });
525
535
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
526
536
  }
@@ -590,114 +600,104 @@ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, c
590
600
  };
591
601
  const serializeAws_json1_1BatchExecuteStatementInput = (input, context) => {
592
602
  return {
593
- ...(input.ClusterIdentifier !== undefined &&
594
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
595
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
596
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
597
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
598
- ...(input.Sqls !== undefined && input.Sqls !== null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) }),
599
- ...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
600
- ...(input.WithEvent !== undefined && input.WithEvent !== null && { WithEvent: input.WithEvent }),
601
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
603
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
604
+ ...(input.Database != null && { Database: input.Database }),
605
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
606
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
607
+ ...(input.Sqls != null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) }),
608
+ ...(input.StatementName != null && { StatementName: input.StatementName }),
609
+ ...(input.WithEvent != null && { WithEvent: input.WithEvent }),
610
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
602
611
  };
603
612
  };
604
613
  const serializeAws_json1_1CancelStatementRequest = (input, context) => {
605
614
  return {
606
- ...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
615
+ ...(input.Id != null && { Id: input.Id }),
607
616
  };
608
617
  };
609
618
  const serializeAws_json1_1DescribeStatementRequest = (input, context) => {
610
619
  return {
611
- ...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
620
+ ...(input.Id != null && { Id: input.Id }),
612
621
  };
613
622
  };
614
623
  const serializeAws_json1_1DescribeTableRequest = (input, context) => {
615
624
  return {
616
- ...(input.ClusterIdentifier !== undefined &&
617
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
618
- ...(input.ConnectedDatabase !== undefined &&
619
- input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
620
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
621
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
622
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
623
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
624
- ...(input.Schema !== undefined && input.Schema !== null && { Schema: input.Schema }),
625
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
626
- ...(input.Table !== undefined && input.Table !== null && { Table: input.Table }),
627
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
625
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
626
+ ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
627
+ ...(input.Database != null && { Database: input.Database }),
628
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
629
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
630
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
631
+ ...(input.Schema != null && { Schema: input.Schema }),
632
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
633
+ ...(input.Table != null && { Table: input.Table }),
634
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
628
635
  };
629
636
  };
630
637
  const serializeAws_json1_1ExecuteStatementInput = (input, context) => {
631
638
  return {
632
- ...(input.ClusterIdentifier !== undefined &&
633
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
634
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
635
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
636
- ...(input.Parameters !== undefined &&
637
- input.Parameters !== null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) }),
638
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
639
- ...(input.Sql !== undefined && input.Sql !== null && { Sql: input.Sql }),
640
- ...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
641
- ...(input.WithEvent !== undefined && input.WithEvent !== null && { WithEvent: input.WithEvent }),
642
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
639
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
640
+ ...(input.Database != null && { Database: input.Database }),
641
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
642
+ ...(input.Parameters != null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) }),
643
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
644
+ ...(input.Sql != null && { Sql: input.Sql }),
645
+ ...(input.StatementName != null && { StatementName: input.StatementName }),
646
+ ...(input.WithEvent != null && { WithEvent: input.WithEvent }),
647
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
643
648
  };
644
649
  };
645
650
  const serializeAws_json1_1GetStatementResultRequest = (input, context) => {
646
651
  return {
647
- ...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
648
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
652
+ ...(input.Id != null && { Id: input.Id }),
653
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
649
654
  };
650
655
  };
651
656
  const serializeAws_json1_1ListDatabasesRequest = (input, context) => {
652
657
  return {
653
- ...(input.ClusterIdentifier !== undefined &&
654
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
655
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
656
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
657
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
658
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
659
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
660
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
658
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
659
+ ...(input.Database != null && { Database: input.Database }),
660
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
661
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
662
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
663
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
664
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
661
665
  };
662
666
  };
663
667
  const serializeAws_json1_1ListSchemasRequest = (input, context) => {
664
668
  return {
665
- ...(input.ClusterIdentifier !== undefined &&
666
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
667
- ...(input.ConnectedDatabase !== undefined &&
668
- input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
669
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
670
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
671
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
672
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
673
- ...(input.SchemaPattern !== undefined && input.SchemaPattern !== null && { SchemaPattern: input.SchemaPattern }),
674
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
675
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
669
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
670
+ ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
671
+ ...(input.Database != null && { Database: input.Database }),
672
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
673
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
674
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
675
+ ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
676
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
677
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
676
678
  };
677
679
  };
678
680
  const serializeAws_json1_1ListStatementsRequest = (input, context) => {
679
681
  return {
680
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
681
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
682
- ...(input.RoleLevel !== undefined && input.RoleLevel !== null && { RoleLevel: input.RoleLevel }),
683
- ...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
684
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
682
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
683
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
684
+ ...(input.RoleLevel != null && { RoleLevel: input.RoleLevel }),
685
+ ...(input.StatementName != null && { StatementName: input.StatementName }),
686
+ ...(input.Status != null && { Status: input.Status }),
685
687
  };
686
688
  };
687
689
  const serializeAws_json1_1ListTablesRequest = (input, context) => {
688
690
  return {
689
- ...(input.ClusterIdentifier !== undefined &&
690
- input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
691
- ...(input.ConnectedDatabase !== undefined &&
692
- input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
693
- ...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
694
- ...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
695
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
696
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
697
- ...(input.SchemaPattern !== undefined && input.SchemaPattern !== null && { SchemaPattern: input.SchemaPattern }),
698
- ...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
699
- ...(input.TablePattern !== undefined && input.TablePattern !== null && { TablePattern: input.TablePattern }),
700
- ...(input.WorkgroupName !== undefined && input.WorkgroupName !== null && { WorkgroupName: input.WorkgroupName }),
691
+ ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
692
+ ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
693
+ ...(input.Database != null && { Database: input.Database }),
694
+ ...(input.DbUser != null && { DbUser: input.DbUser }),
695
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
696
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
697
+ ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
698
+ ...(input.SecretArn != null && { SecretArn: input.SecretArn }),
699
+ ...(input.TablePattern != null && { TablePattern: input.TablePattern }),
700
+ ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
701
701
  };
702
702
  };
703
703
  const serializeAws_json1_1SqlList = (input, context) => {
@@ -712,8 +712,8 @@ const serializeAws_json1_1SqlList = (input, context) => {
712
712
  };
713
713
  const serializeAws_json1_1SqlParameter = (input, context) => {
714
714
  return {
715
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
716
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
715
+ ...(input.name != null && { name: input.name }),
716
+ ...(input.value != null && { value: input.value }),
717
717
  };
718
718
  };
719
719
  const serializeAws_json1_1SqlParametersList = (input, context) => {
@@ -740,9 +740,7 @@ const deserializeAws_json1_1BatchExecuteStatementException = (output, context) =
740
740
  const deserializeAws_json1_1BatchExecuteStatementOutput = (output, context) => {
741
741
  return {
742
742
  ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
743
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
744
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
745
- : undefined,
743
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
746
744
  Database: (0, smithy_client_1.expectString)(output.Database),
747
745
  DbUser: (0, smithy_client_1.expectString)(output.DbUser),
748
746
  Id: (0, smithy_client_1.expectString)(output.Id),
@@ -813,16 +811,14 @@ const deserializeAws_json1_1DatabaseList = (output, context) => {
813
811
  const deserializeAws_json1_1DescribeStatementResponse = (output, context) => {
814
812
  return {
815
813
  ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
816
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
817
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
818
- : undefined,
814
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
819
815
  Database: (0, smithy_client_1.expectString)(output.Database),
820
816
  DbUser: (0, smithy_client_1.expectString)(output.DbUser),
821
817
  Duration: (0, smithy_client_1.expectLong)(output.Duration),
822
818
  Error: (0, smithy_client_1.expectString)(output.Error),
823
819
  HasResultSet: (0, smithy_client_1.expectBoolean)(output.HasResultSet),
824
820
  Id: (0, smithy_client_1.expectString)(output.Id),
825
- QueryParameters: output.QueryParameters !== undefined && output.QueryParameters !== null
821
+ QueryParameters: output.QueryParameters != null
826
822
  ? deserializeAws_json1_1SqlParametersList(output.QueryParameters, context)
827
823
  : undefined,
828
824
  QueryString: (0, smithy_client_1.expectString)(output.QueryString),
@@ -832,20 +828,14 @@ const deserializeAws_json1_1DescribeStatementResponse = (output, context) => {
832
828
  ResultSize: (0, smithy_client_1.expectLong)(output.ResultSize),
833
829
  SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
834
830
  Status: (0, smithy_client_1.expectString)(output.Status),
835
- SubStatements: output.SubStatements !== undefined && output.SubStatements !== null
836
- ? deserializeAws_json1_1SubStatementList(output.SubStatements, context)
837
- : undefined,
838
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
839
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt)))
840
- : undefined,
831
+ SubStatements: output.SubStatements != null ? deserializeAws_json1_1SubStatementList(output.SubStatements, context) : undefined,
832
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
841
833
  WorkgroupName: (0, smithy_client_1.expectString)(output.WorkgroupName),
842
834
  };
843
835
  };
844
836
  const deserializeAws_json1_1DescribeTableResponse = (output, context) => {
845
837
  return {
846
- ColumnList: output.ColumnList !== undefined && output.ColumnList !== null
847
- ? deserializeAws_json1_1ColumnList(output.ColumnList, context)
848
- : undefined,
838
+ ColumnList: output.ColumnList != null ? deserializeAws_json1_1ColumnList(output.ColumnList, context) : undefined,
849
839
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
850
840
  TableName: (0, smithy_client_1.expectString)(output.TableName),
851
841
  };
@@ -859,9 +849,7 @@ const deserializeAws_json1_1ExecuteStatementException = (output, context) => {
859
849
  const deserializeAws_json1_1ExecuteStatementOutput = (output, context) => {
860
850
  return {
861
851
  ClusterIdentifier: (0, smithy_client_1.expectString)(output.ClusterIdentifier),
862
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
863
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
864
- : undefined,
852
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
865
853
  Database: (0, smithy_client_1.expectString)(output.Database),
866
854
  DbUser: (0, smithy_client_1.expectString)(output.DbUser),
867
855
  Id: (0, smithy_client_1.expectString)(output.Id),
@@ -905,13 +893,11 @@ const deserializeAws_json1_1FieldList = (output, context) => {
905
893
  };
906
894
  const deserializeAws_json1_1GetStatementResultResponse = (output, context) => {
907
895
  return {
908
- ColumnMetadata: output.ColumnMetadata !== undefined && output.ColumnMetadata !== null
896
+ ColumnMetadata: output.ColumnMetadata != null
909
897
  ? deserializeAws_json1_1ColumnMetadataList(output.ColumnMetadata, context)
910
898
  : undefined,
911
899
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
912
- Records: output.Records !== undefined && output.Records !== null
913
- ? deserializeAws_json1_1SqlRecords(output.Records, context)
914
- : undefined,
900
+ Records: output.Records != null ? deserializeAws_json1_1SqlRecords(output.Records, context) : undefined,
915
901
  TotalNumRows: (0, smithy_client_1.expectLong)(output.TotalNumRows),
916
902
  };
917
903
  };
@@ -922,34 +908,26 @@ const deserializeAws_json1_1InternalServerException = (output, context) => {
922
908
  };
923
909
  const deserializeAws_json1_1ListDatabasesResponse = (output, context) => {
924
910
  return {
925
- Databases: output.Databases !== undefined && output.Databases !== null
926
- ? deserializeAws_json1_1DatabaseList(output.Databases, context)
927
- : undefined,
911
+ Databases: output.Databases != null ? deserializeAws_json1_1DatabaseList(output.Databases, context) : undefined,
928
912
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
929
913
  };
930
914
  };
931
915
  const deserializeAws_json1_1ListSchemasResponse = (output, context) => {
932
916
  return {
933
917
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
934
- Schemas: output.Schemas !== undefined && output.Schemas !== null
935
- ? deserializeAws_json1_1SchemaList(output.Schemas, context)
936
- : undefined,
918
+ Schemas: output.Schemas != null ? deserializeAws_json1_1SchemaList(output.Schemas, context) : undefined,
937
919
  };
938
920
  };
939
921
  const deserializeAws_json1_1ListStatementsResponse = (output, context) => {
940
922
  return {
941
923
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
942
- Statements: output.Statements !== undefined && output.Statements !== null
943
- ? deserializeAws_json1_1StatementList(output.Statements, context)
944
- : undefined,
924
+ Statements: output.Statements != null ? deserializeAws_json1_1StatementList(output.Statements, context) : undefined,
945
925
  };
946
926
  };
947
927
  const deserializeAws_json1_1ListTablesResponse = (output, context) => {
948
928
  return {
949
929
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
950
- Tables: output.Tables !== undefined && output.Tables !== null
951
- ? deserializeAws_json1_1TableList(output.Tables, context)
952
- : undefined,
930
+ Tables: output.Tables != null ? deserializeAws_json1_1TableList(output.Tables, context) : undefined,
953
931
  };
954
932
  };
955
933
  const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
@@ -999,24 +977,18 @@ const deserializeAws_json1_1SqlRecords = (output, context) => {
999
977
  };
1000
978
  const deserializeAws_json1_1StatementData = (output, context) => {
1001
979
  return {
1002
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
1003
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
1004
- : undefined,
980
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1005
981
  Id: (0, smithy_client_1.expectString)(output.Id),
1006
982
  IsBatchStatement: (0, smithy_client_1.expectBoolean)(output.IsBatchStatement),
1007
- QueryParameters: output.QueryParameters !== undefined && output.QueryParameters !== null
983
+ QueryParameters: output.QueryParameters != null
1008
984
  ? deserializeAws_json1_1SqlParametersList(output.QueryParameters, context)
1009
985
  : undefined,
1010
986
  QueryString: (0, smithy_client_1.expectString)(output.QueryString),
1011
- QueryStrings: output.QueryStrings !== undefined && output.QueryStrings !== null
1012
- ? deserializeAws_json1_1StatementStringList(output.QueryStrings, context)
1013
- : undefined,
987
+ QueryStrings: output.QueryStrings != null ? deserializeAws_json1_1StatementStringList(output.QueryStrings, context) : undefined,
1014
988
  SecretArn: (0, smithy_client_1.expectString)(output.SecretArn),
1015
989
  StatementName: (0, smithy_client_1.expectString)(output.StatementName),
1016
990
  Status: (0, smithy_client_1.expectString)(output.Status),
1017
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
1018
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt)))
1019
- : undefined,
991
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
1020
992
  };
1021
993
  };
1022
994
  const deserializeAws_json1_1StatementList = (output, context) => {
@@ -1043,9 +1015,7 @@ const deserializeAws_json1_1StatementStringList = (output, context) => {
1043
1015
  };
1044
1016
  const deserializeAws_json1_1SubStatementData = (output, context) => {
1045
1017
  return {
1046
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
1047
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
1048
- : undefined,
1018
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
1049
1019
  Duration: (0, smithy_client_1.expectLong)(output.Duration),
1050
1020
  Error: (0, smithy_client_1.expectString)(output.Error),
1051
1021
  HasResultSet: (0, smithy_client_1.expectBoolean)(output.HasResultSet),
@@ -1055,9 +1025,7 @@ const deserializeAws_json1_1SubStatementData = (output, context) => {
1055
1025
  ResultRows: (0, smithy_client_1.expectLong)(output.ResultRows),
1056
1026
  ResultSize: (0, smithy_client_1.expectLong)(output.ResultSize),
1057
1027
  Status: (0, smithy_client_1.expectString)(output.Status),
1058
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
1059
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt)))
1060
- : undefined,
1028
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
1061
1029
  };
1062
1030
  };
1063
1031
  const deserializeAws_json1_1SubStatementList = (output, context) => {
@@ -1156,5 +1124,4 @@ const loadRestJsonErrorCode = (output, data) => {
1156
1124
  if (data["__type"] !== undefined) {
1157
1125
  return sanitizeErrorCode(data["__type"]);
1158
1126
  }
1159
- return "";
1160
1127
  };