@aws-sdk/client-keyspaces 3.54.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 +11 -0
- package/LICENSE +201 -0
- package/README.md +219 -0
- package/dist-cjs/Keyspaces.js +202 -0
- package/dist-cjs/KeyspacesClient.js +35 -0
- package/dist-cjs/commands/CreateKeyspaceCommand.js +36 -0
- package/dist-cjs/commands/CreateTableCommand.js +36 -0
- package/dist-cjs/commands/DeleteKeyspaceCommand.js +36 -0
- package/dist-cjs/commands/DeleteTableCommand.js +36 -0
- package/dist-cjs/commands/GetKeyspaceCommand.js +36 -0
- package/dist-cjs/commands/GetTableCommand.js +36 -0
- package/dist-cjs/commands/ListKeyspacesCommand.js +36 -0
- package/dist-cjs/commands/ListTablesCommand.js +36 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/RestoreTableCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateTableCommand.js +36 -0
- package/dist-cjs/commands/index.js +16 -0
- package/dist-cjs/endpoints.js +131 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/KeyspacesServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +364 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListKeyspacesPaginator.js +35 -0
- package/dist-cjs/pagination/ListTablesPaginator.js +35 -0
- package/dist-cjs/pagination/ListTagsForResourcePaginator.js +35 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +1455 -0
- package/dist-cjs/runtimeConfig.browser.js +45 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/Keyspaces.js +205 -0
- package/dist-es/KeyspacesClient.js +37 -0
- package/dist-es/commands/CreateKeyspaceCommand.js +39 -0
- package/dist-es/commands/CreateTableCommand.js +39 -0
- package/dist-es/commands/DeleteKeyspaceCommand.js +39 -0
- package/dist-es/commands/DeleteTableCommand.js +39 -0
- package/dist-es/commands/GetKeyspaceCommand.js +39 -0
- package/dist-es/commands/GetTableCommand.js +39 -0
- package/dist-es/commands/ListKeyspacesCommand.js +39 -0
- package/dist-es/commands/ListTablesCommand.js +39 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
- package/dist-es/commands/RestoreTableCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/dist-es/commands/UntagResourceCommand.js +39 -0
- package/dist-es/commands/UpdateTableCommand.js +39 -0
- package/dist-es/commands/index.js +13 -0
- package/dist-es/endpoints.js +127 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/KeyspacesServiceException.js +12 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +273 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListKeyspacesPaginator.js +74 -0
- package/dist-es/pagination/ListTablesPaginator.js +74 -0
- package/dist-es/pagination/ListTagsForResourcePaginator.js +74 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +1627 -0
- package/dist-es/runtimeConfig.browser.js +26 -0
- package/dist-es/runtimeConfig.js +28 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/Keyspaces.d.ts +187 -0
- package/dist-types/KeyspacesClient.d.ts +173 -0
- package/dist-types/commands/CreateKeyspaceCommand.d.ts +41 -0
- package/dist-types/commands/CreateTableCommand.d.ts +42 -0
- package/dist-types/commands/DeleteKeyspaceCommand.d.ts +35 -0
- package/dist-types/commands/DeleteTableCommand.d.ts +40 -0
- package/dist-types/commands/GetKeyspaceCommand.d.ts +35 -0
- package/dist-types/commands/GetTableCommand.d.ts +38 -0
- package/dist-types/commands/ListKeyspacesCommand.d.ts +35 -0
- package/dist-types/commands/ListTablesCommand.d.ts +35 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
- package/dist-types/commands/RestoreTableCommand.d.ts +79 -0
- package/dist-types/commands/TagResourceCommand.d.ts +41 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UpdateTableCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +13 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/KeyspacesServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1307 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListKeyspacesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListTablesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +41 -0
- package/dist-types/runtimeConfig.browser.d.ts +40 -0
- package/dist-types/runtimeConfig.d.ts +40 -0
- package/dist-types/runtimeConfig.native.d.ts +39 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/Keyspaces.d.ts +70 -0
- package/dist-types/ts3.4/KeyspacesClient.d.ts +86 -0
- package/dist-types/ts3.4/commands/CreateKeyspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateTableCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteKeyspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteTableCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetKeyspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetTableCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListKeyspacesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RestoreTableCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateTableCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +13 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/KeyspacesServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +539 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListKeyspacesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListTablesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +41 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +93 -0
|
@@ -0,0 +1,1627 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { KeyspacesServiceException as __BaseException } from "../models/KeyspacesServiceException";
|
|
5
|
+
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
6
|
+
export var serializeAws_json1_0CreateKeyspaceCommand = 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.0",
|
|
11
|
+
"x-amz-target": "KeyspacesService.CreateKeyspace",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_0CreateKeyspaceRequest(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
15
|
+
});
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_0CreateTableCommand = 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.0",
|
|
22
|
+
"x-amz-target": "KeyspacesService.CreateTable",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_0CreateTableRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
26
|
+
});
|
|
27
|
+
}); };
|
|
28
|
+
export var serializeAws_json1_0DeleteKeyspaceCommand = 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.0",
|
|
33
|
+
"x-amz-target": "KeyspacesService.DeleteKeyspace",
|
|
34
|
+
};
|
|
35
|
+
body = JSON.stringify(serializeAws_json1_0DeleteKeyspaceRequest(input, context));
|
|
36
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
37
|
+
});
|
|
38
|
+
}); };
|
|
39
|
+
export var serializeAws_json1_0DeleteTableCommand = 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.0",
|
|
44
|
+
"x-amz-target": "KeyspacesService.DeleteTable",
|
|
45
|
+
};
|
|
46
|
+
body = JSON.stringify(serializeAws_json1_0DeleteTableRequest(input, context));
|
|
47
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
48
|
+
});
|
|
49
|
+
}); };
|
|
50
|
+
export var serializeAws_json1_0GetKeyspaceCommand = 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.0",
|
|
55
|
+
"x-amz-target": "KeyspacesService.GetKeyspace",
|
|
56
|
+
};
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_0GetKeyspaceRequest(input, context));
|
|
58
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
59
|
+
});
|
|
60
|
+
}); };
|
|
61
|
+
export var serializeAws_json1_0GetTableCommand = 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.0",
|
|
66
|
+
"x-amz-target": "KeyspacesService.GetTable",
|
|
67
|
+
};
|
|
68
|
+
body = JSON.stringify(serializeAws_json1_0GetTableRequest(input, context));
|
|
69
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
70
|
+
});
|
|
71
|
+
}); };
|
|
72
|
+
export var serializeAws_json1_0ListKeyspacesCommand = 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.0",
|
|
77
|
+
"x-amz-target": "KeyspacesService.ListKeyspaces",
|
|
78
|
+
};
|
|
79
|
+
body = JSON.stringify(serializeAws_json1_0ListKeyspacesRequest(input, context));
|
|
80
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
81
|
+
});
|
|
82
|
+
}); };
|
|
83
|
+
export var serializeAws_json1_0ListTablesCommand = 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.0",
|
|
88
|
+
"x-amz-target": "KeyspacesService.ListTables",
|
|
89
|
+
};
|
|
90
|
+
body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
|
|
91
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
92
|
+
});
|
|
93
|
+
}); };
|
|
94
|
+
export var serializeAws_json1_0ListTagsForResourceCommand = 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.0",
|
|
99
|
+
"x-amz-target": "KeyspacesService.ListTagsForResource",
|
|
100
|
+
};
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
|
|
102
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
103
|
+
});
|
|
104
|
+
}); };
|
|
105
|
+
export var serializeAws_json1_0RestoreTableCommand = 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.0",
|
|
110
|
+
"x-amz-target": "KeyspacesService.RestoreTable",
|
|
111
|
+
};
|
|
112
|
+
body = JSON.stringify(serializeAws_json1_0RestoreTableRequest(input, context));
|
|
113
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
114
|
+
});
|
|
115
|
+
}); };
|
|
116
|
+
export var serializeAws_json1_0TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
|
+
var headers, body;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
headers = {
|
|
120
|
+
"content-type": "application/x-amz-json-1.0",
|
|
121
|
+
"x-amz-target": "KeyspacesService.TagResource",
|
|
122
|
+
};
|
|
123
|
+
body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
|
|
124
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
125
|
+
});
|
|
126
|
+
}); };
|
|
127
|
+
export var serializeAws_json1_0UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
|
+
var headers, body;
|
|
129
|
+
return __generator(this, function (_a) {
|
|
130
|
+
headers = {
|
|
131
|
+
"content-type": "application/x-amz-json-1.0",
|
|
132
|
+
"x-amz-target": "KeyspacesService.UntagResource",
|
|
133
|
+
};
|
|
134
|
+
body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
|
|
135
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
136
|
+
});
|
|
137
|
+
}); };
|
|
138
|
+
export var serializeAws_json1_0UpdateTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
139
|
+
var headers, body;
|
|
140
|
+
return __generator(this, function (_a) {
|
|
141
|
+
headers = {
|
|
142
|
+
"content-type": "application/x-amz-json-1.0",
|
|
143
|
+
"x-amz-target": "KeyspacesService.UpdateTable",
|
|
144
|
+
};
|
|
145
|
+
body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
|
|
146
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
147
|
+
});
|
|
148
|
+
}); };
|
|
149
|
+
export var deserializeAws_json1_0CreateKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
150
|
+
var data, contents, response;
|
|
151
|
+
return __generator(this, function (_a) {
|
|
152
|
+
switch (_a.label) {
|
|
153
|
+
case 0:
|
|
154
|
+
if (output.statusCode >= 300) {
|
|
155
|
+
return [2, deserializeAws_json1_0CreateKeyspaceCommandError(output, context)];
|
|
156
|
+
}
|
|
157
|
+
return [4, parseBody(output.body, context)];
|
|
158
|
+
case 1:
|
|
159
|
+
data = _a.sent();
|
|
160
|
+
contents = {};
|
|
161
|
+
contents = deserializeAws_json1_0CreateKeyspaceResponse(data, context);
|
|
162
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
163
|
+
return [2, Promise.resolve(response)];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}); };
|
|
167
|
+
var deserializeAws_json1_0CreateKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
168
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
169
|
+
var _c;
|
|
170
|
+
return __generator(this, function (_d) {
|
|
171
|
+
switch (_d.label) {
|
|
172
|
+
case 0:
|
|
173
|
+
_a = [__assign({}, output)];
|
|
174
|
+
_c = {};
|
|
175
|
+
return [4, parseBody(output.body, context)];
|
|
176
|
+
case 1:
|
|
177
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
178
|
+
errorCode = "UnknownError";
|
|
179
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
180
|
+
_b = errorCode;
|
|
181
|
+
switch (_b) {
|
|
182
|
+
case "AccessDeniedException": return [3, 2];
|
|
183
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
184
|
+
case "ConflictException": return [3, 4];
|
|
185
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
186
|
+
case "InternalServerException": return [3, 6];
|
|
187
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
188
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
189
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
190
|
+
case "ValidationException": return [3, 10];
|
|
191
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
192
|
+
}
|
|
193
|
+
return [3, 12];
|
|
194
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
195
|
+
case 3: throw _d.sent();
|
|
196
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
197
|
+
case 5: throw _d.sent();
|
|
198
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
199
|
+
case 7: throw _d.sent();
|
|
200
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
201
|
+
case 9: throw _d.sent();
|
|
202
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
203
|
+
case 11: throw _d.sent();
|
|
204
|
+
case 12:
|
|
205
|
+
parsedBody = parsedOutput.body;
|
|
206
|
+
response = new __BaseException({
|
|
207
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
208
|
+
$fault: "client",
|
|
209
|
+
$metadata: deserializeMetadata(output),
|
|
210
|
+
});
|
|
211
|
+
throw __decorateServiceException(response, parsedBody);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}); };
|
|
215
|
+
export var deserializeAws_json1_0CreateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
216
|
+
var data, contents, response;
|
|
217
|
+
return __generator(this, function (_a) {
|
|
218
|
+
switch (_a.label) {
|
|
219
|
+
case 0:
|
|
220
|
+
if (output.statusCode >= 300) {
|
|
221
|
+
return [2, deserializeAws_json1_0CreateTableCommandError(output, context)];
|
|
222
|
+
}
|
|
223
|
+
return [4, parseBody(output.body, context)];
|
|
224
|
+
case 1:
|
|
225
|
+
data = _a.sent();
|
|
226
|
+
contents = {};
|
|
227
|
+
contents = deserializeAws_json1_0CreateTableResponse(data, context);
|
|
228
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
229
|
+
return [2, Promise.resolve(response)];
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}); };
|
|
233
|
+
var deserializeAws_json1_0CreateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
235
|
+
var _c;
|
|
236
|
+
return __generator(this, function (_d) {
|
|
237
|
+
switch (_d.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
_a = [__assign({}, output)];
|
|
240
|
+
_c = {};
|
|
241
|
+
return [4, parseBody(output.body, context)];
|
|
242
|
+
case 1:
|
|
243
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
244
|
+
errorCode = "UnknownError";
|
|
245
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
246
|
+
_b = errorCode;
|
|
247
|
+
switch (_b) {
|
|
248
|
+
case "AccessDeniedException": return [3, 2];
|
|
249
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
250
|
+
case "ConflictException": return [3, 4];
|
|
251
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
252
|
+
case "InternalServerException": return [3, 6];
|
|
253
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
254
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
255
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
256
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
257
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
258
|
+
case "ValidationException": return [3, 12];
|
|
259
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
260
|
+
}
|
|
261
|
+
return [3, 14];
|
|
262
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
263
|
+
case 3: throw _d.sent();
|
|
264
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
265
|
+
case 5: throw _d.sent();
|
|
266
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
267
|
+
case 7: throw _d.sent();
|
|
268
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
269
|
+
case 9: throw _d.sent();
|
|
270
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
271
|
+
case 11: throw _d.sent();
|
|
272
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
273
|
+
case 13: throw _d.sent();
|
|
274
|
+
case 14:
|
|
275
|
+
parsedBody = parsedOutput.body;
|
|
276
|
+
response = new __BaseException({
|
|
277
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
278
|
+
$fault: "client",
|
|
279
|
+
$metadata: deserializeMetadata(output),
|
|
280
|
+
});
|
|
281
|
+
throw __decorateServiceException(response, parsedBody);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}); };
|
|
285
|
+
export var deserializeAws_json1_0DeleteKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
286
|
+
var data, contents, response;
|
|
287
|
+
return __generator(this, function (_a) {
|
|
288
|
+
switch (_a.label) {
|
|
289
|
+
case 0:
|
|
290
|
+
if (output.statusCode >= 300) {
|
|
291
|
+
return [2, deserializeAws_json1_0DeleteKeyspaceCommandError(output, context)];
|
|
292
|
+
}
|
|
293
|
+
return [4, parseBody(output.body, context)];
|
|
294
|
+
case 1:
|
|
295
|
+
data = _a.sent();
|
|
296
|
+
contents = {};
|
|
297
|
+
contents = deserializeAws_json1_0DeleteKeyspaceResponse(data, context);
|
|
298
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
299
|
+
return [2, Promise.resolve(response)];
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}); };
|
|
303
|
+
var deserializeAws_json1_0DeleteKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
305
|
+
var _c;
|
|
306
|
+
return __generator(this, function (_d) {
|
|
307
|
+
switch (_d.label) {
|
|
308
|
+
case 0:
|
|
309
|
+
_a = [__assign({}, output)];
|
|
310
|
+
_c = {};
|
|
311
|
+
return [4, parseBody(output.body, context)];
|
|
312
|
+
case 1:
|
|
313
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
314
|
+
errorCode = "UnknownError";
|
|
315
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
316
|
+
_b = errorCode;
|
|
317
|
+
switch (_b) {
|
|
318
|
+
case "AccessDeniedException": return [3, 2];
|
|
319
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
320
|
+
case "ConflictException": return [3, 4];
|
|
321
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
322
|
+
case "InternalServerException": return [3, 6];
|
|
323
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
324
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
325
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
326
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
327
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
328
|
+
case "ValidationException": return [3, 12];
|
|
329
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
330
|
+
}
|
|
331
|
+
return [3, 14];
|
|
332
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
333
|
+
case 3: throw _d.sent();
|
|
334
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
335
|
+
case 5: throw _d.sent();
|
|
336
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
337
|
+
case 7: throw _d.sent();
|
|
338
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
339
|
+
case 9: throw _d.sent();
|
|
340
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
341
|
+
case 11: throw _d.sent();
|
|
342
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
343
|
+
case 13: throw _d.sent();
|
|
344
|
+
case 14:
|
|
345
|
+
parsedBody = parsedOutput.body;
|
|
346
|
+
response = new __BaseException({
|
|
347
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
348
|
+
$fault: "client",
|
|
349
|
+
$metadata: deserializeMetadata(output),
|
|
350
|
+
});
|
|
351
|
+
throw __decorateServiceException(response, parsedBody);
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}); };
|
|
355
|
+
export var deserializeAws_json1_0DeleteTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
356
|
+
var data, contents, response;
|
|
357
|
+
return __generator(this, function (_a) {
|
|
358
|
+
switch (_a.label) {
|
|
359
|
+
case 0:
|
|
360
|
+
if (output.statusCode >= 300) {
|
|
361
|
+
return [2, deserializeAws_json1_0DeleteTableCommandError(output, context)];
|
|
362
|
+
}
|
|
363
|
+
return [4, parseBody(output.body, context)];
|
|
364
|
+
case 1:
|
|
365
|
+
data = _a.sent();
|
|
366
|
+
contents = {};
|
|
367
|
+
contents = deserializeAws_json1_0DeleteTableResponse(data, context);
|
|
368
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
369
|
+
return [2, Promise.resolve(response)];
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}); };
|
|
373
|
+
var deserializeAws_json1_0DeleteTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
374
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
375
|
+
var _c;
|
|
376
|
+
return __generator(this, function (_d) {
|
|
377
|
+
switch (_d.label) {
|
|
378
|
+
case 0:
|
|
379
|
+
_a = [__assign({}, output)];
|
|
380
|
+
_c = {};
|
|
381
|
+
return [4, parseBody(output.body, context)];
|
|
382
|
+
case 1:
|
|
383
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
384
|
+
errorCode = "UnknownError";
|
|
385
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
386
|
+
_b = errorCode;
|
|
387
|
+
switch (_b) {
|
|
388
|
+
case "AccessDeniedException": return [3, 2];
|
|
389
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
390
|
+
case "ConflictException": return [3, 4];
|
|
391
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
392
|
+
case "InternalServerException": return [3, 6];
|
|
393
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
394
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
395
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
396
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
397
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
398
|
+
case "ValidationException": return [3, 12];
|
|
399
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
400
|
+
}
|
|
401
|
+
return [3, 14];
|
|
402
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
403
|
+
case 3: throw _d.sent();
|
|
404
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
405
|
+
case 5: throw _d.sent();
|
|
406
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
407
|
+
case 7: throw _d.sent();
|
|
408
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
409
|
+
case 9: throw _d.sent();
|
|
410
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
411
|
+
case 11: throw _d.sent();
|
|
412
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
413
|
+
case 13: throw _d.sent();
|
|
414
|
+
case 14:
|
|
415
|
+
parsedBody = parsedOutput.body;
|
|
416
|
+
response = new __BaseException({
|
|
417
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
418
|
+
$fault: "client",
|
|
419
|
+
$metadata: deserializeMetadata(output),
|
|
420
|
+
});
|
|
421
|
+
throw __decorateServiceException(response, parsedBody);
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}); };
|
|
425
|
+
export var deserializeAws_json1_0GetKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
426
|
+
var data, contents, response;
|
|
427
|
+
return __generator(this, function (_a) {
|
|
428
|
+
switch (_a.label) {
|
|
429
|
+
case 0:
|
|
430
|
+
if (output.statusCode >= 300) {
|
|
431
|
+
return [2, deserializeAws_json1_0GetKeyspaceCommandError(output, context)];
|
|
432
|
+
}
|
|
433
|
+
return [4, parseBody(output.body, context)];
|
|
434
|
+
case 1:
|
|
435
|
+
data = _a.sent();
|
|
436
|
+
contents = {};
|
|
437
|
+
contents = deserializeAws_json1_0GetKeyspaceResponse(data, context);
|
|
438
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
439
|
+
return [2, Promise.resolve(response)];
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}); };
|
|
443
|
+
var deserializeAws_json1_0GetKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
444
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
445
|
+
var _c;
|
|
446
|
+
return __generator(this, function (_d) {
|
|
447
|
+
switch (_d.label) {
|
|
448
|
+
case 0:
|
|
449
|
+
_a = [__assign({}, output)];
|
|
450
|
+
_c = {};
|
|
451
|
+
return [4, parseBody(output.body, context)];
|
|
452
|
+
case 1:
|
|
453
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
454
|
+
errorCode = "UnknownError";
|
|
455
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
456
|
+
_b = errorCode;
|
|
457
|
+
switch (_b) {
|
|
458
|
+
case "AccessDeniedException": return [3, 2];
|
|
459
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
460
|
+
case "InternalServerException": return [3, 4];
|
|
461
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
462
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
463
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
464
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
465
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
466
|
+
case "ValidationException": return [3, 10];
|
|
467
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
468
|
+
}
|
|
469
|
+
return [3, 12];
|
|
470
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
471
|
+
case 3: throw _d.sent();
|
|
472
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
473
|
+
case 5: throw _d.sent();
|
|
474
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
475
|
+
case 7: throw _d.sent();
|
|
476
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
477
|
+
case 9: throw _d.sent();
|
|
478
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
479
|
+
case 11: throw _d.sent();
|
|
480
|
+
case 12:
|
|
481
|
+
parsedBody = parsedOutput.body;
|
|
482
|
+
response = new __BaseException({
|
|
483
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
484
|
+
$fault: "client",
|
|
485
|
+
$metadata: deserializeMetadata(output),
|
|
486
|
+
});
|
|
487
|
+
throw __decorateServiceException(response, parsedBody);
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
}); };
|
|
491
|
+
export var deserializeAws_json1_0GetTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
492
|
+
var data, contents, response;
|
|
493
|
+
return __generator(this, function (_a) {
|
|
494
|
+
switch (_a.label) {
|
|
495
|
+
case 0:
|
|
496
|
+
if (output.statusCode >= 300) {
|
|
497
|
+
return [2, deserializeAws_json1_0GetTableCommandError(output, context)];
|
|
498
|
+
}
|
|
499
|
+
return [4, parseBody(output.body, context)];
|
|
500
|
+
case 1:
|
|
501
|
+
data = _a.sent();
|
|
502
|
+
contents = {};
|
|
503
|
+
contents = deserializeAws_json1_0GetTableResponse(data, context);
|
|
504
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
505
|
+
return [2, Promise.resolve(response)];
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}); };
|
|
509
|
+
var deserializeAws_json1_0GetTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
510
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
511
|
+
var _c;
|
|
512
|
+
return __generator(this, function (_d) {
|
|
513
|
+
switch (_d.label) {
|
|
514
|
+
case 0:
|
|
515
|
+
_a = [__assign({}, output)];
|
|
516
|
+
_c = {};
|
|
517
|
+
return [4, parseBody(output.body, context)];
|
|
518
|
+
case 1:
|
|
519
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
520
|
+
errorCode = "UnknownError";
|
|
521
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
522
|
+
_b = errorCode;
|
|
523
|
+
switch (_b) {
|
|
524
|
+
case "AccessDeniedException": return [3, 2];
|
|
525
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
526
|
+
case "InternalServerException": return [3, 4];
|
|
527
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
528
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
529
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
530
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
531
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
532
|
+
case "ValidationException": return [3, 10];
|
|
533
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
534
|
+
}
|
|
535
|
+
return [3, 12];
|
|
536
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
537
|
+
case 3: throw _d.sent();
|
|
538
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
539
|
+
case 5: throw _d.sent();
|
|
540
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
541
|
+
case 7: throw _d.sent();
|
|
542
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
543
|
+
case 9: throw _d.sent();
|
|
544
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
545
|
+
case 11: throw _d.sent();
|
|
546
|
+
case 12:
|
|
547
|
+
parsedBody = parsedOutput.body;
|
|
548
|
+
response = new __BaseException({
|
|
549
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
550
|
+
$fault: "client",
|
|
551
|
+
$metadata: deserializeMetadata(output),
|
|
552
|
+
});
|
|
553
|
+
throw __decorateServiceException(response, parsedBody);
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}); };
|
|
557
|
+
export var deserializeAws_json1_0ListKeyspacesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
558
|
+
var data, contents, response;
|
|
559
|
+
return __generator(this, function (_a) {
|
|
560
|
+
switch (_a.label) {
|
|
561
|
+
case 0:
|
|
562
|
+
if (output.statusCode >= 300) {
|
|
563
|
+
return [2, deserializeAws_json1_0ListKeyspacesCommandError(output, context)];
|
|
564
|
+
}
|
|
565
|
+
return [4, parseBody(output.body, context)];
|
|
566
|
+
case 1:
|
|
567
|
+
data = _a.sent();
|
|
568
|
+
contents = {};
|
|
569
|
+
contents = deserializeAws_json1_0ListKeyspacesResponse(data, context);
|
|
570
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
571
|
+
return [2, Promise.resolve(response)];
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
}); };
|
|
575
|
+
var deserializeAws_json1_0ListKeyspacesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
576
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
577
|
+
var _c;
|
|
578
|
+
return __generator(this, function (_d) {
|
|
579
|
+
switch (_d.label) {
|
|
580
|
+
case 0:
|
|
581
|
+
_a = [__assign({}, output)];
|
|
582
|
+
_c = {};
|
|
583
|
+
return [4, parseBody(output.body, context)];
|
|
584
|
+
case 1:
|
|
585
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
586
|
+
errorCode = "UnknownError";
|
|
587
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
588
|
+
_b = errorCode;
|
|
589
|
+
switch (_b) {
|
|
590
|
+
case "AccessDeniedException": return [3, 2];
|
|
591
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
592
|
+
case "InternalServerException": return [3, 4];
|
|
593
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
594
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
595
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
596
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
597
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
598
|
+
case "ValidationException": return [3, 10];
|
|
599
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
600
|
+
}
|
|
601
|
+
return [3, 12];
|
|
602
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
603
|
+
case 3: throw _d.sent();
|
|
604
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
605
|
+
case 5: throw _d.sent();
|
|
606
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
607
|
+
case 7: throw _d.sent();
|
|
608
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
609
|
+
case 9: throw _d.sent();
|
|
610
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
611
|
+
case 11: throw _d.sent();
|
|
612
|
+
case 12:
|
|
613
|
+
parsedBody = parsedOutput.body;
|
|
614
|
+
response = new __BaseException({
|
|
615
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
616
|
+
$fault: "client",
|
|
617
|
+
$metadata: deserializeMetadata(output),
|
|
618
|
+
});
|
|
619
|
+
throw __decorateServiceException(response, parsedBody);
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
}); };
|
|
623
|
+
export var deserializeAws_json1_0ListTablesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
624
|
+
var data, contents, response;
|
|
625
|
+
return __generator(this, function (_a) {
|
|
626
|
+
switch (_a.label) {
|
|
627
|
+
case 0:
|
|
628
|
+
if (output.statusCode >= 300) {
|
|
629
|
+
return [2, deserializeAws_json1_0ListTablesCommandError(output, context)];
|
|
630
|
+
}
|
|
631
|
+
return [4, parseBody(output.body, context)];
|
|
632
|
+
case 1:
|
|
633
|
+
data = _a.sent();
|
|
634
|
+
contents = {};
|
|
635
|
+
contents = deserializeAws_json1_0ListTablesResponse(data, context);
|
|
636
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
637
|
+
return [2, Promise.resolve(response)];
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}); };
|
|
641
|
+
var deserializeAws_json1_0ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
642
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
643
|
+
var _c;
|
|
644
|
+
return __generator(this, function (_d) {
|
|
645
|
+
switch (_d.label) {
|
|
646
|
+
case 0:
|
|
647
|
+
_a = [__assign({}, output)];
|
|
648
|
+
_c = {};
|
|
649
|
+
return [4, parseBody(output.body, context)];
|
|
650
|
+
case 1:
|
|
651
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
652
|
+
errorCode = "UnknownError";
|
|
653
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
654
|
+
_b = errorCode;
|
|
655
|
+
switch (_b) {
|
|
656
|
+
case "AccessDeniedException": return [3, 2];
|
|
657
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
658
|
+
case "InternalServerException": return [3, 4];
|
|
659
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
660
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
661
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
662
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
663
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
664
|
+
case "ValidationException": return [3, 10];
|
|
665
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
666
|
+
}
|
|
667
|
+
return [3, 12];
|
|
668
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
669
|
+
case 3: throw _d.sent();
|
|
670
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
671
|
+
case 5: throw _d.sent();
|
|
672
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
673
|
+
case 7: throw _d.sent();
|
|
674
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
675
|
+
case 9: throw _d.sent();
|
|
676
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
677
|
+
case 11: throw _d.sent();
|
|
678
|
+
case 12:
|
|
679
|
+
parsedBody = parsedOutput.body;
|
|
680
|
+
response = new __BaseException({
|
|
681
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
682
|
+
$fault: "client",
|
|
683
|
+
$metadata: deserializeMetadata(output),
|
|
684
|
+
});
|
|
685
|
+
throw __decorateServiceException(response, parsedBody);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}); };
|
|
689
|
+
export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
690
|
+
var data, contents, response;
|
|
691
|
+
return __generator(this, function (_a) {
|
|
692
|
+
switch (_a.label) {
|
|
693
|
+
case 0:
|
|
694
|
+
if (output.statusCode >= 300) {
|
|
695
|
+
return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
|
|
696
|
+
}
|
|
697
|
+
return [4, parseBody(output.body, context)];
|
|
698
|
+
case 1:
|
|
699
|
+
data = _a.sent();
|
|
700
|
+
contents = {};
|
|
701
|
+
contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
|
|
702
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
703
|
+
return [2, Promise.resolve(response)];
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
}); };
|
|
707
|
+
var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
708
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
709
|
+
var _c;
|
|
710
|
+
return __generator(this, function (_d) {
|
|
711
|
+
switch (_d.label) {
|
|
712
|
+
case 0:
|
|
713
|
+
_a = [__assign({}, output)];
|
|
714
|
+
_c = {};
|
|
715
|
+
return [4, parseBody(output.body, context)];
|
|
716
|
+
case 1:
|
|
717
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
718
|
+
errorCode = "UnknownError";
|
|
719
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
|
+
_b = errorCode;
|
|
721
|
+
switch (_b) {
|
|
722
|
+
case "AccessDeniedException": return [3, 2];
|
|
723
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
724
|
+
case "InternalServerException": return [3, 4];
|
|
725
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
726
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
727
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
728
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
729
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
730
|
+
case "ValidationException": return [3, 10];
|
|
731
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
732
|
+
}
|
|
733
|
+
return [3, 12];
|
|
734
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
735
|
+
case 3: throw _d.sent();
|
|
736
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
737
|
+
case 5: throw _d.sent();
|
|
738
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
739
|
+
case 7: throw _d.sent();
|
|
740
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
741
|
+
case 9: throw _d.sent();
|
|
742
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
743
|
+
case 11: throw _d.sent();
|
|
744
|
+
case 12:
|
|
745
|
+
parsedBody = parsedOutput.body;
|
|
746
|
+
response = new __BaseException({
|
|
747
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
748
|
+
$fault: "client",
|
|
749
|
+
$metadata: deserializeMetadata(output),
|
|
750
|
+
});
|
|
751
|
+
throw __decorateServiceException(response, parsedBody);
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
}); };
|
|
755
|
+
export var deserializeAws_json1_0RestoreTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
756
|
+
var data, contents, response;
|
|
757
|
+
return __generator(this, function (_a) {
|
|
758
|
+
switch (_a.label) {
|
|
759
|
+
case 0:
|
|
760
|
+
if (output.statusCode >= 300) {
|
|
761
|
+
return [2, deserializeAws_json1_0RestoreTableCommandError(output, context)];
|
|
762
|
+
}
|
|
763
|
+
return [4, parseBody(output.body, context)];
|
|
764
|
+
case 1:
|
|
765
|
+
data = _a.sent();
|
|
766
|
+
contents = {};
|
|
767
|
+
contents = deserializeAws_json1_0RestoreTableResponse(data, context);
|
|
768
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
769
|
+
return [2, Promise.resolve(response)];
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
}); };
|
|
773
|
+
var deserializeAws_json1_0RestoreTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
774
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
775
|
+
var _c;
|
|
776
|
+
return __generator(this, function (_d) {
|
|
777
|
+
switch (_d.label) {
|
|
778
|
+
case 0:
|
|
779
|
+
_a = [__assign({}, output)];
|
|
780
|
+
_c = {};
|
|
781
|
+
return [4, parseBody(output.body, context)];
|
|
782
|
+
case 1:
|
|
783
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
784
|
+
errorCode = "UnknownError";
|
|
785
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
786
|
+
_b = errorCode;
|
|
787
|
+
switch (_b) {
|
|
788
|
+
case "AccessDeniedException": return [3, 2];
|
|
789
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
790
|
+
case "ConflictException": return [3, 4];
|
|
791
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
792
|
+
case "InternalServerException": return [3, 6];
|
|
793
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
794
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
795
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
796
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
797
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
798
|
+
case "ValidationException": return [3, 12];
|
|
799
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
800
|
+
}
|
|
801
|
+
return [3, 14];
|
|
802
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
803
|
+
case 3: throw _d.sent();
|
|
804
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
805
|
+
case 5: throw _d.sent();
|
|
806
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
807
|
+
case 7: throw _d.sent();
|
|
808
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
809
|
+
case 9: throw _d.sent();
|
|
810
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
811
|
+
case 11: throw _d.sent();
|
|
812
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
813
|
+
case 13: throw _d.sent();
|
|
814
|
+
case 14:
|
|
815
|
+
parsedBody = parsedOutput.body;
|
|
816
|
+
response = new __BaseException({
|
|
817
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
818
|
+
$fault: "client",
|
|
819
|
+
$metadata: deserializeMetadata(output),
|
|
820
|
+
});
|
|
821
|
+
throw __decorateServiceException(response, parsedBody);
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
}); };
|
|
825
|
+
export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
826
|
+
var data, contents, response;
|
|
827
|
+
return __generator(this, function (_a) {
|
|
828
|
+
switch (_a.label) {
|
|
829
|
+
case 0:
|
|
830
|
+
if (output.statusCode >= 300) {
|
|
831
|
+
return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
|
|
832
|
+
}
|
|
833
|
+
return [4, parseBody(output.body, context)];
|
|
834
|
+
case 1:
|
|
835
|
+
data = _a.sent();
|
|
836
|
+
contents = {};
|
|
837
|
+
contents = deserializeAws_json1_0TagResourceResponse(data, context);
|
|
838
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
839
|
+
return [2, Promise.resolve(response)];
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
}); };
|
|
843
|
+
var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
844
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
845
|
+
var _c;
|
|
846
|
+
return __generator(this, function (_d) {
|
|
847
|
+
switch (_d.label) {
|
|
848
|
+
case 0:
|
|
849
|
+
_a = [__assign({}, output)];
|
|
850
|
+
_c = {};
|
|
851
|
+
return [4, parseBody(output.body, context)];
|
|
852
|
+
case 1:
|
|
853
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
854
|
+
errorCode = "UnknownError";
|
|
855
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
856
|
+
_b = errorCode;
|
|
857
|
+
switch (_b) {
|
|
858
|
+
case "AccessDeniedException": return [3, 2];
|
|
859
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
860
|
+
case "InternalServerException": return [3, 4];
|
|
861
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
|
|
862
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
863
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
|
|
864
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
865
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
|
|
866
|
+
case "ValidationException": return [3, 10];
|
|
867
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
|
|
868
|
+
}
|
|
869
|
+
return [3, 12];
|
|
870
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
871
|
+
case 3: throw _d.sent();
|
|
872
|
+
case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
873
|
+
case 5: throw _d.sent();
|
|
874
|
+
case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
875
|
+
case 7: throw _d.sent();
|
|
876
|
+
case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
877
|
+
case 9: throw _d.sent();
|
|
878
|
+
case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
879
|
+
case 11: throw _d.sent();
|
|
880
|
+
case 12:
|
|
881
|
+
parsedBody = parsedOutput.body;
|
|
882
|
+
response = new __BaseException({
|
|
883
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
884
|
+
$fault: "client",
|
|
885
|
+
$metadata: deserializeMetadata(output),
|
|
886
|
+
});
|
|
887
|
+
throw __decorateServiceException(response, parsedBody);
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
}); };
|
|
891
|
+
export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
892
|
+
var data, contents, response;
|
|
893
|
+
return __generator(this, function (_a) {
|
|
894
|
+
switch (_a.label) {
|
|
895
|
+
case 0:
|
|
896
|
+
if (output.statusCode >= 300) {
|
|
897
|
+
return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
|
|
898
|
+
}
|
|
899
|
+
return [4, parseBody(output.body, context)];
|
|
900
|
+
case 1:
|
|
901
|
+
data = _a.sent();
|
|
902
|
+
contents = {};
|
|
903
|
+
contents = deserializeAws_json1_0UntagResourceResponse(data, context);
|
|
904
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
905
|
+
return [2, Promise.resolve(response)];
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
}); };
|
|
909
|
+
var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
910
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
911
|
+
var _c;
|
|
912
|
+
return __generator(this, function (_d) {
|
|
913
|
+
switch (_d.label) {
|
|
914
|
+
case 0:
|
|
915
|
+
_a = [__assign({}, output)];
|
|
916
|
+
_c = {};
|
|
917
|
+
return [4, parseBody(output.body, context)];
|
|
918
|
+
case 1:
|
|
919
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
920
|
+
errorCode = "UnknownError";
|
|
921
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
922
|
+
_b = errorCode;
|
|
923
|
+
switch (_b) {
|
|
924
|
+
case "AccessDeniedException": return [3, 2];
|
|
925
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
926
|
+
case "ConflictException": return [3, 4];
|
|
927
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
928
|
+
case "InternalServerException": return [3, 6];
|
|
929
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
930
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
931
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
932
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
933
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
934
|
+
case "ValidationException": return [3, 12];
|
|
935
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
936
|
+
}
|
|
937
|
+
return [3, 14];
|
|
938
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
939
|
+
case 3: throw _d.sent();
|
|
940
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
941
|
+
case 5: throw _d.sent();
|
|
942
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
943
|
+
case 7: throw _d.sent();
|
|
944
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
945
|
+
case 9: throw _d.sent();
|
|
946
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
947
|
+
case 11: throw _d.sent();
|
|
948
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
949
|
+
case 13: throw _d.sent();
|
|
950
|
+
case 14:
|
|
951
|
+
parsedBody = parsedOutput.body;
|
|
952
|
+
response = new __BaseException({
|
|
953
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
954
|
+
$fault: "client",
|
|
955
|
+
$metadata: deserializeMetadata(output),
|
|
956
|
+
});
|
|
957
|
+
throw __decorateServiceException(response, parsedBody);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
}); };
|
|
961
|
+
export var deserializeAws_json1_0UpdateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
962
|
+
var data, contents, response;
|
|
963
|
+
return __generator(this, function (_a) {
|
|
964
|
+
switch (_a.label) {
|
|
965
|
+
case 0:
|
|
966
|
+
if (output.statusCode >= 300) {
|
|
967
|
+
return [2, deserializeAws_json1_0UpdateTableCommandError(output, context)];
|
|
968
|
+
}
|
|
969
|
+
return [4, parseBody(output.body, context)];
|
|
970
|
+
case 1:
|
|
971
|
+
data = _a.sent();
|
|
972
|
+
contents = {};
|
|
973
|
+
contents = deserializeAws_json1_0UpdateTableResponse(data, context);
|
|
974
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
975
|
+
return [2, Promise.resolve(response)];
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
}); };
|
|
979
|
+
var deserializeAws_json1_0UpdateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
980
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
981
|
+
var _c;
|
|
982
|
+
return __generator(this, function (_d) {
|
|
983
|
+
switch (_d.label) {
|
|
984
|
+
case 0:
|
|
985
|
+
_a = [__assign({}, output)];
|
|
986
|
+
_c = {};
|
|
987
|
+
return [4, parseBody(output.body, context)];
|
|
988
|
+
case 1:
|
|
989
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
990
|
+
errorCode = "UnknownError";
|
|
991
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
|
+
_b = errorCode;
|
|
993
|
+
switch (_b) {
|
|
994
|
+
case "AccessDeniedException": return [3, 2];
|
|
995
|
+
case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
|
|
996
|
+
case "ConflictException": return [3, 4];
|
|
997
|
+
case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
|
|
998
|
+
case "InternalServerException": return [3, 6];
|
|
999
|
+
case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
|
|
1000
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1001
|
+
case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
|
|
1002
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
1003
|
+
case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
|
|
1004
|
+
case "ValidationException": return [3, 12];
|
|
1005
|
+
case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
|
|
1006
|
+
}
|
|
1007
|
+
return [3, 14];
|
|
1008
|
+
case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1009
|
+
case 3: throw _d.sent();
|
|
1010
|
+
case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
|
|
1011
|
+
case 5: throw _d.sent();
|
|
1012
|
+
case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
1013
|
+
case 7: throw _d.sent();
|
|
1014
|
+
case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1015
|
+
case 9: throw _d.sent();
|
|
1016
|
+
case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1017
|
+
case 11: throw _d.sent();
|
|
1018
|
+
case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
|
|
1019
|
+
case 13: throw _d.sent();
|
|
1020
|
+
case 14:
|
|
1021
|
+
parsedBody = parsedOutput.body;
|
|
1022
|
+
response = new __BaseException({
|
|
1023
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1024
|
+
$fault: "client",
|
|
1025
|
+
$metadata: deserializeMetadata(output),
|
|
1026
|
+
});
|
|
1027
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
}); };
|
|
1031
|
+
var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1032
|
+
var body, deserialized, exception;
|
|
1033
|
+
return __generator(this, function (_a) {
|
|
1034
|
+
body = parsedOutput.body;
|
|
1035
|
+
deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
1036
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1037
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1038
|
+
});
|
|
1039
|
+
}); };
|
|
1040
|
+
var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1041
|
+
var body, deserialized, exception;
|
|
1042
|
+
return __generator(this, function (_a) {
|
|
1043
|
+
body = parsedOutput.body;
|
|
1044
|
+
deserialized = deserializeAws_json1_0ConflictException(body, context);
|
|
1045
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1046
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1047
|
+
});
|
|
1048
|
+
}); };
|
|
1049
|
+
var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1050
|
+
var body, deserialized, exception;
|
|
1051
|
+
return __generator(this, function (_a) {
|
|
1052
|
+
body = parsedOutput.body;
|
|
1053
|
+
deserialized = deserializeAws_json1_0InternalServerException(body, context);
|
|
1054
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1055
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1056
|
+
});
|
|
1057
|
+
}); };
|
|
1058
|
+
var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1059
|
+
var body, deserialized, exception;
|
|
1060
|
+
return __generator(this, function (_a) {
|
|
1061
|
+
body = parsedOutput.body;
|
|
1062
|
+
deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
1063
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1064
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1065
|
+
});
|
|
1066
|
+
}); };
|
|
1067
|
+
var deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1068
|
+
var body, deserialized, exception;
|
|
1069
|
+
return __generator(this, function (_a) {
|
|
1070
|
+
body = parsedOutput.body;
|
|
1071
|
+
deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
|
|
1072
|
+
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1073
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1074
|
+
});
|
|
1075
|
+
}); };
|
|
1076
|
+
var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1077
|
+
var body, deserialized, exception;
|
|
1078
|
+
return __generator(this, function (_a) {
|
|
1079
|
+
body = parsedOutput.body;
|
|
1080
|
+
deserialized = deserializeAws_json1_0ValidationException(body, context);
|
|
1081
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1082
|
+
return [2, __decorateServiceException(exception, body)];
|
|
1083
|
+
});
|
|
1084
|
+
}); };
|
|
1085
|
+
var serializeAws_json1_0CapacitySpecification = function (input, context) {
|
|
1086
|
+
return __assign(__assign(__assign({}, (input.readCapacityUnits !== undefined &&
|
|
1087
|
+
input.readCapacityUnits !== null && { readCapacityUnits: input.readCapacityUnits })), (input.throughputMode !== undefined &&
|
|
1088
|
+
input.throughputMode !== null && { throughputMode: input.throughputMode })), (input.writeCapacityUnits !== undefined &&
|
|
1089
|
+
input.writeCapacityUnits !== null && { writeCapacityUnits: input.writeCapacityUnits }));
|
|
1090
|
+
};
|
|
1091
|
+
var serializeAws_json1_0ClusteringKey = function (input, context) {
|
|
1092
|
+
return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.orderBy !== undefined && input.orderBy !== null && { orderBy: input.orderBy }));
|
|
1093
|
+
};
|
|
1094
|
+
var serializeAws_json1_0ClusteringKeyList = function (input, context) {
|
|
1095
|
+
return input
|
|
1096
|
+
.filter(function (e) { return e != null; })
|
|
1097
|
+
.map(function (entry) {
|
|
1098
|
+
if (entry === null) {
|
|
1099
|
+
return null;
|
|
1100
|
+
}
|
|
1101
|
+
return serializeAws_json1_0ClusteringKey(entry, context);
|
|
1102
|
+
});
|
|
1103
|
+
};
|
|
1104
|
+
var serializeAws_json1_0ColumnDefinition = function (input, context) {
|
|
1105
|
+
return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.type !== undefined && input.type !== null && { type: input.type }));
|
|
1106
|
+
};
|
|
1107
|
+
var serializeAws_json1_0ColumnDefinitionList = function (input, context) {
|
|
1108
|
+
return input
|
|
1109
|
+
.filter(function (e) { return e != null; })
|
|
1110
|
+
.map(function (entry) {
|
|
1111
|
+
if (entry === null) {
|
|
1112
|
+
return null;
|
|
1113
|
+
}
|
|
1114
|
+
return serializeAws_json1_0ColumnDefinition(entry, context);
|
|
1115
|
+
});
|
|
1116
|
+
};
|
|
1117
|
+
var serializeAws_json1_0Comment = function (input, context) {
|
|
1118
|
+
return __assign({}, (input.message !== undefined && input.message !== null && { message: input.message }));
|
|
1119
|
+
};
|
|
1120
|
+
var serializeAws_json1_0CreateKeyspaceRequest = function (input, context) {
|
|
1121
|
+
return __assign(__assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
|
|
1122
|
+
};
|
|
1123
|
+
var serializeAws_json1_0CreateTableRequest = function (input, context) {
|
|
1124
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.capacitySpecification !== undefined &&
|
|
1125
|
+
input.capacitySpecification !== null && {
|
|
1126
|
+
capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
|
|
1127
|
+
})), (input.comment !== undefined &&
|
|
1128
|
+
input.comment !== null && { comment: serializeAws_json1_0Comment(input.comment, context) })), (input.defaultTimeToLive !== undefined &&
|
|
1129
|
+
input.defaultTimeToLive !== null && { defaultTimeToLive: input.defaultTimeToLive })), (input.encryptionSpecification !== undefined &&
|
|
1130
|
+
input.encryptionSpecification !== null && {
|
|
1131
|
+
encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
|
|
1132
|
+
})), (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.pointInTimeRecovery !== undefined &&
|
|
1133
|
+
input.pointInTimeRecovery !== null && {
|
|
1134
|
+
pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
|
|
1135
|
+
})), (input.schemaDefinition !== undefined &&
|
|
1136
|
+
input.schemaDefinition !== null && {
|
|
1137
|
+
schemaDefinition: serializeAws_json1_0SchemaDefinition(input.schemaDefinition, context),
|
|
1138
|
+
})), (input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) })), (input.ttl !== undefined && input.ttl !== null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }));
|
|
1139
|
+
};
|
|
1140
|
+
var serializeAws_json1_0DeleteKeyspaceRequest = function (input, context) {
|
|
1141
|
+
return __assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }));
|
|
1142
|
+
};
|
|
1143
|
+
var serializeAws_json1_0DeleteTableRequest = function (input, context) {
|
|
1144
|
+
return __assign(__assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }));
|
|
1145
|
+
};
|
|
1146
|
+
var serializeAws_json1_0EncryptionSpecification = function (input, context) {
|
|
1147
|
+
return __assign(__assign({}, (input.kmsKeyIdentifier !== undefined &&
|
|
1148
|
+
input.kmsKeyIdentifier !== null && { kmsKeyIdentifier: input.kmsKeyIdentifier })), (input.type !== undefined && input.type !== null && { type: input.type }));
|
|
1149
|
+
};
|
|
1150
|
+
var serializeAws_json1_0GetKeyspaceRequest = function (input, context) {
|
|
1151
|
+
return __assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }));
|
|
1152
|
+
};
|
|
1153
|
+
var serializeAws_json1_0GetTableRequest = function (input, context) {
|
|
1154
|
+
return __assign(__assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }));
|
|
1155
|
+
};
|
|
1156
|
+
var serializeAws_json1_0ListKeyspacesRequest = function (input, context) {
|
|
1157
|
+
return __assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }));
|
|
1158
|
+
};
|
|
1159
|
+
var serializeAws_json1_0ListTablesRequest = function (input, context) {
|
|
1160
|
+
return __assign(__assign(__assign({}, (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }));
|
|
1161
|
+
};
|
|
1162
|
+
var serializeAws_json1_0ListTagsForResourceRequest = function (input, context) {
|
|
1163
|
+
return __assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }));
|
|
1164
|
+
};
|
|
1165
|
+
var serializeAws_json1_0PartitionKey = function (input, context) {
|
|
1166
|
+
return __assign({}, (input.name !== undefined && input.name !== null && { name: input.name }));
|
|
1167
|
+
};
|
|
1168
|
+
var serializeAws_json1_0PartitionKeyList = function (input, context) {
|
|
1169
|
+
return input
|
|
1170
|
+
.filter(function (e) { return e != null; })
|
|
1171
|
+
.map(function (entry) {
|
|
1172
|
+
if (entry === null) {
|
|
1173
|
+
return null;
|
|
1174
|
+
}
|
|
1175
|
+
return serializeAws_json1_0PartitionKey(entry, context);
|
|
1176
|
+
});
|
|
1177
|
+
};
|
|
1178
|
+
var serializeAws_json1_0PointInTimeRecovery = function (input, context) {
|
|
1179
|
+
return __assign({}, (input.status !== undefined && input.status !== null && { status: input.status }));
|
|
1180
|
+
};
|
|
1181
|
+
var serializeAws_json1_0RestoreTableRequest = function (input, context) {
|
|
1182
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.capacitySpecificationOverride !== undefined &&
|
|
1183
|
+
input.capacitySpecificationOverride !== null && {
|
|
1184
|
+
capacitySpecificationOverride: serializeAws_json1_0CapacitySpecification(input.capacitySpecificationOverride, context),
|
|
1185
|
+
})), (input.encryptionSpecificationOverride !== undefined &&
|
|
1186
|
+
input.encryptionSpecificationOverride !== null && {
|
|
1187
|
+
encryptionSpecificationOverride: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecificationOverride, context),
|
|
1188
|
+
})), (input.pointInTimeRecoveryOverride !== undefined &&
|
|
1189
|
+
input.pointInTimeRecoveryOverride !== null && {
|
|
1190
|
+
pointInTimeRecoveryOverride: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecoveryOverride, context),
|
|
1191
|
+
})), (input.restoreTimestamp !== undefined &&
|
|
1192
|
+
input.restoreTimestamp !== null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) })), (input.sourceKeyspaceName !== undefined &&
|
|
1193
|
+
input.sourceKeyspaceName !== null && { sourceKeyspaceName: input.sourceKeyspaceName })), (input.sourceTableName !== undefined &&
|
|
1194
|
+
input.sourceTableName !== null && { sourceTableName: input.sourceTableName })), (input.tagsOverride !== undefined &&
|
|
1195
|
+
input.tagsOverride !== null && { tagsOverride: serializeAws_json1_0TagList(input.tagsOverride, context) })), (input.targetKeyspaceName !== undefined &&
|
|
1196
|
+
input.targetKeyspaceName !== null && { targetKeyspaceName: input.targetKeyspaceName })), (input.targetTableName !== undefined &&
|
|
1197
|
+
input.targetTableName !== null && { targetTableName: input.targetTableName }));
|
|
1198
|
+
};
|
|
1199
|
+
var serializeAws_json1_0SchemaDefinition = function (input, context) {
|
|
1200
|
+
return __assign(__assign(__assign(__assign({}, (input.allColumns !== undefined &&
|
|
1201
|
+
input.allColumns !== null && { allColumns: serializeAws_json1_0ColumnDefinitionList(input.allColumns, context) })), (input.clusteringKeys !== undefined &&
|
|
1202
|
+
input.clusteringKeys !== null && {
|
|
1203
|
+
clusteringKeys: serializeAws_json1_0ClusteringKeyList(input.clusteringKeys, context),
|
|
1204
|
+
})), (input.partitionKeys !== undefined &&
|
|
1205
|
+
input.partitionKeys !== null && {
|
|
1206
|
+
partitionKeys: serializeAws_json1_0PartitionKeyList(input.partitionKeys, context),
|
|
1207
|
+
})), (input.staticColumns !== undefined &&
|
|
1208
|
+
input.staticColumns !== null && {
|
|
1209
|
+
staticColumns: serializeAws_json1_0StaticColumnList(input.staticColumns, context),
|
|
1210
|
+
}));
|
|
1211
|
+
};
|
|
1212
|
+
var serializeAws_json1_0StaticColumn = function (input, context) {
|
|
1213
|
+
return __assign({}, (input.name !== undefined && input.name !== null && { name: input.name }));
|
|
1214
|
+
};
|
|
1215
|
+
var serializeAws_json1_0StaticColumnList = function (input, context) {
|
|
1216
|
+
return input
|
|
1217
|
+
.filter(function (e) { return e != null; })
|
|
1218
|
+
.map(function (entry) {
|
|
1219
|
+
if (entry === null) {
|
|
1220
|
+
return null;
|
|
1221
|
+
}
|
|
1222
|
+
return serializeAws_json1_0StaticColumn(entry, context);
|
|
1223
|
+
});
|
|
1224
|
+
};
|
|
1225
|
+
var serializeAws_json1_0Tag = function (input, context) {
|
|
1226
|
+
return __assign(__assign({}, (input.key !== undefined && input.key !== null && { key: input.key })), (input.value !== undefined && input.value !== null && { value: input.value }));
|
|
1227
|
+
};
|
|
1228
|
+
var serializeAws_json1_0TagList = function (input, context) {
|
|
1229
|
+
return input
|
|
1230
|
+
.filter(function (e) { return e != null; })
|
|
1231
|
+
.map(function (entry) {
|
|
1232
|
+
if (entry === null) {
|
|
1233
|
+
return null;
|
|
1234
|
+
}
|
|
1235
|
+
return serializeAws_json1_0Tag(entry, context);
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
var serializeAws_json1_0TagResourceRequest = function (input, context) {
|
|
1239
|
+
return __assign(__assign({}, (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
|
|
1240
|
+
};
|
|
1241
|
+
var serializeAws_json1_0TimeToLive = function (input, context) {
|
|
1242
|
+
return __assign({}, (input.status !== undefined && input.status !== null && { status: input.status }));
|
|
1243
|
+
};
|
|
1244
|
+
var serializeAws_json1_0UntagResourceRequest = function (input, context) {
|
|
1245
|
+
return __assign(__assign({}, (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
|
|
1246
|
+
};
|
|
1247
|
+
var serializeAws_json1_0UpdateTableRequest = function (input, context) {
|
|
1248
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.addColumns !== undefined &&
|
|
1249
|
+
input.addColumns !== null && { addColumns: serializeAws_json1_0ColumnDefinitionList(input.addColumns, context) })), (input.capacitySpecification !== undefined &&
|
|
1250
|
+
input.capacitySpecification !== null && {
|
|
1251
|
+
capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
|
|
1252
|
+
})), (input.defaultTimeToLive !== undefined &&
|
|
1253
|
+
input.defaultTimeToLive !== null && { defaultTimeToLive: input.defaultTimeToLive })), (input.encryptionSpecification !== undefined &&
|
|
1254
|
+
input.encryptionSpecification !== null && {
|
|
1255
|
+
encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
|
|
1256
|
+
})), (input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName })), (input.pointInTimeRecovery !== undefined &&
|
|
1257
|
+
input.pointInTimeRecovery !== null && {
|
|
1258
|
+
pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
|
|
1259
|
+
})), (input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName })), (input.ttl !== undefined && input.ttl !== null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }));
|
|
1260
|
+
};
|
|
1261
|
+
var deserializeAws_json1_0AccessDeniedException = function (output, context) {
|
|
1262
|
+
return {
|
|
1263
|
+
message: __expectString(output.message),
|
|
1264
|
+
};
|
|
1265
|
+
};
|
|
1266
|
+
var deserializeAws_json1_0CapacitySpecificationSummary = function (output, context) {
|
|
1267
|
+
return {
|
|
1268
|
+
lastUpdateToPayPerRequestTimestamp: output.lastUpdateToPayPerRequestTimestamp !== undefined && output.lastUpdateToPayPerRequestTimestamp !== null
|
|
1269
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateToPayPerRequestTimestamp)))
|
|
1270
|
+
: undefined,
|
|
1271
|
+
readCapacityUnits: __expectLong(output.readCapacityUnits),
|
|
1272
|
+
throughputMode: __expectString(output.throughputMode),
|
|
1273
|
+
writeCapacityUnits: __expectLong(output.writeCapacityUnits),
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
var deserializeAws_json1_0ClusteringKey = function (output, context) {
|
|
1277
|
+
return {
|
|
1278
|
+
name: __expectString(output.name),
|
|
1279
|
+
orderBy: __expectString(output.orderBy),
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
var deserializeAws_json1_0ClusteringKeyList = function (output, context) {
|
|
1283
|
+
var retVal = (output || [])
|
|
1284
|
+
.filter(function (e) { return e != null; })
|
|
1285
|
+
.map(function (entry) {
|
|
1286
|
+
if (entry === null) {
|
|
1287
|
+
return null;
|
|
1288
|
+
}
|
|
1289
|
+
return deserializeAws_json1_0ClusteringKey(entry, context);
|
|
1290
|
+
});
|
|
1291
|
+
return retVal;
|
|
1292
|
+
};
|
|
1293
|
+
var deserializeAws_json1_0ColumnDefinition = function (output, context) {
|
|
1294
|
+
return {
|
|
1295
|
+
name: __expectString(output.name),
|
|
1296
|
+
type: __expectString(output.type),
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
var deserializeAws_json1_0ColumnDefinitionList = function (output, context) {
|
|
1300
|
+
var retVal = (output || [])
|
|
1301
|
+
.filter(function (e) { return e != null; })
|
|
1302
|
+
.map(function (entry) {
|
|
1303
|
+
if (entry === null) {
|
|
1304
|
+
return null;
|
|
1305
|
+
}
|
|
1306
|
+
return deserializeAws_json1_0ColumnDefinition(entry, context);
|
|
1307
|
+
});
|
|
1308
|
+
return retVal;
|
|
1309
|
+
};
|
|
1310
|
+
var deserializeAws_json1_0Comment = function (output, context) {
|
|
1311
|
+
return {
|
|
1312
|
+
message: __expectString(output.message),
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
var deserializeAws_json1_0ConflictException = function (output, context) {
|
|
1316
|
+
return {
|
|
1317
|
+
message: __expectString(output.message),
|
|
1318
|
+
};
|
|
1319
|
+
};
|
|
1320
|
+
var deserializeAws_json1_0CreateKeyspaceResponse = function (output, context) {
|
|
1321
|
+
return {
|
|
1322
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
var deserializeAws_json1_0CreateTableResponse = function (output, context) {
|
|
1326
|
+
return {
|
|
1327
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
var deserializeAws_json1_0DeleteKeyspaceResponse = function (output, context) {
|
|
1331
|
+
return {};
|
|
1332
|
+
};
|
|
1333
|
+
var deserializeAws_json1_0DeleteTableResponse = function (output, context) {
|
|
1334
|
+
return {};
|
|
1335
|
+
};
|
|
1336
|
+
var deserializeAws_json1_0EncryptionSpecification = function (output, context) {
|
|
1337
|
+
return {
|
|
1338
|
+
kmsKeyIdentifier: __expectString(output.kmsKeyIdentifier),
|
|
1339
|
+
type: __expectString(output.type),
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1342
|
+
var deserializeAws_json1_0GetKeyspaceResponse = function (output, context) {
|
|
1343
|
+
return {
|
|
1344
|
+
keyspaceName: __expectString(output.keyspaceName),
|
|
1345
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1346
|
+
};
|
|
1347
|
+
};
|
|
1348
|
+
var deserializeAws_json1_0GetTableResponse = function (output, context) {
|
|
1349
|
+
return {
|
|
1350
|
+
capacitySpecification: output.capacitySpecification !== undefined && output.capacitySpecification !== null
|
|
1351
|
+
? deserializeAws_json1_0CapacitySpecificationSummary(output.capacitySpecification, context)
|
|
1352
|
+
: undefined,
|
|
1353
|
+
comment: output.comment !== undefined && output.comment !== null
|
|
1354
|
+
? deserializeAws_json1_0Comment(output.comment, context)
|
|
1355
|
+
: undefined,
|
|
1356
|
+
creationTimestamp: output.creationTimestamp !== undefined && output.creationTimestamp !== null
|
|
1357
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp)))
|
|
1358
|
+
: undefined,
|
|
1359
|
+
defaultTimeToLive: __expectInt32(output.defaultTimeToLive),
|
|
1360
|
+
encryptionSpecification: output.encryptionSpecification !== undefined && output.encryptionSpecification !== null
|
|
1361
|
+
? deserializeAws_json1_0EncryptionSpecification(output.encryptionSpecification, context)
|
|
1362
|
+
: undefined,
|
|
1363
|
+
keyspaceName: __expectString(output.keyspaceName),
|
|
1364
|
+
pointInTimeRecovery: output.pointInTimeRecovery !== undefined && output.pointInTimeRecovery !== null
|
|
1365
|
+
? deserializeAws_json1_0PointInTimeRecoverySummary(output.pointInTimeRecovery, context)
|
|
1366
|
+
: undefined,
|
|
1367
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1368
|
+
schemaDefinition: output.schemaDefinition !== undefined && output.schemaDefinition !== null
|
|
1369
|
+
? deserializeAws_json1_0SchemaDefinition(output.schemaDefinition, context)
|
|
1370
|
+
: undefined,
|
|
1371
|
+
status: __expectString(output.status),
|
|
1372
|
+
tableName: __expectString(output.tableName),
|
|
1373
|
+
ttl: output.ttl !== undefined && output.ttl !== null
|
|
1374
|
+
? deserializeAws_json1_0TimeToLive(output.ttl, context)
|
|
1375
|
+
: undefined,
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
var deserializeAws_json1_0InternalServerException = function (output, context) {
|
|
1379
|
+
return {
|
|
1380
|
+
message: __expectString(output.message),
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
var deserializeAws_json1_0KeyspaceSummary = function (output, context) {
|
|
1384
|
+
return {
|
|
1385
|
+
keyspaceName: __expectString(output.keyspaceName),
|
|
1386
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1387
|
+
};
|
|
1388
|
+
};
|
|
1389
|
+
var deserializeAws_json1_0KeyspaceSummaryList = function (output, context) {
|
|
1390
|
+
var retVal = (output || [])
|
|
1391
|
+
.filter(function (e) { return e != null; })
|
|
1392
|
+
.map(function (entry) {
|
|
1393
|
+
if (entry === null) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
return deserializeAws_json1_0KeyspaceSummary(entry, context);
|
|
1397
|
+
});
|
|
1398
|
+
return retVal;
|
|
1399
|
+
};
|
|
1400
|
+
var deserializeAws_json1_0ListKeyspacesResponse = function (output, context) {
|
|
1401
|
+
return {
|
|
1402
|
+
keyspaces: output.keyspaces !== undefined && output.keyspaces !== null
|
|
1403
|
+
? deserializeAws_json1_0KeyspaceSummaryList(output.keyspaces, context)
|
|
1404
|
+
: undefined,
|
|
1405
|
+
nextToken: __expectString(output.nextToken),
|
|
1406
|
+
};
|
|
1407
|
+
};
|
|
1408
|
+
var deserializeAws_json1_0ListTablesResponse = function (output, context) {
|
|
1409
|
+
return {
|
|
1410
|
+
nextToken: __expectString(output.nextToken),
|
|
1411
|
+
tables: output.tables !== undefined && output.tables !== null
|
|
1412
|
+
? deserializeAws_json1_0TableSummaryList(output.tables, context)
|
|
1413
|
+
: undefined,
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
|
|
1417
|
+
return {
|
|
1418
|
+
nextToken: __expectString(output.nextToken),
|
|
1419
|
+
tags: output.tags !== undefined && output.tags !== null
|
|
1420
|
+
? deserializeAws_json1_0TagList(output.tags, context)
|
|
1421
|
+
: undefined,
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
var deserializeAws_json1_0PartitionKey = function (output, context) {
|
|
1425
|
+
return {
|
|
1426
|
+
name: __expectString(output.name),
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
var deserializeAws_json1_0PartitionKeyList = function (output, context) {
|
|
1430
|
+
var retVal = (output || [])
|
|
1431
|
+
.filter(function (e) { return e != null; })
|
|
1432
|
+
.map(function (entry) {
|
|
1433
|
+
if (entry === null) {
|
|
1434
|
+
return null;
|
|
1435
|
+
}
|
|
1436
|
+
return deserializeAws_json1_0PartitionKey(entry, context);
|
|
1437
|
+
});
|
|
1438
|
+
return retVal;
|
|
1439
|
+
};
|
|
1440
|
+
var deserializeAws_json1_0PointInTimeRecoverySummary = function (output, context) {
|
|
1441
|
+
return {
|
|
1442
|
+
earliestRestorableTimestamp: output.earliestRestorableTimestamp !== undefined && output.earliestRestorableTimestamp !== null
|
|
1443
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.earliestRestorableTimestamp)))
|
|
1444
|
+
: undefined,
|
|
1445
|
+
status: __expectString(output.status),
|
|
1446
|
+
};
|
|
1447
|
+
};
|
|
1448
|
+
var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
|
|
1449
|
+
return {
|
|
1450
|
+
message: __expectString(output.message),
|
|
1451
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
var deserializeAws_json1_0RestoreTableResponse = function (output, context) {
|
|
1455
|
+
return {
|
|
1456
|
+
restoredTableARN: __expectString(output.restoredTableARN),
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
var deserializeAws_json1_0SchemaDefinition = function (output, context) {
|
|
1460
|
+
return {
|
|
1461
|
+
allColumns: output.allColumns !== undefined && output.allColumns !== null
|
|
1462
|
+
? deserializeAws_json1_0ColumnDefinitionList(output.allColumns, context)
|
|
1463
|
+
: undefined,
|
|
1464
|
+
clusteringKeys: output.clusteringKeys !== undefined && output.clusteringKeys !== null
|
|
1465
|
+
? deserializeAws_json1_0ClusteringKeyList(output.clusteringKeys, context)
|
|
1466
|
+
: undefined,
|
|
1467
|
+
partitionKeys: output.partitionKeys !== undefined && output.partitionKeys !== null
|
|
1468
|
+
? deserializeAws_json1_0PartitionKeyList(output.partitionKeys, context)
|
|
1469
|
+
: undefined,
|
|
1470
|
+
staticColumns: output.staticColumns !== undefined && output.staticColumns !== null
|
|
1471
|
+
? deserializeAws_json1_0StaticColumnList(output.staticColumns, context)
|
|
1472
|
+
: undefined,
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
|
|
1476
|
+
return {
|
|
1477
|
+
message: __expectString(output.message),
|
|
1478
|
+
};
|
|
1479
|
+
};
|
|
1480
|
+
var deserializeAws_json1_0StaticColumn = function (output, context) {
|
|
1481
|
+
return {
|
|
1482
|
+
name: __expectString(output.name),
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
var deserializeAws_json1_0StaticColumnList = function (output, context) {
|
|
1486
|
+
var retVal = (output || [])
|
|
1487
|
+
.filter(function (e) { return e != null; })
|
|
1488
|
+
.map(function (entry) {
|
|
1489
|
+
if (entry === null) {
|
|
1490
|
+
return null;
|
|
1491
|
+
}
|
|
1492
|
+
return deserializeAws_json1_0StaticColumn(entry, context);
|
|
1493
|
+
});
|
|
1494
|
+
return retVal;
|
|
1495
|
+
};
|
|
1496
|
+
var deserializeAws_json1_0TableSummary = function (output, context) {
|
|
1497
|
+
return {
|
|
1498
|
+
keyspaceName: __expectString(output.keyspaceName),
|
|
1499
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1500
|
+
tableName: __expectString(output.tableName),
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
var deserializeAws_json1_0TableSummaryList = function (output, context) {
|
|
1504
|
+
var retVal = (output || [])
|
|
1505
|
+
.filter(function (e) { return e != null; })
|
|
1506
|
+
.map(function (entry) {
|
|
1507
|
+
if (entry === null) {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1510
|
+
return deserializeAws_json1_0TableSummary(entry, context);
|
|
1511
|
+
});
|
|
1512
|
+
return retVal;
|
|
1513
|
+
};
|
|
1514
|
+
var deserializeAws_json1_0Tag = function (output, context) {
|
|
1515
|
+
return {
|
|
1516
|
+
key: __expectString(output.key),
|
|
1517
|
+
value: __expectString(output.value),
|
|
1518
|
+
};
|
|
1519
|
+
};
|
|
1520
|
+
var deserializeAws_json1_0TagList = function (output, context) {
|
|
1521
|
+
var retVal = (output || [])
|
|
1522
|
+
.filter(function (e) { return e != null; })
|
|
1523
|
+
.map(function (entry) {
|
|
1524
|
+
if (entry === null) {
|
|
1525
|
+
return null;
|
|
1526
|
+
}
|
|
1527
|
+
return deserializeAws_json1_0Tag(entry, context);
|
|
1528
|
+
});
|
|
1529
|
+
return retVal;
|
|
1530
|
+
};
|
|
1531
|
+
var deserializeAws_json1_0TagResourceResponse = function (output, context) {
|
|
1532
|
+
return {};
|
|
1533
|
+
};
|
|
1534
|
+
var deserializeAws_json1_0TimeToLive = function (output, context) {
|
|
1535
|
+
return {
|
|
1536
|
+
status: __expectString(output.status),
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
|
|
1540
|
+
return {};
|
|
1541
|
+
};
|
|
1542
|
+
var deserializeAws_json1_0UpdateTableResponse = function (output, context) {
|
|
1543
|
+
return {
|
|
1544
|
+
resourceArn: __expectString(output.resourceArn),
|
|
1545
|
+
};
|
|
1546
|
+
};
|
|
1547
|
+
var deserializeAws_json1_0ValidationException = function (output, context) {
|
|
1548
|
+
return {
|
|
1549
|
+
message: __expectString(output.message),
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
var deserializeMetadata = function (output) {
|
|
1553
|
+
var _a;
|
|
1554
|
+
return ({
|
|
1555
|
+
httpStatusCode: output.statusCode,
|
|
1556
|
+
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
1557
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1558
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1559
|
+
});
|
|
1560
|
+
};
|
|
1561
|
+
var collectBody = function (streamBody, context) {
|
|
1562
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1563
|
+
if (streamBody instanceof Uint8Array) {
|
|
1564
|
+
return Promise.resolve(streamBody);
|
|
1565
|
+
}
|
|
1566
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1567
|
+
};
|
|
1568
|
+
var collectBodyString = function (streamBody, context) {
|
|
1569
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1570
|
+
};
|
|
1571
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1572
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
1573
|
+
return __generator(this, function (_c) {
|
|
1574
|
+
switch (_c.label) {
|
|
1575
|
+
case 0: return [4, context.endpoint()];
|
|
1576
|
+
case 1:
|
|
1577
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1578
|
+
contents = {
|
|
1579
|
+
protocol: protocol,
|
|
1580
|
+
hostname: hostname,
|
|
1581
|
+
port: port,
|
|
1582
|
+
method: "POST",
|
|
1583
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1584
|
+
headers: headers,
|
|
1585
|
+
};
|
|
1586
|
+
if (resolvedHostname !== undefined) {
|
|
1587
|
+
contents.hostname = resolvedHostname;
|
|
1588
|
+
}
|
|
1589
|
+
if (body !== undefined) {
|
|
1590
|
+
contents.body = body;
|
|
1591
|
+
}
|
|
1592
|
+
return [2, new __HttpRequest(contents)];
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
}); };
|
|
1596
|
+
var parseBody = function (streamBody, context) {
|
|
1597
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1598
|
+
if (encoded.length) {
|
|
1599
|
+
return JSON.parse(encoded);
|
|
1600
|
+
}
|
|
1601
|
+
return {};
|
|
1602
|
+
});
|
|
1603
|
+
};
|
|
1604
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1605
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1606
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1607
|
+
var cleanValue = rawValue;
|
|
1608
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1609
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1610
|
+
}
|
|
1611
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1612
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1613
|
+
}
|
|
1614
|
+
return cleanValue;
|
|
1615
|
+
};
|
|
1616
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1617
|
+
if (headerKey !== undefined) {
|
|
1618
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1619
|
+
}
|
|
1620
|
+
if (data.code !== undefined) {
|
|
1621
|
+
return sanitizeErrorCode(data.code);
|
|
1622
|
+
}
|
|
1623
|
+
if (data["__type"] !== undefined) {
|
|
1624
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1625
|
+
}
|
|
1626
|
+
return "";
|
|
1627
|
+
};
|