@aws-sdk/client-redshift-data 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/RedshiftData.js +0 -8
- package/dist-cjs/RedshiftDataClient.js +0 -13
- package/dist-cjs/commands/BatchExecuteStatementCommand.js +0 -39
- package/dist-cjs/commands/CancelStatementCommand.js +0 -25
- package/dist-cjs/commands/DescribeStatementCommand.js +0 -27
- package/dist-cjs/commands/DescribeTableCommand.js +0 -40
- package/dist-cjs/commands/ExecuteStatementCommand.js +0 -39
- package/dist-cjs/commands/GetStatementResultCommand.js +0 -26
- package/dist-cjs/commands/ListDatabasesCommand.js +0 -39
- package/dist-cjs/commands/ListSchemasCommand.js +0 -39
- package/dist-cjs/commands/ListStatementsCommand.js +0 -26
- package/dist-cjs/commands/ListTablesCommand.js +0 -40
- package/dist-cjs/commands/index.js +13 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -20
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -97
- package/dist-cjs/pagination/DescribeTablePaginator.js +0 -11
- package/dist-cjs/pagination/GetStatementResultPaginator.js +0 -11
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDatabasesPaginator.js +0 -11
- package/dist-cjs/pagination/ListSchemasPaginator.js +0 -11
- package/dist-cjs/pagination/ListStatementsPaginator.js +0 -11
- package/dist-cjs/pagination/ListTablesPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +10 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/RedshiftData.js +0 -1
- package/dist-es/RedshiftDataClient.js +0 -1
- package/dist-es/commands/BatchExecuteStatementCommand.js +0 -1
- package/dist-es/commands/CancelStatementCommand.js +0 -1
- package/dist-es/commands/DescribeStatementCommand.js +0 -1
- package/dist-es/commands/DescribeTableCommand.js +0 -1
- package/dist-es/commands/ExecuteStatementCommand.js +0 -1
- package/dist-es/commands/GetStatementResultCommand.js +0 -1
- package/dist-es/commands/ListDatabasesCommand.js +0 -1
- package/dist-es/commands/ListSchemasCommand.js +0 -1
- package/dist-es/commands/ListStatementsCommand.js +0 -1
- package/dist-es/commands/ListTablesCommand.js +0 -1
- package/dist-es/commands/index.js +10 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -20
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/DescribeTablePaginator.js +0 -1
- package/dist-es/pagination/GetStatementResultPaginator.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListDatabasesPaginator.js +0 -1
- package/dist-es/pagination/ListSchemasPaginator.js +0 -1
- package/dist-es/pagination/ListStatementsPaginator.js +0 -1
- package/dist-es/pagination/ListTablesPaginator.js +0 -1
- package/dist-es/pagination/index.js +7 -0
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +10 -0
- package/dist-types/index.d.ts +4 -19
- package/dist-types/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/RedshiftData.d.ts +11 -127
- package/dist-types/ts3.4/RedshiftDataClient.d.ts +24 -93
- package/dist-types/ts3.4/commands/BatchExecuteStatementCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/CancelStatementCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeStatementCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DescribeTableCommand.d.ts +2 -35
- package/dist-types/ts3.4/commands/ExecuteStatementCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/GetStatementResultCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/ListSchemasCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/ListStatementsCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +2 -35
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/index.d.ts +4 -19
- package/dist-types/ts3.4/models/models_0.d.ts +198 -688
- package/dist-types/ts3.4/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/RedshiftData.js.map +0 -1
- package/dist-cjs/RedshiftDataClient.js.map +0 -1
- package/dist-cjs/commands/BatchExecuteStatementCommand.js.map +0 -1
- package/dist-cjs/commands/CancelStatementCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeStatementCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeTableCommand.js.map +0 -1
- package/dist-cjs/commands/ExecuteStatementCommand.js.map +0 -1
- package/dist-cjs/commands/GetStatementResultCommand.js.map +0 -1
- package/dist-cjs/commands/ListDatabasesCommand.js.map +0 -1
- package/dist-cjs/commands/ListSchemasCommand.js.map +0 -1
- package/dist-cjs/commands/ListStatementsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTablesCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/DescribeTablePaginator.js.map +0 -1
- package/dist-cjs/pagination/GetStatementResultPaginator.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListDatabasesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListStatementsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTablesPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/RedshiftData.js.map +0 -1
- package/dist-es/RedshiftDataClient.js.map +0 -1
- package/dist-es/commands/BatchExecuteStatementCommand.js.map +0 -1
- package/dist-es/commands/CancelStatementCommand.js.map +0 -1
- package/dist-es/commands/DescribeStatementCommand.js.map +0 -1
- package/dist-es/commands/DescribeTableCommand.js.map +0 -1
- package/dist-es/commands/ExecuteStatementCommand.js.map +0 -1
- package/dist-es/commands/GetStatementResultCommand.js.map +0 -1
- package/dist-es/commands/ListDatabasesCommand.js.map +0 -1
- package/dist-es/commands/ListSchemasCommand.js.map +0 -1
- package/dist-es/commands/ListStatementsCommand.js.map +0 -1
- package/dist-es/commands/ListTablesCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/DescribeTablePaginator.js.map +0 -1
- package/dist-es/pagination/GetStatementResultPaginator.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListDatabasesPaginator.js.map +0 -1
- package/dist-es/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist-es/pagination/ListStatementsPaginator.js.map +0 -1
- package/dist-es/pagination/ListTablesPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/RedshiftData.ts +0 -452
- package/src/RedshiftDataClient.ts +0 -273
- package/src/commands/BatchExecuteStatementCommand.ts +0 -109
- package/src/commands/CancelStatementCommand.ts +0 -95
- package/src/commands/DescribeStatementCommand.ts +0 -97
- package/src/commands/DescribeTableCommand.ts +0 -110
- package/src/commands/ExecuteStatementCommand.ts +0 -109
- package/src/commands/GetStatementResultCommand.ts +0 -96
- package/src/commands/ListDatabasesCommand.ts +0 -109
- package/src/commands/ListSchemasCommand.ts +0 -109
- package/src/commands/ListStatementsCommand.ts +0 -96
- package/src/commands/ListTablesCommand.ts +0 -110
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -20
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1379
- package/src/pagination/DescribeTablePaginator.ts +0 -59
- package/src/pagination/GetStatementResultPaginator.ts +0 -58
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDatabasesPaginator.ts +0 -59
- package/src/pagination/ListSchemasPaginator.ts +0 -55
- package/src/pagination/ListStatementsPaginator.ts +0 -59
- package/src/pagination/ListTablesPaginator.ts +0 -55
- package/src/protocols/Aws_json1_1.ts +0 -1615
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,1615 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectBoolean as __expectBoolean,
|
|
4
|
-
expectInt32 as __expectInt32,
|
|
5
|
-
expectLong as __expectLong,
|
|
6
|
-
expectNonNull as __expectNonNull,
|
|
7
|
-
expectNumber as __expectNumber,
|
|
8
|
-
expectString as __expectString,
|
|
9
|
-
expectUnion as __expectUnion,
|
|
10
|
-
limitedParseDouble as __limitedParseDouble,
|
|
11
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
12
|
-
} from "@aws-sdk/smithy-client";
|
|
13
|
-
import {
|
|
14
|
-
Endpoint as __Endpoint,
|
|
15
|
-
HeaderBag as __HeaderBag,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
ResponseMetadata as __ResponseMetadata,
|
|
18
|
-
SerdeContext as __SerdeContext,
|
|
19
|
-
SmithyException as __SmithyException,
|
|
20
|
-
} from "@aws-sdk/types";
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
BatchExecuteStatementCommandInput,
|
|
24
|
-
BatchExecuteStatementCommandOutput,
|
|
25
|
-
} from "../commands/BatchExecuteStatementCommand";
|
|
26
|
-
import { CancelStatementCommandInput, CancelStatementCommandOutput } from "../commands/CancelStatementCommand";
|
|
27
|
-
import { DescribeStatementCommandInput, DescribeStatementCommandOutput } from "../commands/DescribeStatementCommand";
|
|
28
|
-
import { DescribeTableCommandInput, DescribeTableCommandOutput } from "../commands/DescribeTableCommand";
|
|
29
|
-
import { ExecuteStatementCommandInput, ExecuteStatementCommandOutput } from "../commands/ExecuteStatementCommand";
|
|
30
|
-
import { GetStatementResultCommandInput, GetStatementResultCommandOutput } from "../commands/GetStatementResultCommand";
|
|
31
|
-
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "../commands/ListDatabasesCommand";
|
|
32
|
-
import { ListSchemasCommandInput, ListSchemasCommandOutput } from "../commands/ListSchemasCommand";
|
|
33
|
-
import { ListStatementsCommandInput, ListStatementsCommandOutput } from "../commands/ListStatementsCommand";
|
|
34
|
-
import { ListTablesCommandInput, ListTablesCommandOutput } from "../commands/ListTablesCommand";
|
|
35
|
-
import {
|
|
36
|
-
ActiveStatementsExceededException,
|
|
37
|
-
BatchExecuteStatementException,
|
|
38
|
-
BatchExecuteStatementInput,
|
|
39
|
-
BatchExecuteStatementOutput,
|
|
40
|
-
CancelStatementRequest,
|
|
41
|
-
CancelStatementResponse,
|
|
42
|
-
ColumnMetadata,
|
|
43
|
-
DescribeStatementRequest,
|
|
44
|
-
DescribeStatementResponse,
|
|
45
|
-
DescribeTableRequest,
|
|
46
|
-
DescribeTableResponse,
|
|
47
|
-
ExecuteStatementException,
|
|
48
|
-
ExecuteStatementInput,
|
|
49
|
-
ExecuteStatementOutput,
|
|
50
|
-
Field,
|
|
51
|
-
GetStatementResultRequest,
|
|
52
|
-
GetStatementResultResponse,
|
|
53
|
-
InternalServerException,
|
|
54
|
-
ListDatabasesRequest,
|
|
55
|
-
ListDatabasesResponse,
|
|
56
|
-
ListSchemasRequest,
|
|
57
|
-
ListSchemasResponse,
|
|
58
|
-
ListStatementsRequest,
|
|
59
|
-
ListStatementsResponse,
|
|
60
|
-
ListTablesRequest,
|
|
61
|
-
ListTablesResponse,
|
|
62
|
-
ResourceNotFoundException,
|
|
63
|
-
SqlParameter,
|
|
64
|
-
StatementData,
|
|
65
|
-
SubStatementData,
|
|
66
|
-
TableMember,
|
|
67
|
-
ValidationException,
|
|
68
|
-
} from "../models/models_0";
|
|
69
|
-
|
|
70
|
-
export const serializeAws_json1_1BatchExecuteStatementCommand = async (
|
|
71
|
-
input: BatchExecuteStatementCommandInput,
|
|
72
|
-
context: __SerdeContext
|
|
73
|
-
): Promise<__HttpRequest> => {
|
|
74
|
-
const headers: __HeaderBag = {
|
|
75
|
-
"content-type": "application/x-amz-json-1.1",
|
|
76
|
-
"x-amz-target": "RedshiftData.BatchExecuteStatement",
|
|
77
|
-
};
|
|
78
|
-
let body: any;
|
|
79
|
-
body = JSON.stringify(serializeAws_json1_1BatchExecuteStatementInput(input, context));
|
|
80
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const serializeAws_json1_1CancelStatementCommand = async (
|
|
84
|
-
input: CancelStatementCommandInput,
|
|
85
|
-
context: __SerdeContext
|
|
86
|
-
): Promise<__HttpRequest> => {
|
|
87
|
-
const headers: __HeaderBag = {
|
|
88
|
-
"content-type": "application/x-amz-json-1.1",
|
|
89
|
-
"x-amz-target": "RedshiftData.CancelStatement",
|
|
90
|
-
};
|
|
91
|
-
let body: any;
|
|
92
|
-
body = JSON.stringify(serializeAws_json1_1CancelStatementRequest(input, context));
|
|
93
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const serializeAws_json1_1DescribeStatementCommand = async (
|
|
97
|
-
input: DescribeStatementCommandInput,
|
|
98
|
-
context: __SerdeContext
|
|
99
|
-
): Promise<__HttpRequest> => {
|
|
100
|
-
const headers: __HeaderBag = {
|
|
101
|
-
"content-type": "application/x-amz-json-1.1",
|
|
102
|
-
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
103
|
-
};
|
|
104
|
-
let body: any;
|
|
105
|
-
body = JSON.stringify(serializeAws_json1_1DescribeStatementRequest(input, context));
|
|
106
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const serializeAws_json1_1DescribeTableCommand = async (
|
|
110
|
-
input: DescribeTableCommandInput,
|
|
111
|
-
context: __SerdeContext
|
|
112
|
-
): Promise<__HttpRequest> => {
|
|
113
|
-
const headers: __HeaderBag = {
|
|
114
|
-
"content-type": "application/x-amz-json-1.1",
|
|
115
|
-
"x-amz-target": "RedshiftData.DescribeTable",
|
|
116
|
-
};
|
|
117
|
-
let body: any;
|
|
118
|
-
body = JSON.stringify(serializeAws_json1_1DescribeTableRequest(input, context));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export const serializeAws_json1_1ExecuteStatementCommand = async (
|
|
123
|
-
input: ExecuteStatementCommandInput,
|
|
124
|
-
context: __SerdeContext
|
|
125
|
-
): Promise<__HttpRequest> => {
|
|
126
|
-
const headers: __HeaderBag = {
|
|
127
|
-
"content-type": "application/x-amz-json-1.1",
|
|
128
|
-
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
129
|
-
};
|
|
130
|
-
let body: any;
|
|
131
|
-
body = JSON.stringify(serializeAws_json1_1ExecuteStatementInput(input, context));
|
|
132
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export const serializeAws_json1_1GetStatementResultCommand = async (
|
|
136
|
-
input: GetStatementResultCommandInput,
|
|
137
|
-
context: __SerdeContext
|
|
138
|
-
): Promise<__HttpRequest> => {
|
|
139
|
-
const headers: __HeaderBag = {
|
|
140
|
-
"content-type": "application/x-amz-json-1.1",
|
|
141
|
-
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
142
|
-
};
|
|
143
|
-
let body: any;
|
|
144
|
-
body = JSON.stringify(serializeAws_json1_1GetStatementResultRequest(input, context));
|
|
145
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const serializeAws_json1_1ListDatabasesCommand = async (
|
|
149
|
-
input: ListDatabasesCommandInput,
|
|
150
|
-
context: __SerdeContext
|
|
151
|
-
): Promise<__HttpRequest> => {
|
|
152
|
-
const headers: __HeaderBag = {
|
|
153
|
-
"content-type": "application/x-amz-json-1.1",
|
|
154
|
-
"x-amz-target": "RedshiftData.ListDatabases",
|
|
155
|
-
};
|
|
156
|
-
let body: any;
|
|
157
|
-
body = JSON.stringify(serializeAws_json1_1ListDatabasesRequest(input, context));
|
|
158
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export const serializeAws_json1_1ListSchemasCommand = async (
|
|
162
|
-
input: ListSchemasCommandInput,
|
|
163
|
-
context: __SerdeContext
|
|
164
|
-
): Promise<__HttpRequest> => {
|
|
165
|
-
const headers: __HeaderBag = {
|
|
166
|
-
"content-type": "application/x-amz-json-1.1",
|
|
167
|
-
"x-amz-target": "RedshiftData.ListSchemas",
|
|
168
|
-
};
|
|
169
|
-
let body: any;
|
|
170
|
-
body = JSON.stringify(serializeAws_json1_1ListSchemasRequest(input, context));
|
|
171
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export const serializeAws_json1_1ListStatementsCommand = async (
|
|
175
|
-
input: ListStatementsCommandInput,
|
|
176
|
-
context: __SerdeContext
|
|
177
|
-
): Promise<__HttpRequest> => {
|
|
178
|
-
const headers: __HeaderBag = {
|
|
179
|
-
"content-type": "application/x-amz-json-1.1",
|
|
180
|
-
"x-amz-target": "RedshiftData.ListStatements",
|
|
181
|
-
};
|
|
182
|
-
let body: any;
|
|
183
|
-
body = JSON.stringify(serializeAws_json1_1ListStatementsRequest(input, context));
|
|
184
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export const serializeAws_json1_1ListTablesCommand = async (
|
|
188
|
-
input: ListTablesCommandInput,
|
|
189
|
-
context: __SerdeContext
|
|
190
|
-
): Promise<__HttpRequest> => {
|
|
191
|
-
const headers: __HeaderBag = {
|
|
192
|
-
"content-type": "application/x-amz-json-1.1",
|
|
193
|
-
"x-amz-target": "RedshiftData.ListTables",
|
|
194
|
-
};
|
|
195
|
-
let body: any;
|
|
196
|
-
body = JSON.stringify(serializeAws_json1_1ListTablesRequest(input, context));
|
|
197
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export const deserializeAws_json1_1BatchExecuteStatementCommand = async (
|
|
201
|
-
output: __HttpResponse,
|
|
202
|
-
context: __SerdeContext
|
|
203
|
-
): Promise<BatchExecuteStatementCommandOutput> => {
|
|
204
|
-
if (output.statusCode >= 300) {
|
|
205
|
-
return deserializeAws_json1_1BatchExecuteStatementCommandError(output, context);
|
|
206
|
-
}
|
|
207
|
-
const data: any = await parseBody(output.body, context);
|
|
208
|
-
let contents: any = {};
|
|
209
|
-
contents = deserializeAws_json1_1BatchExecuteStatementOutput(data, context);
|
|
210
|
-
const response: BatchExecuteStatementCommandOutput = {
|
|
211
|
-
$metadata: deserializeMetadata(output),
|
|
212
|
-
...contents,
|
|
213
|
-
};
|
|
214
|
-
return Promise.resolve(response);
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
const deserializeAws_json1_1BatchExecuteStatementCommandError = async (
|
|
218
|
-
output: __HttpResponse,
|
|
219
|
-
context: __SerdeContext
|
|
220
|
-
): Promise<BatchExecuteStatementCommandOutput> => {
|
|
221
|
-
const parsedOutput: any = {
|
|
222
|
-
...output,
|
|
223
|
-
body: await parseBody(output.body, context),
|
|
224
|
-
};
|
|
225
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
226
|
-
let errorCode = "UnknownError";
|
|
227
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
228
|
-
switch (errorCode) {
|
|
229
|
-
case "ActiveStatementsExceededException":
|
|
230
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
231
|
-
response = {
|
|
232
|
-
...(await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context)),
|
|
233
|
-
name: errorCode,
|
|
234
|
-
$metadata: deserializeMetadata(output),
|
|
235
|
-
};
|
|
236
|
-
break;
|
|
237
|
-
case "BatchExecuteStatementException":
|
|
238
|
-
case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
|
|
239
|
-
response = {
|
|
240
|
-
...(await deserializeAws_json1_1BatchExecuteStatementExceptionResponse(parsedOutput, context)),
|
|
241
|
-
name: errorCode,
|
|
242
|
-
$metadata: deserializeMetadata(output),
|
|
243
|
-
};
|
|
244
|
-
break;
|
|
245
|
-
case "ValidationException":
|
|
246
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
247
|
-
response = {
|
|
248
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
249
|
-
name: errorCode,
|
|
250
|
-
$metadata: deserializeMetadata(output),
|
|
251
|
-
};
|
|
252
|
-
break;
|
|
253
|
-
default:
|
|
254
|
-
const parsedBody = parsedOutput.body;
|
|
255
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
256
|
-
response = {
|
|
257
|
-
...parsedBody,
|
|
258
|
-
name: `${errorCode}`,
|
|
259
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
260
|
-
$fault: "client",
|
|
261
|
-
$metadata: deserializeMetadata(output),
|
|
262
|
-
} as any;
|
|
263
|
-
}
|
|
264
|
-
const message = response.message || response.Message || errorCode;
|
|
265
|
-
response.message = message;
|
|
266
|
-
delete response.Message;
|
|
267
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
export const deserializeAws_json1_1CancelStatementCommand = async (
|
|
271
|
-
output: __HttpResponse,
|
|
272
|
-
context: __SerdeContext
|
|
273
|
-
): Promise<CancelStatementCommandOutput> => {
|
|
274
|
-
if (output.statusCode >= 300) {
|
|
275
|
-
return deserializeAws_json1_1CancelStatementCommandError(output, context);
|
|
276
|
-
}
|
|
277
|
-
const data: any = await parseBody(output.body, context);
|
|
278
|
-
let contents: any = {};
|
|
279
|
-
contents = deserializeAws_json1_1CancelStatementResponse(data, context);
|
|
280
|
-
const response: CancelStatementCommandOutput = {
|
|
281
|
-
$metadata: deserializeMetadata(output),
|
|
282
|
-
...contents,
|
|
283
|
-
};
|
|
284
|
-
return Promise.resolve(response);
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
const deserializeAws_json1_1CancelStatementCommandError = async (
|
|
288
|
-
output: __HttpResponse,
|
|
289
|
-
context: __SerdeContext
|
|
290
|
-
): Promise<CancelStatementCommandOutput> => {
|
|
291
|
-
const parsedOutput: any = {
|
|
292
|
-
...output,
|
|
293
|
-
body: await parseBody(output.body, context),
|
|
294
|
-
};
|
|
295
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
296
|
-
let errorCode = "UnknownError";
|
|
297
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
298
|
-
switch (errorCode) {
|
|
299
|
-
case "InternalServerException":
|
|
300
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
301
|
-
response = {
|
|
302
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
303
|
-
name: errorCode,
|
|
304
|
-
$metadata: deserializeMetadata(output),
|
|
305
|
-
};
|
|
306
|
-
break;
|
|
307
|
-
case "ResourceNotFoundException":
|
|
308
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
309
|
-
response = {
|
|
310
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
311
|
-
name: errorCode,
|
|
312
|
-
$metadata: deserializeMetadata(output),
|
|
313
|
-
};
|
|
314
|
-
break;
|
|
315
|
-
case "ValidationException":
|
|
316
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
317
|
-
response = {
|
|
318
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
319
|
-
name: errorCode,
|
|
320
|
-
$metadata: deserializeMetadata(output),
|
|
321
|
-
};
|
|
322
|
-
break;
|
|
323
|
-
default:
|
|
324
|
-
const parsedBody = parsedOutput.body;
|
|
325
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
326
|
-
response = {
|
|
327
|
-
...parsedBody,
|
|
328
|
-
name: `${errorCode}`,
|
|
329
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
330
|
-
$fault: "client",
|
|
331
|
-
$metadata: deserializeMetadata(output),
|
|
332
|
-
} as any;
|
|
333
|
-
}
|
|
334
|
-
const message = response.message || response.Message || errorCode;
|
|
335
|
-
response.message = message;
|
|
336
|
-
delete response.Message;
|
|
337
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
export const deserializeAws_json1_1DescribeStatementCommand = async (
|
|
341
|
-
output: __HttpResponse,
|
|
342
|
-
context: __SerdeContext
|
|
343
|
-
): Promise<DescribeStatementCommandOutput> => {
|
|
344
|
-
if (output.statusCode >= 300) {
|
|
345
|
-
return deserializeAws_json1_1DescribeStatementCommandError(output, context);
|
|
346
|
-
}
|
|
347
|
-
const data: any = await parseBody(output.body, context);
|
|
348
|
-
let contents: any = {};
|
|
349
|
-
contents = deserializeAws_json1_1DescribeStatementResponse(data, context);
|
|
350
|
-
const response: DescribeStatementCommandOutput = {
|
|
351
|
-
$metadata: deserializeMetadata(output),
|
|
352
|
-
...contents,
|
|
353
|
-
};
|
|
354
|
-
return Promise.resolve(response);
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
const deserializeAws_json1_1DescribeStatementCommandError = async (
|
|
358
|
-
output: __HttpResponse,
|
|
359
|
-
context: __SerdeContext
|
|
360
|
-
): Promise<DescribeStatementCommandOutput> => {
|
|
361
|
-
const parsedOutput: any = {
|
|
362
|
-
...output,
|
|
363
|
-
body: await parseBody(output.body, context),
|
|
364
|
-
};
|
|
365
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
366
|
-
let errorCode = "UnknownError";
|
|
367
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
368
|
-
switch (errorCode) {
|
|
369
|
-
case "InternalServerException":
|
|
370
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
371
|
-
response = {
|
|
372
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
373
|
-
name: errorCode,
|
|
374
|
-
$metadata: deserializeMetadata(output),
|
|
375
|
-
};
|
|
376
|
-
break;
|
|
377
|
-
case "ResourceNotFoundException":
|
|
378
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
379
|
-
response = {
|
|
380
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
381
|
-
name: errorCode,
|
|
382
|
-
$metadata: deserializeMetadata(output),
|
|
383
|
-
};
|
|
384
|
-
break;
|
|
385
|
-
case "ValidationException":
|
|
386
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
387
|
-
response = {
|
|
388
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
389
|
-
name: errorCode,
|
|
390
|
-
$metadata: deserializeMetadata(output),
|
|
391
|
-
};
|
|
392
|
-
break;
|
|
393
|
-
default:
|
|
394
|
-
const parsedBody = parsedOutput.body;
|
|
395
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
396
|
-
response = {
|
|
397
|
-
...parsedBody,
|
|
398
|
-
name: `${errorCode}`,
|
|
399
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
400
|
-
$fault: "client",
|
|
401
|
-
$metadata: deserializeMetadata(output),
|
|
402
|
-
} as any;
|
|
403
|
-
}
|
|
404
|
-
const message = response.message || response.Message || errorCode;
|
|
405
|
-
response.message = message;
|
|
406
|
-
delete response.Message;
|
|
407
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
export const deserializeAws_json1_1DescribeTableCommand = async (
|
|
411
|
-
output: __HttpResponse,
|
|
412
|
-
context: __SerdeContext
|
|
413
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
414
|
-
if (output.statusCode >= 300) {
|
|
415
|
-
return deserializeAws_json1_1DescribeTableCommandError(output, context);
|
|
416
|
-
}
|
|
417
|
-
const data: any = await parseBody(output.body, context);
|
|
418
|
-
let contents: any = {};
|
|
419
|
-
contents = deserializeAws_json1_1DescribeTableResponse(data, context);
|
|
420
|
-
const response: DescribeTableCommandOutput = {
|
|
421
|
-
$metadata: deserializeMetadata(output),
|
|
422
|
-
...contents,
|
|
423
|
-
};
|
|
424
|
-
return Promise.resolve(response);
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
const deserializeAws_json1_1DescribeTableCommandError = async (
|
|
428
|
-
output: __HttpResponse,
|
|
429
|
-
context: __SerdeContext
|
|
430
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
431
|
-
const parsedOutput: any = {
|
|
432
|
-
...output,
|
|
433
|
-
body: await parseBody(output.body, context),
|
|
434
|
-
};
|
|
435
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
436
|
-
let errorCode = "UnknownError";
|
|
437
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
-
switch (errorCode) {
|
|
439
|
-
case "InternalServerException":
|
|
440
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
441
|
-
response = {
|
|
442
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
443
|
-
name: errorCode,
|
|
444
|
-
$metadata: deserializeMetadata(output),
|
|
445
|
-
};
|
|
446
|
-
break;
|
|
447
|
-
case "ValidationException":
|
|
448
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
449
|
-
response = {
|
|
450
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
451
|
-
name: errorCode,
|
|
452
|
-
$metadata: deserializeMetadata(output),
|
|
453
|
-
};
|
|
454
|
-
break;
|
|
455
|
-
default:
|
|
456
|
-
const parsedBody = parsedOutput.body;
|
|
457
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
458
|
-
response = {
|
|
459
|
-
...parsedBody,
|
|
460
|
-
name: `${errorCode}`,
|
|
461
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
462
|
-
$fault: "client",
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
} as any;
|
|
465
|
-
}
|
|
466
|
-
const message = response.message || response.Message || errorCode;
|
|
467
|
-
response.message = message;
|
|
468
|
-
delete response.Message;
|
|
469
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
export const deserializeAws_json1_1ExecuteStatementCommand = async (
|
|
473
|
-
output: __HttpResponse,
|
|
474
|
-
context: __SerdeContext
|
|
475
|
-
): Promise<ExecuteStatementCommandOutput> => {
|
|
476
|
-
if (output.statusCode >= 300) {
|
|
477
|
-
return deserializeAws_json1_1ExecuteStatementCommandError(output, context);
|
|
478
|
-
}
|
|
479
|
-
const data: any = await parseBody(output.body, context);
|
|
480
|
-
let contents: any = {};
|
|
481
|
-
contents = deserializeAws_json1_1ExecuteStatementOutput(data, context);
|
|
482
|
-
const response: ExecuteStatementCommandOutput = {
|
|
483
|
-
$metadata: deserializeMetadata(output),
|
|
484
|
-
...contents,
|
|
485
|
-
};
|
|
486
|
-
return Promise.resolve(response);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
const deserializeAws_json1_1ExecuteStatementCommandError = async (
|
|
490
|
-
output: __HttpResponse,
|
|
491
|
-
context: __SerdeContext
|
|
492
|
-
): Promise<ExecuteStatementCommandOutput> => {
|
|
493
|
-
const parsedOutput: any = {
|
|
494
|
-
...output,
|
|
495
|
-
body: await parseBody(output.body, context),
|
|
496
|
-
};
|
|
497
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
498
|
-
let errorCode = "UnknownError";
|
|
499
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
500
|
-
switch (errorCode) {
|
|
501
|
-
case "ActiveStatementsExceededException":
|
|
502
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
503
|
-
response = {
|
|
504
|
-
...(await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context)),
|
|
505
|
-
name: errorCode,
|
|
506
|
-
$metadata: deserializeMetadata(output),
|
|
507
|
-
};
|
|
508
|
-
break;
|
|
509
|
-
case "ExecuteStatementException":
|
|
510
|
-
case "com.amazonaws.redshiftdata#ExecuteStatementException":
|
|
511
|
-
response = {
|
|
512
|
-
...(await deserializeAws_json1_1ExecuteStatementExceptionResponse(parsedOutput, context)),
|
|
513
|
-
name: errorCode,
|
|
514
|
-
$metadata: deserializeMetadata(output),
|
|
515
|
-
};
|
|
516
|
-
break;
|
|
517
|
-
case "ValidationException":
|
|
518
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
519
|
-
response = {
|
|
520
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
521
|
-
name: errorCode,
|
|
522
|
-
$metadata: deserializeMetadata(output),
|
|
523
|
-
};
|
|
524
|
-
break;
|
|
525
|
-
default:
|
|
526
|
-
const parsedBody = parsedOutput.body;
|
|
527
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
528
|
-
response = {
|
|
529
|
-
...parsedBody,
|
|
530
|
-
name: `${errorCode}`,
|
|
531
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
532
|
-
$fault: "client",
|
|
533
|
-
$metadata: deserializeMetadata(output),
|
|
534
|
-
} as any;
|
|
535
|
-
}
|
|
536
|
-
const message = response.message || response.Message || errorCode;
|
|
537
|
-
response.message = message;
|
|
538
|
-
delete response.Message;
|
|
539
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
export const deserializeAws_json1_1GetStatementResultCommand = async (
|
|
543
|
-
output: __HttpResponse,
|
|
544
|
-
context: __SerdeContext
|
|
545
|
-
): Promise<GetStatementResultCommandOutput> => {
|
|
546
|
-
if (output.statusCode >= 300) {
|
|
547
|
-
return deserializeAws_json1_1GetStatementResultCommandError(output, context);
|
|
548
|
-
}
|
|
549
|
-
const data: any = await parseBody(output.body, context);
|
|
550
|
-
let contents: any = {};
|
|
551
|
-
contents = deserializeAws_json1_1GetStatementResultResponse(data, context);
|
|
552
|
-
const response: GetStatementResultCommandOutput = {
|
|
553
|
-
$metadata: deserializeMetadata(output),
|
|
554
|
-
...contents,
|
|
555
|
-
};
|
|
556
|
-
return Promise.resolve(response);
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
const deserializeAws_json1_1GetStatementResultCommandError = async (
|
|
560
|
-
output: __HttpResponse,
|
|
561
|
-
context: __SerdeContext
|
|
562
|
-
): Promise<GetStatementResultCommandOutput> => {
|
|
563
|
-
const parsedOutput: any = {
|
|
564
|
-
...output,
|
|
565
|
-
body: await parseBody(output.body, context),
|
|
566
|
-
};
|
|
567
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
568
|
-
let errorCode = "UnknownError";
|
|
569
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
570
|
-
switch (errorCode) {
|
|
571
|
-
case "InternalServerException":
|
|
572
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
573
|
-
response = {
|
|
574
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
575
|
-
name: errorCode,
|
|
576
|
-
$metadata: deserializeMetadata(output),
|
|
577
|
-
};
|
|
578
|
-
break;
|
|
579
|
-
case "ResourceNotFoundException":
|
|
580
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
581
|
-
response = {
|
|
582
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
583
|
-
name: errorCode,
|
|
584
|
-
$metadata: deserializeMetadata(output),
|
|
585
|
-
};
|
|
586
|
-
break;
|
|
587
|
-
case "ValidationException":
|
|
588
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
589
|
-
response = {
|
|
590
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
591
|
-
name: errorCode,
|
|
592
|
-
$metadata: deserializeMetadata(output),
|
|
593
|
-
};
|
|
594
|
-
break;
|
|
595
|
-
default:
|
|
596
|
-
const parsedBody = parsedOutput.body;
|
|
597
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
598
|
-
response = {
|
|
599
|
-
...parsedBody,
|
|
600
|
-
name: `${errorCode}`,
|
|
601
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
602
|
-
$fault: "client",
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
} as any;
|
|
605
|
-
}
|
|
606
|
-
const message = response.message || response.Message || errorCode;
|
|
607
|
-
response.message = message;
|
|
608
|
-
delete response.Message;
|
|
609
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
610
|
-
};
|
|
611
|
-
|
|
612
|
-
export const deserializeAws_json1_1ListDatabasesCommand = async (
|
|
613
|
-
output: __HttpResponse,
|
|
614
|
-
context: __SerdeContext
|
|
615
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
616
|
-
if (output.statusCode >= 300) {
|
|
617
|
-
return deserializeAws_json1_1ListDatabasesCommandError(output, context);
|
|
618
|
-
}
|
|
619
|
-
const data: any = await parseBody(output.body, context);
|
|
620
|
-
let contents: any = {};
|
|
621
|
-
contents = deserializeAws_json1_1ListDatabasesResponse(data, context);
|
|
622
|
-
const response: ListDatabasesCommandOutput = {
|
|
623
|
-
$metadata: deserializeMetadata(output),
|
|
624
|
-
...contents,
|
|
625
|
-
};
|
|
626
|
-
return Promise.resolve(response);
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
const deserializeAws_json1_1ListDatabasesCommandError = async (
|
|
630
|
-
output: __HttpResponse,
|
|
631
|
-
context: __SerdeContext
|
|
632
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
633
|
-
const parsedOutput: any = {
|
|
634
|
-
...output,
|
|
635
|
-
body: await parseBody(output.body, context),
|
|
636
|
-
};
|
|
637
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
638
|
-
let errorCode = "UnknownError";
|
|
639
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
640
|
-
switch (errorCode) {
|
|
641
|
-
case "InternalServerException":
|
|
642
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
643
|
-
response = {
|
|
644
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
645
|
-
name: errorCode,
|
|
646
|
-
$metadata: deserializeMetadata(output),
|
|
647
|
-
};
|
|
648
|
-
break;
|
|
649
|
-
case "ValidationException":
|
|
650
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
651
|
-
response = {
|
|
652
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
653
|
-
name: errorCode,
|
|
654
|
-
$metadata: deserializeMetadata(output),
|
|
655
|
-
};
|
|
656
|
-
break;
|
|
657
|
-
default:
|
|
658
|
-
const parsedBody = parsedOutput.body;
|
|
659
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
660
|
-
response = {
|
|
661
|
-
...parsedBody,
|
|
662
|
-
name: `${errorCode}`,
|
|
663
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
664
|
-
$fault: "client",
|
|
665
|
-
$metadata: deserializeMetadata(output),
|
|
666
|
-
} as any;
|
|
667
|
-
}
|
|
668
|
-
const message = response.message || response.Message || errorCode;
|
|
669
|
-
response.message = message;
|
|
670
|
-
delete response.Message;
|
|
671
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
672
|
-
};
|
|
673
|
-
|
|
674
|
-
export const deserializeAws_json1_1ListSchemasCommand = async (
|
|
675
|
-
output: __HttpResponse,
|
|
676
|
-
context: __SerdeContext
|
|
677
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
678
|
-
if (output.statusCode >= 300) {
|
|
679
|
-
return deserializeAws_json1_1ListSchemasCommandError(output, context);
|
|
680
|
-
}
|
|
681
|
-
const data: any = await parseBody(output.body, context);
|
|
682
|
-
let contents: any = {};
|
|
683
|
-
contents = deserializeAws_json1_1ListSchemasResponse(data, context);
|
|
684
|
-
const response: ListSchemasCommandOutput = {
|
|
685
|
-
$metadata: deserializeMetadata(output),
|
|
686
|
-
...contents,
|
|
687
|
-
};
|
|
688
|
-
return Promise.resolve(response);
|
|
689
|
-
};
|
|
690
|
-
|
|
691
|
-
const deserializeAws_json1_1ListSchemasCommandError = async (
|
|
692
|
-
output: __HttpResponse,
|
|
693
|
-
context: __SerdeContext
|
|
694
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
695
|
-
const parsedOutput: any = {
|
|
696
|
-
...output,
|
|
697
|
-
body: await parseBody(output.body, context),
|
|
698
|
-
};
|
|
699
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
700
|
-
let errorCode = "UnknownError";
|
|
701
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
702
|
-
switch (errorCode) {
|
|
703
|
-
case "InternalServerException":
|
|
704
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
705
|
-
response = {
|
|
706
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
707
|
-
name: errorCode,
|
|
708
|
-
$metadata: deserializeMetadata(output),
|
|
709
|
-
};
|
|
710
|
-
break;
|
|
711
|
-
case "ValidationException":
|
|
712
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
713
|
-
response = {
|
|
714
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
715
|
-
name: errorCode,
|
|
716
|
-
$metadata: deserializeMetadata(output),
|
|
717
|
-
};
|
|
718
|
-
break;
|
|
719
|
-
default:
|
|
720
|
-
const parsedBody = parsedOutput.body;
|
|
721
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
722
|
-
response = {
|
|
723
|
-
...parsedBody,
|
|
724
|
-
name: `${errorCode}`,
|
|
725
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
726
|
-
$fault: "client",
|
|
727
|
-
$metadata: deserializeMetadata(output),
|
|
728
|
-
} as any;
|
|
729
|
-
}
|
|
730
|
-
const message = response.message || response.Message || errorCode;
|
|
731
|
-
response.message = message;
|
|
732
|
-
delete response.Message;
|
|
733
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
734
|
-
};
|
|
735
|
-
|
|
736
|
-
export const deserializeAws_json1_1ListStatementsCommand = async (
|
|
737
|
-
output: __HttpResponse,
|
|
738
|
-
context: __SerdeContext
|
|
739
|
-
): Promise<ListStatementsCommandOutput> => {
|
|
740
|
-
if (output.statusCode >= 300) {
|
|
741
|
-
return deserializeAws_json1_1ListStatementsCommandError(output, context);
|
|
742
|
-
}
|
|
743
|
-
const data: any = await parseBody(output.body, context);
|
|
744
|
-
let contents: any = {};
|
|
745
|
-
contents = deserializeAws_json1_1ListStatementsResponse(data, context);
|
|
746
|
-
const response: ListStatementsCommandOutput = {
|
|
747
|
-
$metadata: deserializeMetadata(output),
|
|
748
|
-
...contents,
|
|
749
|
-
};
|
|
750
|
-
return Promise.resolve(response);
|
|
751
|
-
};
|
|
752
|
-
|
|
753
|
-
const deserializeAws_json1_1ListStatementsCommandError = async (
|
|
754
|
-
output: __HttpResponse,
|
|
755
|
-
context: __SerdeContext
|
|
756
|
-
): Promise<ListStatementsCommandOutput> => {
|
|
757
|
-
const parsedOutput: any = {
|
|
758
|
-
...output,
|
|
759
|
-
body: await parseBody(output.body, context),
|
|
760
|
-
};
|
|
761
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
762
|
-
let errorCode = "UnknownError";
|
|
763
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
764
|
-
switch (errorCode) {
|
|
765
|
-
case "InternalServerException":
|
|
766
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
767
|
-
response = {
|
|
768
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
769
|
-
name: errorCode,
|
|
770
|
-
$metadata: deserializeMetadata(output),
|
|
771
|
-
};
|
|
772
|
-
break;
|
|
773
|
-
case "ValidationException":
|
|
774
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
775
|
-
response = {
|
|
776
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
777
|
-
name: errorCode,
|
|
778
|
-
$metadata: deserializeMetadata(output),
|
|
779
|
-
};
|
|
780
|
-
break;
|
|
781
|
-
default:
|
|
782
|
-
const parsedBody = parsedOutput.body;
|
|
783
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
784
|
-
response = {
|
|
785
|
-
...parsedBody,
|
|
786
|
-
name: `${errorCode}`,
|
|
787
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
788
|
-
$fault: "client",
|
|
789
|
-
$metadata: deserializeMetadata(output),
|
|
790
|
-
} as any;
|
|
791
|
-
}
|
|
792
|
-
const message = response.message || response.Message || errorCode;
|
|
793
|
-
response.message = message;
|
|
794
|
-
delete response.Message;
|
|
795
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
export const deserializeAws_json1_1ListTablesCommand = async (
|
|
799
|
-
output: __HttpResponse,
|
|
800
|
-
context: __SerdeContext
|
|
801
|
-
): Promise<ListTablesCommandOutput> => {
|
|
802
|
-
if (output.statusCode >= 300) {
|
|
803
|
-
return deserializeAws_json1_1ListTablesCommandError(output, context);
|
|
804
|
-
}
|
|
805
|
-
const data: any = await parseBody(output.body, context);
|
|
806
|
-
let contents: any = {};
|
|
807
|
-
contents = deserializeAws_json1_1ListTablesResponse(data, context);
|
|
808
|
-
const response: ListTablesCommandOutput = {
|
|
809
|
-
$metadata: deserializeMetadata(output),
|
|
810
|
-
...contents,
|
|
811
|
-
};
|
|
812
|
-
return Promise.resolve(response);
|
|
813
|
-
};
|
|
814
|
-
|
|
815
|
-
const deserializeAws_json1_1ListTablesCommandError = async (
|
|
816
|
-
output: __HttpResponse,
|
|
817
|
-
context: __SerdeContext
|
|
818
|
-
): Promise<ListTablesCommandOutput> => {
|
|
819
|
-
const parsedOutput: any = {
|
|
820
|
-
...output,
|
|
821
|
-
body: await parseBody(output.body, context),
|
|
822
|
-
};
|
|
823
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
824
|
-
let errorCode = "UnknownError";
|
|
825
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
826
|
-
switch (errorCode) {
|
|
827
|
-
case "InternalServerException":
|
|
828
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
829
|
-
response = {
|
|
830
|
-
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
831
|
-
name: errorCode,
|
|
832
|
-
$metadata: deserializeMetadata(output),
|
|
833
|
-
};
|
|
834
|
-
break;
|
|
835
|
-
case "ValidationException":
|
|
836
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
837
|
-
response = {
|
|
838
|
-
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
839
|
-
name: errorCode,
|
|
840
|
-
$metadata: deserializeMetadata(output),
|
|
841
|
-
};
|
|
842
|
-
break;
|
|
843
|
-
default:
|
|
844
|
-
const parsedBody = parsedOutput.body;
|
|
845
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
846
|
-
response = {
|
|
847
|
-
...parsedBody,
|
|
848
|
-
name: `${errorCode}`,
|
|
849
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
850
|
-
$fault: "client",
|
|
851
|
-
$metadata: deserializeMetadata(output),
|
|
852
|
-
} as any;
|
|
853
|
-
}
|
|
854
|
-
const message = response.message || response.Message || errorCode;
|
|
855
|
-
response.message = message;
|
|
856
|
-
delete response.Message;
|
|
857
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
const deserializeAws_json1_1ActiveStatementsExceededExceptionResponse = async (
|
|
861
|
-
parsedOutput: any,
|
|
862
|
-
context: __SerdeContext
|
|
863
|
-
): Promise<ActiveStatementsExceededException> => {
|
|
864
|
-
const body = parsedOutput.body;
|
|
865
|
-
const deserialized: any = deserializeAws_json1_1ActiveStatementsExceededException(body, context);
|
|
866
|
-
const contents: ActiveStatementsExceededException = {
|
|
867
|
-
name: "ActiveStatementsExceededException",
|
|
868
|
-
$fault: "client",
|
|
869
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
870
|
-
...deserialized,
|
|
871
|
-
};
|
|
872
|
-
return contents;
|
|
873
|
-
};
|
|
874
|
-
|
|
875
|
-
const deserializeAws_json1_1BatchExecuteStatementExceptionResponse = async (
|
|
876
|
-
parsedOutput: any,
|
|
877
|
-
context: __SerdeContext
|
|
878
|
-
): Promise<BatchExecuteStatementException> => {
|
|
879
|
-
const body = parsedOutput.body;
|
|
880
|
-
const deserialized: any = deserializeAws_json1_1BatchExecuteStatementException(body, context);
|
|
881
|
-
const contents: BatchExecuteStatementException = {
|
|
882
|
-
name: "BatchExecuteStatementException",
|
|
883
|
-
$fault: "server",
|
|
884
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
885
|
-
...deserialized,
|
|
886
|
-
};
|
|
887
|
-
return contents;
|
|
888
|
-
};
|
|
889
|
-
|
|
890
|
-
const deserializeAws_json1_1ExecuteStatementExceptionResponse = async (
|
|
891
|
-
parsedOutput: any,
|
|
892
|
-
context: __SerdeContext
|
|
893
|
-
): Promise<ExecuteStatementException> => {
|
|
894
|
-
const body = parsedOutput.body;
|
|
895
|
-
const deserialized: any = deserializeAws_json1_1ExecuteStatementException(body, context);
|
|
896
|
-
const contents: ExecuteStatementException = {
|
|
897
|
-
name: "ExecuteStatementException",
|
|
898
|
-
$fault: "server",
|
|
899
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
900
|
-
...deserialized,
|
|
901
|
-
};
|
|
902
|
-
return contents;
|
|
903
|
-
};
|
|
904
|
-
|
|
905
|
-
const deserializeAws_json1_1InternalServerExceptionResponse = async (
|
|
906
|
-
parsedOutput: any,
|
|
907
|
-
context: __SerdeContext
|
|
908
|
-
): Promise<InternalServerException> => {
|
|
909
|
-
const body = parsedOutput.body;
|
|
910
|
-
const deserialized: any = deserializeAws_json1_1InternalServerException(body, context);
|
|
911
|
-
const contents: InternalServerException = {
|
|
912
|
-
name: "InternalServerException",
|
|
913
|
-
$fault: "server",
|
|
914
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
915
|
-
...deserialized,
|
|
916
|
-
};
|
|
917
|
-
return contents;
|
|
918
|
-
};
|
|
919
|
-
|
|
920
|
-
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
|
|
921
|
-
parsedOutput: any,
|
|
922
|
-
context: __SerdeContext
|
|
923
|
-
): Promise<ResourceNotFoundException> => {
|
|
924
|
-
const body = parsedOutput.body;
|
|
925
|
-
const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
926
|
-
const contents: ResourceNotFoundException = {
|
|
927
|
-
name: "ResourceNotFoundException",
|
|
928
|
-
$fault: "client",
|
|
929
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
930
|
-
...deserialized,
|
|
931
|
-
};
|
|
932
|
-
return contents;
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
const deserializeAws_json1_1ValidationExceptionResponse = async (
|
|
936
|
-
parsedOutput: any,
|
|
937
|
-
context: __SerdeContext
|
|
938
|
-
): Promise<ValidationException> => {
|
|
939
|
-
const body = parsedOutput.body;
|
|
940
|
-
const deserialized: any = deserializeAws_json1_1ValidationException(body, context);
|
|
941
|
-
const contents: ValidationException = {
|
|
942
|
-
name: "ValidationException",
|
|
943
|
-
$fault: "client",
|
|
944
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
945
|
-
...deserialized,
|
|
946
|
-
};
|
|
947
|
-
return contents;
|
|
948
|
-
};
|
|
949
|
-
|
|
950
|
-
const serializeAws_json1_1BatchExecuteStatementInput = (
|
|
951
|
-
input: BatchExecuteStatementInput,
|
|
952
|
-
context: __SerdeContext
|
|
953
|
-
): any => {
|
|
954
|
-
return {
|
|
955
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
956
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
957
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
958
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
959
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
960
|
-
...(input.Sqls !== undefined && input.Sqls !== null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) }),
|
|
961
|
-
...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
|
|
962
|
-
...(input.WithEvent !== undefined && input.WithEvent !== null && { WithEvent: input.WithEvent }),
|
|
963
|
-
};
|
|
964
|
-
};
|
|
965
|
-
|
|
966
|
-
const serializeAws_json1_1CancelStatementRequest = (input: CancelStatementRequest, context: __SerdeContext): any => {
|
|
967
|
-
return {
|
|
968
|
-
...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
|
|
969
|
-
};
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
const serializeAws_json1_1DescribeStatementRequest = (
|
|
973
|
-
input: DescribeStatementRequest,
|
|
974
|
-
context: __SerdeContext
|
|
975
|
-
): any => {
|
|
976
|
-
return {
|
|
977
|
-
...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
|
-
|
|
981
|
-
const serializeAws_json1_1DescribeTableRequest = (input: DescribeTableRequest, context: __SerdeContext): any => {
|
|
982
|
-
return {
|
|
983
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
984
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
985
|
-
...(input.ConnectedDatabase !== undefined &&
|
|
986
|
-
input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
987
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
988
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
989
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
990
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
991
|
-
...(input.Schema !== undefined && input.Schema !== null && { Schema: input.Schema }),
|
|
992
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
993
|
-
...(input.Table !== undefined && input.Table !== null && { Table: input.Table }),
|
|
994
|
-
};
|
|
995
|
-
};
|
|
996
|
-
|
|
997
|
-
const serializeAws_json1_1ExecuteStatementInput = (input: ExecuteStatementInput, context: __SerdeContext): any => {
|
|
998
|
-
return {
|
|
999
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
1000
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
1001
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
1002
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
1003
|
-
...(input.Parameters !== undefined &&
|
|
1004
|
-
input.Parameters !== null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) }),
|
|
1005
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
1006
|
-
...(input.Sql !== undefined && input.Sql !== null && { Sql: input.Sql }),
|
|
1007
|
-
...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
|
|
1008
|
-
...(input.WithEvent !== undefined && input.WithEvent !== null && { WithEvent: input.WithEvent }),
|
|
1009
|
-
};
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
const serializeAws_json1_1GetStatementResultRequest = (
|
|
1013
|
-
input: GetStatementResultRequest,
|
|
1014
|
-
context: __SerdeContext
|
|
1015
|
-
): any => {
|
|
1016
|
-
return {
|
|
1017
|
-
...(input.Id !== undefined && input.Id !== null && { Id: input.Id }),
|
|
1018
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1019
|
-
};
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
const serializeAws_json1_1ListDatabasesRequest = (input: ListDatabasesRequest, context: __SerdeContext): any => {
|
|
1023
|
-
return {
|
|
1024
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
1025
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
1026
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
1027
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
1028
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1029
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1030
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
1031
|
-
};
|
|
1032
|
-
};
|
|
1033
|
-
|
|
1034
|
-
const serializeAws_json1_1ListSchemasRequest = (input: ListSchemasRequest, context: __SerdeContext): any => {
|
|
1035
|
-
return {
|
|
1036
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
1037
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
1038
|
-
...(input.ConnectedDatabase !== undefined &&
|
|
1039
|
-
input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
1040
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
1041
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
1042
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1043
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1044
|
-
...(input.SchemaPattern !== undefined && input.SchemaPattern !== null && { SchemaPattern: input.SchemaPattern }),
|
|
1045
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
1046
|
-
};
|
|
1047
|
-
};
|
|
1048
|
-
|
|
1049
|
-
const serializeAws_json1_1ListStatementsRequest = (input: ListStatementsRequest, context: __SerdeContext): any => {
|
|
1050
|
-
return {
|
|
1051
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1052
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1053
|
-
...(input.RoleLevel !== undefined && input.RoleLevel !== null && { RoleLevel: input.RoleLevel }),
|
|
1054
|
-
...(input.StatementName !== undefined && input.StatementName !== null && { StatementName: input.StatementName }),
|
|
1055
|
-
...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
|
|
1056
|
-
};
|
|
1057
|
-
};
|
|
1058
|
-
|
|
1059
|
-
const serializeAws_json1_1ListTablesRequest = (input: ListTablesRequest, context: __SerdeContext): any => {
|
|
1060
|
-
return {
|
|
1061
|
-
...(input.ClusterIdentifier !== undefined &&
|
|
1062
|
-
input.ClusterIdentifier !== null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
1063
|
-
...(input.ConnectedDatabase !== undefined &&
|
|
1064
|
-
input.ConnectedDatabase !== null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
1065
|
-
...(input.Database !== undefined && input.Database !== null && { Database: input.Database }),
|
|
1066
|
-
...(input.DbUser !== undefined && input.DbUser !== null && { DbUser: input.DbUser }),
|
|
1067
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1068
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1069
|
-
...(input.SchemaPattern !== undefined && input.SchemaPattern !== null && { SchemaPattern: input.SchemaPattern }),
|
|
1070
|
-
...(input.SecretArn !== undefined && input.SecretArn !== null && { SecretArn: input.SecretArn }),
|
|
1071
|
-
...(input.TablePattern !== undefined && input.TablePattern !== null && { TablePattern: input.TablePattern }),
|
|
1072
|
-
};
|
|
1073
|
-
};
|
|
1074
|
-
|
|
1075
|
-
const serializeAws_json1_1SqlList = (input: string[], context: __SerdeContext): any => {
|
|
1076
|
-
return input
|
|
1077
|
-
.filter((e: any) => e != null)
|
|
1078
|
-
.map((entry) => {
|
|
1079
|
-
if (entry === null) {
|
|
1080
|
-
return null as any;
|
|
1081
|
-
}
|
|
1082
|
-
return entry;
|
|
1083
|
-
});
|
|
1084
|
-
};
|
|
1085
|
-
|
|
1086
|
-
const serializeAws_json1_1SqlParameter = (input: SqlParameter, context: __SerdeContext): any => {
|
|
1087
|
-
return {
|
|
1088
|
-
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
1089
|
-
...(input.value !== undefined && input.value !== null && { value: input.value }),
|
|
1090
|
-
};
|
|
1091
|
-
};
|
|
1092
|
-
|
|
1093
|
-
const serializeAws_json1_1SqlParametersList = (input: SqlParameter[], context: __SerdeContext): any => {
|
|
1094
|
-
return input
|
|
1095
|
-
.filter((e: any) => e != null)
|
|
1096
|
-
.map((entry) => {
|
|
1097
|
-
if (entry === null) {
|
|
1098
|
-
return null as any;
|
|
1099
|
-
}
|
|
1100
|
-
return serializeAws_json1_1SqlParameter(entry, context);
|
|
1101
|
-
});
|
|
1102
|
-
};
|
|
1103
|
-
|
|
1104
|
-
const deserializeAws_json1_1ActiveStatementsExceededException = (
|
|
1105
|
-
output: any,
|
|
1106
|
-
context: __SerdeContext
|
|
1107
|
-
): ActiveStatementsExceededException => {
|
|
1108
|
-
return {
|
|
1109
|
-
Message: __expectString(output.Message),
|
|
1110
|
-
} as any;
|
|
1111
|
-
};
|
|
1112
|
-
|
|
1113
|
-
const deserializeAws_json1_1BatchExecuteStatementException = (
|
|
1114
|
-
output: any,
|
|
1115
|
-
context: __SerdeContext
|
|
1116
|
-
): BatchExecuteStatementException => {
|
|
1117
|
-
return {
|
|
1118
|
-
Message: __expectString(output.Message),
|
|
1119
|
-
StatementId: __expectString(output.StatementId),
|
|
1120
|
-
} as any;
|
|
1121
|
-
};
|
|
1122
|
-
|
|
1123
|
-
const deserializeAws_json1_1BatchExecuteStatementOutput = (
|
|
1124
|
-
output: any,
|
|
1125
|
-
context: __SerdeContext
|
|
1126
|
-
): BatchExecuteStatementOutput => {
|
|
1127
|
-
return {
|
|
1128
|
-
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
1129
|
-
CreatedAt:
|
|
1130
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1131
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1132
|
-
: undefined,
|
|
1133
|
-
Database: __expectString(output.Database),
|
|
1134
|
-
DbUser: __expectString(output.DbUser),
|
|
1135
|
-
Id: __expectString(output.Id),
|
|
1136
|
-
SecretArn: __expectString(output.SecretArn),
|
|
1137
|
-
} as any;
|
|
1138
|
-
};
|
|
1139
|
-
|
|
1140
|
-
const deserializeAws_json1_1CancelStatementResponse = (
|
|
1141
|
-
output: any,
|
|
1142
|
-
context: __SerdeContext
|
|
1143
|
-
): CancelStatementResponse => {
|
|
1144
|
-
return {
|
|
1145
|
-
Status: __expectBoolean(output.Status),
|
|
1146
|
-
} as any;
|
|
1147
|
-
};
|
|
1148
|
-
|
|
1149
|
-
const deserializeAws_json1_1ColumnList = (output: any, context: __SerdeContext): ColumnMetadata[] => {
|
|
1150
|
-
return (output || [])
|
|
1151
|
-
.filter((e: any) => e != null)
|
|
1152
|
-
.map((entry: any) => {
|
|
1153
|
-
if (entry === null) {
|
|
1154
|
-
return null as any;
|
|
1155
|
-
}
|
|
1156
|
-
return deserializeAws_json1_1ColumnMetadata(entry, context);
|
|
1157
|
-
});
|
|
1158
|
-
};
|
|
1159
|
-
|
|
1160
|
-
const deserializeAws_json1_1ColumnMetadata = (output: any, context: __SerdeContext): ColumnMetadata => {
|
|
1161
|
-
return {
|
|
1162
|
-
columnDefault: __expectString(output.columnDefault),
|
|
1163
|
-
isCaseSensitive: __expectBoolean(output.isCaseSensitive),
|
|
1164
|
-
isCurrency: __expectBoolean(output.isCurrency),
|
|
1165
|
-
isSigned: __expectBoolean(output.isSigned),
|
|
1166
|
-
label: __expectString(output.label),
|
|
1167
|
-
length: __expectInt32(output.length),
|
|
1168
|
-
name: __expectString(output.name),
|
|
1169
|
-
nullable: __expectInt32(output.nullable),
|
|
1170
|
-
precision: __expectInt32(output.precision),
|
|
1171
|
-
scale: __expectInt32(output.scale),
|
|
1172
|
-
schemaName: __expectString(output.schemaName),
|
|
1173
|
-
tableName: __expectString(output.tableName),
|
|
1174
|
-
typeName: __expectString(output.typeName),
|
|
1175
|
-
} as any;
|
|
1176
|
-
};
|
|
1177
|
-
|
|
1178
|
-
const deserializeAws_json1_1ColumnMetadataList = (output: any, context: __SerdeContext): ColumnMetadata[] => {
|
|
1179
|
-
return (output || [])
|
|
1180
|
-
.filter((e: any) => e != null)
|
|
1181
|
-
.map((entry: any) => {
|
|
1182
|
-
if (entry === null) {
|
|
1183
|
-
return null as any;
|
|
1184
|
-
}
|
|
1185
|
-
return deserializeAws_json1_1ColumnMetadata(entry, context);
|
|
1186
|
-
});
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
const deserializeAws_json1_1DatabaseList = (output: any, context: __SerdeContext): string[] => {
|
|
1190
|
-
return (output || [])
|
|
1191
|
-
.filter((e: any) => e != null)
|
|
1192
|
-
.map((entry: any) => {
|
|
1193
|
-
if (entry === null) {
|
|
1194
|
-
return null as any;
|
|
1195
|
-
}
|
|
1196
|
-
return __expectString(entry) as any;
|
|
1197
|
-
});
|
|
1198
|
-
};
|
|
1199
|
-
|
|
1200
|
-
const deserializeAws_json1_1DescribeStatementResponse = (
|
|
1201
|
-
output: any,
|
|
1202
|
-
context: __SerdeContext
|
|
1203
|
-
): DescribeStatementResponse => {
|
|
1204
|
-
return {
|
|
1205
|
-
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
1206
|
-
CreatedAt:
|
|
1207
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1208
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1209
|
-
: undefined,
|
|
1210
|
-
Database: __expectString(output.Database),
|
|
1211
|
-
DbUser: __expectString(output.DbUser),
|
|
1212
|
-
Duration: __expectLong(output.Duration),
|
|
1213
|
-
Error: __expectString(output.Error),
|
|
1214
|
-
HasResultSet: __expectBoolean(output.HasResultSet),
|
|
1215
|
-
Id: __expectString(output.Id),
|
|
1216
|
-
QueryParameters:
|
|
1217
|
-
output.QueryParameters !== undefined && output.QueryParameters !== null
|
|
1218
|
-
? deserializeAws_json1_1SqlParametersList(output.QueryParameters, context)
|
|
1219
|
-
: undefined,
|
|
1220
|
-
QueryString: __expectString(output.QueryString),
|
|
1221
|
-
RedshiftPid: __expectLong(output.RedshiftPid),
|
|
1222
|
-
RedshiftQueryId: __expectLong(output.RedshiftQueryId),
|
|
1223
|
-
ResultRows: __expectLong(output.ResultRows),
|
|
1224
|
-
ResultSize: __expectLong(output.ResultSize),
|
|
1225
|
-
SecretArn: __expectString(output.SecretArn),
|
|
1226
|
-
Status: __expectString(output.Status),
|
|
1227
|
-
SubStatements:
|
|
1228
|
-
output.SubStatements !== undefined && output.SubStatements !== null
|
|
1229
|
-
? deserializeAws_json1_1SubStatementList(output.SubStatements, context)
|
|
1230
|
-
: undefined,
|
|
1231
|
-
UpdatedAt:
|
|
1232
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
1233
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
1234
|
-
: undefined,
|
|
1235
|
-
} as any;
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
const deserializeAws_json1_1DescribeTableResponse = (output: any, context: __SerdeContext): DescribeTableResponse => {
|
|
1239
|
-
return {
|
|
1240
|
-
ColumnList:
|
|
1241
|
-
output.ColumnList !== undefined && output.ColumnList !== null
|
|
1242
|
-
? deserializeAws_json1_1ColumnList(output.ColumnList, context)
|
|
1243
|
-
: undefined,
|
|
1244
|
-
NextToken: __expectString(output.NextToken),
|
|
1245
|
-
TableName: __expectString(output.TableName),
|
|
1246
|
-
} as any;
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
const deserializeAws_json1_1ExecuteStatementException = (
|
|
1250
|
-
output: any,
|
|
1251
|
-
context: __SerdeContext
|
|
1252
|
-
): ExecuteStatementException => {
|
|
1253
|
-
return {
|
|
1254
|
-
Message: __expectString(output.Message),
|
|
1255
|
-
StatementId: __expectString(output.StatementId),
|
|
1256
|
-
} as any;
|
|
1257
|
-
};
|
|
1258
|
-
|
|
1259
|
-
const deserializeAws_json1_1ExecuteStatementOutput = (output: any, context: __SerdeContext): ExecuteStatementOutput => {
|
|
1260
|
-
return {
|
|
1261
|
-
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
1262
|
-
CreatedAt:
|
|
1263
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1264
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1265
|
-
: undefined,
|
|
1266
|
-
Database: __expectString(output.Database),
|
|
1267
|
-
DbUser: __expectString(output.DbUser),
|
|
1268
|
-
Id: __expectString(output.Id),
|
|
1269
|
-
SecretArn: __expectString(output.SecretArn),
|
|
1270
|
-
} as any;
|
|
1271
|
-
};
|
|
1272
|
-
|
|
1273
|
-
const deserializeAws_json1_1Field = (output: any, context: __SerdeContext): Field => {
|
|
1274
|
-
if (output.blobValue !== undefined && output.blobValue !== null) {
|
|
1275
|
-
return {
|
|
1276
|
-
blobValue: context.base64Decoder(output.blobValue),
|
|
1277
|
-
};
|
|
1278
|
-
}
|
|
1279
|
-
if (__expectBoolean(output.booleanValue) !== undefined) {
|
|
1280
|
-
return { booleanValue: __expectBoolean(output.booleanValue) as any };
|
|
1281
|
-
}
|
|
1282
|
-
if (__limitedParseDouble(output.doubleValue) !== undefined) {
|
|
1283
|
-
return { doubleValue: __limitedParseDouble(output.doubleValue) as any };
|
|
1284
|
-
}
|
|
1285
|
-
if (__expectBoolean(output.isNull) !== undefined) {
|
|
1286
|
-
return { isNull: __expectBoolean(output.isNull) as any };
|
|
1287
|
-
}
|
|
1288
|
-
if (__expectLong(output.longValue) !== undefined) {
|
|
1289
|
-
return { longValue: __expectLong(output.longValue) as any };
|
|
1290
|
-
}
|
|
1291
|
-
if (__expectString(output.stringValue) !== undefined) {
|
|
1292
|
-
return { stringValue: __expectString(output.stringValue) as any };
|
|
1293
|
-
}
|
|
1294
|
-
return { $unknown: Object.entries(output)[0] };
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
const deserializeAws_json1_1FieldList = (output: any, context: __SerdeContext): Field[] => {
|
|
1298
|
-
return (output || [])
|
|
1299
|
-
.filter((e: any) => e != null)
|
|
1300
|
-
.map((entry: any) => {
|
|
1301
|
-
if (entry === null) {
|
|
1302
|
-
return null as any;
|
|
1303
|
-
}
|
|
1304
|
-
return deserializeAws_json1_1Field(__expectUnion(entry), context);
|
|
1305
|
-
});
|
|
1306
|
-
};
|
|
1307
|
-
|
|
1308
|
-
const deserializeAws_json1_1GetStatementResultResponse = (
|
|
1309
|
-
output: any,
|
|
1310
|
-
context: __SerdeContext
|
|
1311
|
-
): GetStatementResultResponse => {
|
|
1312
|
-
return {
|
|
1313
|
-
ColumnMetadata:
|
|
1314
|
-
output.ColumnMetadata !== undefined && output.ColumnMetadata !== null
|
|
1315
|
-
? deserializeAws_json1_1ColumnMetadataList(output.ColumnMetadata, context)
|
|
1316
|
-
: undefined,
|
|
1317
|
-
NextToken: __expectString(output.NextToken),
|
|
1318
|
-
Records:
|
|
1319
|
-
output.Records !== undefined && output.Records !== null
|
|
1320
|
-
? deserializeAws_json1_1SqlRecords(output.Records, context)
|
|
1321
|
-
: undefined,
|
|
1322
|
-
TotalNumRows: __expectLong(output.TotalNumRows),
|
|
1323
|
-
} as any;
|
|
1324
|
-
};
|
|
1325
|
-
|
|
1326
|
-
const deserializeAws_json1_1InternalServerException = (
|
|
1327
|
-
output: any,
|
|
1328
|
-
context: __SerdeContext
|
|
1329
|
-
): InternalServerException => {
|
|
1330
|
-
return {
|
|
1331
|
-
Message: __expectString(output.Message),
|
|
1332
|
-
} as any;
|
|
1333
|
-
};
|
|
1334
|
-
|
|
1335
|
-
const deserializeAws_json1_1ListDatabasesResponse = (output: any, context: __SerdeContext): ListDatabasesResponse => {
|
|
1336
|
-
return {
|
|
1337
|
-
Databases:
|
|
1338
|
-
output.Databases !== undefined && output.Databases !== null
|
|
1339
|
-
? deserializeAws_json1_1DatabaseList(output.Databases, context)
|
|
1340
|
-
: undefined,
|
|
1341
|
-
NextToken: __expectString(output.NextToken),
|
|
1342
|
-
} as any;
|
|
1343
|
-
};
|
|
1344
|
-
|
|
1345
|
-
const deserializeAws_json1_1ListSchemasResponse = (output: any, context: __SerdeContext): ListSchemasResponse => {
|
|
1346
|
-
return {
|
|
1347
|
-
NextToken: __expectString(output.NextToken),
|
|
1348
|
-
Schemas:
|
|
1349
|
-
output.Schemas !== undefined && output.Schemas !== null
|
|
1350
|
-
? deserializeAws_json1_1SchemaList(output.Schemas, context)
|
|
1351
|
-
: undefined,
|
|
1352
|
-
} as any;
|
|
1353
|
-
};
|
|
1354
|
-
|
|
1355
|
-
const deserializeAws_json1_1ListStatementsResponse = (output: any, context: __SerdeContext): ListStatementsResponse => {
|
|
1356
|
-
return {
|
|
1357
|
-
NextToken: __expectString(output.NextToken),
|
|
1358
|
-
Statements:
|
|
1359
|
-
output.Statements !== undefined && output.Statements !== null
|
|
1360
|
-
? deserializeAws_json1_1StatementList(output.Statements, context)
|
|
1361
|
-
: undefined,
|
|
1362
|
-
} as any;
|
|
1363
|
-
};
|
|
1364
|
-
|
|
1365
|
-
const deserializeAws_json1_1ListTablesResponse = (output: any, context: __SerdeContext): ListTablesResponse => {
|
|
1366
|
-
return {
|
|
1367
|
-
NextToken: __expectString(output.NextToken),
|
|
1368
|
-
Tables:
|
|
1369
|
-
output.Tables !== undefined && output.Tables !== null
|
|
1370
|
-
? deserializeAws_json1_1TableList(output.Tables, context)
|
|
1371
|
-
: undefined,
|
|
1372
|
-
} as any;
|
|
1373
|
-
};
|
|
1374
|
-
|
|
1375
|
-
const deserializeAws_json1_1ResourceNotFoundException = (
|
|
1376
|
-
output: any,
|
|
1377
|
-
context: __SerdeContext
|
|
1378
|
-
): ResourceNotFoundException => {
|
|
1379
|
-
return {
|
|
1380
|
-
Message: __expectString(output.Message),
|
|
1381
|
-
ResourceId: __expectString(output.ResourceId),
|
|
1382
|
-
} as any;
|
|
1383
|
-
};
|
|
1384
|
-
|
|
1385
|
-
const deserializeAws_json1_1SchemaList = (output: any, context: __SerdeContext): string[] => {
|
|
1386
|
-
return (output || [])
|
|
1387
|
-
.filter((e: any) => e != null)
|
|
1388
|
-
.map((entry: any) => {
|
|
1389
|
-
if (entry === null) {
|
|
1390
|
-
return null as any;
|
|
1391
|
-
}
|
|
1392
|
-
return __expectString(entry) as any;
|
|
1393
|
-
});
|
|
1394
|
-
};
|
|
1395
|
-
|
|
1396
|
-
const deserializeAws_json1_1SqlParameter = (output: any, context: __SerdeContext): SqlParameter => {
|
|
1397
|
-
return {
|
|
1398
|
-
name: __expectString(output.name),
|
|
1399
|
-
value: __expectString(output.value),
|
|
1400
|
-
} as any;
|
|
1401
|
-
};
|
|
1402
|
-
|
|
1403
|
-
const deserializeAws_json1_1SqlParametersList = (output: any, context: __SerdeContext): SqlParameter[] => {
|
|
1404
|
-
return (output || [])
|
|
1405
|
-
.filter((e: any) => e != null)
|
|
1406
|
-
.map((entry: any) => {
|
|
1407
|
-
if (entry === null) {
|
|
1408
|
-
return null as any;
|
|
1409
|
-
}
|
|
1410
|
-
return deserializeAws_json1_1SqlParameter(entry, context);
|
|
1411
|
-
});
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
const deserializeAws_json1_1SqlRecords = (output: any, context: __SerdeContext): Field[][] => {
|
|
1415
|
-
return (output || [])
|
|
1416
|
-
.filter((e: any) => e != null)
|
|
1417
|
-
.map((entry: any) => {
|
|
1418
|
-
if (entry === null) {
|
|
1419
|
-
return null as any;
|
|
1420
|
-
}
|
|
1421
|
-
return deserializeAws_json1_1FieldList(entry, context);
|
|
1422
|
-
});
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
const deserializeAws_json1_1StatementData = (output: any, context: __SerdeContext): StatementData => {
|
|
1426
|
-
return {
|
|
1427
|
-
CreatedAt:
|
|
1428
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1429
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1430
|
-
: undefined,
|
|
1431
|
-
Id: __expectString(output.Id),
|
|
1432
|
-
IsBatchStatement: __expectBoolean(output.IsBatchStatement),
|
|
1433
|
-
QueryParameters:
|
|
1434
|
-
output.QueryParameters !== undefined && output.QueryParameters !== null
|
|
1435
|
-
? deserializeAws_json1_1SqlParametersList(output.QueryParameters, context)
|
|
1436
|
-
: undefined,
|
|
1437
|
-
QueryString: __expectString(output.QueryString),
|
|
1438
|
-
QueryStrings:
|
|
1439
|
-
output.QueryStrings !== undefined && output.QueryStrings !== null
|
|
1440
|
-
? deserializeAws_json1_1StatementStringList(output.QueryStrings, context)
|
|
1441
|
-
: undefined,
|
|
1442
|
-
SecretArn: __expectString(output.SecretArn),
|
|
1443
|
-
StatementName: __expectString(output.StatementName),
|
|
1444
|
-
Status: __expectString(output.Status),
|
|
1445
|
-
UpdatedAt:
|
|
1446
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
1447
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
1448
|
-
: undefined,
|
|
1449
|
-
} as any;
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
const deserializeAws_json1_1StatementList = (output: any, context: __SerdeContext): StatementData[] => {
|
|
1453
|
-
return (output || [])
|
|
1454
|
-
.filter((e: any) => e != null)
|
|
1455
|
-
.map((entry: any) => {
|
|
1456
|
-
if (entry === null) {
|
|
1457
|
-
return null as any;
|
|
1458
|
-
}
|
|
1459
|
-
return deserializeAws_json1_1StatementData(entry, context);
|
|
1460
|
-
});
|
|
1461
|
-
};
|
|
1462
|
-
|
|
1463
|
-
const deserializeAws_json1_1StatementStringList = (output: any, context: __SerdeContext): string[] => {
|
|
1464
|
-
return (output || [])
|
|
1465
|
-
.filter((e: any) => e != null)
|
|
1466
|
-
.map((entry: any) => {
|
|
1467
|
-
if (entry === null) {
|
|
1468
|
-
return null as any;
|
|
1469
|
-
}
|
|
1470
|
-
return __expectString(entry) as any;
|
|
1471
|
-
});
|
|
1472
|
-
};
|
|
1473
|
-
|
|
1474
|
-
const deserializeAws_json1_1SubStatementData = (output: any, context: __SerdeContext): SubStatementData => {
|
|
1475
|
-
return {
|
|
1476
|
-
CreatedAt:
|
|
1477
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1478
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1479
|
-
: undefined,
|
|
1480
|
-
Duration: __expectLong(output.Duration),
|
|
1481
|
-
Error: __expectString(output.Error),
|
|
1482
|
-
HasResultSet: __expectBoolean(output.HasResultSet),
|
|
1483
|
-
Id: __expectString(output.Id),
|
|
1484
|
-
QueryString: __expectString(output.QueryString),
|
|
1485
|
-
RedshiftQueryId: __expectLong(output.RedshiftQueryId),
|
|
1486
|
-
ResultRows: __expectLong(output.ResultRows),
|
|
1487
|
-
ResultSize: __expectLong(output.ResultSize),
|
|
1488
|
-
Status: __expectString(output.Status),
|
|
1489
|
-
UpdatedAt:
|
|
1490
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
1491
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
|
|
1492
|
-
: undefined,
|
|
1493
|
-
} as any;
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
const deserializeAws_json1_1SubStatementList = (output: any, context: __SerdeContext): SubStatementData[] => {
|
|
1497
|
-
return (output || [])
|
|
1498
|
-
.filter((e: any) => e != null)
|
|
1499
|
-
.map((entry: any) => {
|
|
1500
|
-
if (entry === null) {
|
|
1501
|
-
return null as any;
|
|
1502
|
-
}
|
|
1503
|
-
return deserializeAws_json1_1SubStatementData(entry, context);
|
|
1504
|
-
});
|
|
1505
|
-
};
|
|
1506
|
-
|
|
1507
|
-
const deserializeAws_json1_1TableList = (output: any, context: __SerdeContext): TableMember[] => {
|
|
1508
|
-
return (output || [])
|
|
1509
|
-
.filter((e: any) => e != null)
|
|
1510
|
-
.map((entry: any) => {
|
|
1511
|
-
if (entry === null) {
|
|
1512
|
-
return null as any;
|
|
1513
|
-
}
|
|
1514
|
-
return deserializeAws_json1_1TableMember(entry, context);
|
|
1515
|
-
});
|
|
1516
|
-
};
|
|
1517
|
-
|
|
1518
|
-
const deserializeAws_json1_1TableMember = (output: any, context: __SerdeContext): TableMember => {
|
|
1519
|
-
return {
|
|
1520
|
-
name: __expectString(output.name),
|
|
1521
|
-
schema: __expectString(output.schema),
|
|
1522
|
-
type: __expectString(output.type),
|
|
1523
|
-
} as any;
|
|
1524
|
-
};
|
|
1525
|
-
|
|
1526
|
-
const deserializeAws_json1_1ValidationException = (output: any, context: __SerdeContext): ValidationException => {
|
|
1527
|
-
return {
|
|
1528
|
-
Message: __expectString(output.Message),
|
|
1529
|
-
} as any;
|
|
1530
|
-
};
|
|
1531
|
-
|
|
1532
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
1533
|
-
httpStatusCode: output.statusCode,
|
|
1534
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1535
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1536
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1537
|
-
});
|
|
1538
|
-
|
|
1539
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1540
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
1541
|
-
if (streamBody instanceof Uint8Array) {
|
|
1542
|
-
return Promise.resolve(streamBody);
|
|
1543
|
-
}
|
|
1544
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1545
|
-
};
|
|
1546
|
-
|
|
1547
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1548
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
1549
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1550
|
-
|
|
1551
|
-
const buildHttpRpcRequest = async (
|
|
1552
|
-
context: __SerdeContext,
|
|
1553
|
-
headers: __HeaderBag,
|
|
1554
|
-
path: string,
|
|
1555
|
-
resolvedHostname: string | undefined,
|
|
1556
|
-
body: any
|
|
1557
|
-
): Promise<__HttpRequest> => {
|
|
1558
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1559
|
-
const contents: any = {
|
|
1560
|
-
protocol,
|
|
1561
|
-
hostname,
|
|
1562
|
-
port,
|
|
1563
|
-
method: "POST",
|
|
1564
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1565
|
-
headers,
|
|
1566
|
-
};
|
|
1567
|
-
if (resolvedHostname !== undefined) {
|
|
1568
|
-
contents.hostname = resolvedHostname;
|
|
1569
|
-
}
|
|
1570
|
-
if (body !== undefined) {
|
|
1571
|
-
contents.body = body;
|
|
1572
|
-
}
|
|
1573
|
-
return new __HttpRequest(contents);
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
1577
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
1578
|
-
if (encoded.length) {
|
|
1579
|
-
return JSON.parse(encoded);
|
|
1580
|
-
}
|
|
1581
|
-
return {};
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
/**
|
|
1585
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
1586
|
-
*/
|
|
1587
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
1588
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1589
|
-
|
|
1590
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
1591
|
-
let cleanValue = rawValue;
|
|
1592
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1593
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1594
|
-
}
|
|
1595
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1596
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1597
|
-
}
|
|
1598
|
-
return cleanValue;
|
|
1599
|
-
};
|
|
1600
|
-
|
|
1601
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1602
|
-
if (headerKey !== undefined) {
|
|
1603
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
if (data.code !== undefined) {
|
|
1607
|
-
return sanitizeErrorCode(data.code);
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
if (data["__type"] !== undefined) {
|
|
1611
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
return "";
|
|
1615
|
-
};
|