@aws-sdk/client-kafkaconnect 3.181.0 → 3.183.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 +8 -0
- package/dist-es/KafkaConnect.js +50 -57
- package/dist-es/KafkaConnectClient.js +22 -28
- package/dist-es/commands/CreateConnectorCommand.js +21 -28
- package/dist-es/commands/CreateCustomPluginCommand.js +21 -28
- package/dist-es/commands/CreateWorkerConfigurationCommand.js +21 -28
- package/dist-es/commands/DeleteConnectorCommand.js +21 -28
- package/dist-es/commands/DeleteCustomPluginCommand.js +21 -28
- package/dist-es/commands/DescribeConnectorCommand.js +21 -28
- package/dist-es/commands/DescribeCustomPluginCommand.js +21 -28
- package/dist-es/commands/DescribeWorkerConfigurationCommand.js +21 -28
- package/dist-es/commands/ListConnectorsCommand.js +21 -28
- package/dist-es/commands/ListCustomPluginsCommand.js +21 -28
- package/dist-es/commands/ListWorkerConfigurationsCommand.js +21 -28
- package/dist-es/commands/UpdateConnectorCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/KafkaConnectServiceException.js +5 -10
- package/dist-es/models/models_0.js +326 -168
- package/dist-es/pagination/ListConnectorsPaginator.js +25 -68
- package/dist-es/pagination/ListCustomPluginsPaginator.js +25 -68
- package/dist-es/pagination/ListWorkerConfigurationsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1297 -1639
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1629 +1,1304 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { KafkaConnectServiceException as __BaseException } from "../models/KafkaConnectServiceException";
|
|
5
4
|
import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})];
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}); };
|
|
40
|
-
export var serializeAws_restJson1CreateCustomPluginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
42
|
-
return __generator(this, function (_c) {
|
|
43
|
-
switch (_c.label) {
|
|
44
|
-
case 0: return [4, context.endpoint()];
|
|
45
|
-
case 1:
|
|
46
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
47
|
-
headers = {
|
|
48
|
-
"content-type": "application/json",
|
|
49
|
-
};
|
|
50
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/custom-plugins";
|
|
51
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.contentType != null && { contentType: input.contentType })), (input.description != null && { description: input.description })), (input.location != null && { location: serializeAws_restJson1CustomPluginLocation(input.location, context) })), (input.name != null && { name: input.name })));
|
|
52
|
-
return [2, new __HttpRequest({
|
|
53
|
-
protocol: protocol,
|
|
54
|
-
hostname: hostname,
|
|
55
|
-
port: port,
|
|
56
|
-
method: "POST",
|
|
57
|
-
headers: headers,
|
|
58
|
-
path: resolvedPath,
|
|
59
|
-
body: body,
|
|
60
|
-
})];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}); };
|
|
64
|
-
export var serializeAws_restJson1CreateWorkerConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
66
|
-
return __generator(this, function (_c) {
|
|
67
|
-
switch (_c.label) {
|
|
68
|
-
case 0: return [4, context.endpoint()];
|
|
69
|
-
case 1:
|
|
70
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
71
|
-
headers = {
|
|
72
|
-
"content-type": "application/json",
|
|
73
|
-
};
|
|
74
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/worker-configurations";
|
|
75
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.propertiesFileContent != null && { propertiesFileContent: input.propertiesFileContent })));
|
|
76
|
-
return [2, new __HttpRequest({
|
|
77
|
-
protocol: protocol,
|
|
78
|
-
hostname: hostname,
|
|
79
|
-
port: port,
|
|
80
|
-
method: "POST",
|
|
81
|
-
headers: headers,
|
|
82
|
-
path: resolvedPath,
|
|
83
|
-
body: body,
|
|
84
|
-
})];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
export var serializeAws_restJson1DeleteConnectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
90
|
-
return __generator(this, function (_c) {
|
|
91
|
-
switch (_c.label) {
|
|
92
|
-
case 0: return [4, context.endpoint()];
|
|
93
|
-
case 1:
|
|
94
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
95
|
-
headers = {};
|
|
96
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/connectors/{connectorArn}";
|
|
97
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", function () { return input.connectorArn; }, "{connectorArn}", false);
|
|
98
|
-
query = map({
|
|
99
|
-
currentVersion: [, input.currentVersion],
|
|
100
|
-
});
|
|
101
|
-
return [2, new __HttpRequest({
|
|
102
|
-
protocol: protocol,
|
|
103
|
-
hostname: hostname,
|
|
104
|
-
port: port,
|
|
105
|
-
method: "DELETE",
|
|
106
|
-
headers: headers,
|
|
107
|
-
path: resolvedPath,
|
|
108
|
-
query: query,
|
|
109
|
-
body: body,
|
|
110
|
-
})];
|
|
111
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateConnectorCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.capacity != null && { capacity: serializeAws_restJson1Capacity(input.capacity, context) }),
|
|
14
|
+
...(input.connectorConfiguration != null && {
|
|
15
|
+
connectorConfiguration: serializeAws_restJson1__sensitive__mapOf__string(input.connectorConfiguration, context),
|
|
16
|
+
}),
|
|
17
|
+
...(input.connectorDescription != null && { connectorDescription: input.connectorDescription }),
|
|
18
|
+
...(input.connectorName != null && { connectorName: input.connectorName }),
|
|
19
|
+
...(input.kafkaCluster != null && {
|
|
20
|
+
kafkaCluster: serializeAws_restJson1KafkaCluster(input.kafkaCluster, context),
|
|
21
|
+
}),
|
|
22
|
+
...(input.kafkaClusterClientAuthentication != null && {
|
|
23
|
+
kafkaClusterClientAuthentication: serializeAws_restJson1KafkaClusterClientAuthentication(input.kafkaClusterClientAuthentication, context),
|
|
24
|
+
}),
|
|
25
|
+
...(input.kafkaClusterEncryptionInTransit != null && {
|
|
26
|
+
kafkaClusterEncryptionInTransit: serializeAws_restJson1KafkaClusterEncryptionInTransit(input.kafkaClusterEncryptionInTransit, context),
|
|
27
|
+
}),
|
|
28
|
+
...(input.kafkaConnectVersion != null && { kafkaConnectVersion: input.kafkaConnectVersion }),
|
|
29
|
+
...(input.logDelivery != null && { logDelivery: serializeAws_restJson1LogDelivery(input.logDelivery, context) }),
|
|
30
|
+
...(input.plugins != null && { plugins: serializeAws_restJson1__listOfPlugin(input.plugins, context) }),
|
|
31
|
+
...(input.serviceExecutionRoleArn != null && { serviceExecutionRoleArn: input.serviceExecutionRoleArn }),
|
|
32
|
+
...(input.workerConfiguration != null && {
|
|
33
|
+
workerConfiguration: serializeAws_restJson1WorkerConfiguration(input.workerConfiguration, context),
|
|
34
|
+
}),
|
|
112
35
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
headers = {};
|
|
122
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/custom-plugins/{customPluginArn}";
|
|
123
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "customPluginArn", function () { return input.customPluginArn; }, "{customPluginArn}", false);
|
|
124
|
-
return [2, new __HttpRequest({
|
|
125
|
-
protocol: protocol,
|
|
126
|
-
hostname: hostname,
|
|
127
|
-
port: port,
|
|
128
|
-
method: "DELETE",
|
|
129
|
-
headers: headers,
|
|
130
|
-
path: resolvedPath,
|
|
131
|
-
body: body,
|
|
132
|
-
})];
|
|
133
|
-
}
|
|
36
|
+
return new __HttpRequest({
|
|
37
|
+
protocol,
|
|
38
|
+
hostname,
|
|
39
|
+
port,
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers,
|
|
42
|
+
path: resolvedPath,
|
|
43
|
+
body,
|
|
134
44
|
});
|
|
135
|
-
}
|
|
136
|
-
export
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
hostname: hostname,
|
|
149
|
-
port: port,
|
|
150
|
-
method: "GET",
|
|
151
|
-
headers: headers,
|
|
152
|
-
path: resolvedPath,
|
|
153
|
-
body: body,
|
|
154
|
-
})];
|
|
155
|
-
}
|
|
45
|
+
};
|
|
46
|
+
export const serializeAws_restJson1CreateCustomPluginCommand = async (input, context) => {
|
|
47
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
48
|
+
const headers = {
|
|
49
|
+
"content-type": "application/json",
|
|
50
|
+
};
|
|
51
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins";
|
|
52
|
+
let body;
|
|
53
|
+
body = JSON.stringify({
|
|
54
|
+
...(input.contentType != null && { contentType: input.contentType }),
|
|
55
|
+
...(input.description != null && { description: input.description }),
|
|
56
|
+
...(input.location != null && { location: serializeAws_restJson1CustomPluginLocation(input.location, context) }),
|
|
57
|
+
...(input.name != null && { name: input.name }),
|
|
156
58
|
});
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
headers = {};
|
|
166
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/custom-plugins/{customPluginArn}";
|
|
167
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "customPluginArn", function () { return input.customPluginArn; }, "{customPluginArn}", false);
|
|
168
|
-
return [2, new __HttpRequest({
|
|
169
|
-
protocol: protocol,
|
|
170
|
-
hostname: hostname,
|
|
171
|
-
port: port,
|
|
172
|
-
method: "GET",
|
|
173
|
-
headers: headers,
|
|
174
|
-
path: resolvedPath,
|
|
175
|
-
body: body,
|
|
176
|
-
})];
|
|
177
|
-
}
|
|
59
|
+
return new __HttpRequest({
|
|
60
|
+
protocol,
|
|
61
|
+
hostname,
|
|
62
|
+
port,
|
|
63
|
+
method: "POST",
|
|
64
|
+
headers,
|
|
65
|
+
path: resolvedPath,
|
|
66
|
+
body,
|
|
178
67
|
});
|
|
179
|
-
}
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return [2, new __HttpRequest({
|
|
192
|
-
protocol: protocol,
|
|
193
|
-
hostname: hostname,
|
|
194
|
-
port: port,
|
|
195
|
-
method: "GET",
|
|
196
|
-
headers: headers,
|
|
197
|
-
path: resolvedPath,
|
|
198
|
-
body: body,
|
|
199
|
-
})];
|
|
200
|
-
}
|
|
68
|
+
};
|
|
69
|
+
export const serializeAws_restJson1CreateWorkerConfigurationCommand = async (input, context) => {
|
|
70
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
71
|
+
const headers = {
|
|
72
|
+
"content-type": "application/json",
|
|
73
|
+
};
|
|
74
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/worker-configurations";
|
|
75
|
+
let body;
|
|
76
|
+
body = JSON.stringify({
|
|
77
|
+
...(input.description != null && { description: input.description }),
|
|
78
|
+
...(input.name != null && { name: input.name }),
|
|
79
|
+
...(input.propertiesFileContent != null && { propertiesFileContent: input.propertiesFileContent }),
|
|
201
80
|
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
headers = {};
|
|
211
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/connectors";
|
|
212
|
-
query = map({
|
|
213
|
-
connectorNamePrefix: [, input.connectorNamePrefix],
|
|
214
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
215
|
-
nextToken: [, input.nextToken],
|
|
216
|
-
});
|
|
217
|
-
return [2, new __HttpRequest({
|
|
218
|
-
protocol: protocol,
|
|
219
|
-
hostname: hostname,
|
|
220
|
-
port: port,
|
|
221
|
-
method: "GET",
|
|
222
|
-
headers: headers,
|
|
223
|
-
path: resolvedPath,
|
|
224
|
-
query: query,
|
|
225
|
-
body: body,
|
|
226
|
-
})];
|
|
227
|
-
}
|
|
81
|
+
return new __HttpRequest({
|
|
82
|
+
protocol,
|
|
83
|
+
hostname,
|
|
84
|
+
port,
|
|
85
|
+
method: "POST",
|
|
86
|
+
headers,
|
|
87
|
+
path: resolvedPath,
|
|
88
|
+
body,
|
|
228
89
|
});
|
|
229
|
-
}
|
|
230
|
-
export
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
headers = {};
|
|
238
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/custom-plugins";
|
|
239
|
-
query = map({
|
|
240
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
241
|
-
nextToken: [, input.nextToken],
|
|
242
|
-
});
|
|
243
|
-
return [2, new __HttpRequest({
|
|
244
|
-
protocol: protocol,
|
|
245
|
-
hostname: hostname,
|
|
246
|
-
port: port,
|
|
247
|
-
method: "GET",
|
|
248
|
-
headers: headers,
|
|
249
|
-
path: resolvedPath,
|
|
250
|
-
query: query,
|
|
251
|
-
body: body,
|
|
252
|
-
})];
|
|
253
|
-
}
|
|
90
|
+
};
|
|
91
|
+
export const serializeAws_restJson1DeleteConnectorCommand = async (input, context) => {
|
|
92
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
93
|
+
const headers = {};
|
|
94
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
95
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", () => input.connectorArn, "{connectorArn}", false);
|
|
96
|
+
const query = map({
|
|
97
|
+
currentVersion: [, input.currentVersion],
|
|
254
98
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
query = map({
|
|
266
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
267
|
-
nextToken: [, input.nextToken],
|
|
268
|
-
});
|
|
269
|
-
return [2, new __HttpRequest({
|
|
270
|
-
protocol: protocol,
|
|
271
|
-
hostname: hostname,
|
|
272
|
-
port: port,
|
|
273
|
-
method: "GET",
|
|
274
|
-
headers: headers,
|
|
275
|
-
path: resolvedPath,
|
|
276
|
-
query: query,
|
|
277
|
-
body: body,
|
|
278
|
-
})];
|
|
279
|
-
}
|
|
99
|
+
let body;
|
|
100
|
+
return new __HttpRequest({
|
|
101
|
+
protocol,
|
|
102
|
+
hostname,
|
|
103
|
+
port,
|
|
104
|
+
method: "DELETE",
|
|
105
|
+
headers,
|
|
106
|
+
path: resolvedPath,
|
|
107
|
+
query,
|
|
108
|
+
body,
|
|
280
109
|
});
|
|
281
|
-
}
|
|
282
|
-
export
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
});
|
|
297
|
-
body = JSON.stringify(__assign({}, (input.capacity != null && { capacity: serializeAws_restJson1CapacityUpdate(input.capacity, context) })));
|
|
298
|
-
return [2, new __HttpRequest({
|
|
299
|
-
protocol: protocol,
|
|
300
|
-
hostname: hostname,
|
|
301
|
-
port: port,
|
|
302
|
-
method: "PUT",
|
|
303
|
-
headers: headers,
|
|
304
|
-
path: resolvedPath,
|
|
305
|
-
query: query,
|
|
306
|
-
body: body,
|
|
307
|
-
})];
|
|
308
|
-
}
|
|
110
|
+
};
|
|
111
|
+
export const serializeAws_restJson1DeleteCustomPluginCommand = async (input, context) => {
|
|
112
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
113
|
+
const headers = {};
|
|
114
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins/{customPluginArn}";
|
|
115
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "customPluginArn", () => input.customPluginArn, "{customPluginArn}", false);
|
|
116
|
+
let body;
|
|
117
|
+
return new __HttpRequest({
|
|
118
|
+
protocol,
|
|
119
|
+
hostname,
|
|
120
|
+
port,
|
|
121
|
+
method: "DELETE",
|
|
122
|
+
headers,
|
|
123
|
+
path: resolvedPath,
|
|
124
|
+
body,
|
|
309
125
|
});
|
|
310
|
-
}
|
|
311
|
-
export
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
case 1:
|
|
326
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
327
|
-
if (data.connectorArn != null) {
|
|
328
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
329
|
-
}
|
|
330
|
-
if (data.connectorName != null) {
|
|
331
|
-
contents.connectorName = __expectString(data.connectorName);
|
|
332
|
-
}
|
|
333
|
-
if (data.connectorState != null) {
|
|
334
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
335
|
-
}
|
|
336
|
-
return [2, contents];
|
|
337
|
-
}
|
|
126
|
+
};
|
|
127
|
+
export const serializeAws_restJson1DescribeConnectorCommand = async (input, context) => {
|
|
128
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
129
|
+
const headers = {};
|
|
130
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
131
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", () => input.connectorArn, "{connectorArn}", false);
|
|
132
|
+
let body;
|
|
133
|
+
return new __HttpRequest({
|
|
134
|
+
protocol,
|
|
135
|
+
hostname,
|
|
136
|
+
port,
|
|
137
|
+
method: "GET",
|
|
138
|
+
headers,
|
|
139
|
+
path: resolvedPath,
|
|
140
|
+
body,
|
|
338
141
|
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
case "BadRequestException": return [3, 2];
|
|
355
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
356
|
-
case "ConflictException": return [3, 4];
|
|
357
|
-
case "com.amazonaws.kafkaconnect#ConflictException": return [3, 4];
|
|
358
|
-
case "ForbiddenException": return [3, 6];
|
|
359
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 6];
|
|
360
|
-
case "InternalServerErrorException": return [3, 8];
|
|
361
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 8];
|
|
362
|
-
case "NotFoundException": return [3, 10];
|
|
363
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 10];
|
|
364
|
-
case "ServiceUnavailableException": return [3, 12];
|
|
365
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 12];
|
|
366
|
-
case "TooManyRequestsException": return [3, 14];
|
|
367
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 14];
|
|
368
|
-
case "UnauthorizedException": return [3, 16];
|
|
369
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 16];
|
|
370
|
-
}
|
|
371
|
-
return [3, 18];
|
|
372
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
373
|
-
case 3: throw _d.sent();
|
|
374
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
375
|
-
case 5: throw _d.sent();
|
|
376
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
377
|
-
case 7: throw _d.sent();
|
|
378
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
379
|
-
case 9: throw _d.sent();
|
|
380
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
381
|
-
case 11: throw _d.sent();
|
|
382
|
-
case 12: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
383
|
-
case 13: throw _d.sent();
|
|
384
|
-
case 14: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
385
|
-
case 15: throw _d.sent();
|
|
386
|
-
case 16: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
387
|
-
case 17: throw _d.sent();
|
|
388
|
-
case 18:
|
|
389
|
-
parsedBody = parsedOutput.body;
|
|
390
|
-
throwDefaultError({
|
|
391
|
-
output: output,
|
|
392
|
-
parsedBody: parsedBody,
|
|
393
|
-
exceptionCtor: __BaseException,
|
|
394
|
-
errorCode: errorCode,
|
|
395
|
-
});
|
|
396
|
-
_d.label = 19;
|
|
397
|
-
case 19: return [2];
|
|
398
|
-
}
|
|
142
|
+
};
|
|
143
|
+
export const serializeAws_restJson1DescribeCustomPluginCommand = async (input, context) => {
|
|
144
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
145
|
+
const headers = {};
|
|
146
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins/{customPluginArn}";
|
|
147
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "customPluginArn", () => input.customPluginArn, "{customPluginArn}", false);
|
|
148
|
+
let body;
|
|
149
|
+
return new __HttpRequest({
|
|
150
|
+
protocol,
|
|
151
|
+
hostname,
|
|
152
|
+
port,
|
|
153
|
+
method: "GET",
|
|
154
|
+
headers,
|
|
155
|
+
path: resolvedPath,
|
|
156
|
+
body,
|
|
399
157
|
});
|
|
400
|
-
}
|
|
401
|
-
export
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
417
|
-
if (data.customPluginArn != null) {
|
|
418
|
-
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
419
|
-
}
|
|
420
|
-
if (data.customPluginState != null) {
|
|
421
|
-
contents.customPluginState = __expectString(data.customPluginState);
|
|
422
|
-
}
|
|
423
|
-
if (data.name != null) {
|
|
424
|
-
contents.name = __expectString(data.name);
|
|
425
|
-
}
|
|
426
|
-
if (data.revision != null) {
|
|
427
|
-
contents.revision = __expectLong(data.revision);
|
|
428
|
-
}
|
|
429
|
-
return [2, contents];
|
|
430
|
-
}
|
|
158
|
+
};
|
|
159
|
+
export const serializeAws_restJson1DescribeWorkerConfigurationCommand = async (input, context) => {
|
|
160
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
161
|
+
const headers = {};
|
|
162
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
163
|
+
"/v1/worker-configurations/{workerConfigurationArn}";
|
|
164
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workerConfigurationArn", () => input.workerConfigurationArn, "{workerConfigurationArn}", false);
|
|
165
|
+
let body;
|
|
166
|
+
return new __HttpRequest({
|
|
167
|
+
protocol,
|
|
168
|
+
hostname,
|
|
169
|
+
port,
|
|
170
|
+
method: "GET",
|
|
171
|
+
headers,
|
|
172
|
+
path: resolvedPath,
|
|
173
|
+
body,
|
|
431
174
|
});
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
return [4, parseErrorBody(output.body, context)];
|
|
442
|
-
case 1:
|
|
443
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
444
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
445
|
-
_b = errorCode;
|
|
446
|
-
switch (_b) {
|
|
447
|
-
case "BadRequestException": return [3, 2];
|
|
448
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
449
|
-
case "ConflictException": return [3, 4];
|
|
450
|
-
case "com.amazonaws.kafkaconnect#ConflictException": return [3, 4];
|
|
451
|
-
case "ForbiddenException": return [3, 6];
|
|
452
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 6];
|
|
453
|
-
case "InternalServerErrorException": return [3, 8];
|
|
454
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 8];
|
|
455
|
-
case "NotFoundException": return [3, 10];
|
|
456
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 10];
|
|
457
|
-
case "ServiceUnavailableException": return [3, 12];
|
|
458
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 12];
|
|
459
|
-
case "TooManyRequestsException": return [3, 14];
|
|
460
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 14];
|
|
461
|
-
case "UnauthorizedException": return [3, 16];
|
|
462
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 16];
|
|
463
|
-
}
|
|
464
|
-
return [3, 18];
|
|
465
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
466
|
-
case 3: throw _d.sent();
|
|
467
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
468
|
-
case 5: throw _d.sent();
|
|
469
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
470
|
-
case 7: throw _d.sent();
|
|
471
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
472
|
-
case 9: throw _d.sent();
|
|
473
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
474
|
-
case 11: throw _d.sent();
|
|
475
|
-
case 12: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
476
|
-
case 13: throw _d.sent();
|
|
477
|
-
case 14: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
478
|
-
case 15: throw _d.sent();
|
|
479
|
-
case 16: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
480
|
-
case 17: throw _d.sent();
|
|
481
|
-
case 18:
|
|
482
|
-
parsedBody = parsedOutput.body;
|
|
483
|
-
throwDefaultError({
|
|
484
|
-
output: output,
|
|
485
|
-
parsedBody: parsedBody,
|
|
486
|
-
exceptionCtor: __BaseException,
|
|
487
|
-
errorCode: errorCode,
|
|
488
|
-
});
|
|
489
|
-
_d.label = 19;
|
|
490
|
-
case 19: return [2];
|
|
491
|
-
}
|
|
175
|
+
};
|
|
176
|
+
export const serializeAws_restJson1ListConnectorsCommand = async (input, context) => {
|
|
177
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
178
|
+
const headers = {};
|
|
179
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors";
|
|
180
|
+
const query = map({
|
|
181
|
+
connectorNamePrefix: [, input.connectorNamePrefix],
|
|
182
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
183
|
+
nextToken: [, input.nextToken],
|
|
492
184
|
});
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
$metadata: deserializeMetadata(output),
|
|
504
|
-
});
|
|
505
|
-
_a = __expectNonNull;
|
|
506
|
-
_b = __expectObject;
|
|
507
|
-
return [4, parseBody(output.body, context)];
|
|
508
|
-
case 1:
|
|
509
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
510
|
-
if (data.creationTime != null) {
|
|
511
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
512
|
-
}
|
|
513
|
-
if (data.latestRevision != null) {
|
|
514
|
-
contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionSummary(data.latestRevision, context);
|
|
515
|
-
}
|
|
516
|
-
if (data.name != null) {
|
|
517
|
-
contents.name = __expectString(data.name);
|
|
518
|
-
}
|
|
519
|
-
if (data.workerConfigurationArn != null) {
|
|
520
|
-
contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
|
|
521
|
-
}
|
|
522
|
-
return [2, contents];
|
|
523
|
-
}
|
|
185
|
+
let body;
|
|
186
|
+
return new __HttpRequest({
|
|
187
|
+
protocol,
|
|
188
|
+
hostname,
|
|
189
|
+
port,
|
|
190
|
+
method: "GET",
|
|
191
|
+
headers,
|
|
192
|
+
path: resolvedPath,
|
|
193
|
+
query,
|
|
194
|
+
body,
|
|
524
195
|
});
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
_c = {};
|
|
534
|
-
return [4, parseErrorBody(output.body, context)];
|
|
535
|
-
case 1:
|
|
536
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
537
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
538
|
-
_b = errorCode;
|
|
539
|
-
switch (_b) {
|
|
540
|
-
case "BadRequestException": return [3, 2];
|
|
541
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
542
|
-
case "ConflictException": return [3, 4];
|
|
543
|
-
case "com.amazonaws.kafkaconnect#ConflictException": return [3, 4];
|
|
544
|
-
case "ForbiddenException": return [3, 6];
|
|
545
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 6];
|
|
546
|
-
case "InternalServerErrorException": return [3, 8];
|
|
547
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 8];
|
|
548
|
-
case "NotFoundException": return [3, 10];
|
|
549
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 10];
|
|
550
|
-
case "ServiceUnavailableException": return [3, 12];
|
|
551
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 12];
|
|
552
|
-
case "TooManyRequestsException": return [3, 14];
|
|
553
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 14];
|
|
554
|
-
case "UnauthorizedException": return [3, 16];
|
|
555
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 16];
|
|
556
|
-
}
|
|
557
|
-
return [3, 18];
|
|
558
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
559
|
-
case 3: throw _d.sent();
|
|
560
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
561
|
-
case 5: throw _d.sent();
|
|
562
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
563
|
-
case 7: throw _d.sent();
|
|
564
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
565
|
-
case 9: throw _d.sent();
|
|
566
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
567
|
-
case 11: throw _d.sent();
|
|
568
|
-
case 12: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
569
|
-
case 13: throw _d.sent();
|
|
570
|
-
case 14: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
571
|
-
case 15: throw _d.sent();
|
|
572
|
-
case 16: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
573
|
-
case 17: throw _d.sent();
|
|
574
|
-
case 18:
|
|
575
|
-
parsedBody = parsedOutput.body;
|
|
576
|
-
throwDefaultError({
|
|
577
|
-
output: output,
|
|
578
|
-
parsedBody: parsedBody,
|
|
579
|
-
exceptionCtor: __BaseException,
|
|
580
|
-
errorCode: errorCode,
|
|
581
|
-
});
|
|
582
|
-
_d.label = 19;
|
|
583
|
-
case 19: return [2];
|
|
584
|
-
}
|
|
196
|
+
};
|
|
197
|
+
export const serializeAws_restJson1ListCustomPluginsCommand = async (input, context) => {
|
|
198
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
+
const headers = {};
|
|
200
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins";
|
|
201
|
+
const query = map({
|
|
202
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
203
|
+
nextToken: [, input.nextToken],
|
|
585
204
|
});
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
$metadata: deserializeMetadata(output),
|
|
597
|
-
});
|
|
598
|
-
_a = __expectNonNull;
|
|
599
|
-
_b = __expectObject;
|
|
600
|
-
return [4, parseBody(output.body, context)];
|
|
601
|
-
case 1:
|
|
602
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
603
|
-
if (data.connectorArn != null) {
|
|
604
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
605
|
-
}
|
|
606
|
-
if (data.connectorState != null) {
|
|
607
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
608
|
-
}
|
|
609
|
-
return [2, contents];
|
|
610
|
-
}
|
|
205
|
+
let body;
|
|
206
|
+
return new __HttpRequest({
|
|
207
|
+
protocol,
|
|
208
|
+
hostname,
|
|
209
|
+
port,
|
|
210
|
+
method: "GET",
|
|
211
|
+
headers,
|
|
212
|
+
path: resolvedPath,
|
|
213
|
+
query,
|
|
214
|
+
body,
|
|
611
215
|
});
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
_c = {};
|
|
621
|
-
return [4, parseErrorBody(output.body, context)];
|
|
622
|
-
case 1:
|
|
623
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
624
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
|
-
_b = errorCode;
|
|
626
|
-
switch (_b) {
|
|
627
|
-
case "BadRequestException": return [3, 2];
|
|
628
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
629
|
-
case "ForbiddenException": return [3, 4];
|
|
630
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
|
|
631
|
-
case "InternalServerErrorException": return [3, 6];
|
|
632
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
|
|
633
|
-
case "NotFoundException": return [3, 8];
|
|
634
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
|
|
635
|
-
case "ServiceUnavailableException": return [3, 10];
|
|
636
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
|
|
637
|
-
case "TooManyRequestsException": return [3, 12];
|
|
638
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
|
|
639
|
-
case "UnauthorizedException": return [3, 14];
|
|
640
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
|
|
641
|
-
}
|
|
642
|
-
return [3, 16];
|
|
643
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
644
|
-
case 3: throw _d.sent();
|
|
645
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
646
|
-
case 5: throw _d.sent();
|
|
647
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
648
|
-
case 7: throw _d.sent();
|
|
649
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
650
|
-
case 9: throw _d.sent();
|
|
651
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
652
|
-
case 11: throw _d.sent();
|
|
653
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
654
|
-
case 13: throw _d.sent();
|
|
655
|
-
case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
656
|
-
case 15: throw _d.sent();
|
|
657
|
-
case 16:
|
|
658
|
-
parsedBody = parsedOutput.body;
|
|
659
|
-
throwDefaultError({
|
|
660
|
-
output: output,
|
|
661
|
-
parsedBody: parsedBody,
|
|
662
|
-
exceptionCtor: __BaseException,
|
|
663
|
-
errorCode: errorCode,
|
|
664
|
-
});
|
|
665
|
-
_d.label = 17;
|
|
666
|
-
case 17: return [2];
|
|
667
|
-
}
|
|
216
|
+
};
|
|
217
|
+
export const serializeAws_restJson1ListWorkerConfigurationsCommand = async (input, context) => {
|
|
218
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
219
|
+
const headers = {};
|
|
220
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/worker-configurations";
|
|
221
|
+
const query = map({
|
|
222
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
223
|
+
nextToken: [, input.nextToken],
|
|
668
224
|
});
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
$metadata: deserializeMetadata(output),
|
|
680
|
-
});
|
|
681
|
-
_a = __expectNonNull;
|
|
682
|
-
_b = __expectObject;
|
|
683
|
-
return [4, parseBody(output.body, context)];
|
|
684
|
-
case 1:
|
|
685
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
686
|
-
if (data.customPluginArn != null) {
|
|
687
|
-
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
688
|
-
}
|
|
689
|
-
if (data.customPluginState != null) {
|
|
690
|
-
contents.customPluginState = __expectString(data.customPluginState);
|
|
691
|
-
}
|
|
692
|
-
return [2, contents];
|
|
693
|
-
}
|
|
225
|
+
let body;
|
|
226
|
+
return new __HttpRequest({
|
|
227
|
+
protocol,
|
|
228
|
+
hostname,
|
|
229
|
+
port,
|
|
230
|
+
method: "GET",
|
|
231
|
+
headers,
|
|
232
|
+
path: resolvedPath,
|
|
233
|
+
query,
|
|
234
|
+
body,
|
|
694
235
|
});
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
case 1:
|
|
706
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
707
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
708
|
-
_b = errorCode;
|
|
709
|
-
switch (_b) {
|
|
710
|
-
case "BadRequestException": return [3, 2];
|
|
711
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
712
|
-
case "ForbiddenException": return [3, 4];
|
|
713
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
|
|
714
|
-
case "InternalServerErrorException": return [3, 6];
|
|
715
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
|
|
716
|
-
case "NotFoundException": return [3, 8];
|
|
717
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
|
|
718
|
-
case "ServiceUnavailableException": return [3, 10];
|
|
719
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
|
|
720
|
-
case "TooManyRequestsException": return [3, 12];
|
|
721
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
|
|
722
|
-
case "UnauthorizedException": return [3, 14];
|
|
723
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
|
|
724
|
-
}
|
|
725
|
-
return [3, 16];
|
|
726
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
727
|
-
case 3: throw _d.sent();
|
|
728
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
729
|
-
case 5: throw _d.sent();
|
|
730
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
731
|
-
case 7: throw _d.sent();
|
|
732
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
733
|
-
case 9: throw _d.sent();
|
|
734
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
735
|
-
case 11: throw _d.sent();
|
|
736
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
737
|
-
case 13: throw _d.sent();
|
|
738
|
-
case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
739
|
-
case 15: throw _d.sent();
|
|
740
|
-
case 16:
|
|
741
|
-
parsedBody = parsedOutput.body;
|
|
742
|
-
throwDefaultError({
|
|
743
|
-
output: output,
|
|
744
|
-
parsedBody: parsedBody,
|
|
745
|
-
exceptionCtor: __BaseException,
|
|
746
|
-
errorCode: errorCode,
|
|
747
|
-
});
|
|
748
|
-
_d.label = 17;
|
|
749
|
-
case 17: return [2];
|
|
750
|
-
}
|
|
236
|
+
};
|
|
237
|
+
export const serializeAws_restJson1UpdateConnectorCommand = async (input, context) => {
|
|
238
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
239
|
+
const headers = {
|
|
240
|
+
"content-type": "application/json",
|
|
241
|
+
};
|
|
242
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors/{connectorArn}";
|
|
243
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", () => input.connectorArn, "{connectorArn}", false);
|
|
244
|
+
const query = map({
|
|
245
|
+
currentVersion: [, input.currentVersion],
|
|
751
246
|
});
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
return __generator(this, function (_c) {
|
|
756
|
-
switch (_c.label) {
|
|
757
|
-
case 0:
|
|
758
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
759
|
-
return [2, deserializeAws_restJson1DescribeConnectorCommandError(output, context)];
|
|
760
|
-
}
|
|
761
|
-
contents = map({
|
|
762
|
-
$metadata: deserializeMetadata(output),
|
|
763
|
-
});
|
|
764
|
-
_a = __expectNonNull;
|
|
765
|
-
_b = __expectObject;
|
|
766
|
-
return [4, parseBody(output.body, context)];
|
|
767
|
-
case 1:
|
|
768
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
769
|
-
if (data.capacity != null) {
|
|
770
|
-
contents.capacity = deserializeAws_restJson1CapacityDescription(data.capacity, context);
|
|
771
|
-
}
|
|
772
|
-
if (data.connectorArn != null) {
|
|
773
|
-
contents.connectorArn = __expectString(data.connectorArn);
|
|
774
|
-
}
|
|
775
|
-
if (data.connectorConfiguration != null) {
|
|
776
|
-
contents.connectorConfiguration = deserializeAws_restJson1__sensitive__mapOf__string(data.connectorConfiguration, context);
|
|
777
|
-
}
|
|
778
|
-
if (data.connectorDescription != null) {
|
|
779
|
-
contents.connectorDescription = __expectString(data.connectorDescription);
|
|
780
|
-
}
|
|
781
|
-
if (data.connectorName != null) {
|
|
782
|
-
contents.connectorName = __expectString(data.connectorName);
|
|
783
|
-
}
|
|
784
|
-
if (data.connectorState != null) {
|
|
785
|
-
contents.connectorState = __expectString(data.connectorState);
|
|
786
|
-
}
|
|
787
|
-
if (data.creationTime != null) {
|
|
788
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
789
|
-
}
|
|
790
|
-
if (data.currentVersion != null) {
|
|
791
|
-
contents.currentVersion = __expectString(data.currentVersion);
|
|
792
|
-
}
|
|
793
|
-
if (data.kafkaCluster != null) {
|
|
794
|
-
contents.kafkaCluster = deserializeAws_restJson1KafkaClusterDescription(data.kafkaCluster, context);
|
|
795
|
-
}
|
|
796
|
-
if (data.kafkaClusterClientAuthentication != null) {
|
|
797
|
-
contents.kafkaClusterClientAuthentication = deserializeAws_restJson1KafkaClusterClientAuthenticationDescription(data.kafkaClusterClientAuthentication, context);
|
|
798
|
-
}
|
|
799
|
-
if (data.kafkaClusterEncryptionInTransit != null) {
|
|
800
|
-
contents.kafkaClusterEncryptionInTransit = deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription(data.kafkaClusterEncryptionInTransit, context);
|
|
801
|
-
}
|
|
802
|
-
if (data.kafkaConnectVersion != null) {
|
|
803
|
-
contents.kafkaConnectVersion = __expectString(data.kafkaConnectVersion);
|
|
804
|
-
}
|
|
805
|
-
if (data.logDelivery != null) {
|
|
806
|
-
contents.logDelivery = deserializeAws_restJson1LogDeliveryDescription(data.logDelivery, context);
|
|
807
|
-
}
|
|
808
|
-
if (data.plugins != null) {
|
|
809
|
-
contents.plugins = deserializeAws_restJson1__listOfPluginDescription(data.plugins, context);
|
|
810
|
-
}
|
|
811
|
-
if (data.serviceExecutionRoleArn != null) {
|
|
812
|
-
contents.serviceExecutionRoleArn = __expectString(data.serviceExecutionRoleArn);
|
|
813
|
-
}
|
|
814
|
-
if (data.stateDescription != null) {
|
|
815
|
-
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
816
|
-
}
|
|
817
|
-
if (data.workerConfiguration != null) {
|
|
818
|
-
contents.workerConfiguration = deserializeAws_restJson1WorkerConfigurationDescription(data.workerConfiguration, context);
|
|
819
|
-
}
|
|
820
|
-
return [2, contents];
|
|
821
|
-
}
|
|
247
|
+
let body;
|
|
248
|
+
body = JSON.stringify({
|
|
249
|
+
...(input.capacity != null && { capacity: serializeAws_restJson1CapacityUpdate(input.capacity, context) }),
|
|
822
250
|
});
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
return [4, parseErrorBody(output.body, context)];
|
|
833
|
-
case 1:
|
|
834
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
835
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
836
|
-
_b = errorCode;
|
|
837
|
-
switch (_b) {
|
|
838
|
-
case "BadRequestException": return [3, 2];
|
|
839
|
-
case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
|
|
840
|
-
case "ForbiddenException": return [3, 4];
|
|
841
|
-
case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
|
|
842
|
-
case "InternalServerErrorException": return [3, 6];
|
|
843
|
-
case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
|
|
844
|
-
case "NotFoundException": return [3, 8];
|
|
845
|
-
case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
|
|
846
|
-
case "ServiceUnavailableException": return [3, 10];
|
|
847
|
-
case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
|
|
848
|
-
case "TooManyRequestsException": return [3, 12];
|
|
849
|
-
case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
|
|
850
|
-
case "UnauthorizedException": return [3, 14];
|
|
851
|
-
case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
|
|
852
|
-
}
|
|
853
|
-
return [3, 16];
|
|
854
|
-
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
855
|
-
case 3: throw _d.sent();
|
|
856
|
-
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
857
|
-
case 5: throw _d.sent();
|
|
858
|
-
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
859
|
-
case 7: throw _d.sent();
|
|
860
|
-
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
861
|
-
case 9: throw _d.sent();
|
|
862
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
863
|
-
case 11: throw _d.sent();
|
|
864
|
-
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
865
|
-
case 13: throw _d.sent();
|
|
866
|
-
case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
867
|
-
case 15: throw _d.sent();
|
|
868
|
-
case 16:
|
|
869
|
-
parsedBody = parsedOutput.body;
|
|
870
|
-
throwDefaultError({
|
|
871
|
-
output: output,
|
|
872
|
-
parsedBody: parsedBody,
|
|
873
|
-
exceptionCtor: __BaseException,
|
|
874
|
-
errorCode: errorCode,
|
|
875
|
-
});
|
|
876
|
-
_d.label = 17;
|
|
877
|
-
case 17: return [2];
|
|
878
|
-
}
|
|
251
|
+
return new __HttpRequest({
|
|
252
|
+
protocol,
|
|
253
|
+
hostname,
|
|
254
|
+
port,
|
|
255
|
+
method: "PUT",
|
|
256
|
+
headers,
|
|
257
|
+
path: resolvedPath,
|
|
258
|
+
query,
|
|
259
|
+
body,
|
|
879
260
|
});
|
|
880
|
-
}
|
|
881
|
-
export
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
return [2, deserializeAws_restJson1DescribeCustomPluginCommandError(output, context)];
|
|
888
|
-
}
|
|
889
|
-
contents = map({
|
|
890
|
-
$metadata: deserializeMetadata(output),
|
|
891
|
-
});
|
|
892
|
-
_a = __expectNonNull;
|
|
893
|
-
_b = __expectObject;
|
|
894
|
-
return [4, parseBody(output.body, context)];
|
|
895
|
-
case 1:
|
|
896
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
897
|
-
if (data.creationTime != null) {
|
|
898
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
899
|
-
}
|
|
900
|
-
if (data.customPluginArn != null) {
|
|
901
|
-
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
902
|
-
}
|
|
903
|
-
if (data.customPluginState != null) {
|
|
904
|
-
contents.customPluginState = __expectString(data.customPluginState);
|
|
905
|
-
}
|
|
906
|
-
if (data.description != null) {
|
|
907
|
-
contents.description = __expectString(data.description);
|
|
908
|
-
}
|
|
909
|
-
if (data.latestRevision != null) {
|
|
910
|
-
contents.latestRevision = deserializeAws_restJson1CustomPluginRevisionSummary(data.latestRevision, context);
|
|
911
|
-
}
|
|
912
|
-
if (data.name != null) {
|
|
913
|
-
contents.name = __expectString(data.name);
|
|
914
|
-
}
|
|
915
|
-
if (data.stateDescription != null) {
|
|
916
|
-
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
917
|
-
}
|
|
918
|
-
return [2, contents];
|
|
919
|
-
}
|
|
261
|
+
};
|
|
262
|
+
export const deserializeAws_restJson1CreateConnectorCommand = async (output, context) => {
|
|
263
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
264
|
+
return deserializeAws_restJson1CreateConnectorCommandError(output, context);
|
|
265
|
+
}
|
|
266
|
+
const contents = map({
|
|
267
|
+
$metadata: deserializeMetadata(output),
|
|
920
268
|
});
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
269
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
270
|
+
if (data.connectorArn != null) {
|
|
271
|
+
contents.connectorArn = __expectString(data.connectorArn);
|
|
272
|
+
}
|
|
273
|
+
if (data.connectorName != null) {
|
|
274
|
+
contents.connectorName = __expectString(data.connectorName);
|
|
275
|
+
}
|
|
276
|
+
if (data.connectorState != null) {
|
|
277
|
+
contents.connectorState = __expectString(data.connectorState);
|
|
278
|
+
}
|
|
279
|
+
return contents;
|
|
280
|
+
};
|
|
281
|
+
const deserializeAws_restJson1CreateConnectorCommandError = async (output, context) => {
|
|
282
|
+
const parsedOutput = {
|
|
283
|
+
...output,
|
|
284
|
+
body: await parseErrorBody(output.body, context),
|
|
285
|
+
};
|
|
286
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
287
|
+
switch (errorCode) {
|
|
288
|
+
case "BadRequestException":
|
|
289
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
290
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
291
|
+
case "ConflictException":
|
|
292
|
+
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
293
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
294
|
+
case "ForbiddenException":
|
|
295
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
296
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
297
|
+
case "InternalServerErrorException":
|
|
298
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
299
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
300
|
+
case "NotFoundException":
|
|
301
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
302
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
303
|
+
case "ServiceUnavailableException":
|
|
304
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
305
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
306
|
+
case "TooManyRequestsException":
|
|
307
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
308
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
309
|
+
case "UnauthorizedException":
|
|
310
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
311
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
312
|
+
default:
|
|
313
|
+
const parsedBody = parsedOutput.body;
|
|
314
|
+
throwDefaultError({
|
|
315
|
+
output,
|
|
316
|
+
parsedBody,
|
|
317
|
+
exceptionCtor: __BaseException,
|
|
318
|
+
errorCode,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
export const deserializeAws_restJson1CreateCustomPluginCommand = async (output, context) => {
|
|
323
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
324
|
+
return deserializeAws_restJson1CreateCustomPluginCommandError(output, context);
|
|
325
|
+
}
|
|
326
|
+
const contents = map({
|
|
327
|
+
$metadata: deserializeMetadata(output),
|
|
977
328
|
});
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
329
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
330
|
+
if (data.customPluginArn != null) {
|
|
331
|
+
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
332
|
+
}
|
|
333
|
+
if (data.customPluginState != null) {
|
|
334
|
+
contents.customPluginState = __expectString(data.customPluginState);
|
|
335
|
+
}
|
|
336
|
+
if (data.name != null) {
|
|
337
|
+
contents.name = __expectString(data.name);
|
|
338
|
+
}
|
|
339
|
+
if (data.revision != null) {
|
|
340
|
+
contents.revision = __expectLong(data.revision);
|
|
341
|
+
}
|
|
342
|
+
return contents;
|
|
343
|
+
};
|
|
344
|
+
const deserializeAws_restJson1CreateCustomPluginCommandError = async (output, context) => {
|
|
345
|
+
const parsedOutput = {
|
|
346
|
+
...output,
|
|
347
|
+
body: await parseErrorBody(output.body, context),
|
|
348
|
+
};
|
|
349
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
|
+
switch (errorCode) {
|
|
351
|
+
case "BadRequestException":
|
|
352
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
353
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
354
|
+
case "ConflictException":
|
|
355
|
+
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
356
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
357
|
+
case "ForbiddenException":
|
|
358
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
359
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
360
|
+
case "InternalServerErrorException":
|
|
361
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
362
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
363
|
+
case "NotFoundException":
|
|
364
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
365
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
366
|
+
case "ServiceUnavailableException":
|
|
367
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
368
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
369
|
+
case "TooManyRequestsException":
|
|
370
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
371
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
372
|
+
case "UnauthorizedException":
|
|
373
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
374
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
375
|
+
default:
|
|
376
|
+
const parsedBody = parsedOutput.body;
|
|
377
|
+
throwDefaultError({
|
|
378
|
+
output,
|
|
379
|
+
parsedBody,
|
|
380
|
+
exceptionCtor: __BaseException,
|
|
381
|
+
errorCode,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
export const deserializeAws_restJson1CreateWorkerConfigurationCommand = async (output, context) => {
|
|
386
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
387
|
+
return deserializeAws_restJson1CreateWorkerConfigurationCommandError(output, context);
|
|
388
|
+
}
|
|
389
|
+
const contents = map({
|
|
390
|
+
$metadata: deserializeMetadata(output),
|
|
1012
391
|
});
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
392
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
393
|
+
if (data.creationTime != null) {
|
|
394
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
395
|
+
}
|
|
396
|
+
if (data.latestRevision != null) {
|
|
397
|
+
contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionSummary(data.latestRevision, context);
|
|
398
|
+
}
|
|
399
|
+
if (data.name != null) {
|
|
400
|
+
contents.name = __expectString(data.name);
|
|
401
|
+
}
|
|
402
|
+
if (data.workerConfigurationArn != null) {
|
|
403
|
+
contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
|
|
404
|
+
}
|
|
405
|
+
return contents;
|
|
406
|
+
};
|
|
407
|
+
const deserializeAws_restJson1CreateWorkerConfigurationCommandError = async (output, context) => {
|
|
408
|
+
const parsedOutput = {
|
|
409
|
+
...output,
|
|
410
|
+
body: await parseErrorBody(output.body, context),
|
|
411
|
+
};
|
|
412
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
413
|
+
switch (errorCode) {
|
|
414
|
+
case "BadRequestException":
|
|
415
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
416
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
417
|
+
case "ConflictException":
|
|
418
|
+
case "com.amazonaws.kafkaconnect#ConflictException":
|
|
419
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
420
|
+
case "ForbiddenException":
|
|
421
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
422
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
423
|
+
case "InternalServerErrorException":
|
|
424
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
425
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
426
|
+
case "NotFoundException":
|
|
427
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
428
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
429
|
+
case "ServiceUnavailableException":
|
|
430
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
431
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
432
|
+
case "TooManyRequestsException":
|
|
433
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
434
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
435
|
+
case "UnauthorizedException":
|
|
436
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
437
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
438
|
+
default:
|
|
439
|
+
const parsedBody = parsedOutput.body;
|
|
440
|
+
throwDefaultError({
|
|
441
|
+
output,
|
|
442
|
+
parsedBody,
|
|
443
|
+
exceptionCtor: __BaseException,
|
|
444
|
+
errorCode,
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
export const deserializeAws_restJson1DeleteConnectorCommand = async (output, context) => {
|
|
449
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
450
|
+
return deserializeAws_restJson1DeleteConnectorCommandError(output, context);
|
|
451
|
+
}
|
|
452
|
+
const contents = map({
|
|
453
|
+
$metadata: deserializeMetadata(output),
|
|
1069
454
|
});
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
455
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
456
|
+
if (data.connectorArn != null) {
|
|
457
|
+
contents.connectorArn = __expectString(data.connectorArn);
|
|
458
|
+
}
|
|
459
|
+
if (data.connectorState != null) {
|
|
460
|
+
contents.connectorState = __expectString(data.connectorState);
|
|
461
|
+
}
|
|
462
|
+
return contents;
|
|
463
|
+
};
|
|
464
|
+
const deserializeAws_restJson1DeleteConnectorCommandError = async (output, context) => {
|
|
465
|
+
const parsedOutput = {
|
|
466
|
+
...output,
|
|
467
|
+
body: await parseErrorBody(output.body, context),
|
|
468
|
+
};
|
|
469
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
470
|
+
switch (errorCode) {
|
|
471
|
+
case "BadRequestException":
|
|
472
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
473
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
474
|
+
case "ForbiddenException":
|
|
475
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
476
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
477
|
+
case "InternalServerErrorException":
|
|
478
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
479
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
480
|
+
case "NotFoundException":
|
|
481
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
482
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
483
|
+
case "ServiceUnavailableException":
|
|
484
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
485
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
486
|
+
case "TooManyRequestsException":
|
|
487
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
488
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
489
|
+
case "UnauthorizedException":
|
|
490
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
491
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
492
|
+
default:
|
|
493
|
+
const parsedBody = parsedOutput.body;
|
|
494
|
+
throwDefaultError({
|
|
495
|
+
output,
|
|
496
|
+
parsedBody,
|
|
497
|
+
exceptionCtor: __BaseException,
|
|
498
|
+
errorCode,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
export const deserializeAws_restJson1DeleteCustomPluginCommand = async (output, context) => {
|
|
503
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
504
|
+
return deserializeAws_restJson1DeleteCustomPluginCommandError(output, context);
|
|
505
|
+
}
|
|
506
|
+
const contents = map({
|
|
507
|
+
$metadata: deserializeMetadata(output),
|
|
1095
508
|
});
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
_d.label = 17;
|
|
1150
|
-
case 17: return [2];
|
|
1151
|
-
}
|
|
509
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
510
|
+
if (data.customPluginArn != null) {
|
|
511
|
+
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
512
|
+
}
|
|
513
|
+
if (data.customPluginState != null) {
|
|
514
|
+
contents.customPluginState = __expectString(data.customPluginState);
|
|
515
|
+
}
|
|
516
|
+
return contents;
|
|
517
|
+
};
|
|
518
|
+
const deserializeAws_restJson1DeleteCustomPluginCommandError = async (output, context) => {
|
|
519
|
+
const parsedOutput = {
|
|
520
|
+
...output,
|
|
521
|
+
body: await parseErrorBody(output.body, context),
|
|
522
|
+
};
|
|
523
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
524
|
+
switch (errorCode) {
|
|
525
|
+
case "BadRequestException":
|
|
526
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
527
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
528
|
+
case "ForbiddenException":
|
|
529
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
530
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
531
|
+
case "InternalServerErrorException":
|
|
532
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
533
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
534
|
+
case "NotFoundException":
|
|
535
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
536
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
537
|
+
case "ServiceUnavailableException":
|
|
538
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
539
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
540
|
+
case "TooManyRequestsException":
|
|
541
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
542
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
543
|
+
case "UnauthorizedException":
|
|
544
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
545
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
546
|
+
default:
|
|
547
|
+
const parsedBody = parsedOutput.body;
|
|
548
|
+
throwDefaultError({
|
|
549
|
+
output,
|
|
550
|
+
parsedBody,
|
|
551
|
+
exceptionCtor: __BaseException,
|
|
552
|
+
errorCode,
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
export const deserializeAws_restJson1DescribeConnectorCommand = async (output, context) => {
|
|
557
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
|
+
return deserializeAws_restJson1DescribeConnectorCommandError(output, context);
|
|
559
|
+
}
|
|
560
|
+
const contents = map({
|
|
561
|
+
$metadata: deserializeMetadata(output),
|
|
1152
562
|
});
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
563
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
564
|
+
if (data.capacity != null) {
|
|
565
|
+
contents.capacity = deserializeAws_restJson1CapacityDescription(data.capacity, context);
|
|
566
|
+
}
|
|
567
|
+
if (data.connectorArn != null) {
|
|
568
|
+
contents.connectorArn = __expectString(data.connectorArn);
|
|
569
|
+
}
|
|
570
|
+
if (data.connectorConfiguration != null) {
|
|
571
|
+
contents.connectorConfiguration = deserializeAws_restJson1__sensitive__mapOf__string(data.connectorConfiguration, context);
|
|
572
|
+
}
|
|
573
|
+
if (data.connectorDescription != null) {
|
|
574
|
+
contents.connectorDescription = __expectString(data.connectorDescription);
|
|
575
|
+
}
|
|
576
|
+
if (data.connectorName != null) {
|
|
577
|
+
contents.connectorName = __expectString(data.connectorName);
|
|
578
|
+
}
|
|
579
|
+
if (data.connectorState != null) {
|
|
580
|
+
contents.connectorState = __expectString(data.connectorState);
|
|
581
|
+
}
|
|
582
|
+
if (data.creationTime != null) {
|
|
583
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
584
|
+
}
|
|
585
|
+
if (data.currentVersion != null) {
|
|
586
|
+
contents.currentVersion = __expectString(data.currentVersion);
|
|
587
|
+
}
|
|
588
|
+
if (data.kafkaCluster != null) {
|
|
589
|
+
contents.kafkaCluster = deserializeAws_restJson1KafkaClusterDescription(data.kafkaCluster, context);
|
|
590
|
+
}
|
|
591
|
+
if (data.kafkaClusterClientAuthentication != null) {
|
|
592
|
+
contents.kafkaClusterClientAuthentication = deserializeAws_restJson1KafkaClusterClientAuthenticationDescription(data.kafkaClusterClientAuthentication, context);
|
|
593
|
+
}
|
|
594
|
+
if (data.kafkaClusterEncryptionInTransit != null) {
|
|
595
|
+
contents.kafkaClusterEncryptionInTransit = deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription(data.kafkaClusterEncryptionInTransit, context);
|
|
596
|
+
}
|
|
597
|
+
if (data.kafkaConnectVersion != null) {
|
|
598
|
+
contents.kafkaConnectVersion = __expectString(data.kafkaConnectVersion);
|
|
599
|
+
}
|
|
600
|
+
if (data.logDelivery != null) {
|
|
601
|
+
contents.logDelivery = deserializeAws_restJson1LogDeliveryDescription(data.logDelivery, context);
|
|
602
|
+
}
|
|
603
|
+
if (data.plugins != null) {
|
|
604
|
+
contents.plugins = deserializeAws_restJson1__listOfPluginDescription(data.plugins, context);
|
|
605
|
+
}
|
|
606
|
+
if (data.serviceExecutionRoleArn != null) {
|
|
607
|
+
contents.serviceExecutionRoleArn = __expectString(data.serviceExecutionRoleArn);
|
|
608
|
+
}
|
|
609
|
+
if (data.stateDescription != null) {
|
|
610
|
+
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
611
|
+
}
|
|
612
|
+
if (data.workerConfiguration != null) {
|
|
613
|
+
contents.workerConfiguration = deserializeAws_restJson1WorkerConfigurationDescription(data.workerConfiguration, context);
|
|
614
|
+
}
|
|
615
|
+
return contents;
|
|
616
|
+
};
|
|
617
|
+
const deserializeAws_restJson1DescribeConnectorCommandError = async (output, context) => {
|
|
618
|
+
const parsedOutput = {
|
|
619
|
+
...output,
|
|
620
|
+
body: await parseErrorBody(output.body, context),
|
|
621
|
+
};
|
|
622
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
623
|
+
switch (errorCode) {
|
|
624
|
+
case "BadRequestException":
|
|
625
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
626
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
627
|
+
case "ForbiddenException":
|
|
628
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
629
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
630
|
+
case "InternalServerErrorException":
|
|
631
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
632
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
633
|
+
case "NotFoundException":
|
|
634
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
635
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
636
|
+
case "ServiceUnavailableException":
|
|
637
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
638
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
639
|
+
case "TooManyRequestsException":
|
|
640
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
641
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
642
|
+
case "UnauthorizedException":
|
|
643
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
644
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
645
|
+
default:
|
|
646
|
+
const parsedBody = parsedOutput.body;
|
|
647
|
+
throwDefaultError({
|
|
648
|
+
output,
|
|
649
|
+
parsedBody,
|
|
650
|
+
exceptionCtor: __BaseException,
|
|
651
|
+
errorCode,
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
export const deserializeAws_restJson1DescribeCustomPluginCommand = async (output, context) => {
|
|
656
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
657
|
+
return deserializeAws_restJson1DescribeCustomPluginCommandError(output, context);
|
|
658
|
+
}
|
|
659
|
+
const contents = map({
|
|
660
|
+
$metadata: deserializeMetadata(output),
|
|
1178
661
|
});
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
662
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
663
|
+
if (data.creationTime != null) {
|
|
664
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
665
|
+
}
|
|
666
|
+
if (data.customPluginArn != null) {
|
|
667
|
+
contents.customPluginArn = __expectString(data.customPluginArn);
|
|
668
|
+
}
|
|
669
|
+
if (data.customPluginState != null) {
|
|
670
|
+
contents.customPluginState = __expectString(data.customPluginState);
|
|
671
|
+
}
|
|
672
|
+
if (data.description != null) {
|
|
673
|
+
contents.description = __expectString(data.description);
|
|
674
|
+
}
|
|
675
|
+
if (data.latestRevision != null) {
|
|
676
|
+
contents.latestRevision = deserializeAws_restJson1CustomPluginRevisionSummary(data.latestRevision, context);
|
|
677
|
+
}
|
|
678
|
+
if (data.name != null) {
|
|
679
|
+
contents.name = __expectString(data.name);
|
|
680
|
+
}
|
|
681
|
+
if (data.stateDescription != null) {
|
|
682
|
+
contents.stateDescription = deserializeAws_restJson1StateDescription(data.stateDescription, context);
|
|
683
|
+
}
|
|
684
|
+
return contents;
|
|
685
|
+
};
|
|
686
|
+
const deserializeAws_restJson1DescribeCustomPluginCommandError = async (output, context) => {
|
|
687
|
+
const parsedOutput = {
|
|
688
|
+
...output,
|
|
689
|
+
body: await parseErrorBody(output.body, context),
|
|
690
|
+
};
|
|
691
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
692
|
+
switch (errorCode) {
|
|
693
|
+
case "BadRequestException":
|
|
694
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
695
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
696
|
+
case "ForbiddenException":
|
|
697
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
698
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
699
|
+
case "InternalServerErrorException":
|
|
700
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
701
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
702
|
+
case "NotFoundException":
|
|
703
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
704
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
705
|
+
case "ServiceUnavailableException":
|
|
706
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
707
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
708
|
+
case "TooManyRequestsException":
|
|
709
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
710
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
711
|
+
case "UnauthorizedException":
|
|
712
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
713
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
714
|
+
default:
|
|
715
|
+
const parsedBody = parsedOutput.body;
|
|
716
|
+
throwDefaultError({
|
|
717
|
+
output,
|
|
718
|
+
parsedBody,
|
|
719
|
+
exceptionCtor: __BaseException,
|
|
720
|
+
errorCode,
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
export const deserializeAws_restJson1DescribeWorkerConfigurationCommand = async (output, context) => {
|
|
725
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
726
|
+
return deserializeAws_restJson1DescribeWorkerConfigurationCommandError(output, context);
|
|
727
|
+
}
|
|
728
|
+
const contents = map({
|
|
729
|
+
$metadata: deserializeMetadata(output),
|
|
1235
730
|
});
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
731
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
732
|
+
if (data.creationTime != null) {
|
|
733
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
734
|
+
}
|
|
735
|
+
if (data.description != null) {
|
|
736
|
+
contents.description = __expectString(data.description);
|
|
737
|
+
}
|
|
738
|
+
if (data.latestRevision != null) {
|
|
739
|
+
contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionDescription(data.latestRevision, context);
|
|
740
|
+
}
|
|
741
|
+
if (data.name != null) {
|
|
742
|
+
contents.name = __expectString(data.name);
|
|
743
|
+
}
|
|
744
|
+
if (data.workerConfigurationArn != null) {
|
|
745
|
+
contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
|
|
746
|
+
}
|
|
747
|
+
return contents;
|
|
748
|
+
};
|
|
749
|
+
const deserializeAws_restJson1DescribeWorkerConfigurationCommandError = async (output, context) => {
|
|
750
|
+
const parsedOutput = {
|
|
751
|
+
...output,
|
|
752
|
+
body: await parseErrorBody(output.body, context),
|
|
753
|
+
};
|
|
754
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
755
|
+
switch (errorCode) {
|
|
756
|
+
case "BadRequestException":
|
|
757
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
758
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
759
|
+
case "ForbiddenException":
|
|
760
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
761
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
762
|
+
case "InternalServerErrorException":
|
|
763
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
764
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
765
|
+
case "NotFoundException":
|
|
766
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
767
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
768
|
+
case "ServiceUnavailableException":
|
|
769
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
770
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
771
|
+
case "TooManyRequestsException":
|
|
772
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
773
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
774
|
+
case "UnauthorizedException":
|
|
775
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
776
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
777
|
+
default:
|
|
778
|
+
const parsedBody = parsedOutput.body;
|
|
779
|
+
throwDefaultError({
|
|
780
|
+
output,
|
|
781
|
+
parsedBody,
|
|
782
|
+
exceptionCtor: __BaseException,
|
|
783
|
+
errorCode,
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
export const deserializeAws_restJson1ListConnectorsCommand = async (output, context) => {
|
|
788
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
789
|
+
return deserializeAws_restJson1ListConnectorsCommandError(output, context);
|
|
790
|
+
}
|
|
791
|
+
const contents = map({
|
|
792
|
+
$metadata: deserializeMetadata(output),
|
|
1261
793
|
});
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
_d.label = 17;
|
|
1316
|
-
case 17: return [2];
|
|
1317
|
-
}
|
|
794
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
795
|
+
if (data.connectors != null) {
|
|
796
|
+
contents.connectors = deserializeAws_restJson1__listOfConnectorSummary(data.connectors, context);
|
|
797
|
+
}
|
|
798
|
+
if (data.nextToken != null) {
|
|
799
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
800
|
+
}
|
|
801
|
+
return contents;
|
|
802
|
+
};
|
|
803
|
+
const deserializeAws_restJson1ListConnectorsCommandError = async (output, context) => {
|
|
804
|
+
const parsedOutput = {
|
|
805
|
+
...output,
|
|
806
|
+
body: await parseErrorBody(output.body, context),
|
|
807
|
+
};
|
|
808
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
|
+
switch (errorCode) {
|
|
810
|
+
case "BadRequestException":
|
|
811
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
812
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
813
|
+
case "ForbiddenException":
|
|
814
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
815
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
816
|
+
case "InternalServerErrorException":
|
|
817
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
818
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
819
|
+
case "NotFoundException":
|
|
820
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
821
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
822
|
+
case "ServiceUnavailableException":
|
|
823
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
824
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
825
|
+
case "TooManyRequestsException":
|
|
826
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
827
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
828
|
+
case "UnauthorizedException":
|
|
829
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
830
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
831
|
+
default:
|
|
832
|
+
const parsedBody = parsedOutput.body;
|
|
833
|
+
throwDefaultError({
|
|
834
|
+
output,
|
|
835
|
+
parsedBody,
|
|
836
|
+
exceptionCtor: __BaseException,
|
|
837
|
+
errorCode,
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
export const deserializeAws_restJson1ListCustomPluginsCommand = async (output, context) => {
|
|
842
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
843
|
+
return deserializeAws_restJson1ListCustomPluginsCommandError(output, context);
|
|
844
|
+
}
|
|
845
|
+
const contents = map({
|
|
846
|
+
$metadata: deserializeMetadata(output),
|
|
1318
847
|
});
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
848
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
849
|
+
if (data.customPlugins != null) {
|
|
850
|
+
contents.customPlugins = deserializeAws_restJson1__listOfCustomPluginSummary(data.customPlugins, context);
|
|
851
|
+
}
|
|
852
|
+
if (data.nextToken != null) {
|
|
853
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
854
|
+
}
|
|
855
|
+
return contents;
|
|
856
|
+
};
|
|
857
|
+
const deserializeAws_restJson1ListCustomPluginsCommandError = async (output, context) => {
|
|
858
|
+
const parsedOutput = {
|
|
859
|
+
...output,
|
|
860
|
+
body: await parseErrorBody(output.body, context),
|
|
861
|
+
};
|
|
862
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
863
|
+
switch (errorCode) {
|
|
864
|
+
case "BadRequestException":
|
|
865
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
866
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
867
|
+
case "ForbiddenException":
|
|
868
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
869
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
870
|
+
case "InternalServerErrorException":
|
|
871
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
872
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
873
|
+
case "NotFoundException":
|
|
874
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
875
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
876
|
+
case "ServiceUnavailableException":
|
|
877
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
878
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
879
|
+
case "TooManyRequestsException":
|
|
880
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
881
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
882
|
+
case "UnauthorizedException":
|
|
883
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
884
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
885
|
+
default:
|
|
886
|
+
const parsedBody = parsedOutput.body;
|
|
887
|
+
throwDefaultError({
|
|
888
|
+
output,
|
|
889
|
+
parsedBody,
|
|
890
|
+
exceptionCtor: __BaseException,
|
|
891
|
+
errorCode,
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
export const deserializeAws_restJson1ListWorkerConfigurationsCommand = async (output, context) => {
|
|
896
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
897
|
+
return deserializeAws_restJson1ListWorkerConfigurationsCommandError(output, context);
|
|
898
|
+
}
|
|
899
|
+
const contents = map({
|
|
900
|
+
$metadata: deserializeMetadata(output),
|
|
1344
901
|
});
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
_d.label = 17;
|
|
1399
|
-
case 17: return [2];
|
|
1400
|
-
}
|
|
902
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
903
|
+
if (data.nextToken != null) {
|
|
904
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
905
|
+
}
|
|
906
|
+
if (data.workerConfigurations != null) {
|
|
907
|
+
contents.workerConfigurations = deserializeAws_restJson1__listOfWorkerConfigurationSummary(data.workerConfigurations, context);
|
|
908
|
+
}
|
|
909
|
+
return contents;
|
|
910
|
+
};
|
|
911
|
+
const deserializeAws_restJson1ListWorkerConfigurationsCommandError = async (output, context) => {
|
|
912
|
+
const parsedOutput = {
|
|
913
|
+
...output,
|
|
914
|
+
body: await parseErrorBody(output.body, context),
|
|
915
|
+
};
|
|
916
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
917
|
+
switch (errorCode) {
|
|
918
|
+
case "BadRequestException":
|
|
919
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
920
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
921
|
+
case "ForbiddenException":
|
|
922
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
923
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
924
|
+
case "InternalServerErrorException":
|
|
925
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
926
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
927
|
+
case "NotFoundException":
|
|
928
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
929
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
930
|
+
case "ServiceUnavailableException":
|
|
931
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
932
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
933
|
+
case "TooManyRequestsException":
|
|
934
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
935
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
936
|
+
case "UnauthorizedException":
|
|
937
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
938
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
939
|
+
default:
|
|
940
|
+
const parsedBody = parsedOutput.body;
|
|
941
|
+
throwDefaultError({
|
|
942
|
+
output,
|
|
943
|
+
parsedBody,
|
|
944
|
+
exceptionCtor: __BaseException,
|
|
945
|
+
errorCode,
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
export const deserializeAws_restJson1UpdateConnectorCommand = async (output, context) => {
|
|
950
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
951
|
+
return deserializeAws_restJson1UpdateConnectorCommandError(output, context);
|
|
952
|
+
}
|
|
953
|
+
const contents = map({
|
|
954
|
+
$metadata: deserializeMetadata(output),
|
|
1401
955
|
});
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
contents =
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
956
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
957
|
+
if (data.connectorArn != null) {
|
|
958
|
+
contents.connectorArn = __expectString(data.connectorArn);
|
|
959
|
+
}
|
|
960
|
+
if (data.connectorState != null) {
|
|
961
|
+
contents.connectorState = __expectString(data.connectorState);
|
|
962
|
+
}
|
|
963
|
+
return contents;
|
|
964
|
+
};
|
|
965
|
+
const deserializeAws_restJson1UpdateConnectorCommandError = async (output, context) => {
|
|
966
|
+
const parsedOutput = {
|
|
967
|
+
...output,
|
|
968
|
+
body: await parseErrorBody(output.body, context),
|
|
969
|
+
};
|
|
970
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
971
|
+
switch (errorCode) {
|
|
972
|
+
case "BadRequestException":
|
|
973
|
+
case "com.amazonaws.kafkaconnect#BadRequestException":
|
|
974
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
975
|
+
case "ForbiddenException":
|
|
976
|
+
case "com.amazonaws.kafkaconnect#ForbiddenException":
|
|
977
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
978
|
+
case "InternalServerErrorException":
|
|
979
|
+
case "com.amazonaws.kafkaconnect#InternalServerErrorException":
|
|
980
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
981
|
+
case "NotFoundException":
|
|
982
|
+
case "com.amazonaws.kafkaconnect#NotFoundException":
|
|
983
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
984
|
+
case "ServiceUnavailableException":
|
|
985
|
+
case "com.amazonaws.kafkaconnect#ServiceUnavailableException":
|
|
986
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
987
|
+
case "TooManyRequestsException":
|
|
988
|
+
case "com.amazonaws.kafkaconnect#TooManyRequestsException":
|
|
989
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
990
|
+
case "UnauthorizedException":
|
|
991
|
+
case "com.amazonaws.kafkaconnect#UnauthorizedException":
|
|
992
|
+
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
993
|
+
default:
|
|
994
|
+
const parsedBody = parsedOutput.body;
|
|
995
|
+
throwDefaultError({
|
|
996
|
+
output,
|
|
997
|
+
parsedBody,
|
|
998
|
+
exceptionCtor: __BaseException,
|
|
999
|
+
errorCode,
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
const map = __map;
|
|
1004
|
+
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1005
|
+
const contents = map({});
|
|
1006
|
+
const data = parsedOutput.body;
|
|
1007
|
+
if (data.message != null) {
|
|
1008
|
+
contents.message = __expectString(data.message);
|
|
1009
|
+
}
|
|
1010
|
+
const exception = new BadRequestException({
|
|
1011
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1012
|
+
...contents,
|
|
1414
1013
|
});
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1014
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1015
|
+
};
|
|
1016
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1017
|
+
const contents = map({});
|
|
1018
|
+
const data = parsedOutput.body;
|
|
1019
|
+
if (data.message != null) {
|
|
1020
|
+
contents.message = __expectString(data.message);
|
|
1021
|
+
}
|
|
1022
|
+
const exception = new ConflictException({
|
|
1023
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1024
|
+
...contents,
|
|
1426
1025
|
});
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1026
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1027
|
+
};
|
|
1028
|
+
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
1029
|
+
const contents = map({});
|
|
1030
|
+
const data = parsedOutput.body;
|
|
1031
|
+
if (data.message != null) {
|
|
1032
|
+
contents.message = __expectString(data.message);
|
|
1033
|
+
}
|
|
1034
|
+
const exception = new ForbiddenException({
|
|
1035
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1036
|
+
...contents,
|
|
1438
1037
|
});
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1038
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1039
|
+
};
|
|
1040
|
+
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1041
|
+
const contents = map({});
|
|
1042
|
+
const data = parsedOutput.body;
|
|
1043
|
+
if (data.message != null) {
|
|
1044
|
+
contents.message = __expectString(data.message);
|
|
1045
|
+
}
|
|
1046
|
+
const exception = new InternalServerErrorException({
|
|
1047
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1048
|
+
...contents,
|
|
1450
1049
|
});
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1050
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1051
|
+
};
|
|
1052
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1053
|
+
const contents = map({});
|
|
1054
|
+
const data = parsedOutput.body;
|
|
1055
|
+
if (data.message != null) {
|
|
1056
|
+
contents.message = __expectString(data.message);
|
|
1057
|
+
}
|
|
1058
|
+
const exception = new NotFoundException({
|
|
1059
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1060
|
+
...contents,
|
|
1462
1061
|
});
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1062
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1063
|
+
};
|
|
1064
|
+
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
1065
|
+
const contents = map({});
|
|
1066
|
+
const data = parsedOutput.body;
|
|
1067
|
+
if (data.message != null) {
|
|
1068
|
+
contents.message = __expectString(data.message);
|
|
1069
|
+
}
|
|
1070
|
+
const exception = new ServiceUnavailableException({
|
|
1071
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1072
|
+
...contents,
|
|
1474
1073
|
});
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1074
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1075
|
+
};
|
|
1076
|
+
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1077
|
+
const contents = map({});
|
|
1078
|
+
const data = parsedOutput.body;
|
|
1079
|
+
if (data.message != null) {
|
|
1080
|
+
contents.message = __expectString(data.message);
|
|
1081
|
+
}
|
|
1082
|
+
const exception = new TooManyRequestsException({
|
|
1083
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1084
|
+
...contents,
|
|
1486
1085
|
});
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1086
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1087
|
+
};
|
|
1088
|
+
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
1089
|
+
const contents = map({});
|
|
1090
|
+
const data = parsedOutput.body;
|
|
1091
|
+
if (data.message != null) {
|
|
1092
|
+
contents.message = __expectString(data.message);
|
|
1093
|
+
}
|
|
1094
|
+
const exception = new UnauthorizedException({
|
|
1095
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1096
|
+
...contents,
|
|
1498
1097
|
});
|
|
1499
|
-
|
|
1500
|
-
|
|
1098
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1099
|
+
};
|
|
1100
|
+
const serializeAws_restJson1__listOf__string = (input, context) => {
|
|
1501
1101
|
return input
|
|
1502
|
-
.filter(
|
|
1503
|
-
.map(
|
|
1102
|
+
.filter((e) => e != null)
|
|
1103
|
+
.map((entry) => {
|
|
1504
1104
|
return entry;
|
|
1505
1105
|
});
|
|
1506
1106
|
};
|
|
1507
|
-
|
|
1107
|
+
const serializeAws_restJson1__listOfPlugin = (input, context) => {
|
|
1508
1108
|
return input
|
|
1509
|
-
.filter(
|
|
1510
|
-
.map(
|
|
1109
|
+
.filter((e) => e != null)
|
|
1110
|
+
.map((entry) => {
|
|
1511
1111
|
return serializeAws_restJson1Plugin(entry, context);
|
|
1512
1112
|
});
|
|
1513
1113
|
};
|
|
1514
|
-
|
|
1515
|
-
return Object.entries(input).reduce(
|
|
1516
|
-
var _b;
|
|
1517
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1114
|
+
const serializeAws_restJson1__sensitive__mapOf__string = (input, context) => {
|
|
1115
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1518
1116
|
if (value === null) {
|
|
1519
1117
|
return acc;
|
|
1520
1118
|
}
|
|
1521
|
-
return
|
|
1119
|
+
return {
|
|
1120
|
+
...acc,
|
|
1121
|
+
[key]: value,
|
|
1122
|
+
};
|
|
1522
1123
|
}, {});
|
|
1523
1124
|
};
|
|
1524
|
-
|
|
1525
|
-
return
|
|
1125
|
+
const serializeAws_restJson1ApacheKafkaCluster = (input, context) => {
|
|
1126
|
+
return {
|
|
1127
|
+
...(input.bootstrapServers != null && { bootstrapServers: input.bootstrapServers }),
|
|
1128
|
+
...(input.vpc != null && { vpc: serializeAws_restJson1Vpc(input.vpc, context) }),
|
|
1129
|
+
};
|
|
1526
1130
|
};
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1131
|
+
const serializeAws_restJson1AutoScaling = (input, context) => {
|
|
1132
|
+
return {
|
|
1133
|
+
...(input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount }),
|
|
1134
|
+
...(input.mcuCount != null && { mcuCount: input.mcuCount }),
|
|
1135
|
+
...(input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount }),
|
|
1136
|
+
...(input.scaleInPolicy != null && {
|
|
1137
|
+
scaleInPolicy: serializeAws_restJson1ScaleInPolicy(input.scaleInPolicy, context),
|
|
1138
|
+
}),
|
|
1139
|
+
...(input.scaleOutPolicy != null && {
|
|
1140
|
+
scaleOutPolicy: serializeAws_restJson1ScaleOutPolicy(input.scaleOutPolicy, context),
|
|
1141
|
+
}),
|
|
1142
|
+
};
|
|
1533
1143
|
};
|
|
1534
|
-
|
|
1535
|
-
return
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1144
|
+
const serializeAws_restJson1AutoScalingUpdate = (input, context) => {
|
|
1145
|
+
return {
|
|
1146
|
+
...(input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount }),
|
|
1147
|
+
...(input.mcuCount != null && { mcuCount: input.mcuCount }),
|
|
1148
|
+
...(input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount }),
|
|
1149
|
+
...(input.scaleInPolicy != null && {
|
|
1150
|
+
scaleInPolicy: serializeAws_restJson1ScaleInPolicyUpdate(input.scaleInPolicy, context),
|
|
1151
|
+
}),
|
|
1152
|
+
...(input.scaleOutPolicy != null && {
|
|
1153
|
+
scaleOutPolicy: serializeAws_restJson1ScaleOutPolicyUpdate(input.scaleOutPolicy, context),
|
|
1154
|
+
}),
|
|
1155
|
+
};
|
|
1540
1156
|
};
|
|
1541
|
-
|
|
1542
|
-
return
|
|
1543
|
-
|
|
1544
|
-
|
|
1157
|
+
const serializeAws_restJson1Capacity = (input, context) => {
|
|
1158
|
+
return {
|
|
1159
|
+
...(input.autoScaling != null && { autoScaling: serializeAws_restJson1AutoScaling(input.autoScaling, context) }),
|
|
1160
|
+
...(input.provisionedCapacity != null && {
|
|
1161
|
+
provisionedCapacity: serializeAws_restJson1ProvisionedCapacity(input.provisionedCapacity, context),
|
|
1162
|
+
}),
|
|
1163
|
+
};
|
|
1545
1164
|
};
|
|
1546
|
-
|
|
1547
|
-
return
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1165
|
+
const serializeAws_restJson1CapacityUpdate = (input, context) => {
|
|
1166
|
+
return {
|
|
1167
|
+
...(input.autoScaling != null && {
|
|
1168
|
+
autoScaling: serializeAws_restJson1AutoScalingUpdate(input.autoScaling, context),
|
|
1169
|
+
}),
|
|
1170
|
+
...(input.provisionedCapacity != null && {
|
|
1171
|
+
provisionedCapacity: serializeAws_restJson1ProvisionedCapacityUpdate(input.provisionedCapacity, context),
|
|
1172
|
+
}),
|
|
1173
|
+
};
|
|
1552
1174
|
};
|
|
1553
|
-
|
|
1554
|
-
return
|
|
1175
|
+
const serializeAws_restJson1CloudWatchLogsLogDelivery = (input, context) => {
|
|
1176
|
+
return {
|
|
1177
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1178
|
+
...(input.logGroup != null && { logGroup: input.logGroup }),
|
|
1179
|
+
};
|
|
1555
1180
|
};
|
|
1556
|
-
|
|
1557
|
-
return
|
|
1181
|
+
const serializeAws_restJson1CustomPlugin = (input, context) => {
|
|
1182
|
+
return {
|
|
1183
|
+
...(input.customPluginArn != null && { customPluginArn: input.customPluginArn }),
|
|
1184
|
+
...(input.revision != null && { revision: input.revision }),
|
|
1185
|
+
};
|
|
1558
1186
|
};
|
|
1559
|
-
|
|
1560
|
-
return
|
|
1187
|
+
const serializeAws_restJson1CustomPluginLocation = (input, context) => {
|
|
1188
|
+
return {
|
|
1189
|
+
...(input.s3Location != null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }),
|
|
1190
|
+
};
|
|
1561
1191
|
};
|
|
1562
|
-
|
|
1563
|
-
return
|
|
1192
|
+
const serializeAws_restJson1FirehoseLogDelivery = (input, context) => {
|
|
1193
|
+
return {
|
|
1194
|
+
...(input.deliveryStream != null && { deliveryStream: input.deliveryStream }),
|
|
1195
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1196
|
+
};
|
|
1564
1197
|
};
|
|
1565
|
-
|
|
1566
|
-
return
|
|
1567
|
-
|
|
1568
|
-
|
|
1198
|
+
const serializeAws_restJson1KafkaCluster = (input, context) => {
|
|
1199
|
+
return {
|
|
1200
|
+
...(input.apacheKafkaCluster != null && {
|
|
1201
|
+
apacheKafkaCluster: serializeAws_restJson1ApacheKafkaCluster(input.apacheKafkaCluster, context),
|
|
1202
|
+
}),
|
|
1203
|
+
};
|
|
1569
1204
|
};
|
|
1570
|
-
|
|
1571
|
-
return
|
|
1205
|
+
const serializeAws_restJson1KafkaClusterClientAuthentication = (input, context) => {
|
|
1206
|
+
return {
|
|
1207
|
+
...(input.authenticationType != null && { authenticationType: input.authenticationType }),
|
|
1208
|
+
};
|
|
1572
1209
|
};
|
|
1573
|
-
|
|
1574
|
-
return
|
|
1210
|
+
const serializeAws_restJson1KafkaClusterEncryptionInTransit = (input, context) => {
|
|
1211
|
+
return {
|
|
1212
|
+
...(input.encryptionType != null && { encryptionType: input.encryptionType }),
|
|
1213
|
+
};
|
|
1575
1214
|
};
|
|
1576
|
-
|
|
1577
|
-
return
|
|
1578
|
-
|
|
1579
|
-
|
|
1215
|
+
const serializeAws_restJson1LogDelivery = (input, context) => {
|
|
1216
|
+
return {
|
|
1217
|
+
...(input.workerLogDelivery != null && {
|
|
1218
|
+
workerLogDelivery: serializeAws_restJson1WorkerLogDelivery(input.workerLogDelivery, context),
|
|
1219
|
+
}),
|
|
1220
|
+
};
|
|
1580
1221
|
};
|
|
1581
|
-
|
|
1582
|
-
return
|
|
1583
|
-
|
|
1584
|
-
|
|
1222
|
+
const serializeAws_restJson1Plugin = (input, context) => {
|
|
1223
|
+
return {
|
|
1224
|
+
...(input.customPlugin != null && {
|
|
1225
|
+
customPlugin: serializeAws_restJson1CustomPlugin(input.customPlugin, context),
|
|
1226
|
+
}),
|
|
1227
|
+
};
|
|
1585
1228
|
};
|
|
1586
|
-
|
|
1587
|
-
return
|
|
1229
|
+
const serializeAws_restJson1ProvisionedCapacity = (input, context) => {
|
|
1230
|
+
return {
|
|
1231
|
+
...(input.mcuCount != null && { mcuCount: input.mcuCount }),
|
|
1232
|
+
...(input.workerCount != null && { workerCount: input.workerCount }),
|
|
1233
|
+
};
|
|
1588
1234
|
};
|
|
1589
|
-
|
|
1590
|
-
return
|
|
1235
|
+
const serializeAws_restJson1ProvisionedCapacityUpdate = (input, context) => {
|
|
1236
|
+
return {
|
|
1237
|
+
...(input.mcuCount != null && { mcuCount: input.mcuCount }),
|
|
1238
|
+
...(input.workerCount != null && { workerCount: input.workerCount }),
|
|
1239
|
+
};
|
|
1591
1240
|
};
|
|
1592
|
-
|
|
1593
|
-
return
|
|
1241
|
+
const serializeAws_restJson1S3Location = (input, context) => {
|
|
1242
|
+
return {
|
|
1243
|
+
...(input.bucketArn != null && { bucketArn: input.bucketArn }),
|
|
1244
|
+
...(input.fileKey != null && { fileKey: input.fileKey }),
|
|
1245
|
+
...(input.objectVersion != null && { objectVersion: input.objectVersion }),
|
|
1246
|
+
};
|
|
1594
1247
|
};
|
|
1595
|
-
|
|
1596
|
-
return
|
|
1248
|
+
const serializeAws_restJson1S3LogDelivery = (input, context) => {
|
|
1249
|
+
return {
|
|
1250
|
+
...(input.bucket != null && { bucket: input.bucket }),
|
|
1251
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1252
|
+
...(input.prefix != null && { prefix: input.prefix }),
|
|
1253
|
+
};
|
|
1597
1254
|
};
|
|
1598
|
-
|
|
1599
|
-
return
|
|
1255
|
+
const serializeAws_restJson1ScaleInPolicy = (input, context) => {
|
|
1256
|
+
return {
|
|
1257
|
+
...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
1258
|
+
};
|
|
1600
1259
|
};
|
|
1601
|
-
|
|
1602
|
-
return
|
|
1260
|
+
const serializeAws_restJson1ScaleInPolicyUpdate = (input, context) => {
|
|
1261
|
+
return {
|
|
1262
|
+
...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
1263
|
+
};
|
|
1603
1264
|
};
|
|
1604
|
-
|
|
1605
|
-
return
|
|
1265
|
+
const serializeAws_restJson1ScaleOutPolicy = (input, context) => {
|
|
1266
|
+
return {
|
|
1267
|
+
...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
1268
|
+
};
|
|
1606
1269
|
};
|
|
1607
|
-
|
|
1608
|
-
return
|
|
1270
|
+
const serializeAws_restJson1ScaleOutPolicyUpdate = (input, context) => {
|
|
1271
|
+
return {
|
|
1272
|
+
...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
|
|
1273
|
+
};
|
|
1609
1274
|
};
|
|
1610
|
-
|
|
1611
|
-
return
|
|
1612
|
-
|
|
1613
|
-
|
|
1275
|
+
const serializeAws_restJson1Vpc = (input, context) => {
|
|
1276
|
+
return {
|
|
1277
|
+
...(input.securityGroups != null && {
|
|
1278
|
+
securityGroups: serializeAws_restJson1__listOf__string(input.securityGroups, context),
|
|
1279
|
+
}),
|
|
1280
|
+
...(input.subnets != null && { subnets: serializeAws_restJson1__listOf__string(input.subnets, context) }),
|
|
1281
|
+
};
|
|
1614
1282
|
};
|
|
1615
|
-
|
|
1616
|
-
return
|
|
1283
|
+
const serializeAws_restJson1WorkerConfiguration = (input, context) => {
|
|
1284
|
+
return {
|
|
1285
|
+
...(input.revision != null && { revision: input.revision }),
|
|
1286
|
+
...(input.workerConfigurationArn != null && { workerConfigurationArn: input.workerConfigurationArn }),
|
|
1287
|
+
};
|
|
1617
1288
|
};
|
|
1618
|
-
|
|
1619
|
-
return
|
|
1620
|
-
|
|
1621
|
-
|
|
1289
|
+
const serializeAws_restJson1WorkerLogDelivery = (input, context) => {
|
|
1290
|
+
return {
|
|
1291
|
+
...(input.cloudWatchLogs != null && {
|
|
1292
|
+
cloudWatchLogs: serializeAws_restJson1CloudWatchLogsLogDelivery(input.cloudWatchLogs, context),
|
|
1293
|
+
}),
|
|
1294
|
+
...(input.firehose != null && { firehose: serializeAws_restJson1FirehoseLogDelivery(input.firehose, context) }),
|
|
1295
|
+
...(input.s3 != null && { s3: serializeAws_restJson1S3LogDelivery(input.s3, context) }),
|
|
1296
|
+
};
|
|
1622
1297
|
};
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
.filter(
|
|
1626
|
-
.map(
|
|
1298
|
+
const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
1299
|
+
const retVal = (output || [])
|
|
1300
|
+
.filter((e) => e != null)
|
|
1301
|
+
.map((entry) => {
|
|
1627
1302
|
if (entry === null) {
|
|
1628
1303
|
return null;
|
|
1629
1304
|
}
|
|
@@ -1631,10 +1306,10 @@ var deserializeAws_restJson1__listOf__string = function (output, context) {
|
|
|
1631
1306
|
});
|
|
1632
1307
|
return retVal;
|
|
1633
1308
|
};
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
.filter(
|
|
1637
|
-
.map(
|
|
1309
|
+
const deserializeAws_restJson1__listOfConnectorSummary = (output, context) => {
|
|
1310
|
+
const retVal = (output || [])
|
|
1311
|
+
.filter((e) => e != null)
|
|
1312
|
+
.map((entry) => {
|
|
1638
1313
|
if (entry === null) {
|
|
1639
1314
|
return null;
|
|
1640
1315
|
}
|
|
@@ -1642,10 +1317,10 @@ var deserializeAws_restJson1__listOfConnectorSummary = function (output, context
|
|
|
1642
1317
|
});
|
|
1643
1318
|
return retVal;
|
|
1644
1319
|
};
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
.filter(
|
|
1648
|
-
.map(
|
|
1320
|
+
const deserializeAws_restJson1__listOfCustomPluginSummary = (output, context) => {
|
|
1321
|
+
const retVal = (output || [])
|
|
1322
|
+
.filter((e) => e != null)
|
|
1323
|
+
.map((entry) => {
|
|
1649
1324
|
if (entry === null) {
|
|
1650
1325
|
return null;
|
|
1651
1326
|
}
|
|
@@ -1653,10 +1328,10 @@ var deserializeAws_restJson1__listOfCustomPluginSummary = function (output, cont
|
|
|
1653
1328
|
});
|
|
1654
1329
|
return retVal;
|
|
1655
1330
|
};
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
.filter(
|
|
1659
|
-
.map(
|
|
1331
|
+
const deserializeAws_restJson1__listOfPluginDescription = (output, context) => {
|
|
1332
|
+
const retVal = (output || [])
|
|
1333
|
+
.filter((e) => e != null)
|
|
1334
|
+
.map((entry) => {
|
|
1660
1335
|
if (entry === null) {
|
|
1661
1336
|
return null;
|
|
1662
1337
|
}
|
|
@@ -1664,10 +1339,10 @@ var deserializeAws_restJson1__listOfPluginDescription = function (output, contex
|
|
|
1664
1339
|
});
|
|
1665
1340
|
return retVal;
|
|
1666
1341
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
.filter(
|
|
1670
|
-
.map(
|
|
1342
|
+
const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (output, context) => {
|
|
1343
|
+
const retVal = (output || [])
|
|
1344
|
+
.filter((e) => e != null)
|
|
1345
|
+
.map((entry) => {
|
|
1671
1346
|
if (entry === null) {
|
|
1672
1347
|
return null;
|
|
1673
1348
|
}
|
|
@@ -1675,23 +1350,24 @@ var deserializeAws_restJson1__listOfWorkerConfigurationSummary = function (outpu
|
|
|
1675
1350
|
});
|
|
1676
1351
|
return retVal;
|
|
1677
1352
|
};
|
|
1678
|
-
|
|
1679
|
-
return Object.entries(output).reduce(
|
|
1680
|
-
var _b;
|
|
1681
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1353
|
+
const deserializeAws_restJson1__sensitive__mapOf__string = (output, context) => {
|
|
1354
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1682
1355
|
if (value === null) {
|
|
1683
1356
|
return acc;
|
|
1684
1357
|
}
|
|
1685
|
-
return
|
|
1358
|
+
return {
|
|
1359
|
+
...acc,
|
|
1360
|
+
[key]: __expectString(value),
|
|
1361
|
+
};
|
|
1686
1362
|
}, {});
|
|
1687
1363
|
};
|
|
1688
|
-
|
|
1364
|
+
const deserializeAws_restJson1ApacheKafkaClusterDescription = (output, context) => {
|
|
1689
1365
|
return {
|
|
1690
1366
|
bootstrapServers: __expectString(output.bootstrapServers),
|
|
1691
1367
|
vpc: output.vpc != null ? deserializeAws_restJson1VpcDescription(output.vpc, context) : undefined,
|
|
1692
1368
|
};
|
|
1693
1369
|
};
|
|
1694
|
-
|
|
1370
|
+
const deserializeAws_restJson1AutoScalingDescription = (output, context) => {
|
|
1695
1371
|
return {
|
|
1696
1372
|
maxWorkerCount: __expectInt32(output.maxWorkerCount),
|
|
1697
1373
|
mcuCount: __expectInt32(output.mcuCount),
|
|
@@ -1704,7 +1380,7 @@ var deserializeAws_restJson1AutoScalingDescription = function (output, context)
|
|
|
1704
1380
|
: undefined,
|
|
1705
1381
|
};
|
|
1706
1382
|
};
|
|
1707
|
-
|
|
1383
|
+
const deserializeAws_restJson1CapacityDescription = (output, context) => {
|
|
1708
1384
|
return {
|
|
1709
1385
|
autoScaling: output.autoScaling != null
|
|
1710
1386
|
? deserializeAws_restJson1AutoScalingDescription(output.autoScaling, context)
|
|
@@ -1714,13 +1390,13 @@ var deserializeAws_restJson1CapacityDescription = function (output, context) {
|
|
|
1714
1390
|
: undefined,
|
|
1715
1391
|
};
|
|
1716
1392
|
};
|
|
1717
|
-
|
|
1393
|
+
const deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription = (output, context) => {
|
|
1718
1394
|
return {
|
|
1719
1395
|
enabled: __expectBoolean(output.enabled),
|
|
1720
1396
|
logGroup: __expectString(output.logGroup),
|
|
1721
1397
|
};
|
|
1722
1398
|
};
|
|
1723
|
-
|
|
1399
|
+
const deserializeAws_restJson1ConnectorSummary = (output, context) => {
|
|
1724
1400
|
return {
|
|
1725
1401
|
capacity: output.capacity != null ? deserializeAws_restJson1CapacityDescription(output.capacity, context) : undefined,
|
|
1726
1402
|
connectorArn: __expectString(output.connectorArn),
|
|
@@ -1749,24 +1425,24 @@ var deserializeAws_restJson1ConnectorSummary = function (output, context) {
|
|
|
1749
1425
|
: undefined,
|
|
1750
1426
|
};
|
|
1751
1427
|
};
|
|
1752
|
-
|
|
1428
|
+
const deserializeAws_restJson1CustomPluginDescription = (output, context) => {
|
|
1753
1429
|
return {
|
|
1754
1430
|
customPluginArn: __expectString(output.customPluginArn),
|
|
1755
1431
|
revision: __expectLong(output.revision),
|
|
1756
1432
|
};
|
|
1757
1433
|
};
|
|
1758
|
-
|
|
1434
|
+
const deserializeAws_restJson1CustomPluginFileDescription = (output, context) => {
|
|
1759
1435
|
return {
|
|
1760
1436
|
fileMd5: __expectString(output.fileMd5),
|
|
1761
1437
|
fileSize: __expectLong(output.fileSize),
|
|
1762
1438
|
};
|
|
1763
1439
|
};
|
|
1764
|
-
|
|
1440
|
+
const deserializeAws_restJson1CustomPluginLocationDescription = (output, context) => {
|
|
1765
1441
|
return {
|
|
1766
1442
|
s3Location: output.s3Location != null ? deserializeAws_restJson1S3LocationDescription(output.s3Location, context) : undefined,
|
|
1767
1443
|
};
|
|
1768
1444
|
};
|
|
1769
|
-
|
|
1445
|
+
const deserializeAws_restJson1CustomPluginRevisionSummary = (output, context) => {
|
|
1770
1446
|
return {
|
|
1771
1447
|
contentType: __expectString(output.contentType),
|
|
1772
1448
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
@@ -1780,7 +1456,7 @@ var deserializeAws_restJson1CustomPluginRevisionSummary = function (output, cont
|
|
|
1780
1456
|
revision: __expectLong(output.revision),
|
|
1781
1457
|
};
|
|
1782
1458
|
};
|
|
1783
|
-
|
|
1459
|
+
const deserializeAws_restJson1CustomPluginSummary = (output, context) => {
|
|
1784
1460
|
return {
|
|
1785
1461
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
1786
1462
|
customPluginArn: __expectString(output.customPluginArn),
|
|
@@ -1792,80 +1468,80 @@ var deserializeAws_restJson1CustomPluginSummary = function (output, context) {
|
|
|
1792
1468
|
name: __expectString(output.name),
|
|
1793
1469
|
};
|
|
1794
1470
|
};
|
|
1795
|
-
|
|
1471
|
+
const deserializeAws_restJson1FirehoseLogDeliveryDescription = (output, context) => {
|
|
1796
1472
|
return {
|
|
1797
1473
|
deliveryStream: __expectString(output.deliveryStream),
|
|
1798
1474
|
enabled: __expectBoolean(output.enabled),
|
|
1799
1475
|
};
|
|
1800
1476
|
};
|
|
1801
|
-
|
|
1477
|
+
const deserializeAws_restJson1KafkaClusterClientAuthenticationDescription = (output, context) => {
|
|
1802
1478
|
return {
|
|
1803
1479
|
authenticationType: __expectString(output.authenticationType),
|
|
1804
1480
|
};
|
|
1805
1481
|
};
|
|
1806
|
-
|
|
1482
|
+
const deserializeAws_restJson1KafkaClusterDescription = (output, context) => {
|
|
1807
1483
|
return {
|
|
1808
1484
|
apacheKafkaCluster: output.apacheKafkaCluster != null
|
|
1809
1485
|
? deserializeAws_restJson1ApacheKafkaClusterDescription(output.apacheKafkaCluster, context)
|
|
1810
1486
|
: undefined,
|
|
1811
1487
|
};
|
|
1812
1488
|
};
|
|
1813
|
-
|
|
1489
|
+
const deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription = (output, context) => {
|
|
1814
1490
|
return {
|
|
1815
1491
|
encryptionType: __expectString(output.encryptionType),
|
|
1816
1492
|
};
|
|
1817
1493
|
};
|
|
1818
|
-
|
|
1494
|
+
const deserializeAws_restJson1LogDeliveryDescription = (output, context) => {
|
|
1819
1495
|
return {
|
|
1820
1496
|
workerLogDelivery: output.workerLogDelivery != null
|
|
1821
1497
|
? deserializeAws_restJson1WorkerLogDeliveryDescription(output.workerLogDelivery, context)
|
|
1822
1498
|
: undefined,
|
|
1823
1499
|
};
|
|
1824
1500
|
};
|
|
1825
|
-
|
|
1501
|
+
const deserializeAws_restJson1PluginDescription = (output, context) => {
|
|
1826
1502
|
return {
|
|
1827
1503
|
customPlugin: output.customPlugin != null
|
|
1828
1504
|
? deserializeAws_restJson1CustomPluginDescription(output.customPlugin, context)
|
|
1829
1505
|
: undefined,
|
|
1830
1506
|
};
|
|
1831
1507
|
};
|
|
1832
|
-
|
|
1508
|
+
const deserializeAws_restJson1ProvisionedCapacityDescription = (output, context) => {
|
|
1833
1509
|
return {
|
|
1834
1510
|
mcuCount: __expectInt32(output.mcuCount),
|
|
1835
1511
|
workerCount: __expectInt32(output.workerCount),
|
|
1836
1512
|
};
|
|
1837
1513
|
};
|
|
1838
|
-
|
|
1514
|
+
const deserializeAws_restJson1S3LocationDescription = (output, context) => {
|
|
1839
1515
|
return {
|
|
1840
1516
|
bucketArn: __expectString(output.bucketArn),
|
|
1841
1517
|
fileKey: __expectString(output.fileKey),
|
|
1842
1518
|
objectVersion: __expectString(output.objectVersion),
|
|
1843
1519
|
};
|
|
1844
1520
|
};
|
|
1845
|
-
|
|
1521
|
+
const deserializeAws_restJson1S3LogDeliveryDescription = (output, context) => {
|
|
1846
1522
|
return {
|
|
1847
1523
|
bucket: __expectString(output.bucket),
|
|
1848
1524
|
enabled: __expectBoolean(output.enabled),
|
|
1849
1525
|
prefix: __expectString(output.prefix),
|
|
1850
1526
|
};
|
|
1851
1527
|
};
|
|
1852
|
-
|
|
1528
|
+
const deserializeAws_restJson1ScaleInPolicyDescription = (output, context) => {
|
|
1853
1529
|
return {
|
|
1854
1530
|
cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
|
|
1855
1531
|
};
|
|
1856
1532
|
};
|
|
1857
|
-
|
|
1533
|
+
const deserializeAws_restJson1ScaleOutPolicyDescription = (output, context) => {
|
|
1858
1534
|
return {
|
|
1859
1535
|
cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
|
|
1860
1536
|
};
|
|
1861
1537
|
};
|
|
1862
|
-
|
|
1538
|
+
const deserializeAws_restJson1StateDescription = (output, context) => {
|
|
1863
1539
|
return {
|
|
1864
1540
|
code: __expectString(output.code),
|
|
1865
1541
|
message: __expectString(output.message),
|
|
1866
1542
|
};
|
|
1867
1543
|
};
|
|
1868
|
-
|
|
1544
|
+
const deserializeAws_restJson1VpcDescription = (output, context) => {
|
|
1869
1545
|
return {
|
|
1870
1546
|
securityGroups: output.securityGroups != null
|
|
1871
1547
|
? deserializeAws_restJson1__listOf__string(output.securityGroups, context)
|
|
@@ -1873,13 +1549,13 @@ var deserializeAws_restJson1VpcDescription = function (output, context) {
|
|
|
1873
1549
|
subnets: output.subnets != null ? deserializeAws_restJson1__listOf__string(output.subnets, context) : undefined,
|
|
1874
1550
|
};
|
|
1875
1551
|
};
|
|
1876
|
-
|
|
1552
|
+
const deserializeAws_restJson1WorkerConfigurationDescription = (output, context) => {
|
|
1877
1553
|
return {
|
|
1878
1554
|
revision: __expectLong(output.revision),
|
|
1879
1555
|
workerConfigurationArn: __expectString(output.workerConfigurationArn),
|
|
1880
1556
|
};
|
|
1881
1557
|
};
|
|
1882
|
-
|
|
1558
|
+
const deserializeAws_restJson1WorkerConfigurationRevisionDescription = (output, context) => {
|
|
1883
1559
|
return {
|
|
1884
1560
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
1885
1561
|
description: __expectString(output.description),
|
|
@@ -1887,14 +1563,14 @@ var deserializeAws_restJson1WorkerConfigurationRevisionDescription = function (o
|
|
|
1887
1563
|
revision: __expectLong(output.revision),
|
|
1888
1564
|
};
|
|
1889
1565
|
};
|
|
1890
|
-
|
|
1566
|
+
const deserializeAws_restJson1WorkerConfigurationRevisionSummary = (output, context) => {
|
|
1891
1567
|
return {
|
|
1892
1568
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
1893
1569
|
description: __expectString(output.description),
|
|
1894
1570
|
revision: __expectLong(output.revision),
|
|
1895
1571
|
};
|
|
1896
1572
|
};
|
|
1897
|
-
|
|
1573
|
+
const deserializeAws_restJson1WorkerConfigurationSummary = (output, context) => {
|
|
1898
1574
|
return {
|
|
1899
1575
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
1900
1576
|
description: __expectString(output.description),
|
|
@@ -1905,7 +1581,7 @@ var deserializeAws_restJson1WorkerConfigurationSummary = function (output, conte
|
|
|
1905
1581
|
workerConfigurationArn: __expectString(output.workerConfigurationArn),
|
|
1906
1582
|
};
|
|
1907
1583
|
};
|
|
1908
|
-
|
|
1584
|
+
const deserializeAws_restJson1WorkerLogDeliveryDescription = (output, context) => {
|
|
1909
1585
|
return {
|
|
1910
1586
|
cloudWatchLogs: output.cloudWatchLogs != null
|
|
1911
1587
|
? deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription(output.cloudWatchLogs, context)
|
|
@@ -1916,57 +1592,39 @@ var deserializeAws_restJson1WorkerLogDeliveryDescription = function (output, con
|
|
|
1916
1592
|
s3: output.s3 != null ? deserializeAws_restJson1S3LogDeliveryDescription(output.s3, context) : undefined,
|
|
1917
1593
|
};
|
|
1918
1594
|
};
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
});
|
|
1927
|
-
};
|
|
1928
|
-
var collectBody = function (streamBody, context) {
|
|
1929
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1595
|
+
const deserializeMetadata = (output) => ({
|
|
1596
|
+
httpStatusCode: output.statusCode,
|
|
1597
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1598
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1599
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1600
|
+
});
|
|
1601
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1930
1602
|
if (streamBody instanceof Uint8Array) {
|
|
1931
1603
|
return Promise.resolve(streamBody);
|
|
1932
1604
|
}
|
|
1933
1605
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1934
1606
|
};
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
return __generator(this, function (_b) {
|
|
1957
|
-
switch (_b.label) {
|
|
1958
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1959
|
-
case 1:
|
|
1960
|
-
value = _b.sent();
|
|
1961
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1962
|
-
return [2, value];
|
|
1963
|
-
}
|
|
1964
|
-
});
|
|
1965
|
-
}); };
|
|
1966
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1967
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1968
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1969
|
-
var cleanValue = rawValue;
|
|
1607
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1608
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1609
|
+
value !== null &&
|
|
1610
|
+
value !== "" &&
|
|
1611
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1612
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1613
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1614
|
+
if (encoded.length) {
|
|
1615
|
+
return JSON.parse(encoded);
|
|
1616
|
+
}
|
|
1617
|
+
return {};
|
|
1618
|
+
});
|
|
1619
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1620
|
+
const value = await parseBody(errorBody, context);
|
|
1621
|
+
value.message = value.message ?? value.Message;
|
|
1622
|
+
return value;
|
|
1623
|
+
};
|
|
1624
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1625
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1626
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1627
|
+
let cleanValue = rawValue;
|
|
1970
1628
|
if (typeof cleanValue === "number") {
|
|
1971
1629
|
cleanValue = cleanValue.toString();
|
|
1972
1630
|
}
|
|
@@ -1981,7 +1639,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1981
1639
|
}
|
|
1982
1640
|
return cleanValue;
|
|
1983
1641
|
};
|
|
1984
|
-
|
|
1642
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1985
1643
|
if (headerKey !== undefined) {
|
|
1986
1644
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1987
1645
|
}
|