@aws-sdk/client-kafkaconnect 3.183.0 → 3.186.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  3. package/dist-es/KafkaConnect.js +57 -50
  4. package/dist-es/KafkaConnectClient.js +28 -22
  5. package/dist-es/commands/CreateConnectorCommand.js +28 -21
  6. package/dist-es/commands/CreateCustomPluginCommand.js +28 -21
  7. package/dist-es/commands/CreateWorkerConfigurationCommand.js +28 -21
  8. package/dist-es/commands/DeleteConnectorCommand.js +28 -21
  9. package/dist-es/commands/DeleteCustomPluginCommand.js +28 -21
  10. package/dist-es/commands/DescribeConnectorCommand.js +28 -21
  11. package/dist-es/commands/DescribeCustomPluginCommand.js +28 -21
  12. package/dist-es/commands/DescribeWorkerConfigurationCommand.js +28 -21
  13. package/dist-es/commands/ListConnectorsCommand.js +28 -21
  14. package/dist-es/commands/ListCustomPluginsCommand.js +28 -21
  15. package/dist-es/commands/ListWorkerConfigurationsCommand.js +28 -21
  16. package/dist-es/commands/UpdateConnectorCommand.js +28 -21
  17. package/dist-es/endpoints.js +8 -8
  18. package/dist-es/models/KafkaConnectServiceException.js +10 -5
  19. package/dist-es/models/models_0.js +168 -326
  20. package/dist-es/pagination/ListConnectorsPaginator.js +68 -25
  21. package/dist-es/pagination/ListCustomPluginsPaginator.js +68 -25
  22. package/dist-es/pagination/ListWorkerConfigurationsPaginator.js +68 -25
  23. package/dist-es/protocols/Aws_restJson1.js +1639 -1297
  24. package/dist-es/runtimeConfig.browser.js +12 -26
  25. package/dist-es/runtimeConfig.js +12 -30
  26. package/dist-es/runtimeConfig.native.js +5 -8
  27. package/dist-es/runtimeConfig.shared.js +11 -8
  28. package/package.json +33 -33
@@ -1,1304 +1,1629 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { KafkaConnectServiceException as __BaseException } from "../models/KafkaConnectServiceException";
4
5
  import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
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
- }),
6
+ export var serializeAws_restJson1CreateConnectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
+ return __generator(this, function (_c) {
9
+ switch (_c.label) {
10
+ case 0: return [4, context.endpoint()];
11
+ case 1:
12
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
13
+ headers = {
14
+ "content-type": "application/json",
15
+ };
16
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/connectors";
17
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.capacity != null && { capacity: serializeAws_restJson1Capacity(input.capacity, context) })), (input.connectorConfiguration != null && {
18
+ connectorConfiguration: serializeAws_restJson1__sensitive__mapOf__string(input.connectorConfiguration, context),
19
+ })), (input.connectorDescription != null && { connectorDescription: input.connectorDescription })), (input.connectorName != null && { connectorName: input.connectorName })), (input.kafkaCluster != null && {
20
+ kafkaCluster: serializeAws_restJson1KafkaCluster(input.kafkaCluster, context),
21
+ })), (input.kafkaClusterClientAuthentication != null && {
22
+ kafkaClusterClientAuthentication: serializeAws_restJson1KafkaClusterClientAuthentication(input.kafkaClusterClientAuthentication, context),
23
+ })), (input.kafkaClusterEncryptionInTransit != null && {
24
+ kafkaClusterEncryptionInTransit: serializeAws_restJson1KafkaClusterEncryptionInTransit(input.kafkaClusterEncryptionInTransit, context),
25
+ })), (input.kafkaConnectVersion != null && { kafkaConnectVersion: input.kafkaConnectVersion })), (input.logDelivery != null && { logDelivery: serializeAws_restJson1LogDelivery(input.logDelivery, context) })), (input.plugins != null && { plugins: serializeAws_restJson1__listOfPlugin(input.plugins, context) })), (input.serviceExecutionRoleArn != null && { serviceExecutionRoleArn: input.serviceExecutionRoleArn })), (input.workerConfiguration != null && {
26
+ workerConfiguration: serializeAws_restJson1WorkerConfiguration(input.workerConfiguration, context),
27
+ })));
28
+ return [2, new __HttpRequest({
29
+ protocol: protocol,
30
+ hostname: hostname,
31
+ port: port,
32
+ method: "POST",
33
+ headers: headers,
34
+ path: resolvedPath,
35
+ body: body,
36
+ })];
37
+ }
35
38
  });
36
- return new __HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "POST",
41
- headers,
42
- path: resolvedPath,
43
- body,
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
+ }
44
62
  });
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 }),
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
+ }
58
86
  });
59
- return new __HttpRequest({
60
- protocol,
61
- hostname,
62
- port,
63
- method: "POST",
64
- headers,
65
- path: resolvedPath,
66
- body,
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
+ }
67
112
  });
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 }),
113
+ }); };
114
+ export var serializeAws_restJson1DeleteCustomPluginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
115
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
116
+ return __generator(this, function (_c) {
117
+ switch (_c.label) {
118
+ case 0: return [4, context.endpoint()];
119
+ case 1:
120
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
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
+ }
80
134
  });
81
- return new __HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "POST",
86
- headers,
87
- path: resolvedPath,
88
- body,
135
+ }); };
136
+ export var serializeAws_restJson1DescribeConnectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
137
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
138
+ return __generator(this, function (_c) {
139
+ switch (_c.label) {
140
+ case 0: return [4, context.endpoint()];
141
+ case 1:
142
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
143
+ headers = {};
144
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/connectors/{connectorArn}";
145
+ resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", function () { return input.connectorArn; }, "{connectorArn}", false);
146
+ return [2, new __HttpRequest({
147
+ protocol: protocol,
148
+ hostname: hostname,
149
+ port: port,
150
+ method: "GET",
151
+ headers: headers,
152
+ path: resolvedPath,
153
+ body: body,
154
+ })];
155
+ }
89
156
  });
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],
157
+ }); };
158
+ export var serializeAws_restJson1DescribeCustomPluginCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
159
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
160
+ return __generator(this, function (_c) {
161
+ switch (_c.label) {
162
+ case 0: return [4, context.endpoint()];
163
+ case 1:
164
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
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
+ }
98
178
  });
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,
179
+ }); };
180
+ export var serializeAws_restJson1DescribeWorkerConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
181
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
182
+ return __generator(this, function (_c) {
183
+ switch (_c.label) {
184
+ case 0: return [4, context.endpoint()];
185
+ case 1:
186
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
187
+ headers = {};
188
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
189
+ "/v1/worker-configurations/{workerConfigurationArn}";
190
+ resolvedPath = __resolvedPath(resolvedPath, input, "workerConfigurationArn", function () { return input.workerConfigurationArn; }, "{workerConfigurationArn}", false);
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
+ }
109
201
  });
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,
202
+ }); };
203
+ export var serializeAws_restJson1ListConnectorsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
204
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
205
+ return __generator(this, function (_c) {
206
+ switch (_c.label) {
207
+ case 0: return [4, context.endpoint()];
208
+ case 1:
209
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
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
+ }
125
228
  });
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,
229
+ }); };
230
+ export var serializeAws_restJson1ListCustomPluginsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
231
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
232
+ return __generator(this, function (_c) {
233
+ switch (_c.label) {
234
+ case 0: return [4, context.endpoint()];
235
+ case 1:
236
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
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
+ }
141
254
  });
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,
255
+ }); };
256
+ export var serializeAws_restJson1ListWorkerConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
257
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
258
+ return __generator(this, function (_c) {
259
+ switch (_c.label) {
260
+ case 0: return [4, context.endpoint()];
261
+ case 1:
262
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
263
+ headers = {};
264
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/worker-configurations";
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
+ }
157
280
  });
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,
281
+ }); };
282
+ export var serializeAws_restJson1UpdateConnectorCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
283
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
284
+ return __generator(this, function (_c) {
285
+ switch (_c.label) {
286
+ case 0: return [4, context.endpoint()];
287
+ case 1:
288
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
289
+ headers = {
290
+ "content-type": "application/json",
291
+ };
292
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1/connectors/{connectorArn}";
293
+ resolvedPath = __resolvedPath(resolvedPath, input, "connectorArn", function () { return input.connectorArn; }, "{connectorArn}", false);
294
+ query = map({
295
+ currentVersion: [, input.currentVersion],
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
+ }
174
309
  });
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],
310
+ }); };
311
+ export var deserializeAws_restJson1CreateConnectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
312
+ var contents, data, _a, _b;
313
+ return __generator(this, function (_c) {
314
+ switch (_c.label) {
315
+ case 0:
316
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
317
+ return [2, deserializeAws_restJson1CreateConnectorCommandError(output, context)];
318
+ }
319
+ contents = map({
320
+ $metadata: deserializeMetadata(output),
321
+ });
322
+ _a = __expectNonNull;
323
+ _b = __expectObject;
324
+ return [4, parseBody(output.body, context)];
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
+ }
184
338
  });
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,
339
+ }); };
340
+ var deserializeAws_restJson1CreateConnectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
341
+ var parsedOutput, _a, errorCode, _b, parsedBody;
342
+ var _c;
343
+ return __generator(this, function (_d) {
344
+ switch (_d.label) {
345
+ case 0:
346
+ _a = [__assign({}, output)];
347
+ _c = {};
348
+ return [4, parseErrorBody(output.body, context)];
349
+ case 1:
350
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
351
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
+ _b = errorCode;
353
+ switch (_b) {
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
+ }
195
399
  });
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],
400
+ }); };
401
+ export var deserializeAws_restJson1CreateCustomPluginCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
402
+ var contents, data, _a, _b;
403
+ return __generator(this, function (_c) {
404
+ switch (_c.label) {
405
+ case 0:
406
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
407
+ return [2, deserializeAws_restJson1CreateCustomPluginCommandError(output, context)];
408
+ }
409
+ contents = map({
410
+ $metadata: deserializeMetadata(output),
411
+ });
412
+ _a = __expectNonNull;
413
+ _b = __expectObject;
414
+ return [4, parseBody(output.body, context)];
415
+ case 1:
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
+ }
204
431
  });
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,
432
+ }); };
433
+ var deserializeAws_restJson1CreateCustomPluginCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
434
+ var parsedOutput, _a, errorCode, _b, parsedBody;
435
+ var _c;
436
+ return __generator(this, function (_d) {
437
+ switch (_d.label) {
438
+ case 0:
439
+ _a = [__assign({}, output)];
440
+ _c = {};
441
+ return [4, parseErrorBody(output.body, context)];
442
+ case 1:
443
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
444
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
445
+ _b = errorCode;
446
+ switch (_b) {
447
+ case "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
+ }
215
492
  });
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],
493
+ }); };
494
+ export var deserializeAws_restJson1CreateWorkerConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
495
+ var contents, data, _a, _b;
496
+ return __generator(this, function (_c) {
497
+ switch (_c.label) {
498
+ case 0:
499
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
500
+ return [2, deserializeAws_restJson1CreateWorkerConfigurationCommandError(output, context)];
501
+ }
502
+ contents = map({
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
+ }
224
524
  });
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,
525
+ }); };
526
+ var deserializeAws_restJson1CreateWorkerConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
527
+ var parsedOutput, _a, errorCode, _b, parsedBody;
528
+ var _c;
529
+ return __generator(this, function (_d) {
530
+ switch (_d.label) {
531
+ case 0:
532
+ _a = [__assign({}, output)];
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
+ }
235
585
  });
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],
586
+ }); };
587
+ export var deserializeAws_restJson1DeleteConnectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
588
+ var contents, data, _a, _b;
589
+ return __generator(this, function (_c) {
590
+ switch (_c.label) {
591
+ case 0:
592
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
593
+ return [2, deserializeAws_restJson1DeleteConnectorCommandError(output, context)];
594
+ }
595
+ contents = map({
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
+ }
246
611
  });
247
- let body;
248
- body = JSON.stringify({
249
- ...(input.capacity != null && { capacity: serializeAws_restJson1CapacityUpdate(input.capacity, context) }),
612
+ }); };
613
+ var deserializeAws_restJson1DeleteConnectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
614
+ var parsedOutput, _a, errorCode, _b, parsedBody;
615
+ var _c;
616
+ return __generator(this, function (_d) {
617
+ switch (_d.label) {
618
+ case 0:
619
+ _a = [__assign({}, output)];
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
+ }
250
668
  });
251
- return new __HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "PUT",
256
- headers,
257
- path: resolvedPath,
258
- query,
259
- body,
669
+ }); };
670
+ export var deserializeAws_restJson1DeleteCustomPluginCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
671
+ var contents, data, _a, _b;
672
+ return __generator(this, function (_c) {
673
+ switch (_c.label) {
674
+ case 0:
675
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
676
+ return [2, deserializeAws_restJson1DeleteCustomPluginCommandError(output, context)];
677
+ }
678
+ contents = map({
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
+ }
260
694
  });
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),
695
+ }); };
696
+ var deserializeAws_restJson1DeleteCustomPluginCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
697
+ var parsedOutput, _a, errorCode, _b, parsedBody;
698
+ var _c;
699
+ return __generator(this, function (_d) {
700
+ switch (_d.label) {
701
+ case 0:
702
+ _a = [__assign({}, output)];
703
+ _c = {};
704
+ return [4, parseErrorBody(output.body, context)];
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
+ }
268
751
  });
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),
752
+ }); };
753
+ export var deserializeAws_restJson1DescribeConnectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
754
+ var contents, data, _a, _b;
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
+ }
328
822
  });
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),
823
+ }); };
824
+ var deserializeAws_restJson1DescribeConnectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
825
+ var parsedOutput, _a, errorCode, _b, parsedBody;
826
+ var _c;
827
+ return __generator(this, function (_d) {
828
+ switch (_d.label) {
829
+ case 0:
830
+ _a = [__assign({}, output)];
831
+ _c = {};
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
+ }
391
879
  });
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),
880
+ }); };
881
+ export var deserializeAws_restJson1DescribeCustomPluginCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
882
+ var contents, data, _a, _b;
883
+ return __generator(this, function (_c) {
884
+ switch (_c.label) {
885
+ case 0:
886
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
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
+ }
454
920
  });
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),
921
+ }); };
922
+ var deserializeAws_restJson1DescribeCustomPluginCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
923
+ var parsedOutput, _a, errorCode, _b, parsedBody;
924
+ var _c;
925
+ return __generator(this, function (_d) {
926
+ switch (_d.label) {
927
+ case 0:
928
+ _a = [__assign({}, output)];
929
+ _c = {};
930
+ return [4, parseErrorBody(output.body, context)];
931
+ case 1:
932
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
933
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
934
+ _b = errorCode;
935
+ switch (_b) {
936
+ case "BadRequestException": return [3, 2];
937
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
938
+ case "ForbiddenException": return [3, 4];
939
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
940
+ case "InternalServerErrorException": return [3, 6];
941
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
942
+ case "NotFoundException": return [3, 8];
943
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
944
+ case "ServiceUnavailableException": return [3, 10];
945
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
946
+ case "TooManyRequestsException": return [3, 12];
947
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
948
+ case "UnauthorizedException": return [3, 14];
949
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
950
+ }
951
+ return [3, 16];
952
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
953
+ case 3: throw _d.sent();
954
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
955
+ case 5: throw _d.sent();
956
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
957
+ case 7: throw _d.sent();
958
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
959
+ case 9: throw _d.sent();
960
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
961
+ case 11: throw _d.sent();
962
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
963
+ case 13: throw _d.sent();
964
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
965
+ case 15: throw _d.sent();
966
+ case 16:
967
+ parsedBody = parsedOutput.body;
968
+ throwDefaultError({
969
+ output: output,
970
+ parsedBody: parsedBody,
971
+ exceptionCtor: __BaseException,
972
+ errorCode: errorCode,
973
+ });
974
+ _d.label = 17;
975
+ case 17: return [2];
976
+ }
508
977
  });
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),
978
+ }); };
979
+ export var deserializeAws_restJson1DescribeWorkerConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
980
+ var contents, data, _a, _b;
981
+ return __generator(this, function (_c) {
982
+ switch (_c.label) {
983
+ case 0:
984
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
985
+ return [2, deserializeAws_restJson1DescribeWorkerConfigurationCommandError(output, context)];
986
+ }
987
+ contents = map({
988
+ $metadata: deserializeMetadata(output),
989
+ });
990
+ _a = __expectNonNull;
991
+ _b = __expectObject;
992
+ return [4, parseBody(output.body, context)];
993
+ case 1:
994
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
995
+ if (data.creationTime != null) {
996
+ contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
997
+ }
998
+ if (data.description != null) {
999
+ contents.description = __expectString(data.description);
1000
+ }
1001
+ if (data.latestRevision != null) {
1002
+ contents.latestRevision = deserializeAws_restJson1WorkerConfigurationRevisionDescription(data.latestRevision, context);
1003
+ }
1004
+ if (data.name != null) {
1005
+ contents.name = __expectString(data.name);
1006
+ }
1007
+ if (data.workerConfigurationArn != null) {
1008
+ contents.workerConfigurationArn = __expectString(data.workerConfigurationArn);
1009
+ }
1010
+ return [2, contents];
1011
+ }
562
1012
  });
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),
1013
+ }); };
1014
+ var deserializeAws_restJson1DescribeWorkerConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1015
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1016
+ var _c;
1017
+ return __generator(this, function (_d) {
1018
+ switch (_d.label) {
1019
+ case 0:
1020
+ _a = [__assign({}, output)];
1021
+ _c = {};
1022
+ return [4, parseErrorBody(output.body, context)];
1023
+ case 1:
1024
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1025
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1026
+ _b = errorCode;
1027
+ switch (_b) {
1028
+ case "BadRequestException": return [3, 2];
1029
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
1030
+ case "ForbiddenException": return [3, 4];
1031
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
1032
+ case "InternalServerErrorException": return [3, 6];
1033
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
1034
+ case "NotFoundException": return [3, 8];
1035
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
1036
+ case "ServiceUnavailableException": return [3, 10];
1037
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
1038
+ case "TooManyRequestsException": return [3, 12];
1039
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
1040
+ case "UnauthorizedException": return [3, 14];
1041
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
1042
+ }
1043
+ return [3, 16];
1044
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1045
+ case 3: throw _d.sent();
1046
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1047
+ case 5: throw _d.sent();
1048
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1049
+ case 7: throw _d.sent();
1050
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1051
+ case 9: throw _d.sent();
1052
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1053
+ case 11: throw _d.sent();
1054
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1055
+ case 13: throw _d.sent();
1056
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
1057
+ case 15: throw _d.sent();
1058
+ case 16:
1059
+ parsedBody = parsedOutput.body;
1060
+ throwDefaultError({
1061
+ output: output,
1062
+ parsedBody: parsedBody,
1063
+ exceptionCtor: __BaseException,
1064
+ errorCode: errorCode,
1065
+ });
1066
+ _d.label = 17;
1067
+ case 17: return [2];
1068
+ }
661
1069
  });
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),
1070
+ }); };
1071
+ export var deserializeAws_restJson1ListConnectorsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1072
+ var contents, data, _a, _b;
1073
+ return __generator(this, function (_c) {
1074
+ switch (_c.label) {
1075
+ case 0:
1076
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
+ return [2, deserializeAws_restJson1ListConnectorsCommandError(output, context)];
1078
+ }
1079
+ contents = map({
1080
+ $metadata: deserializeMetadata(output),
1081
+ });
1082
+ _a = __expectNonNull;
1083
+ _b = __expectObject;
1084
+ return [4, parseBody(output.body, context)];
1085
+ case 1:
1086
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1087
+ if (data.connectors != null) {
1088
+ contents.connectors = deserializeAws_restJson1__listOfConnectorSummary(data.connectors, context);
1089
+ }
1090
+ if (data.nextToken != null) {
1091
+ contents.nextToken = __expectString(data.nextToken);
1092
+ }
1093
+ return [2, contents];
1094
+ }
730
1095
  });
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),
1096
+ }); };
1097
+ var deserializeAws_restJson1ListConnectorsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1098
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1099
+ var _c;
1100
+ return __generator(this, function (_d) {
1101
+ switch (_d.label) {
1102
+ case 0:
1103
+ _a = [__assign({}, output)];
1104
+ _c = {};
1105
+ return [4, parseErrorBody(output.body, context)];
1106
+ case 1:
1107
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1108
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1109
+ _b = errorCode;
1110
+ switch (_b) {
1111
+ case "BadRequestException": return [3, 2];
1112
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
1113
+ case "ForbiddenException": return [3, 4];
1114
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
1115
+ case "InternalServerErrorException": return [3, 6];
1116
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
1117
+ case "NotFoundException": return [3, 8];
1118
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
1119
+ case "ServiceUnavailableException": return [3, 10];
1120
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
1121
+ case "TooManyRequestsException": return [3, 12];
1122
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
1123
+ case "UnauthorizedException": return [3, 14];
1124
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
1125
+ }
1126
+ return [3, 16];
1127
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1128
+ case 3: throw _d.sent();
1129
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1130
+ case 5: throw _d.sent();
1131
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1132
+ case 7: throw _d.sent();
1133
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1134
+ case 9: throw _d.sent();
1135
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1136
+ case 11: throw _d.sent();
1137
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1138
+ case 13: throw _d.sent();
1139
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
1140
+ case 15: throw _d.sent();
1141
+ case 16:
1142
+ parsedBody = parsedOutput.body;
1143
+ throwDefaultError({
1144
+ output: output,
1145
+ parsedBody: parsedBody,
1146
+ exceptionCtor: __BaseException,
1147
+ errorCode: errorCode,
1148
+ });
1149
+ _d.label = 17;
1150
+ case 17: return [2];
1151
+ }
793
1152
  });
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),
1153
+ }); };
1154
+ export var deserializeAws_restJson1ListCustomPluginsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1155
+ var contents, data, _a, _b;
1156
+ return __generator(this, function (_c) {
1157
+ switch (_c.label) {
1158
+ case 0:
1159
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1160
+ return [2, deserializeAws_restJson1ListCustomPluginsCommandError(output, context)];
1161
+ }
1162
+ contents = map({
1163
+ $metadata: deserializeMetadata(output),
1164
+ });
1165
+ _a = __expectNonNull;
1166
+ _b = __expectObject;
1167
+ return [4, parseBody(output.body, context)];
1168
+ case 1:
1169
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1170
+ if (data.customPlugins != null) {
1171
+ contents.customPlugins = deserializeAws_restJson1__listOfCustomPluginSummary(data.customPlugins, context);
1172
+ }
1173
+ if (data.nextToken != null) {
1174
+ contents.nextToken = __expectString(data.nextToken);
1175
+ }
1176
+ return [2, contents];
1177
+ }
847
1178
  });
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),
1179
+ }); };
1180
+ var deserializeAws_restJson1ListCustomPluginsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1181
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1182
+ var _c;
1183
+ return __generator(this, function (_d) {
1184
+ switch (_d.label) {
1185
+ case 0:
1186
+ _a = [__assign({}, output)];
1187
+ _c = {};
1188
+ return [4, parseErrorBody(output.body, context)];
1189
+ case 1:
1190
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1191
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1192
+ _b = errorCode;
1193
+ switch (_b) {
1194
+ case "BadRequestException": return [3, 2];
1195
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
1196
+ case "ForbiddenException": return [3, 4];
1197
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
1198
+ case "InternalServerErrorException": return [3, 6];
1199
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
1200
+ case "NotFoundException": return [3, 8];
1201
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
1202
+ case "ServiceUnavailableException": return [3, 10];
1203
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
1204
+ case "TooManyRequestsException": return [3, 12];
1205
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
1206
+ case "UnauthorizedException": return [3, 14];
1207
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
1208
+ }
1209
+ return [3, 16];
1210
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1211
+ case 3: throw _d.sent();
1212
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1213
+ case 5: throw _d.sent();
1214
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1215
+ case 7: throw _d.sent();
1216
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1217
+ case 9: throw _d.sent();
1218
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1219
+ case 11: throw _d.sent();
1220
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1221
+ case 13: throw _d.sent();
1222
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
1223
+ case 15: throw _d.sent();
1224
+ case 16:
1225
+ parsedBody = parsedOutput.body;
1226
+ throwDefaultError({
1227
+ output: output,
1228
+ parsedBody: parsedBody,
1229
+ exceptionCtor: __BaseException,
1230
+ errorCode: errorCode,
1231
+ });
1232
+ _d.label = 17;
1233
+ case 17: return [2];
1234
+ }
901
1235
  });
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),
1236
+ }); };
1237
+ export var deserializeAws_restJson1ListWorkerConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1238
+ var contents, data, _a, _b;
1239
+ return __generator(this, function (_c) {
1240
+ switch (_c.label) {
1241
+ case 0:
1242
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1243
+ return [2, deserializeAws_restJson1ListWorkerConfigurationsCommandError(output, context)];
1244
+ }
1245
+ contents = map({
1246
+ $metadata: deserializeMetadata(output),
1247
+ });
1248
+ _a = __expectNonNull;
1249
+ _b = __expectObject;
1250
+ return [4, parseBody(output.body, context)];
1251
+ case 1:
1252
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1253
+ if (data.nextToken != null) {
1254
+ contents.nextToken = __expectString(data.nextToken);
1255
+ }
1256
+ if (data.workerConfigurations != null) {
1257
+ contents.workerConfigurations = deserializeAws_restJson1__listOfWorkerConfigurationSummary(data.workerConfigurations, context);
1258
+ }
1259
+ return [2, contents];
1260
+ }
955
1261
  });
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,
1262
+ }); };
1263
+ var deserializeAws_restJson1ListWorkerConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1264
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1265
+ var _c;
1266
+ return __generator(this, function (_d) {
1267
+ switch (_d.label) {
1268
+ case 0:
1269
+ _a = [__assign({}, output)];
1270
+ _c = {};
1271
+ return [4, parseErrorBody(output.body, context)];
1272
+ case 1:
1273
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1274
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
+ _b = errorCode;
1276
+ switch (_b) {
1277
+ case "BadRequestException": return [3, 2];
1278
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
1279
+ case "ForbiddenException": return [3, 4];
1280
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
1281
+ case "InternalServerErrorException": return [3, 6];
1282
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
1283
+ case "NotFoundException": return [3, 8];
1284
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
1285
+ case "ServiceUnavailableException": return [3, 10];
1286
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
1287
+ case "TooManyRequestsException": return [3, 12];
1288
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
1289
+ case "UnauthorizedException": return [3, 14];
1290
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
1291
+ }
1292
+ return [3, 16];
1293
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1294
+ case 3: throw _d.sent();
1295
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1296
+ case 5: throw _d.sent();
1297
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1298
+ case 7: throw _d.sent();
1299
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1300
+ case 9: throw _d.sent();
1301
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1302
+ case 11: throw _d.sent();
1303
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1304
+ case 13: throw _d.sent();
1305
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
1306
+ case 15: throw _d.sent();
1307
+ case 16:
1308
+ parsedBody = parsedOutput.body;
1309
+ throwDefaultError({
1310
+ output: output,
1311
+ parsedBody: parsedBody,
1312
+ exceptionCtor: __BaseException,
1313
+ errorCode: errorCode,
1314
+ });
1315
+ _d.label = 17;
1316
+ case 17: return [2];
1317
+ }
1013
1318
  });
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,
1319
+ }); };
1320
+ export var deserializeAws_restJson1UpdateConnectorCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1321
+ var contents, data, _a, _b;
1322
+ return __generator(this, function (_c) {
1323
+ switch (_c.label) {
1324
+ case 0:
1325
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1326
+ return [2, deserializeAws_restJson1UpdateConnectorCommandError(output, context)];
1327
+ }
1328
+ contents = map({
1329
+ $metadata: deserializeMetadata(output),
1330
+ });
1331
+ _a = __expectNonNull;
1332
+ _b = __expectObject;
1333
+ return [4, parseBody(output.body, context)];
1334
+ case 1:
1335
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1336
+ if (data.connectorArn != null) {
1337
+ contents.connectorArn = __expectString(data.connectorArn);
1338
+ }
1339
+ if (data.connectorState != null) {
1340
+ contents.connectorState = __expectString(data.connectorState);
1341
+ }
1342
+ return [2, contents];
1343
+ }
1025
1344
  });
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,
1345
+ }); };
1346
+ var deserializeAws_restJson1UpdateConnectorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1347
+ var parsedOutput, _a, errorCode, _b, parsedBody;
1348
+ var _c;
1349
+ return __generator(this, function (_d) {
1350
+ switch (_d.label) {
1351
+ case 0:
1352
+ _a = [__assign({}, output)];
1353
+ _c = {};
1354
+ return [4, parseErrorBody(output.body, context)];
1355
+ case 1:
1356
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1357
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1358
+ _b = errorCode;
1359
+ switch (_b) {
1360
+ case "BadRequestException": return [3, 2];
1361
+ case "com.amazonaws.kafkaconnect#BadRequestException": return [3, 2];
1362
+ case "ForbiddenException": return [3, 4];
1363
+ case "com.amazonaws.kafkaconnect#ForbiddenException": return [3, 4];
1364
+ case "InternalServerErrorException": return [3, 6];
1365
+ case "com.amazonaws.kafkaconnect#InternalServerErrorException": return [3, 6];
1366
+ case "NotFoundException": return [3, 8];
1367
+ case "com.amazonaws.kafkaconnect#NotFoundException": return [3, 8];
1368
+ case "ServiceUnavailableException": return [3, 10];
1369
+ case "com.amazonaws.kafkaconnect#ServiceUnavailableException": return [3, 10];
1370
+ case "TooManyRequestsException": return [3, 12];
1371
+ case "com.amazonaws.kafkaconnect#TooManyRequestsException": return [3, 12];
1372
+ case "UnauthorizedException": return [3, 14];
1373
+ case "com.amazonaws.kafkaconnect#UnauthorizedException": return [3, 14];
1374
+ }
1375
+ return [3, 16];
1376
+ case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
1377
+ case 3: throw _d.sent();
1378
+ case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
1379
+ case 5: throw _d.sent();
1380
+ case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
1381
+ case 7: throw _d.sent();
1382
+ case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1383
+ case 9: throw _d.sent();
1384
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
1385
+ case 11: throw _d.sent();
1386
+ case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
1387
+ case 13: throw _d.sent();
1388
+ case 14: return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
1389
+ case 15: throw _d.sent();
1390
+ case 16:
1391
+ parsedBody = parsedOutput.body;
1392
+ throwDefaultError({
1393
+ output: output,
1394
+ parsedBody: parsedBody,
1395
+ exceptionCtor: __BaseException,
1396
+ errorCode: errorCode,
1397
+ });
1398
+ _d.label = 17;
1399
+ case 17: return [2];
1400
+ }
1037
1401
  });
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,
1402
+ }); };
1403
+ var map = __map;
1404
+ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1405
+ var contents, data, exception;
1406
+ return __generator(this, function (_a) {
1407
+ contents = map({});
1408
+ data = parsedOutput.body;
1409
+ if (data.message != null) {
1410
+ contents.message = __expectString(data.message);
1411
+ }
1412
+ exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1413
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1049
1414
  });
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,
1415
+ }); };
1416
+ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1417
+ var contents, data, exception;
1418
+ return __generator(this, function (_a) {
1419
+ contents = map({});
1420
+ data = parsedOutput.body;
1421
+ if (data.message != null) {
1422
+ contents.message = __expectString(data.message);
1423
+ }
1424
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1425
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1061
1426
  });
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,
1427
+ }); };
1428
+ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1429
+ var contents, data, exception;
1430
+ return __generator(this, function (_a) {
1431
+ contents = map({});
1432
+ data = parsedOutput.body;
1433
+ if (data.message != null) {
1434
+ contents.message = __expectString(data.message);
1435
+ }
1436
+ exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1437
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1073
1438
  });
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,
1439
+ }); };
1440
+ var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1441
+ var contents, data, exception;
1442
+ return __generator(this, function (_a) {
1443
+ contents = map({});
1444
+ data = parsedOutput.body;
1445
+ if (data.message != null) {
1446
+ contents.message = __expectString(data.message);
1447
+ }
1448
+ exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1449
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1085
1450
  });
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,
1451
+ }); };
1452
+ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1453
+ var contents, data, exception;
1454
+ return __generator(this, function (_a) {
1455
+ contents = map({});
1456
+ data = parsedOutput.body;
1457
+ if (data.message != null) {
1458
+ contents.message = __expectString(data.message);
1459
+ }
1460
+ exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1461
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1097
1462
  });
1098
- return __decorateServiceException(exception, parsedOutput.body);
1099
- };
1100
- const serializeAws_restJson1__listOf__string = (input, context) => {
1463
+ }); };
1464
+ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1465
+ var contents, data, exception;
1466
+ return __generator(this, function (_a) {
1467
+ contents = map({});
1468
+ data = parsedOutput.body;
1469
+ if (data.message != null) {
1470
+ contents.message = __expectString(data.message);
1471
+ }
1472
+ exception = new ServiceUnavailableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1473
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1474
+ });
1475
+ }); };
1476
+ var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1477
+ var contents, data, exception;
1478
+ return __generator(this, function (_a) {
1479
+ contents = map({});
1480
+ data = parsedOutput.body;
1481
+ if (data.message != null) {
1482
+ contents.message = __expectString(data.message);
1483
+ }
1484
+ exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1485
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1486
+ });
1487
+ }); };
1488
+ var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1489
+ var contents, data, exception;
1490
+ return __generator(this, function (_a) {
1491
+ contents = map({});
1492
+ data = parsedOutput.body;
1493
+ if (data.message != null) {
1494
+ contents.message = __expectString(data.message);
1495
+ }
1496
+ exception = new UnauthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1497
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
1498
+ });
1499
+ }); };
1500
+ var serializeAws_restJson1__listOf__string = function (input, context) {
1101
1501
  return input
1102
- .filter((e) => e != null)
1103
- .map((entry) => {
1502
+ .filter(function (e) { return e != null; })
1503
+ .map(function (entry) {
1104
1504
  return entry;
1105
1505
  });
1106
1506
  };
1107
- const serializeAws_restJson1__listOfPlugin = (input, context) => {
1507
+ var serializeAws_restJson1__listOfPlugin = function (input, context) {
1108
1508
  return input
1109
- .filter((e) => e != null)
1110
- .map((entry) => {
1509
+ .filter(function (e) { return e != null; })
1510
+ .map(function (entry) {
1111
1511
  return serializeAws_restJson1Plugin(entry, context);
1112
1512
  });
1113
1513
  };
1114
- const serializeAws_restJson1__sensitive__mapOf__string = (input, context) => {
1115
- return Object.entries(input).reduce((acc, [key, value]) => {
1514
+ var serializeAws_restJson1__sensitive__mapOf__string = function (input, context) {
1515
+ return Object.entries(input).reduce(function (acc, _a) {
1516
+ var _b;
1517
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1116
1518
  if (value === null) {
1117
1519
  return acc;
1118
1520
  }
1119
- return {
1120
- ...acc,
1121
- [key]: value,
1122
- };
1521
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1123
1522
  }, {});
1124
1523
  };
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
- };
1524
+ var serializeAws_restJson1ApacheKafkaCluster = function (input, context) {
1525
+ return __assign(__assign({}, (input.bootstrapServers != null && { bootstrapServers: input.bootstrapServers })), (input.vpc != null && { vpc: serializeAws_restJson1Vpc(input.vpc, context) }));
1130
1526
  };
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
- };
1527
+ var serializeAws_restJson1AutoScaling = function (input, context) {
1528
+ return __assign(__assign(__assign(__assign(__assign({}, (input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount })), (input.mcuCount != null && { mcuCount: input.mcuCount })), (input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount })), (input.scaleInPolicy != null && {
1529
+ scaleInPolicy: serializeAws_restJson1ScaleInPolicy(input.scaleInPolicy, context),
1530
+ })), (input.scaleOutPolicy != null && {
1531
+ scaleOutPolicy: serializeAws_restJson1ScaleOutPolicy(input.scaleOutPolicy, context),
1532
+ }));
1143
1533
  };
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
- };
1534
+ var serializeAws_restJson1AutoScalingUpdate = function (input, context) {
1535
+ return __assign(__assign(__assign(__assign(__assign({}, (input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount })), (input.mcuCount != null && { mcuCount: input.mcuCount })), (input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount })), (input.scaleInPolicy != null && {
1536
+ scaleInPolicy: serializeAws_restJson1ScaleInPolicyUpdate(input.scaleInPolicy, context),
1537
+ })), (input.scaleOutPolicy != null && {
1538
+ scaleOutPolicy: serializeAws_restJson1ScaleOutPolicyUpdate(input.scaleOutPolicy, context),
1539
+ }));
1156
1540
  };
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
- };
1541
+ var serializeAws_restJson1Capacity = function (input, context) {
1542
+ return __assign(__assign({}, (input.autoScaling != null && { autoScaling: serializeAws_restJson1AutoScaling(input.autoScaling, context) })), (input.provisionedCapacity != null && {
1543
+ provisionedCapacity: serializeAws_restJson1ProvisionedCapacity(input.provisionedCapacity, context),
1544
+ }));
1164
1545
  };
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
- };
1546
+ var serializeAws_restJson1CapacityUpdate = function (input, context) {
1547
+ return __assign(__assign({}, (input.autoScaling != null && {
1548
+ autoScaling: serializeAws_restJson1AutoScalingUpdate(input.autoScaling, context),
1549
+ })), (input.provisionedCapacity != null && {
1550
+ provisionedCapacity: serializeAws_restJson1ProvisionedCapacityUpdate(input.provisionedCapacity, context),
1551
+ }));
1174
1552
  };
1175
- const serializeAws_restJson1CloudWatchLogsLogDelivery = (input, context) => {
1176
- return {
1177
- ...(input.enabled != null && { enabled: input.enabled }),
1178
- ...(input.logGroup != null && { logGroup: input.logGroup }),
1179
- };
1553
+ var serializeAws_restJson1CloudWatchLogsLogDelivery = function (input, context) {
1554
+ return __assign(__assign({}, (input.enabled != null && { enabled: input.enabled })), (input.logGroup != null && { logGroup: input.logGroup }));
1180
1555
  };
1181
- const serializeAws_restJson1CustomPlugin = (input, context) => {
1182
- return {
1183
- ...(input.customPluginArn != null && { customPluginArn: input.customPluginArn }),
1184
- ...(input.revision != null && { revision: input.revision }),
1185
- };
1556
+ var serializeAws_restJson1CustomPlugin = function (input, context) {
1557
+ return __assign(__assign({}, (input.customPluginArn != null && { customPluginArn: input.customPluginArn })), (input.revision != null && { revision: input.revision }));
1186
1558
  };
1187
- const serializeAws_restJson1CustomPluginLocation = (input, context) => {
1188
- return {
1189
- ...(input.s3Location != null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }),
1190
- };
1559
+ var serializeAws_restJson1CustomPluginLocation = function (input, context) {
1560
+ return __assign({}, (input.s3Location != null && { s3Location: serializeAws_restJson1S3Location(input.s3Location, context) }));
1191
1561
  };
1192
- const serializeAws_restJson1FirehoseLogDelivery = (input, context) => {
1193
- return {
1194
- ...(input.deliveryStream != null && { deliveryStream: input.deliveryStream }),
1195
- ...(input.enabled != null && { enabled: input.enabled }),
1196
- };
1562
+ var serializeAws_restJson1FirehoseLogDelivery = function (input, context) {
1563
+ return __assign(__assign({}, (input.deliveryStream != null && { deliveryStream: input.deliveryStream })), (input.enabled != null && { enabled: input.enabled }));
1197
1564
  };
1198
- const serializeAws_restJson1KafkaCluster = (input, context) => {
1199
- return {
1200
- ...(input.apacheKafkaCluster != null && {
1201
- apacheKafkaCluster: serializeAws_restJson1ApacheKafkaCluster(input.apacheKafkaCluster, context),
1202
- }),
1203
- };
1565
+ var serializeAws_restJson1KafkaCluster = function (input, context) {
1566
+ return __assign({}, (input.apacheKafkaCluster != null && {
1567
+ apacheKafkaCluster: serializeAws_restJson1ApacheKafkaCluster(input.apacheKafkaCluster, context),
1568
+ }));
1204
1569
  };
1205
- const serializeAws_restJson1KafkaClusterClientAuthentication = (input, context) => {
1206
- return {
1207
- ...(input.authenticationType != null && { authenticationType: input.authenticationType }),
1208
- };
1570
+ var serializeAws_restJson1KafkaClusterClientAuthentication = function (input, context) {
1571
+ return __assign({}, (input.authenticationType != null && { authenticationType: input.authenticationType }));
1209
1572
  };
1210
- const serializeAws_restJson1KafkaClusterEncryptionInTransit = (input, context) => {
1211
- return {
1212
- ...(input.encryptionType != null && { encryptionType: input.encryptionType }),
1213
- };
1573
+ var serializeAws_restJson1KafkaClusterEncryptionInTransit = function (input, context) {
1574
+ return __assign({}, (input.encryptionType != null && { encryptionType: input.encryptionType }));
1214
1575
  };
1215
- const serializeAws_restJson1LogDelivery = (input, context) => {
1216
- return {
1217
- ...(input.workerLogDelivery != null && {
1218
- workerLogDelivery: serializeAws_restJson1WorkerLogDelivery(input.workerLogDelivery, context),
1219
- }),
1220
- };
1576
+ var serializeAws_restJson1LogDelivery = function (input, context) {
1577
+ return __assign({}, (input.workerLogDelivery != null && {
1578
+ workerLogDelivery: serializeAws_restJson1WorkerLogDelivery(input.workerLogDelivery, context),
1579
+ }));
1221
1580
  };
1222
- const serializeAws_restJson1Plugin = (input, context) => {
1223
- return {
1224
- ...(input.customPlugin != null && {
1225
- customPlugin: serializeAws_restJson1CustomPlugin(input.customPlugin, context),
1226
- }),
1227
- };
1581
+ var serializeAws_restJson1Plugin = function (input, context) {
1582
+ return __assign({}, (input.customPlugin != null && {
1583
+ customPlugin: serializeAws_restJson1CustomPlugin(input.customPlugin, context),
1584
+ }));
1228
1585
  };
1229
- const serializeAws_restJson1ProvisionedCapacity = (input, context) => {
1230
- return {
1231
- ...(input.mcuCount != null && { mcuCount: input.mcuCount }),
1232
- ...(input.workerCount != null && { workerCount: input.workerCount }),
1233
- };
1586
+ var serializeAws_restJson1ProvisionedCapacity = function (input, context) {
1587
+ return __assign(__assign({}, (input.mcuCount != null && { mcuCount: input.mcuCount })), (input.workerCount != null && { workerCount: input.workerCount }));
1234
1588
  };
1235
- const serializeAws_restJson1ProvisionedCapacityUpdate = (input, context) => {
1236
- return {
1237
- ...(input.mcuCount != null && { mcuCount: input.mcuCount }),
1238
- ...(input.workerCount != null && { workerCount: input.workerCount }),
1239
- };
1589
+ var serializeAws_restJson1ProvisionedCapacityUpdate = function (input, context) {
1590
+ return __assign(__assign({}, (input.mcuCount != null && { mcuCount: input.mcuCount })), (input.workerCount != null && { workerCount: input.workerCount }));
1240
1591
  };
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
- };
1592
+ var serializeAws_restJson1S3Location = function (input, context) {
1593
+ return __assign(__assign(__assign({}, (input.bucketArn != null && { bucketArn: input.bucketArn })), (input.fileKey != null && { fileKey: input.fileKey })), (input.objectVersion != null && { objectVersion: input.objectVersion }));
1247
1594
  };
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
- };
1595
+ var serializeAws_restJson1S3LogDelivery = function (input, context) {
1596
+ return __assign(__assign(__assign({}, (input.bucket != null && { bucket: input.bucket })), (input.enabled != null && { enabled: input.enabled })), (input.prefix != null && { prefix: input.prefix }));
1254
1597
  };
1255
- const serializeAws_restJson1ScaleInPolicy = (input, context) => {
1256
- return {
1257
- ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
1258
- };
1598
+ var serializeAws_restJson1ScaleInPolicy = function (input, context) {
1599
+ return __assign({}, (input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }));
1259
1600
  };
1260
- const serializeAws_restJson1ScaleInPolicyUpdate = (input, context) => {
1261
- return {
1262
- ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
1263
- };
1601
+ var serializeAws_restJson1ScaleInPolicyUpdate = function (input, context) {
1602
+ return __assign({}, (input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }));
1264
1603
  };
1265
- const serializeAws_restJson1ScaleOutPolicy = (input, context) => {
1266
- return {
1267
- ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
1268
- };
1604
+ var serializeAws_restJson1ScaleOutPolicy = function (input, context) {
1605
+ return __assign({}, (input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }));
1269
1606
  };
1270
- const serializeAws_restJson1ScaleOutPolicyUpdate = (input, context) => {
1271
- return {
1272
- ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }),
1273
- };
1607
+ var serializeAws_restJson1ScaleOutPolicyUpdate = function (input, context) {
1608
+ return __assign({}, (input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }));
1274
1609
  };
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
- };
1610
+ var serializeAws_restJson1Vpc = function (input, context) {
1611
+ return __assign(__assign({}, (input.securityGroups != null && {
1612
+ securityGroups: serializeAws_restJson1__listOf__string(input.securityGroups, context),
1613
+ })), (input.subnets != null && { subnets: serializeAws_restJson1__listOf__string(input.subnets, context) }));
1282
1614
  };
1283
- const serializeAws_restJson1WorkerConfiguration = (input, context) => {
1284
- return {
1285
- ...(input.revision != null && { revision: input.revision }),
1286
- ...(input.workerConfigurationArn != null && { workerConfigurationArn: input.workerConfigurationArn }),
1287
- };
1615
+ var serializeAws_restJson1WorkerConfiguration = function (input, context) {
1616
+ return __assign(__assign({}, (input.revision != null && { revision: input.revision })), (input.workerConfigurationArn != null && { workerConfigurationArn: input.workerConfigurationArn }));
1288
1617
  };
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
- };
1618
+ var serializeAws_restJson1WorkerLogDelivery = function (input, context) {
1619
+ return __assign(__assign(__assign({}, (input.cloudWatchLogs != null && {
1620
+ cloudWatchLogs: serializeAws_restJson1CloudWatchLogsLogDelivery(input.cloudWatchLogs, context),
1621
+ })), (input.firehose != null && { firehose: serializeAws_restJson1FirehoseLogDelivery(input.firehose, context) })), (input.s3 != null && { s3: serializeAws_restJson1S3LogDelivery(input.s3, context) }));
1297
1622
  };
1298
- const deserializeAws_restJson1__listOf__string = (output, context) => {
1299
- const retVal = (output || [])
1300
- .filter((e) => e != null)
1301
- .map((entry) => {
1623
+ var deserializeAws_restJson1__listOf__string = function (output, context) {
1624
+ var retVal = (output || [])
1625
+ .filter(function (e) { return e != null; })
1626
+ .map(function (entry) {
1302
1627
  if (entry === null) {
1303
1628
  return null;
1304
1629
  }
@@ -1306,10 +1631,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
1306
1631
  });
1307
1632
  return retVal;
1308
1633
  };
1309
- const deserializeAws_restJson1__listOfConnectorSummary = (output, context) => {
1310
- const retVal = (output || [])
1311
- .filter((e) => e != null)
1312
- .map((entry) => {
1634
+ var deserializeAws_restJson1__listOfConnectorSummary = function (output, context) {
1635
+ var retVal = (output || [])
1636
+ .filter(function (e) { return e != null; })
1637
+ .map(function (entry) {
1313
1638
  if (entry === null) {
1314
1639
  return null;
1315
1640
  }
@@ -1317,10 +1642,10 @@ const deserializeAws_restJson1__listOfConnectorSummary = (output, context) => {
1317
1642
  });
1318
1643
  return retVal;
1319
1644
  };
1320
- const deserializeAws_restJson1__listOfCustomPluginSummary = (output, context) => {
1321
- const retVal = (output || [])
1322
- .filter((e) => e != null)
1323
- .map((entry) => {
1645
+ var deserializeAws_restJson1__listOfCustomPluginSummary = function (output, context) {
1646
+ var retVal = (output || [])
1647
+ .filter(function (e) { return e != null; })
1648
+ .map(function (entry) {
1324
1649
  if (entry === null) {
1325
1650
  return null;
1326
1651
  }
@@ -1328,10 +1653,10 @@ const deserializeAws_restJson1__listOfCustomPluginSummary = (output, context) =>
1328
1653
  });
1329
1654
  return retVal;
1330
1655
  };
1331
- const deserializeAws_restJson1__listOfPluginDescription = (output, context) => {
1332
- const retVal = (output || [])
1333
- .filter((e) => e != null)
1334
- .map((entry) => {
1656
+ var deserializeAws_restJson1__listOfPluginDescription = function (output, context) {
1657
+ var retVal = (output || [])
1658
+ .filter(function (e) { return e != null; })
1659
+ .map(function (entry) {
1335
1660
  if (entry === null) {
1336
1661
  return null;
1337
1662
  }
@@ -1339,10 +1664,10 @@ const deserializeAws_restJson1__listOfPluginDescription = (output, context) => {
1339
1664
  });
1340
1665
  return retVal;
1341
1666
  };
1342
- const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (output, context) => {
1343
- const retVal = (output || [])
1344
- .filter((e) => e != null)
1345
- .map((entry) => {
1667
+ var deserializeAws_restJson1__listOfWorkerConfigurationSummary = function (output, context) {
1668
+ var retVal = (output || [])
1669
+ .filter(function (e) { return e != null; })
1670
+ .map(function (entry) {
1346
1671
  if (entry === null) {
1347
1672
  return null;
1348
1673
  }
@@ -1350,24 +1675,23 @@ const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (output, cont
1350
1675
  });
1351
1676
  return retVal;
1352
1677
  };
1353
- const deserializeAws_restJson1__sensitive__mapOf__string = (output, context) => {
1354
- return Object.entries(output).reduce((acc, [key, value]) => {
1678
+ var deserializeAws_restJson1__sensitive__mapOf__string = function (output, context) {
1679
+ return Object.entries(output).reduce(function (acc, _a) {
1680
+ var _b;
1681
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
1355
1682
  if (value === null) {
1356
1683
  return acc;
1357
1684
  }
1358
- return {
1359
- ...acc,
1360
- [key]: __expectString(value),
1361
- };
1685
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1362
1686
  }, {});
1363
1687
  };
1364
- const deserializeAws_restJson1ApacheKafkaClusterDescription = (output, context) => {
1688
+ var deserializeAws_restJson1ApacheKafkaClusterDescription = function (output, context) {
1365
1689
  return {
1366
1690
  bootstrapServers: __expectString(output.bootstrapServers),
1367
1691
  vpc: output.vpc != null ? deserializeAws_restJson1VpcDescription(output.vpc, context) : undefined,
1368
1692
  };
1369
1693
  };
1370
- const deserializeAws_restJson1AutoScalingDescription = (output, context) => {
1694
+ var deserializeAws_restJson1AutoScalingDescription = function (output, context) {
1371
1695
  return {
1372
1696
  maxWorkerCount: __expectInt32(output.maxWorkerCount),
1373
1697
  mcuCount: __expectInt32(output.mcuCount),
@@ -1380,7 +1704,7 @@ const deserializeAws_restJson1AutoScalingDescription = (output, context) => {
1380
1704
  : undefined,
1381
1705
  };
1382
1706
  };
1383
- const deserializeAws_restJson1CapacityDescription = (output, context) => {
1707
+ var deserializeAws_restJson1CapacityDescription = function (output, context) {
1384
1708
  return {
1385
1709
  autoScaling: output.autoScaling != null
1386
1710
  ? deserializeAws_restJson1AutoScalingDescription(output.autoScaling, context)
@@ -1390,13 +1714,13 @@ const deserializeAws_restJson1CapacityDescription = (output, context) => {
1390
1714
  : undefined,
1391
1715
  };
1392
1716
  };
1393
- const deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription = (output, context) => {
1717
+ var deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription = function (output, context) {
1394
1718
  return {
1395
1719
  enabled: __expectBoolean(output.enabled),
1396
1720
  logGroup: __expectString(output.logGroup),
1397
1721
  };
1398
1722
  };
1399
- const deserializeAws_restJson1ConnectorSummary = (output, context) => {
1723
+ var deserializeAws_restJson1ConnectorSummary = function (output, context) {
1400
1724
  return {
1401
1725
  capacity: output.capacity != null ? deserializeAws_restJson1CapacityDescription(output.capacity, context) : undefined,
1402
1726
  connectorArn: __expectString(output.connectorArn),
@@ -1425,24 +1749,24 @@ const deserializeAws_restJson1ConnectorSummary = (output, context) => {
1425
1749
  : undefined,
1426
1750
  };
1427
1751
  };
1428
- const deserializeAws_restJson1CustomPluginDescription = (output, context) => {
1752
+ var deserializeAws_restJson1CustomPluginDescription = function (output, context) {
1429
1753
  return {
1430
1754
  customPluginArn: __expectString(output.customPluginArn),
1431
1755
  revision: __expectLong(output.revision),
1432
1756
  };
1433
1757
  };
1434
- const deserializeAws_restJson1CustomPluginFileDescription = (output, context) => {
1758
+ var deserializeAws_restJson1CustomPluginFileDescription = function (output, context) {
1435
1759
  return {
1436
1760
  fileMd5: __expectString(output.fileMd5),
1437
1761
  fileSize: __expectLong(output.fileSize),
1438
1762
  };
1439
1763
  };
1440
- const deserializeAws_restJson1CustomPluginLocationDescription = (output, context) => {
1764
+ var deserializeAws_restJson1CustomPluginLocationDescription = function (output, context) {
1441
1765
  return {
1442
1766
  s3Location: output.s3Location != null ? deserializeAws_restJson1S3LocationDescription(output.s3Location, context) : undefined,
1443
1767
  };
1444
1768
  };
1445
- const deserializeAws_restJson1CustomPluginRevisionSummary = (output, context) => {
1769
+ var deserializeAws_restJson1CustomPluginRevisionSummary = function (output, context) {
1446
1770
  return {
1447
1771
  contentType: __expectString(output.contentType),
1448
1772
  creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
@@ -1456,7 +1780,7 @@ const deserializeAws_restJson1CustomPluginRevisionSummary = (output, context) =>
1456
1780
  revision: __expectLong(output.revision),
1457
1781
  };
1458
1782
  };
1459
- const deserializeAws_restJson1CustomPluginSummary = (output, context) => {
1783
+ var deserializeAws_restJson1CustomPluginSummary = function (output, context) {
1460
1784
  return {
1461
1785
  creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
1462
1786
  customPluginArn: __expectString(output.customPluginArn),
@@ -1468,80 +1792,80 @@ const deserializeAws_restJson1CustomPluginSummary = (output, context) => {
1468
1792
  name: __expectString(output.name),
1469
1793
  };
1470
1794
  };
1471
- const deserializeAws_restJson1FirehoseLogDeliveryDescription = (output, context) => {
1795
+ var deserializeAws_restJson1FirehoseLogDeliveryDescription = function (output, context) {
1472
1796
  return {
1473
1797
  deliveryStream: __expectString(output.deliveryStream),
1474
1798
  enabled: __expectBoolean(output.enabled),
1475
1799
  };
1476
1800
  };
1477
- const deserializeAws_restJson1KafkaClusterClientAuthenticationDescription = (output, context) => {
1801
+ var deserializeAws_restJson1KafkaClusterClientAuthenticationDescription = function (output, context) {
1478
1802
  return {
1479
1803
  authenticationType: __expectString(output.authenticationType),
1480
1804
  };
1481
1805
  };
1482
- const deserializeAws_restJson1KafkaClusterDescription = (output, context) => {
1806
+ var deserializeAws_restJson1KafkaClusterDescription = function (output, context) {
1483
1807
  return {
1484
1808
  apacheKafkaCluster: output.apacheKafkaCluster != null
1485
1809
  ? deserializeAws_restJson1ApacheKafkaClusterDescription(output.apacheKafkaCluster, context)
1486
1810
  : undefined,
1487
1811
  };
1488
1812
  };
1489
- const deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription = (output, context) => {
1813
+ var deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription = function (output, context) {
1490
1814
  return {
1491
1815
  encryptionType: __expectString(output.encryptionType),
1492
1816
  };
1493
1817
  };
1494
- const deserializeAws_restJson1LogDeliveryDescription = (output, context) => {
1818
+ var deserializeAws_restJson1LogDeliveryDescription = function (output, context) {
1495
1819
  return {
1496
1820
  workerLogDelivery: output.workerLogDelivery != null
1497
1821
  ? deserializeAws_restJson1WorkerLogDeliveryDescription(output.workerLogDelivery, context)
1498
1822
  : undefined,
1499
1823
  };
1500
1824
  };
1501
- const deserializeAws_restJson1PluginDescription = (output, context) => {
1825
+ var deserializeAws_restJson1PluginDescription = function (output, context) {
1502
1826
  return {
1503
1827
  customPlugin: output.customPlugin != null
1504
1828
  ? deserializeAws_restJson1CustomPluginDescription(output.customPlugin, context)
1505
1829
  : undefined,
1506
1830
  };
1507
1831
  };
1508
- const deserializeAws_restJson1ProvisionedCapacityDescription = (output, context) => {
1832
+ var deserializeAws_restJson1ProvisionedCapacityDescription = function (output, context) {
1509
1833
  return {
1510
1834
  mcuCount: __expectInt32(output.mcuCount),
1511
1835
  workerCount: __expectInt32(output.workerCount),
1512
1836
  };
1513
1837
  };
1514
- const deserializeAws_restJson1S3LocationDescription = (output, context) => {
1838
+ var deserializeAws_restJson1S3LocationDescription = function (output, context) {
1515
1839
  return {
1516
1840
  bucketArn: __expectString(output.bucketArn),
1517
1841
  fileKey: __expectString(output.fileKey),
1518
1842
  objectVersion: __expectString(output.objectVersion),
1519
1843
  };
1520
1844
  };
1521
- const deserializeAws_restJson1S3LogDeliveryDescription = (output, context) => {
1845
+ var deserializeAws_restJson1S3LogDeliveryDescription = function (output, context) {
1522
1846
  return {
1523
1847
  bucket: __expectString(output.bucket),
1524
1848
  enabled: __expectBoolean(output.enabled),
1525
1849
  prefix: __expectString(output.prefix),
1526
1850
  };
1527
1851
  };
1528
- const deserializeAws_restJson1ScaleInPolicyDescription = (output, context) => {
1852
+ var deserializeAws_restJson1ScaleInPolicyDescription = function (output, context) {
1529
1853
  return {
1530
1854
  cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
1531
1855
  };
1532
1856
  };
1533
- const deserializeAws_restJson1ScaleOutPolicyDescription = (output, context) => {
1857
+ var deserializeAws_restJson1ScaleOutPolicyDescription = function (output, context) {
1534
1858
  return {
1535
1859
  cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage),
1536
1860
  };
1537
1861
  };
1538
- const deserializeAws_restJson1StateDescription = (output, context) => {
1862
+ var deserializeAws_restJson1StateDescription = function (output, context) {
1539
1863
  return {
1540
1864
  code: __expectString(output.code),
1541
1865
  message: __expectString(output.message),
1542
1866
  };
1543
1867
  };
1544
- const deserializeAws_restJson1VpcDescription = (output, context) => {
1868
+ var deserializeAws_restJson1VpcDescription = function (output, context) {
1545
1869
  return {
1546
1870
  securityGroups: output.securityGroups != null
1547
1871
  ? deserializeAws_restJson1__listOf__string(output.securityGroups, context)
@@ -1549,13 +1873,13 @@ const deserializeAws_restJson1VpcDescription = (output, context) => {
1549
1873
  subnets: output.subnets != null ? deserializeAws_restJson1__listOf__string(output.subnets, context) : undefined,
1550
1874
  };
1551
1875
  };
1552
- const deserializeAws_restJson1WorkerConfigurationDescription = (output, context) => {
1876
+ var deserializeAws_restJson1WorkerConfigurationDescription = function (output, context) {
1553
1877
  return {
1554
1878
  revision: __expectLong(output.revision),
1555
1879
  workerConfigurationArn: __expectString(output.workerConfigurationArn),
1556
1880
  };
1557
1881
  };
1558
- const deserializeAws_restJson1WorkerConfigurationRevisionDescription = (output, context) => {
1882
+ var deserializeAws_restJson1WorkerConfigurationRevisionDescription = function (output, context) {
1559
1883
  return {
1560
1884
  creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
1561
1885
  description: __expectString(output.description),
@@ -1563,14 +1887,14 @@ const deserializeAws_restJson1WorkerConfigurationRevisionDescription = (output,
1563
1887
  revision: __expectLong(output.revision),
1564
1888
  };
1565
1889
  };
1566
- const deserializeAws_restJson1WorkerConfigurationRevisionSummary = (output, context) => {
1890
+ var deserializeAws_restJson1WorkerConfigurationRevisionSummary = function (output, context) {
1567
1891
  return {
1568
1892
  creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
1569
1893
  description: __expectString(output.description),
1570
1894
  revision: __expectLong(output.revision),
1571
1895
  };
1572
1896
  };
1573
- const deserializeAws_restJson1WorkerConfigurationSummary = (output, context) => {
1897
+ var deserializeAws_restJson1WorkerConfigurationSummary = function (output, context) {
1574
1898
  return {
1575
1899
  creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
1576
1900
  description: __expectString(output.description),
@@ -1581,7 +1905,7 @@ const deserializeAws_restJson1WorkerConfigurationSummary = (output, context) =>
1581
1905
  workerConfigurationArn: __expectString(output.workerConfigurationArn),
1582
1906
  };
1583
1907
  };
1584
- const deserializeAws_restJson1WorkerLogDeliveryDescription = (output, context) => {
1908
+ var deserializeAws_restJson1WorkerLogDeliveryDescription = function (output, context) {
1585
1909
  return {
1586
1910
  cloudWatchLogs: output.cloudWatchLogs != null
1587
1911
  ? deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription(output.cloudWatchLogs, context)
@@ -1592,39 +1916,57 @@ const deserializeAws_restJson1WorkerLogDeliveryDescription = (output, context) =
1592
1916
  s3: output.s3 != null ? deserializeAws_restJson1S3LogDeliveryDescription(output.s3, context) : undefined,
1593
1917
  };
1594
1918
  };
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) => {
1919
+ var deserializeMetadata = function (output) {
1920
+ var _a, _b;
1921
+ return ({
1922
+ httpStatusCode: output.statusCode,
1923
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
1924
+ extendedRequestId: output.headers["x-amz-id-2"],
1925
+ cfId: output.headers["x-amz-cf-id"],
1926
+ });
1927
+ };
1928
+ var collectBody = function (streamBody, context) {
1929
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1602
1930
  if (streamBody instanceof Uint8Array) {
1603
1931
  return Promise.resolve(streamBody);
1604
1932
  }
1605
1933
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1606
1934
  };
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;
1935
+ var collectBodyString = function (streamBody, context) {
1936
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1937
+ };
1938
+ var isSerializableHeaderValue = function (value) {
1939
+ return value !== undefined &&
1940
+ value !== null &&
1941
+ value !== "" &&
1942
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1943
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1944
+ };
1945
+ var parseBody = function (streamBody, context) {
1946
+ return collectBodyString(streamBody, context).then(function (encoded) {
1947
+ if (encoded.length) {
1948
+ return JSON.parse(encoded);
1949
+ }
1950
+ return {};
1951
+ });
1952
+ };
1953
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1954
+ var value;
1955
+ var _a;
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;
1628
1970
  if (typeof cleanValue === "number") {
1629
1971
  cleanValue = cleanValue.toString();
1630
1972
  }
@@ -1639,7 +1981,7 @@ const loadRestJsonErrorCode = (output, data) => {
1639
1981
  }
1640
1982
  return cleanValue;
1641
1983
  };
1642
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1984
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1643
1985
  if (headerKey !== undefined) {
1644
1986
  return sanitizeErrorCode(output.headers[headerKey]);
1645
1987
  }