@aws-sdk/client-redshift-data 3.183.0 → 3.186.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist-cjs/protocols/Aws_json1_1.js +2 -2
- package/dist-es/RedshiftData.js +49 -42
- package/dist-es/RedshiftDataClient.js +28 -22
- package/dist-es/commands/BatchExecuteStatementCommand.js +28 -21
- package/dist-es/commands/CancelStatementCommand.js +28 -21
- package/dist-es/commands/DescribeStatementCommand.js +28 -21
- package/dist-es/commands/DescribeTableCommand.js +28 -21
- package/dist-es/commands/ExecuteStatementCommand.js +28 -21
- package/dist-es/commands/GetStatementResultCommand.js +28 -21
- package/dist-es/commands/ListDatabasesCommand.js +28 -21
- package/dist-es/commands/ListSchemasCommand.js +28 -21
- package/dist-es/commands/ListStatementsCommand.js +28 -21
- package/dist-es/commands/ListTablesCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/RedshiftDataServiceException.js +10 -5
- package/dist-es/models/models_0.js +117 -166
- package/dist-es/pagination/DescribeTablePaginator.js +68 -25
- package/dist-es/pagination/GetStatementResultPaginator.js +67 -24
- package/dist-es/pagination/ListDatabasesPaginator.js +68 -25
- package/dist-es/pagination/ListSchemasPaginator.js +68 -25
- package/dist-es/pagination/ListStatementsPaginator.js +68 -25
- package/dist-es/pagination/ListTablesPaginator.js +68 -25
- package/dist-es/protocols/Aws_json1_1.js +916 -747
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,684 +1,830 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { ActiveStatementsExceededException, BatchExecuteStatementException, DatabaseConnectionException, ExecuteStatementException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
4
5
|
import { RedshiftDataServiceException as __BaseException } from "../models/RedshiftDataServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const serializeAws_json1_1CancelStatementCommand = async (input, context) => {
|
|
15
|
-
const headers = {
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "RedshiftData.CancelStatement",
|
|
18
|
-
};
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(serializeAws_json1_1CancelStatementRequest(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
export const serializeAws_json1_1DescribeStatementCommand = async (input, context) => {
|
|
24
|
-
const headers = {
|
|
25
|
-
"content-type": "application/x-amz-json-1.1",
|
|
26
|
-
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
27
|
-
};
|
|
28
|
-
let body;
|
|
29
|
-
body = JSON.stringify(serializeAws_json1_1DescribeStatementRequest(input, context));
|
|
30
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
-
};
|
|
32
|
-
export const serializeAws_json1_1DescribeTableCommand = async (input, context) => {
|
|
33
|
-
const headers = {
|
|
34
|
-
"content-type": "application/x-amz-json-1.1",
|
|
35
|
-
"x-amz-target": "RedshiftData.DescribeTable",
|
|
36
|
-
};
|
|
37
|
-
let body;
|
|
38
|
-
body = JSON.stringify(serializeAws_json1_1DescribeTableRequest(input, context));
|
|
39
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
-
};
|
|
41
|
-
export const serializeAws_json1_1ExecuteStatementCommand = async (input, context) => {
|
|
42
|
-
const headers = {
|
|
43
|
-
"content-type": "application/x-amz-json-1.1",
|
|
44
|
-
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
45
|
-
};
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify(serializeAws_json1_1ExecuteStatementInput(input, context));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
export const serializeAws_json1_1GetStatementResultCommand = async (input, context) => {
|
|
51
|
-
const headers = {
|
|
52
|
-
"content-type": "application/x-amz-json-1.1",
|
|
53
|
-
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
54
|
-
};
|
|
55
|
-
let body;
|
|
56
|
-
body = JSON.stringify(serializeAws_json1_1GetStatementResultRequest(input, context));
|
|
57
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
-
};
|
|
59
|
-
export const serializeAws_json1_1ListDatabasesCommand = async (input, context) => {
|
|
60
|
-
const headers = {
|
|
61
|
-
"content-type": "application/x-amz-json-1.1",
|
|
62
|
-
"x-amz-target": "RedshiftData.ListDatabases",
|
|
63
|
-
};
|
|
64
|
-
let body;
|
|
65
|
-
body = JSON.stringify(serializeAws_json1_1ListDatabasesRequest(input, context));
|
|
66
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
-
};
|
|
68
|
-
export const serializeAws_json1_1ListSchemasCommand = async (input, context) => {
|
|
69
|
-
const headers = {
|
|
70
|
-
"content-type": "application/x-amz-json-1.1",
|
|
71
|
-
"x-amz-target": "RedshiftData.ListSchemas",
|
|
72
|
-
};
|
|
73
|
-
let body;
|
|
74
|
-
body = JSON.stringify(serializeAws_json1_1ListSchemasRequest(input, context));
|
|
75
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
-
};
|
|
77
|
-
export const serializeAws_json1_1ListStatementsCommand = async (input, context) => {
|
|
78
|
-
const headers = {
|
|
79
|
-
"content-type": "application/x-amz-json-1.1",
|
|
80
|
-
"x-amz-target": "RedshiftData.ListStatements",
|
|
81
|
-
};
|
|
82
|
-
let body;
|
|
83
|
-
body = JSON.stringify(serializeAws_json1_1ListStatementsRequest(input, context));
|
|
84
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
-
};
|
|
86
|
-
export const serializeAws_json1_1ListTablesCommand = async (input, context) => {
|
|
87
|
-
const headers = {
|
|
88
|
-
"content-type": "application/x-amz-json-1.1",
|
|
89
|
-
"x-amz-target": "RedshiftData.ListTables",
|
|
90
|
-
};
|
|
91
|
-
let body;
|
|
92
|
-
body = JSON.stringify(serializeAws_json1_1ListTablesRequest(input, context));
|
|
93
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
-
};
|
|
95
|
-
export const deserializeAws_json1_1BatchExecuteStatementCommand = async (output, context) => {
|
|
96
|
-
if (output.statusCode >= 300) {
|
|
97
|
-
return deserializeAws_json1_1BatchExecuteStatementCommandError(output, context);
|
|
98
|
-
}
|
|
99
|
-
const data = await parseBody(output.body, context);
|
|
100
|
-
let contents = {};
|
|
101
|
-
contents = deserializeAws_json1_1BatchExecuteStatementOutput(data, context);
|
|
102
|
-
const response = {
|
|
103
|
-
$metadata: deserializeMetadata(output),
|
|
104
|
-
...contents,
|
|
105
|
-
};
|
|
106
|
-
return Promise.resolve(response);
|
|
107
|
-
};
|
|
108
|
-
const deserializeAws_json1_1BatchExecuteStatementCommandError = async (output, context) => {
|
|
109
|
-
const parsedOutput = {
|
|
110
|
-
...output,
|
|
111
|
-
body: await parseErrorBody(output.body, context),
|
|
112
|
-
};
|
|
113
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
114
|
-
switch (errorCode) {
|
|
115
|
-
case "ActiveStatementsExceededException":
|
|
116
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
117
|
-
throw await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context);
|
|
118
|
-
case "BatchExecuteStatementException":
|
|
119
|
-
case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
|
|
120
|
-
throw await deserializeAws_json1_1BatchExecuteStatementExceptionResponse(parsedOutput, context);
|
|
121
|
-
case "ValidationException":
|
|
122
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
123
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
124
|
-
default:
|
|
125
|
-
const parsedBody = parsedOutput.body;
|
|
126
|
-
throwDefaultError({
|
|
127
|
-
output,
|
|
128
|
-
parsedBody,
|
|
129
|
-
exceptionCtor: __BaseException,
|
|
130
|
-
errorCode,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
export const deserializeAws_json1_1CancelStatementCommand = async (output, context) => {
|
|
135
|
-
if (output.statusCode >= 300) {
|
|
136
|
-
return deserializeAws_json1_1CancelStatementCommandError(output, context);
|
|
137
|
-
}
|
|
138
|
-
const data = await parseBody(output.body, context);
|
|
139
|
-
let contents = {};
|
|
140
|
-
contents = deserializeAws_json1_1CancelStatementResponse(data, context);
|
|
141
|
-
const response = {
|
|
142
|
-
$metadata: deserializeMetadata(output),
|
|
143
|
-
...contents,
|
|
144
|
-
};
|
|
145
|
-
return Promise.resolve(response);
|
|
146
|
-
};
|
|
147
|
-
const deserializeAws_json1_1CancelStatementCommandError = async (output, context) => {
|
|
148
|
-
const parsedOutput = {
|
|
149
|
-
...output,
|
|
150
|
-
body: await parseErrorBody(output.body, context),
|
|
151
|
-
};
|
|
152
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
153
|
-
switch (errorCode) {
|
|
154
|
-
case "DatabaseConnectionException":
|
|
155
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
156
|
-
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
157
|
-
case "InternalServerException":
|
|
158
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
159
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
160
|
-
case "ResourceNotFoundException":
|
|
161
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
162
|
-
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
163
|
-
case "ValidationException":
|
|
164
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
165
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
166
|
-
default:
|
|
167
|
-
const parsedBody = parsedOutput.body;
|
|
168
|
-
throwDefaultError({
|
|
169
|
-
output,
|
|
170
|
-
parsedBody,
|
|
171
|
-
exceptionCtor: __BaseException,
|
|
172
|
-
errorCode,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
export const deserializeAws_json1_1DescribeStatementCommand = async (output, context) => {
|
|
177
|
-
if (output.statusCode >= 300) {
|
|
178
|
-
return deserializeAws_json1_1DescribeStatementCommandError(output, context);
|
|
179
|
-
}
|
|
180
|
-
const data = await parseBody(output.body, context);
|
|
181
|
-
let contents = {};
|
|
182
|
-
contents = deserializeAws_json1_1DescribeStatementResponse(data, context);
|
|
183
|
-
const response = {
|
|
184
|
-
$metadata: deserializeMetadata(output),
|
|
185
|
-
...contents,
|
|
186
|
-
};
|
|
187
|
-
return Promise.resolve(response);
|
|
188
|
-
};
|
|
189
|
-
const deserializeAws_json1_1DescribeStatementCommandError = async (output, context) => {
|
|
190
|
-
const parsedOutput = {
|
|
191
|
-
...output,
|
|
192
|
-
body: await parseErrorBody(output.body, context),
|
|
193
|
-
};
|
|
194
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
-
switch (errorCode) {
|
|
196
|
-
case "InternalServerException":
|
|
197
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
198
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
199
|
-
case "ResourceNotFoundException":
|
|
200
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
201
|
-
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
202
|
-
case "ValidationException":
|
|
203
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
204
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
205
|
-
default:
|
|
206
|
-
const parsedBody = parsedOutput.body;
|
|
207
|
-
throwDefaultError({
|
|
208
|
-
output,
|
|
209
|
-
parsedBody,
|
|
210
|
-
exceptionCtor: __BaseException,
|
|
211
|
-
errorCode,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
export const deserializeAws_json1_1DescribeTableCommand = async (output, context) => {
|
|
216
|
-
if (output.statusCode >= 300) {
|
|
217
|
-
return deserializeAws_json1_1DescribeTableCommandError(output, context);
|
|
218
|
-
}
|
|
219
|
-
const data = await parseBody(output.body, context);
|
|
220
|
-
let contents = {};
|
|
221
|
-
contents = deserializeAws_json1_1DescribeTableResponse(data, context);
|
|
222
|
-
const response = {
|
|
223
|
-
$metadata: deserializeMetadata(output),
|
|
224
|
-
...contents,
|
|
225
|
-
};
|
|
226
|
-
return Promise.resolve(response);
|
|
227
|
-
};
|
|
228
|
-
const deserializeAws_json1_1DescribeTableCommandError = async (output, context) => {
|
|
229
|
-
const parsedOutput = {
|
|
230
|
-
...output,
|
|
231
|
-
body: await parseErrorBody(output.body, context),
|
|
232
|
-
};
|
|
233
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
234
|
-
switch (errorCode) {
|
|
235
|
-
case "DatabaseConnectionException":
|
|
236
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
237
|
-
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
238
|
-
case "InternalServerException":
|
|
239
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
240
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
241
|
-
case "ValidationException":
|
|
242
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
243
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
244
|
-
default:
|
|
245
|
-
const parsedBody = parsedOutput.body;
|
|
246
|
-
throwDefaultError({
|
|
247
|
-
output,
|
|
248
|
-
parsedBody,
|
|
249
|
-
exceptionCtor: __BaseException,
|
|
250
|
-
errorCode,
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
export const deserializeAws_json1_1ExecuteStatementCommand = async (output, context) => {
|
|
255
|
-
if (output.statusCode >= 300) {
|
|
256
|
-
return deserializeAws_json1_1ExecuteStatementCommandError(output, context);
|
|
257
|
-
}
|
|
258
|
-
const data = await parseBody(output.body, context);
|
|
259
|
-
let contents = {};
|
|
260
|
-
contents = deserializeAws_json1_1ExecuteStatementOutput(data, context);
|
|
261
|
-
const response = {
|
|
262
|
-
$metadata: deserializeMetadata(output),
|
|
263
|
-
...contents,
|
|
264
|
-
};
|
|
265
|
-
return Promise.resolve(response);
|
|
266
|
-
};
|
|
267
|
-
const deserializeAws_json1_1ExecuteStatementCommandError = async (output, context) => {
|
|
268
|
-
const parsedOutput = {
|
|
269
|
-
...output,
|
|
270
|
-
body: await parseErrorBody(output.body, context),
|
|
271
|
-
};
|
|
272
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
-
switch (errorCode) {
|
|
274
|
-
case "ActiveStatementsExceededException":
|
|
275
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
276
|
-
throw await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context);
|
|
277
|
-
case "ExecuteStatementException":
|
|
278
|
-
case "com.amazonaws.redshiftdata#ExecuteStatementException":
|
|
279
|
-
throw await deserializeAws_json1_1ExecuteStatementExceptionResponse(parsedOutput, context);
|
|
280
|
-
case "ValidationException":
|
|
281
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
282
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
283
|
-
default:
|
|
284
|
-
const parsedBody = parsedOutput.body;
|
|
285
|
-
throwDefaultError({
|
|
286
|
-
output,
|
|
287
|
-
parsedBody,
|
|
288
|
-
exceptionCtor: __BaseException,
|
|
289
|
-
errorCode,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
export const deserializeAws_json1_1GetStatementResultCommand = async (output, context) => {
|
|
294
|
-
if (output.statusCode >= 300) {
|
|
295
|
-
return deserializeAws_json1_1GetStatementResultCommandError(output, context);
|
|
296
|
-
}
|
|
297
|
-
const data = await parseBody(output.body, context);
|
|
298
|
-
let contents = {};
|
|
299
|
-
contents = deserializeAws_json1_1GetStatementResultResponse(data, context);
|
|
300
|
-
const response = {
|
|
301
|
-
$metadata: deserializeMetadata(output),
|
|
302
|
-
...contents,
|
|
303
|
-
};
|
|
304
|
-
return Promise.resolve(response);
|
|
305
|
-
};
|
|
306
|
-
const deserializeAws_json1_1GetStatementResultCommandError = async (output, context) => {
|
|
307
|
-
const parsedOutput = {
|
|
308
|
-
...output,
|
|
309
|
-
body: await parseErrorBody(output.body, context),
|
|
310
|
-
};
|
|
311
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
312
|
-
switch (errorCode) {
|
|
313
|
-
case "InternalServerException":
|
|
314
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
315
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
316
|
-
case "ResourceNotFoundException":
|
|
317
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
318
|
-
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
319
|
-
case "ValidationException":
|
|
320
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
321
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
322
|
-
default:
|
|
323
|
-
const parsedBody = parsedOutput.body;
|
|
324
|
-
throwDefaultError({
|
|
325
|
-
output,
|
|
326
|
-
parsedBody,
|
|
327
|
-
exceptionCtor: __BaseException,
|
|
328
|
-
errorCode,
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
export const deserializeAws_json1_1ListDatabasesCommand = async (output, context) => {
|
|
333
|
-
if (output.statusCode >= 300) {
|
|
334
|
-
return deserializeAws_json1_1ListDatabasesCommandError(output, context);
|
|
335
|
-
}
|
|
336
|
-
const data = await parseBody(output.body, context);
|
|
337
|
-
let contents = {};
|
|
338
|
-
contents = deserializeAws_json1_1ListDatabasesResponse(data, context);
|
|
339
|
-
const response = {
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
...contents,
|
|
342
|
-
};
|
|
343
|
-
return Promise.resolve(response);
|
|
344
|
-
};
|
|
345
|
-
const deserializeAws_json1_1ListDatabasesCommandError = async (output, context) => {
|
|
346
|
-
const parsedOutput = {
|
|
347
|
-
...output,
|
|
348
|
-
body: await parseErrorBody(output.body, context),
|
|
349
|
-
};
|
|
350
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
|
-
switch (errorCode) {
|
|
352
|
-
case "DatabaseConnectionException":
|
|
353
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
354
|
-
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
355
|
-
case "InternalServerException":
|
|
356
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
357
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
358
|
-
case "ValidationException":
|
|
359
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
360
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
361
|
-
default:
|
|
362
|
-
const parsedBody = parsedOutput.body;
|
|
363
|
-
throwDefaultError({
|
|
364
|
-
output,
|
|
365
|
-
parsedBody,
|
|
366
|
-
exceptionCtor: __BaseException,
|
|
367
|
-
errorCode,
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
export const deserializeAws_json1_1ListSchemasCommand = async (output, context) => {
|
|
372
|
-
if (output.statusCode >= 300) {
|
|
373
|
-
return deserializeAws_json1_1ListSchemasCommandError(output, context);
|
|
374
|
-
}
|
|
375
|
-
const data = await parseBody(output.body, context);
|
|
376
|
-
let contents = {};
|
|
377
|
-
contents = deserializeAws_json1_1ListSchemasResponse(data, context);
|
|
378
|
-
const response = {
|
|
379
|
-
$metadata: deserializeMetadata(output),
|
|
380
|
-
...contents,
|
|
381
|
-
};
|
|
382
|
-
return Promise.resolve(response);
|
|
383
|
-
};
|
|
384
|
-
const deserializeAws_json1_1ListSchemasCommandError = async (output, context) => {
|
|
385
|
-
const parsedOutput = {
|
|
386
|
-
...output,
|
|
387
|
-
body: await parseErrorBody(output.body, context),
|
|
388
|
-
};
|
|
389
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
390
|
-
switch (errorCode) {
|
|
391
|
-
case "DatabaseConnectionException":
|
|
392
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
393
|
-
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
394
|
-
case "InternalServerException":
|
|
395
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
396
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
397
|
-
case "ValidationException":
|
|
398
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
399
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
400
|
-
default:
|
|
401
|
-
const parsedBody = parsedOutput.body;
|
|
402
|
-
throwDefaultError({
|
|
403
|
-
output,
|
|
404
|
-
parsedBody,
|
|
405
|
-
exceptionCtor: __BaseException,
|
|
406
|
-
errorCode,
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
export const deserializeAws_json1_1ListStatementsCommand = async (output, context) => {
|
|
411
|
-
if (output.statusCode >= 300) {
|
|
412
|
-
return deserializeAws_json1_1ListStatementsCommandError(output, context);
|
|
413
|
-
}
|
|
414
|
-
const data = await parseBody(output.body, context);
|
|
415
|
-
let contents = {};
|
|
416
|
-
contents = deserializeAws_json1_1ListStatementsResponse(data, context);
|
|
417
|
-
const response = {
|
|
418
|
-
$metadata: deserializeMetadata(output),
|
|
419
|
-
...contents,
|
|
420
|
-
};
|
|
421
|
-
return Promise.resolve(response);
|
|
422
|
-
};
|
|
423
|
-
const deserializeAws_json1_1ListStatementsCommandError = async (output, context) => {
|
|
424
|
-
const parsedOutput = {
|
|
425
|
-
...output,
|
|
426
|
-
body: await parseErrorBody(output.body, context),
|
|
427
|
-
};
|
|
428
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
429
|
-
switch (errorCode) {
|
|
430
|
-
case "InternalServerException":
|
|
431
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
432
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
433
|
-
case "ValidationException":
|
|
434
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
435
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
436
|
-
default:
|
|
437
|
-
const parsedBody = parsedOutput.body;
|
|
438
|
-
throwDefaultError({
|
|
439
|
-
output,
|
|
440
|
-
parsedBody,
|
|
441
|
-
exceptionCtor: __BaseException,
|
|
442
|
-
errorCode,
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
export const deserializeAws_json1_1ListTablesCommand = async (output, context) => {
|
|
447
|
-
if (output.statusCode >= 300) {
|
|
448
|
-
return deserializeAws_json1_1ListTablesCommandError(output, context);
|
|
449
|
-
}
|
|
450
|
-
const data = await parseBody(output.body, context);
|
|
451
|
-
let contents = {};
|
|
452
|
-
contents = deserializeAws_json1_1ListTablesResponse(data, context);
|
|
453
|
-
const response = {
|
|
454
|
-
$metadata: deserializeMetadata(output),
|
|
455
|
-
...contents,
|
|
456
|
-
};
|
|
457
|
-
return Promise.resolve(response);
|
|
458
|
-
};
|
|
459
|
-
const deserializeAws_json1_1ListTablesCommandError = async (output, context) => {
|
|
460
|
-
const parsedOutput = {
|
|
461
|
-
...output,
|
|
462
|
-
body: await parseErrorBody(output.body, context),
|
|
463
|
-
};
|
|
464
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
465
|
-
switch (errorCode) {
|
|
466
|
-
case "DatabaseConnectionException":
|
|
467
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
468
|
-
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
469
|
-
case "InternalServerException":
|
|
470
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
471
|
-
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
472
|
-
case "ValidationException":
|
|
473
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
474
|
-
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
475
|
-
default:
|
|
476
|
-
const parsedBody = parsedOutput.body;
|
|
477
|
-
throwDefaultError({
|
|
478
|
-
output,
|
|
479
|
-
parsedBody,
|
|
480
|
-
exceptionCtor: __BaseException,
|
|
481
|
-
errorCode,
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
const deserializeAws_json1_1ActiveStatementsExceededExceptionResponse = async (parsedOutput, context) => {
|
|
486
|
-
const body = parsedOutput.body;
|
|
487
|
-
const deserialized = deserializeAws_json1_1ActiveStatementsExceededException(body, context);
|
|
488
|
-
const exception = new ActiveStatementsExceededException({
|
|
489
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
490
|
-
...deserialized,
|
|
6
|
+
export var serializeAws_json1_1BatchExecuteStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var headers, body;
|
|
8
|
+
return __generator(this, function (_a) {
|
|
9
|
+
headers = {
|
|
10
|
+
"content-type": "application/x-amz-json-1.1",
|
|
11
|
+
"x-amz-target": "RedshiftData.BatchExecuteStatement",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_1BatchExecuteStatementInput(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
491
15
|
});
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_1CancelStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18
|
+
var headers, body;
|
|
19
|
+
return __generator(this, function (_a) {
|
|
20
|
+
headers = {
|
|
21
|
+
"content-type": "application/x-amz-json-1.1",
|
|
22
|
+
"x-amz-target": "RedshiftData.CancelStatement",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_1CancelStatementRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
500
26
|
});
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_json1_1DescribeStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
29
|
+
var headers, body;
|
|
30
|
+
return __generator(this, function (_a) {
|
|
31
|
+
headers = {
|
|
32
|
+
"content-type": "application/x-amz-json-1.1",
|
|
33
|
+
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
34
|
+
};
|
|
35
|
+
body = JSON.stringify(serializeAws_json1_1DescribeStatementRequest(input, context));
|
|
36
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
509
37
|
});
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
38
|
+
}); };
|
|
39
|
+
export var serializeAws_json1_1DescribeTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
+
var headers, body;
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "RedshiftData.DescribeTable",
|
|
45
|
+
};
|
|
46
|
+
body = JSON.stringify(serializeAws_json1_1DescribeTableRequest(input, context));
|
|
47
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
518
48
|
});
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
49
|
+
}); };
|
|
50
|
+
export var serializeAws_json1_1ExecuteStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
var headers, body;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
headers = {
|
|
54
|
+
"content-type": "application/x-amz-json-1.1",
|
|
55
|
+
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
56
|
+
};
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_1ExecuteStatementInput(input, context));
|
|
58
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
527
59
|
});
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
60
|
+
}); };
|
|
61
|
+
export var serializeAws_json1_1GetStatementResultCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
62
|
+
var headers, body;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
headers = {
|
|
65
|
+
"content-type": "application/x-amz-json-1.1",
|
|
66
|
+
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
67
|
+
};
|
|
68
|
+
body = JSON.stringify(serializeAws_json1_1GetStatementResultRequest(input, context));
|
|
69
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
536
70
|
});
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
71
|
+
}); };
|
|
72
|
+
export var serializeAws_json1_1ListDatabasesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
+
var headers, body;
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
headers = {
|
|
76
|
+
"content-type": "application/x-amz-json-1.1",
|
|
77
|
+
"x-amz-target": "RedshiftData.ListDatabases",
|
|
78
|
+
};
|
|
79
|
+
body = JSON.stringify(serializeAws_json1_1ListDatabasesRequest(input, context));
|
|
80
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
545
81
|
});
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
82
|
+
}); };
|
|
83
|
+
export var serializeAws_json1_1ListSchemasCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
+
var headers, body;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
headers = {
|
|
87
|
+
"content-type": "application/x-amz-json-1.1",
|
|
88
|
+
"x-amz-target": "RedshiftData.ListSchemas",
|
|
89
|
+
};
|
|
90
|
+
body = JSON.stringify(serializeAws_json1_1ListSchemasRequest(input, context));
|
|
91
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
92
|
+
});
|
|
93
|
+
}); };
|
|
94
|
+
export var serializeAws_json1_1ListStatementsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
|
+
var headers, body;
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
headers = {
|
|
98
|
+
"content-type": "application/x-amz-json-1.1",
|
|
99
|
+
"x-amz-target": "RedshiftData.ListStatements",
|
|
100
|
+
};
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_1ListStatementsRequest(input, context));
|
|
102
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
103
|
+
});
|
|
104
|
+
}); };
|
|
105
|
+
export var serializeAws_json1_1ListTablesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
106
|
+
var headers, body;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
headers = {
|
|
109
|
+
"content-type": "application/x-amz-json-1.1",
|
|
110
|
+
"x-amz-target": "RedshiftData.ListTables",
|
|
111
|
+
};
|
|
112
|
+
body = JSON.stringify(serializeAws_json1_1ListTablesRequest(input, context));
|
|
113
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
114
|
+
});
|
|
115
|
+
}); };
|
|
116
|
+
export var deserializeAws_json1_1BatchExecuteStatementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
+
var data, contents, response;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
switch (_a.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
if (output.statusCode >= 300) {
|
|
122
|
+
return [2, deserializeAws_json1_1BatchExecuteStatementCommandError(output, context)];
|
|
123
|
+
}
|
|
124
|
+
return [4, parseBody(output.body, context)];
|
|
125
|
+
case 1:
|
|
126
|
+
data = _a.sent();
|
|
127
|
+
contents = {};
|
|
128
|
+
contents = deserializeAws_json1_1BatchExecuteStatementOutput(data, context);
|
|
129
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
130
|
+
return [2, Promise.resolve(response)];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}); };
|
|
134
|
+
var deserializeAws_json1_1BatchExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
136
|
+
var _c;
|
|
137
|
+
return __generator(this, function (_d) {
|
|
138
|
+
switch (_d.label) {
|
|
139
|
+
case 0:
|
|
140
|
+
_a = [__assign({}, output)];
|
|
141
|
+
_c = {};
|
|
142
|
+
return [4, parseErrorBody(output.body, context)];
|
|
143
|
+
case 1:
|
|
144
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
145
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
146
|
+
_b = errorCode;
|
|
147
|
+
switch (_b) {
|
|
148
|
+
case "ActiveStatementsExceededException": return [3, 2];
|
|
149
|
+
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException": return [3, 2];
|
|
150
|
+
case "BatchExecuteStatementException": return [3, 4];
|
|
151
|
+
case "com.amazonaws.redshiftdata#BatchExecuteStatementException": return [3, 4];
|
|
152
|
+
case "ValidationException": return [3, 6];
|
|
153
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
154
|
+
}
|
|
155
|
+
return [3, 8];
|
|
156
|
+
case 2: return [4, deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context)];
|
|
157
|
+
case 3: throw _d.sent();
|
|
158
|
+
case 4: return [4, deserializeAws_json1_1BatchExecuteStatementExceptionResponse(parsedOutput, context)];
|
|
159
|
+
case 5: throw _d.sent();
|
|
160
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
161
|
+
case 7: throw _d.sent();
|
|
162
|
+
case 8:
|
|
163
|
+
parsedBody = parsedOutput.body;
|
|
164
|
+
throwDefaultError({
|
|
165
|
+
output: output,
|
|
166
|
+
parsedBody: parsedBody,
|
|
167
|
+
exceptionCtor: __BaseException,
|
|
168
|
+
errorCode: errorCode,
|
|
169
|
+
});
|
|
170
|
+
_d.label = 9;
|
|
171
|
+
case 9: return [2];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}); };
|
|
175
|
+
export var deserializeAws_json1_1CancelStatementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
176
|
+
var data, contents, response;
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
switch (_a.label) {
|
|
179
|
+
case 0:
|
|
180
|
+
if (output.statusCode >= 300) {
|
|
181
|
+
return [2, deserializeAws_json1_1CancelStatementCommandError(output, context)];
|
|
182
|
+
}
|
|
183
|
+
return [4, parseBody(output.body, context)];
|
|
184
|
+
case 1:
|
|
185
|
+
data = _a.sent();
|
|
186
|
+
contents = {};
|
|
187
|
+
contents = deserializeAws_json1_1CancelStatementResponse(data, context);
|
|
188
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
189
|
+
return [2, Promise.resolve(response)];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}); };
|
|
193
|
+
var deserializeAws_json1_1CancelStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
195
|
+
var _c;
|
|
196
|
+
return __generator(this, function (_d) {
|
|
197
|
+
switch (_d.label) {
|
|
198
|
+
case 0:
|
|
199
|
+
_a = [__assign({}, output)];
|
|
200
|
+
_c = {};
|
|
201
|
+
return [4, parseErrorBody(output.body, context)];
|
|
202
|
+
case 1:
|
|
203
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
204
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
205
|
+
_b = errorCode;
|
|
206
|
+
switch (_b) {
|
|
207
|
+
case "DatabaseConnectionException": return [3, 2];
|
|
208
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
209
|
+
case "InternalServerException": return [3, 4];
|
|
210
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
211
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
212
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException": return [3, 6];
|
|
213
|
+
case "ValidationException": return [3, 8];
|
|
214
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 8];
|
|
215
|
+
}
|
|
216
|
+
return [3, 10];
|
|
217
|
+
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
218
|
+
case 3: throw _d.sent();
|
|
219
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
220
|
+
case 5: throw _d.sent();
|
|
221
|
+
case 6: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
222
|
+
case 7: throw _d.sent();
|
|
223
|
+
case 8: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
224
|
+
case 9: throw _d.sent();
|
|
225
|
+
case 10:
|
|
226
|
+
parsedBody = parsedOutput.body;
|
|
227
|
+
throwDefaultError({
|
|
228
|
+
output: output,
|
|
229
|
+
parsedBody: parsedBody,
|
|
230
|
+
exceptionCtor: __BaseException,
|
|
231
|
+
errorCode: errorCode,
|
|
232
|
+
});
|
|
233
|
+
_d.label = 11;
|
|
234
|
+
case 11: return [2];
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
}); };
|
|
238
|
+
export var deserializeAws_json1_1DescribeStatementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
239
|
+
var data, contents, response;
|
|
240
|
+
return __generator(this, function (_a) {
|
|
241
|
+
switch (_a.label) {
|
|
242
|
+
case 0:
|
|
243
|
+
if (output.statusCode >= 300) {
|
|
244
|
+
return [2, deserializeAws_json1_1DescribeStatementCommandError(output, context)];
|
|
245
|
+
}
|
|
246
|
+
return [4, parseBody(output.body, context)];
|
|
247
|
+
case 1:
|
|
248
|
+
data = _a.sent();
|
|
249
|
+
contents = {};
|
|
250
|
+
contents = deserializeAws_json1_1DescribeStatementResponse(data, context);
|
|
251
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
252
|
+
return [2, Promise.resolve(response)];
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}); };
|
|
256
|
+
var deserializeAws_json1_1DescribeStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
257
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
258
|
+
var _c;
|
|
259
|
+
return __generator(this, function (_d) {
|
|
260
|
+
switch (_d.label) {
|
|
261
|
+
case 0:
|
|
262
|
+
_a = [__assign({}, output)];
|
|
263
|
+
_c = {};
|
|
264
|
+
return [4, parseErrorBody(output.body, context)];
|
|
265
|
+
case 1:
|
|
266
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
267
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
268
|
+
_b = errorCode;
|
|
269
|
+
switch (_b) {
|
|
270
|
+
case "InternalServerException": return [3, 2];
|
|
271
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
|
|
272
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
273
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException": return [3, 4];
|
|
274
|
+
case "ValidationException": return [3, 6];
|
|
275
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
276
|
+
}
|
|
277
|
+
return [3, 8];
|
|
278
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
279
|
+
case 3: throw _d.sent();
|
|
280
|
+
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
281
|
+
case 5: throw _d.sent();
|
|
282
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
283
|
+
case 7: throw _d.sent();
|
|
284
|
+
case 8:
|
|
285
|
+
parsedBody = parsedOutput.body;
|
|
286
|
+
throwDefaultError({
|
|
287
|
+
output: output,
|
|
288
|
+
parsedBody: parsedBody,
|
|
289
|
+
exceptionCtor: __BaseException,
|
|
290
|
+
errorCode: errorCode,
|
|
291
|
+
});
|
|
292
|
+
_d.label = 9;
|
|
293
|
+
case 9: return [2];
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}); };
|
|
297
|
+
export var deserializeAws_json1_1DescribeTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
298
|
+
var data, contents, response;
|
|
299
|
+
return __generator(this, function (_a) {
|
|
300
|
+
switch (_a.label) {
|
|
301
|
+
case 0:
|
|
302
|
+
if (output.statusCode >= 300) {
|
|
303
|
+
return [2, deserializeAws_json1_1DescribeTableCommandError(output, context)];
|
|
304
|
+
}
|
|
305
|
+
return [4, parseBody(output.body, context)];
|
|
306
|
+
case 1:
|
|
307
|
+
data = _a.sent();
|
|
308
|
+
contents = {};
|
|
309
|
+
contents = deserializeAws_json1_1DescribeTableResponse(data, context);
|
|
310
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
311
|
+
return [2, Promise.resolve(response)];
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}); };
|
|
315
|
+
var deserializeAws_json1_1DescribeTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
316
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
317
|
+
var _c;
|
|
318
|
+
return __generator(this, function (_d) {
|
|
319
|
+
switch (_d.label) {
|
|
320
|
+
case 0:
|
|
321
|
+
_a = [__assign({}, output)];
|
|
322
|
+
_c = {};
|
|
323
|
+
return [4, parseErrorBody(output.body, context)];
|
|
324
|
+
case 1:
|
|
325
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
326
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
327
|
+
_b = errorCode;
|
|
328
|
+
switch (_b) {
|
|
329
|
+
case "DatabaseConnectionException": return [3, 2];
|
|
330
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
331
|
+
case "InternalServerException": return [3, 4];
|
|
332
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
333
|
+
case "ValidationException": return [3, 6];
|
|
334
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
335
|
+
}
|
|
336
|
+
return [3, 8];
|
|
337
|
+
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
338
|
+
case 3: throw _d.sent();
|
|
339
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
340
|
+
case 5: throw _d.sent();
|
|
341
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
342
|
+
case 7: throw _d.sent();
|
|
343
|
+
case 8:
|
|
344
|
+
parsedBody = parsedOutput.body;
|
|
345
|
+
throwDefaultError({
|
|
346
|
+
output: output,
|
|
347
|
+
parsedBody: parsedBody,
|
|
348
|
+
exceptionCtor: __BaseException,
|
|
349
|
+
errorCode: errorCode,
|
|
350
|
+
});
|
|
351
|
+
_d.label = 9;
|
|
352
|
+
case 9: return [2];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}); };
|
|
356
|
+
export var deserializeAws_json1_1ExecuteStatementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
357
|
+
var data, contents, response;
|
|
358
|
+
return __generator(this, function (_a) {
|
|
359
|
+
switch (_a.label) {
|
|
360
|
+
case 0:
|
|
361
|
+
if (output.statusCode >= 300) {
|
|
362
|
+
return [2, deserializeAws_json1_1ExecuteStatementCommandError(output, context)];
|
|
363
|
+
}
|
|
364
|
+
return [4, parseBody(output.body, context)];
|
|
365
|
+
case 1:
|
|
366
|
+
data = _a.sent();
|
|
367
|
+
contents = {};
|
|
368
|
+
contents = deserializeAws_json1_1ExecuteStatementOutput(data, context);
|
|
369
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
370
|
+
return [2, Promise.resolve(response)];
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
}); };
|
|
374
|
+
var deserializeAws_json1_1ExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
375
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
376
|
+
var _c;
|
|
377
|
+
return __generator(this, function (_d) {
|
|
378
|
+
switch (_d.label) {
|
|
379
|
+
case 0:
|
|
380
|
+
_a = [__assign({}, output)];
|
|
381
|
+
_c = {};
|
|
382
|
+
return [4, parseErrorBody(output.body, context)];
|
|
383
|
+
case 1:
|
|
384
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
385
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
386
|
+
_b = errorCode;
|
|
387
|
+
switch (_b) {
|
|
388
|
+
case "ActiveStatementsExceededException": return [3, 2];
|
|
389
|
+
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException": return [3, 2];
|
|
390
|
+
case "ExecuteStatementException": return [3, 4];
|
|
391
|
+
case "com.amazonaws.redshiftdata#ExecuteStatementException": return [3, 4];
|
|
392
|
+
case "ValidationException": return [3, 6];
|
|
393
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
394
|
+
}
|
|
395
|
+
return [3, 8];
|
|
396
|
+
case 2: return [4, deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context)];
|
|
397
|
+
case 3: throw _d.sent();
|
|
398
|
+
case 4: return [4, deserializeAws_json1_1ExecuteStatementExceptionResponse(parsedOutput, context)];
|
|
399
|
+
case 5: throw _d.sent();
|
|
400
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
401
|
+
case 7: throw _d.sent();
|
|
402
|
+
case 8:
|
|
403
|
+
parsedBody = parsedOutput.body;
|
|
404
|
+
throwDefaultError({
|
|
405
|
+
output: output,
|
|
406
|
+
parsedBody: parsedBody,
|
|
407
|
+
exceptionCtor: __BaseException,
|
|
408
|
+
errorCode: errorCode,
|
|
409
|
+
});
|
|
410
|
+
_d.label = 9;
|
|
411
|
+
case 9: return [2];
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}); };
|
|
415
|
+
export var deserializeAws_json1_1GetStatementResultCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
416
|
+
var data, contents, response;
|
|
417
|
+
return __generator(this, function (_a) {
|
|
418
|
+
switch (_a.label) {
|
|
419
|
+
case 0:
|
|
420
|
+
if (output.statusCode >= 300) {
|
|
421
|
+
return [2, deserializeAws_json1_1GetStatementResultCommandError(output, context)];
|
|
422
|
+
}
|
|
423
|
+
return [4, parseBody(output.body, context)];
|
|
424
|
+
case 1:
|
|
425
|
+
data = _a.sent();
|
|
426
|
+
contents = {};
|
|
427
|
+
contents = deserializeAws_json1_1GetStatementResultResponse(data, context);
|
|
428
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
429
|
+
return [2, Promise.resolve(response)];
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
}); };
|
|
433
|
+
var deserializeAws_json1_1GetStatementResultCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
434
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
435
|
+
var _c;
|
|
436
|
+
return __generator(this, function (_d) {
|
|
437
|
+
switch (_d.label) {
|
|
438
|
+
case 0:
|
|
439
|
+
_a = [__assign({}, output)];
|
|
440
|
+
_c = {};
|
|
441
|
+
return [4, parseErrorBody(output.body, context)];
|
|
442
|
+
case 1:
|
|
443
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
444
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
445
|
+
_b = errorCode;
|
|
446
|
+
switch (_b) {
|
|
447
|
+
case "InternalServerException": return [3, 2];
|
|
448
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
|
|
449
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
450
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException": return [3, 4];
|
|
451
|
+
case "ValidationException": return [3, 6];
|
|
452
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
453
|
+
}
|
|
454
|
+
return [3, 8];
|
|
455
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
456
|
+
case 3: throw _d.sent();
|
|
457
|
+
case 4: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
458
|
+
case 5: throw _d.sent();
|
|
459
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
460
|
+
case 7: throw _d.sent();
|
|
461
|
+
case 8:
|
|
462
|
+
parsedBody = parsedOutput.body;
|
|
463
|
+
throwDefaultError({
|
|
464
|
+
output: output,
|
|
465
|
+
parsedBody: parsedBody,
|
|
466
|
+
exceptionCtor: __BaseException,
|
|
467
|
+
errorCode: errorCode,
|
|
468
|
+
});
|
|
469
|
+
_d.label = 9;
|
|
470
|
+
case 9: return [2];
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}); };
|
|
474
|
+
export var deserializeAws_json1_1ListDatabasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
475
|
+
var data, contents, response;
|
|
476
|
+
return __generator(this, function (_a) {
|
|
477
|
+
switch (_a.label) {
|
|
478
|
+
case 0:
|
|
479
|
+
if (output.statusCode >= 300) {
|
|
480
|
+
return [2, deserializeAws_json1_1ListDatabasesCommandError(output, context)];
|
|
481
|
+
}
|
|
482
|
+
return [4, parseBody(output.body, context)];
|
|
483
|
+
case 1:
|
|
484
|
+
data = _a.sent();
|
|
485
|
+
contents = {};
|
|
486
|
+
contents = deserializeAws_json1_1ListDatabasesResponse(data, context);
|
|
487
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
488
|
+
return [2, Promise.resolve(response)];
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
}); };
|
|
492
|
+
var deserializeAws_json1_1ListDatabasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
493
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
494
|
+
var _c;
|
|
495
|
+
return __generator(this, function (_d) {
|
|
496
|
+
switch (_d.label) {
|
|
497
|
+
case 0:
|
|
498
|
+
_a = [__assign({}, output)];
|
|
499
|
+
_c = {};
|
|
500
|
+
return [4, parseErrorBody(output.body, context)];
|
|
501
|
+
case 1:
|
|
502
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
503
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
504
|
+
_b = errorCode;
|
|
505
|
+
switch (_b) {
|
|
506
|
+
case "DatabaseConnectionException": return [3, 2];
|
|
507
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
508
|
+
case "InternalServerException": return [3, 4];
|
|
509
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
510
|
+
case "ValidationException": return [3, 6];
|
|
511
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
512
|
+
}
|
|
513
|
+
return [3, 8];
|
|
514
|
+
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
515
|
+
case 3: throw _d.sent();
|
|
516
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
517
|
+
case 5: throw _d.sent();
|
|
518
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
519
|
+
case 7: throw _d.sent();
|
|
520
|
+
case 8:
|
|
521
|
+
parsedBody = parsedOutput.body;
|
|
522
|
+
throwDefaultError({
|
|
523
|
+
output: output,
|
|
524
|
+
parsedBody: parsedBody,
|
|
525
|
+
exceptionCtor: __BaseException,
|
|
526
|
+
errorCode: errorCode,
|
|
527
|
+
});
|
|
528
|
+
_d.label = 9;
|
|
529
|
+
case 9: return [2];
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}); };
|
|
533
|
+
export var deserializeAws_json1_1ListSchemasCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
534
|
+
var data, contents, response;
|
|
535
|
+
return __generator(this, function (_a) {
|
|
536
|
+
switch (_a.label) {
|
|
537
|
+
case 0:
|
|
538
|
+
if (output.statusCode >= 300) {
|
|
539
|
+
return [2, deserializeAws_json1_1ListSchemasCommandError(output, context)];
|
|
540
|
+
}
|
|
541
|
+
return [4, parseBody(output.body, context)];
|
|
542
|
+
case 1:
|
|
543
|
+
data = _a.sent();
|
|
544
|
+
contents = {};
|
|
545
|
+
contents = deserializeAws_json1_1ListSchemasResponse(data, context);
|
|
546
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
547
|
+
return [2, Promise.resolve(response)];
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
}); };
|
|
551
|
+
var deserializeAws_json1_1ListSchemasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
552
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
553
|
+
var _c;
|
|
554
|
+
return __generator(this, function (_d) {
|
|
555
|
+
switch (_d.label) {
|
|
556
|
+
case 0:
|
|
557
|
+
_a = [__assign({}, output)];
|
|
558
|
+
_c = {};
|
|
559
|
+
return [4, parseErrorBody(output.body, context)];
|
|
560
|
+
case 1:
|
|
561
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
562
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
563
|
+
_b = errorCode;
|
|
564
|
+
switch (_b) {
|
|
565
|
+
case "DatabaseConnectionException": return [3, 2];
|
|
566
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
567
|
+
case "InternalServerException": return [3, 4];
|
|
568
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
569
|
+
case "ValidationException": return [3, 6];
|
|
570
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
571
|
+
}
|
|
572
|
+
return [3, 8];
|
|
573
|
+
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
574
|
+
case 3: throw _d.sent();
|
|
575
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
576
|
+
case 5: throw _d.sent();
|
|
577
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
578
|
+
case 7: throw _d.sent();
|
|
579
|
+
case 8:
|
|
580
|
+
parsedBody = parsedOutput.body;
|
|
581
|
+
throwDefaultError({
|
|
582
|
+
output: output,
|
|
583
|
+
parsedBody: parsedBody,
|
|
584
|
+
exceptionCtor: __BaseException,
|
|
585
|
+
errorCode: errorCode,
|
|
586
|
+
});
|
|
587
|
+
_d.label = 9;
|
|
588
|
+
case 9: return [2];
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
}); };
|
|
592
|
+
export var deserializeAws_json1_1ListStatementsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
593
|
+
var data, contents, response;
|
|
594
|
+
return __generator(this, function (_a) {
|
|
595
|
+
switch (_a.label) {
|
|
596
|
+
case 0:
|
|
597
|
+
if (output.statusCode >= 300) {
|
|
598
|
+
return [2, deserializeAws_json1_1ListStatementsCommandError(output, context)];
|
|
599
|
+
}
|
|
600
|
+
return [4, parseBody(output.body, context)];
|
|
601
|
+
case 1:
|
|
602
|
+
data = _a.sent();
|
|
603
|
+
contents = {};
|
|
604
|
+
contents = deserializeAws_json1_1ListStatementsResponse(data, context);
|
|
605
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
606
|
+
return [2, Promise.resolve(response)];
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
}); };
|
|
610
|
+
var deserializeAws_json1_1ListStatementsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
611
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
612
|
+
var _c;
|
|
613
|
+
return __generator(this, function (_d) {
|
|
614
|
+
switch (_d.label) {
|
|
615
|
+
case 0:
|
|
616
|
+
_a = [__assign({}, output)];
|
|
617
|
+
_c = {};
|
|
618
|
+
return [4, parseErrorBody(output.body, context)];
|
|
619
|
+
case 1:
|
|
620
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
621
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
622
|
+
_b = errorCode;
|
|
623
|
+
switch (_b) {
|
|
624
|
+
case "InternalServerException": return [3, 2];
|
|
625
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
|
|
626
|
+
case "ValidationException": return [3, 4];
|
|
627
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
|
|
628
|
+
}
|
|
629
|
+
return [3, 6];
|
|
630
|
+
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
631
|
+
case 3: throw _d.sent();
|
|
632
|
+
case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
633
|
+
case 5: throw _d.sent();
|
|
634
|
+
case 6:
|
|
635
|
+
parsedBody = parsedOutput.body;
|
|
636
|
+
throwDefaultError({
|
|
637
|
+
output: output,
|
|
638
|
+
parsedBody: parsedBody,
|
|
639
|
+
exceptionCtor: __BaseException,
|
|
640
|
+
errorCode: errorCode,
|
|
641
|
+
});
|
|
642
|
+
_d.label = 7;
|
|
643
|
+
case 7: return [2];
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
}); };
|
|
647
|
+
export var deserializeAws_json1_1ListTablesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
648
|
+
var data, contents, response;
|
|
649
|
+
return __generator(this, function (_a) {
|
|
650
|
+
switch (_a.label) {
|
|
651
|
+
case 0:
|
|
652
|
+
if (output.statusCode >= 300) {
|
|
653
|
+
return [2, deserializeAws_json1_1ListTablesCommandError(output, context)];
|
|
654
|
+
}
|
|
655
|
+
return [4, parseBody(output.body, context)];
|
|
656
|
+
case 1:
|
|
657
|
+
data = _a.sent();
|
|
658
|
+
contents = {};
|
|
659
|
+
contents = deserializeAws_json1_1ListTablesResponse(data, context);
|
|
660
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
661
|
+
return [2, Promise.resolve(response)];
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
}); };
|
|
665
|
+
var deserializeAws_json1_1ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
666
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
667
|
+
var _c;
|
|
668
|
+
return __generator(this, function (_d) {
|
|
669
|
+
switch (_d.label) {
|
|
670
|
+
case 0:
|
|
671
|
+
_a = [__assign({}, output)];
|
|
672
|
+
_c = {};
|
|
673
|
+
return [4, parseErrorBody(output.body, context)];
|
|
674
|
+
case 1:
|
|
675
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
676
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
677
|
+
_b = errorCode;
|
|
678
|
+
switch (_b) {
|
|
679
|
+
case "DatabaseConnectionException": return [3, 2];
|
|
680
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
681
|
+
case "InternalServerException": return [3, 4];
|
|
682
|
+
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
683
|
+
case "ValidationException": return [3, 6];
|
|
684
|
+
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
685
|
+
}
|
|
686
|
+
return [3, 8];
|
|
687
|
+
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
688
|
+
case 3: throw _d.sent();
|
|
689
|
+
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
690
|
+
case 5: throw _d.sent();
|
|
691
|
+
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
692
|
+
case 7: throw _d.sent();
|
|
693
|
+
case 8:
|
|
694
|
+
parsedBody = parsedOutput.body;
|
|
695
|
+
throwDefaultError({
|
|
696
|
+
output: output,
|
|
697
|
+
parsedBody: parsedBody,
|
|
698
|
+
exceptionCtor: __BaseException,
|
|
699
|
+
errorCode: errorCode,
|
|
700
|
+
});
|
|
701
|
+
_d.label = 9;
|
|
702
|
+
case 9: return [2];
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
}); };
|
|
706
|
+
var deserializeAws_json1_1ActiveStatementsExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
707
|
+
var body, deserialized, exception;
|
|
708
|
+
return __generator(this, function (_a) {
|
|
709
|
+
body = parsedOutput.body;
|
|
710
|
+
deserialized = deserializeAws_json1_1ActiveStatementsExceededException(body, context);
|
|
711
|
+
exception = new ActiveStatementsExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
712
|
+
return [2, __decorateServiceException(exception, body)];
|
|
713
|
+
});
|
|
714
|
+
}); };
|
|
715
|
+
var deserializeAws_json1_1BatchExecuteStatementExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
716
|
+
var body, deserialized, exception;
|
|
717
|
+
return __generator(this, function (_a) {
|
|
718
|
+
body = parsedOutput.body;
|
|
719
|
+
deserialized = deserializeAws_json1_1BatchExecuteStatementException(body, context);
|
|
720
|
+
exception = new BatchExecuteStatementException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
721
|
+
return [2, __decorateServiceException(exception, body)];
|
|
722
|
+
});
|
|
723
|
+
}); };
|
|
724
|
+
var deserializeAws_json1_1DatabaseConnectionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
725
|
+
var body, deserialized, exception;
|
|
726
|
+
return __generator(this, function (_a) {
|
|
727
|
+
body = parsedOutput.body;
|
|
728
|
+
deserialized = deserializeAws_json1_1DatabaseConnectionException(body, context);
|
|
729
|
+
exception = new DatabaseConnectionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
730
|
+
return [2, __decorateServiceException(exception, body)];
|
|
731
|
+
});
|
|
732
|
+
}); };
|
|
733
|
+
var deserializeAws_json1_1ExecuteStatementExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
734
|
+
var body, deserialized, exception;
|
|
735
|
+
return __generator(this, function (_a) {
|
|
736
|
+
body = parsedOutput.body;
|
|
737
|
+
deserialized = deserializeAws_json1_1ExecuteStatementException(body, context);
|
|
738
|
+
exception = new ExecuteStatementException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
739
|
+
return [2, __decorateServiceException(exception, body)];
|
|
740
|
+
});
|
|
741
|
+
}); };
|
|
742
|
+
var deserializeAws_json1_1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
743
|
+
var body, deserialized, exception;
|
|
744
|
+
return __generator(this, function (_a) {
|
|
745
|
+
body = parsedOutput.body;
|
|
746
|
+
deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
747
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
748
|
+
return [2, __decorateServiceException(exception, body)];
|
|
749
|
+
});
|
|
750
|
+
}); };
|
|
751
|
+
var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
752
|
+
var body, deserialized, exception;
|
|
753
|
+
return __generator(this, function (_a) {
|
|
754
|
+
body = parsedOutput.body;
|
|
755
|
+
deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
756
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
757
|
+
return [2, __decorateServiceException(exception, body)];
|
|
758
|
+
});
|
|
759
|
+
}); };
|
|
760
|
+
var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
761
|
+
var body, deserialized, exception;
|
|
762
|
+
return __generator(this, function (_a) {
|
|
763
|
+
body = parsedOutput.body;
|
|
764
|
+
deserialized = deserializeAws_json1_1ValidationException(body, context);
|
|
765
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
766
|
+
return [2, __decorateServiceException(exception, body)];
|
|
767
|
+
});
|
|
768
|
+
}); };
|
|
769
|
+
var serializeAws_json1_1BatchExecuteStatementInput = function (input, context) {
|
|
770
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.Sqls != null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) })), (input.StatementName != null && { StatementName: input.StatementName })), (input.WithEvent != null && { WithEvent: input.WithEvent })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
559
771
|
};
|
|
560
|
-
|
|
561
|
-
return {
|
|
562
|
-
...(input.Id != null && { Id: input.Id }),
|
|
563
|
-
};
|
|
772
|
+
var serializeAws_json1_1CancelStatementRequest = function (input, context) {
|
|
773
|
+
return __assign({}, (input.Id != null && { Id: input.Id }));
|
|
564
774
|
};
|
|
565
|
-
|
|
566
|
-
return {
|
|
567
|
-
...(input.Id != null && { Id: input.Id }),
|
|
568
|
-
};
|
|
775
|
+
var serializeAws_json1_1DescribeStatementRequest = function (input, context) {
|
|
776
|
+
return __assign({}, (input.Id != null && { Id: input.Id }));
|
|
569
777
|
};
|
|
570
|
-
|
|
571
|
-
return {
|
|
572
|
-
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
573
|
-
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
574
|
-
...(input.Database != null && { Database: input.Database }),
|
|
575
|
-
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
576
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
577
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
578
|
-
...(input.Schema != null && { Schema: input.Schema }),
|
|
579
|
-
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
580
|
-
...(input.Table != null && { Table: input.Table }),
|
|
581
|
-
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
582
|
-
};
|
|
778
|
+
var serializeAws_json1_1DescribeTableRequest = function (input, context) {
|
|
779
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.Schema != null && { Schema: input.Schema })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.Table != null && { Table: input.Table })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
583
780
|
};
|
|
584
|
-
|
|
585
|
-
return {
|
|
586
|
-
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
587
|
-
...(input.Database != null && { Database: input.Database }),
|
|
588
|
-
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
589
|
-
...(input.Parameters != null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) }),
|
|
590
|
-
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
591
|
-
...(input.Sql != null && { Sql: input.Sql }),
|
|
592
|
-
...(input.StatementName != null && { StatementName: input.StatementName }),
|
|
593
|
-
...(input.WithEvent != null && { WithEvent: input.WithEvent }),
|
|
594
|
-
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
595
|
-
};
|
|
781
|
+
var serializeAws_json1_1ExecuteStatementInput = function (input, context) {
|
|
782
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.Parameters != null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.Sql != null && { Sql: input.Sql })), (input.StatementName != null && { StatementName: input.StatementName })), (input.WithEvent != null && { WithEvent: input.WithEvent })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
596
783
|
};
|
|
597
|
-
|
|
598
|
-
return {
|
|
599
|
-
...(input.Id != null && { Id: input.Id }),
|
|
600
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
601
|
-
};
|
|
784
|
+
var serializeAws_json1_1GetStatementResultRequest = function (input, context) {
|
|
785
|
+
return __assign(__assign({}, (input.Id != null && { Id: input.Id })), (input.NextToken != null && { NextToken: input.NextToken }));
|
|
602
786
|
};
|
|
603
|
-
|
|
604
|
-
return {
|
|
605
|
-
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
606
|
-
...(input.Database != null && { Database: input.Database }),
|
|
607
|
-
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
608
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
609
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
610
|
-
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
611
|
-
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
612
|
-
};
|
|
787
|
+
var serializeAws_json1_1ListDatabasesRequest = function (input, context) {
|
|
788
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
613
789
|
};
|
|
614
|
-
|
|
615
|
-
return {
|
|
616
|
-
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
617
|
-
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
618
|
-
...(input.Database != null && { Database: input.Database }),
|
|
619
|
-
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
620
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
621
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
622
|
-
...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
|
|
623
|
-
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
624
|
-
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
625
|
-
};
|
|
790
|
+
var serializeAws_json1_1ListSchemasRequest = function (input, context) {
|
|
791
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
626
792
|
};
|
|
627
|
-
|
|
628
|
-
return {
|
|
629
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
630
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
631
|
-
...(input.RoleLevel != null && { RoleLevel: input.RoleLevel }),
|
|
632
|
-
...(input.StatementName != null && { StatementName: input.StatementName }),
|
|
633
|
-
...(input.Status != null && { Status: input.Status }),
|
|
634
|
-
};
|
|
793
|
+
var serializeAws_json1_1ListStatementsRequest = function (input, context) {
|
|
794
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.RoleLevel != null && { RoleLevel: input.RoleLevel })), (input.StatementName != null && { StatementName: input.StatementName })), (input.Status != null && { Status: input.Status }));
|
|
635
795
|
};
|
|
636
|
-
|
|
637
|
-
return {
|
|
638
|
-
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
639
|
-
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
640
|
-
...(input.Database != null && { Database: input.Database }),
|
|
641
|
-
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
642
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
643
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
644
|
-
...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
|
|
645
|
-
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
646
|
-
...(input.TablePattern != null && { TablePattern: input.TablePattern }),
|
|
647
|
-
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
648
|
-
};
|
|
796
|
+
var serializeAws_json1_1ListTablesRequest = function (input, context) {
|
|
797
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.TablePattern != null && { TablePattern: input.TablePattern })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
649
798
|
};
|
|
650
|
-
|
|
799
|
+
var serializeAws_json1_1SqlList = function (input, context) {
|
|
651
800
|
return input
|
|
652
|
-
.filter((e)
|
|
653
|
-
.map((entry)
|
|
801
|
+
.filter(function (e) { return e != null; })
|
|
802
|
+
.map(function (entry) {
|
|
654
803
|
return entry;
|
|
655
804
|
});
|
|
656
805
|
};
|
|
657
|
-
|
|
658
|
-
return {
|
|
659
|
-
...(input.name != null && { name: input.name }),
|
|
660
|
-
...(input.value != null && { value: input.value }),
|
|
661
|
-
};
|
|
806
|
+
var serializeAws_json1_1SqlParameter = function (input, context) {
|
|
807
|
+
return __assign(__assign({}, (input.name != null && { name: input.name })), (input.value != null && { value: input.value }));
|
|
662
808
|
};
|
|
663
|
-
|
|
809
|
+
var serializeAws_json1_1SqlParametersList = function (input, context) {
|
|
664
810
|
return input
|
|
665
|
-
.filter((e)
|
|
666
|
-
.map((entry)
|
|
811
|
+
.filter(function (e) { return e != null; })
|
|
812
|
+
.map(function (entry) {
|
|
667
813
|
return serializeAws_json1_1SqlParameter(entry, context);
|
|
668
814
|
});
|
|
669
815
|
};
|
|
670
|
-
|
|
816
|
+
var deserializeAws_json1_1ActiveStatementsExceededException = function (output, context) {
|
|
671
817
|
return {
|
|
672
818
|
Message: __expectString(output.Message),
|
|
673
819
|
};
|
|
674
820
|
};
|
|
675
|
-
|
|
821
|
+
var deserializeAws_json1_1BatchExecuteStatementException = function (output, context) {
|
|
676
822
|
return {
|
|
677
823
|
Message: __expectString(output.Message),
|
|
678
824
|
StatementId: __expectString(output.StatementId),
|
|
679
825
|
};
|
|
680
826
|
};
|
|
681
|
-
|
|
827
|
+
var deserializeAws_json1_1BatchExecuteStatementOutput = function (output, context) {
|
|
682
828
|
return {
|
|
683
829
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
684
830
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -689,15 +835,15 @@ const deserializeAws_json1_1BatchExecuteStatementOutput = (output, context) => {
|
|
|
689
835
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
690
836
|
};
|
|
691
837
|
};
|
|
692
|
-
|
|
838
|
+
var deserializeAws_json1_1CancelStatementResponse = function (output, context) {
|
|
693
839
|
return {
|
|
694
840
|
Status: __expectBoolean(output.Status),
|
|
695
841
|
};
|
|
696
842
|
};
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
.filter((e)
|
|
700
|
-
.map((entry)
|
|
843
|
+
var deserializeAws_json1_1ColumnList = function (output, context) {
|
|
844
|
+
var retVal = (output || [])
|
|
845
|
+
.filter(function (e) { return e != null; })
|
|
846
|
+
.map(function (entry) {
|
|
701
847
|
if (entry === null) {
|
|
702
848
|
return null;
|
|
703
849
|
}
|
|
@@ -705,7 +851,7 @@ const deserializeAws_json1_1ColumnList = (output, context) => {
|
|
|
705
851
|
});
|
|
706
852
|
return retVal;
|
|
707
853
|
};
|
|
708
|
-
|
|
854
|
+
var deserializeAws_json1_1ColumnMetadata = function (output, context) {
|
|
709
855
|
return {
|
|
710
856
|
columnDefault: __expectString(output.columnDefault),
|
|
711
857
|
isCaseSensitive: __expectBoolean(output.isCaseSensitive),
|
|
@@ -722,10 +868,10 @@ const deserializeAws_json1_1ColumnMetadata = (output, context) => {
|
|
|
722
868
|
typeName: __expectString(output.typeName),
|
|
723
869
|
};
|
|
724
870
|
};
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
.filter((e)
|
|
728
|
-
.map((entry)
|
|
871
|
+
var deserializeAws_json1_1ColumnMetadataList = function (output, context) {
|
|
872
|
+
var retVal = (output || [])
|
|
873
|
+
.filter(function (e) { return e != null; })
|
|
874
|
+
.map(function (entry) {
|
|
729
875
|
if (entry === null) {
|
|
730
876
|
return null;
|
|
731
877
|
}
|
|
@@ -733,15 +879,15 @@ const deserializeAws_json1_1ColumnMetadataList = (output, context) => {
|
|
|
733
879
|
});
|
|
734
880
|
return retVal;
|
|
735
881
|
};
|
|
736
|
-
|
|
882
|
+
var deserializeAws_json1_1DatabaseConnectionException = function (output, context) {
|
|
737
883
|
return {
|
|
738
884
|
Message: __expectString(output.Message),
|
|
739
885
|
};
|
|
740
886
|
};
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
.filter((e)
|
|
744
|
-
.map((entry)
|
|
887
|
+
var deserializeAws_json1_1DatabaseList = function (output, context) {
|
|
888
|
+
var retVal = (output || [])
|
|
889
|
+
.filter(function (e) { return e != null; })
|
|
890
|
+
.map(function (entry) {
|
|
745
891
|
if (entry === null) {
|
|
746
892
|
return null;
|
|
747
893
|
}
|
|
@@ -749,7 +895,7 @@ const deserializeAws_json1_1DatabaseList = (output, context) => {
|
|
|
749
895
|
});
|
|
750
896
|
return retVal;
|
|
751
897
|
};
|
|
752
|
-
|
|
898
|
+
var deserializeAws_json1_1DescribeStatementResponse = function (output, context) {
|
|
753
899
|
return {
|
|
754
900
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
755
901
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -774,20 +920,20 @@ const deserializeAws_json1_1DescribeStatementResponse = (output, context) => {
|
|
|
774
920
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
775
921
|
};
|
|
776
922
|
};
|
|
777
|
-
|
|
923
|
+
var deserializeAws_json1_1DescribeTableResponse = function (output, context) {
|
|
778
924
|
return {
|
|
779
925
|
ColumnList: output.ColumnList != null ? deserializeAws_json1_1ColumnList(output.ColumnList, context) : undefined,
|
|
780
926
|
NextToken: __expectString(output.NextToken),
|
|
781
927
|
TableName: __expectString(output.TableName),
|
|
782
928
|
};
|
|
783
929
|
};
|
|
784
|
-
|
|
930
|
+
var deserializeAws_json1_1ExecuteStatementException = function (output, context) {
|
|
785
931
|
return {
|
|
786
932
|
Message: __expectString(output.Message),
|
|
787
933
|
StatementId: __expectString(output.StatementId),
|
|
788
934
|
};
|
|
789
935
|
};
|
|
790
|
-
|
|
936
|
+
var deserializeAws_json1_1ExecuteStatementOutput = function (output, context) {
|
|
791
937
|
return {
|
|
792
938
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
793
939
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -798,7 +944,7 @@ const deserializeAws_json1_1ExecuteStatementOutput = (output, context) => {
|
|
|
798
944
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
799
945
|
};
|
|
800
946
|
};
|
|
801
|
-
|
|
947
|
+
var deserializeAws_json1_1Field = function (output, context) {
|
|
802
948
|
if (output.blobValue != null) {
|
|
803
949
|
return {
|
|
804
950
|
blobValue: context.base64Decoder(output.blobValue),
|
|
@@ -821,10 +967,10 @@ const deserializeAws_json1_1Field = (output, context) => {
|
|
|
821
967
|
}
|
|
822
968
|
return { $unknown: Object.entries(output)[0] };
|
|
823
969
|
};
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
.filter((e)
|
|
827
|
-
.map((entry)
|
|
970
|
+
var deserializeAws_json1_1FieldList = function (output, context) {
|
|
971
|
+
var retVal = (output || [])
|
|
972
|
+
.filter(function (e) { return e != null; })
|
|
973
|
+
.map(function (entry) {
|
|
828
974
|
if (entry === null) {
|
|
829
975
|
return null;
|
|
830
976
|
}
|
|
@@ -832,7 +978,7 @@ const deserializeAws_json1_1FieldList = (output, context) => {
|
|
|
832
978
|
});
|
|
833
979
|
return retVal;
|
|
834
980
|
};
|
|
835
|
-
|
|
981
|
+
var deserializeAws_json1_1GetStatementResultResponse = function (output, context) {
|
|
836
982
|
return {
|
|
837
983
|
ColumnMetadata: output.ColumnMetadata != null
|
|
838
984
|
? deserializeAws_json1_1ColumnMetadataList(output.ColumnMetadata, context)
|
|
@@ -842,45 +988,45 @@ const deserializeAws_json1_1GetStatementResultResponse = (output, context) => {
|
|
|
842
988
|
TotalNumRows: __expectLong(output.TotalNumRows),
|
|
843
989
|
};
|
|
844
990
|
};
|
|
845
|
-
|
|
991
|
+
var deserializeAws_json1_1InternalServerException = function (output, context) {
|
|
846
992
|
return {
|
|
847
993
|
Message: __expectString(output.Message),
|
|
848
994
|
};
|
|
849
995
|
};
|
|
850
|
-
|
|
996
|
+
var deserializeAws_json1_1ListDatabasesResponse = function (output, context) {
|
|
851
997
|
return {
|
|
852
998
|
Databases: output.Databases != null ? deserializeAws_json1_1DatabaseList(output.Databases, context) : undefined,
|
|
853
999
|
NextToken: __expectString(output.NextToken),
|
|
854
1000
|
};
|
|
855
1001
|
};
|
|
856
|
-
|
|
1002
|
+
var deserializeAws_json1_1ListSchemasResponse = function (output, context) {
|
|
857
1003
|
return {
|
|
858
1004
|
NextToken: __expectString(output.NextToken),
|
|
859
1005
|
Schemas: output.Schemas != null ? deserializeAws_json1_1SchemaList(output.Schemas, context) : undefined,
|
|
860
1006
|
};
|
|
861
1007
|
};
|
|
862
|
-
|
|
1008
|
+
var deserializeAws_json1_1ListStatementsResponse = function (output, context) {
|
|
863
1009
|
return {
|
|
864
1010
|
NextToken: __expectString(output.NextToken),
|
|
865
1011
|
Statements: output.Statements != null ? deserializeAws_json1_1StatementList(output.Statements, context) : undefined,
|
|
866
1012
|
};
|
|
867
1013
|
};
|
|
868
|
-
|
|
1014
|
+
var deserializeAws_json1_1ListTablesResponse = function (output, context) {
|
|
869
1015
|
return {
|
|
870
1016
|
NextToken: __expectString(output.NextToken),
|
|
871
1017
|
Tables: output.Tables != null ? deserializeAws_json1_1TableList(output.Tables, context) : undefined,
|
|
872
1018
|
};
|
|
873
1019
|
};
|
|
874
|
-
|
|
1020
|
+
var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
|
|
875
1021
|
return {
|
|
876
1022
|
Message: __expectString(output.Message),
|
|
877
1023
|
ResourceId: __expectString(output.ResourceId),
|
|
878
1024
|
};
|
|
879
1025
|
};
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
.filter((e)
|
|
883
|
-
.map((entry)
|
|
1026
|
+
var deserializeAws_json1_1SchemaList = function (output, context) {
|
|
1027
|
+
var retVal = (output || [])
|
|
1028
|
+
.filter(function (e) { return e != null; })
|
|
1029
|
+
.map(function (entry) {
|
|
884
1030
|
if (entry === null) {
|
|
885
1031
|
return null;
|
|
886
1032
|
}
|
|
@@ -888,16 +1034,16 @@ const deserializeAws_json1_1SchemaList = (output, context) => {
|
|
|
888
1034
|
});
|
|
889
1035
|
return retVal;
|
|
890
1036
|
};
|
|
891
|
-
|
|
1037
|
+
var deserializeAws_json1_1SqlParameter = function (output, context) {
|
|
892
1038
|
return {
|
|
893
1039
|
name: __expectString(output.name),
|
|
894
1040
|
value: __expectString(output.value),
|
|
895
1041
|
};
|
|
896
1042
|
};
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
.filter((e)
|
|
900
|
-
.map((entry)
|
|
1043
|
+
var deserializeAws_json1_1SqlParametersList = function (output, context) {
|
|
1044
|
+
var retVal = (output || [])
|
|
1045
|
+
.filter(function (e) { return e != null; })
|
|
1046
|
+
.map(function (entry) {
|
|
901
1047
|
if (entry === null) {
|
|
902
1048
|
return null;
|
|
903
1049
|
}
|
|
@@ -905,10 +1051,10 @@ const deserializeAws_json1_1SqlParametersList = (output, context) => {
|
|
|
905
1051
|
});
|
|
906
1052
|
return retVal;
|
|
907
1053
|
};
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
.filter((e)
|
|
911
|
-
.map((entry)
|
|
1054
|
+
var deserializeAws_json1_1SqlRecords = function (output, context) {
|
|
1055
|
+
var retVal = (output || [])
|
|
1056
|
+
.filter(function (e) { return e != null; })
|
|
1057
|
+
.map(function (entry) {
|
|
912
1058
|
if (entry === null) {
|
|
913
1059
|
return null;
|
|
914
1060
|
}
|
|
@@ -916,7 +1062,7 @@ const deserializeAws_json1_1SqlRecords = (output, context) => {
|
|
|
916
1062
|
});
|
|
917
1063
|
return retVal;
|
|
918
1064
|
};
|
|
919
|
-
|
|
1065
|
+
var deserializeAws_json1_1StatementData = function (output, context) {
|
|
920
1066
|
return {
|
|
921
1067
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
922
1068
|
Id: __expectString(output.Id),
|
|
@@ -932,10 +1078,10 @@ const deserializeAws_json1_1StatementData = (output, context) => {
|
|
|
932
1078
|
UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
|
|
933
1079
|
};
|
|
934
1080
|
};
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
.filter((e)
|
|
938
|
-
.map((entry)
|
|
1081
|
+
var deserializeAws_json1_1StatementList = function (output, context) {
|
|
1082
|
+
var retVal = (output || [])
|
|
1083
|
+
.filter(function (e) { return e != null; })
|
|
1084
|
+
.map(function (entry) {
|
|
939
1085
|
if (entry === null) {
|
|
940
1086
|
return null;
|
|
941
1087
|
}
|
|
@@ -943,10 +1089,10 @@ const deserializeAws_json1_1StatementList = (output, context) => {
|
|
|
943
1089
|
});
|
|
944
1090
|
return retVal;
|
|
945
1091
|
};
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
.filter((e)
|
|
949
|
-
.map((entry)
|
|
1092
|
+
var deserializeAws_json1_1StatementStringList = function (output, context) {
|
|
1093
|
+
var retVal = (output || [])
|
|
1094
|
+
.filter(function (e) { return e != null; })
|
|
1095
|
+
.map(function (entry) {
|
|
950
1096
|
if (entry === null) {
|
|
951
1097
|
return null;
|
|
952
1098
|
}
|
|
@@ -954,7 +1100,7 @@ const deserializeAws_json1_1StatementStringList = (output, context) => {
|
|
|
954
1100
|
});
|
|
955
1101
|
return retVal;
|
|
956
1102
|
};
|
|
957
|
-
|
|
1103
|
+
var deserializeAws_json1_1SubStatementData = function (output, context) {
|
|
958
1104
|
return {
|
|
959
1105
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
960
1106
|
Duration: __expectLong(output.Duration),
|
|
@@ -969,10 +1115,10 @@ const deserializeAws_json1_1SubStatementData = (output, context) => {
|
|
|
969
1115
|
UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
|
|
970
1116
|
};
|
|
971
1117
|
};
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
.filter((e)
|
|
975
|
-
.map((entry)
|
|
1118
|
+
var deserializeAws_json1_1SubStatementList = function (output, context) {
|
|
1119
|
+
var retVal = (output || [])
|
|
1120
|
+
.filter(function (e) { return e != null; })
|
|
1121
|
+
.map(function (entry) {
|
|
976
1122
|
if (entry === null) {
|
|
977
1123
|
return null;
|
|
978
1124
|
}
|
|
@@ -980,10 +1126,10 @@ const deserializeAws_json1_1SubStatementList = (output, context) => {
|
|
|
980
1126
|
});
|
|
981
1127
|
return retVal;
|
|
982
1128
|
};
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
.filter((e)
|
|
986
|
-
.map((entry)
|
|
1129
|
+
var deserializeAws_json1_1TableList = function (output, context) {
|
|
1130
|
+
var retVal = (output || [])
|
|
1131
|
+
.filter(function (e) { return e != null; })
|
|
1132
|
+
.map(function (entry) {
|
|
987
1133
|
if (entry === null) {
|
|
988
1134
|
return null;
|
|
989
1135
|
}
|
|
@@ -991,64 +1137,87 @@ const deserializeAws_json1_1TableList = (output, context) => {
|
|
|
991
1137
|
});
|
|
992
1138
|
return retVal;
|
|
993
1139
|
};
|
|
994
|
-
|
|
1140
|
+
var deserializeAws_json1_1TableMember = function (output, context) {
|
|
995
1141
|
return {
|
|
996
1142
|
name: __expectString(output.name),
|
|
997
1143
|
schema: __expectString(output.schema),
|
|
998
1144
|
type: __expectString(output.type),
|
|
999
1145
|
};
|
|
1000
1146
|
};
|
|
1001
|
-
|
|
1147
|
+
var deserializeAws_json1_1ValidationException = function (output, context) {
|
|
1002
1148
|
return {
|
|
1003
1149
|
Message: __expectString(output.Message),
|
|
1004
1150
|
};
|
|
1005
1151
|
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1152
|
+
var deserializeMetadata = function (output) {
|
|
1153
|
+
var _a, _b;
|
|
1154
|
+
return ({
|
|
1155
|
+
httpStatusCode: output.statusCode,
|
|
1156
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1157
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1158
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1159
|
+
});
|
|
1160
|
+
};
|
|
1161
|
+
var collectBody = function (streamBody, context) {
|
|
1162
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1013
1163
|
if (streamBody instanceof Uint8Array) {
|
|
1014
1164
|
return Promise.resolve(streamBody);
|
|
1015
1165
|
}
|
|
1016
1166
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1017
1167
|
};
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1168
|
+
var collectBodyString = function (streamBody, context) {
|
|
1169
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1170
|
+
};
|
|
1171
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1172
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
1173
|
+
return __generator(this, function (_c) {
|
|
1174
|
+
switch (_c.label) {
|
|
1175
|
+
case 0: return [4, context.endpoint()];
|
|
1176
|
+
case 1:
|
|
1177
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1178
|
+
contents = {
|
|
1179
|
+
protocol: protocol,
|
|
1180
|
+
hostname: hostname,
|
|
1181
|
+
port: port,
|
|
1182
|
+
method: "POST",
|
|
1183
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1184
|
+
headers: headers,
|
|
1185
|
+
};
|
|
1186
|
+
if (resolvedHostname !== undefined) {
|
|
1187
|
+
contents.hostname = resolvedHostname;
|
|
1188
|
+
}
|
|
1189
|
+
if (body !== undefined) {
|
|
1190
|
+
contents.body = body;
|
|
1191
|
+
}
|
|
1192
|
+
return [2, new __HttpRequest(contents)];
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
}); };
|
|
1196
|
+
var parseBody = function (streamBody, context) {
|
|
1197
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1198
|
+
if (encoded.length) {
|
|
1199
|
+
return JSON.parse(encoded);
|
|
1200
|
+
}
|
|
1201
|
+
return {};
|
|
1202
|
+
});
|
|
1047
1203
|
};
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1204
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1205
|
+
var value;
|
|
1206
|
+
var _a;
|
|
1207
|
+
return __generator(this, function (_b) {
|
|
1208
|
+
switch (_b.label) {
|
|
1209
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1210
|
+
case 1:
|
|
1211
|
+
value = _b.sent();
|
|
1212
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1213
|
+
return [2, value];
|
|
1214
|
+
}
|
|
1215
|
+
});
|
|
1216
|
+
}); };
|
|
1217
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1218
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1219
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1220
|
+
var cleanValue = rawValue;
|
|
1052
1221
|
if (typeof cleanValue === "number") {
|
|
1053
1222
|
cleanValue = cleanValue.toString();
|
|
1054
1223
|
}
|
|
@@ -1063,7 +1232,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1063
1232
|
}
|
|
1064
1233
|
return cleanValue;
|
|
1065
1234
|
};
|
|
1066
|
-
|
|
1235
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1067
1236
|
if (headerKey !== undefined) {
|
|
1068
1237
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1069
1238
|
}
|