@aws-sdk/client-rds-data 3.490.0 → 3.495.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.
package/dist-cjs/index.js CHANGED
@@ -1,11 +1,1646 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RDSDataServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./RDSDataClient"), exports);
6
- tslib_1.__exportStar(require("./RDSData"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var RDSDataServiceException_1 = require("./models/RDSDataServiceException");
11
- Object.defineProperty(exports, "RDSDataServiceException", { enumerable: true, get: function () { return RDSDataServiceException_1.RDSDataServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ ArrayValue: () => ArrayValue,
26
+ BadRequestException: () => BadRequestException,
27
+ BatchExecuteStatementCommand: () => BatchExecuteStatementCommand,
28
+ BeginTransactionCommand: () => BeginTransactionCommand,
29
+ CommitTransactionCommand: () => CommitTransactionCommand,
30
+ DatabaseErrorException: () => DatabaseErrorException,
31
+ DatabaseNotFoundException: () => DatabaseNotFoundException,
32
+ DatabaseUnavailableException: () => DatabaseUnavailableException,
33
+ DecimalReturnType: () => DecimalReturnType,
34
+ ExecuteSqlCommand: () => ExecuteSqlCommand,
35
+ ExecuteStatementCommand: () => ExecuteStatementCommand,
36
+ Field: () => Field,
37
+ ForbiddenException: () => ForbiddenException,
38
+ HttpEndpointNotEnabledException: () => HttpEndpointNotEnabledException,
39
+ InternalServerErrorException: () => InternalServerErrorException,
40
+ InvalidSecretException: () => InvalidSecretException,
41
+ LongReturnType: () => LongReturnType,
42
+ NotFoundException: () => NotFoundException,
43
+ RDSData: () => RDSData,
44
+ RDSDataClient: () => RDSDataClient,
45
+ RDSDataServiceException: () => RDSDataServiceException,
46
+ RecordsFormatType: () => RecordsFormatType,
47
+ RollbackTransactionCommand: () => RollbackTransactionCommand,
48
+ SecretsErrorException: () => SecretsErrorException,
49
+ ServiceUnavailableError: () => ServiceUnavailableError,
50
+ StatementTimeoutException: () => StatementTimeoutException,
51
+ TransactionNotFoundException: () => TransactionNotFoundException,
52
+ TypeHint: () => TypeHint,
53
+ UnsupportedResultException: () => UnsupportedResultException,
54
+ Value: () => Value,
55
+ __Client: () => import_smithy_client.Client
56
+ });
57
+ module.exports = __toCommonJS(src_exports);
58
+
59
+ // src/RDSDataClient.ts
60
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
61
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
62
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
63
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
64
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
65
+ var import_config_resolver = require("@smithy/config-resolver");
66
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
67
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
68
+ var import_middleware_retry = require("@smithy/middleware-retry");
69
+
70
+
71
+ // src/endpoint/EndpointParameters.ts
72
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
73
+ return {
74
+ ...options,
75
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
76
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
77
+ defaultSigningName: "rds-data"
78
+ };
79
+ }, "resolveClientEndpointParameters");
80
+ var commonParams = {
81
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
82
+ Endpoint: { type: "builtInParams", name: "endpoint" },
83
+ Region: { type: "builtInParams", name: "region" },
84
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
85
+ };
86
+
87
+ // src/RDSDataClient.ts
88
+ var import_runtimeConfig = require("././runtimeConfig");
89
+
90
+ // src/runtimeExtensions.ts
91
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
92
+ var import_protocol_http = require("@smithy/protocol-http");
93
+ var import_smithy_client = require("@smithy/smithy-client");
94
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
95
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
96
+ const extensionConfiguration = {
97
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
98
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
99
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
100
+ };
101
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
102
+ return {
103
+ ...runtimeConfig,
104
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
105
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
106
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
107
+ };
108
+ }, "resolveRuntimeExtensions");
109
+
110
+ // src/RDSDataClient.ts
111
+ var _RDSDataClient = class _RDSDataClient extends import_smithy_client.Client {
112
+ constructor(...[configuration]) {
113
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
114
+ const _config_1 = resolveClientEndpointParameters(_config_0);
115
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
116
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
117
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
118
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
119
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
120
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
121
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
122
+ super(_config_8);
123
+ this.config = _config_8;
124
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
125
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
126
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
127
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
128
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
129
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
130
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
131
+ }
132
+ /**
133
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
134
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
135
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
136
+ */
137
+ destroy() {
138
+ super.destroy();
139
+ }
140
+ };
141
+ __name(_RDSDataClient, "RDSDataClient");
142
+ var RDSDataClient = _RDSDataClient;
143
+
144
+ // src/RDSData.ts
145
+
146
+
147
+ // src/commands/BatchExecuteStatementCommand.ts
148
+
149
+ var import_middleware_serde = require("@smithy/middleware-serde");
150
+
151
+ var import_types = require("@smithy/types");
152
+
153
+ // src/protocols/Aws_restJson1.ts
154
+ var import_core = require("@aws-sdk/core");
155
+ var import_core2 = require("@smithy/core");
156
+
157
+
158
+ // src/models/RDSDataServiceException.ts
159
+
160
+ var _RDSDataServiceException = class _RDSDataServiceException extends import_smithy_client.ServiceException {
161
+ /**
162
+ * @internal
163
+ */
164
+ constructor(options) {
165
+ super(options);
166
+ Object.setPrototypeOf(this, _RDSDataServiceException.prototype);
167
+ }
168
+ };
169
+ __name(_RDSDataServiceException, "RDSDataServiceException");
170
+ var RDSDataServiceException = _RDSDataServiceException;
171
+
172
+ // src/models/models_0.ts
173
+ var _AccessDeniedException = class _AccessDeniedException extends RDSDataServiceException {
174
+ /**
175
+ * @internal
176
+ */
177
+ constructor(opts) {
178
+ super({
179
+ name: "AccessDeniedException",
180
+ $fault: "client",
181
+ ...opts
182
+ });
183
+ this.name = "AccessDeniedException";
184
+ this.$fault = "client";
185
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
186
+ }
187
+ };
188
+ __name(_AccessDeniedException, "AccessDeniedException");
189
+ var AccessDeniedException = _AccessDeniedException;
190
+ var _BadRequestException = class _BadRequestException extends RDSDataServiceException {
191
+ /**
192
+ * @internal
193
+ */
194
+ constructor(opts) {
195
+ super({
196
+ name: "BadRequestException",
197
+ $fault: "client",
198
+ ...opts
199
+ });
200
+ this.name = "BadRequestException";
201
+ this.$fault = "client";
202
+ Object.setPrototypeOf(this, _BadRequestException.prototype);
203
+ }
204
+ };
205
+ __name(_BadRequestException, "BadRequestException");
206
+ var BadRequestException = _BadRequestException;
207
+ var TypeHint = {
208
+ DATE: "DATE",
209
+ DECIMAL: "DECIMAL",
210
+ JSON: "JSON",
211
+ TIME: "TIME",
212
+ TIMESTAMP: "TIMESTAMP",
213
+ UUID: "UUID"
214
+ };
215
+ var _DatabaseErrorException = class _DatabaseErrorException extends RDSDataServiceException {
216
+ /**
217
+ * @internal
218
+ */
219
+ constructor(opts) {
220
+ super({
221
+ name: "DatabaseErrorException",
222
+ $fault: "client",
223
+ ...opts
224
+ });
225
+ this.name = "DatabaseErrorException";
226
+ this.$fault = "client";
227
+ Object.setPrototypeOf(this, _DatabaseErrorException.prototype);
228
+ }
229
+ };
230
+ __name(_DatabaseErrorException, "DatabaseErrorException");
231
+ var DatabaseErrorException = _DatabaseErrorException;
232
+ var _DatabaseNotFoundException = class _DatabaseNotFoundException extends RDSDataServiceException {
233
+ /**
234
+ * @internal
235
+ */
236
+ constructor(opts) {
237
+ super({
238
+ name: "DatabaseNotFoundException",
239
+ $fault: "client",
240
+ ...opts
241
+ });
242
+ this.name = "DatabaseNotFoundException";
243
+ this.$fault = "client";
244
+ Object.setPrototypeOf(this, _DatabaseNotFoundException.prototype);
245
+ }
246
+ };
247
+ __name(_DatabaseNotFoundException, "DatabaseNotFoundException");
248
+ var DatabaseNotFoundException = _DatabaseNotFoundException;
249
+ var _DatabaseUnavailableException = class _DatabaseUnavailableException extends RDSDataServiceException {
250
+ /**
251
+ * @internal
252
+ */
253
+ constructor(opts) {
254
+ super({
255
+ name: "DatabaseUnavailableException",
256
+ $fault: "server",
257
+ ...opts
258
+ });
259
+ this.name = "DatabaseUnavailableException";
260
+ this.$fault = "server";
261
+ Object.setPrototypeOf(this, _DatabaseUnavailableException.prototype);
262
+ }
263
+ };
264
+ __name(_DatabaseUnavailableException, "DatabaseUnavailableException");
265
+ var DatabaseUnavailableException = _DatabaseUnavailableException;
266
+ var _ForbiddenException = class _ForbiddenException extends RDSDataServiceException {
267
+ /**
268
+ * @internal
269
+ */
270
+ constructor(opts) {
271
+ super({
272
+ name: "ForbiddenException",
273
+ $fault: "client",
274
+ ...opts
275
+ });
276
+ this.name = "ForbiddenException";
277
+ this.$fault = "client";
278
+ Object.setPrototypeOf(this, _ForbiddenException.prototype);
279
+ }
280
+ };
281
+ __name(_ForbiddenException, "ForbiddenException");
282
+ var ForbiddenException = _ForbiddenException;
283
+ var _HttpEndpointNotEnabledException = class _HttpEndpointNotEnabledException extends RDSDataServiceException {
284
+ /**
285
+ * @internal
286
+ */
287
+ constructor(opts) {
288
+ super({
289
+ name: "HttpEndpointNotEnabledException",
290
+ $fault: "client",
291
+ ...opts
292
+ });
293
+ this.name = "HttpEndpointNotEnabledException";
294
+ this.$fault = "client";
295
+ Object.setPrototypeOf(this, _HttpEndpointNotEnabledException.prototype);
296
+ }
297
+ };
298
+ __name(_HttpEndpointNotEnabledException, "HttpEndpointNotEnabledException");
299
+ var HttpEndpointNotEnabledException = _HttpEndpointNotEnabledException;
300
+ var _InternalServerErrorException = class _InternalServerErrorException extends RDSDataServiceException {
301
+ /**
302
+ * @internal
303
+ */
304
+ constructor(opts) {
305
+ super({
306
+ name: "InternalServerErrorException",
307
+ $fault: "server",
308
+ ...opts
309
+ });
310
+ this.name = "InternalServerErrorException";
311
+ this.$fault = "server";
312
+ Object.setPrototypeOf(this, _InternalServerErrorException.prototype);
313
+ }
314
+ };
315
+ __name(_InternalServerErrorException, "InternalServerErrorException");
316
+ var InternalServerErrorException = _InternalServerErrorException;
317
+ var _InvalidSecretException = class _InvalidSecretException extends RDSDataServiceException {
318
+ /**
319
+ * @internal
320
+ */
321
+ constructor(opts) {
322
+ super({
323
+ name: "InvalidSecretException",
324
+ $fault: "client",
325
+ ...opts
326
+ });
327
+ this.name = "InvalidSecretException";
328
+ this.$fault = "client";
329
+ Object.setPrototypeOf(this, _InvalidSecretException.prototype);
330
+ }
331
+ };
332
+ __name(_InvalidSecretException, "InvalidSecretException");
333
+ var InvalidSecretException = _InvalidSecretException;
334
+ var _SecretsErrorException = class _SecretsErrorException extends RDSDataServiceException {
335
+ /**
336
+ * @internal
337
+ */
338
+ constructor(opts) {
339
+ super({
340
+ name: "SecretsErrorException",
341
+ $fault: "client",
342
+ ...opts
343
+ });
344
+ this.name = "SecretsErrorException";
345
+ this.$fault = "client";
346
+ Object.setPrototypeOf(this, _SecretsErrorException.prototype);
347
+ }
348
+ };
349
+ __name(_SecretsErrorException, "SecretsErrorException");
350
+ var SecretsErrorException = _SecretsErrorException;
351
+ var _ServiceUnavailableError = class _ServiceUnavailableError extends RDSDataServiceException {
352
+ /**
353
+ * @internal
354
+ */
355
+ constructor(opts) {
356
+ super({
357
+ name: "ServiceUnavailableError",
358
+ $fault: "server",
359
+ ...opts
360
+ });
361
+ this.name = "ServiceUnavailableError";
362
+ this.$fault = "server";
363
+ Object.setPrototypeOf(this, _ServiceUnavailableError.prototype);
364
+ }
365
+ };
366
+ __name(_ServiceUnavailableError, "ServiceUnavailableError");
367
+ var ServiceUnavailableError = _ServiceUnavailableError;
368
+ var _StatementTimeoutException = class _StatementTimeoutException extends RDSDataServiceException {
369
+ /**
370
+ * @internal
371
+ */
372
+ constructor(opts) {
373
+ super({
374
+ name: "StatementTimeoutException",
375
+ $fault: "client",
376
+ ...opts
377
+ });
378
+ this.name = "StatementTimeoutException";
379
+ this.$fault = "client";
380
+ Object.setPrototypeOf(this, _StatementTimeoutException.prototype);
381
+ this.dbConnectionId = opts.dbConnectionId;
382
+ }
383
+ };
384
+ __name(_StatementTimeoutException, "StatementTimeoutException");
385
+ var StatementTimeoutException = _StatementTimeoutException;
386
+ var _TransactionNotFoundException = class _TransactionNotFoundException extends RDSDataServiceException {
387
+ /**
388
+ * @internal
389
+ */
390
+ constructor(opts) {
391
+ super({
392
+ name: "TransactionNotFoundException",
393
+ $fault: "client",
394
+ ...opts
395
+ });
396
+ this.name = "TransactionNotFoundException";
397
+ this.$fault = "client";
398
+ Object.setPrototypeOf(this, _TransactionNotFoundException.prototype);
399
+ }
400
+ };
401
+ __name(_TransactionNotFoundException, "TransactionNotFoundException");
402
+ var TransactionNotFoundException = _TransactionNotFoundException;
403
+ var _NotFoundException = class _NotFoundException extends RDSDataServiceException {
404
+ /**
405
+ * @internal
406
+ */
407
+ constructor(opts) {
408
+ super({
409
+ name: "NotFoundException",
410
+ $fault: "client",
411
+ ...opts
412
+ });
413
+ this.name = "NotFoundException";
414
+ this.$fault = "client";
415
+ Object.setPrototypeOf(this, _NotFoundException.prototype);
416
+ }
417
+ };
418
+ __name(_NotFoundException, "NotFoundException");
419
+ var NotFoundException = _NotFoundException;
420
+ var DecimalReturnType = {
421
+ DOUBLE_OR_LONG: "DOUBLE_OR_LONG",
422
+ STRING: "STRING"
423
+ };
424
+ var RecordsFormatType = {
425
+ JSON: "JSON",
426
+ NONE: "NONE"
427
+ };
428
+ var LongReturnType = {
429
+ LONG: "LONG",
430
+ STRING: "STRING"
431
+ };
432
+ var _UnsupportedResultException = class _UnsupportedResultException extends RDSDataServiceException {
433
+ /**
434
+ * @internal
435
+ */
436
+ constructor(opts) {
437
+ super({
438
+ name: "UnsupportedResultException",
439
+ $fault: "client",
440
+ ...opts
441
+ });
442
+ this.name = "UnsupportedResultException";
443
+ this.$fault = "client";
444
+ Object.setPrototypeOf(this, _UnsupportedResultException.prototype);
445
+ }
446
+ };
447
+ __name(_UnsupportedResultException, "UnsupportedResultException");
448
+ var UnsupportedResultException = _UnsupportedResultException;
449
+ var ArrayValue;
450
+ ((ArrayValue2) => {
451
+ ArrayValue2.visit = /* @__PURE__ */ __name((value, visitor) => {
452
+ if (value.booleanValues !== void 0)
453
+ return visitor.booleanValues(value.booleanValues);
454
+ if (value.longValues !== void 0)
455
+ return visitor.longValues(value.longValues);
456
+ if (value.doubleValues !== void 0)
457
+ return visitor.doubleValues(value.doubleValues);
458
+ if (value.stringValues !== void 0)
459
+ return visitor.stringValues(value.stringValues);
460
+ if (value.arrayValues !== void 0)
461
+ return visitor.arrayValues(value.arrayValues);
462
+ return visitor._(value.$unknown[0], value.$unknown[1]);
463
+ }, "visit");
464
+ })(ArrayValue || (ArrayValue = {}));
465
+ var Field;
466
+ ((Field2) => {
467
+ Field2.visit = /* @__PURE__ */ __name((value, visitor) => {
468
+ if (value.isNull !== void 0)
469
+ return visitor.isNull(value.isNull);
470
+ if (value.booleanValue !== void 0)
471
+ return visitor.booleanValue(value.booleanValue);
472
+ if (value.longValue !== void 0)
473
+ return visitor.longValue(value.longValue);
474
+ if (value.doubleValue !== void 0)
475
+ return visitor.doubleValue(value.doubleValue);
476
+ if (value.stringValue !== void 0)
477
+ return visitor.stringValue(value.stringValue);
478
+ if (value.blobValue !== void 0)
479
+ return visitor.blobValue(value.blobValue);
480
+ if (value.arrayValue !== void 0)
481
+ return visitor.arrayValue(value.arrayValue);
482
+ return visitor._(value.$unknown[0], value.$unknown[1]);
483
+ }, "visit");
484
+ })(Field || (Field = {}));
485
+ var Value;
486
+ ((Value3) => {
487
+ Value3.visit = /* @__PURE__ */ __name((value, visitor) => {
488
+ if (value.isNull !== void 0)
489
+ return visitor.isNull(value.isNull);
490
+ if (value.bitValue !== void 0)
491
+ return visitor.bitValue(value.bitValue);
492
+ if (value.bigIntValue !== void 0)
493
+ return visitor.bigIntValue(value.bigIntValue);
494
+ if (value.intValue !== void 0)
495
+ return visitor.intValue(value.intValue);
496
+ if (value.doubleValue !== void 0)
497
+ return visitor.doubleValue(value.doubleValue);
498
+ if (value.realValue !== void 0)
499
+ return visitor.realValue(value.realValue);
500
+ if (value.stringValue !== void 0)
501
+ return visitor.stringValue(value.stringValue);
502
+ if (value.blobValue !== void 0)
503
+ return visitor.blobValue(value.blobValue);
504
+ if (value.arrayValues !== void 0)
505
+ return visitor.arrayValues(value.arrayValues);
506
+ if (value.structValue !== void 0)
507
+ return visitor.structValue(value.structValue);
508
+ return visitor._(value.$unknown[0], value.$unknown[1]);
509
+ }, "visit");
510
+ })(Value || (Value = {}));
511
+
512
+ // src/protocols/Aws_restJson1.ts
513
+ var se_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
514
+ const b = (0, import_core2.requestBuilder)(input, context);
515
+ const headers = {
516
+ "content-type": "application/json"
517
+ };
518
+ b.bp("/BatchExecute");
519
+ let body;
520
+ body = JSON.stringify(
521
+ (0, import_smithy_client.take)(input, {
522
+ database: [],
523
+ parameterSets: (_) => se_SqlParameterSets(_, context),
524
+ resourceArn: [],
525
+ schema: [],
526
+ secretArn: [],
527
+ sql: [],
528
+ transactionId: []
529
+ })
530
+ );
531
+ b.m("POST").h(headers).b(body);
532
+ return b.build();
533
+ }, "se_BatchExecuteStatementCommand");
534
+ var se_BeginTransactionCommand = /* @__PURE__ */ __name(async (input, context) => {
535
+ const b = (0, import_core2.requestBuilder)(input, context);
536
+ const headers = {
537
+ "content-type": "application/json"
538
+ };
539
+ b.bp("/BeginTransaction");
540
+ let body;
541
+ body = JSON.stringify(
542
+ (0, import_smithy_client.take)(input, {
543
+ database: [],
544
+ resourceArn: [],
545
+ schema: [],
546
+ secretArn: []
547
+ })
548
+ );
549
+ b.m("POST").h(headers).b(body);
550
+ return b.build();
551
+ }, "se_BeginTransactionCommand");
552
+ var se_CommitTransactionCommand = /* @__PURE__ */ __name(async (input, context) => {
553
+ const b = (0, import_core2.requestBuilder)(input, context);
554
+ const headers = {
555
+ "content-type": "application/json"
556
+ };
557
+ b.bp("/CommitTransaction");
558
+ let body;
559
+ body = JSON.stringify(
560
+ (0, import_smithy_client.take)(input, {
561
+ resourceArn: [],
562
+ secretArn: [],
563
+ transactionId: []
564
+ })
565
+ );
566
+ b.m("POST").h(headers).b(body);
567
+ return b.build();
568
+ }, "se_CommitTransactionCommand");
569
+ var se_ExecuteSqlCommand = /* @__PURE__ */ __name(async (input, context) => {
570
+ const b = (0, import_core2.requestBuilder)(input, context);
571
+ const headers = {
572
+ "content-type": "application/json"
573
+ };
574
+ b.bp("/ExecuteSql");
575
+ let body;
576
+ body = JSON.stringify(
577
+ (0, import_smithy_client.take)(input, {
578
+ awsSecretStoreArn: [],
579
+ database: [],
580
+ dbClusterOrInstanceArn: [],
581
+ schema: [],
582
+ sqlStatements: []
583
+ })
584
+ );
585
+ b.m("POST").h(headers).b(body);
586
+ return b.build();
587
+ }, "se_ExecuteSqlCommand");
588
+ var se_ExecuteStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
589
+ const b = (0, import_core2.requestBuilder)(input, context);
590
+ const headers = {
591
+ "content-type": "application/json"
592
+ };
593
+ b.bp("/Execute");
594
+ let body;
595
+ body = JSON.stringify(
596
+ (0, import_smithy_client.take)(input, {
597
+ continueAfterTimeout: [],
598
+ database: [],
599
+ formatRecordsAs: [],
600
+ includeResultMetadata: [],
601
+ parameters: (_) => se_SqlParametersList(_, context),
602
+ resourceArn: [],
603
+ resultSetOptions: (_) => (0, import_smithy_client._json)(_),
604
+ schema: [],
605
+ secretArn: [],
606
+ sql: [],
607
+ transactionId: []
608
+ })
609
+ );
610
+ b.m("POST").h(headers).b(body);
611
+ return b.build();
612
+ }, "se_ExecuteStatementCommand");
613
+ var se_RollbackTransactionCommand = /* @__PURE__ */ __name(async (input, context) => {
614
+ const b = (0, import_core2.requestBuilder)(input, context);
615
+ const headers = {
616
+ "content-type": "application/json"
617
+ };
618
+ b.bp("/RollbackTransaction");
619
+ let body;
620
+ body = JSON.stringify(
621
+ (0, import_smithy_client.take)(input, {
622
+ resourceArn: [],
623
+ secretArn: [],
624
+ transactionId: []
625
+ })
626
+ );
627
+ b.m("POST").h(headers).b(body);
628
+ return b.build();
629
+ }, "se_RollbackTransactionCommand");
630
+ var de_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
631
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
632
+ return de_BatchExecuteStatementCommandError(output, context);
633
+ }
634
+ const contents = (0, import_smithy_client.map)({
635
+ $metadata: deserializeMetadata(output)
636
+ });
637
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
638
+ const doc = (0, import_smithy_client.take)(data, {
639
+ updateResults: (_) => de_UpdateResults(_, context)
640
+ });
641
+ Object.assign(contents, doc);
642
+ return contents;
643
+ }, "de_BatchExecuteStatementCommand");
644
+ var de_BatchExecuteStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
645
+ const parsedOutput = {
646
+ ...output,
647
+ body: await parseErrorBody(output.body, context)
648
+ };
649
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
650
+ switch (errorCode) {
651
+ case "AccessDeniedException":
652
+ case "com.amazonaws.rdsdata#AccessDeniedException":
653
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
654
+ case "BadRequestException":
655
+ case "com.amazonaws.rdsdata#BadRequestException":
656
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
657
+ case "DatabaseErrorException":
658
+ case "com.amazonaws.rdsdata#DatabaseErrorException":
659
+ throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
660
+ case "DatabaseNotFoundException":
661
+ case "com.amazonaws.rdsdata#DatabaseNotFoundException":
662
+ throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
663
+ case "DatabaseUnavailableException":
664
+ case "com.amazonaws.rdsdata#DatabaseUnavailableException":
665
+ throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
666
+ case "ForbiddenException":
667
+ case "com.amazonaws.rdsdata#ForbiddenException":
668
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
669
+ case "HttpEndpointNotEnabledException":
670
+ case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
671
+ throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
672
+ case "InternalServerErrorException":
673
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
674
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
675
+ case "InvalidSecretException":
676
+ case "com.amazonaws.rdsdata#InvalidSecretException":
677
+ throw await de_InvalidSecretExceptionRes(parsedOutput, context);
678
+ case "SecretsErrorException":
679
+ case "com.amazonaws.rdsdata#SecretsErrorException":
680
+ throw await de_SecretsErrorExceptionRes(parsedOutput, context);
681
+ case "ServiceUnavailableError":
682
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
683
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
684
+ case "StatementTimeoutException":
685
+ case "com.amazonaws.rdsdata#StatementTimeoutException":
686
+ throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
687
+ case "TransactionNotFoundException":
688
+ case "com.amazonaws.rdsdata#TransactionNotFoundException":
689
+ throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
690
+ default:
691
+ const parsedBody = parsedOutput.body;
692
+ return throwDefaultError({
693
+ output,
694
+ parsedBody,
695
+ errorCode
696
+ });
697
+ }
698
+ }, "de_BatchExecuteStatementCommandError");
699
+ var de_BeginTransactionCommand = /* @__PURE__ */ __name(async (output, context) => {
700
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
701
+ return de_BeginTransactionCommandError(output, context);
702
+ }
703
+ const contents = (0, import_smithy_client.map)({
704
+ $metadata: deserializeMetadata(output)
705
+ });
706
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
707
+ const doc = (0, import_smithy_client.take)(data, {
708
+ transactionId: import_smithy_client.expectString
709
+ });
710
+ Object.assign(contents, doc);
711
+ return contents;
712
+ }, "de_BeginTransactionCommand");
713
+ var de_BeginTransactionCommandError = /* @__PURE__ */ __name(async (output, context) => {
714
+ const parsedOutput = {
715
+ ...output,
716
+ body: await parseErrorBody(output.body, context)
717
+ };
718
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
+ switch (errorCode) {
720
+ case "AccessDeniedException":
721
+ case "com.amazonaws.rdsdata#AccessDeniedException":
722
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
723
+ case "BadRequestException":
724
+ case "com.amazonaws.rdsdata#BadRequestException":
725
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
726
+ case "DatabaseErrorException":
727
+ case "com.amazonaws.rdsdata#DatabaseErrorException":
728
+ throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
729
+ case "DatabaseNotFoundException":
730
+ case "com.amazonaws.rdsdata#DatabaseNotFoundException":
731
+ throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
732
+ case "DatabaseUnavailableException":
733
+ case "com.amazonaws.rdsdata#DatabaseUnavailableException":
734
+ throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
735
+ case "ForbiddenException":
736
+ case "com.amazonaws.rdsdata#ForbiddenException":
737
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
738
+ case "HttpEndpointNotEnabledException":
739
+ case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
740
+ throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
741
+ case "InternalServerErrorException":
742
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
743
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
744
+ case "InvalidSecretException":
745
+ case "com.amazonaws.rdsdata#InvalidSecretException":
746
+ throw await de_InvalidSecretExceptionRes(parsedOutput, context);
747
+ case "SecretsErrorException":
748
+ case "com.amazonaws.rdsdata#SecretsErrorException":
749
+ throw await de_SecretsErrorExceptionRes(parsedOutput, context);
750
+ case "ServiceUnavailableError":
751
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
752
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
753
+ case "StatementTimeoutException":
754
+ case "com.amazonaws.rdsdata#StatementTimeoutException":
755
+ throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
756
+ case "TransactionNotFoundException":
757
+ case "com.amazonaws.rdsdata#TransactionNotFoundException":
758
+ throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
759
+ default:
760
+ const parsedBody = parsedOutput.body;
761
+ return throwDefaultError({
762
+ output,
763
+ parsedBody,
764
+ errorCode
765
+ });
766
+ }
767
+ }, "de_BeginTransactionCommandError");
768
+ var de_CommitTransactionCommand = /* @__PURE__ */ __name(async (output, context) => {
769
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
770
+ return de_CommitTransactionCommandError(output, context);
771
+ }
772
+ const contents = (0, import_smithy_client.map)({
773
+ $metadata: deserializeMetadata(output)
774
+ });
775
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
776
+ const doc = (0, import_smithy_client.take)(data, {
777
+ transactionStatus: import_smithy_client.expectString
778
+ });
779
+ Object.assign(contents, doc);
780
+ return contents;
781
+ }, "de_CommitTransactionCommand");
782
+ var de_CommitTransactionCommandError = /* @__PURE__ */ __name(async (output, context) => {
783
+ const parsedOutput = {
784
+ ...output,
785
+ body: await parseErrorBody(output.body, context)
786
+ };
787
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
788
+ switch (errorCode) {
789
+ case "AccessDeniedException":
790
+ case "com.amazonaws.rdsdata#AccessDeniedException":
791
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
792
+ case "BadRequestException":
793
+ case "com.amazonaws.rdsdata#BadRequestException":
794
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
795
+ case "DatabaseErrorException":
796
+ case "com.amazonaws.rdsdata#DatabaseErrorException":
797
+ throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
798
+ case "DatabaseNotFoundException":
799
+ case "com.amazonaws.rdsdata#DatabaseNotFoundException":
800
+ throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
801
+ case "DatabaseUnavailableException":
802
+ case "com.amazonaws.rdsdata#DatabaseUnavailableException":
803
+ throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
804
+ case "ForbiddenException":
805
+ case "com.amazonaws.rdsdata#ForbiddenException":
806
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
807
+ case "HttpEndpointNotEnabledException":
808
+ case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
809
+ throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
810
+ case "InternalServerErrorException":
811
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
812
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
813
+ case "InvalidSecretException":
814
+ case "com.amazonaws.rdsdata#InvalidSecretException":
815
+ throw await de_InvalidSecretExceptionRes(parsedOutput, context);
816
+ case "NotFoundException":
817
+ case "com.amazonaws.rdsdata#NotFoundException":
818
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
819
+ case "SecretsErrorException":
820
+ case "com.amazonaws.rdsdata#SecretsErrorException":
821
+ throw await de_SecretsErrorExceptionRes(parsedOutput, context);
822
+ case "ServiceUnavailableError":
823
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
824
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
825
+ case "StatementTimeoutException":
826
+ case "com.amazonaws.rdsdata#StatementTimeoutException":
827
+ throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
828
+ case "TransactionNotFoundException":
829
+ case "com.amazonaws.rdsdata#TransactionNotFoundException":
830
+ throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
831
+ default:
832
+ const parsedBody = parsedOutput.body;
833
+ return throwDefaultError({
834
+ output,
835
+ parsedBody,
836
+ errorCode
837
+ });
838
+ }
839
+ }, "de_CommitTransactionCommandError");
840
+ var de_ExecuteSqlCommand = /* @__PURE__ */ __name(async (output, context) => {
841
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
842
+ return de_ExecuteSqlCommandError(output, context);
843
+ }
844
+ const contents = (0, import_smithy_client.map)({
845
+ $metadata: deserializeMetadata(output)
846
+ });
847
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
848
+ const doc = (0, import_smithy_client.take)(data, {
849
+ sqlStatementResults: (_) => de_SqlStatementResults(_, context)
850
+ });
851
+ Object.assign(contents, doc);
852
+ return contents;
853
+ }, "de_ExecuteSqlCommand");
854
+ var de_ExecuteSqlCommandError = /* @__PURE__ */ __name(async (output, context) => {
855
+ const parsedOutput = {
856
+ ...output,
857
+ body: await parseErrorBody(output.body, context)
858
+ };
859
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
860
+ switch (errorCode) {
861
+ case "AccessDeniedException":
862
+ case "com.amazonaws.rdsdata#AccessDeniedException":
863
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
864
+ case "BadRequestException":
865
+ case "com.amazonaws.rdsdata#BadRequestException":
866
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
867
+ case "ForbiddenException":
868
+ case "com.amazonaws.rdsdata#ForbiddenException":
869
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
870
+ case "InternalServerErrorException":
871
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
872
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
873
+ case "ServiceUnavailableError":
874
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
875
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
876
+ default:
877
+ const parsedBody = parsedOutput.body;
878
+ return throwDefaultError({
879
+ output,
880
+ parsedBody,
881
+ errorCode
882
+ });
883
+ }
884
+ }, "de_ExecuteSqlCommandError");
885
+ var de_ExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
886
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
887
+ return de_ExecuteStatementCommandError(output, context);
888
+ }
889
+ const contents = (0, import_smithy_client.map)({
890
+ $metadata: deserializeMetadata(output)
891
+ });
892
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
893
+ const doc = (0, import_smithy_client.take)(data, {
894
+ columnMetadata: import_smithy_client._json,
895
+ formattedRecords: import_smithy_client.expectString,
896
+ generatedFields: (_) => de_FieldList(_, context),
897
+ numberOfRecordsUpdated: import_smithy_client.expectLong,
898
+ records: (_) => de_SqlRecords(_, context)
899
+ });
900
+ Object.assign(contents, doc);
901
+ return contents;
902
+ }, "de_ExecuteStatementCommand");
903
+ var de_ExecuteStatementCommandError = /* @__PURE__ */ __name(async (output, context) => {
904
+ const parsedOutput = {
905
+ ...output,
906
+ body: await parseErrorBody(output.body, context)
907
+ };
908
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
909
+ switch (errorCode) {
910
+ case "AccessDeniedException":
911
+ case "com.amazonaws.rdsdata#AccessDeniedException":
912
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
913
+ case "BadRequestException":
914
+ case "com.amazonaws.rdsdata#BadRequestException":
915
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
916
+ case "DatabaseErrorException":
917
+ case "com.amazonaws.rdsdata#DatabaseErrorException":
918
+ throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
919
+ case "DatabaseNotFoundException":
920
+ case "com.amazonaws.rdsdata#DatabaseNotFoundException":
921
+ throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
922
+ case "DatabaseUnavailableException":
923
+ case "com.amazonaws.rdsdata#DatabaseUnavailableException":
924
+ throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
925
+ case "ForbiddenException":
926
+ case "com.amazonaws.rdsdata#ForbiddenException":
927
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
928
+ case "HttpEndpointNotEnabledException":
929
+ case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
930
+ throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
931
+ case "InternalServerErrorException":
932
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
933
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
934
+ case "InvalidSecretException":
935
+ case "com.amazonaws.rdsdata#InvalidSecretException":
936
+ throw await de_InvalidSecretExceptionRes(parsedOutput, context);
937
+ case "SecretsErrorException":
938
+ case "com.amazonaws.rdsdata#SecretsErrorException":
939
+ throw await de_SecretsErrorExceptionRes(parsedOutput, context);
940
+ case "ServiceUnavailableError":
941
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
942
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
943
+ case "StatementTimeoutException":
944
+ case "com.amazonaws.rdsdata#StatementTimeoutException":
945
+ throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
946
+ case "TransactionNotFoundException":
947
+ case "com.amazonaws.rdsdata#TransactionNotFoundException":
948
+ throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
949
+ case "UnsupportedResultException":
950
+ case "com.amazonaws.rdsdata#UnsupportedResultException":
951
+ throw await de_UnsupportedResultExceptionRes(parsedOutput, context);
952
+ default:
953
+ const parsedBody = parsedOutput.body;
954
+ return throwDefaultError({
955
+ output,
956
+ parsedBody,
957
+ errorCode
958
+ });
959
+ }
960
+ }, "de_ExecuteStatementCommandError");
961
+ var de_RollbackTransactionCommand = /* @__PURE__ */ __name(async (output, context) => {
962
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
963
+ return de_RollbackTransactionCommandError(output, context);
964
+ }
965
+ const contents = (0, import_smithy_client.map)({
966
+ $metadata: deserializeMetadata(output)
967
+ });
968
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
969
+ const doc = (0, import_smithy_client.take)(data, {
970
+ transactionStatus: import_smithy_client.expectString
971
+ });
972
+ Object.assign(contents, doc);
973
+ return contents;
974
+ }, "de_RollbackTransactionCommand");
975
+ var de_RollbackTransactionCommandError = /* @__PURE__ */ __name(async (output, context) => {
976
+ const parsedOutput = {
977
+ ...output,
978
+ body: await parseErrorBody(output.body, context)
979
+ };
980
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
981
+ switch (errorCode) {
982
+ case "AccessDeniedException":
983
+ case "com.amazonaws.rdsdata#AccessDeniedException":
984
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
985
+ case "BadRequestException":
986
+ case "com.amazonaws.rdsdata#BadRequestException":
987
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
988
+ case "DatabaseErrorException":
989
+ case "com.amazonaws.rdsdata#DatabaseErrorException":
990
+ throw await de_DatabaseErrorExceptionRes(parsedOutput, context);
991
+ case "DatabaseNotFoundException":
992
+ case "com.amazonaws.rdsdata#DatabaseNotFoundException":
993
+ throw await de_DatabaseNotFoundExceptionRes(parsedOutput, context);
994
+ case "DatabaseUnavailableException":
995
+ case "com.amazonaws.rdsdata#DatabaseUnavailableException":
996
+ throw await de_DatabaseUnavailableExceptionRes(parsedOutput, context);
997
+ case "ForbiddenException":
998
+ case "com.amazonaws.rdsdata#ForbiddenException":
999
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
1000
+ case "HttpEndpointNotEnabledException":
1001
+ case "com.amazonaws.rdsdata#HttpEndpointNotEnabledException":
1002
+ throw await de_HttpEndpointNotEnabledExceptionRes(parsedOutput, context);
1003
+ case "InternalServerErrorException":
1004
+ case "com.amazonaws.rdsdata#InternalServerErrorException":
1005
+ throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1006
+ case "InvalidSecretException":
1007
+ case "com.amazonaws.rdsdata#InvalidSecretException":
1008
+ throw await de_InvalidSecretExceptionRes(parsedOutput, context);
1009
+ case "NotFoundException":
1010
+ case "com.amazonaws.rdsdata#NotFoundException":
1011
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
1012
+ case "SecretsErrorException":
1013
+ case "com.amazonaws.rdsdata#SecretsErrorException":
1014
+ throw await de_SecretsErrorExceptionRes(parsedOutput, context);
1015
+ case "ServiceUnavailableError":
1016
+ case "com.amazonaws.rdsdata#ServiceUnavailableError":
1017
+ throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
1018
+ case "StatementTimeoutException":
1019
+ case "com.amazonaws.rdsdata#StatementTimeoutException":
1020
+ throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
1021
+ case "TransactionNotFoundException":
1022
+ case "com.amazonaws.rdsdata#TransactionNotFoundException":
1023
+ throw await de_TransactionNotFoundExceptionRes(parsedOutput, context);
1024
+ default:
1025
+ const parsedBody = parsedOutput.body;
1026
+ return throwDefaultError({
1027
+ output,
1028
+ parsedBody,
1029
+ errorCode
1030
+ });
1031
+ }
1032
+ }, "de_RollbackTransactionCommandError");
1033
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(RDSDataServiceException);
1034
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1035
+ const contents = (0, import_smithy_client.map)({});
1036
+ const data = parsedOutput.body;
1037
+ const doc = (0, import_smithy_client.take)(data, {
1038
+ message: import_smithy_client.expectString
1039
+ });
1040
+ Object.assign(contents, doc);
1041
+ const exception = new AccessDeniedException({
1042
+ $metadata: deserializeMetadata(parsedOutput),
1043
+ ...contents
1044
+ });
1045
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1046
+ }, "de_AccessDeniedExceptionRes");
1047
+ var de_BadRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1048
+ const contents = (0, import_smithy_client.map)({});
1049
+ const data = parsedOutput.body;
1050
+ const doc = (0, import_smithy_client.take)(data, {
1051
+ message: import_smithy_client.expectString
1052
+ });
1053
+ Object.assign(contents, doc);
1054
+ const exception = new BadRequestException({
1055
+ $metadata: deserializeMetadata(parsedOutput),
1056
+ ...contents
1057
+ });
1058
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1059
+ }, "de_BadRequestExceptionRes");
1060
+ var de_DatabaseErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1061
+ const contents = (0, import_smithy_client.map)({});
1062
+ const data = parsedOutput.body;
1063
+ const doc = (0, import_smithy_client.take)(data, {
1064
+ message: import_smithy_client.expectString
1065
+ });
1066
+ Object.assign(contents, doc);
1067
+ const exception = new DatabaseErrorException({
1068
+ $metadata: deserializeMetadata(parsedOutput),
1069
+ ...contents
1070
+ });
1071
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1072
+ }, "de_DatabaseErrorExceptionRes");
1073
+ var de_DatabaseNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1074
+ const contents = (0, import_smithy_client.map)({});
1075
+ const data = parsedOutput.body;
1076
+ const doc = (0, import_smithy_client.take)(data, {
1077
+ message: import_smithy_client.expectString
1078
+ });
1079
+ Object.assign(contents, doc);
1080
+ const exception = new DatabaseNotFoundException({
1081
+ $metadata: deserializeMetadata(parsedOutput),
1082
+ ...contents
1083
+ });
1084
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1085
+ }, "de_DatabaseNotFoundExceptionRes");
1086
+ var de_DatabaseUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1087
+ const contents = (0, import_smithy_client.map)({});
1088
+ const data = parsedOutput.body;
1089
+ const doc = (0, import_smithy_client.take)(data, {});
1090
+ Object.assign(contents, doc);
1091
+ const exception = new DatabaseUnavailableException({
1092
+ $metadata: deserializeMetadata(parsedOutput),
1093
+ ...contents
1094
+ });
1095
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1096
+ }, "de_DatabaseUnavailableExceptionRes");
1097
+ var de_ForbiddenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1098
+ const contents = (0, import_smithy_client.map)({});
1099
+ const data = parsedOutput.body;
1100
+ const doc = (0, import_smithy_client.take)(data, {
1101
+ message: import_smithy_client.expectString
1102
+ });
1103
+ Object.assign(contents, doc);
1104
+ const exception = new ForbiddenException({
1105
+ $metadata: deserializeMetadata(parsedOutput),
1106
+ ...contents
1107
+ });
1108
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1109
+ }, "de_ForbiddenExceptionRes");
1110
+ var de_HttpEndpointNotEnabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1111
+ const contents = (0, import_smithy_client.map)({});
1112
+ const data = parsedOutput.body;
1113
+ const doc = (0, import_smithy_client.take)(data, {
1114
+ message: import_smithy_client.expectString
1115
+ });
1116
+ Object.assign(contents, doc);
1117
+ const exception = new HttpEndpointNotEnabledException({
1118
+ $metadata: deserializeMetadata(parsedOutput),
1119
+ ...contents
1120
+ });
1121
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1122
+ }, "de_HttpEndpointNotEnabledExceptionRes");
1123
+ var de_InternalServerErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1124
+ const contents = (0, import_smithy_client.map)({});
1125
+ const data = parsedOutput.body;
1126
+ const doc = (0, import_smithy_client.take)(data, {});
1127
+ Object.assign(contents, doc);
1128
+ const exception = new InternalServerErrorException({
1129
+ $metadata: deserializeMetadata(parsedOutput),
1130
+ ...contents
1131
+ });
1132
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1133
+ }, "de_InternalServerErrorExceptionRes");
1134
+ var de_InvalidSecretExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1135
+ const contents = (0, import_smithy_client.map)({});
1136
+ const data = parsedOutput.body;
1137
+ const doc = (0, import_smithy_client.take)(data, {
1138
+ message: import_smithy_client.expectString
1139
+ });
1140
+ Object.assign(contents, doc);
1141
+ const exception = new InvalidSecretException({
1142
+ $metadata: deserializeMetadata(parsedOutput),
1143
+ ...contents
1144
+ });
1145
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1146
+ }, "de_InvalidSecretExceptionRes");
1147
+ var de_NotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1148
+ const contents = (0, import_smithy_client.map)({});
1149
+ const data = parsedOutput.body;
1150
+ const doc = (0, import_smithy_client.take)(data, {
1151
+ message: import_smithy_client.expectString
1152
+ });
1153
+ Object.assign(contents, doc);
1154
+ const exception = new NotFoundException({
1155
+ $metadata: deserializeMetadata(parsedOutput),
1156
+ ...contents
1157
+ });
1158
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1159
+ }, "de_NotFoundExceptionRes");
1160
+ var de_SecretsErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1161
+ const contents = (0, import_smithy_client.map)({});
1162
+ const data = parsedOutput.body;
1163
+ const doc = (0, import_smithy_client.take)(data, {
1164
+ message: import_smithy_client.expectString
1165
+ });
1166
+ Object.assign(contents, doc);
1167
+ const exception = new SecretsErrorException({
1168
+ $metadata: deserializeMetadata(parsedOutput),
1169
+ ...contents
1170
+ });
1171
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1172
+ }, "de_SecretsErrorExceptionRes");
1173
+ var de_ServiceUnavailableErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1174
+ const contents = (0, import_smithy_client.map)({});
1175
+ const data = parsedOutput.body;
1176
+ const doc = (0, import_smithy_client.take)(data, {});
1177
+ Object.assign(contents, doc);
1178
+ const exception = new ServiceUnavailableError({
1179
+ $metadata: deserializeMetadata(parsedOutput),
1180
+ ...contents
1181
+ });
1182
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1183
+ }, "de_ServiceUnavailableErrorRes");
1184
+ var de_StatementTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1185
+ const contents = (0, import_smithy_client.map)({});
1186
+ const data = parsedOutput.body;
1187
+ const doc = (0, import_smithy_client.take)(data, {
1188
+ dbConnectionId: import_smithy_client.expectLong,
1189
+ message: import_smithy_client.expectString
1190
+ });
1191
+ Object.assign(contents, doc);
1192
+ const exception = new StatementTimeoutException({
1193
+ $metadata: deserializeMetadata(parsedOutput),
1194
+ ...contents
1195
+ });
1196
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1197
+ }, "de_StatementTimeoutExceptionRes");
1198
+ var de_TransactionNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1199
+ const contents = (0, import_smithy_client.map)({});
1200
+ const data = parsedOutput.body;
1201
+ const doc = (0, import_smithy_client.take)(data, {
1202
+ message: import_smithy_client.expectString
1203
+ });
1204
+ Object.assign(contents, doc);
1205
+ const exception = new TransactionNotFoundException({
1206
+ $metadata: deserializeMetadata(parsedOutput),
1207
+ ...contents
1208
+ });
1209
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1210
+ }, "de_TransactionNotFoundExceptionRes");
1211
+ var de_UnsupportedResultExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1212
+ const contents = (0, import_smithy_client.map)({});
1213
+ const data = parsedOutput.body;
1214
+ const doc = (0, import_smithy_client.take)(data, {
1215
+ message: import_smithy_client.expectString
1216
+ });
1217
+ Object.assign(contents, doc);
1218
+ const exception = new UnsupportedResultException({
1219
+ $metadata: deserializeMetadata(parsedOutput),
1220
+ ...contents
1221
+ });
1222
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1223
+ }, "de_UnsupportedResultExceptionRes");
1224
+ var se_ArrayOfArray = /* @__PURE__ */ __name((input, context) => {
1225
+ return input.filter((e) => e != null).map((entry) => {
1226
+ return se_ArrayValue(entry, context);
1227
+ });
1228
+ }, "se_ArrayOfArray");
1229
+ var se_ArrayValue = /* @__PURE__ */ __name((input, context) => {
1230
+ return ArrayValue.visit(input, {
1231
+ arrayValues: (value) => ({ arrayValues: se_ArrayOfArray(value, context) }),
1232
+ booleanValues: (value) => ({ booleanValues: (0, import_smithy_client._json)(value) }),
1233
+ doubleValues: (value) => ({ doubleValues: se_DoubleArray(value, context) }),
1234
+ longValues: (value) => ({ longValues: (0, import_smithy_client._json)(value) }),
1235
+ stringValues: (value) => ({ stringValues: (0, import_smithy_client._json)(value) }),
1236
+ _: (name, value) => ({ name: value })
1237
+ });
1238
+ }, "se_ArrayValue");
1239
+ var se_DoubleArray = /* @__PURE__ */ __name((input, context) => {
1240
+ return input.filter((e) => e != null).map((entry) => {
1241
+ return (0, import_smithy_client.serializeFloat)(entry);
1242
+ });
1243
+ }, "se_DoubleArray");
1244
+ var se_Field = /* @__PURE__ */ __name((input, context) => {
1245
+ return Field.visit(input, {
1246
+ arrayValue: (value) => ({ arrayValue: se_ArrayValue(value, context) }),
1247
+ blobValue: (value) => ({ blobValue: context.base64Encoder(value) }),
1248
+ booleanValue: (value) => ({ booleanValue: value }),
1249
+ doubleValue: (value) => ({ doubleValue: (0, import_smithy_client.serializeFloat)(value) }),
1250
+ isNull: (value) => ({ isNull: value }),
1251
+ longValue: (value) => ({ longValue: value }),
1252
+ stringValue: (value) => ({ stringValue: value }),
1253
+ _: (name, value) => ({ name: value })
1254
+ });
1255
+ }, "se_Field");
1256
+ var se_SqlParameter = /* @__PURE__ */ __name((input, context) => {
1257
+ return (0, import_smithy_client.take)(input, {
1258
+ name: [],
1259
+ typeHint: [],
1260
+ value: (_) => se_Field(_, context)
1261
+ });
1262
+ }, "se_SqlParameter");
1263
+ var se_SqlParameterSets = /* @__PURE__ */ __name((input, context) => {
1264
+ return input.filter((e) => e != null).map((entry) => {
1265
+ return se_SqlParametersList(entry, context);
1266
+ });
1267
+ }, "se_SqlParameterSets");
1268
+ var se_SqlParametersList = /* @__PURE__ */ __name((input, context) => {
1269
+ return input.filter((e) => e != null).map((entry) => {
1270
+ return se_SqlParameter(entry, context);
1271
+ });
1272
+ }, "se_SqlParametersList");
1273
+ var de_ArrayOfArray = /* @__PURE__ */ __name((output, context) => {
1274
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1275
+ return de_ArrayValue((0, import_core.awsExpectUnion)(entry), context);
1276
+ });
1277
+ return retVal;
1278
+ }, "de_ArrayOfArray");
1279
+ var de_ArrayValue = /* @__PURE__ */ __name((output, context) => {
1280
+ if (output.arrayValues != null) {
1281
+ return {
1282
+ arrayValues: de_ArrayOfArray(output.arrayValues, context)
1283
+ };
1284
+ }
1285
+ if (output.booleanValues != null) {
1286
+ return {
1287
+ booleanValues: (0, import_smithy_client._json)(output.booleanValues)
1288
+ };
1289
+ }
1290
+ if (output.doubleValues != null) {
1291
+ return {
1292
+ doubleValues: de_DoubleArray(output.doubleValues, context)
1293
+ };
1294
+ }
1295
+ if (output.longValues != null) {
1296
+ return {
1297
+ longValues: (0, import_smithy_client._json)(output.longValues)
1298
+ };
1299
+ }
1300
+ if (output.stringValues != null) {
1301
+ return {
1302
+ stringValues: (0, import_smithy_client._json)(output.stringValues)
1303
+ };
1304
+ }
1305
+ return { $unknown: Object.entries(output)[0] };
1306
+ }, "de_ArrayValue");
1307
+ var de_ArrayValueList = /* @__PURE__ */ __name((output, context) => {
1308
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1309
+ return de_Value((0, import_core.awsExpectUnion)(entry), context);
1310
+ });
1311
+ return retVal;
1312
+ }, "de_ArrayValueList");
1313
+ var de_DoubleArray = /* @__PURE__ */ __name((output, context) => {
1314
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1315
+ return (0, import_smithy_client.limitedParseDouble)(entry);
1316
+ });
1317
+ return retVal;
1318
+ }, "de_DoubleArray");
1319
+ var de_Field = /* @__PURE__ */ __name((output, context) => {
1320
+ if (output.arrayValue != null) {
1321
+ return {
1322
+ arrayValue: de_ArrayValue((0, import_core.awsExpectUnion)(output.arrayValue), context)
1323
+ };
1324
+ }
1325
+ if (output.blobValue != null) {
1326
+ return {
1327
+ blobValue: context.base64Decoder(output.blobValue)
1328
+ };
1329
+ }
1330
+ if ((0, import_smithy_client.expectBoolean)(output.booleanValue) !== void 0) {
1331
+ return { booleanValue: (0, import_smithy_client.expectBoolean)(output.booleanValue) };
1332
+ }
1333
+ if ((0, import_smithy_client.limitedParseDouble)(output.doubleValue) !== void 0) {
1334
+ return { doubleValue: (0, import_smithy_client.limitedParseDouble)(output.doubleValue) };
1335
+ }
1336
+ if ((0, import_smithy_client.expectBoolean)(output.isNull) !== void 0) {
1337
+ return { isNull: (0, import_smithy_client.expectBoolean)(output.isNull) };
1338
+ }
1339
+ if ((0, import_smithy_client.expectLong)(output.longValue) !== void 0) {
1340
+ return { longValue: (0, import_smithy_client.expectLong)(output.longValue) };
1341
+ }
1342
+ if ((0, import_smithy_client.expectString)(output.stringValue) !== void 0) {
1343
+ return { stringValue: (0, import_smithy_client.expectString)(output.stringValue) };
1344
+ }
1345
+ return { $unknown: Object.entries(output)[0] };
1346
+ }, "de_Field");
1347
+ var de_FieldList = /* @__PURE__ */ __name((output, context) => {
1348
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1349
+ return de_Field((0, import_core.awsExpectUnion)(entry), context);
1350
+ });
1351
+ return retVal;
1352
+ }, "de_FieldList");
1353
+ var de__Record = /* @__PURE__ */ __name((output, context) => {
1354
+ return (0, import_smithy_client.take)(output, {
1355
+ values: (_) => de_Row(_, context)
1356
+ });
1357
+ }, "de__Record");
1358
+ var de_Records = /* @__PURE__ */ __name((output, context) => {
1359
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1360
+ return de__Record(entry, context);
1361
+ });
1362
+ return retVal;
1363
+ }, "de_Records");
1364
+ var de_ResultFrame = /* @__PURE__ */ __name((output, context) => {
1365
+ return (0, import_smithy_client.take)(output, {
1366
+ records: (_) => de_Records(_, context),
1367
+ resultSetMetadata: import_smithy_client._json
1368
+ });
1369
+ }, "de_ResultFrame");
1370
+ var de_Row = /* @__PURE__ */ __name((output, context) => {
1371
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1372
+ return de_Value((0, import_core.awsExpectUnion)(entry), context);
1373
+ });
1374
+ return retVal;
1375
+ }, "de_Row");
1376
+ var de_SqlRecords = /* @__PURE__ */ __name((output, context) => {
1377
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1378
+ return de_FieldList(entry, context);
1379
+ });
1380
+ return retVal;
1381
+ }, "de_SqlRecords");
1382
+ var de_SqlStatementResult = /* @__PURE__ */ __name((output, context) => {
1383
+ return (0, import_smithy_client.take)(output, {
1384
+ numberOfRecordsUpdated: import_smithy_client.expectLong,
1385
+ resultFrame: (_) => de_ResultFrame(_, context)
1386
+ });
1387
+ }, "de_SqlStatementResult");
1388
+ var de_SqlStatementResults = /* @__PURE__ */ __name((output, context) => {
1389
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1390
+ return de_SqlStatementResult(entry, context);
1391
+ });
1392
+ return retVal;
1393
+ }, "de_SqlStatementResults");
1394
+ var de_StructValue = /* @__PURE__ */ __name((output, context) => {
1395
+ return (0, import_smithy_client.take)(output, {
1396
+ attributes: (_) => de_ArrayValueList(_, context)
1397
+ });
1398
+ }, "de_StructValue");
1399
+ var de_UpdateResult = /* @__PURE__ */ __name((output, context) => {
1400
+ return (0, import_smithy_client.take)(output, {
1401
+ generatedFields: (_) => de_FieldList(_, context)
1402
+ });
1403
+ }, "de_UpdateResult");
1404
+ var de_UpdateResults = /* @__PURE__ */ __name((output, context) => {
1405
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1406
+ return de_UpdateResult(entry, context);
1407
+ });
1408
+ return retVal;
1409
+ }, "de_UpdateResults");
1410
+ var de_Value = /* @__PURE__ */ __name((output, context) => {
1411
+ if (output.arrayValues != null) {
1412
+ return {
1413
+ arrayValues: de_ArrayValueList(output.arrayValues, context)
1414
+ };
1415
+ }
1416
+ if ((0, import_smithy_client.expectLong)(output.bigIntValue) !== void 0) {
1417
+ return { bigIntValue: (0, import_smithy_client.expectLong)(output.bigIntValue) };
1418
+ }
1419
+ if ((0, import_smithy_client.expectBoolean)(output.bitValue) !== void 0) {
1420
+ return { bitValue: (0, import_smithy_client.expectBoolean)(output.bitValue) };
1421
+ }
1422
+ if (output.blobValue != null) {
1423
+ return {
1424
+ blobValue: context.base64Decoder(output.blobValue)
1425
+ };
1426
+ }
1427
+ if ((0, import_smithy_client.limitedParseDouble)(output.doubleValue) !== void 0) {
1428
+ return { doubleValue: (0, import_smithy_client.limitedParseDouble)(output.doubleValue) };
1429
+ }
1430
+ if ((0, import_smithy_client.expectInt32)(output.intValue) !== void 0) {
1431
+ return { intValue: (0, import_smithy_client.expectInt32)(output.intValue) };
1432
+ }
1433
+ if ((0, import_smithy_client.expectBoolean)(output.isNull) !== void 0) {
1434
+ return { isNull: (0, import_smithy_client.expectBoolean)(output.isNull) };
1435
+ }
1436
+ if ((0, import_smithy_client.limitedParseFloat32)(output.realValue) !== void 0) {
1437
+ return { realValue: (0, import_smithy_client.limitedParseFloat32)(output.realValue) };
1438
+ }
1439
+ if ((0, import_smithy_client.expectString)(output.stringValue) !== void 0) {
1440
+ return { stringValue: (0, import_smithy_client.expectString)(output.stringValue) };
1441
+ }
1442
+ if (output.structValue != null) {
1443
+ return {
1444
+ structValue: de_StructValue(output.structValue, context)
1445
+ };
1446
+ }
1447
+ return { $unknown: Object.entries(output)[0] };
1448
+ }, "de_Value");
1449
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1450
+ httpStatusCode: output.statusCode,
1451
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1452
+ extendedRequestId: output.headers["x-amz-id-2"],
1453
+ cfId: output.headers["x-amz-cf-id"]
1454
+ }), "deserializeMetadata");
1455
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1456
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1457
+ if (encoded.length) {
1458
+ return JSON.parse(encoded);
1459
+ }
1460
+ return {};
1461
+ }), "parseBody");
1462
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1463
+ const value = await parseBody(errorBody, context);
1464
+ value.message = value.message ?? value.Message;
1465
+ return value;
1466
+ }, "parseErrorBody");
1467
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1468
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1469
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1470
+ let cleanValue = rawValue;
1471
+ if (typeof cleanValue === "number") {
1472
+ cleanValue = cleanValue.toString();
1473
+ }
1474
+ if (cleanValue.indexOf(",") >= 0) {
1475
+ cleanValue = cleanValue.split(",")[0];
1476
+ }
1477
+ if (cleanValue.indexOf(":") >= 0) {
1478
+ cleanValue = cleanValue.split(":")[0];
1479
+ }
1480
+ if (cleanValue.indexOf("#") >= 0) {
1481
+ cleanValue = cleanValue.split("#")[1];
1482
+ }
1483
+ return cleanValue;
1484
+ }, "sanitizeErrorCode");
1485
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1486
+ if (headerKey !== void 0) {
1487
+ return sanitizeErrorCode(output.headers[headerKey]);
1488
+ }
1489
+ if (data.code !== void 0) {
1490
+ return sanitizeErrorCode(data.code);
1491
+ }
1492
+ if (data["__type"] !== void 0) {
1493
+ return sanitizeErrorCode(data["__type"]);
1494
+ }
1495
+ }, "loadRestJsonErrorCode");
1496
+
1497
+ // src/commands/BatchExecuteStatementCommand.ts
1498
+ var _BatchExecuteStatementCommand = class _BatchExecuteStatementCommand extends import_smithy_client.Command.classBuilder().ep({
1499
+ ...commonParams
1500
+ }).m(function(Command, cs, config, o) {
1501
+ return [
1502
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1503
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1504
+ ];
1505
+ }).s("RdsDataService", "BatchExecuteStatement", {}).n("RDSDataClient", "BatchExecuteStatementCommand").f(void 0, void 0).ser(se_BatchExecuteStatementCommand).de(de_BatchExecuteStatementCommand).build() {
1506
+ };
1507
+ __name(_BatchExecuteStatementCommand, "BatchExecuteStatementCommand");
1508
+ var BatchExecuteStatementCommand = _BatchExecuteStatementCommand;
1509
+
1510
+ // src/commands/BeginTransactionCommand.ts
1511
+
1512
+
1513
+
1514
+
1515
+ var _BeginTransactionCommand = class _BeginTransactionCommand extends import_smithy_client.Command.classBuilder().ep({
1516
+ ...commonParams
1517
+ }).m(function(Command, cs, config, o) {
1518
+ return [
1519
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1520
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1521
+ ];
1522
+ }).s("RdsDataService", "BeginTransaction", {}).n("RDSDataClient", "BeginTransactionCommand").f(void 0, void 0).ser(se_BeginTransactionCommand).de(de_BeginTransactionCommand).build() {
1523
+ };
1524
+ __name(_BeginTransactionCommand, "BeginTransactionCommand");
1525
+ var BeginTransactionCommand = _BeginTransactionCommand;
1526
+
1527
+ // src/commands/CommitTransactionCommand.ts
1528
+
1529
+
1530
+
1531
+
1532
+ var _CommitTransactionCommand = class _CommitTransactionCommand extends import_smithy_client.Command.classBuilder().ep({
1533
+ ...commonParams
1534
+ }).m(function(Command, cs, config, o) {
1535
+ return [
1536
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1537
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1538
+ ];
1539
+ }).s("RdsDataService", "CommitTransaction", {}).n("RDSDataClient", "CommitTransactionCommand").f(void 0, void 0).ser(se_CommitTransactionCommand).de(de_CommitTransactionCommand).build() {
1540
+ };
1541
+ __name(_CommitTransactionCommand, "CommitTransactionCommand");
1542
+ var CommitTransactionCommand = _CommitTransactionCommand;
1543
+
1544
+ // src/commands/ExecuteSqlCommand.ts
1545
+
1546
+
1547
+
1548
+
1549
+ var _ExecuteSqlCommand = class _ExecuteSqlCommand extends import_smithy_client.Command.classBuilder().ep({
1550
+ ...commonParams
1551
+ }).m(function(Command, cs, config, o) {
1552
+ return [
1553
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1554
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1555
+ ];
1556
+ }).s("RdsDataService", "ExecuteSql", {}).n("RDSDataClient", "ExecuteSqlCommand").f(void 0, void 0).ser(se_ExecuteSqlCommand).de(de_ExecuteSqlCommand).build() {
1557
+ };
1558
+ __name(_ExecuteSqlCommand, "ExecuteSqlCommand");
1559
+ var ExecuteSqlCommand = _ExecuteSqlCommand;
1560
+
1561
+ // src/commands/ExecuteStatementCommand.ts
1562
+
1563
+
1564
+
1565
+
1566
+ var _ExecuteStatementCommand = class _ExecuteStatementCommand extends import_smithy_client.Command.classBuilder().ep({
1567
+ ...commonParams
1568
+ }).m(function(Command, cs, config, o) {
1569
+ return [
1570
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1571
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1572
+ ];
1573
+ }).s("RdsDataService", "ExecuteStatement", {}).n("RDSDataClient", "ExecuteStatementCommand").f(void 0, void 0).ser(se_ExecuteStatementCommand).de(de_ExecuteStatementCommand).build() {
1574
+ };
1575
+ __name(_ExecuteStatementCommand, "ExecuteStatementCommand");
1576
+ var ExecuteStatementCommand = _ExecuteStatementCommand;
1577
+
1578
+ // src/commands/RollbackTransactionCommand.ts
1579
+
1580
+
1581
+
1582
+
1583
+ var _RollbackTransactionCommand = class _RollbackTransactionCommand extends import_smithy_client.Command.classBuilder().ep({
1584
+ ...commonParams
1585
+ }).m(function(Command, cs, config, o) {
1586
+ return [
1587
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1588
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1589
+ ];
1590
+ }).s("RdsDataService", "RollbackTransaction", {}).n("RDSDataClient", "RollbackTransactionCommand").f(void 0, void 0).ser(se_RollbackTransactionCommand).de(de_RollbackTransactionCommand).build() {
1591
+ };
1592
+ __name(_RollbackTransactionCommand, "RollbackTransactionCommand");
1593
+ var RollbackTransactionCommand = _RollbackTransactionCommand;
1594
+
1595
+ // src/RDSData.ts
1596
+ var commands = {
1597
+ BatchExecuteStatementCommand,
1598
+ BeginTransactionCommand,
1599
+ CommitTransactionCommand,
1600
+ ExecuteSqlCommand,
1601
+ ExecuteStatementCommand,
1602
+ RollbackTransactionCommand
1603
+ };
1604
+ var _RDSData = class _RDSData extends RDSDataClient {
1605
+ };
1606
+ __name(_RDSData, "RDSData");
1607
+ var RDSData = _RDSData;
1608
+ (0, import_smithy_client.createAggregatedClient)(commands, RDSData);
1609
+
1610
+ // src/index.ts
1611
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
1612
+ // Annotate the CommonJS export names for ESM import in node:
1613
+ 0 && (module.exports = {
1614
+ AccessDeniedException,
1615
+ ArrayValue,
1616
+ BadRequestException,
1617
+ BatchExecuteStatementCommand,
1618
+ BeginTransactionCommand,
1619
+ CommitTransactionCommand,
1620
+ DatabaseErrorException,
1621
+ DatabaseNotFoundException,
1622
+ DatabaseUnavailableException,
1623
+ DecimalReturnType,
1624
+ ExecuteSqlCommand,
1625
+ ExecuteStatementCommand,
1626
+ Field,
1627
+ ForbiddenException,
1628
+ HttpEndpointNotEnabledException,
1629
+ InternalServerErrorException,
1630
+ InvalidSecretException,
1631
+ LongReturnType,
1632
+ NotFoundException,
1633
+ RDSData,
1634
+ RDSDataClient,
1635
+ RDSDataServiceException,
1636
+ RecordsFormatType,
1637
+ RollbackTransactionCommand,
1638
+ SecretsErrorException,
1639
+ ServiceUnavailableError,
1640
+ StatementTimeoutException,
1641
+ TransactionNotFoundException,
1642
+ TypeHint,
1643
+ UnsupportedResultException,
1644
+ Value,
1645
+ __Client
1646
+ });