@aws-sdk/client-redshift-data 3.901.0 → 3.907.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +1041 -1219
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,1283 +1,1105 @@
1
- "use strict";
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 });
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+ var uuid = require('@smithy/uuid');
20
+
21
+ const resolveClientEndpointParameters = (options) => {
22
+ return Object.assign(options, {
23
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
24
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
25
+ defaultSigningName: "redshift-data",
26
+ });
10
27
  };
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;
28
+ const commonParams = {
29
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
30
+ Endpoint: { type: "builtInParams", name: "endpoint" },
31
+ Region: { type: "builtInParams", name: "region" },
32
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
33
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- ActiveSessionsExceededException: () => ActiveSessionsExceededException,
25
- ActiveStatementsExceededException: () => ActiveStatementsExceededException,
26
- BatchExecuteStatementCommand: () => BatchExecuteStatementCommand,
27
- BatchExecuteStatementException: () => BatchExecuteStatementException,
28
- CancelStatementCommand: () => CancelStatementCommand,
29
- DatabaseConnectionException: () => DatabaseConnectionException,
30
- DescribeStatementCommand: () => DescribeStatementCommand,
31
- DescribeTableCommand: () => DescribeTableCommand,
32
- ExecuteStatementCommand: () => ExecuteStatementCommand,
33
- ExecuteStatementException: () => ExecuteStatementException,
34
- Field: () => Field,
35
- GetStatementResultCommand: () => GetStatementResultCommand,
36
- GetStatementResultV2Command: () => GetStatementResultV2Command,
37
- InternalServerException: () => InternalServerException,
38
- ListDatabasesCommand: () => ListDatabasesCommand,
39
- ListSchemasCommand: () => ListSchemasCommand,
40
- ListStatementsCommand: () => ListStatementsCommand,
41
- ListTablesCommand: () => ListTablesCommand,
42
- QueryRecords: () => QueryRecords,
43
- QueryTimeoutException: () => QueryTimeoutException,
44
- RedshiftData: () => RedshiftData,
45
- RedshiftDataClient: () => RedshiftDataClient,
46
- RedshiftDataServiceException: () => RedshiftDataServiceException,
47
- ResourceNotFoundException: () => ResourceNotFoundException,
48
- ResultFormatString: () => ResultFormatString,
49
- StatementStatusString: () => StatementStatusString,
50
- StatusString: () => StatusString,
51
- ValidationException: () => ValidationException,
52
- __Client: () => import_smithy_client.Client,
53
- paginateDescribeTable: () => paginateDescribeTable,
54
- paginateGetStatementResult: () => paginateGetStatementResult,
55
- paginateGetStatementResultV2: () => paginateGetStatementResultV2,
56
- paginateListDatabases: () => paginateListDatabases,
57
- paginateListSchemas: () => paginateListSchemas,
58
- paginateListStatements: () => paginateListStatements,
59
- paginateListTables: () => paginateListTables
60
- });
61
- module.exports = __toCommonJS(index_exports);
62
34
 
63
- // src/RedshiftDataClient.ts
64
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
65
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
66
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
67
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
68
- var import_config_resolver = require("@smithy/config-resolver");
69
- var import_core = require("@smithy/core");
70
- var import_middleware_content_length = require("@smithy/middleware-content-length");
71
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
72
- var import_middleware_retry = require("@smithy/middleware-retry");
73
-
74
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
75
-
76
- // src/endpoint/EndpointParameters.ts
77
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
78
- return Object.assign(options, {
79
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
80
- useFipsEndpoint: options.useFipsEndpoint ?? false,
81
- defaultSigningName: "redshift-data"
82
- });
83
- }, "resolveClientEndpointParameters");
84
- var commonParams = {
85
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
86
- Endpoint: { type: "builtInParams", name: "endpoint" },
87
- Region: { type: "builtInParams", name: "region" },
88
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
35
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
36
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
37
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
38
+ let _credentials = runtimeConfig.credentials;
39
+ return {
40
+ setHttpAuthScheme(httpAuthScheme) {
41
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
42
+ if (index === -1) {
43
+ _httpAuthSchemes.push(httpAuthScheme);
44
+ }
45
+ else {
46
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
47
+ }
48
+ },
49
+ httpAuthSchemes() {
50
+ return _httpAuthSchemes;
51
+ },
52
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
53
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
54
+ },
55
+ httpAuthSchemeProvider() {
56
+ return _httpAuthSchemeProvider;
57
+ },
58
+ setCredentials(credentials) {
59
+ _credentials = credentials;
60
+ },
61
+ credentials() {
62
+ return _credentials;
63
+ },
64
+ };
65
+ };
66
+ const resolveHttpAuthRuntimeConfig = (config) => {
67
+ return {
68
+ httpAuthSchemes: config.httpAuthSchemes(),
69
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
70
+ credentials: config.credentials(),
71
+ };
89
72
  };
90
73
 
91
- // src/RedshiftDataClient.ts
92
- var import_runtimeConfig = require("././runtimeConfig");
93
-
94
- // src/runtimeExtensions.ts
95
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
96
- var import_protocol_http = require("@smithy/protocol-http");
97
- var import_smithy_client = require("@smithy/smithy-client");
74
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
75
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
76
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
77
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
78
+ };
98
79
 
99
- // src/auth/httpAuthExtensionConfiguration.ts
100
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
101
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
102
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
103
- let _credentials = runtimeConfig.credentials;
104
- return {
105
- setHttpAuthScheme(httpAuthScheme) {
106
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
107
- if (index === -1) {
108
- _httpAuthSchemes.push(httpAuthScheme);
109
- } else {
110
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
111
- }
112
- },
113
- httpAuthSchemes() {
114
- return _httpAuthSchemes;
115
- },
116
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
117
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
118
- },
119
- httpAuthSchemeProvider() {
120
- return _httpAuthSchemeProvider;
121
- },
122
- setCredentials(credentials) {
123
- _credentials = credentials;
124
- },
125
- credentials() {
126
- return _credentials;
80
+ class RedshiftDataClient extends smithyClient.Client {
81
+ config;
82
+ constructor(...[configuration]) {
83
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
84
+ super(_config_0);
85
+ this.initConfig = _config_0;
86
+ const _config_1 = resolveClientEndpointParameters(_config_0);
87
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
88
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
89
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
90
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
91
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
92
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
93
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
94
+ this.config = _config_8;
95
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
96
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
97
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
98
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
99
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
100
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
101
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
102
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultRedshiftDataHttpAuthSchemeParametersProvider,
103
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
104
+ "aws.auth#sigv4": config.credentials,
105
+ }),
106
+ }));
107
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
127
108
  }
128
- };
129
- }, "getHttpAuthExtensionConfiguration");
130
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
131
- return {
132
- httpAuthSchemes: config.httpAuthSchemes(),
133
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
134
- credentials: config.credentials()
135
- };
136
- }, "resolveHttpAuthRuntimeConfig");
109
+ destroy() {
110
+ super.destroy();
111
+ }
112
+ }
137
113
 
138
- // src/runtimeExtensions.ts
139
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
140
- const extensionConfiguration = Object.assign(
141
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
142
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
143
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
144
- getHttpAuthExtensionConfiguration(runtimeConfig)
145
- );
146
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
147
- return Object.assign(
148
- runtimeConfig,
149
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
150
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
151
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
152
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
153
- );
154
- }, "resolveRuntimeExtensions");
114
+ class RedshiftDataServiceException extends smithyClient.ServiceException {
115
+ constructor(options) {
116
+ super(options);
117
+ Object.setPrototypeOf(this, RedshiftDataServiceException.prototype);
118
+ }
119
+ }
155
120
 
156
- // src/RedshiftDataClient.ts
157
- var RedshiftDataClient = class extends import_smithy_client.Client {
158
- static {
159
- __name(this, "RedshiftDataClient");
160
- }
161
- /**
162
- * The resolved configuration of RedshiftDataClient class. This is resolved and normalized from the {@link RedshiftDataClientConfig | constructor configuration interface}.
163
- */
164
- config;
165
- constructor(...[configuration]) {
166
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
167
- super(_config_0);
168
- this.initConfig = _config_0;
169
- const _config_1 = resolveClientEndpointParameters(_config_0);
170
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
171
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
172
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
173
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
174
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
175
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
176
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
177
- this.config = _config_8;
178
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
179
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
180
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
181
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
182
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
183
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
184
- this.middlewareStack.use(
185
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
186
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultRedshiftDataHttpAuthSchemeParametersProvider,
187
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
188
- "aws.auth#sigv4": config.credentials
189
- }), "identityProviderConfigProvider")
190
- })
191
- );
192
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
193
- }
194
- /**
195
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
196
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
197
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
198
- */
199
- destroy() {
200
- super.destroy();
201
- }
121
+ class ActiveSessionsExceededException extends RedshiftDataServiceException {
122
+ name = "ActiveSessionsExceededException";
123
+ $fault = "client";
124
+ Message;
125
+ constructor(opts) {
126
+ super({
127
+ name: "ActiveSessionsExceededException",
128
+ $fault: "client",
129
+ ...opts,
130
+ });
131
+ Object.setPrototypeOf(this, ActiveSessionsExceededException.prototype);
132
+ this.Message = opts.Message;
133
+ }
134
+ }
135
+ class ActiveStatementsExceededException extends RedshiftDataServiceException {
136
+ name = "ActiveStatementsExceededException";
137
+ $fault = "client";
138
+ Message;
139
+ constructor(opts) {
140
+ super({
141
+ name: "ActiveStatementsExceededException",
142
+ $fault: "client",
143
+ ...opts,
144
+ });
145
+ Object.setPrototypeOf(this, ActiveStatementsExceededException.prototype);
146
+ this.Message = opts.Message;
147
+ }
148
+ }
149
+ class BatchExecuteStatementException extends RedshiftDataServiceException {
150
+ name = "BatchExecuteStatementException";
151
+ $fault = "server";
152
+ Message;
153
+ StatementId;
154
+ constructor(opts) {
155
+ super({
156
+ name: "BatchExecuteStatementException",
157
+ $fault: "server",
158
+ ...opts,
159
+ });
160
+ Object.setPrototypeOf(this, BatchExecuteStatementException.prototype);
161
+ this.Message = opts.Message;
162
+ this.StatementId = opts.StatementId;
163
+ }
164
+ }
165
+ const ResultFormatString = {
166
+ CSV: "CSV",
167
+ JSON: "JSON",
202
168
  };
203
-
204
- // src/RedshiftData.ts
205
-
206
-
207
- // src/commands/BatchExecuteStatementCommand.ts
208
-
209
- var import_middleware_serde = require("@smithy/middleware-serde");
210
-
211
-
212
- // src/protocols/Aws_json1_1.ts
213
- var import_core2 = require("@aws-sdk/core");
214
-
215
-
216
- var import_uuid = require("@smithy/uuid");
217
-
218
- // src/models/RedshiftDataServiceException.ts
219
-
220
- var RedshiftDataServiceException = class _RedshiftDataServiceException extends import_smithy_client.ServiceException {
221
- static {
222
- __name(this, "RedshiftDataServiceException");
223
- }
224
- /**
225
- * @internal
226
- */
227
- constructor(options) {
228
- super(options);
229
- Object.setPrototypeOf(this, _RedshiftDataServiceException.prototype);
230
- }
169
+ class InternalServerException extends RedshiftDataServiceException {
170
+ name = "InternalServerException";
171
+ $fault = "server";
172
+ Message;
173
+ constructor(opts) {
174
+ super({
175
+ name: "InternalServerException",
176
+ $fault: "server",
177
+ ...opts,
178
+ });
179
+ Object.setPrototypeOf(this, InternalServerException.prototype);
180
+ this.Message = opts.Message;
181
+ }
182
+ }
183
+ class ValidationException extends RedshiftDataServiceException {
184
+ name = "ValidationException";
185
+ $fault = "client";
186
+ Message;
187
+ constructor(opts) {
188
+ super({
189
+ name: "ValidationException",
190
+ $fault: "client",
191
+ ...opts,
192
+ });
193
+ Object.setPrototypeOf(this, ValidationException.prototype);
194
+ this.Message = opts.Message;
195
+ }
196
+ }
197
+ class DatabaseConnectionException extends RedshiftDataServiceException {
198
+ name = "DatabaseConnectionException";
199
+ $fault = "server";
200
+ Message;
201
+ constructor(opts) {
202
+ super({
203
+ name: "DatabaseConnectionException",
204
+ $fault: "server",
205
+ ...opts,
206
+ });
207
+ Object.setPrototypeOf(this, DatabaseConnectionException.prototype);
208
+ this.Message = opts.Message;
209
+ }
210
+ }
211
+ class ResourceNotFoundException extends RedshiftDataServiceException {
212
+ name = "ResourceNotFoundException";
213
+ $fault = "client";
214
+ Message;
215
+ ResourceId;
216
+ constructor(opts) {
217
+ super({
218
+ name: "ResourceNotFoundException",
219
+ $fault: "client",
220
+ ...opts,
221
+ });
222
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
223
+ this.Message = opts.Message;
224
+ this.ResourceId = opts.ResourceId;
225
+ }
226
+ }
227
+ const StatusString = {
228
+ ABORTED: "ABORTED",
229
+ ALL: "ALL",
230
+ FAILED: "FAILED",
231
+ FINISHED: "FINISHED",
232
+ PICKED: "PICKED",
233
+ STARTED: "STARTED",
234
+ SUBMITTED: "SUBMITTED",
235
+ };
236
+ const StatementStatusString = {
237
+ ABORTED: "ABORTED",
238
+ FAILED: "FAILED",
239
+ FINISHED: "FINISHED",
240
+ PICKED: "PICKED",
241
+ STARTED: "STARTED",
242
+ SUBMITTED: "SUBMITTED",
231
243
  };
244
+ class QueryTimeoutException extends RedshiftDataServiceException {
245
+ name = "QueryTimeoutException";
246
+ $fault = "client";
247
+ Message;
248
+ constructor(opts) {
249
+ super({
250
+ name: "QueryTimeoutException",
251
+ $fault: "client",
252
+ ...opts,
253
+ });
254
+ Object.setPrototypeOf(this, QueryTimeoutException.prototype);
255
+ this.Message = opts.Message;
256
+ }
257
+ }
258
+ class ExecuteStatementException extends RedshiftDataServiceException {
259
+ name = "ExecuteStatementException";
260
+ $fault = "server";
261
+ Message;
262
+ StatementId;
263
+ constructor(opts) {
264
+ super({
265
+ name: "ExecuteStatementException",
266
+ $fault: "server",
267
+ ...opts,
268
+ });
269
+ Object.setPrototypeOf(this, ExecuteStatementException.prototype);
270
+ this.Message = opts.Message;
271
+ this.StatementId = opts.StatementId;
272
+ }
273
+ }
274
+ exports.Field = void 0;
275
+ (function (Field) {
276
+ Field.visit = (value, visitor) => {
277
+ if (value.isNull !== undefined)
278
+ return visitor.isNull(value.isNull);
279
+ if (value.booleanValue !== undefined)
280
+ return visitor.booleanValue(value.booleanValue);
281
+ if (value.longValue !== undefined)
282
+ return visitor.longValue(value.longValue);
283
+ if (value.doubleValue !== undefined)
284
+ return visitor.doubleValue(value.doubleValue);
285
+ if (value.stringValue !== undefined)
286
+ return visitor.stringValue(value.stringValue);
287
+ if (value.blobValue !== undefined)
288
+ return visitor.blobValue(value.blobValue);
289
+ return visitor._(value.$unknown[0], value.$unknown[1]);
290
+ };
291
+ })(exports.Field || (exports.Field = {}));
292
+ exports.QueryRecords = void 0;
293
+ (function (QueryRecords) {
294
+ QueryRecords.visit = (value, visitor) => {
295
+ if (value.CSVRecords !== undefined)
296
+ return visitor.CSVRecords(value.CSVRecords);
297
+ return visitor._(value.$unknown[0], value.$unknown[1]);
298
+ };
299
+ })(exports.QueryRecords || (exports.QueryRecords = {}));
232
300
 
233
- // src/models/models_0.ts
234
- var ActiveSessionsExceededException = class _ActiveSessionsExceededException extends RedshiftDataServiceException {
235
- static {
236
- __name(this, "ActiveSessionsExceededException");
237
- }
238
- name = "ActiveSessionsExceededException";
239
- $fault = "client";
240
- Message;
241
- /**
242
- * @internal
243
- */
244
- constructor(opts) {
245
- super({
246
- name: "ActiveSessionsExceededException",
247
- $fault: "client",
248
- ...opts
301
+ const se_BatchExecuteStatementCommand = async (input, context) => {
302
+ const headers = sharedHeaders("BatchExecuteStatement");
303
+ let body;
304
+ body = JSON.stringify(se_BatchExecuteStatementInput(input));
305
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
306
+ };
307
+ const se_CancelStatementCommand = async (input, context) => {
308
+ const headers = sharedHeaders("CancelStatement");
309
+ let body;
310
+ body = JSON.stringify(smithyClient._json(input));
311
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
312
+ };
313
+ const se_DescribeStatementCommand = async (input, context) => {
314
+ const headers = sharedHeaders("DescribeStatement");
315
+ let body;
316
+ body = JSON.stringify(smithyClient._json(input));
317
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
318
+ };
319
+ const se_DescribeTableCommand = async (input, context) => {
320
+ const headers = sharedHeaders("DescribeTable");
321
+ let body;
322
+ body = JSON.stringify(smithyClient._json(input));
323
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
324
+ };
325
+ const se_ExecuteStatementCommand = async (input, context) => {
326
+ const headers = sharedHeaders("ExecuteStatement");
327
+ let body;
328
+ body = JSON.stringify(se_ExecuteStatementInput(input));
329
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
330
+ };
331
+ const se_GetStatementResultCommand = async (input, context) => {
332
+ const headers = sharedHeaders("GetStatementResult");
333
+ let body;
334
+ body = JSON.stringify(smithyClient._json(input));
335
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
336
+ };
337
+ const se_GetStatementResultV2Command = async (input, context) => {
338
+ const headers = sharedHeaders("GetStatementResultV2");
339
+ let body;
340
+ body = JSON.stringify(smithyClient._json(input));
341
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
342
+ };
343
+ const se_ListDatabasesCommand = async (input, context) => {
344
+ const headers = sharedHeaders("ListDatabases");
345
+ let body;
346
+ body = JSON.stringify(smithyClient._json(input));
347
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
348
+ };
349
+ const se_ListSchemasCommand = async (input, context) => {
350
+ const headers = sharedHeaders("ListSchemas");
351
+ let body;
352
+ body = JSON.stringify(smithyClient._json(input));
353
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
354
+ };
355
+ const se_ListStatementsCommand = async (input, context) => {
356
+ const headers = sharedHeaders("ListStatements");
357
+ let body;
358
+ body = JSON.stringify(smithyClient._json(input));
359
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
360
+ };
361
+ const se_ListTablesCommand = async (input, context) => {
362
+ const headers = sharedHeaders("ListTables");
363
+ let body;
364
+ body = JSON.stringify(smithyClient._json(input));
365
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
366
+ };
367
+ const de_BatchExecuteStatementCommand = async (output, context) => {
368
+ if (output.statusCode >= 300) {
369
+ return de_CommandError(output, context);
370
+ }
371
+ const data = await core$1.parseJsonBody(output.body, context);
372
+ let contents = {};
373
+ contents = de_BatchExecuteStatementOutput(data);
374
+ const response = {
375
+ $metadata: deserializeMetadata(output),
376
+ ...contents,
377
+ };
378
+ return response;
379
+ };
380
+ const de_CancelStatementCommand = async (output, context) => {
381
+ if (output.statusCode >= 300) {
382
+ return de_CommandError(output, context);
383
+ }
384
+ const data = await core$1.parseJsonBody(output.body, context);
385
+ let contents = {};
386
+ contents = smithyClient._json(data);
387
+ const response = {
388
+ $metadata: deserializeMetadata(output),
389
+ ...contents,
390
+ };
391
+ return response;
392
+ };
393
+ const de_DescribeStatementCommand = async (output, context) => {
394
+ if (output.statusCode >= 300) {
395
+ return de_CommandError(output, context);
396
+ }
397
+ const data = await core$1.parseJsonBody(output.body, context);
398
+ let contents = {};
399
+ contents = de_DescribeStatementResponse(data);
400
+ const response = {
401
+ $metadata: deserializeMetadata(output),
402
+ ...contents,
403
+ };
404
+ return response;
405
+ };
406
+ const de_DescribeTableCommand = async (output, context) => {
407
+ if (output.statusCode >= 300) {
408
+ return de_CommandError(output, context);
409
+ }
410
+ const data = await core$1.parseJsonBody(output.body, context);
411
+ let contents = {};
412
+ contents = smithyClient._json(data);
413
+ const response = {
414
+ $metadata: deserializeMetadata(output),
415
+ ...contents,
416
+ };
417
+ return response;
418
+ };
419
+ const de_ExecuteStatementCommand = async (output, context) => {
420
+ if (output.statusCode >= 300) {
421
+ return de_CommandError(output, context);
422
+ }
423
+ const data = await core$1.parseJsonBody(output.body, context);
424
+ let contents = {};
425
+ contents = de_ExecuteStatementOutput(data);
426
+ const response = {
427
+ $metadata: deserializeMetadata(output),
428
+ ...contents,
429
+ };
430
+ return response;
431
+ };
432
+ const de_GetStatementResultCommand = async (output, context) => {
433
+ if (output.statusCode >= 300) {
434
+ return de_CommandError(output, context);
435
+ }
436
+ const data = await core$1.parseJsonBody(output.body, context);
437
+ let contents = {};
438
+ contents = de_GetStatementResultResponse(data, context);
439
+ const response = {
440
+ $metadata: deserializeMetadata(output),
441
+ ...contents,
442
+ };
443
+ return response;
444
+ };
445
+ const de_GetStatementResultV2Command = async (output, context) => {
446
+ if (output.statusCode >= 300) {
447
+ return de_CommandError(output, context);
448
+ }
449
+ const data = await core$1.parseJsonBody(output.body, context);
450
+ let contents = {};
451
+ contents = smithyClient._json(data);
452
+ const response = {
453
+ $metadata: deserializeMetadata(output),
454
+ ...contents,
455
+ };
456
+ return response;
457
+ };
458
+ const de_ListDatabasesCommand = async (output, context) => {
459
+ if (output.statusCode >= 300) {
460
+ return de_CommandError(output, context);
461
+ }
462
+ const data = await core$1.parseJsonBody(output.body, context);
463
+ let contents = {};
464
+ contents = smithyClient._json(data);
465
+ const response = {
466
+ $metadata: deserializeMetadata(output),
467
+ ...contents,
468
+ };
469
+ return response;
470
+ };
471
+ const de_ListSchemasCommand = async (output, context) => {
472
+ if (output.statusCode >= 300) {
473
+ return de_CommandError(output, context);
474
+ }
475
+ const data = await core$1.parseJsonBody(output.body, context);
476
+ let contents = {};
477
+ contents = smithyClient._json(data);
478
+ const response = {
479
+ $metadata: deserializeMetadata(output),
480
+ ...contents,
481
+ };
482
+ return response;
483
+ };
484
+ const de_ListStatementsCommand = async (output, context) => {
485
+ if (output.statusCode >= 300) {
486
+ return de_CommandError(output, context);
487
+ }
488
+ const data = await core$1.parseJsonBody(output.body, context);
489
+ let contents = {};
490
+ contents = de_ListStatementsResponse(data);
491
+ const response = {
492
+ $metadata: deserializeMetadata(output),
493
+ ...contents,
494
+ };
495
+ return response;
496
+ };
497
+ const de_ListTablesCommand = async (output, context) => {
498
+ if (output.statusCode >= 300) {
499
+ return de_CommandError(output, context);
500
+ }
501
+ const data = await core$1.parseJsonBody(output.body, context);
502
+ let contents = {};
503
+ contents = smithyClient._json(data);
504
+ const response = {
505
+ $metadata: deserializeMetadata(output),
506
+ ...contents,
507
+ };
508
+ return response;
509
+ };
510
+ const de_CommandError = async (output, context) => {
511
+ const parsedOutput = {
512
+ ...output,
513
+ body: await core$1.parseJsonErrorBody(output.body, context),
514
+ };
515
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
516
+ switch (errorCode) {
517
+ case "ActiveSessionsExceededException":
518
+ case "com.amazonaws.redshiftdata#ActiveSessionsExceededException":
519
+ throw await de_ActiveSessionsExceededExceptionRes(parsedOutput);
520
+ case "ActiveStatementsExceededException":
521
+ case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
522
+ throw await de_ActiveStatementsExceededExceptionRes(parsedOutput);
523
+ case "BatchExecuteStatementException":
524
+ case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
525
+ throw await de_BatchExecuteStatementExceptionRes(parsedOutput);
526
+ case "InternalServerException":
527
+ case "com.amazonaws.redshiftdata#InternalServerException":
528
+ throw await de_InternalServerExceptionRes(parsedOutput);
529
+ case "ValidationException":
530
+ case "com.amazonaws.redshiftdata#ValidationException":
531
+ throw await de_ValidationExceptionRes(parsedOutput);
532
+ case "DatabaseConnectionException":
533
+ case "com.amazonaws.redshiftdata#DatabaseConnectionException":
534
+ throw await de_DatabaseConnectionExceptionRes(parsedOutput);
535
+ case "ResourceNotFoundException":
536
+ case "com.amazonaws.redshiftdata#ResourceNotFoundException":
537
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
538
+ case "QueryTimeoutException":
539
+ case "com.amazonaws.redshiftdata#QueryTimeoutException":
540
+ throw await de_QueryTimeoutExceptionRes(parsedOutput);
541
+ case "ExecuteStatementException":
542
+ case "com.amazonaws.redshiftdata#ExecuteStatementException":
543
+ throw await de_ExecuteStatementExceptionRes(parsedOutput);
544
+ default:
545
+ const parsedBody = parsedOutput.body;
546
+ return throwDefaultError({
547
+ output,
548
+ parsedBody,
549
+ errorCode,
550
+ });
551
+ }
552
+ };
553
+ const de_ActiveSessionsExceededExceptionRes = async (parsedOutput, context) => {
554
+ const body = parsedOutput.body;
555
+ const deserialized = smithyClient._json(body);
556
+ const exception = new ActiveSessionsExceededException({
557
+ $metadata: deserializeMetadata(parsedOutput),
558
+ ...deserialized,
249
559
  });
250
- Object.setPrototypeOf(this, _ActiveSessionsExceededException.prototype);
251
- this.Message = opts.Message;
252
- }
560
+ return smithyClient.decorateServiceException(exception, body);
253
561
  };
254
- var ActiveStatementsExceededException = class _ActiveStatementsExceededException extends RedshiftDataServiceException {
255
- static {
256
- __name(this, "ActiveStatementsExceededException");
257
- }
258
- name = "ActiveStatementsExceededException";
259
- $fault = "client";
260
- Message;
261
- /**
262
- * @internal
263
- */
264
- constructor(opts) {
265
- super({
266
- name: "ActiveStatementsExceededException",
267
- $fault: "client",
268
- ...opts
562
+ const de_ActiveStatementsExceededExceptionRes = async (parsedOutput, context) => {
563
+ const body = parsedOutput.body;
564
+ const deserialized = smithyClient._json(body);
565
+ const exception = new ActiveStatementsExceededException({
566
+ $metadata: deserializeMetadata(parsedOutput),
567
+ ...deserialized,
269
568
  });
270
- Object.setPrototypeOf(this, _ActiveStatementsExceededException.prototype);
271
- this.Message = opts.Message;
272
- }
569
+ return smithyClient.decorateServiceException(exception, body);
273
570
  };
274
- var BatchExecuteStatementException = class _BatchExecuteStatementException extends RedshiftDataServiceException {
275
- static {
276
- __name(this, "BatchExecuteStatementException");
277
- }
278
- name = "BatchExecuteStatementException";
279
- $fault = "server";
280
- Message;
281
- /**
282
- * <p>Statement identifier of the exception.</p>
283
- * @public
284
- */
285
- StatementId;
286
- /**
287
- * @internal
288
- */
289
- constructor(opts) {
290
- super({
291
- name: "BatchExecuteStatementException",
292
- $fault: "server",
293
- ...opts
571
+ const de_BatchExecuteStatementExceptionRes = async (parsedOutput, context) => {
572
+ const body = parsedOutput.body;
573
+ const deserialized = smithyClient._json(body);
574
+ const exception = new BatchExecuteStatementException({
575
+ $metadata: deserializeMetadata(parsedOutput),
576
+ ...deserialized,
294
577
  });
295
- Object.setPrototypeOf(this, _BatchExecuteStatementException.prototype);
296
- this.Message = opts.Message;
297
- this.StatementId = opts.StatementId;
298
- }
578
+ return smithyClient.decorateServiceException(exception, body);
299
579
  };
300
- var ResultFormatString = {
301
- CSV: "CSV",
302
- JSON: "JSON"
580
+ const de_DatabaseConnectionExceptionRes = async (parsedOutput, context) => {
581
+ const body = parsedOutput.body;
582
+ const deserialized = smithyClient._json(body);
583
+ const exception = new DatabaseConnectionException({
584
+ $metadata: deserializeMetadata(parsedOutput),
585
+ ...deserialized,
586
+ });
587
+ return smithyClient.decorateServiceException(exception, body);
303
588
  };
304
- var InternalServerException = class _InternalServerException extends RedshiftDataServiceException {
305
- static {
306
- __name(this, "InternalServerException");
307
- }
308
- name = "InternalServerException";
309
- $fault = "server";
310
- /**
311
- * <p>The exception message.</p>
312
- * @public
313
- */
314
- Message;
315
- /**
316
- * @internal
317
- */
318
- constructor(opts) {
319
- super({
320
- name: "InternalServerException",
321
- $fault: "server",
322
- ...opts
589
+ const de_ExecuteStatementExceptionRes = async (parsedOutput, context) => {
590
+ const body = parsedOutput.body;
591
+ const deserialized = smithyClient._json(body);
592
+ const exception = new ExecuteStatementException({
593
+ $metadata: deserializeMetadata(parsedOutput),
594
+ ...deserialized,
323
595
  });
324
- Object.setPrototypeOf(this, _InternalServerException.prototype);
325
- this.Message = opts.Message;
326
- }
596
+ return smithyClient.decorateServiceException(exception, body);
327
597
  };
328
- var ValidationException = class _ValidationException extends RedshiftDataServiceException {
329
- static {
330
- __name(this, "ValidationException");
331
- }
332
- name = "ValidationException";
333
- $fault = "client";
334
- /**
335
- * <p>The exception message.</p>
336
- * @public
337
- */
338
- Message;
339
- /**
340
- * @internal
341
- */
342
- constructor(opts) {
343
- super({
344
- name: "ValidationException",
345
- $fault: "client",
346
- ...opts
598
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
599
+ const body = parsedOutput.body;
600
+ const deserialized = smithyClient._json(body);
601
+ const exception = new InternalServerException({
602
+ $metadata: deserializeMetadata(parsedOutput),
603
+ ...deserialized,
347
604
  });
348
- Object.setPrototypeOf(this, _ValidationException.prototype);
349
- this.Message = opts.Message;
350
- }
605
+ return smithyClient.decorateServiceException(exception, body);
351
606
  };
352
- var DatabaseConnectionException = class _DatabaseConnectionException extends RedshiftDataServiceException {
353
- static {
354
- __name(this, "DatabaseConnectionException");
355
- }
356
- name = "DatabaseConnectionException";
357
- $fault = "server";
358
- Message;
359
- /**
360
- * @internal
361
- */
362
- constructor(opts) {
363
- super({
364
- name: "DatabaseConnectionException",
365
- $fault: "server",
366
- ...opts
607
+ const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
608
+ const body = parsedOutput.body;
609
+ const deserialized = smithyClient._json(body);
610
+ const exception = new QueryTimeoutException({
611
+ $metadata: deserializeMetadata(parsedOutput),
612
+ ...deserialized,
367
613
  });
368
- Object.setPrototypeOf(this, _DatabaseConnectionException.prototype);
369
- this.Message = opts.Message;
370
- }
614
+ return smithyClient.decorateServiceException(exception, body);
371
615
  };
372
- var ResourceNotFoundException = class _ResourceNotFoundException extends RedshiftDataServiceException {
373
- static {
374
- __name(this, "ResourceNotFoundException");
375
- }
376
- name = "ResourceNotFoundException";
377
- $fault = "client";
378
- /**
379
- * <p>The exception message.</p>
380
- * @public
381
- */
382
- Message;
383
- /**
384
- * <p>Resource identifier associated with the exception.</p>
385
- * @public
386
- */
387
- ResourceId;
388
- /**
389
- * @internal
390
- */
391
- constructor(opts) {
392
- super({
393
- name: "ResourceNotFoundException",
394
- $fault: "client",
395
- ...opts
616
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
617
+ const body = parsedOutput.body;
618
+ const deserialized = smithyClient._json(body);
619
+ const exception = new ResourceNotFoundException({
620
+ $metadata: deserializeMetadata(parsedOutput),
621
+ ...deserialized,
396
622
  });
397
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
398
- this.Message = opts.Message;
399
- this.ResourceId = opts.ResourceId;
400
- }
623
+ return smithyClient.decorateServiceException(exception, body);
401
624
  };
402
- var StatusString = {
403
- ABORTED: "ABORTED",
404
- ALL: "ALL",
405
- FAILED: "FAILED",
406
- FINISHED: "FINISHED",
407
- PICKED: "PICKED",
408
- STARTED: "STARTED",
409
- SUBMITTED: "SUBMITTED"
625
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
626
+ const body = parsedOutput.body;
627
+ const deserialized = smithyClient._json(body);
628
+ const exception = new ValidationException({
629
+ $metadata: deserializeMetadata(parsedOutput),
630
+ ...deserialized,
631
+ });
632
+ return smithyClient.decorateServiceException(exception, body);
410
633
  };
411
- var StatementStatusString = {
412
- ABORTED: "ABORTED",
413
- FAILED: "FAILED",
414
- FINISHED: "FINISHED",
415
- PICKED: "PICKED",
416
- STARTED: "STARTED",
417
- SUBMITTED: "SUBMITTED"
634
+ const se_BatchExecuteStatementInput = (input, context) => {
635
+ return smithyClient.take(input, {
636
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
637
+ ClusterIdentifier: [],
638
+ Database: [],
639
+ DbUser: [],
640
+ ResultFormat: [],
641
+ SecretArn: [],
642
+ SessionId: [],
643
+ SessionKeepAliveSeconds: [],
644
+ Sqls: smithyClient._json,
645
+ StatementName: [],
646
+ WithEvent: [],
647
+ WorkgroupName: [],
648
+ });
418
649
  };
419
- var QueryTimeoutException = class _QueryTimeoutException extends RedshiftDataServiceException {
420
- static {
421
- __name(this, "QueryTimeoutException");
422
- }
423
- name = "QueryTimeoutException";
424
- $fault = "client";
425
- Message;
426
- /**
427
- * @internal
428
- */
429
- constructor(opts) {
430
- super({
431
- name: "QueryTimeoutException",
432
- $fault: "client",
433
- ...opts
650
+ const se_ExecuteStatementInput = (input, context) => {
651
+ return smithyClient.take(input, {
652
+ ClientToken: [true, (_) => _ ?? uuid.v4()],
653
+ ClusterIdentifier: [],
654
+ Database: [],
655
+ DbUser: [],
656
+ Parameters: smithyClient._json,
657
+ ResultFormat: [],
658
+ SecretArn: [],
659
+ SessionId: [],
660
+ SessionKeepAliveSeconds: [],
661
+ Sql: [],
662
+ StatementName: [],
663
+ WithEvent: [],
664
+ WorkgroupName: [],
434
665
  });
435
- Object.setPrototypeOf(this, _QueryTimeoutException.prototype);
436
- this.Message = opts.Message;
437
- }
438
666
  };
439
- var ExecuteStatementException = class _ExecuteStatementException extends RedshiftDataServiceException {
440
- static {
441
- __name(this, "ExecuteStatementException");
442
- }
443
- name = "ExecuteStatementException";
444
- $fault = "server";
445
- /**
446
- * <p>The exception message.</p>
447
- * @public
448
- */
449
- Message;
450
- /**
451
- * <p>Statement identifier of the exception.</p>
452
- * @public
453
- */
454
- StatementId;
455
- /**
456
- * @internal
457
- */
458
- constructor(opts) {
459
- super({
460
- name: "ExecuteStatementException",
461
- $fault: "server",
462
- ...opts
667
+ const de_BatchExecuteStatementOutput = (output, context) => {
668
+ return smithyClient.take(output, {
669
+ ClusterIdentifier: smithyClient.expectString,
670
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
671
+ Database: smithyClient.expectString,
672
+ DbGroups: smithyClient._json,
673
+ DbUser: smithyClient.expectString,
674
+ Id: smithyClient.expectString,
675
+ SecretArn: smithyClient.expectString,
676
+ SessionId: smithyClient.expectString,
677
+ WorkgroupName: smithyClient.expectString,
463
678
  });
464
- Object.setPrototypeOf(this, _ExecuteStatementException.prototype);
465
- this.Message = opts.Message;
466
- this.StatementId = opts.StatementId;
467
- }
468
679
  };
469
- var Field;
470
- ((Field3) => {
471
- Field3.visit = /* @__PURE__ */ __name((value, visitor) => {
472
- if (value.isNull !== void 0) return visitor.isNull(value.isNull);
473
- if (value.booleanValue !== void 0) return visitor.booleanValue(value.booleanValue);
474
- if (value.longValue !== void 0) return visitor.longValue(value.longValue);
475
- if (value.doubleValue !== void 0) return visitor.doubleValue(value.doubleValue);
476
- if (value.stringValue !== void 0) return visitor.stringValue(value.stringValue);
477
- if (value.blobValue !== void 0) return visitor.blobValue(value.blobValue);
478
- return visitor._(value.$unknown[0], value.$unknown[1]);
479
- }, "visit");
480
- })(Field || (Field = {}));
481
- var QueryRecords;
482
- ((QueryRecords2) => {
483
- QueryRecords2.visit = /* @__PURE__ */ __name((value, visitor) => {
484
- if (value.CSVRecords !== void 0) return visitor.CSVRecords(value.CSVRecords);
485
- return visitor._(value.$unknown[0], value.$unknown[1]);
486
- }, "visit");
487
- })(QueryRecords || (QueryRecords = {}));
488
-
489
- // src/protocols/Aws_json1_1.ts
490
- var se_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
491
- const headers = sharedHeaders("BatchExecuteStatement");
492
- let body;
493
- body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
494
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
495
- }, "se_BatchExecuteStatementCommand");
496
- var se_CancelStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
497
- const headers = sharedHeaders("CancelStatement");
498
- let body;
499
- body = JSON.stringify((0, import_smithy_client._json)(input));
500
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
501
- }, "se_CancelStatementCommand");
502
- var se_DescribeStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
503
- const headers = sharedHeaders("DescribeStatement");
504
- let body;
505
- body = JSON.stringify((0, import_smithy_client._json)(input));
506
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
507
- }, "se_DescribeStatementCommand");
508
- var se_DescribeTableCommand = /* @__PURE__ */ __name(async (input, context) => {
509
- const headers = sharedHeaders("DescribeTable");
510
- let body;
511
- body = JSON.stringify((0, import_smithy_client._json)(input));
512
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
513
- }, "se_DescribeTableCommand");
514
- var se_ExecuteStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
515
- const headers = sharedHeaders("ExecuteStatement");
516
- let body;
517
- body = JSON.stringify(se_ExecuteStatementInput(input, context));
518
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
519
- }, "se_ExecuteStatementCommand");
520
- var se_GetStatementResultCommand = /* @__PURE__ */ __name(async (input, context) => {
521
- const headers = sharedHeaders("GetStatementResult");
522
- let body;
523
- body = JSON.stringify((0, import_smithy_client._json)(input));
524
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
525
- }, "se_GetStatementResultCommand");
526
- var se_GetStatementResultV2Command = /* @__PURE__ */ __name(async (input, context) => {
527
- const headers = sharedHeaders("GetStatementResultV2");
528
- let body;
529
- body = JSON.stringify((0, import_smithy_client._json)(input));
530
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
531
- }, "se_GetStatementResultV2Command");
532
- var se_ListDatabasesCommand = /* @__PURE__ */ __name(async (input, context) => {
533
- const headers = sharedHeaders("ListDatabases");
534
- let body;
535
- body = JSON.stringify((0, import_smithy_client._json)(input));
536
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
537
- }, "se_ListDatabasesCommand");
538
- var se_ListSchemasCommand = /* @__PURE__ */ __name(async (input, context) => {
539
- const headers = sharedHeaders("ListSchemas");
540
- let body;
541
- body = JSON.stringify((0, import_smithy_client._json)(input));
542
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
543
- }, "se_ListSchemasCommand");
544
- var se_ListStatementsCommand = /* @__PURE__ */ __name(async (input, context) => {
545
- const headers = sharedHeaders("ListStatements");
546
- let body;
547
- body = JSON.stringify((0, import_smithy_client._json)(input));
548
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
549
- }, "se_ListStatementsCommand");
550
- var se_ListTablesCommand = /* @__PURE__ */ __name(async (input, context) => {
551
- const headers = sharedHeaders("ListTables");
552
- let body;
553
- body = JSON.stringify((0, import_smithy_client._json)(input));
554
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
555
- }, "se_ListTablesCommand");
556
- var de_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
557
- if (output.statusCode >= 300) {
558
- return de_CommandError(output, context);
559
- }
560
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
561
- let contents = {};
562
- contents = de_BatchExecuteStatementOutput(data, context);
563
- const response = {
564
- $metadata: deserializeMetadata(output),
565
- ...contents
566
- };
567
- return response;
568
- }, "de_BatchExecuteStatementCommand");
569
- var de_CancelStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
570
- if (output.statusCode >= 300) {
571
- return de_CommandError(output, context);
572
- }
573
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
574
- let contents = {};
575
- contents = (0, import_smithy_client._json)(data);
576
- const response = {
577
- $metadata: deserializeMetadata(output),
578
- ...contents
579
- };
580
- return response;
581
- }, "de_CancelStatementCommand");
582
- var de_DescribeStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
583
- if (output.statusCode >= 300) {
584
- return de_CommandError(output, context);
585
- }
586
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
587
- let contents = {};
588
- contents = de_DescribeStatementResponse(data, context);
589
- const response = {
590
- $metadata: deserializeMetadata(output),
591
- ...contents
592
- };
593
- return response;
594
- }, "de_DescribeStatementCommand");
595
- var de_DescribeTableCommand = /* @__PURE__ */ __name(async (output, context) => {
596
- if (output.statusCode >= 300) {
597
- return de_CommandError(output, context);
598
- }
599
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
600
- let contents = {};
601
- contents = (0, import_smithy_client._json)(data);
602
- const response = {
603
- $metadata: deserializeMetadata(output),
604
- ...contents
605
- };
606
- return response;
607
- }, "de_DescribeTableCommand");
608
- var de_ExecuteStatementCommand = /* @__PURE__ */ __name(async (output, context) => {
609
- if (output.statusCode >= 300) {
610
- return de_CommandError(output, context);
611
- }
612
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
613
- let contents = {};
614
- contents = de_ExecuteStatementOutput(data, context);
615
- const response = {
616
- $metadata: deserializeMetadata(output),
617
- ...contents
618
- };
619
- return response;
620
- }, "de_ExecuteStatementCommand");
621
- var de_GetStatementResultCommand = /* @__PURE__ */ __name(async (output, context) => {
622
- if (output.statusCode >= 300) {
623
- return de_CommandError(output, context);
624
- }
625
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
626
- let contents = {};
627
- contents = de_GetStatementResultResponse(data, context);
628
- const response = {
629
- $metadata: deserializeMetadata(output),
630
- ...contents
631
- };
632
- return response;
633
- }, "de_GetStatementResultCommand");
634
- var de_GetStatementResultV2Command = /* @__PURE__ */ __name(async (output, context) => {
635
- if (output.statusCode >= 300) {
636
- return de_CommandError(output, context);
637
- }
638
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
639
- let contents = {};
640
- contents = (0, import_smithy_client._json)(data);
641
- const response = {
642
- $metadata: deserializeMetadata(output),
643
- ...contents
644
- };
645
- return response;
646
- }, "de_GetStatementResultV2Command");
647
- var de_ListDatabasesCommand = /* @__PURE__ */ __name(async (output, context) => {
648
- if (output.statusCode >= 300) {
649
- return de_CommandError(output, context);
650
- }
651
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
652
- let contents = {};
653
- contents = (0, import_smithy_client._json)(data);
654
- const response = {
655
- $metadata: deserializeMetadata(output),
656
- ...contents
657
- };
658
- return response;
659
- }, "de_ListDatabasesCommand");
660
- var de_ListSchemasCommand = /* @__PURE__ */ __name(async (output, context) => {
661
- if (output.statusCode >= 300) {
662
- return de_CommandError(output, context);
663
- }
664
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
665
- let contents = {};
666
- contents = (0, import_smithy_client._json)(data);
667
- const response = {
668
- $metadata: deserializeMetadata(output),
669
- ...contents
670
- };
671
- return response;
672
- }, "de_ListSchemasCommand");
673
- var de_ListStatementsCommand = /* @__PURE__ */ __name(async (output, context) => {
674
- if (output.statusCode >= 300) {
675
- return de_CommandError(output, context);
676
- }
677
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
678
- let contents = {};
679
- contents = de_ListStatementsResponse(data, context);
680
- const response = {
681
- $metadata: deserializeMetadata(output),
682
- ...contents
683
- };
684
- return response;
685
- }, "de_ListStatementsCommand");
686
- var de_ListTablesCommand = /* @__PURE__ */ __name(async (output, context) => {
687
- if (output.statusCode >= 300) {
688
- return de_CommandError(output, context);
689
- }
690
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
691
- let contents = {};
692
- contents = (0, import_smithy_client._json)(data);
693
- const response = {
694
- $metadata: deserializeMetadata(output),
695
- ...contents
696
- };
697
- return response;
698
- }, "de_ListTablesCommand");
699
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
700
- const parsedOutput = {
701
- ...output,
702
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
703
- };
704
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
705
- switch (errorCode) {
706
- case "ActiveSessionsExceededException":
707
- case "com.amazonaws.redshiftdata#ActiveSessionsExceededException":
708
- throw await de_ActiveSessionsExceededExceptionRes(parsedOutput, context);
709
- case "ActiveStatementsExceededException":
710
- case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
711
- throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
712
- case "BatchExecuteStatementException":
713
- case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
714
- throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
715
- case "InternalServerException":
716
- case "com.amazonaws.redshiftdata#InternalServerException":
717
- throw await de_InternalServerExceptionRes(parsedOutput, context);
718
- case "ValidationException":
719
- case "com.amazonaws.redshiftdata#ValidationException":
720
- throw await de_ValidationExceptionRes(parsedOutput, context);
721
- case "DatabaseConnectionException":
722
- case "com.amazonaws.redshiftdata#DatabaseConnectionException":
723
- throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
724
- case "ResourceNotFoundException":
725
- case "com.amazonaws.redshiftdata#ResourceNotFoundException":
726
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
727
- case "QueryTimeoutException":
728
- case "com.amazonaws.redshiftdata#QueryTimeoutException":
729
- throw await de_QueryTimeoutExceptionRes(parsedOutput, context);
730
- case "ExecuteStatementException":
731
- case "com.amazonaws.redshiftdata#ExecuteStatementException":
732
- throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
733
- default:
734
- const parsedBody = parsedOutput.body;
735
- return throwDefaultError({
736
- output,
737
- parsedBody,
738
- errorCode
739
- });
740
- }
741
- }, "de_CommandError");
742
- var de_ActiveSessionsExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
743
- const body = parsedOutput.body;
744
- const deserialized = (0, import_smithy_client._json)(body);
745
- const exception = new ActiveSessionsExceededException({
746
- $metadata: deserializeMetadata(parsedOutput),
747
- ...deserialized
748
- });
749
- return (0, import_smithy_client.decorateServiceException)(exception, body);
750
- }, "de_ActiveSessionsExceededExceptionRes");
751
- var de_ActiveStatementsExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
752
- const body = parsedOutput.body;
753
- const deserialized = (0, import_smithy_client._json)(body);
754
- const exception = new ActiveStatementsExceededException({
755
- $metadata: deserializeMetadata(parsedOutput),
756
- ...deserialized
757
- });
758
- return (0, import_smithy_client.decorateServiceException)(exception, body);
759
- }, "de_ActiveStatementsExceededExceptionRes");
760
- var de_BatchExecuteStatementExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
761
- const body = parsedOutput.body;
762
- const deserialized = (0, import_smithy_client._json)(body);
763
- const exception = new BatchExecuteStatementException({
764
- $metadata: deserializeMetadata(parsedOutput),
765
- ...deserialized
766
- });
767
- return (0, import_smithy_client.decorateServiceException)(exception, body);
768
- }, "de_BatchExecuteStatementExceptionRes");
769
- var de_DatabaseConnectionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
770
- const body = parsedOutput.body;
771
- const deserialized = (0, import_smithy_client._json)(body);
772
- const exception = new DatabaseConnectionException({
773
- $metadata: deserializeMetadata(parsedOutput),
774
- ...deserialized
775
- });
776
- return (0, import_smithy_client.decorateServiceException)(exception, body);
777
- }, "de_DatabaseConnectionExceptionRes");
778
- var de_ExecuteStatementExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
779
- const body = parsedOutput.body;
780
- const deserialized = (0, import_smithy_client._json)(body);
781
- const exception = new ExecuteStatementException({
782
- $metadata: deserializeMetadata(parsedOutput),
783
- ...deserialized
784
- });
785
- return (0, import_smithy_client.decorateServiceException)(exception, body);
786
- }, "de_ExecuteStatementExceptionRes");
787
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
788
- const body = parsedOutput.body;
789
- const deserialized = (0, import_smithy_client._json)(body);
790
- const exception = new InternalServerException({
791
- $metadata: deserializeMetadata(parsedOutput),
792
- ...deserialized
793
- });
794
- return (0, import_smithy_client.decorateServiceException)(exception, body);
795
- }, "de_InternalServerExceptionRes");
796
- var de_QueryTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
797
- const body = parsedOutput.body;
798
- const deserialized = (0, import_smithy_client._json)(body);
799
- const exception = new QueryTimeoutException({
800
- $metadata: deserializeMetadata(parsedOutput),
801
- ...deserialized
802
- });
803
- return (0, import_smithy_client.decorateServiceException)(exception, body);
804
- }, "de_QueryTimeoutExceptionRes");
805
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
806
- const body = parsedOutput.body;
807
- const deserialized = (0, import_smithy_client._json)(body);
808
- const exception = new ResourceNotFoundException({
809
- $metadata: deserializeMetadata(parsedOutput),
810
- ...deserialized
811
- });
812
- return (0, import_smithy_client.decorateServiceException)(exception, body);
813
- }, "de_ResourceNotFoundExceptionRes");
814
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
815
- const body = parsedOutput.body;
816
- const deserialized = (0, import_smithy_client._json)(body);
817
- const exception = new ValidationException({
818
- $metadata: deserializeMetadata(parsedOutput),
819
- ...deserialized
820
- });
821
- return (0, import_smithy_client.decorateServiceException)(exception, body);
822
- }, "de_ValidationExceptionRes");
823
- var se_BatchExecuteStatementInput = /* @__PURE__ */ __name((input, context) => {
824
- return (0, import_smithy_client.take)(input, {
825
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
826
- ClusterIdentifier: [],
827
- Database: [],
828
- DbUser: [],
829
- ResultFormat: [],
830
- SecretArn: [],
831
- SessionId: [],
832
- SessionKeepAliveSeconds: [],
833
- Sqls: import_smithy_client._json,
834
- StatementName: [],
835
- WithEvent: [],
836
- WorkgroupName: []
837
- });
838
- }, "se_BatchExecuteStatementInput");
839
- var se_ExecuteStatementInput = /* @__PURE__ */ __name((input, context) => {
840
- return (0, import_smithy_client.take)(input, {
841
- ClientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
842
- ClusterIdentifier: [],
843
- Database: [],
844
- DbUser: [],
845
- Parameters: import_smithy_client._json,
846
- ResultFormat: [],
847
- SecretArn: [],
848
- SessionId: [],
849
- SessionKeepAliveSeconds: [],
850
- Sql: [],
851
- StatementName: [],
852
- WithEvent: [],
853
- WorkgroupName: []
854
- });
855
- }, "se_ExecuteStatementInput");
856
- var de_BatchExecuteStatementOutput = /* @__PURE__ */ __name((output, context) => {
857
- return (0, import_smithy_client.take)(output, {
858
- ClusterIdentifier: import_smithy_client.expectString,
859
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
860
- Database: import_smithy_client.expectString,
861
- DbGroups: import_smithy_client._json,
862
- DbUser: import_smithy_client.expectString,
863
- Id: import_smithy_client.expectString,
864
- SecretArn: import_smithy_client.expectString,
865
- SessionId: import_smithy_client.expectString,
866
- WorkgroupName: import_smithy_client.expectString
867
- });
868
- }, "de_BatchExecuteStatementOutput");
869
- var de_DescribeStatementResponse = /* @__PURE__ */ __name((output, context) => {
870
- return (0, import_smithy_client.take)(output, {
871
- ClusterIdentifier: import_smithy_client.expectString,
872
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
873
- Database: import_smithy_client.expectString,
874
- DbUser: import_smithy_client.expectString,
875
- Duration: import_smithy_client.expectLong,
876
- Error: import_smithy_client.expectString,
877
- HasResultSet: import_smithy_client.expectBoolean,
878
- Id: import_smithy_client.expectString,
879
- QueryParameters: import_smithy_client._json,
880
- QueryString: import_smithy_client.expectString,
881
- RedshiftPid: import_smithy_client.expectLong,
882
- RedshiftQueryId: import_smithy_client.expectLong,
883
- ResultFormat: import_smithy_client.expectString,
884
- ResultRows: import_smithy_client.expectLong,
885
- ResultSize: import_smithy_client.expectLong,
886
- SecretArn: import_smithy_client.expectString,
887
- SessionId: import_smithy_client.expectString,
888
- Status: import_smithy_client.expectString,
889
- SubStatements: /* @__PURE__ */ __name((_) => de_SubStatementList(_, context), "SubStatements"),
890
- UpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "UpdatedAt"),
891
- WorkgroupName: import_smithy_client.expectString
892
- });
893
- }, "de_DescribeStatementResponse");
894
- var de_ExecuteStatementOutput = /* @__PURE__ */ __name((output, context) => {
895
- return (0, import_smithy_client.take)(output, {
896
- ClusterIdentifier: import_smithy_client.expectString,
897
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
898
- Database: import_smithy_client.expectString,
899
- DbGroups: import_smithy_client._json,
900
- DbUser: import_smithy_client.expectString,
901
- Id: import_smithy_client.expectString,
902
- SecretArn: import_smithy_client.expectString,
903
- SessionId: import_smithy_client.expectString,
904
- WorkgroupName: import_smithy_client.expectString
905
- });
906
- }, "de_ExecuteStatementOutput");
907
- var de_Field = /* @__PURE__ */ __name((output, context) => {
908
- if (output.blobValue != null) {
909
- return {
910
- blobValue: context.base64Decoder(output.blobValue)
911
- };
912
- }
913
- if ((0, import_smithy_client.expectBoolean)(output.booleanValue) !== void 0) {
914
- return { booleanValue: (0, import_smithy_client.expectBoolean)(output.booleanValue) };
915
- }
916
- if ((0, import_smithy_client.limitedParseDouble)(output.doubleValue) !== void 0) {
917
- return { doubleValue: (0, import_smithy_client.limitedParseDouble)(output.doubleValue) };
918
- }
919
- if ((0, import_smithy_client.expectBoolean)(output.isNull) !== void 0) {
920
- return { isNull: (0, import_smithy_client.expectBoolean)(output.isNull) };
921
- }
922
- if ((0, import_smithy_client.expectLong)(output.longValue) !== void 0) {
923
- return { longValue: (0, import_smithy_client.expectLong)(output.longValue) };
924
- }
925
- if ((0, import_smithy_client.expectString)(output.stringValue) !== void 0) {
926
- return { stringValue: (0, import_smithy_client.expectString)(output.stringValue) };
927
- }
928
- return { $unknown: Object.entries(output)[0] };
929
- }, "de_Field");
930
- var de_FieldList = /* @__PURE__ */ __name((output, context) => {
931
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
932
- return de_Field((0, import_core2.awsExpectUnion)(entry), context);
933
- });
934
- return retVal;
935
- }, "de_FieldList");
936
- var de_GetStatementResultResponse = /* @__PURE__ */ __name((output, context) => {
937
- return (0, import_smithy_client.take)(output, {
938
- ColumnMetadata: import_smithy_client._json,
939
- NextToken: import_smithy_client.expectString,
940
- Records: /* @__PURE__ */ __name((_) => de_SqlRecords(_, context), "Records"),
941
- TotalNumRows: import_smithy_client.expectLong
942
- });
943
- }, "de_GetStatementResultResponse");
944
- var de_ListStatementsResponse = /* @__PURE__ */ __name((output, context) => {
945
- return (0, import_smithy_client.take)(output, {
946
- NextToken: import_smithy_client.expectString,
947
- Statements: /* @__PURE__ */ __name((_) => de_StatementList(_, context), "Statements")
948
- });
949
- }, "de_ListStatementsResponse");
950
- var de_SqlRecords = /* @__PURE__ */ __name((output, context) => {
951
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
952
- return de_FieldList(entry, context);
953
- });
954
- return retVal;
955
- }, "de_SqlRecords");
956
- var de_StatementData = /* @__PURE__ */ __name((output, context) => {
957
- return (0, import_smithy_client.take)(output, {
958
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
959
- Id: import_smithy_client.expectString,
960
- IsBatchStatement: import_smithy_client.expectBoolean,
961
- QueryParameters: import_smithy_client._json,
962
- QueryString: import_smithy_client.expectString,
963
- QueryStrings: import_smithy_client._json,
964
- ResultFormat: import_smithy_client.expectString,
965
- SecretArn: import_smithy_client.expectString,
966
- SessionId: import_smithy_client.expectString,
967
- StatementName: import_smithy_client.expectString,
968
- Status: import_smithy_client.expectString,
969
- UpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "UpdatedAt")
970
- });
971
- }, "de_StatementData");
972
- var de_StatementList = /* @__PURE__ */ __name((output, context) => {
973
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
974
- return de_StatementData(entry, context);
975
- });
976
- return retVal;
977
- }, "de_StatementList");
978
- var de_SubStatementData = /* @__PURE__ */ __name((output, context) => {
979
- return (0, import_smithy_client.take)(output, {
980
- CreatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedAt"),
981
- Duration: import_smithy_client.expectLong,
982
- Error: import_smithy_client.expectString,
983
- HasResultSet: import_smithy_client.expectBoolean,
984
- Id: import_smithy_client.expectString,
985
- QueryString: import_smithy_client.expectString,
986
- RedshiftQueryId: import_smithy_client.expectLong,
987
- ResultRows: import_smithy_client.expectLong,
988
- ResultSize: import_smithy_client.expectLong,
989
- Status: import_smithy_client.expectString,
990
- UpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "UpdatedAt")
991
- });
992
- }, "de_SubStatementData");
993
- var de_SubStatementList = /* @__PURE__ */ __name((output, context) => {
994
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
995
- return de_SubStatementData(entry, context);
996
- });
997
- return retVal;
998
- }, "de_SubStatementList");
999
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1000
- httpStatusCode: output.statusCode,
1001
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1002
- extendedRequestId: output.headers["x-amz-id-2"],
1003
- cfId: output.headers["x-amz-cf-id"]
1004
- }), "deserializeMetadata");
1005
- var throwDefaultError = (0, import_smithy_client.withBaseException)(RedshiftDataServiceException);
1006
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
1007
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1008
- const contents = {
1009
- protocol,
1010
- hostname,
1011
- port,
1012
- method: "POST",
1013
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1014
- headers
1015
- };
1016
- if (resolvedHostname !== void 0) {
1017
- contents.hostname = resolvedHostname;
1018
- }
1019
- if (body !== void 0) {
1020
- contents.body = body;
1021
- }
1022
- return new import_protocol_http.HttpRequest(contents);
1023
- }, "buildHttpRpcRequest");
1024
- function sharedHeaders(operation) {
1025
- return {
1026
- "content-type": "application/x-amz-json-1.1",
1027
- "x-amz-target": `RedshiftData.${operation}`
1028
- };
1029
- }
1030
- __name(sharedHeaders, "sharedHeaders");
1031
-
1032
- // src/commands/BatchExecuteStatementCommand.ts
1033
- var BatchExecuteStatementCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1034
- return [
1035
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1036
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1037
- ];
1038
- }).s("RedshiftData", "BatchExecuteStatement", {}).n("RedshiftDataClient", "BatchExecuteStatementCommand").f(void 0, void 0).ser(se_BatchExecuteStatementCommand).de(de_BatchExecuteStatementCommand).build() {
1039
- static {
1040
- __name(this, "BatchExecuteStatementCommand");
1041
- }
680
+ const de_DescribeStatementResponse = (output, context) => {
681
+ return smithyClient.take(output, {
682
+ ClusterIdentifier: smithyClient.expectString,
683
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
684
+ Database: smithyClient.expectString,
685
+ DbUser: smithyClient.expectString,
686
+ Duration: smithyClient.expectLong,
687
+ Error: smithyClient.expectString,
688
+ HasResultSet: smithyClient.expectBoolean,
689
+ Id: smithyClient.expectString,
690
+ QueryParameters: smithyClient._json,
691
+ QueryString: smithyClient.expectString,
692
+ RedshiftPid: smithyClient.expectLong,
693
+ RedshiftQueryId: smithyClient.expectLong,
694
+ ResultFormat: smithyClient.expectString,
695
+ ResultRows: smithyClient.expectLong,
696
+ ResultSize: smithyClient.expectLong,
697
+ SecretArn: smithyClient.expectString,
698
+ SessionId: smithyClient.expectString,
699
+ Status: smithyClient.expectString,
700
+ SubStatements: (_) => de_SubStatementList(_),
701
+ UpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
702
+ WorkgroupName: smithyClient.expectString,
703
+ });
1042
704
  };
1043
-
1044
- // src/commands/CancelStatementCommand.ts
1045
-
1046
-
1047
-
1048
- var CancelStatementCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1049
- return [
1050
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1051
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1052
- ];
1053
- }).s("RedshiftData", "CancelStatement", {}).n("RedshiftDataClient", "CancelStatementCommand").f(void 0, void 0).ser(se_CancelStatementCommand).de(de_CancelStatementCommand).build() {
1054
- static {
1055
- __name(this, "CancelStatementCommand");
1056
- }
705
+ const de_ExecuteStatementOutput = (output, context) => {
706
+ return smithyClient.take(output, {
707
+ ClusterIdentifier: smithyClient.expectString,
708
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
709
+ Database: smithyClient.expectString,
710
+ DbGroups: smithyClient._json,
711
+ DbUser: smithyClient.expectString,
712
+ Id: smithyClient.expectString,
713
+ SecretArn: smithyClient.expectString,
714
+ SessionId: smithyClient.expectString,
715
+ WorkgroupName: smithyClient.expectString,
716
+ });
1057
717
  };
1058
-
1059
- // src/commands/DescribeStatementCommand.ts
1060
-
1061
-
1062
-
1063
- var DescribeStatementCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1064
- return [
1065
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1066
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1067
- ];
1068
- }).s("RedshiftData", "DescribeStatement", {}).n("RedshiftDataClient", "DescribeStatementCommand").f(void 0, void 0).ser(se_DescribeStatementCommand).de(de_DescribeStatementCommand).build() {
1069
- static {
1070
- __name(this, "DescribeStatementCommand");
1071
- }
718
+ const de_Field = (output, context) => {
719
+ if (output.blobValue != null) {
720
+ return {
721
+ blobValue: context.base64Decoder(output.blobValue),
722
+ };
723
+ }
724
+ if (smithyClient.expectBoolean(output.booleanValue) !== undefined) {
725
+ return { booleanValue: smithyClient.expectBoolean(output.booleanValue) };
726
+ }
727
+ if (smithyClient.limitedParseDouble(output.doubleValue) !== undefined) {
728
+ return { doubleValue: smithyClient.limitedParseDouble(output.doubleValue) };
729
+ }
730
+ if (smithyClient.expectBoolean(output.isNull) !== undefined) {
731
+ return { isNull: smithyClient.expectBoolean(output.isNull) };
732
+ }
733
+ if (smithyClient.expectLong(output.longValue) !== undefined) {
734
+ return { longValue: smithyClient.expectLong(output.longValue) };
735
+ }
736
+ if (smithyClient.expectString(output.stringValue) !== undefined) {
737
+ return { stringValue: smithyClient.expectString(output.stringValue) };
738
+ }
739
+ return { $unknown: Object.entries(output)[0] };
1072
740
  };
1073
-
1074
- // src/commands/DescribeTableCommand.ts
1075
-
1076
-
1077
-
1078
- var DescribeTableCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1079
- return [
1080
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1081
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1082
- ];
1083
- }).s("RedshiftData", "DescribeTable", {}).n("RedshiftDataClient", "DescribeTableCommand").f(void 0, void 0).ser(se_DescribeTableCommand).de(de_DescribeTableCommand).build() {
1084
- static {
1085
- __name(this, "DescribeTableCommand");
1086
- }
741
+ const de_FieldList = (output, context) => {
742
+ const retVal = (output || [])
743
+ .filter((e) => e != null)
744
+ .map((entry) => {
745
+ return de_Field(core$1.awsExpectUnion(entry), context);
746
+ });
747
+ return retVal;
1087
748
  };
1088
-
1089
- // src/commands/ExecuteStatementCommand.ts
1090
-
1091
-
1092
-
1093
- var ExecuteStatementCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1094
- return [
1095
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1096
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1097
- ];
1098
- }).s("RedshiftData", "ExecuteStatement", {}).n("RedshiftDataClient", "ExecuteStatementCommand").f(void 0, void 0).ser(se_ExecuteStatementCommand).de(de_ExecuteStatementCommand).build() {
1099
- static {
1100
- __name(this, "ExecuteStatementCommand");
1101
- }
749
+ const de_GetStatementResultResponse = (output, context) => {
750
+ return smithyClient.take(output, {
751
+ ColumnMetadata: smithyClient._json,
752
+ NextToken: smithyClient.expectString,
753
+ Records: (_) => de_SqlRecords(_, context),
754
+ TotalNumRows: smithyClient.expectLong,
755
+ });
1102
756
  };
1103
-
1104
- // src/commands/GetStatementResultCommand.ts
1105
-
1106
-
1107
-
1108
- var GetStatementResultCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1109
- return [
1110
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1111
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1112
- ];
1113
- }).s("RedshiftData", "GetStatementResult", {}).n("RedshiftDataClient", "GetStatementResultCommand").f(void 0, void 0).ser(se_GetStatementResultCommand).de(de_GetStatementResultCommand).build() {
1114
- static {
1115
- __name(this, "GetStatementResultCommand");
1116
- }
757
+ const de_ListStatementsResponse = (output, context) => {
758
+ return smithyClient.take(output, {
759
+ NextToken: smithyClient.expectString,
760
+ Statements: (_) => de_StatementList(_),
761
+ });
1117
762
  };
1118
-
1119
- // src/commands/GetStatementResultV2Command.ts
1120
-
1121
-
1122
-
1123
- var GetStatementResultV2Command = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1124
- return [
1125
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1126
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1127
- ];
1128
- }).s("RedshiftData", "GetStatementResultV2", {}).n("RedshiftDataClient", "GetStatementResultV2Command").f(void 0, void 0).ser(se_GetStatementResultV2Command).de(de_GetStatementResultV2Command).build() {
1129
- static {
1130
- __name(this, "GetStatementResultV2Command");
1131
- }
763
+ const de_SqlRecords = (output, context) => {
764
+ const retVal = (output || [])
765
+ .filter((e) => e != null)
766
+ .map((entry) => {
767
+ return de_FieldList(entry, context);
768
+ });
769
+ return retVal;
1132
770
  };
1133
-
1134
- // src/commands/ListDatabasesCommand.ts
1135
-
1136
-
1137
-
1138
- var ListDatabasesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1139
- return [
1140
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1141
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1142
- ];
1143
- }).s("RedshiftData", "ListDatabases", {}).n("RedshiftDataClient", "ListDatabasesCommand").f(void 0, void 0).ser(se_ListDatabasesCommand).de(de_ListDatabasesCommand).build() {
1144
- static {
1145
- __name(this, "ListDatabasesCommand");
1146
- }
771
+ const de_StatementData = (output, context) => {
772
+ return smithyClient.take(output, {
773
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
774
+ Id: smithyClient.expectString,
775
+ IsBatchStatement: smithyClient.expectBoolean,
776
+ QueryParameters: smithyClient._json,
777
+ QueryString: smithyClient.expectString,
778
+ QueryStrings: smithyClient._json,
779
+ ResultFormat: smithyClient.expectString,
780
+ SecretArn: smithyClient.expectString,
781
+ SessionId: smithyClient.expectString,
782
+ StatementName: smithyClient.expectString,
783
+ Status: smithyClient.expectString,
784
+ UpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
785
+ });
1147
786
  };
1148
-
1149
- // src/commands/ListSchemasCommand.ts
1150
-
1151
-
1152
-
1153
- var ListSchemasCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1154
- return [
1155
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1156
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1157
- ];
1158
- }).s("RedshiftData", "ListSchemas", {}).n("RedshiftDataClient", "ListSchemasCommand").f(void 0, void 0).ser(se_ListSchemasCommand).de(de_ListSchemasCommand).build() {
1159
- static {
1160
- __name(this, "ListSchemasCommand");
1161
- }
787
+ const de_StatementList = (output, context) => {
788
+ const retVal = (output || [])
789
+ .filter((e) => e != null)
790
+ .map((entry) => {
791
+ return de_StatementData(entry);
792
+ });
793
+ return retVal;
1162
794
  };
1163
-
1164
- // src/commands/ListStatementsCommand.ts
1165
-
1166
-
1167
-
1168
- var ListStatementsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1169
- return [
1170
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1171
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1172
- ];
1173
- }).s("RedshiftData", "ListStatements", {}).n("RedshiftDataClient", "ListStatementsCommand").f(void 0, void 0).ser(se_ListStatementsCommand).de(de_ListStatementsCommand).build() {
1174
- static {
1175
- __name(this, "ListStatementsCommand");
1176
- }
795
+ const de_SubStatementData = (output, context) => {
796
+ return smithyClient.take(output, {
797
+ CreatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
798
+ Duration: smithyClient.expectLong,
799
+ Error: smithyClient.expectString,
800
+ HasResultSet: smithyClient.expectBoolean,
801
+ Id: smithyClient.expectString,
802
+ QueryString: smithyClient.expectString,
803
+ RedshiftQueryId: smithyClient.expectLong,
804
+ ResultRows: smithyClient.expectLong,
805
+ ResultSize: smithyClient.expectLong,
806
+ Status: smithyClient.expectString,
807
+ UpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
808
+ });
809
+ };
810
+ const de_SubStatementList = (output, context) => {
811
+ const retVal = (output || [])
812
+ .filter((e) => e != null)
813
+ .map((entry) => {
814
+ return de_SubStatementData(entry);
815
+ });
816
+ return retVal;
817
+ };
818
+ const deserializeMetadata = (output) => ({
819
+ httpStatusCode: output.statusCode,
820
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
821
+ extendedRequestId: output.headers["x-amz-id-2"],
822
+ cfId: output.headers["x-amz-cf-id"],
823
+ });
824
+ const throwDefaultError = smithyClient.withBaseException(RedshiftDataServiceException);
825
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
826
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
827
+ const contents = {
828
+ protocol,
829
+ hostname,
830
+ port,
831
+ method: "POST",
832
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
833
+ headers,
834
+ };
835
+ if (body !== undefined) {
836
+ contents.body = body;
837
+ }
838
+ return new protocolHttp.HttpRequest(contents);
1177
839
  };
840
+ function sharedHeaders(operation) {
841
+ return {
842
+ "content-type": "application/x-amz-json-1.1",
843
+ "x-amz-target": `RedshiftData.${operation}`,
844
+ };
845
+ }
1178
846
 
1179
- // src/commands/ListTablesCommand.ts
847
+ class BatchExecuteStatementCommand extends smithyClient.Command
848
+ .classBuilder()
849
+ .ep(commonParams)
850
+ .m(function (Command, cs, config, o) {
851
+ return [
852
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
853
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
854
+ ];
855
+ })
856
+ .s("RedshiftData", "BatchExecuteStatement", {})
857
+ .n("RedshiftDataClient", "BatchExecuteStatementCommand")
858
+ .f(void 0, void 0)
859
+ .ser(se_BatchExecuteStatementCommand)
860
+ .de(de_BatchExecuteStatementCommand)
861
+ .build() {
862
+ }
1180
863
 
864
+ class CancelStatementCommand extends smithyClient.Command
865
+ .classBuilder()
866
+ .ep(commonParams)
867
+ .m(function (Command, cs, config, o) {
868
+ return [
869
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
870
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
871
+ ];
872
+ })
873
+ .s("RedshiftData", "CancelStatement", {})
874
+ .n("RedshiftDataClient", "CancelStatementCommand")
875
+ .f(void 0, void 0)
876
+ .ser(se_CancelStatementCommand)
877
+ .de(de_CancelStatementCommand)
878
+ .build() {
879
+ }
1181
880
 
881
+ class DescribeStatementCommand extends smithyClient.Command
882
+ .classBuilder()
883
+ .ep(commonParams)
884
+ .m(function (Command, cs, config, o) {
885
+ return [
886
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
887
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
888
+ ];
889
+ })
890
+ .s("RedshiftData", "DescribeStatement", {})
891
+ .n("RedshiftDataClient", "DescribeStatementCommand")
892
+ .f(void 0, void 0)
893
+ .ser(se_DescribeStatementCommand)
894
+ .de(de_DescribeStatementCommand)
895
+ .build() {
896
+ }
1182
897
 
1183
- var ListTablesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1184
- return [
1185
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1186
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1187
- ];
1188
- }).s("RedshiftData", "ListTables", {}).n("RedshiftDataClient", "ListTablesCommand").f(void 0, void 0).ser(se_ListTablesCommand).de(de_ListTablesCommand).build() {
1189
- static {
1190
- __name(this, "ListTablesCommand");
1191
- }
1192
- };
898
+ class DescribeTableCommand extends smithyClient.Command
899
+ .classBuilder()
900
+ .ep(commonParams)
901
+ .m(function (Command, cs, config, o) {
902
+ return [
903
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
904
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
905
+ ];
906
+ })
907
+ .s("RedshiftData", "DescribeTable", {})
908
+ .n("RedshiftDataClient", "DescribeTableCommand")
909
+ .f(void 0, void 0)
910
+ .ser(se_DescribeTableCommand)
911
+ .de(de_DescribeTableCommand)
912
+ .build() {
913
+ }
1193
914
 
1194
- // src/RedshiftData.ts
1195
- var commands = {
1196
- BatchExecuteStatementCommand,
1197
- CancelStatementCommand,
1198
- DescribeStatementCommand,
1199
- DescribeTableCommand,
1200
- ExecuteStatementCommand,
1201
- GetStatementResultCommand,
1202
- GetStatementResultV2Command,
1203
- ListDatabasesCommand,
1204
- ListSchemasCommand,
1205
- ListStatementsCommand,
1206
- ListTablesCommand
1207
- };
1208
- var RedshiftData = class extends RedshiftDataClient {
1209
- static {
1210
- __name(this, "RedshiftData");
1211
- }
1212
- };
1213
- (0, import_smithy_client.createAggregatedClient)(commands, RedshiftData);
915
+ class ExecuteStatementCommand extends smithyClient.Command
916
+ .classBuilder()
917
+ .ep(commonParams)
918
+ .m(function (Command, cs, config, o) {
919
+ return [
920
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
921
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
922
+ ];
923
+ })
924
+ .s("RedshiftData", "ExecuteStatement", {})
925
+ .n("RedshiftDataClient", "ExecuteStatementCommand")
926
+ .f(void 0, void 0)
927
+ .ser(se_ExecuteStatementCommand)
928
+ .de(de_ExecuteStatementCommand)
929
+ .build() {
930
+ }
1214
931
 
1215
- // src/pagination/DescribeTablePaginator.ts
932
+ class GetStatementResultCommand extends smithyClient.Command
933
+ .classBuilder()
934
+ .ep(commonParams)
935
+ .m(function (Command, cs, config, o) {
936
+ return [
937
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
938
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
939
+ ];
940
+ })
941
+ .s("RedshiftData", "GetStatementResult", {})
942
+ .n("RedshiftDataClient", "GetStatementResultCommand")
943
+ .f(void 0, void 0)
944
+ .ser(se_GetStatementResultCommand)
945
+ .de(de_GetStatementResultCommand)
946
+ .build() {
947
+ }
1216
948
 
1217
- var paginateDescribeTable = (0, import_core.createPaginator)(RedshiftDataClient, DescribeTableCommand, "NextToken", "NextToken", "MaxResults");
949
+ class GetStatementResultV2Command extends smithyClient.Command
950
+ .classBuilder()
951
+ .ep(commonParams)
952
+ .m(function (Command, cs, config, o) {
953
+ return [
954
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
955
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
956
+ ];
957
+ })
958
+ .s("RedshiftData", "GetStatementResultV2", {})
959
+ .n("RedshiftDataClient", "GetStatementResultV2Command")
960
+ .f(void 0, void 0)
961
+ .ser(se_GetStatementResultV2Command)
962
+ .de(de_GetStatementResultV2Command)
963
+ .build() {
964
+ }
1218
965
 
1219
- // src/pagination/GetStatementResultPaginator.ts
966
+ class ListDatabasesCommand extends smithyClient.Command
967
+ .classBuilder()
968
+ .ep(commonParams)
969
+ .m(function (Command, cs, config, o) {
970
+ return [
971
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
972
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
973
+ ];
974
+ })
975
+ .s("RedshiftData", "ListDatabases", {})
976
+ .n("RedshiftDataClient", "ListDatabasesCommand")
977
+ .f(void 0, void 0)
978
+ .ser(se_ListDatabasesCommand)
979
+ .de(de_ListDatabasesCommand)
980
+ .build() {
981
+ }
1220
982
 
1221
- var paginateGetStatementResult = (0, import_core.createPaginator)(RedshiftDataClient, GetStatementResultCommand, "NextToken", "NextToken", "");
983
+ class ListSchemasCommand extends smithyClient.Command
984
+ .classBuilder()
985
+ .ep(commonParams)
986
+ .m(function (Command, cs, config, o) {
987
+ return [
988
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
989
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
990
+ ];
991
+ })
992
+ .s("RedshiftData", "ListSchemas", {})
993
+ .n("RedshiftDataClient", "ListSchemasCommand")
994
+ .f(void 0, void 0)
995
+ .ser(se_ListSchemasCommand)
996
+ .de(de_ListSchemasCommand)
997
+ .build() {
998
+ }
1222
999
 
1223
- // src/pagination/GetStatementResultV2Paginator.ts
1000
+ class ListStatementsCommand extends smithyClient.Command
1001
+ .classBuilder()
1002
+ .ep(commonParams)
1003
+ .m(function (Command, cs, config, o) {
1004
+ return [
1005
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1006
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1007
+ ];
1008
+ })
1009
+ .s("RedshiftData", "ListStatements", {})
1010
+ .n("RedshiftDataClient", "ListStatementsCommand")
1011
+ .f(void 0, void 0)
1012
+ .ser(se_ListStatementsCommand)
1013
+ .de(de_ListStatementsCommand)
1014
+ .build() {
1015
+ }
1224
1016
 
1225
- var paginateGetStatementResultV2 = (0, import_core.createPaginator)(RedshiftDataClient, GetStatementResultV2Command, "NextToken", "NextToken", "");
1017
+ class ListTablesCommand extends smithyClient.Command
1018
+ .classBuilder()
1019
+ .ep(commonParams)
1020
+ .m(function (Command, cs, config, o) {
1021
+ return [
1022
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1023
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1024
+ ];
1025
+ })
1026
+ .s("RedshiftData", "ListTables", {})
1027
+ .n("RedshiftDataClient", "ListTablesCommand")
1028
+ .f(void 0, void 0)
1029
+ .ser(se_ListTablesCommand)
1030
+ .de(de_ListTablesCommand)
1031
+ .build() {
1032
+ }
1226
1033
 
1227
- // src/pagination/ListDatabasesPaginator.ts
1034
+ const commands = {
1035
+ BatchExecuteStatementCommand,
1036
+ CancelStatementCommand,
1037
+ DescribeStatementCommand,
1038
+ DescribeTableCommand,
1039
+ ExecuteStatementCommand,
1040
+ GetStatementResultCommand,
1041
+ GetStatementResultV2Command,
1042
+ ListDatabasesCommand,
1043
+ ListSchemasCommand,
1044
+ ListStatementsCommand,
1045
+ ListTablesCommand,
1046
+ };
1047
+ class RedshiftData extends RedshiftDataClient {
1048
+ }
1049
+ smithyClient.createAggregatedClient(commands, RedshiftData);
1228
1050
 
1229
- var paginateListDatabases = (0, import_core.createPaginator)(RedshiftDataClient, ListDatabasesCommand, "NextToken", "NextToken", "MaxResults");
1051
+ const paginateDescribeTable = core.createPaginator(RedshiftDataClient, DescribeTableCommand, "NextToken", "NextToken", "MaxResults");
1230
1052
 
1231
- // src/pagination/ListSchemasPaginator.ts
1053
+ const paginateGetStatementResult = core.createPaginator(RedshiftDataClient, GetStatementResultCommand, "NextToken", "NextToken", "");
1232
1054
 
1233
- var paginateListSchemas = (0, import_core.createPaginator)(RedshiftDataClient, ListSchemasCommand, "NextToken", "NextToken", "MaxResults");
1055
+ const paginateGetStatementResultV2 = core.createPaginator(RedshiftDataClient, GetStatementResultV2Command, "NextToken", "NextToken", "");
1234
1056
 
1235
- // src/pagination/ListStatementsPaginator.ts
1057
+ const paginateListDatabases = core.createPaginator(RedshiftDataClient, ListDatabasesCommand, "NextToken", "NextToken", "MaxResults");
1236
1058
 
1237
- var paginateListStatements = (0, import_core.createPaginator)(RedshiftDataClient, ListStatementsCommand, "NextToken", "NextToken", "MaxResults");
1059
+ const paginateListSchemas = core.createPaginator(RedshiftDataClient, ListSchemasCommand, "NextToken", "NextToken", "MaxResults");
1238
1060
 
1239
- // src/pagination/ListTablesPaginator.ts
1061
+ const paginateListStatements = core.createPaginator(RedshiftDataClient, ListStatementsCommand, "NextToken", "NextToken", "MaxResults");
1240
1062
 
1241
- var paginateListTables = (0, import_core.createPaginator)(RedshiftDataClient, ListTablesCommand, "NextToken", "NextToken", "MaxResults");
1242
- // Annotate the CommonJS export names for ESM import in node:
1063
+ const paginateListTables = core.createPaginator(RedshiftDataClient, ListTablesCommand, "NextToken", "NextToken", "MaxResults");
1243
1064
 
1244
- 0 && (module.exports = {
1245
- RedshiftDataServiceException,
1246
- __Client,
1247
- RedshiftDataClient,
1248
- RedshiftData,
1249
- $Command,
1250
- BatchExecuteStatementCommand,
1251
- CancelStatementCommand,
1252
- DescribeStatementCommand,
1253
- DescribeTableCommand,
1254
- ExecuteStatementCommand,
1255
- GetStatementResultCommand,
1256
- GetStatementResultV2Command,
1257
- ListDatabasesCommand,
1258
- ListSchemasCommand,
1259
- ListStatementsCommand,
1260
- ListTablesCommand,
1261
- paginateDescribeTable,
1262
- paginateGetStatementResult,
1263
- paginateGetStatementResultV2,
1264
- paginateListDatabases,
1265
- paginateListSchemas,
1266
- paginateListStatements,
1267
- paginateListTables,
1268
- ActiveSessionsExceededException,
1269
- ActiveStatementsExceededException,
1270
- BatchExecuteStatementException,
1271
- ResultFormatString,
1272
- InternalServerException,
1273
- ValidationException,
1274
- DatabaseConnectionException,
1275
- ResourceNotFoundException,
1276
- StatusString,
1277
- StatementStatusString,
1278
- QueryTimeoutException,
1279
- ExecuteStatementException,
1280
- Field,
1281
- QueryRecords
1065
+ Object.defineProperty(exports, "$Command", {
1066
+ enumerable: true,
1067
+ get: function () { return smithyClient.Command; }
1282
1068
  });
1283
-
1069
+ Object.defineProperty(exports, "__Client", {
1070
+ enumerable: true,
1071
+ get: function () { return smithyClient.Client; }
1072
+ });
1073
+ exports.ActiveSessionsExceededException = ActiveSessionsExceededException;
1074
+ exports.ActiveStatementsExceededException = ActiveStatementsExceededException;
1075
+ exports.BatchExecuteStatementCommand = BatchExecuteStatementCommand;
1076
+ exports.BatchExecuteStatementException = BatchExecuteStatementException;
1077
+ exports.CancelStatementCommand = CancelStatementCommand;
1078
+ exports.DatabaseConnectionException = DatabaseConnectionException;
1079
+ exports.DescribeStatementCommand = DescribeStatementCommand;
1080
+ exports.DescribeTableCommand = DescribeTableCommand;
1081
+ exports.ExecuteStatementCommand = ExecuteStatementCommand;
1082
+ exports.ExecuteStatementException = ExecuteStatementException;
1083
+ exports.GetStatementResultCommand = GetStatementResultCommand;
1084
+ exports.GetStatementResultV2Command = GetStatementResultV2Command;
1085
+ exports.InternalServerException = InternalServerException;
1086
+ exports.ListDatabasesCommand = ListDatabasesCommand;
1087
+ exports.ListSchemasCommand = ListSchemasCommand;
1088
+ exports.ListStatementsCommand = ListStatementsCommand;
1089
+ exports.ListTablesCommand = ListTablesCommand;
1090
+ exports.QueryTimeoutException = QueryTimeoutException;
1091
+ exports.RedshiftData = RedshiftData;
1092
+ exports.RedshiftDataClient = RedshiftDataClient;
1093
+ exports.RedshiftDataServiceException = RedshiftDataServiceException;
1094
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1095
+ exports.ResultFormatString = ResultFormatString;
1096
+ exports.StatementStatusString = StatementStatusString;
1097
+ exports.StatusString = StatusString;
1098
+ exports.ValidationException = ValidationException;
1099
+ exports.paginateDescribeTable = paginateDescribeTable;
1100
+ exports.paginateGetStatementResult = paginateGetStatementResult;
1101
+ exports.paginateGetStatementResultV2 = paginateGetStatementResultV2;
1102
+ exports.paginateListDatabases = paginateListDatabases;
1103
+ exports.paginateListSchemas = paginateListSchemas;
1104
+ exports.paginateListStatements = paginateListStatements;
1105
+ exports.paginateListTables = paginateListTables;