@aws-sdk/client-appintegrations 3.185.0 → 3.188.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 (27) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist-es/AppIntegrations.js +62 -69
  3. package/dist-es/AppIntegrationsClient.js +22 -28
  4. package/dist-es/commands/CreateDataIntegrationCommand.js +21 -28
  5. package/dist-es/commands/CreateEventIntegrationCommand.js +21 -28
  6. package/dist-es/commands/DeleteDataIntegrationCommand.js +21 -28
  7. package/dist-es/commands/DeleteEventIntegrationCommand.js +21 -28
  8. package/dist-es/commands/GetDataIntegrationCommand.js +21 -28
  9. package/dist-es/commands/GetEventIntegrationCommand.js +21 -28
  10. package/dist-es/commands/ListDataIntegrationAssociationsCommand.js +21 -28
  11. package/dist-es/commands/ListDataIntegrationsCommand.js +21 -28
  12. package/dist-es/commands/ListEventIntegrationAssociationsCommand.js +21 -28
  13. package/dist-es/commands/ListEventIntegrationsCommand.js +21 -28
  14. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  15. package/dist-es/commands/TagResourceCommand.js +21 -28
  16. package/dist-es/commands/UntagResourceCommand.js +21 -28
  17. package/dist-es/commands/UpdateDataIntegrationCommand.js +21 -28
  18. package/dist-es/commands/UpdateEventIntegrationCommand.js +21 -28
  19. package/dist-es/endpoints.js +8 -8
  20. package/dist-es/models/AppIntegrationsServiceException.js +5 -10
  21. package/dist-es/models/models_0.js +192 -121
  22. package/dist-es/protocols/Aws_restJson1.js +1138 -1608
  23. package/dist-es/runtimeConfig.browser.js +26 -12
  24. package/dist-es/runtimeConfig.js +30 -12
  25. package/dist-es/runtimeConfig.native.js +8 -5
  26. package/dist-es/runtimeConfig.shared.js +8 -11
  27. package/package.json +33 -33
@@ -1,1606 +1,1153 @@
1
- import { __assign, __awaiter, __generator, __read } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { v4 as generateIdempotencyToken } from "uuid";
5
4
  import { AppIntegrationsServiceException as __BaseException } from "../models/AppIntegrationsServiceException";
6
5
  import { AccessDeniedException, DuplicateResourceException, InternalServiceError, InvalidRequestException, ResourceNotFoundException, ResourceQuotaExceededException, ThrottlingException, } from "../models/models_0";
7
- export var serializeAws_restJson1CreateDataIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
9
- var _c;
10
- return __generator(this, function (_d) {
11
- switch (_d.label) {
12
- case 0: return [4, context.endpoint()];
13
- case 1:
14
- _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
15
- headers = {
16
- "content-type": "application/json",
17
- };
18
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/dataIntegrations";
19
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.KmsKey != null && { KmsKey: input.KmsKey })), (input.Name != null && { Name: input.Name })), (input.ScheduleConfig != null && {
20
- ScheduleConfig: serializeAws_restJson1ScheduleConfiguration(input.ScheduleConfig, context),
21
- })), (input.SourceURI != null && { SourceURI: input.SourceURI })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
22
- return [2, new __HttpRequest({
23
- protocol: protocol,
24
- hostname: hostname,
25
- port: port,
26
- method: "POST",
27
- headers: headers,
28
- path: resolvedPath,
29
- body: body,
30
- })];
31
- }
32
- });
33
- }); };
34
- export var serializeAws_restJson1CreateEventIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
35
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
36
- var _c;
37
- return __generator(this, function (_d) {
38
- switch (_d.label) {
39
- case 0: return [4, context.endpoint()];
40
- case 1:
41
- _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
42
- headers = {
43
- "content-type": "application/json",
44
- };
45
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/eventIntegrations";
46
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.EventBridgeBus != null && { EventBridgeBus: input.EventBridgeBus })), (input.EventFilter != null && { EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context) })), (input.Name != null && { Name: input.Name })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
47
- return [2, new __HttpRequest({
48
- protocol: protocol,
49
- hostname: hostname,
50
- port: port,
51
- method: "POST",
52
- headers: headers,
53
- path: resolvedPath,
54
- body: body,
55
- })];
56
- }
57
- });
58
- }); };
59
- export var serializeAws_restJson1DeleteDataIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
60
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
61
- return __generator(this, function (_c) {
62
- switch (_c.label) {
63
- case 0: return [4, context.endpoint()];
64
- case 1:
65
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
66
- headers = {};
67
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
68
- "/dataIntegrations/{DataIntegrationIdentifier}";
69
- resolvedPath = __resolvedPath(resolvedPath, input, "DataIntegrationIdentifier", function () { return input.DataIntegrationIdentifier; }, "{DataIntegrationIdentifier}", false);
70
- return [2, new __HttpRequest({
71
- protocol: protocol,
72
- hostname: hostname,
73
- port: port,
74
- method: "DELETE",
75
- headers: headers,
76
- path: resolvedPath,
77
- body: body,
78
- })];
79
- }
80
- });
81
- }); };
82
- export var serializeAws_restJson1DeleteEventIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
83
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
84
- return __generator(this, function (_c) {
85
- switch (_c.label) {
86
- case 0: return [4, context.endpoint()];
87
- case 1:
88
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
89
- headers = {};
90
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/eventIntegrations/{Name}";
91
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
92
- return [2, new __HttpRequest({
93
- protocol: protocol,
94
- hostname: hostname,
95
- port: port,
96
- method: "DELETE",
97
- headers: headers,
98
- path: resolvedPath,
99
- body: body,
100
- })];
101
- }
6
+ export const serializeAws_restJson1CreateDataIntegrationCommand = async (input, context) => {
7
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const headers = {
9
+ "content-type": "application/json",
10
+ };
11
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations";
12
+ let body;
13
+ body = JSON.stringify({
14
+ ClientToken: input.ClientToken ?? generateIdempotencyToken(),
15
+ ...(input.Description != null && { Description: input.Description }),
16
+ ...(input.KmsKey != null && { KmsKey: input.KmsKey }),
17
+ ...(input.Name != null && { Name: input.Name }),
18
+ ...(input.ScheduleConfig != null && {
19
+ ScheduleConfig: serializeAws_restJson1ScheduleConfiguration(input.ScheduleConfig, context),
20
+ }),
21
+ ...(input.SourceURI != null && { SourceURI: input.SourceURI }),
22
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
102
23
  });
103
- }); };
104
- export var serializeAws_restJson1GetDataIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
105
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
106
- return __generator(this, function (_c) {
107
- switch (_c.label) {
108
- case 0: return [4, context.endpoint()];
109
- case 1:
110
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
111
- headers = {};
112
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/dataIntegrations/{Identifier}";
113
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", function () { return input.Identifier; }, "{Identifier}", false);
114
- return [2, new __HttpRequest({
115
- protocol: protocol,
116
- hostname: hostname,
117
- port: port,
118
- method: "GET",
119
- headers: headers,
120
- path: resolvedPath,
121
- body: body,
122
- })];
123
- }
24
+ return new __HttpRequest({
25
+ protocol,
26
+ hostname,
27
+ port,
28
+ method: "POST",
29
+ headers,
30
+ path: resolvedPath,
31
+ body,
124
32
  });
125
- }); };
126
- export var serializeAws_restJson1GetEventIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
127
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
128
- return __generator(this, function (_c) {
129
- switch (_c.label) {
130
- case 0: return [4, context.endpoint()];
131
- case 1:
132
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
133
- headers = {};
134
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/eventIntegrations/{Name}";
135
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
136
- return [2, new __HttpRequest({
137
- protocol: protocol,
138
- hostname: hostname,
139
- port: port,
140
- method: "GET",
141
- headers: headers,
142
- path: resolvedPath,
143
- body: body,
144
- })];
145
- }
33
+ };
34
+ export const serializeAws_restJson1CreateEventIntegrationCommand = async (input, context) => {
35
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
36
+ const headers = {
37
+ "content-type": "application/json",
38
+ };
39
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations";
40
+ let body;
41
+ body = JSON.stringify({
42
+ ClientToken: input.ClientToken ?? generateIdempotencyToken(),
43
+ ...(input.Description != null && { Description: input.Description }),
44
+ ...(input.EventBridgeBus != null && { EventBridgeBus: input.EventBridgeBus }),
45
+ ...(input.EventFilter != null && { EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context) }),
46
+ ...(input.Name != null && { Name: input.Name }),
47
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
146
48
  });
147
- }); };
148
- export var serializeAws_restJson1ListDataIntegrationAssociationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
149
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
150
- return __generator(this, function (_c) {
151
- switch (_c.label) {
152
- case 0: return [4, context.endpoint()];
153
- case 1:
154
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
155
- headers = {};
156
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
157
- "/dataIntegrations/{DataIntegrationIdentifier}/associations";
158
- resolvedPath = __resolvedPath(resolvedPath, input, "DataIntegrationIdentifier", function () { return input.DataIntegrationIdentifier; }, "{DataIntegrationIdentifier}", false);
159
- query = map({
160
- nextToken: [, input.NextToken],
161
- maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
162
- });
163
- return [2, new __HttpRequest({
164
- protocol: protocol,
165
- hostname: hostname,
166
- port: port,
167
- method: "GET",
168
- headers: headers,
169
- path: resolvedPath,
170
- query: query,
171
- body: body,
172
- })];
173
- }
49
+ return new __HttpRequest({
50
+ protocol,
51
+ hostname,
52
+ port,
53
+ method: "POST",
54
+ headers,
55
+ path: resolvedPath,
56
+ body,
174
57
  });
175
- }); };
176
- export var serializeAws_restJson1ListDataIntegrationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
177
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
178
- return __generator(this, function (_c) {
179
- switch (_c.label) {
180
- case 0: return [4, context.endpoint()];
181
- case 1:
182
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
183
- headers = {};
184
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/dataIntegrations";
185
- query = map({
186
- nextToken: [, input.NextToken],
187
- maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
188
- });
189
- return [2, new __HttpRequest({
190
- protocol: protocol,
191
- hostname: hostname,
192
- port: port,
193
- method: "GET",
194
- headers: headers,
195
- path: resolvedPath,
196
- query: query,
197
- body: body,
198
- })];
199
- }
200
- });
201
- }); };
202
- export var serializeAws_restJson1ListEventIntegrationAssociationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
203
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
204
- return __generator(this, function (_c) {
205
- switch (_c.label) {
206
- case 0: return [4, context.endpoint()];
207
- case 1:
208
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
209
- headers = {};
210
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
211
- "/eventIntegrations/{EventIntegrationName}/associations";
212
- resolvedPath = __resolvedPath(resolvedPath, input, "EventIntegrationName", function () { return input.EventIntegrationName; }, "{EventIntegrationName}", false);
213
- query = map({
214
- nextToken: [, input.NextToken],
215
- maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
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
- }
58
+ };
59
+ export const serializeAws_restJson1DeleteDataIntegrationCommand = async (input, context) => {
60
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const headers = {};
62
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
63
+ "/dataIntegrations/{DataIntegrationIdentifier}";
64
+ resolvedPath = __resolvedPath(resolvedPath, input, "DataIntegrationIdentifier", () => input.DataIntegrationIdentifier, "{DataIntegrationIdentifier}", false);
65
+ let body;
66
+ return new __HttpRequest({
67
+ protocol,
68
+ hostname,
69
+ port,
70
+ method: "DELETE",
71
+ headers,
72
+ path: resolvedPath,
73
+ body,
228
74
  });
229
- }); };
230
- export var serializeAws_restJson1ListEventIntegrationsCommand = 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 || "") + "/eventIntegrations";
239
- query = map({
240
- nextToken: [, input.NextToken],
241
- maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
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
- }
75
+ };
76
+ export const serializeAws_restJson1DeleteEventIntegrationCommand = async (input, context) => {
77
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const headers = {};
79
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations/{Name}";
80
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
81
+ let body;
82
+ return new __HttpRequest({
83
+ protocol,
84
+ hostname,
85
+ port,
86
+ method: "DELETE",
87
+ headers,
88
+ path: resolvedPath,
89
+ body,
254
90
  });
255
- }); };
256
- export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
257
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, 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 || "") + "/tags/{resourceArn}";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
266
- return [2, new __HttpRequest({
267
- protocol: protocol,
268
- hostname: hostname,
269
- port: port,
270
- method: "GET",
271
- headers: headers,
272
- path: resolvedPath,
273
- body: body,
274
- })];
275
- }
91
+ };
92
+ export const serializeAws_restJson1GetDataIntegrationCommand = async (input, context) => {
93
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const headers = {};
95
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations/{Identifier}";
96
+ resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
97
+ let body;
98
+ return new __HttpRequest({
99
+ protocol,
100
+ hostname,
101
+ port,
102
+ method: "GET",
103
+ headers,
104
+ path: resolvedPath,
105
+ body,
276
106
  });
277
- }); };
278
- export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
279
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
280
- return __generator(this, function (_c) {
281
- switch (_c.label) {
282
- case 0: return [4, context.endpoint()];
283
- case 1:
284
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
285
- headers = {
286
- "content-type": "application/json",
287
- };
288
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
289
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
290
- body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
291
- return [2, new __HttpRequest({
292
- protocol: protocol,
293
- hostname: hostname,
294
- port: port,
295
- method: "POST",
296
- headers: headers,
297
- path: resolvedPath,
298
- body: body,
299
- })];
300
- }
107
+ };
108
+ export const serializeAws_restJson1GetEventIntegrationCommand = async (input, context) => {
109
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const headers = {};
111
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations/{Name}";
112
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
113
+ let body;
114
+ return new __HttpRequest({
115
+ protocol,
116
+ hostname,
117
+ port,
118
+ method: "GET",
119
+ headers,
120
+ path: resolvedPath,
121
+ body,
301
122
  });
302
- }); };
303
- export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
304
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
305
- return __generator(this, function (_c) {
306
- switch (_c.label) {
307
- case 0: return [4, context.endpoint()];
308
- case 1:
309
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
310
- headers = {};
311
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
312
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
313
- query = map({
314
- tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
315
- });
316
- return [2, new __HttpRequest({
317
- protocol: protocol,
318
- hostname: hostname,
319
- port: port,
320
- method: "DELETE",
321
- headers: headers,
322
- path: resolvedPath,
323
- query: query,
324
- body: body,
325
- })];
326
- }
123
+ };
124
+ export const serializeAws_restJson1ListDataIntegrationAssociationsCommand = async (input, context) => {
125
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const headers = {};
127
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
128
+ "/dataIntegrations/{DataIntegrationIdentifier}/associations";
129
+ resolvedPath = __resolvedPath(resolvedPath, input, "DataIntegrationIdentifier", () => input.DataIntegrationIdentifier, "{DataIntegrationIdentifier}", false);
130
+ const query = map({
131
+ nextToken: [, input.NextToken],
132
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
327
133
  });
328
- }); };
329
- export var serializeAws_restJson1UpdateDataIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
330
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
331
- return __generator(this, function (_c) {
332
- switch (_c.label) {
333
- case 0: return [4, context.endpoint()];
334
- case 1:
335
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
336
- headers = {
337
- "content-type": "application/json",
338
- };
339
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/dataIntegrations/{Identifier}";
340
- resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", function () { return input.Identifier; }, "{Identifier}", false);
341
- body = JSON.stringify(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Name != null && { Name: input.Name })));
342
- return [2, new __HttpRequest({
343
- protocol: protocol,
344
- hostname: hostname,
345
- port: port,
346
- method: "PATCH",
347
- headers: headers,
348
- path: resolvedPath,
349
- body: body,
350
- })];
351
- }
134
+ let body;
135
+ return new __HttpRequest({
136
+ protocol,
137
+ hostname,
138
+ port,
139
+ method: "GET",
140
+ headers,
141
+ path: resolvedPath,
142
+ query,
143
+ body,
352
144
  });
353
- }); };
354
- export var serializeAws_restJson1UpdateEventIntegrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
355
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
356
- return __generator(this, function (_c) {
357
- switch (_c.label) {
358
- case 0: return [4, context.endpoint()];
359
- case 1:
360
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
361
- headers = {
362
- "content-type": "application/json",
363
- };
364
- resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/eventIntegrations/{Name}";
365
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
366
- body = JSON.stringify(__assign({}, (input.Description != null && { Description: input.Description })));
367
- return [2, new __HttpRequest({
368
- protocol: protocol,
369
- hostname: hostname,
370
- port: port,
371
- method: "PATCH",
372
- headers: headers,
373
- path: resolvedPath,
374
- body: body,
375
- })];
376
- }
377
- });
378
- }); };
379
- export var deserializeAws_restJson1CreateDataIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
380
- var contents, data, _a, _b;
381
- return __generator(this, function (_c) {
382
- switch (_c.label) {
383
- case 0:
384
- if (output.statusCode !== 200 && output.statusCode >= 300) {
385
- return [2, deserializeAws_restJson1CreateDataIntegrationCommandError(output, context)];
386
- }
387
- contents = map({
388
- $metadata: deserializeMetadata(output),
389
- });
390
- _a = __expectNonNull;
391
- _b = __expectObject;
392
- return [4, parseBody(output.body, context)];
393
- case 1:
394
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
395
- if (data.Arn != null) {
396
- contents.Arn = __expectString(data.Arn);
397
- }
398
- if (data.ClientToken != null) {
399
- contents.ClientToken = __expectString(data.ClientToken);
400
- }
401
- if (data.Description != null) {
402
- contents.Description = __expectString(data.Description);
403
- }
404
- if (data.Id != null) {
405
- contents.Id = __expectString(data.Id);
406
- }
407
- if (data.KmsKey != null) {
408
- contents.KmsKey = __expectString(data.KmsKey);
409
- }
410
- if (data.Name != null) {
411
- contents.Name = __expectString(data.Name);
412
- }
413
- if (data.ScheduleConfiguration != null) {
414
- contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context);
415
- }
416
- if (data.SourceURI != null) {
417
- contents.SourceURI = __expectString(data.SourceURI);
418
- }
419
- if (data.Tags != null) {
420
- contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
421
- }
422
- return [2, contents];
423
- }
145
+ };
146
+ export const serializeAws_restJson1ListDataIntegrationsCommand = async (input, context) => {
147
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const headers = {};
149
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations";
150
+ const query = map({
151
+ nextToken: [, input.NextToken],
152
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
424
153
  });
425
- }); };
426
- var deserializeAws_restJson1CreateDataIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
427
- var parsedOutput, _a, errorCode, _b, parsedBody;
428
- var _c;
429
- return __generator(this, function (_d) {
430
- switch (_d.label) {
431
- case 0:
432
- _a = [__assign({}, output)];
433
- _c = {};
434
- return [4, parseErrorBody(output.body, context)];
435
- case 1:
436
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
437
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
438
- _b = errorCode;
439
- switch (_b) {
440
- case "AccessDeniedException": return [3, 2];
441
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
442
- case "DuplicateResourceException": return [3, 4];
443
- case "com.amazonaws.appintegrations#DuplicateResourceException": return [3, 4];
444
- case "InternalServiceError": return [3, 6];
445
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 6];
446
- case "InvalidRequestException": return [3, 8];
447
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 8];
448
- case "ResourceQuotaExceededException": return [3, 10];
449
- case "com.amazonaws.appintegrations#ResourceQuotaExceededException": return [3, 10];
450
- case "ThrottlingException": return [3, 12];
451
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 12];
452
- }
453
- return [3, 14];
454
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
455
- case 3: throw _d.sent();
456
- case 4: return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
457
- case 5: throw _d.sent();
458
- case 6: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
459
- case 7: throw _d.sent();
460
- case 8: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
461
- case 9: throw _d.sent();
462
- case 10: return [4, deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context)];
463
- case 11: throw _d.sent();
464
- case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
465
- case 13: throw _d.sent();
466
- case 14:
467
- parsedBody = parsedOutput.body;
468
- throwDefaultError({
469
- output: output,
470
- parsedBody: parsedBody,
471
- exceptionCtor: __BaseException,
472
- errorCode: errorCode,
473
- });
474
- _d.label = 15;
475
- case 15: return [2];
476
- }
154
+ let body;
155
+ return new __HttpRequest({
156
+ protocol,
157
+ hostname,
158
+ port,
159
+ method: "GET",
160
+ headers,
161
+ path: resolvedPath,
162
+ query,
163
+ body,
477
164
  });
478
- }); };
479
- export var deserializeAws_restJson1CreateEventIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
480
- var contents, data, _a, _b;
481
- return __generator(this, function (_c) {
482
- switch (_c.label) {
483
- case 0:
484
- if (output.statusCode !== 200 && output.statusCode >= 300) {
485
- return [2, deserializeAws_restJson1CreateEventIntegrationCommandError(output, context)];
486
- }
487
- contents = map({
488
- $metadata: deserializeMetadata(output),
489
- });
490
- _a = __expectNonNull;
491
- _b = __expectObject;
492
- return [4, parseBody(output.body, context)];
493
- case 1:
494
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
495
- if (data.EventIntegrationArn != null) {
496
- contents.EventIntegrationArn = __expectString(data.EventIntegrationArn);
497
- }
498
- return [2, contents];
499
- }
165
+ };
166
+ export const serializeAws_restJson1ListEventIntegrationAssociationsCommand = async (input, context) => {
167
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const headers = {};
169
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
170
+ "/eventIntegrations/{EventIntegrationName}/associations";
171
+ resolvedPath = __resolvedPath(resolvedPath, input, "EventIntegrationName", () => input.EventIntegrationName, "{EventIntegrationName}", false);
172
+ const query = map({
173
+ nextToken: [, input.NextToken],
174
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
500
175
  });
501
- }); };
502
- var deserializeAws_restJson1CreateEventIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
503
- var parsedOutput, _a, errorCode, _b, parsedBody;
504
- var _c;
505
- return __generator(this, function (_d) {
506
- switch (_d.label) {
507
- case 0:
508
- _a = [__assign({}, output)];
509
- _c = {};
510
- return [4, parseErrorBody(output.body, context)];
511
- case 1:
512
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
513
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
514
- _b = errorCode;
515
- switch (_b) {
516
- case "AccessDeniedException": return [3, 2];
517
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
518
- case "DuplicateResourceException": return [3, 4];
519
- case "com.amazonaws.appintegrations#DuplicateResourceException": return [3, 4];
520
- case "InternalServiceError": return [3, 6];
521
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 6];
522
- case "InvalidRequestException": return [3, 8];
523
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 8];
524
- case "ResourceQuotaExceededException": return [3, 10];
525
- case "com.amazonaws.appintegrations#ResourceQuotaExceededException": return [3, 10];
526
- case "ThrottlingException": return [3, 12];
527
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 12];
528
- }
529
- return [3, 14];
530
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
531
- case 3: throw _d.sent();
532
- case 4: return [4, deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)];
533
- case 5: throw _d.sent();
534
- case 6: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
535
- case 7: throw _d.sent();
536
- case 8: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
537
- case 9: throw _d.sent();
538
- case 10: return [4, deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context)];
539
- case 11: throw _d.sent();
540
- case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
541
- case 13: throw _d.sent();
542
- case 14:
543
- parsedBody = parsedOutput.body;
544
- throwDefaultError({
545
- output: output,
546
- parsedBody: parsedBody,
547
- exceptionCtor: __BaseException,
548
- errorCode: errorCode,
549
- });
550
- _d.label = 15;
551
- case 15: return [2];
552
- }
176
+ let body;
177
+ return new __HttpRequest({
178
+ protocol,
179
+ hostname,
180
+ port,
181
+ method: "GET",
182
+ headers,
183
+ path: resolvedPath,
184
+ query,
185
+ body,
553
186
  });
554
- }); };
555
- export var deserializeAws_restJson1DeleteDataIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
556
- var contents;
557
- return __generator(this, function (_a) {
558
- switch (_a.label) {
559
- case 0:
560
- if (output.statusCode !== 200 && output.statusCode >= 300) {
561
- return [2, deserializeAws_restJson1DeleteDataIntegrationCommandError(output, context)];
562
- }
563
- contents = map({
564
- $metadata: deserializeMetadata(output),
565
- });
566
- return [4, collectBody(output.body, context)];
567
- case 1:
568
- _a.sent();
569
- return [2, contents];
570
- }
187
+ };
188
+ export const serializeAws_restJson1ListEventIntegrationsCommand = async (input, context) => {
189
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const headers = {};
191
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations";
192
+ const query = map({
193
+ nextToken: [, input.NextToken],
194
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
571
195
  });
572
- }); };
573
- var deserializeAws_restJson1DeleteDataIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
574
- var parsedOutput, _a, errorCode, _b, parsedBody;
575
- var _c;
576
- return __generator(this, function (_d) {
577
- switch (_d.label) {
578
- case 0:
579
- _a = [__assign({}, output)];
580
- _c = {};
581
- return [4, parseErrorBody(output.body, context)];
582
- case 1:
583
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
584
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
- _b = errorCode;
586
- switch (_b) {
587
- case "AccessDeniedException": return [3, 2];
588
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
589
- case "InternalServiceError": return [3, 4];
590
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
591
- case "InvalidRequestException": return [3, 6];
592
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
593
- case "ResourceNotFoundException": return [3, 8];
594
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
595
- case "ThrottlingException": return [3, 10];
596
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
597
- }
598
- return [3, 12];
599
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
600
- case 3: throw _d.sent();
601
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
602
- case 5: throw _d.sent();
603
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
604
- case 7: throw _d.sent();
605
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
606
- case 9: throw _d.sent();
607
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
608
- case 11: throw _d.sent();
609
- case 12:
610
- parsedBody = parsedOutput.body;
611
- throwDefaultError({
612
- output: output,
613
- parsedBody: parsedBody,
614
- exceptionCtor: __BaseException,
615
- errorCode: errorCode,
616
- });
617
- _d.label = 13;
618
- case 13: return [2];
619
- }
196
+ let body;
197
+ return new __HttpRequest({
198
+ protocol,
199
+ hostname,
200
+ port,
201
+ method: "GET",
202
+ headers,
203
+ path: resolvedPath,
204
+ query,
205
+ body,
620
206
  });
621
- }); };
622
- export var deserializeAws_restJson1DeleteEventIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
623
- var contents;
624
- return __generator(this, function (_a) {
625
- switch (_a.label) {
626
- case 0:
627
- if (output.statusCode !== 200 && output.statusCode >= 300) {
628
- return [2, deserializeAws_restJson1DeleteEventIntegrationCommandError(output, context)];
629
- }
630
- contents = map({
631
- $metadata: deserializeMetadata(output),
632
- });
633
- return [4, collectBody(output.body, context)];
634
- case 1:
635
- _a.sent();
636
- return [2, contents];
637
- }
207
+ };
208
+ export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
209
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const headers = {};
211
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
212
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
213
+ let body;
214
+ return new __HttpRequest({
215
+ protocol,
216
+ hostname,
217
+ port,
218
+ method: "GET",
219
+ headers,
220
+ path: resolvedPath,
221
+ body,
638
222
  });
639
- }); };
640
- var deserializeAws_restJson1DeleteEventIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
641
- var parsedOutput, _a, errorCode, _b, parsedBody;
642
- var _c;
643
- return __generator(this, function (_d) {
644
- switch (_d.label) {
645
- case 0:
646
- _a = [__assign({}, output)];
647
- _c = {};
648
- return [4, parseErrorBody(output.body, context)];
649
- case 1:
650
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
- _b = errorCode;
653
- switch (_b) {
654
- case "AccessDeniedException": return [3, 2];
655
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
656
- case "InternalServiceError": return [3, 4];
657
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
658
- case "InvalidRequestException": return [3, 6];
659
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
660
- case "ResourceNotFoundException": return [3, 8];
661
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
662
- case "ThrottlingException": return [3, 10];
663
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
664
- }
665
- return [3, 12];
666
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
667
- case 3: throw _d.sent();
668
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
669
- case 5: throw _d.sent();
670
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
671
- case 7: throw _d.sent();
672
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
673
- case 9: throw _d.sent();
674
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
675
- case 11: throw _d.sent();
676
- case 12:
677
- parsedBody = parsedOutput.body;
678
- throwDefaultError({
679
- output: output,
680
- parsedBody: parsedBody,
681
- exceptionCtor: __BaseException,
682
- errorCode: errorCode,
683
- });
684
- _d.label = 13;
685
- case 13: return [2];
686
- }
223
+ };
224
+ export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
225
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
226
+ const headers = {
227
+ "content-type": "application/json",
228
+ };
229
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
230
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
231
+ let body;
232
+ body = JSON.stringify({
233
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
687
234
  });
688
- }); };
689
- export var deserializeAws_restJson1GetDataIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
690
- var contents, data, _a, _b;
691
- return __generator(this, function (_c) {
692
- switch (_c.label) {
693
- case 0:
694
- if (output.statusCode !== 200 && output.statusCode >= 300) {
695
- return [2, deserializeAws_restJson1GetDataIntegrationCommandError(output, context)];
696
- }
697
- contents = map({
698
- $metadata: deserializeMetadata(output),
699
- });
700
- _a = __expectNonNull;
701
- _b = __expectObject;
702
- return [4, parseBody(output.body, context)];
703
- case 1:
704
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
705
- if (data.Arn != null) {
706
- contents.Arn = __expectString(data.Arn);
707
- }
708
- if (data.Description != null) {
709
- contents.Description = __expectString(data.Description);
710
- }
711
- if (data.Id != null) {
712
- contents.Id = __expectString(data.Id);
713
- }
714
- if (data.KmsKey != null) {
715
- contents.KmsKey = __expectString(data.KmsKey);
716
- }
717
- if (data.Name != null) {
718
- contents.Name = __expectString(data.Name);
719
- }
720
- if (data.ScheduleConfiguration != null) {
721
- contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context);
722
- }
723
- if (data.SourceURI != null) {
724
- contents.SourceURI = __expectString(data.SourceURI);
725
- }
726
- if (data.Tags != null) {
727
- contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
728
- }
729
- return [2, contents];
730
- }
235
+ return new __HttpRequest({
236
+ protocol,
237
+ hostname,
238
+ port,
239
+ method: "POST",
240
+ headers,
241
+ path: resolvedPath,
242
+ body,
731
243
  });
732
- }); };
733
- var deserializeAws_restJson1GetDataIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
734
- var parsedOutput, _a, errorCode, _b, parsedBody;
735
- var _c;
736
- return __generator(this, function (_d) {
737
- switch (_d.label) {
738
- case 0:
739
- _a = [__assign({}, output)];
740
- _c = {};
741
- return [4, parseErrorBody(output.body, context)];
742
- case 1:
743
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
744
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
745
- _b = errorCode;
746
- switch (_b) {
747
- case "AccessDeniedException": return [3, 2];
748
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
749
- case "InternalServiceError": return [3, 4];
750
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
751
- case "InvalidRequestException": return [3, 6];
752
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
753
- case "ResourceNotFoundException": return [3, 8];
754
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
755
- case "ThrottlingException": return [3, 10];
756
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
757
- }
758
- return [3, 12];
759
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
760
- case 3: throw _d.sent();
761
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
762
- case 5: throw _d.sent();
763
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
764
- case 7: throw _d.sent();
765
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
766
- case 9: throw _d.sent();
767
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
768
- case 11: throw _d.sent();
769
- case 12:
770
- parsedBody = parsedOutput.body;
771
- throwDefaultError({
772
- output: output,
773
- parsedBody: parsedBody,
774
- exceptionCtor: __BaseException,
775
- errorCode: errorCode,
776
- });
777
- _d.label = 13;
778
- case 13: return [2];
779
- }
244
+ };
245
+ export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
246
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
247
+ const headers = {};
248
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
249
+ resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
250
+ const query = map({
251
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
780
252
  });
781
- }); };
782
- export var deserializeAws_restJson1GetEventIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
783
- var contents, data, _a, _b;
784
- return __generator(this, function (_c) {
785
- switch (_c.label) {
786
- case 0:
787
- if (output.statusCode !== 200 && output.statusCode >= 300) {
788
- return [2, deserializeAws_restJson1GetEventIntegrationCommandError(output, context)];
789
- }
790
- contents = map({
791
- $metadata: deserializeMetadata(output),
792
- });
793
- _a = __expectNonNull;
794
- _b = __expectObject;
795
- return [4, parseBody(output.body, context)];
796
- case 1:
797
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
798
- if (data.Description != null) {
799
- contents.Description = __expectString(data.Description);
800
- }
801
- if (data.EventBridgeBus != null) {
802
- contents.EventBridgeBus = __expectString(data.EventBridgeBus);
803
- }
804
- if (data.EventFilter != null) {
805
- contents.EventFilter = deserializeAws_restJson1EventFilter(data.EventFilter, context);
806
- }
807
- if (data.EventIntegrationArn != null) {
808
- contents.EventIntegrationArn = __expectString(data.EventIntegrationArn);
809
- }
810
- if (data.Name != null) {
811
- contents.Name = __expectString(data.Name);
812
- }
813
- if (data.Tags != null) {
814
- contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
815
- }
816
- return [2, contents];
817
- }
253
+ let body;
254
+ return new __HttpRequest({
255
+ protocol,
256
+ hostname,
257
+ port,
258
+ method: "DELETE",
259
+ headers,
260
+ path: resolvedPath,
261
+ query,
262
+ body,
818
263
  });
819
- }); };
820
- var deserializeAws_restJson1GetEventIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
821
- var parsedOutput, _a, errorCode, _b, parsedBody;
822
- var _c;
823
- return __generator(this, function (_d) {
824
- switch (_d.label) {
825
- case 0:
826
- _a = [__assign({}, output)];
827
- _c = {};
828
- return [4, parseErrorBody(output.body, context)];
829
- case 1:
830
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
831
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
832
- _b = errorCode;
833
- switch (_b) {
834
- case "AccessDeniedException": return [3, 2];
835
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
836
- case "InternalServiceError": return [3, 4];
837
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
838
- case "InvalidRequestException": return [3, 6];
839
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
840
- case "ResourceNotFoundException": return [3, 8];
841
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
842
- case "ThrottlingException": return [3, 10];
843
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
844
- }
845
- return [3, 12];
846
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
847
- case 3: throw _d.sent();
848
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
849
- case 5: throw _d.sent();
850
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
851
- case 7: throw _d.sent();
852
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
853
- case 9: throw _d.sent();
854
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
855
- case 11: throw _d.sent();
856
- case 12:
857
- parsedBody = parsedOutput.body;
858
- throwDefaultError({
859
- output: output,
860
- parsedBody: parsedBody,
861
- exceptionCtor: __BaseException,
862
- errorCode: errorCode,
863
- });
864
- _d.label = 13;
865
- case 13: return [2];
866
- }
264
+ };
265
+ export const serializeAws_restJson1UpdateDataIntegrationCommand = async (input, context) => {
266
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
+ const headers = {
268
+ "content-type": "application/json",
269
+ };
270
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations/{Identifier}";
271
+ resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier, "{Identifier}", false);
272
+ let body;
273
+ body = JSON.stringify({
274
+ ...(input.Description != null && { Description: input.Description }),
275
+ ...(input.Name != null && { Name: input.Name }),
867
276
  });
868
- }); };
869
- export var deserializeAws_restJson1ListDataIntegrationAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
870
- var contents, data, _a, _b;
871
- return __generator(this, function (_c) {
872
- switch (_c.label) {
873
- case 0:
874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
875
- return [2, deserializeAws_restJson1ListDataIntegrationAssociationsCommandError(output, context)];
876
- }
877
- contents = map({
878
- $metadata: deserializeMetadata(output),
879
- });
880
- _a = __expectNonNull;
881
- _b = __expectObject;
882
- return [4, parseBody(output.body, context)];
883
- case 1:
884
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
885
- if (data.DataIntegrationAssociations != null) {
886
- contents.DataIntegrationAssociations = deserializeAws_restJson1DataIntegrationAssociationsList(data.DataIntegrationAssociations, context);
887
- }
888
- if (data.NextToken != null) {
889
- contents.NextToken = __expectString(data.NextToken);
890
- }
891
- return [2, contents];
892
- }
277
+ return new __HttpRequest({
278
+ protocol,
279
+ hostname,
280
+ port,
281
+ method: "PATCH",
282
+ headers,
283
+ path: resolvedPath,
284
+ body,
893
285
  });
894
- }); };
895
- var deserializeAws_restJson1ListDataIntegrationAssociationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
896
- var parsedOutput, _a, errorCode, _b, parsedBody;
897
- var _c;
898
- return __generator(this, function (_d) {
899
- switch (_d.label) {
900
- case 0:
901
- _a = [__assign({}, output)];
902
- _c = {};
903
- return [4, parseErrorBody(output.body, context)];
904
- case 1:
905
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
906
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- _b = errorCode;
908
- switch (_b) {
909
- case "AccessDeniedException": return [3, 2];
910
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
911
- case "InternalServiceError": return [3, 4];
912
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
913
- case "InvalidRequestException": return [3, 6];
914
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
915
- case "ResourceNotFoundException": return [3, 8];
916
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
917
- case "ThrottlingException": return [3, 10];
918
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
919
- }
920
- return [3, 12];
921
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
922
- case 3: throw _d.sent();
923
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
924
- case 5: throw _d.sent();
925
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
926
- case 7: throw _d.sent();
927
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
928
- case 9: throw _d.sent();
929
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
930
- case 11: throw _d.sent();
931
- case 12:
932
- parsedBody = parsedOutput.body;
933
- throwDefaultError({
934
- output: output,
935
- parsedBody: parsedBody,
936
- exceptionCtor: __BaseException,
937
- errorCode: errorCode,
938
- });
939
- _d.label = 13;
940
- case 13: return [2];
941
- }
286
+ };
287
+ export const serializeAws_restJson1UpdateEventIntegrationCommand = async (input, context) => {
288
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
289
+ const headers = {
290
+ "content-type": "application/json",
291
+ };
292
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations/{Name}";
293
+ resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
294
+ let body;
295
+ body = JSON.stringify({
296
+ ...(input.Description != null && { Description: input.Description }),
942
297
  });
943
- }); };
944
- export var deserializeAws_restJson1ListDataIntegrationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
945
- var contents, data, _a, _b;
946
- return __generator(this, function (_c) {
947
- switch (_c.label) {
948
- case 0:
949
- if (output.statusCode !== 200 && output.statusCode >= 300) {
950
- return [2, deserializeAws_restJson1ListDataIntegrationsCommandError(output, context)];
951
- }
952
- contents = map({
953
- $metadata: deserializeMetadata(output),
954
- });
955
- _a = __expectNonNull;
956
- _b = __expectObject;
957
- return [4, parseBody(output.body, context)];
958
- case 1:
959
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
960
- if (data.DataIntegrations != null) {
961
- contents.DataIntegrations = deserializeAws_restJson1DataIntegrationsList(data.DataIntegrations, context);
962
- }
963
- if (data.NextToken != null) {
964
- contents.NextToken = __expectString(data.NextToken);
965
- }
966
- return [2, contents];
967
- }
298
+ return new __HttpRequest({
299
+ protocol,
300
+ hostname,
301
+ port,
302
+ method: "PATCH",
303
+ headers,
304
+ path: resolvedPath,
305
+ body,
968
306
  });
969
- }); };
970
- var deserializeAws_restJson1ListDataIntegrationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
971
- var parsedOutput, _a, errorCode, _b, parsedBody;
972
- var _c;
973
- return __generator(this, function (_d) {
974
- switch (_d.label) {
975
- case 0:
976
- _a = [__assign({}, output)];
977
- _c = {};
978
- return [4, parseErrorBody(output.body, context)];
979
- case 1:
980
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
981
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
982
- _b = errorCode;
983
- switch (_b) {
984
- case "AccessDeniedException": return [3, 2];
985
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
986
- case "InternalServiceError": return [3, 4];
987
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
988
- case "InvalidRequestException": return [3, 6];
989
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
990
- case "ThrottlingException": return [3, 8];
991
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 8];
992
- }
993
- return [3, 10];
994
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
995
- case 3: throw _d.sent();
996
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
997
- case 5: throw _d.sent();
998
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
999
- case 7: throw _d.sent();
1000
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1001
- case 9: throw _d.sent();
1002
- case 10:
1003
- parsedBody = parsedOutput.body;
1004
- throwDefaultError({
1005
- output: output,
1006
- parsedBody: parsedBody,
1007
- exceptionCtor: __BaseException,
1008
- errorCode: errorCode,
1009
- });
1010
- _d.label = 11;
1011
- case 11: return [2];
1012
- }
307
+ };
308
+ export const deserializeAws_restJson1CreateDataIntegrationCommand = async (output, context) => {
309
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
310
+ return deserializeAws_restJson1CreateDataIntegrationCommandError(output, context);
311
+ }
312
+ const contents = map({
313
+ $metadata: deserializeMetadata(output),
1013
314
  });
1014
- }); };
1015
- export var deserializeAws_restJson1ListEventIntegrationAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1016
- var contents, data, _a, _b;
1017
- return __generator(this, function (_c) {
1018
- switch (_c.label) {
1019
- case 0:
1020
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1021
- return [2, deserializeAws_restJson1ListEventIntegrationAssociationsCommandError(output, context)];
1022
- }
1023
- contents = map({
1024
- $metadata: deserializeMetadata(output),
1025
- });
1026
- _a = __expectNonNull;
1027
- _b = __expectObject;
1028
- return [4, parseBody(output.body, context)];
1029
- case 1:
1030
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1031
- if (data.EventIntegrationAssociations != null) {
1032
- contents.EventIntegrationAssociations = deserializeAws_restJson1EventIntegrationAssociationsList(data.EventIntegrationAssociations, context);
1033
- }
1034
- if (data.NextToken != null) {
1035
- contents.NextToken = __expectString(data.NextToken);
1036
- }
1037
- return [2, contents];
1038
- }
315
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
316
+ if (data.Arn != null) {
317
+ contents.Arn = __expectString(data.Arn);
318
+ }
319
+ if (data.ClientToken != null) {
320
+ contents.ClientToken = __expectString(data.ClientToken);
321
+ }
322
+ if (data.Description != null) {
323
+ contents.Description = __expectString(data.Description);
324
+ }
325
+ if (data.Id != null) {
326
+ contents.Id = __expectString(data.Id);
327
+ }
328
+ if (data.KmsKey != null) {
329
+ contents.KmsKey = __expectString(data.KmsKey);
330
+ }
331
+ if (data.Name != null) {
332
+ contents.Name = __expectString(data.Name);
333
+ }
334
+ if (data.ScheduleConfiguration != null) {
335
+ contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context);
336
+ }
337
+ if (data.SourceURI != null) {
338
+ contents.SourceURI = __expectString(data.SourceURI);
339
+ }
340
+ if (data.Tags != null) {
341
+ contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
342
+ }
343
+ return contents;
344
+ };
345
+ const deserializeAws_restJson1CreateDataIntegrationCommandError = async (output, context) => {
346
+ const parsedOutput = {
347
+ ...output,
348
+ body: await parseErrorBody(output.body, context),
349
+ };
350
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
351
+ switch (errorCode) {
352
+ case "AccessDeniedException":
353
+ case "com.amazonaws.appintegrations#AccessDeniedException":
354
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
355
+ case "DuplicateResourceException":
356
+ case "com.amazonaws.appintegrations#DuplicateResourceException":
357
+ throw await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context);
358
+ case "InternalServiceError":
359
+ case "com.amazonaws.appintegrations#InternalServiceError":
360
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
361
+ case "InvalidRequestException":
362
+ case "com.amazonaws.appintegrations#InvalidRequestException":
363
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
364
+ case "ResourceQuotaExceededException":
365
+ case "com.amazonaws.appintegrations#ResourceQuotaExceededException":
366
+ throw await deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context);
367
+ case "ThrottlingException":
368
+ case "com.amazonaws.appintegrations#ThrottlingException":
369
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
370
+ default:
371
+ const parsedBody = parsedOutput.body;
372
+ throwDefaultError({
373
+ output,
374
+ parsedBody,
375
+ exceptionCtor: __BaseException,
376
+ errorCode,
377
+ });
378
+ }
379
+ };
380
+ export const deserializeAws_restJson1CreateEventIntegrationCommand = async (output, context) => {
381
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
382
+ return deserializeAws_restJson1CreateEventIntegrationCommandError(output, context);
383
+ }
384
+ const contents = map({
385
+ $metadata: deserializeMetadata(output),
1039
386
  });
1040
- }); };
1041
- var deserializeAws_restJson1ListEventIntegrationAssociationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1042
- var parsedOutput, _a, errorCode, _b, parsedBody;
1043
- var _c;
1044
- return __generator(this, function (_d) {
1045
- switch (_d.label) {
1046
- case 0:
1047
- _a = [__assign({}, output)];
1048
- _c = {};
1049
- return [4, parseErrorBody(output.body, context)];
1050
- case 1:
1051
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1052
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- _b = errorCode;
1054
- switch (_b) {
1055
- case "AccessDeniedException": return [3, 2];
1056
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
1057
- case "InternalServiceError": return [3, 4];
1058
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
1059
- case "InvalidRequestException": return [3, 6];
1060
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
1061
- case "ResourceNotFoundException": return [3, 8];
1062
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
1063
- case "ThrottlingException": return [3, 10];
1064
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
1065
- }
1066
- return [3, 12];
1067
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1068
- case 3: throw _d.sent();
1069
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1070
- case 5: throw _d.sent();
1071
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1072
- case 7: throw _d.sent();
1073
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1074
- case 9: throw _d.sent();
1075
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1076
- case 11: throw _d.sent();
1077
- case 12:
1078
- parsedBody = parsedOutput.body;
1079
- throwDefaultError({
1080
- output: output,
1081
- parsedBody: parsedBody,
1082
- exceptionCtor: __BaseException,
1083
- errorCode: errorCode,
1084
- });
1085
- _d.label = 13;
1086
- case 13: return [2];
1087
- }
387
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
388
+ if (data.EventIntegrationArn != null) {
389
+ contents.EventIntegrationArn = __expectString(data.EventIntegrationArn);
390
+ }
391
+ return contents;
392
+ };
393
+ const deserializeAws_restJson1CreateEventIntegrationCommandError = async (output, context) => {
394
+ const parsedOutput = {
395
+ ...output,
396
+ body: await parseErrorBody(output.body, context),
397
+ };
398
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
399
+ switch (errorCode) {
400
+ case "AccessDeniedException":
401
+ case "com.amazonaws.appintegrations#AccessDeniedException":
402
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
403
+ case "DuplicateResourceException":
404
+ case "com.amazonaws.appintegrations#DuplicateResourceException":
405
+ throw await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context);
406
+ case "InternalServiceError":
407
+ case "com.amazonaws.appintegrations#InternalServiceError":
408
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
409
+ case "InvalidRequestException":
410
+ case "com.amazonaws.appintegrations#InvalidRequestException":
411
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
412
+ case "ResourceQuotaExceededException":
413
+ case "com.amazonaws.appintegrations#ResourceQuotaExceededException":
414
+ throw await deserializeAws_restJson1ResourceQuotaExceededExceptionResponse(parsedOutput, context);
415
+ case "ThrottlingException":
416
+ case "com.amazonaws.appintegrations#ThrottlingException":
417
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
418
+ default:
419
+ const parsedBody = parsedOutput.body;
420
+ throwDefaultError({
421
+ output,
422
+ parsedBody,
423
+ exceptionCtor: __BaseException,
424
+ errorCode,
425
+ });
426
+ }
427
+ };
428
+ export const deserializeAws_restJson1DeleteDataIntegrationCommand = async (output, context) => {
429
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
430
+ return deserializeAws_restJson1DeleteDataIntegrationCommandError(output, context);
431
+ }
432
+ const contents = map({
433
+ $metadata: deserializeMetadata(output),
1088
434
  });
1089
- }); };
1090
- export var deserializeAws_restJson1ListEventIntegrationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1091
- var contents, data, _a, _b;
1092
- return __generator(this, function (_c) {
1093
- switch (_c.label) {
1094
- case 0:
1095
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1096
- return [2, deserializeAws_restJson1ListEventIntegrationsCommandError(output, context)];
1097
- }
1098
- contents = map({
1099
- $metadata: deserializeMetadata(output),
1100
- });
1101
- _a = __expectNonNull;
1102
- _b = __expectObject;
1103
- return [4, parseBody(output.body, context)];
1104
- case 1:
1105
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1106
- if (data.EventIntegrations != null) {
1107
- contents.EventIntegrations = deserializeAws_restJson1EventIntegrationsList(data.EventIntegrations, context);
1108
- }
1109
- if (data.NextToken != null) {
1110
- contents.NextToken = __expectString(data.NextToken);
1111
- }
1112
- return [2, contents];
1113
- }
435
+ await collectBody(output.body, context);
436
+ return contents;
437
+ };
438
+ const deserializeAws_restJson1DeleteDataIntegrationCommandError = async (output, context) => {
439
+ const parsedOutput = {
440
+ ...output,
441
+ body: await parseErrorBody(output.body, context),
442
+ };
443
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
444
+ switch (errorCode) {
445
+ case "AccessDeniedException":
446
+ case "com.amazonaws.appintegrations#AccessDeniedException":
447
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
448
+ case "InternalServiceError":
449
+ case "com.amazonaws.appintegrations#InternalServiceError":
450
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
451
+ case "InvalidRequestException":
452
+ case "com.amazonaws.appintegrations#InvalidRequestException":
453
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
454
+ case "ResourceNotFoundException":
455
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
456
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
457
+ case "ThrottlingException":
458
+ case "com.amazonaws.appintegrations#ThrottlingException":
459
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
460
+ default:
461
+ const parsedBody = parsedOutput.body;
462
+ throwDefaultError({
463
+ output,
464
+ parsedBody,
465
+ exceptionCtor: __BaseException,
466
+ errorCode,
467
+ });
468
+ }
469
+ };
470
+ export const deserializeAws_restJson1DeleteEventIntegrationCommand = async (output, context) => {
471
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
472
+ return deserializeAws_restJson1DeleteEventIntegrationCommandError(output, context);
473
+ }
474
+ const contents = map({
475
+ $metadata: deserializeMetadata(output),
1114
476
  });
1115
- }); };
1116
- var deserializeAws_restJson1ListEventIntegrationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1117
- var parsedOutput, _a, errorCode, _b, parsedBody;
1118
- var _c;
1119
- return __generator(this, function (_d) {
1120
- switch (_d.label) {
1121
- case 0:
1122
- _a = [__assign({}, output)];
1123
- _c = {};
1124
- return [4, parseErrorBody(output.body, context)];
1125
- case 1:
1126
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1127
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1128
- _b = errorCode;
1129
- switch (_b) {
1130
- case "AccessDeniedException": return [3, 2];
1131
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
1132
- case "InternalServiceError": return [3, 4];
1133
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
1134
- case "InvalidRequestException": return [3, 6];
1135
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
1136
- case "ThrottlingException": return [3, 8];
1137
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 8];
1138
- }
1139
- return [3, 10];
1140
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1141
- case 3: throw _d.sent();
1142
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1143
- case 5: throw _d.sent();
1144
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1145
- case 7: throw _d.sent();
1146
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1147
- case 9: throw _d.sent();
1148
- case 10:
1149
- parsedBody = parsedOutput.body;
1150
- throwDefaultError({
1151
- output: output,
1152
- parsedBody: parsedBody,
1153
- exceptionCtor: __BaseException,
1154
- errorCode: errorCode,
1155
- });
1156
- _d.label = 11;
1157
- case 11: return [2];
1158
- }
477
+ await collectBody(output.body, context);
478
+ return contents;
479
+ };
480
+ const deserializeAws_restJson1DeleteEventIntegrationCommandError = async (output, context) => {
481
+ const parsedOutput = {
482
+ ...output,
483
+ body: await parseErrorBody(output.body, context),
484
+ };
485
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
486
+ switch (errorCode) {
487
+ case "AccessDeniedException":
488
+ case "com.amazonaws.appintegrations#AccessDeniedException":
489
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
490
+ case "InternalServiceError":
491
+ case "com.amazonaws.appintegrations#InternalServiceError":
492
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
493
+ case "InvalidRequestException":
494
+ case "com.amazonaws.appintegrations#InvalidRequestException":
495
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
496
+ case "ResourceNotFoundException":
497
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
498
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
499
+ case "ThrottlingException":
500
+ case "com.amazonaws.appintegrations#ThrottlingException":
501
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
502
+ default:
503
+ const parsedBody = parsedOutput.body;
504
+ throwDefaultError({
505
+ output,
506
+ parsedBody,
507
+ exceptionCtor: __BaseException,
508
+ errorCode,
509
+ });
510
+ }
511
+ };
512
+ export const deserializeAws_restJson1GetDataIntegrationCommand = async (output, context) => {
513
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
514
+ return deserializeAws_restJson1GetDataIntegrationCommandError(output, context);
515
+ }
516
+ const contents = map({
517
+ $metadata: deserializeMetadata(output),
1159
518
  });
1160
- }); };
1161
- export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1162
- var contents, data, _a, _b;
1163
- return __generator(this, function (_c) {
1164
- switch (_c.label) {
1165
- case 0:
1166
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1167
- return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
1168
- }
1169
- contents = map({
1170
- $metadata: deserializeMetadata(output),
1171
- });
1172
- _a = __expectNonNull;
1173
- _b = __expectObject;
1174
- return [4, parseBody(output.body, context)];
1175
- case 1:
1176
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1177
- if (data.tags != null) {
1178
- contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1179
- }
1180
- return [2, contents];
1181
- }
519
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
520
+ if (data.Arn != null) {
521
+ contents.Arn = __expectString(data.Arn);
522
+ }
523
+ if (data.Description != null) {
524
+ contents.Description = __expectString(data.Description);
525
+ }
526
+ if (data.Id != null) {
527
+ contents.Id = __expectString(data.Id);
528
+ }
529
+ if (data.KmsKey != null) {
530
+ contents.KmsKey = __expectString(data.KmsKey);
531
+ }
532
+ if (data.Name != null) {
533
+ contents.Name = __expectString(data.Name);
534
+ }
535
+ if (data.ScheduleConfiguration != null) {
536
+ contents.ScheduleConfiguration = deserializeAws_restJson1ScheduleConfiguration(data.ScheduleConfiguration, context);
537
+ }
538
+ if (data.SourceURI != null) {
539
+ contents.SourceURI = __expectString(data.SourceURI);
540
+ }
541
+ if (data.Tags != null) {
542
+ contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
543
+ }
544
+ return contents;
545
+ };
546
+ const deserializeAws_restJson1GetDataIntegrationCommandError = async (output, context) => {
547
+ const parsedOutput = {
548
+ ...output,
549
+ body: await parseErrorBody(output.body, context),
550
+ };
551
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
552
+ switch (errorCode) {
553
+ case "AccessDeniedException":
554
+ case "com.amazonaws.appintegrations#AccessDeniedException":
555
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
556
+ case "InternalServiceError":
557
+ case "com.amazonaws.appintegrations#InternalServiceError":
558
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
559
+ case "InvalidRequestException":
560
+ case "com.amazonaws.appintegrations#InvalidRequestException":
561
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
562
+ case "ResourceNotFoundException":
563
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
564
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
565
+ case "ThrottlingException":
566
+ case "com.amazonaws.appintegrations#ThrottlingException":
567
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
568
+ default:
569
+ const parsedBody = parsedOutput.body;
570
+ throwDefaultError({
571
+ output,
572
+ parsedBody,
573
+ exceptionCtor: __BaseException,
574
+ errorCode,
575
+ });
576
+ }
577
+ };
578
+ export const deserializeAws_restJson1GetEventIntegrationCommand = async (output, context) => {
579
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
580
+ return deserializeAws_restJson1GetEventIntegrationCommandError(output, context);
581
+ }
582
+ const contents = map({
583
+ $metadata: deserializeMetadata(output),
1182
584
  });
1183
- }); };
1184
- var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1185
- var parsedOutput, _a, errorCode, _b, parsedBody;
1186
- var _c;
1187
- return __generator(this, function (_d) {
1188
- switch (_d.label) {
1189
- case 0:
1190
- _a = [__assign({}, output)];
1191
- _c = {};
1192
- return [4, parseErrorBody(output.body, context)];
1193
- case 1:
1194
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1195
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1196
- _b = errorCode;
1197
- switch (_b) {
1198
- case "InternalServiceError": return [3, 2];
1199
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 2];
1200
- case "InvalidRequestException": return [3, 4];
1201
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 4];
1202
- case "ResourceNotFoundException": return [3, 6];
1203
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 6];
1204
- case "ThrottlingException": return [3, 8];
1205
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 8];
1206
- }
1207
- return [3, 10];
1208
- case 2: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1209
- case 3: throw _d.sent();
1210
- case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1211
- case 5: throw _d.sent();
1212
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1213
- case 7: throw _d.sent();
1214
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1215
- case 9: throw _d.sent();
1216
- case 10:
1217
- parsedBody = parsedOutput.body;
1218
- throwDefaultError({
1219
- output: output,
1220
- parsedBody: parsedBody,
1221
- exceptionCtor: __BaseException,
1222
- errorCode: errorCode,
1223
- });
1224
- _d.label = 11;
1225
- case 11: return [2];
1226
- }
585
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
586
+ if (data.Description != null) {
587
+ contents.Description = __expectString(data.Description);
588
+ }
589
+ if (data.EventBridgeBus != null) {
590
+ contents.EventBridgeBus = __expectString(data.EventBridgeBus);
591
+ }
592
+ if (data.EventFilter != null) {
593
+ contents.EventFilter = deserializeAws_restJson1EventFilter(data.EventFilter, context);
594
+ }
595
+ if (data.EventIntegrationArn != null) {
596
+ contents.EventIntegrationArn = __expectString(data.EventIntegrationArn);
597
+ }
598
+ if (data.Name != null) {
599
+ contents.Name = __expectString(data.Name);
600
+ }
601
+ if (data.Tags != null) {
602
+ contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
603
+ }
604
+ return contents;
605
+ };
606
+ const deserializeAws_restJson1GetEventIntegrationCommandError = async (output, context) => {
607
+ const parsedOutput = {
608
+ ...output,
609
+ body: await parseErrorBody(output.body, context),
610
+ };
611
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
612
+ switch (errorCode) {
613
+ case "AccessDeniedException":
614
+ case "com.amazonaws.appintegrations#AccessDeniedException":
615
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
616
+ case "InternalServiceError":
617
+ case "com.amazonaws.appintegrations#InternalServiceError":
618
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
619
+ case "InvalidRequestException":
620
+ case "com.amazonaws.appintegrations#InvalidRequestException":
621
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
622
+ case "ResourceNotFoundException":
623
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
624
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
625
+ case "ThrottlingException":
626
+ case "com.amazonaws.appintegrations#ThrottlingException":
627
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
628
+ default:
629
+ const parsedBody = parsedOutput.body;
630
+ throwDefaultError({
631
+ output,
632
+ parsedBody,
633
+ exceptionCtor: __BaseException,
634
+ errorCode,
635
+ });
636
+ }
637
+ };
638
+ export const deserializeAws_restJson1ListDataIntegrationAssociationsCommand = async (output, context) => {
639
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
640
+ return deserializeAws_restJson1ListDataIntegrationAssociationsCommandError(output, context);
641
+ }
642
+ const contents = map({
643
+ $metadata: deserializeMetadata(output),
1227
644
  });
1228
- }); };
1229
- export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1230
- var contents;
1231
- return __generator(this, function (_a) {
1232
- switch (_a.label) {
1233
- case 0:
1234
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1235
- return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
1236
- }
1237
- contents = map({
1238
- $metadata: deserializeMetadata(output),
1239
- });
1240
- return [4, collectBody(output.body, context)];
1241
- case 1:
1242
- _a.sent();
1243
- return [2, contents];
1244
- }
645
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
646
+ if (data.DataIntegrationAssociations != null) {
647
+ contents.DataIntegrationAssociations = deserializeAws_restJson1DataIntegrationAssociationsList(data.DataIntegrationAssociations, context);
648
+ }
649
+ if (data.NextToken != null) {
650
+ contents.NextToken = __expectString(data.NextToken);
651
+ }
652
+ return contents;
653
+ };
654
+ const deserializeAws_restJson1ListDataIntegrationAssociationsCommandError = async (output, context) => {
655
+ const parsedOutput = {
656
+ ...output,
657
+ body: await parseErrorBody(output.body, context),
658
+ };
659
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
+ switch (errorCode) {
661
+ case "AccessDeniedException":
662
+ case "com.amazonaws.appintegrations#AccessDeniedException":
663
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
664
+ case "InternalServiceError":
665
+ case "com.amazonaws.appintegrations#InternalServiceError":
666
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
667
+ case "InvalidRequestException":
668
+ case "com.amazonaws.appintegrations#InvalidRequestException":
669
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
670
+ case "ResourceNotFoundException":
671
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
672
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
673
+ case "ThrottlingException":
674
+ case "com.amazonaws.appintegrations#ThrottlingException":
675
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
676
+ default:
677
+ const parsedBody = parsedOutput.body;
678
+ throwDefaultError({
679
+ output,
680
+ parsedBody,
681
+ exceptionCtor: __BaseException,
682
+ errorCode,
683
+ });
684
+ }
685
+ };
686
+ export const deserializeAws_restJson1ListDataIntegrationsCommand = async (output, context) => {
687
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
688
+ return deserializeAws_restJson1ListDataIntegrationsCommandError(output, context);
689
+ }
690
+ const contents = map({
691
+ $metadata: deserializeMetadata(output),
1245
692
  });
1246
- }); };
1247
- var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1248
- var parsedOutput, _a, errorCode, _b, parsedBody;
1249
- var _c;
1250
- return __generator(this, function (_d) {
1251
- switch (_d.label) {
1252
- case 0:
1253
- _a = [__assign({}, output)];
1254
- _c = {};
1255
- return [4, parseErrorBody(output.body, context)];
1256
- case 1:
1257
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1258
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
- _b = errorCode;
1260
- switch (_b) {
1261
- case "InternalServiceError": return [3, 2];
1262
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 2];
1263
- case "InvalidRequestException": return [3, 4];
1264
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 4];
1265
- case "ResourceNotFoundException": return [3, 6];
1266
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 6];
1267
- case "ThrottlingException": return [3, 8];
1268
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 8];
1269
- }
1270
- return [3, 10];
1271
- case 2: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1272
- case 3: throw _d.sent();
1273
- case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1274
- case 5: throw _d.sent();
1275
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1276
- case 7: throw _d.sent();
1277
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1278
- case 9: throw _d.sent();
1279
- case 10:
1280
- parsedBody = parsedOutput.body;
1281
- throwDefaultError({
1282
- output: output,
1283
- parsedBody: parsedBody,
1284
- exceptionCtor: __BaseException,
1285
- errorCode: errorCode,
1286
- });
1287
- _d.label = 11;
1288
- case 11: return [2];
1289
- }
693
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
694
+ if (data.DataIntegrations != null) {
695
+ contents.DataIntegrations = deserializeAws_restJson1DataIntegrationsList(data.DataIntegrations, context);
696
+ }
697
+ if (data.NextToken != null) {
698
+ contents.NextToken = __expectString(data.NextToken);
699
+ }
700
+ return contents;
701
+ };
702
+ const deserializeAws_restJson1ListDataIntegrationsCommandError = async (output, context) => {
703
+ const parsedOutput = {
704
+ ...output,
705
+ body: await parseErrorBody(output.body, context),
706
+ };
707
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
+ switch (errorCode) {
709
+ case "AccessDeniedException":
710
+ case "com.amazonaws.appintegrations#AccessDeniedException":
711
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
712
+ case "InternalServiceError":
713
+ case "com.amazonaws.appintegrations#InternalServiceError":
714
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
715
+ case "InvalidRequestException":
716
+ case "com.amazonaws.appintegrations#InvalidRequestException":
717
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
718
+ case "ThrottlingException":
719
+ case "com.amazonaws.appintegrations#ThrottlingException":
720
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
721
+ default:
722
+ const parsedBody = parsedOutput.body;
723
+ throwDefaultError({
724
+ output,
725
+ parsedBody,
726
+ exceptionCtor: __BaseException,
727
+ errorCode,
728
+ });
729
+ }
730
+ };
731
+ export const deserializeAws_restJson1ListEventIntegrationAssociationsCommand = async (output, context) => {
732
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
733
+ return deserializeAws_restJson1ListEventIntegrationAssociationsCommandError(output, context);
734
+ }
735
+ const contents = map({
736
+ $metadata: deserializeMetadata(output),
1290
737
  });
1291
- }); };
1292
- export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1293
- var contents;
1294
- return __generator(this, function (_a) {
1295
- switch (_a.label) {
1296
- case 0:
1297
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1298
- return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
1299
- }
1300
- contents = map({
1301
- $metadata: deserializeMetadata(output),
1302
- });
1303
- return [4, collectBody(output.body, context)];
1304
- case 1:
1305
- _a.sent();
1306
- return [2, contents];
1307
- }
738
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
739
+ if (data.EventIntegrationAssociations != null) {
740
+ contents.EventIntegrationAssociations = deserializeAws_restJson1EventIntegrationAssociationsList(data.EventIntegrationAssociations, context);
741
+ }
742
+ if (data.NextToken != null) {
743
+ contents.NextToken = __expectString(data.NextToken);
744
+ }
745
+ return contents;
746
+ };
747
+ const deserializeAws_restJson1ListEventIntegrationAssociationsCommandError = async (output, context) => {
748
+ const parsedOutput = {
749
+ ...output,
750
+ body: await parseErrorBody(output.body, context),
751
+ };
752
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
753
+ switch (errorCode) {
754
+ case "AccessDeniedException":
755
+ case "com.amazonaws.appintegrations#AccessDeniedException":
756
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
757
+ case "InternalServiceError":
758
+ case "com.amazonaws.appintegrations#InternalServiceError":
759
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
760
+ case "InvalidRequestException":
761
+ case "com.amazonaws.appintegrations#InvalidRequestException":
762
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
763
+ case "ResourceNotFoundException":
764
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
765
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
766
+ case "ThrottlingException":
767
+ case "com.amazonaws.appintegrations#ThrottlingException":
768
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
769
+ default:
770
+ const parsedBody = parsedOutput.body;
771
+ throwDefaultError({
772
+ output,
773
+ parsedBody,
774
+ exceptionCtor: __BaseException,
775
+ errorCode,
776
+ });
777
+ }
778
+ };
779
+ export const deserializeAws_restJson1ListEventIntegrationsCommand = async (output, context) => {
780
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
781
+ return deserializeAws_restJson1ListEventIntegrationsCommandError(output, context);
782
+ }
783
+ const contents = map({
784
+ $metadata: deserializeMetadata(output),
1308
785
  });
1309
- }); };
1310
- var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1311
- var parsedOutput, _a, errorCode, _b, parsedBody;
1312
- var _c;
1313
- return __generator(this, function (_d) {
1314
- switch (_d.label) {
1315
- case 0:
1316
- _a = [__assign({}, output)];
1317
- _c = {};
1318
- return [4, parseErrorBody(output.body, context)];
1319
- case 1:
1320
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1321
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
- _b = errorCode;
1323
- switch (_b) {
1324
- case "InternalServiceError": return [3, 2];
1325
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 2];
1326
- case "InvalidRequestException": return [3, 4];
1327
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 4];
1328
- case "ResourceNotFoundException": return [3, 6];
1329
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 6];
1330
- case "ThrottlingException": return [3, 8];
1331
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 8];
1332
- }
1333
- return [3, 10];
1334
- case 2: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1335
- case 3: throw _d.sent();
1336
- case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1337
- case 5: throw _d.sent();
1338
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1339
- case 7: throw _d.sent();
1340
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1341
- case 9: throw _d.sent();
1342
- case 10:
1343
- parsedBody = parsedOutput.body;
1344
- throwDefaultError({
1345
- output: output,
1346
- parsedBody: parsedBody,
1347
- exceptionCtor: __BaseException,
1348
- errorCode: errorCode,
1349
- });
1350
- _d.label = 11;
1351
- case 11: return [2];
1352
- }
786
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
787
+ if (data.EventIntegrations != null) {
788
+ contents.EventIntegrations = deserializeAws_restJson1EventIntegrationsList(data.EventIntegrations, context);
789
+ }
790
+ if (data.NextToken != null) {
791
+ contents.NextToken = __expectString(data.NextToken);
792
+ }
793
+ return contents;
794
+ };
795
+ const deserializeAws_restJson1ListEventIntegrationsCommandError = async (output, context) => {
796
+ const parsedOutput = {
797
+ ...output,
798
+ body: await parseErrorBody(output.body, context),
799
+ };
800
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
+ switch (errorCode) {
802
+ case "AccessDeniedException":
803
+ case "com.amazonaws.appintegrations#AccessDeniedException":
804
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
805
+ case "InternalServiceError":
806
+ case "com.amazonaws.appintegrations#InternalServiceError":
807
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
808
+ case "InvalidRequestException":
809
+ case "com.amazonaws.appintegrations#InvalidRequestException":
810
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
811
+ case "ThrottlingException":
812
+ case "com.amazonaws.appintegrations#ThrottlingException":
813
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
814
+ default:
815
+ const parsedBody = parsedOutput.body;
816
+ throwDefaultError({
817
+ output,
818
+ parsedBody,
819
+ exceptionCtor: __BaseException,
820
+ errorCode,
821
+ });
822
+ }
823
+ };
824
+ export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
825
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
826
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
827
+ }
828
+ const contents = map({
829
+ $metadata: deserializeMetadata(output),
1353
830
  });
1354
- }); };
1355
- export var deserializeAws_restJson1UpdateDataIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1356
- var contents;
1357
- return __generator(this, function (_a) {
1358
- switch (_a.label) {
1359
- case 0:
1360
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1361
- return [2, deserializeAws_restJson1UpdateDataIntegrationCommandError(output, context)];
1362
- }
1363
- contents = map({
1364
- $metadata: deserializeMetadata(output),
1365
- });
1366
- return [4, collectBody(output.body, context)];
1367
- case 1:
1368
- _a.sent();
1369
- return [2, contents];
1370
- }
831
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
832
+ if (data.tags != null) {
833
+ contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
834
+ }
835
+ return contents;
836
+ };
837
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
838
+ const parsedOutput = {
839
+ ...output,
840
+ body: await parseErrorBody(output.body, context),
841
+ };
842
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
843
+ switch (errorCode) {
844
+ case "InternalServiceError":
845
+ case "com.amazonaws.appintegrations#InternalServiceError":
846
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
847
+ case "InvalidRequestException":
848
+ case "com.amazonaws.appintegrations#InvalidRequestException":
849
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
850
+ case "ResourceNotFoundException":
851
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
852
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
853
+ case "ThrottlingException":
854
+ case "com.amazonaws.appintegrations#ThrottlingException":
855
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
856
+ default:
857
+ const parsedBody = parsedOutput.body;
858
+ throwDefaultError({
859
+ output,
860
+ parsedBody,
861
+ exceptionCtor: __BaseException,
862
+ errorCode,
863
+ });
864
+ }
865
+ };
866
+ export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
867
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
868
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
869
+ }
870
+ const contents = map({
871
+ $metadata: deserializeMetadata(output),
1371
872
  });
1372
- }); };
1373
- var deserializeAws_restJson1UpdateDataIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1374
- var parsedOutput, _a, errorCode, _b, parsedBody;
1375
- var _c;
1376
- return __generator(this, function (_d) {
1377
- switch (_d.label) {
1378
- case 0:
1379
- _a = [__assign({}, output)];
1380
- _c = {};
1381
- return [4, parseErrorBody(output.body, context)];
1382
- case 1:
1383
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1384
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1385
- _b = errorCode;
1386
- switch (_b) {
1387
- case "AccessDeniedException": return [3, 2];
1388
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
1389
- case "InternalServiceError": return [3, 4];
1390
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
1391
- case "InvalidRequestException": return [3, 6];
1392
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
1393
- case "ResourceNotFoundException": return [3, 8];
1394
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
1395
- case "ThrottlingException": return [3, 10];
1396
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
1397
- }
1398
- return [3, 12];
1399
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1400
- case 3: throw _d.sent();
1401
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1402
- case 5: throw _d.sent();
1403
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1404
- case 7: throw _d.sent();
1405
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1406
- case 9: throw _d.sent();
1407
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1408
- case 11: throw _d.sent();
1409
- case 12:
1410
- parsedBody = parsedOutput.body;
1411
- throwDefaultError({
1412
- output: output,
1413
- parsedBody: parsedBody,
1414
- exceptionCtor: __BaseException,
1415
- errorCode: errorCode,
1416
- });
1417
- _d.label = 13;
1418
- case 13: return [2];
1419
- }
873
+ await collectBody(output.body, context);
874
+ return contents;
875
+ };
876
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
877
+ const parsedOutput = {
878
+ ...output,
879
+ body: await parseErrorBody(output.body, context),
880
+ };
881
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
882
+ switch (errorCode) {
883
+ case "InternalServiceError":
884
+ case "com.amazonaws.appintegrations#InternalServiceError":
885
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
886
+ case "InvalidRequestException":
887
+ case "com.amazonaws.appintegrations#InvalidRequestException":
888
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
889
+ case "ResourceNotFoundException":
890
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
891
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
892
+ case "ThrottlingException":
893
+ case "com.amazonaws.appintegrations#ThrottlingException":
894
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
895
+ default:
896
+ const parsedBody = parsedOutput.body;
897
+ throwDefaultError({
898
+ output,
899
+ parsedBody,
900
+ exceptionCtor: __BaseException,
901
+ errorCode,
902
+ });
903
+ }
904
+ };
905
+ export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
906
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
907
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
908
+ }
909
+ const contents = map({
910
+ $metadata: deserializeMetadata(output),
1420
911
  });
1421
- }); };
1422
- export var deserializeAws_restJson1UpdateEventIntegrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1423
- var contents;
1424
- return __generator(this, function (_a) {
1425
- switch (_a.label) {
1426
- case 0:
1427
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1428
- return [2, deserializeAws_restJson1UpdateEventIntegrationCommandError(output, context)];
1429
- }
1430
- contents = map({
1431
- $metadata: deserializeMetadata(output),
1432
- });
1433
- return [4, collectBody(output.body, context)];
1434
- case 1:
1435
- _a.sent();
1436
- return [2, contents];
1437
- }
912
+ await collectBody(output.body, context);
913
+ return contents;
914
+ };
915
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
916
+ const parsedOutput = {
917
+ ...output,
918
+ body: await parseErrorBody(output.body, context),
919
+ };
920
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
+ switch (errorCode) {
922
+ case "InternalServiceError":
923
+ case "com.amazonaws.appintegrations#InternalServiceError":
924
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
925
+ case "InvalidRequestException":
926
+ case "com.amazonaws.appintegrations#InvalidRequestException":
927
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
928
+ case "ResourceNotFoundException":
929
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
930
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
931
+ case "ThrottlingException":
932
+ case "com.amazonaws.appintegrations#ThrottlingException":
933
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
934
+ default:
935
+ const parsedBody = parsedOutput.body;
936
+ throwDefaultError({
937
+ output,
938
+ parsedBody,
939
+ exceptionCtor: __BaseException,
940
+ errorCode,
941
+ });
942
+ }
943
+ };
944
+ export const deserializeAws_restJson1UpdateDataIntegrationCommand = async (output, context) => {
945
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
946
+ return deserializeAws_restJson1UpdateDataIntegrationCommandError(output, context);
947
+ }
948
+ const contents = map({
949
+ $metadata: deserializeMetadata(output),
1438
950
  });
1439
- }); };
1440
- var deserializeAws_restJson1UpdateEventIntegrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1441
- var parsedOutput, _a, errorCode, _b, parsedBody;
1442
- var _c;
1443
- return __generator(this, function (_d) {
1444
- switch (_d.label) {
1445
- case 0:
1446
- _a = [__assign({}, output)];
1447
- _c = {};
1448
- return [4, parseErrorBody(output.body, context)];
1449
- case 1:
1450
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1451
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1452
- _b = errorCode;
1453
- switch (_b) {
1454
- case "AccessDeniedException": return [3, 2];
1455
- case "com.amazonaws.appintegrations#AccessDeniedException": return [3, 2];
1456
- case "InternalServiceError": return [3, 4];
1457
- case "com.amazonaws.appintegrations#InternalServiceError": return [3, 4];
1458
- case "InvalidRequestException": return [3, 6];
1459
- case "com.amazonaws.appintegrations#InvalidRequestException": return [3, 6];
1460
- case "ResourceNotFoundException": return [3, 8];
1461
- case "com.amazonaws.appintegrations#ResourceNotFoundException": return [3, 8];
1462
- case "ThrottlingException": return [3, 10];
1463
- case "com.amazonaws.appintegrations#ThrottlingException": return [3, 10];
1464
- }
1465
- return [3, 12];
1466
- case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1467
- case 3: throw _d.sent();
1468
- case 4: return [4, deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context)];
1469
- case 5: throw _d.sent();
1470
- case 6: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
1471
- case 7: throw _d.sent();
1472
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1473
- case 9: throw _d.sent();
1474
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
1475
- case 11: throw _d.sent();
1476
- case 12:
1477
- parsedBody = parsedOutput.body;
1478
- throwDefaultError({
1479
- output: output,
1480
- parsedBody: parsedBody,
1481
- exceptionCtor: __BaseException,
1482
- errorCode: errorCode,
1483
- });
1484
- _d.label = 13;
1485
- case 13: return [2];
1486
- }
951
+ await collectBody(output.body, context);
952
+ return contents;
953
+ };
954
+ const deserializeAws_restJson1UpdateDataIntegrationCommandError = async (output, context) => {
955
+ const parsedOutput = {
956
+ ...output,
957
+ body: await parseErrorBody(output.body, context),
958
+ };
959
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
960
+ switch (errorCode) {
961
+ case "AccessDeniedException":
962
+ case "com.amazonaws.appintegrations#AccessDeniedException":
963
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
964
+ case "InternalServiceError":
965
+ case "com.amazonaws.appintegrations#InternalServiceError":
966
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
967
+ case "InvalidRequestException":
968
+ case "com.amazonaws.appintegrations#InvalidRequestException":
969
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
970
+ case "ResourceNotFoundException":
971
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
972
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
973
+ case "ThrottlingException":
974
+ case "com.amazonaws.appintegrations#ThrottlingException":
975
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
976
+ default:
977
+ const parsedBody = parsedOutput.body;
978
+ throwDefaultError({
979
+ output,
980
+ parsedBody,
981
+ exceptionCtor: __BaseException,
982
+ errorCode,
983
+ });
984
+ }
985
+ };
986
+ export const deserializeAws_restJson1UpdateEventIntegrationCommand = async (output, context) => {
987
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
988
+ return deserializeAws_restJson1UpdateEventIntegrationCommandError(output, context);
989
+ }
990
+ const contents = map({
991
+ $metadata: deserializeMetadata(output),
1487
992
  });
1488
- }); };
1489
- var map = __map;
1490
- var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1491
- var contents, data, exception;
1492
- return __generator(this, function (_a) {
1493
- contents = map({});
1494
- data = parsedOutput.body;
1495
- if (data.Message != null) {
1496
- contents.Message = __expectString(data.Message);
1497
- }
1498
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1499
- return [2, __decorateServiceException(exception, parsedOutput.body)];
993
+ await collectBody(output.body, context);
994
+ return contents;
995
+ };
996
+ const deserializeAws_restJson1UpdateEventIntegrationCommandError = async (output, context) => {
997
+ const parsedOutput = {
998
+ ...output,
999
+ body: await parseErrorBody(output.body, context),
1000
+ };
1001
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1002
+ switch (errorCode) {
1003
+ case "AccessDeniedException":
1004
+ case "com.amazonaws.appintegrations#AccessDeniedException":
1005
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1006
+ case "InternalServiceError":
1007
+ case "com.amazonaws.appintegrations#InternalServiceError":
1008
+ throw await deserializeAws_restJson1InternalServiceErrorResponse(parsedOutput, context);
1009
+ case "InvalidRequestException":
1010
+ case "com.amazonaws.appintegrations#InvalidRequestException":
1011
+ throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
1012
+ case "ResourceNotFoundException":
1013
+ case "com.amazonaws.appintegrations#ResourceNotFoundException":
1014
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1015
+ case "ThrottlingException":
1016
+ case "com.amazonaws.appintegrations#ThrottlingException":
1017
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
1018
+ default:
1019
+ const parsedBody = parsedOutput.body;
1020
+ throwDefaultError({
1021
+ output,
1022
+ parsedBody,
1023
+ exceptionCtor: __BaseException,
1024
+ errorCode,
1025
+ });
1026
+ }
1027
+ };
1028
+ const map = __map;
1029
+ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1030
+ const contents = map({});
1031
+ const data = parsedOutput.body;
1032
+ if (data.Message != null) {
1033
+ contents.Message = __expectString(data.Message);
1034
+ }
1035
+ const exception = new AccessDeniedException({
1036
+ $metadata: deserializeMetadata(parsedOutput),
1037
+ ...contents,
1500
1038
  });
1501
- }); };
1502
- var deserializeAws_restJson1DuplicateResourceExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1503
- var contents, data, exception;
1504
- return __generator(this, function (_a) {
1505
- contents = map({});
1506
- data = parsedOutput.body;
1507
- if (data.Message != null) {
1508
- contents.Message = __expectString(data.Message);
1509
- }
1510
- exception = new DuplicateResourceException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1511
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1039
+ return __decorateServiceException(exception, parsedOutput.body);
1040
+ };
1041
+ const deserializeAws_restJson1DuplicateResourceExceptionResponse = async (parsedOutput, context) => {
1042
+ const contents = map({});
1043
+ const data = parsedOutput.body;
1044
+ if (data.Message != null) {
1045
+ contents.Message = __expectString(data.Message);
1046
+ }
1047
+ const exception = new DuplicateResourceException({
1048
+ $metadata: deserializeMetadata(parsedOutput),
1049
+ ...contents,
1512
1050
  });
1513
- }); };
1514
- var deserializeAws_restJson1InternalServiceErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1515
- var contents, data, exception;
1516
- return __generator(this, function (_a) {
1517
- contents = map({});
1518
- data = parsedOutput.body;
1519
- if (data.Message != null) {
1520
- contents.Message = __expectString(data.Message);
1521
- }
1522
- exception = new InternalServiceError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1523
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1051
+ return __decorateServiceException(exception, parsedOutput.body);
1052
+ };
1053
+ const deserializeAws_restJson1InternalServiceErrorResponse = async (parsedOutput, context) => {
1054
+ const contents = map({});
1055
+ const data = parsedOutput.body;
1056
+ if (data.Message != null) {
1057
+ contents.Message = __expectString(data.Message);
1058
+ }
1059
+ const exception = new InternalServiceError({
1060
+ $metadata: deserializeMetadata(parsedOutput),
1061
+ ...contents,
1524
1062
  });
1525
- }); };
1526
- var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1527
- var contents, data, exception;
1528
- return __generator(this, function (_a) {
1529
- contents = map({});
1530
- data = parsedOutput.body;
1531
- if (data.Message != null) {
1532
- contents.Message = __expectString(data.Message);
1533
- }
1534
- exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1535
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1063
+ return __decorateServiceException(exception, parsedOutput.body);
1064
+ };
1065
+ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
1066
+ const contents = map({});
1067
+ const data = parsedOutput.body;
1068
+ if (data.Message != null) {
1069
+ contents.Message = __expectString(data.Message);
1070
+ }
1071
+ const exception = new InvalidRequestException({
1072
+ $metadata: deserializeMetadata(parsedOutput),
1073
+ ...contents,
1536
1074
  });
1537
- }); };
1538
- var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1539
- var contents, data, exception;
1540
- return __generator(this, function (_a) {
1541
- contents = map({});
1542
- data = parsedOutput.body;
1543
- if (data.Message != null) {
1544
- contents.Message = __expectString(data.Message);
1545
- }
1546
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1547
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1075
+ return __decorateServiceException(exception, parsedOutput.body);
1076
+ };
1077
+ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1078
+ const contents = map({});
1079
+ const data = parsedOutput.body;
1080
+ if (data.Message != null) {
1081
+ contents.Message = __expectString(data.Message);
1082
+ }
1083
+ const exception = new ResourceNotFoundException({
1084
+ $metadata: deserializeMetadata(parsedOutput),
1085
+ ...contents,
1548
1086
  });
1549
- }); };
1550
- var deserializeAws_restJson1ResourceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1551
- var contents, data, exception;
1552
- return __generator(this, function (_a) {
1553
- contents = map({});
1554
- data = parsedOutput.body;
1555
- if (data.Message != null) {
1556
- contents.Message = __expectString(data.Message);
1557
- }
1558
- exception = new ResourceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1559
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1087
+ return __decorateServiceException(exception, parsedOutput.body);
1088
+ };
1089
+ const deserializeAws_restJson1ResourceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
1090
+ const contents = map({});
1091
+ const data = parsedOutput.body;
1092
+ if (data.Message != null) {
1093
+ contents.Message = __expectString(data.Message);
1094
+ }
1095
+ const exception = new ResourceQuotaExceededException({
1096
+ $metadata: deserializeMetadata(parsedOutput),
1097
+ ...contents,
1560
1098
  });
1561
- }); };
1562
- var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1563
- var contents, data, exception;
1564
- return __generator(this, function (_a) {
1565
- contents = map({});
1566
- data = parsedOutput.body;
1567
- if (data.Message != null) {
1568
- contents.Message = __expectString(data.Message);
1569
- }
1570
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
1571
- return [2, __decorateServiceException(exception, parsedOutput.body)];
1099
+ return __decorateServiceException(exception, parsedOutput.body);
1100
+ };
1101
+ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1102
+ const contents = map({});
1103
+ const data = parsedOutput.body;
1104
+ if (data.Message != null) {
1105
+ contents.Message = __expectString(data.Message);
1106
+ }
1107
+ const exception = new ThrottlingException({
1108
+ $metadata: deserializeMetadata(parsedOutput),
1109
+ ...contents,
1572
1110
  });
1573
- }); };
1574
- var serializeAws_restJson1EventFilter = function (input, context) {
1575
- return __assign({}, (input.Source != null && { Source: input.Source }));
1111
+ return __decorateServiceException(exception, parsedOutput.body);
1112
+ };
1113
+ const serializeAws_restJson1EventFilter = (input, context) => {
1114
+ return {
1115
+ ...(input.Source != null && { Source: input.Source }),
1116
+ };
1576
1117
  };
1577
- var serializeAws_restJson1ScheduleConfiguration = function (input, context) {
1578
- return __assign(__assign(__assign({}, (input.FirstExecutionFrom != null && { FirstExecutionFrom: input.FirstExecutionFrom })), (input.Object != null && { Object: input.Object })), (input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }));
1118
+ const serializeAws_restJson1ScheduleConfiguration = (input, context) => {
1119
+ return {
1120
+ ...(input.FirstExecutionFrom != null && { FirstExecutionFrom: input.FirstExecutionFrom }),
1121
+ ...(input.Object != null && { Object: input.Object }),
1122
+ ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
1123
+ };
1579
1124
  };
1580
- var serializeAws_restJson1TagMap = function (input, context) {
1581
- return Object.entries(input).reduce(function (acc, _a) {
1582
- var _b;
1583
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1125
+ const serializeAws_restJson1TagMap = (input, context) => {
1126
+ return Object.entries(input).reduce((acc, [key, value]) => {
1584
1127
  if (value === null) {
1585
1128
  return acc;
1586
1129
  }
1587
- return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1130
+ return {
1131
+ ...acc,
1132
+ [key]: value,
1133
+ };
1588
1134
  }, {});
1589
1135
  };
1590
- var deserializeAws_restJson1ClientAssociationMetadata = function (output, context) {
1591
- return Object.entries(output).reduce(function (acc, _a) {
1592
- var _b;
1593
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1136
+ const deserializeAws_restJson1ClientAssociationMetadata = (output, context) => {
1137
+ return Object.entries(output).reduce((acc, [key, value]) => {
1594
1138
  if (value === null) {
1595
1139
  return acc;
1596
1140
  }
1597
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1141
+ return {
1142
+ ...acc,
1143
+ [key]: __expectString(value),
1144
+ };
1598
1145
  }, {});
1599
1146
  };
1600
- var deserializeAws_restJson1DataIntegrationAssociationsList = function (output, context) {
1601
- var retVal = (output || [])
1602
- .filter(function (e) { return e != null; })
1603
- .map(function (entry) {
1147
+ const deserializeAws_restJson1DataIntegrationAssociationsList = (output, context) => {
1148
+ const retVal = (output || [])
1149
+ .filter((e) => e != null)
1150
+ .map((entry) => {
1604
1151
  if (entry === null) {
1605
1152
  return null;
1606
1153
  }
@@ -1608,17 +1155,17 @@ var deserializeAws_restJson1DataIntegrationAssociationsList = function (output,
1608
1155
  });
1609
1156
  return retVal;
1610
1157
  };
1611
- var deserializeAws_restJson1DataIntegrationAssociationSummary = function (output, context) {
1158
+ const deserializeAws_restJson1DataIntegrationAssociationSummary = (output, context) => {
1612
1159
  return {
1613
1160
  ClientId: __expectString(output.ClientId),
1614
1161
  DataIntegrationArn: __expectString(output.DataIntegrationArn),
1615
1162
  DataIntegrationAssociationArn: __expectString(output.DataIntegrationAssociationArn),
1616
1163
  };
1617
1164
  };
1618
- var deserializeAws_restJson1DataIntegrationsList = function (output, context) {
1619
- var retVal = (output || [])
1620
- .filter(function (e) { return e != null; })
1621
- .map(function (entry) {
1165
+ const deserializeAws_restJson1DataIntegrationsList = (output, context) => {
1166
+ const retVal = (output || [])
1167
+ .filter((e) => e != null)
1168
+ .map((entry) => {
1622
1169
  if (entry === null) {
1623
1170
  return null;
1624
1171
  }
@@ -1626,19 +1173,19 @@ var deserializeAws_restJson1DataIntegrationsList = function (output, context) {
1626
1173
  });
1627
1174
  return retVal;
1628
1175
  };
1629
- var deserializeAws_restJson1DataIntegrationSummary = function (output, context) {
1176
+ const deserializeAws_restJson1DataIntegrationSummary = (output, context) => {
1630
1177
  return {
1631
1178
  Arn: __expectString(output.Arn),
1632
1179
  Name: __expectString(output.Name),
1633
1180
  SourceURI: __expectString(output.SourceURI),
1634
1181
  };
1635
1182
  };
1636
- var deserializeAws_restJson1EventFilter = function (output, context) {
1183
+ const deserializeAws_restJson1EventFilter = (output, context) => {
1637
1184
  return {
1638
1185
  Source: __expectString(output.Source),
1639
1186
  };
1640
1187
  };
1641
- var deserializeAws_restJson1EventIntegration = function (output, context) {
1188
+ const deserializeAws_restJson1EventIntegration = (output, context) => {
1642
1189
  return {
1643
1190
  Description: __expectString(output.Description),
1644
1191
  EventBridgeBus: __expectString(output.EventBridgeBus),
@@ -1648,7 +1195,7 @@ var deserializeAws_restJson1EventIntegration = function (output, context) {
1648
1195
  Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
1649
1196
  };
1650
1197
  };
1651
- var deserializeAws_restJson1EventIntegrationAssociation = function (output, context) {
1198
+ const deserializeAws_restJson1EventIntegrationAssociation = (output, context) => {
1652
1199
  return {
1653
1200
  ClientAssociationMetadata: output.ClientAssociationMetadata != null
1654
1201
  ? deserializeAws_restJson1ClientAssociationMetadata(output.ClientAssociationMetadata, context)
@@ -1660,10 +1207,10 @@ var deserializeAws_restJson1EventIntegrationAssociation = function (output, cont
1660
1207
  EventIntegrationName: __expectString(output.EventIntegrationName),
1661
1208
  };
1662
1209
  };
1663
- var deserializeAws_restJson1EventIntegrationAssociationsList = function (output, context) {
1664
- var retVal = (output || [])
1665
- .filter(function (e) { return e != null; })
1666
- .map(function (entry) {
1210
+ const deserializeAws_restJson1EventIntegrationAssociationsList = (output, context) => {
1211
+ const retVal = (output || [])
1212
+ .filter((e) => e != null)
1213
+ .map((entry) => {
1667
1214
  if (entry === null) {
1668
1215
  return null;
1669
1216
  }
@@ -1671,10 +1218,10 @@ var deserializeAws_restJson1EventIntegrationAssociationsList = function (output,
1671
1218
  });
1672
1219
  return retVal;
1673
1220
  };
1674
- var deserializeAws_restJson1EventIntegrationsList = function (output, context) {
1675
- var retVal = (output || [])
1676
- .filter(function (e) { return e != null; })
1677
- .map(function (entry) {
1221
+ const deserializeAws_restJson1EventIntegrationsList = (output, context) => {
1222
+ const retVal = (output || [])
1223
+ .filter((e) => e != null)
1224
+ .map((entry) => {
1678
1225
  if (entry === null) {
1679
1226
  return null;
1680
1227
  }
@@ -1682,74 +1229,57 @@ var deserializeAws_restJson1EventIntegrationsList = function (output, context) {
1682
1229
  });
1683
1230
  return retVal;
1684
1231
  };
1685
- var deserializeAws_restJson1ScheduleConfiguration = function (output, context) {
1232
+ const deserializeAws_restJson1ScheduleConfiguration = (output, context) => {
1686
1233
  return {
1687
1234
  FirstExecutionFrom: __expectString(output.FirstExecutionFrom),
1688
1235
  Object: __expectString(output.Object),
1689
1236
  ScheduleExpression: __expectString(output.ScheduleExpression),
1690
1237
  };
1691
1238
  };
1692
- var deserializeAws_restJson1TagMap = function (output, context) {
1693
- return Object.entries(output).reduce(function (acc, _a) {
1694
- var _b;
1695
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1239
+ const deserializeAws_restJson1TagMap = (output, context) => {
1240
+ return Object.entries(output).reduce((acc, [key, value]) => {
1696
1241
  if (value === null) {
1697
1242
  return acc;
1698
1243
  }
1699
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1244
+ return {
1245
+ ...acc,
1246
+ [key]: __expectString(value),
1247
+ };
1700
1248
  }, {});
1701
1249
  };
1702
- var deserializeMetadata = function (output) {
1703
- var _a, _b;
1704
- return ({
1705
- httpStatusCode: output.statusCode,
1706
- 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"],
1707
- extendedRequestId: output.headers["x-amz-id-2"],
1708
- cfId: output.headers["x-amz-cf-id"],
1709
- });
1710
- };
1711
- var collectBody = function (streamBody, context) {
1712
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
1250
+ const deserializeMetadata = (output) => ({
1251
+ httpStatusCode: output.statusCode,
1252
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1253
+ extendedRequestId: output.headers["x-amz-id-2"],
1254
+ cfId: output.headers["x-amz-cf-id"],
1255
+ });
1256
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1713
1257
  if (streamBody instanceof Uint8Array) {
1714
1258
  return Promise.resolve(streamBody);
1715
1259
  }
1716
1260
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1717
1261
  };
1718
- var collectBodyString = function (streamBody, context) {
1719
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1720
- };
1721
- var isSerializableHeaderValue = function (value) {
1722
- return value !== undefined &&
1723
- value !== null &&
1724
- value !== "" &&
1725
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1726
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1727
- };
1728
- var parseBody = function (streamBody, context) {
1729
- return collectBodyString(streamBody, context).then(function (encoded) {
1730
- if (encoded.length) {
1731
- return JSON.parse(encoded);
1732
- }
1733
- return {};
1734
- });
1262
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1263
+ const isSerializableHeaderValue = (value) => value !== undefined &&
1264
+ value !== null &&
1265
+ value !== "" &&
1266
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1267
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1268
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1269
+ if (encoded.length) {
1270
+ return JSON.parse(encoded);
1271
+ }
1272
+ return {};
1273
+ });
1274
+ const parseErrorBody = async (errorBody, context) => {
1275
+ const value = await parseBody(errorBody, context);
1276
+ value.message = value.message ?? value.Message;
1277
+ return value;
1735
1278
  };
1736
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1737
- var value;
1738
- var _a;
1739
- return __generator(this, function (_b) {
1740
- switch (_b.label) {
1741
- case 0: return [4, parseBody(errorBody, context)];
1742
- case 1:
1743
- value = _b.sent();
1744
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1745
- return [2, value];
1746
- }
1747
- });
1748
- }); };
1749
- var loadRestJsonErrorCode = function (output, data) {
1750
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1751
- var sanitizeErrorCode = function (rawValue) {
1752
- var cleanValue = rawValue;
1279
+ const loadRestJsonErrorCode = (output, data) => {
1280
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1281
+ const sanitizeErrorCode = (rawValue) => {
1282
+ let cleanValue = rawValue;
1753
1283
  if (typeof cleanValue === "number") {
1754
1284
  cleanValue = cleanValue.toString();
1755
1285
  }
@@ -1764,7 +1294,7 @@ var loadRestJsonErrorCode = function (output, data) {
1764
1294
  }
1765
1295
  return cleanValue;
1766
1296
  };
1767
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1297
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1768
1298
  if (headerKey !== undefined) {
1769
1299
  return sanitizeErrorCode(output.headers[headerKey]);
1770
1300
  }