@aws-sdk/client-health 3.181.0 → 3.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/Health.js +54 -61
  3. package/dist-es/HealthClient.js +22 -28
  4. package/dist-es/commands/DescribeAffectedAccountsForOrganizationCommand.js +21 -28
  5. package/dist-es/commands/DescribeAffectedEntitiesCommand.js +21 -28
  6. package/dist-es/commands/DescribeAffectedEntitiesForOrganizationCommand.js +21 -28
  7. package/dist-es/commands/DescribeEntityAggregatesCommand.js +21 -28
  8. package/dist-es/commands/DescribeEventAggregatesCommand.js +21 -28
  9. package/dist-es/commands/DescribeEventDetailsCommand.js +21 -28
  10. package/dist-es/commands/DescribeEventDetailsForOrganizationCommand.js +21 -28
  11. package/dist-es/commands/DescribeEventTypesCommand.js +21 -28
  12. package/dist-es/commands/DescribeEventsCommand.js +21 -28
  13. package/dist-es/commands/DescribeEventsForOrganizationCommand.js +21 -28
  14. package/dist-es/commands/DescribeHealthServiceStatusForOrganizationCommand.js +22 -29
  15. package/dist-es/commands/DisableHealthServiceAccessForOrganizationCommand.js +23 -30
  16. package/dist-es/commands/EnableHealthServiceAccessForOrganizationCommand.js +23 -30
  17. package/dist-es/endpoints.js +8 -8
  18. package/dist-es/models/HealthServiceException.js +5 -10
  19. package/dist-es/models/models_0.js +150 -73
  20. package/dist-es/pagination/DescribeAffectedAccountsForOrganizationPaginator.js +25 -68
  21. package/dist-es/pagination/DescribeAffectedEntitiesForOrganizationPaginator.js +25 -68
  22. package/dist-es/pagination/DescribeAffectedEntitiesPaginator.js +25 -68
  23. package/dist-es/pagination/DescribeEventAggregatesPaginator.js +25 -68
  24. package/dist-es/pagination/DescribeEventTypesPaginator.js +25 -68
  25. package/dist-es/pagination/DescribeEventsForOrganizationPaginator.js +25 -68
  26. package/dist-es/pagination/DescribeEventsPaginator.js +25 -68
  27. package/dist-es/protocols/Aws_json1_1.js +908 -1110
  28. package/dist-es/runtimeConfig.browser.js +26 -12
  29. package/dist-es/runtimeConfig.js +30 -12
  30. package/dist-es/runtimeConfig.native.js +8 -5
  31. package/dist-es/runtimeConfig.shared.js +8 -11
  32. package/package.json +33 -33
@@ -1,1067 +1,886 @@
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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { HealthServiceException as __BaseException } from "../models/HealthServiceException";
5
4
  import { ConcurrentModificationException, InvalidPaginationToken, UnsupportedLocale, } from "../models/models_0";
6
- export var serializeAws_json1_1DescribeAffectedAccountsForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedAccountsForOrganization",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1DescribeAffectedAccountsForOrganizationRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_1DescribeAffectedEntitiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntities",
23
- };
24
- body = JSON.stringify(serializeAws_json1_1DescribeAffectedEntitiesRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var headers, body;
30
- return __generator(this, function (_a) {
31
- headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntitiesForOrganization",
34
- };
35
- body = JSON.stringify(serializeAws_json1_1DescribeAffectedEntitiesForOrganizationRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_1DescribeEntityAggregatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
- var headers, body;
41
- return __generator(this, function (_a) {
42
- headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSHealth_20160804.DescribeEntityAggregates",
45
- };
46
- body = JSON.stringify(serializeAws_json1_1DescribeEntityAggregatesRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_1DescribeEventAggregatesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
- var headers, body;
52
- return __generator(this, function (_a) {
53
- headers = {
54
- "content-type": "application/x-amz-json-1.1",
55
- "x-amz-target": "AWSHealth_20160804.DescribeEventAggregates",
56
- };
57
- body = JSON.stringify(serializeAws_json1_1DescribeEventAggregatesRequest(input, context));
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_1DescribeEventDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
- var headers, body;
63
- return __generator(this, function (_a) {
64
- headers = {
65
- "content-type": "application/x-amz-json-1.1",
66
- "x-amz-target": "AWSHealth_20160804.DescribeEventDetails",
67
- };
68
- body = JSON.stringify(serializeAws_json1_1DescribeEventDetailsRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_1DescribeEventDetailsForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
- var headers, body;
74
- return __generator(this, function (_a) {
75
- headers = {
76
- "content-type": "application/x-amz-json-1.1",
77
- "x-amz-target": "AWSHealth_20160804.DescribeEventDetailsForOrganization",
78
- };
79
- body = JSON.stringify(serializeAws_json1_1DescribeEventDetailsForOrganizationRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_1DescribeEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
- var headers, body;
85
- return __generator(this, function (_a) {
86
- headers = {
87
- "content-type": "application/x-amz-json-1.1",
88
- "x-amz-target": "AWSHealth_20160804.DescribeEvents",
89
- };
90
- body = JSON.stringify(serializeAws_json1_1DescribeEventsRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_1DescribeEventsForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var headers, body;
96
- return __generator(this, function (_a) {
97
- headers = {
98
- "content-type": "application/x-amz-json-1.1",
99
- "x-amz-target": "AWSHealth_20160804.DescribeEventsForOrganization",
100
- };
101
- body = JSON.stringify(serializeAws_json1_1DescribeEventsForOrganizationRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_1DescribeEventTypesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
- var headers, body;
107
- return __generator(this, function (_a) {
108
- headers = {
109
- "content-type": "application/x-amz-json-1.1",
110
- "x-amz-target": "AWSHealth_20160804.DescribeEventTypes",
111
- };
112
- body = JSON.stringify(serializeAws_json1_1DescribeEventTypesRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
- var headers, body;
118
- return __generator(this, function (_a) {
119
- headers = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "AWSHealth_20160804.DescribeHealthServiceStatusForOrganization",
122
- };
123
- body = "{}";
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_1DisableHealthServiceAccessForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
- var headers, body;
129
- return __generator(this, function (_a) {
130
- headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "AWSHealth_20160804.DisableHealthServiceAccessForOrganization",
133
- };
134
- body = "{}";
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_1EnableHealthServiceAccessForOrganizationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
- var headers, body;
140
- return __generator(this, function (_a) {
141
- headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSHealth_20160804.EnableHealthServiceAccessForOrganization",
144
- };
145
- body = "{}";
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
150
- var data, contents, response;
151
- return __generator(this, function (_a) {
152
- switch (_a.label) {
153
- case 0:
154
- if (output.statusCode >= 300) {
155
- return [2, deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommandError(output, context)];
156
- }
157
- return [4, parseBody(output.body, context)];
158
- case 1:
159
- data = _a.sent();
160
- contents = {};
161
- contents = deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse(data, context);
162
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
163
- return [2, Promise.resolve(response)];
164
- }
165
- });
166
- }); };
167
- var deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
168
- var parsedOutput, _a, errorCode, _b, parsedBody;
169
- var _c;
170
- return __generator(this, function (_d) {
171
- switch (_d.label) {
172
- case 0:
173
- _a = [__assign({}, output)];
174
- _c = {};
175
- return [4, parseErrorBody(output.body, context)];
176
- case 1:
177
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
178
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
179
- _b = errorCode;
180
- switch (_b) {
181
- case "InvalidPaginationToken": return [3, 2];
182
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
183
- }
184
- return [3, 4];
185
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
186
- case 3: throw _d.sent();
187
- case 4:
188
- parsedBody = parsedOutput.body;
189
- throwDefaultError({
190
- output: output,
191
- parsedBody: parsedBody,
192
- exceptionCtor: __BaseException,
193
- errorCode: errorCode,
194
- });
195
- _d.label = 5;
196
- case 5: return [2];
197
- }
198
- });
199
- }); };
200
- export var deserializeAws_json1_1DescribeAffectedEntitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
201
- var data, contents, response;
202
- return __generator(this, function (_a) {
203
- switch (_a.label) {
204
- case 0:
205
- if (output.statusCode >= 300) {
206
- return [2, deserializeAws_json1_1DescribeAffectedEntitiesCommandError(output, context)];
207
- }
208
- return [4, parseBody(output.body, context)];
209
- case 1:
210
- data = _a.sent();
211
- contents = {};
212
- contents = deserializeAws_json1_1DescribeAffectedEntitiesResponse(data, context);
213
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
214
- return [2, Promise.resolve(response)];
215
- }
216
- });
217
- }); };
218
- var deserializeAws_json1_1DescribeAffectedEntitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
219
- var parsedOutput, _a, errorCode, _b, parsedBody;
220
- var _c;
221
- return __generator(this, function (_d) {
222
- switch (_d.label) {
223
- case 0:
224
- _a = [__assign({}, output)];
225
- _c = {};
226
- return [4, parseErrorBody(output.body, context)];
227
- case 1:
228
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
229
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
230
- _b = errorCode;
231
- switch (_b) {
232
- case "InvalidPaginationToken": return [3, 2];
233
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
234
- case "UnsupportedLocale": return [3, 4];
235
- case "com.amazonaws.health#UnsupportedLocale": return [3, 4];
236
- }
237
- return [3, 6];
238
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
239
- case 3: throw _d.sent();
240
- case 4: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
241
- case 5: throw _d.sent();
242
- case 6:
243
- parsedBody = parsedOutput.body;
244
- throwDefaultError({
245
- output: output,
246
- parsedBody: parsedBody,
247
- exceptionCtor: __BaseException,
248
- errorCode: errorCode,
249
- });
250
- _d.label = 7;
251
- case 7: return [2];
252
- }
253
- });
254
- }); };
255
- export var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
256
- var data, contents, response;
257
- return __generator(this, function (_a) {
258
- switch (_a.label) {
259
- case 0:
260
- if (output.statusCode >= 300) {
261
- return [2, deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommandError(output, context)];
262
- }
263
- return [4, parseBody(output.body, context)];
264
- case 1:
265
- data = _a.sent();
266
- contents = {};
267
- contents = deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse(data, context);
268
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
269
- return [2, Promise.resolve(response)];
270
- }
271
- });
272
- }); };
273
- var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
274
- var parsedOutput, _a, errorCode, _b, parsedBody;
275
- var _c;
276
- return __generator(this, function (_d) {
277
- switch (_d.label) {
278
- case 0:
279
- _a = [__assign({}, output)];
280
- _c = {};
281
- return [4, parseErrorBody(output.body, context)];
282
- case 1:
283
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
284
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
285
- _b = errorCode;
286
- switch (_b) {
287
- case "InvalidPaginationToken": return [3, 2];
288
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
289
- case "UnsupportedLocale": return [3, 4];
290
- case "com.amazonaws.health#UnsupportedLocale": return [3, 4];
291
- }
292
- return [3, 6];
293
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
294
- case 3: throw _d.sent();
295
- case 4: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
296
- case 5: throw _d.sent();
297
- case 6:
298
- parsedBody = parsedOutput.body;
299
- throwDefaultError({
300
- output: output,
301
- parsedBody: parsedBody,
302
- exceptionCtor: __BaseException,
303
- errorCode: errorCode,
304
- });
305
- _d.label = 7;
306
- case 7: return [2];
307
- }
308
- });
309
- }); };
310
- export var deserializeAws_json1_1DescribeEntityAggregatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
311
- var data, contents, response;
312
- return __generator(this, function (_a) {
313
- switch (_a.label) {
314
- case 0:
315
- if (output.statusCode >= 300) {
316
- return [2, deserializeAws_json1_1DescribeEntityAggregatesCommandError(output, context)];
317
- }
318
- return [4, parseBody(output.body, context)];
319
- case 1:
320
- data = _a.sent();
321
- contents = {};
322
- contents = deserializeAws_json1_1DescribeEntityAggregatesResponse(data, context);
323
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
324
- return [2, Promise.resolve(response)];
325
- }
326
- });
327
- }); };
328
- var deserializeAws_json1_1DescribeEntityAggregatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
329
- var parsedOutput, _a, errorCode, parsedBody;
330
- var _b;
331
- return __generator(this, function (_c) {
332
- switch (_c.label) {
333
- case 0:
334
- _a = [__assign({}, output)];
335
- _b = {};
336
- return [4, parseErrorBody(output.body, context)];
337
- case 1:
338
- parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
339
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
340
- parsedBody = parsedOutput.body;
341
- throwDefaultError({
342
- output: output,
343
- parsedBody: parsedBody,
344
- exceptionCtor: __BaseException,
345
- errorCode: errorCode,
346
- });
347
- return [2];
348
- }
349
- });
350
- }); };
351
- export var deserializeAws_json1_1DescribeEventAggregatesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
352
- var data, contents, response;
353
- return __generator(this, function (_a) {
354
- switch (_a.label) {
355
- case 0:
356
- if (output.statusCode >= 300) {
357
- return [2, deserializeAws_json1_1DescribeEventAggregatesCommandError(output, context)];
358
- }
359
- return [4, parseBody(output.body, context)];
360
- case 1:
361
- data = _a.sent();
362
- contents = {};
363
- contents = deserializeAws_json1_1DescribeEventAggregatesResponse(data, context);
364
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
365
- return [2, Promise.resolve(response)];
366
- }
367
- });
368
- }); };
369
- var deserializeAws_json1_1DescribeEventAggregatesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
370
- var parsedOutput, _a, errorCode, _b, parsedBody;
371
- var _c;
372
- return __generator(this, function (_d) {
373
- switch (_d.label) {
374
- case 0:
375
- _a = [__assign({}, output)];
376
- _c = {};
377
- return [4, parseErrorBody(output.body, context)];
378
- case 1:
379
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
380
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
381
- _b = errorCode;
382
- switch (_b) {
383
- case "InvalidPaginationToken": return [3, 2];
384
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
385
- }
386
- return [3, 4];
387
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
388
- case 3: throw _d.sent();
389
- case 4:
390
- parsedBody = parsedOutput.body;
391
- throwDefaultError({
392
- output: output,
393
- parsedBody: parsedBody,
394
- exceptionCtor: __BaseException,
395
- errorCode: errorCode,
396
- });
397
- _d.label = 5;
398
- case 5: return [2];
399
- }
400
- });
401
- }); };
402
- export var deserializeAws_json1_1DescribeEventDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
403
- var data, contents, response;
404
- return __generator(this, function (_a) {
405
- switch (_a.label) {
406
- case 0:
407
- if (output.statusCode >= 300) {
408
- return [2, deserializeAws_json1_1DescribeEventDetailsCommandError(output, context)];
409
- }
410
- return [4, parseBody(output.body, context)];
411
- case 1:
412
- data = _a.sent();
413
- contents = {};
414
- contents = deserializeAws_json1_1DescribeEventDetailsResponse(data, context);
415
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
416
- return [2, Promise.resolve(response)];
417
- }
418
- });
419
- }); };
420
- var deserializeAws_json1_1DescribeEventDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
421
- var parsedOutput, _a, errorCode, _b, parsedBody;
422
- var _c;
423
- return __generator(this, function (_d) {
424
- switch (_d.label) {
425
- case 0:
426
- _a = [__assign({}, output)];
427
- _c = {};
428
- return [4, parseErrorBody(output.body, context)];
429
- case 1:
430
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
431
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
432
- _b = errorCode;
433
- switch (_b) {
434
- case "UnsupportedLocale": return [3, 2];
435
- case "com.amazonaws.health#UnsupportedLocale": return [3, 2];
436
- }
437
- return [3, 4];
438
- case 2: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
439
- case 3: throw _d.sent();
440
- case 4:
441
- parsedBody = parsedOutput.body;
442
- throwDefaultError({
443
- output: output,
444
- parsedBody: parsedBody,
445
- exceptionCtor: __BaseException,
446
- errorCode: errorCode,
447
- });
448
- _d.label = 5;
449
- case 5: return [2];
450
- }
451
- });
452
- }); };
453
- export var deserializeAws_json1_1DescribeEventDetailsForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
454
- var data, contents, response;
455
- return __generator(this, function (_a) {
456
- switch (_a.label) {
457
- case 0:
458
- if (output.statusCode >= 300) {
459
- return [2, deserializeAws_json1_1DescribeEventDetailsForOrganizationCommandError(output, context)];
460
- }
461
- return [4, parseBody(output.body, context)];
462
- case 1:
463
- data = _a.sent();
464
- contents = {};
465
- contents = deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse(data, context);
466
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
467
- return [2, Promise.resolve(response)];
468
- }
469
- });
470
- }); };
471
- var deserializeAws_json1_1DescribeEventDetailsForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
472
- var parsedOutput, _a, errorCode, _b, parsedBody;
473
- var _c;
474
- return __generator(this, function (_d) {
475
- switch (_d.label) {
476
- case 0:
477
- _a = [__assign({}, output)];
478
- _c = {};
479
- return [4, parseErrorBody(output.body, context)];
480
- case 1:
481
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
482
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
483
- _b = errorCode;
484
- switch (_b) {
485
- case "UnsupportedLocale": return [3, 2];
486
- case "com.amazonaws.health#UnsupportedLocale": return [3, 2];
487
- }
488
- return [3, 4];
489
- case 2: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
490
- case 3: throw _d.sent();
491
- case 4:
492
- parsedBody = parsedOutput.body;
493
- throwDefaultError({
494
- output: output,
495
- parsedBody: parsedBody,
496
- exceptionCtor: __BaseException,
497
- errorCode: errorCode,
498
- });
499
- _d.label = 5;
500
- case 5: return [2];
501
- }
502
- });
503
- }); };
504
- export var deserializeAws_json1_1DescribeEventsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
505
- var data, contents, response;
506
- return __generator(this, function (_a) {
507
- switch (_a.label) {
508
- case 0:
509
- if (output.statusCode >= 300) {
510
- return [2, deserializeAws_json1_1DescribeEventsCommandError(output, context)];
511
- }
512
- return [4, parseBody(output.body, context)];
513
- case 1:
514
- data = _a.sent();
515
- contents = {};
516
- contents = deserializeAws_json1_1DescribeEventsResponse(data, context);
517
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
518
- return [2, Promise.resolve(response)];
519
- }
520
- });
521
- }); };
522
- var deserializeAws_json1_1DescribeEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
523
- var parsedOutput, _a, errorCode, _b, parsedBody;
524
- var _c;
525
- return __generator(this, function (_d) {
526
- switch (_d.label) {
527
- case 0:
528
- _a = [__assign({}, output)];
529
- _c = {};
530
- return [4, parseErrorBody(output.body, context)];
531
- case 1:
532
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
533
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
- _b = errorCode;
535
- switch (_b) {
536
- case "InvalidPaginationToken": return [3, 2];
537
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
538
- case "UnsupportedLocale": return [3, 4];
539
- case "com.amazonaws.health#UnsupportedLocale": return [3, 4];
540
- }
541
- return [3, 6];
542
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
543
- case 3: throw _d.sent();
544
- case 4: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
545
- case 5: throw _d.sent();
546
- case 6:
547
- parsedBody = parsedOutput.body;
548
- throwDefaultError({
549
- output: output,
550
- parsedBody: parsedBody,
551
- exceptionCtor: __BaseException,
552
- errorCode: errorCode,
553
- });
554
- _d.label = 7;
555
- case 7: return [2];
556
- }
557
- });
558
- }); };
559
- export var deserializeAws_json1_1DescribeEventsForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
560
- var data, contents, response;
561
- return __generator(this, function (_a) {
562
- switch (_a.label) {
563
- case 0:
564
- if (output.statusCode >= 300) {
565
- return [2, deserializeAws_json1_1DescribeEventsForOrganizationCommandError(output, context)];
566
- }
567
- return [4, parseBody(output.body, context)];
568
- case 1:
569
- data = _a.sent();
570
- contents = {};
571
- contents = deserializeAws_json1_1DescribeEventsForOrganizationResponse(data, context);
572
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
573
- return [2, Promise.resolve(response)];
574
- }
575
- });
576
- }); };
577
- var deserializeAws_json1_1DescribeEventsForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
578
- var parsedOutput, _a, errorCode, _b, parsedBody;
579
- var _c;
580
- return __generator(this, function (_d) {
581
- switch (_d.label) {
582
- case 0:
583
- _a = [__assign({}, output)];
584
- _c = {};
585
- return [4, parseErrorBody(output.body, context)];
586
- case 1:
587
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
588
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
589
- _b = errorCode;
590
- switch (_b) {
591
- case "InvalidPaginationToken": return [3, 2];
592
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
593
- case "UnsupportedLocale": return [3, 4];
594
- case "com.amazonaws.health#UnsupportedLocale": return [3, 4];
595
- }
596
- return [3, 6];
597
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
598
- case 3: throw _d.sent();
599
- case 4: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
600
- case 5: throw _d.sent();
601
- case 6:
602
- parsedBody = parsedOutput.body;
603
- throwDefaultError({
604
- output: output,
605
- parsedBody: parsedBody,
606
- exceptionCtor: __BaseException,
607
- errorCode: errorCode,
608
- });
609
- _d.label = 7;
610
- case 7: return [2];
611
- }
612
- });
613
- }); };
614
- export var deserializeAws_json1_1DescribeEventTypesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
615
- var data, contents, response;
616
- return __generator(this, function (_a) {
617
- switch (_a.label) {
618
- case 0:
619
- if (output.statusCode >= 300) {
620
- return [2, deserializeAws_json1_1DescribeEventTypesCommandError(output, context)];
621
- }
622
- return [4, parseBody(output.body, context)];
623
- case 1:
624
- data = _a.sent();
625
- contents = {};
626
- contents = deserializeAws_json1_1DescribeEventTypesResponse(data, context);
627
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
628
- return [2, Promise.resolve(response)];
629
- }
630
- });
631
- }); };
632
- var deserializeAws_json1_1DescribeEventTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
633
- var parsedOutput, _a, errorCode, _b, parsedBody;
634
- var _c;
635
- return __generator(this, function (_d) {
636
- switch (_d.label) {
637
- case 0:
638
- _a = [__assign({}, output)];
639
- _c = {};
640
- return [4, parseErrorBody(output.body, context)];
641
- case 1:
642
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
643
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
644
- _b = errorCode;
645
- switch (_b) {
646
- case "InvalidPaginationToken": return [3, 2];
647
- case "com.amazonaws.health#InvalidPaginationToken": return [3, 2];
648
- case "UnsupportedLocale": return [3, 4];
649
- case "com.amazonaws.health#UnsupportedLocale": return [3, 4];
650
- }
651
- return [3, 6];
652
- case 2: return [4, deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context)];
653
- case 3: throw _d.sent();
654
- case 4: return [4, deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context)];
655
- case 5: throw _d.sent();
656
- case 6:
657
- parsedBody = parsedOutput.body;
658
- throwDefaultError({
659
- output: output,
660
- parsedBody: parsedBody,
661
- exceptionCtor: __BaseException,
662
- errorCode: errorCode,
663
- });
664
- _d.label = 7;
665
- case 7: return [2];
666
- }
667
- });
668
- }); };
669
- export var deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
670
- var data, contents, response;
671
- return __generator(this, function (_a) {
672
- switch (_a.label) {
673
- case 0:
674
- if (output.statusCode >= 300) {
675
- return [2, deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommandError(output, context)];
676
- }
677
- return [4, parseBody(output.body, context)];
678
- case 1:
679
- data = _a.sent();
680
- contents = {};
681
- contents = deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationResponse(data, context);
682
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
683
- return [2, Promise.resolve(response)];
684
- }
685
- });
686
- }); };
687
- var deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
688
- var parsedOutput, _a, errorCode, parsedBody;
689
- var _b;
690
- return __generator(this, function (_c) {
691
- switch (_c.label) {
692
- case 0:
693
- _a = [__assign({}, output)];
694
- _b = {};
695
- return [4, parseErrorBody(output.body, context)];
696
- case 1:
697
- parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
698
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
- parsedBody = parsedOutput.body;
700
- throwDefaultError({
701
- output: output,
702
- parsedBody: parsedBody,
703
- exceptionCtor: __BaseException,
704
- errorCode: errorCode,
705
- });
706
- return [2];
707
- }
708
- });
709
- }); };
710
- export var deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
711
- var response;
712
- return __generator(this, function (_a) {
713
- switch (_a.label) {
714
- case 0:
715
- if (output.statusCode >= 300) {
716
- return [2, deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommandError(output, context)];
717
- }
718
- return [4, collectBody(output.body, context)];
719
- case 1:
720
- _a.sent();
721
- response = {
722
- $metadata: deserializeMetadata(output),
723
- };
724
- return [2, Promise.resolve(response)];
725
- }
726
- });
727
- }); };
728
- var deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
729
- var parsedOutput, _a, errorCode, _b, parsedBody;
730
- var _c;
731
- return __generator(this, function (_d) {
732
- switch (_d.label) {
733
- case 0:
734
- _a = [__assign({}, output)];
735
- _c = {};
736
- return [4, parseErrorBody(output.body, context)];
737
- case 1:
738
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
739
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
- _b = errorCode;
741
- switch (_b) {
742
- case "ConcurrentModificationException": return [3, 2];
743
- case "com.amazonaws.health#ConcurrentModificationException": return [3, 2];
744
- }
745
- return [3, 4];
746
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
747
- case 3: throw _d.sent();
748
- case 4:
749
- parsedBody = parsedOutput.body;
750
- throwDefaultError({
751
- output: output,
752
- parsedBody: parsedBody,
753
- exceptionCtor: __BaseException,
754
- errorCode: errorCode,
755
- });
756
- _d.label = 5;
757
- case 5: return [2];
758
- }
759
- });
760
- }); };
761
- export var deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
762
- var response;
763
- return __generator(this, function (_a) {
764
- switch (_a.label) {
765
- case 0:
766
- if (output.statusCode >= 300) {
767
- return [2, deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommandError(output, context)];
768
- }
769
- return [4, collectBody(output.body, context)];
770
- case 1:
771
- _a.sent();
772
- response = {
773
- $metadata: deserializeMetadata(output),
774
- };
775
- return [2, Promise.resolve(response)];
776
- }
777
- });
778
- }); };
779
- var deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
780
- var parsedOutput, _a, errorCode, _b, parsedBody;
781
- var _c;
782
- return __generator(this, function (_d) {
783
- switch (_d.label) {
784
- case 0:
785
- _a = [__assign({}, output)];
786
- _c = {};
787
- return [4, parseErrorBody(output.body, context)];
788
- case 1:
789
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
790
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
791
- _b = errorCode;
792
- switch (_b) {
793
- case "ConcurrentModificationException": return [3, 2];
794
- case "com.amazonaws.health#ConcurrentModificationException": return [3, 2];
795
- }
796
- return [3, 4];
797
- case 2: return [4, deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)];
798
- case 3: throw _d.sent();
799
- case 4:
800
- parsedBody = parsedOutput.body;
801
- throwDefaultError({
802
- output: output,
803
- parsedBody: parsedBody,
804
- exceptionCtor: __BaseException,
805
- errorCode: errorCode,
806
- });
807
- _d.label = 5;
808
- case 5: return [2];
809
- }
810
- });
811
- }); };
812
- var deserializeAws_json1_1ConcurrentModificationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
813
- var body, deserialized, exception;
814
- return __generator(this, function (_a) {
815
- body = parsedOutput.body;
816
- deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
817
- exception = new ConcurrentModificationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
818
- return [2, __decorateServiceException(exception, body)];
5
+ export const serializeAws_json1_1DescribeAffectedAccountsForOrganizationCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "AWSHealth_20160804.DescribeAffectedAccountsForOrganization",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1DescribeAffectedAccountsForOrganizationRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_1DescribeAffectedEntitiesCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.1",
17
+ "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntities",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_1DescribeAffectedEntitiesRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.1",
26
+ "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntitiesForOrganization",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_1DescribeAffectedEntitiesForOrganizationRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_1DescribeEntityAggregatesCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.1",
35
+ "x-amz-target": "AWSHealth_20160804.DescribeEntityAggregates",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_1DescribeEntityAggregatesRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_1DescribeEventAggregatesCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.1",
44
+ "x-amz-target": "AWSHealth_20160804.DescribeEventAggregates",
45
+ };
46
+ let body;
47
+ body = JSON.stringify(serializeAws_json1_1DescribeEventAggregatesRequest(input, context));
48
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
+ };
50
+ export const serializeAws_json1_1DescribeEventDetailsCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "AWSHealth_20160804.DescribeEventDetails",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_1DescribeEventDetailsRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ export const serializeAws_json1_1DescribeEventDetailsForOrganizationCommand = async (input, context) => {
60
+ const headers = {
61
+ "content-type": "application/x-amz-json-1.1",
62
+ "x-amz-target": "AWSHealth_20160804.DescribeEventDetailsForOrganization",
63
+ };
64
+ let body;
65
+ body = JSON.stringify(serializeAws_json1_1DescribeEventDetailsForOrganizationRequest(input, context));
66
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
+ };
68
+ export const serializeAws_json1_1DescribeEventsCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.1",
71
+ "x-amz-target": "AWSHealth_20160804.DescribeEvents",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_1DescribeEventsRequest(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_1DescribeEventsForOrganizationCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.1",
80
+ "x-amz-target": "AWSHealth_20160804.DescribeEventsForOrganization",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_1DescribeEventsForOrganizationRequest(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
86
+ export const serializeAws_json1_1DescribeEventTypesCommand = async (input, context) => {
87
+ const headers = {
88
+ "content-type": "application/x-amz-json-1.1",
89
+ "x-amz-target": "AWSHealth_20160804.DescribeEventTypes",
90
+ };
91
+ let body;
92
+ body = JSON.stringify(serializeAws_json1_1DescribeEventTypesRequest(input, context));
93
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
+ };
95
+ export const serializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommand = async (input, context) => {
96
+ const headers = {
97
+ "content-type": "application/x-amz-json-1.1",
98
+ "x-amz-target": "AWSHealth_20160804.DescribeHealthServiceStatusForOrganization",
99
+ };
100
+ const body = "{}";
101
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
+ };
103
+ export const serializeAws_json1_1DisableHealthServiceAccessForOrganizationCommand = async (input, context) => {
104
+ const headers = {
105
+ "content-type": "application/x-amz-json-1.1",
106
+ "x-amz-target": "AWSHealth_20160804.DisableHealthServiceAccessForOrganization",
107
+ };
108
+ const body = "{}";
109
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
110
+ };
111
+ export const serializeAws_json1_1EnableHealthServiceAccessForOrganizationCommand = async (input, context) => {
112
+ const headers = {
113
+ "content-type": "application/x-amz-json-1.1",
114
+ "x-amz-target": "AWSHealth_20160804.EnableHealthServiceAccessForOrganization",
115
+ };
116
+ const body = "{}";
117
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
+ };
119
+ export const deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommand = async (output, context) => {
120
+ if (output.statusCode >= 300) {
121
+ return deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommandError(output, context);
122
+ }
123
+ const data = await parseBody(output.body, context);
124
+ let contents = {};
125
+ contents = deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse(data, context);
126
+ const response = {
127
+ $metadata: deserializeMetadata(output),
128
+ ...contents,
129
+ };
130
+ return Promise.resolve(response);
131
+ };
132
+ const deserializeAws_json1_1DescribeAffectedAccountsForOrganizationCommandError = async (output, context) => {
133
+ const parsedOutput = {
134
+ ...output,
135
+ body: await parseErrorBody(output.body, context),
136
+ };
137
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
138
+ switch (errorCode) {
139
+ case "InvalidPaginationToken":
140
+ case "com.amazonaws.health#InvalidPaginationToken":
141
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
142
+ default:
143
+ const parsedBody = parsedOutput.body;
144
+ throwDefaultError({
145
+ output,
146
+ parsedBody,
147
+ exceptionCtor: __BaseException,
148
+ errorCode,
149
+ });
150
+ }
151
+ };
152
+ export const deserializeAws_json1_1DescribeAffectedEntitiesCommand = async (output, context) => {
153
+ if (output.statusCode >= 300) {
154
+ return deserializeAws_json1_1DescribeAffectedEntitiesCommandError(output, context);
155
+ }
156
+ const data = await parseBody(output.body, context);
157
+ let contents = {};
158
+ contents = deserializeAws_json1_1DescribeAffectedEntitiesResponse(data, context);
159
+ const response = {
160
+ $metadata: deserializeMetadata(output),
161
+ ...contents,
162
+ };
163
+ return Promise.resolve(response);
164
+ };
165
+ const deserializeAws_json1_1DescribeAffectedEntitiesCommandError = async (output, context) => {
166
+ const parsedOutput = {
167
+ ...output,
168
+ body: await parseErrorBody(output.body, context),
169
+ };
170
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
171
+ switch (errorCode) {
172
+ case "InvalidPaginationToken":
173
+ case "com.amazonaws.health#InvalidPaginationToken":
174
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
175
+ case "UnsupportedLocale":
176
+ case "com.amazonaws.health#UnsupportedLocale":
177
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
178
+ default:
179
+ const parsedBody = parsedOutput.body;
180
+ throwDefaultError({
181
+ output,
182
+ parsedBody,
183
+ exceptionCtor: __BaseException,
184
+ errorCode,
185
+ });
186
+ }
187
+ };
188
+ export const deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommand = async (output, context) => {
189
+ if (output.statusCode >= 300) {
190
+ return deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommandError(output, context);
191
+ }
192
+ const data = await parseBody(output.body, context);
193
+ let contents = {};
194
+ contents = deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse(data, context);
195
+ const response = {
196
+ $metadata: deserializeMetadata(output),
197
+ ...contents,
198
+ };
199
+ return Promise.resolve(response);
200
+ };
201
+ const deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationCommandError = async (output, context) => {
202
+ const parsedOutput = {
203
+ ...output,
204
+ body: await parseErrorBody(output.body, context),
205
+ };
206
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
207
+ switch (errorCode) {
208
+ case "InvalidPaginationToken":
209
+ case "com.amazonaws.health#InvalidPaginationToken":
210
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
211
+ case "UnsupportedLocale":
212
+ case "com.amazonaws.health#UnsupportedLocale":
213
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
214
+ default:
215
+ const parsedBody = parsedOutput.body;
216
+ throwDefaultError({
217
+ output,
218
+ parsedBody,
219
+ exceptionCtor: __BaseException,
220
+ errorCode,
221
+ });
222
+ }
223
+ };
224
+ export const deserializeAws_json1_1DescribeEntityAggregatesCommand = async (output, context) => {
225
+ if (output.statusCode >= 300) {
226
+ return deserializeAws_json1_1DescribeEntityAggregatesCommandError(output, context);
227
+ }
228
+ const data = await parseBody(output.body, context);
229
+ let contents = {};
230
+ contents = deserializeAws_json1_1DescribeEntityAggregatesResponse(data, context);
231
+ const response = {
232
+ $metadata: deserializeMetadata(output),
233
+ ...contents,
234
+ };
235
+ return Promise.resolve(response);
236
+ };
237
+ const deserializeAws_json1_1DescribeEntityAggregatesCommandError = async (output, context) => {
238
+ const parsedOutput = {
239
+ ...output,
240
+ body: await parseErrorBody(output.body, context),
241
+ };
242
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
243
+ const parsedBody = parsedOutput.body;
244
+ throwDefaultError({
245
+ output,
246
+ parsedBody,
247
+ exceptionCtor: __BaseException,
248
+ errorCode,
249
+ });
250
+ };
251
+ export const deserializeAws_json1_1DescribeEventAggregatesCommand = async (output, context) => {
252
+ if (output.statusCode >= 300) {
253
+ return deserializeAws_json1_1DescribeEventAggregatesCommandError(output, context);
254
+ }
255
+ const data = await parseBody(output.body, context);
256
+ let contents = {};
257
+ contents = deserializeAws_json1_1DescribeEventAggregatesResponse(data, context);
258
+ const response = {
259
+ $metadata: deserializeMetadata(output),
260
+ ...contents,
261
+ };
262
+ return Promise.resolve(response);
263
+ };
264
+ const deserializeAws_json1_1DescribeEventAggregatesCommandError = async (output, context) => {
265
+ const parsedOutput = {
266
+ ...output,
267
+ body: await parseErrorBody(output.body, context),
268
+ };
269
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
270
+ switch (errorCode) {
271
+ case "InvalidPaginationToken":
272
+ case "com.amazonaws.health#InvalidPaginationToken":
273
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
274
+ default:
275
+ const parsedBody = parsedOutput.body;
276
+ throwDefaultError({
277
+ output,
278
+ parsedBody,
279
+ exceptionCtor: __BaseException,
280
+ errorCode,
281
+ });
282
+ }
283
+ };
284
+ export const deserializeAws_json1_1DescribeEventDetailsCommand = async (output, context) => {
285
+ if (output.statusCode >= 300) {
286
+ return deserializeAws_json1_1DescribeEventDetailsCommandError(output, context);
287
+ }
288
+ const data = await parseBody(output.body, context);
289
+ let contents = {};
290
+ contents = deserializeAws_json1_1DescribeEventDetailsResponse(data, context);
291
+ const response = {
292
+ $metadata: deserializeMetadata(output),
293
+ ...contents,
294
+ };
295
+ return Promise.resolve(response);
296
+ };
297
+ const deserializeAws_json1_1DescribeEventDetailsCommandError = async (output, context) => {
298
+ const parsedOutput = {
299
+ ...output,
300
+ body: await parseErrorBody(output.body, context),
301
+ };
302
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
303
+ switch (errorCode) {
304
+ case "UnsupportedLocale":
305
+ case "com.amazonaws.health#UnsupportedLocale":
306
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
307
+ default:
308
+ const parsedBody = parsedOutput.body;
309
+ throwDefaultError({
310
+ output,
311
+ parsedBody,
312
+ exceptionCtor: __BaseException,
313
+ errorCode,
314
+ });
315
+ }
316
+ };
317
+ export const deserializeAws_json1_1DescribeEventDetailsForOrganizationCommand = async (output, context) => {
318
+ if (output.statusCode >= 300) {
319
+ return deserializeAws_json1_1DescribeEventDetailsForOrganizationCommandError(output, context);
320
+ }
321
+ const data = await parseBody(output.body, context);
322
+ let contents = {};
323
+ contents = deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse(data, context);
324
+ const response = {
325
+ $metadata: deserializeMetadata(output),
326
+ ...contents,
327
+ };
328
+ return Promise.resolve(response);
329
+ };
330
+ const deserializeAws_json1_1DescribeEventDetailsForOrganizationCommandError = async (output, context) => {
331
+ const parsedOutput = {
332
+ ...output,
333
+ body: await parseErrorBody(output.body, context),
334
+ };
335
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
336
+ switch (errorCode) {
337
+ case "UnsupportedLocale":
338
+ case "com.amazonaws.health#UnsupportedLocale":
339
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
340
+ default:
341
+ const parsedBody = parsedOutput.body;
342
+ throwDefaultError({
343
+ output,
344
+ parsedBody,
345
+ exceptionCtor: __BaseException,
346
+ errorCode,
347
+ });
348
+ }
349
+ };
350
+ export const deserializeAws_json1_1DescribeEventsCommand = async (output, context) => {
351
+ if (output.statusCode >= 300) {
352
+ return deserializeAws_json1_1DescribeEventsCommandError(output, context);
353
+ }
354
+ const data = await parseBody(output.body, context);
355
+ let contents = {};
356
+ contents = deserializeAws_json1_1DescribeEventsResponse(data, context);
357
+ const response = {
358
+ $metadata: deserializeMetadata(output),
359
+ ...contents,
360
+ };
361
+ return Promise.resolve(response);
362
+ };
363
+ const deserializeAws_json1_1DescribeEventsCommandError = async (output, context) => {
364
+ const parsedOutput = {
365
+ ...output,
366
+ body: await parseErrorBody(output.body, context),
367
+ };
368
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
369
+ switch (errorCode) {
370
+ case "InvalidPaginationToken":
371
+ case "com.amazonaws.health#InvalidPaginationToken":
372
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
373
+ case "UnsupportedLocale":
374
+ case "com.amazonaws.health#UnsupportedLocale":
375
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
376
+ default:
377
+ const parsedBody = parsedOutput.body;
378
+ throwDefaultError({
379
+ output,
380
+ parsedBody,
381
+ exceptionCtor: __BaseException,
382
+ errorCode,
383
+ });
384
+ }
385
+ };
386
+ export const deserializeAws_json1_1DescribeEventsForOrganizationCommand = async (output, context) => {
387
+ if (output.statusCode >= 300) {
388
+ return deserializeAws_json1_1DescribeEventsForOrganizationCommandError(output, context);
389
+ }
390
+ const data = await parseBody(output.body, context);
391
+ let contents = {};
392
+ contents = deserializeAws_json1_1DescribeEventsForOrganizationResponse(data, context);
393
+ const response = {
394
+ $metadata: deserializeMetadata(output),
395
+ ...contents,
396
+ };
397
+ return Promise.resolve(response);
398
+ };
399
+ const deserializeAws_json1_1DescribeEventsForOrganizationCommandError = async (output, context) => {
400
+ const parsedOutput = {
401
+ ...output,
402
+ body: await parseErrorBody(output.body, context),
403
+ };
404
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
405
+ switch (errorCode) {
406
+ case "InvalidPaginationToken":
407
+ case "com.amazonaws.health#InvalidPaginationToken":
408
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
409
+ case "UnsupportedLocale":
410
+ case "com.amazonaws.health#UnsupportedLocale":
411
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
412
+ default:
413
+ const parsedBody = parsedOutput.body;
414
+ throwDefaultError({
415
+ output,
416
+ parsedBody,
417
+ exceptionCtor: __BaseException,
418
+ errorCode,
419
+ });
420
+ }
421
+ };
422
+ export const deserializeAws_json1_1DescribeEventTypesCommand = async (output, context) => {
423
+ if (output.statusCode >= 300) {
424
+ return deserializeAws_json1_1DescribeEventTypesCommandError(output, context);
425
+ }
426
+ const data = await parseBody(output.body, context);
427
+ let contents = {};
428
+ contents = deserializeAws_json1_1DescribeEventTypesResponse(data, context);
429
+ const response = {
430
+ $metadata: deserializeMetadata(output),
431
+ ...contents,
432
+ };
433
+ return Promise.resolve(response);
434
+ };
435
+ const deserializeAws_json1_1DescribeEventTypesCommandError = async (output, context) => {
436
+ const parsedOutput = {
437
+ ...output,
438
+ body: await parseErrorBody(output.body, context),
439
+ };
440
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
441
+ switch (errorCode) {
442
+ case "InvalidPaginationToken":
443
+ case "com.amazonaws.health#InvalidPaginationToken":
444
+ throw await deserializeAws_json1_1InvalidPaginationTokenResponse(parsedOutput, context);
445
+ case "UnsupportedLocale":
446
+ case "com.amazonaws.health#UnsupportedLocale":
447
+ throw await deserializeAws_json1_1UnsupportedLocaleResponse(parsedOutput, context);
448
+ default:
449
+ const parsedBody = parsedOutput.body;
450
+ throwDefaultError({
451
+ output,
452
+ parsedBody,
453
+ exceptionCtor: __BaseException,
454
+ errorCode,
455
+ });
456
+ }
457
+ };
458
+ export const deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommand = async (output, context) => {
459
+ if (output.statusCode >= 300) {
460
+ return deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommandError(output, context);
461
+ }
462
+ const data = await parseBody(output.body, context);
463
+ let contents = {};
464
+ contents = deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationResponse(data, context);
465
+ const response = {
466
+ $metadata: deserializeMetadata(output),
467
+ ...contents,
468
+ };
469
+ return Promise.resolve(response);
470
+ };
471
+ const deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationCommandError = async (output, context) => {
472
+ const parsedOutput = {
473
+ ...output,
474
+ body: await parseErrorBody(output.body, context),
475
+ };
476
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
477
+ const parsedBody = parsedOutput.body;
478
+ throwDefaultError({
479
+ output,
480
+ parsedBody,
481
+ exceptionCtor: __BaseException,
482
+ errorCode,
483
+ });
484
+ };
485
+ export const deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommand = async (output, context) => {
486
+ if (output.statusCode >= 300) {
487
+ return deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommandError(output, context);
488
+ }
489
+ await collectBody(output.body, context);
490
+ const response = {
491
+ $metadata: deserializeMetadata(output),
492
+ };
493
+ return Promise.resolve(response);
494
+ };
495
+ const deserializeAws_json1_1DisableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
496
+ const parsedOutput = {
497
+ ...output,
498
+ body: await parseErrorBody(output.body, context),
499
+ };
500
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
501
+ switch (errorCode) {
502
+ case "ConcurrentModificationException":
503
+ case "com.amazonaws.health#ConcurrentModificationException":
504
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
505
+ default:
506
+ const parsedBody = parsedOutput.body;
507
+ throwDefaultError({
508
+ output,
509
+ parsedBody,
510
+ exceptionCtor: __BaseException,
511
+ errorCode,
512
+ });
513
+ }
514
+ };
515
+ export const deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommand = async (output, context) => {
516
+ if (output.statusCode >= 300) {
517
+ return deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommandError(output, context);
518
+ }
519
+ await collectBody(output.body, context);
520
+ const response = {
521
+ $metadata: deserializeMetadata(output),
522
+ };
523
+ return Promise.resolve(response);
524
+ };
525
+ const deserializeAws_json1_1EnableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
526
+ const parsedOutput = {
527
+ ...output,
528
+ body: await parseErrorBody(output.body, context),
529
+ };
530
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
531
+ switch (errorCode) {
532
+ case "ConcurrentModificationException":
533
+ case "com.amazonaws.health#ConcurrentModificationException":
534
+ throw await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context);
535
+ default:
536
+ const parsedBody = parsedOutput.body;
537
+ throwDefaultError({
538
+ output,
539
+ parsedBody,
540
+ exceptionCtor: __BaseException,
541
+ errorCode,
542
+ });
543
+ }
544
+ };
545
+ const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
546
+ const body = parsedOutput.body;
547
+ const deserialized = deserializeAws_json1_1ConcurrentModificationException(body, context);
548
+ const exception = new ConcurrentModificationException({
549
+ $metadata: deserializeMetadata(parsedOutput),
550
+ ...deserialized,
819
551
  });
820
- }); };
821
- var deserializeAws_json1_1InvalidPaginationTokenResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
822
- var body, deserialized, exception;
823
- return __generator(this, function (_a) {
824
- body = parsedOutput.body;
825
- deserialized = deserializeAws_json1_1InvalidPaginationToken(body, context);
826
- exception = new InvalidPaginationToken(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
827
- return [2, __decorateServiceException(exception, body)];
552
+ return __decorateServiceException(exception, body);
553
+ };
554
+ const deserializeAws_json1_1InvalidPaginationTokenResponse = async (parsedOutput, context) => {
555
+ const body = parsedOutput.body;
556
+ const deserialized = deserializeAws_json1_1InvalidPaginationToken(body, context);
557
+ const exception = new InvalidPaginationToken({
558
+ $metadata: deserializeMetadata(parsedOutput),
559
+ ...deserialized,
828
560
  });
829
- }); };
830
- var deserializeAws_json1_1UnsupportedLocaleResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
831
- var body, deserialized, exception;
832
- return __generator(this, function (_a) {
833
- body = parsedOutput.body;
834
- deserialized = deserializeAws_json1_1UnsupportedLocale(body, context);
835
- exception = new UnsupportedLocale(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
836
- return [2, __decorateServiceException(exception, body)];
561
+ return __decorateServiceException(exception, body);
562
+ };
563
+ const deserializeAws_json1_1UnsupportedLocaleResponse = async (parsedOutput, context) => {
564
+ const body = parsedOutput.body;
565
+ const deserialized = deserializeAws_json1_1UnsupportedLocale(body, context);
566
+ const exception = new UnsupportedLocale({
567
+ $metadata: deserializeMetadata(parsedOutput),
568
+ ...deserialized,
837
569
  });
838
- }); };
839
- var serializeAws_json1_1availabilityZones = function (input, context) {
570
+ return __decorateServiceException(exception, body);
571
+ };
572
+ const serializeAws_json1_1availabilityZones = (input, context) => {
840
573
  return input
841
- .filter(function (e) { return e != null; })
842
- .map(function (entry) {
574
+ .filter((e) => e != null)
575
+ .map((entry) => {
843
576
  return entry;
844
577
  });
845
578
  };
846
- var serializeAws_json1_1awsAccountIdsList = function (input, context) {
579
+ const serializeAws_json1_1awsAccountIdsList = (input, context) => {
847
580
  return input
848
- .filter(function (e) { return e != null; })
849
- .map(function (entry) {
581
+ .filter((e) => e != null)
582
+ .map((entry) => {
850
583
  return entry;
851
584
  });
852
585
  };
853
- var serializeAws_json1_1DateTimeRange = function (input, context) {
854
- return __assign(__assign({}, (input.from != null && { from: Math.round(input.from.getTime() / 1000) })), (input.to != null && { to: Math.round(input.to.getTime() / 1000) }));
586
+ const serializeAws_json1_1DateTimeRange = (input, context) => {
587
+ return {
588
+ ...(input.from != null && { from: Math.round(input.from.getTime() / 1000) }),
589
+ ...(input.to != null && { to: Math.round(input.to.getTime() / 1000) }),
590
+ };
855
591
  };
856
- var serializeAws_json1_1dateTimeRangeList = function (input, context) {
592
+ const serializeAws_json1_1dateTimeRangeList = (input, context) => {
857
593
  return input
858
- .filter(function (e) { return e != null; })
859
- .map(function (entry) {
594
+ .filter((e) => e != null)
595
+ .map((entry) => {
860
596
  return serializeAws_json1_1DateTimeRange(entry, context);
861
597
  });
862
598
  };
863
- var serializeAws_json1_1DescribeAffectedAccountsForOrganizationRequest = function (input, context) {
864
- return __assign(__assign(__assign({}, (input.eventArn != null && { eventArn: input.eventArn })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
599
+ const serializeAws_json1_1DescribeAffectedAccountsForOrganizationRequest = (input, context) => {
600
+ return {
601
+ ...(input.eventArn != null && { eventArn: input.eventArn }),
602
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
603
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
604
+ };
865
605
  };
866
- var serializeAws_json1_1DescribeAffectedEntitiesForOrganizationRequest = function (input, context) {
867
- return __assign(__assign(__assign(__assign({}, (input.locale != null && { locale: input.locale })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.organizationEntityFilters != null && {
868
- organizationEntityFilters: serializeAws_json1_1OrganizationEntityFiltersList(input.organizationEntityFilters, context),
869
- }));
606
+ const serializeAws_json1_1DescribeAffectedEntitiesForOrganizationRequest = (input, context) => {
607
+ return {
608
+ ...(input.locale != null && { locale: input.locale }),
609
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
610
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
611
+ ...(input.organizationEntityFilters != null && {
612
+ organizationEntityFilters: serializeAws_json1_1OrganizationEntityFiltersList(input.organizationEntityFilters, context),
613
+ }),
614
+ };
870
615
  };
871
- var serializeAws_json1_1DescribeAffectedEntitiesRequest = function (input, context) {
872
- return __assign(__assign(__assign(__assign({}, (input.filter != null && { filter: serializeAws_json1_1EntityFilter(input.filter, context) })), (input.locale != null && { locale: input.locale })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
616
+ const serializeAws_json1_1DescribeAffectedEntitiesRequest = (input, context) => {
617
+ return {
618
+ ...(input.filter != null && { filter: serializeAws_json1_1EntityFilter(input.filter, context) }),
619
+ ...(input.locale != null && { locale: input.locale }),
620
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
621
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
622
+ };
873
623
  };
874
- var serializeAws_json1_1DescribeEntityAggregatesRequest = function (input, context) {
875
- return __assign({}, (input.eventArns != null && { eventArns: serializeAws_json1_1EventArnsList(input.eventArns, context) }));
624
+ const serializeAws_json1_1DescribeEntityAggregatesRequest = (input, context) => {
625
+ return {
626
+ ...(input.eventArns != null && { eventArns: serializeAws_json1_1EventArnsList(input.eventArns, context) }),
627
+ };
876
628
  };
877
- var serializeAws_json1_1DescribeEventAggregatesRequest = function (input, context) {
878
- return __assign(__assign(__assign(__assign({}, (input.aggregateField != null && { aggregateField: input.aggregateField })), (input.filter != null && { filter: serializeAws_json1_1EventFilter(input.filter, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
629
+ const serializeAws_json1_1DescribeEventAggregatesRequest = (input, context) => {
630
+ return {
631
+ ...(input.aggregateField != null && { aggregateField: input.aggregateField }),
632
+ ...(input.filter != null && { filter: serializeAws_json1_1EventFilter(input.filter, context) }),
633
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
634
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
635
+ };
879
636
  };
880
- var serializeAws_json1_1DescribeEventDetailsForOrganizationRequest = function (input, context) {
881
- return __assign(__assign({}, (input.locale != null && { locale: input.locale })), (input.organizationEventDetailFilters != null && {
882
- organizationEventDetailFilters: serializeAws_json1_1OrganizationEventDetailFiltersList(input.organizationEventDetailFilters, context),
883
- }));
637
+ const serializeAws_json1_1DescribeEventDetailsForOrganizationRequest = (input, context) => {
638
+ return {
639
+ ...(input.locale != null && { locale: input.locale }),
640
+ ...(input.organizationEventDetailFilters != null && {
641
+ organizationEventDetailFilters: serializeAws_json1_1OrganizationEventDetailFiltersList(input.organizationEventDetailFilters, context),
642
+ }),
643
+ };
884
644
  };
885
- var serializeAws_json1_1DescribeEventDetailsRequest = function (input, context) {
886
- return __assign(__assign({}, (input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) })), (input.locale != null && { locale: input.locale }));
645
+ const serializeAws_json1_1DescribeEventDetailsRequest = (input, context) => {
646
+ return {
647
+ ...(input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) }),
648
+ ...(input.locale != null && { locale: input.locale }),
649
+ };
887
650
  };
888
- var serializeAws_json1_1DescribeEventsForOrganizationRequest = function (input, context) {
889
- return __assign(__assign(__assign(__assign({}, (input.filter != null && { filter: serializeAws_json1_1OrganizationEventFilter(input.filter, context) })), (input.locale != null && { locale: input.locale })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
651
+ const serializeAws_json1_1DescribeEventsForOrganizationRequest = (input, context) => {
652
+ return {
653
+ ...(input.filter != null && { filter: serializeAws_json1_1OrganizationEventFilter(input.filter, context) }),
654
+ ...(input.locale != null && { locale: input.locale }),
655
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
656
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
657
+ };
890
658
  };
891
- var serializeAws_json1_1DescribeEventsRequest = function (input, context) {
892
- return __assign(__assign(__assign(__assign({}, (input.filter != null && { filter: serializeAws_json1_1EventFilter(input.filter, context) })), (input.locale != null && { locale: input.locale })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
659
+ const serializeAws_json1_1DescribeEventsRequest = (input, context) => {
660
+ return {
661
+ ...(input.filter != null && { filter: serializeAws_json1_1EventFilter(input.filter, context) }),
662
+ ...(input.locale != null && { locale: input.locale }),
663
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
664
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
665
+ };
893
666
  };
894
- var serializeAws_json1_1DescribeEventTypesRequest = function (input, context) {
895
- return __assign(__assign(__assign(__assign({}, (input.filter != null && { filter: serializeAws_json1_1EventTypeFilter(input.filter, context) })), (input.locale != null && { locale: input.locale })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
667
+ const serializeAws_json1_1DescribeEventTypesRequest = (input, context) => {
668
+ return {
669
+ ...(input.filter != null && { filter: serializeAws_json1_1EventTypeFilter(input.filter, context) }),
670
+ ...(input.locale != null && { locale: input.locale }),
671
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
672
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
673
+ };
896
674
  };
897
- var serializeAws_json1_1entityArnList = function (input, context) {
675
+ const serializeAws_json1_1entityArnList = (input, context) => {
898
676
  return input
899
- .filter(function (e) { return e != null; })
900
- .map(function (entry) {
677
+ .filter((e) => e != null)
678
+ .map((entry) => {
901
679
  return entry;
902
680
  });
903
681
  };
904
- var serializeAws_json1_1EntityFilter = function (input, context) {
905
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) })), (input.entityValues != null && {
906
- entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
907
- })), (input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) })), (input.lastUpdatedTimes != null && {
908
- lastUpdatedTimes: serializeAws_json1_1dateTimeRangeList(input.lastUpdatedTimes, context),
909
- })), (input.statusCodes != null && {
910
- statusCodes: serializeAws_json1_1entityStatusCodeList(input.statusCodes, context),
911
- })), (input.tags != null && { tags: serializeAws_json1_1tagFilter(input.tags, context) }));
682
+ const serializeAws_json1_1EntityFilter = (input, context) => {
683
+ return {
684
+ ...(input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) }),
685
+ ...(input.entityValues != null && {
686
+ entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
687
+ }),
688
+ ...(input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) }),
689
+ ...(input.lastUpdatedTimes != null && {
690
+ lastUpdatedTimes: serializeAws_json1_1dateTimeRangeList(input.lastUpdatedTimes, context),
691
+ }),
692
+ ...(input.statusCodes != null && {
693
+ statusCodes: serializeAws_json1_1entityStatusCodeList(input.statusCodes, context),
694
+ }),
695
+ ...(input.tags != null && { tags: serializeAws_json1_1tagFilter(input.tags, context) }),
696
+ };
912
697
  };
913
- var serializeAws_json1_1entityStatusCodeList = function (input, context) {
698
+ const serializeAws_json1_1entityStatusCodeList = (input, context) => {
914
699
  return input
915
- .filter(function (e) { return e != null; })
916
- .map(function (entry) {
700
+ .filter((e) => e != null)
701
+ .map((entry) => {
917
702
  return entry;
918
703
  });
919
704
  };
920
- var serializeAws_json1_1entityValueList = function (input, context) {
705
+ const serializeAws_json1_1entityValueList = (input, context) => {
921
706
  return input
922
- .filter(function (e) { return e != null; })
923
- .map(function (entry) {
707
+ .filter((e) => e != null)
708
+ .map((entry) => {
924
709
  return entry;
925
710
  });
926
711
  };
927
- var serializeAws_json1_1EventAccountFilter = function (input, context) {
928
- return __assign(__assign({}, (input.awsAccountId != null && { awsAccountId: input.awsAccountId })), (input.eventArn != null && { eventArn: input.eventArn }));
712
+ const serializeAws_json1_1EventAccountFilter = (input, context) => {
713
+ return {
714
+ ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }),
715
+ ...(input.eventArn != null && { eventArn: input.eventArn }),
716
+ };
929
717
  };
930
- var serializeAws_json1_1eventArnList = function (input, context) {
718
+ const serializeAws_json1_1eventArnList = (input, context) => {
931
719
  return input
932
- .filter(function (e) { return e != null; })
933
- .map(function (entry) {
720
+ .filter((e) => e != null)
721
+ .map((entry) => {
934
722
  return entry;
935
723
  });
936
724
  };
937
- var serializeAws_json1_1EventArnsList = function (input, context) {
725
+ const serializeAws_json1_1EventArnsList = (input, context) => {
938
726
  return input
939
- .filter(function (e) { return e != null; })
940
- .map(function (entry) {
727
+ .filter((e) => e != null)
728
+ .map((entry) => {
941
729
  return entry;
942
730
  });
943
731
  };
944
- var serializeAws_json1_1EventFilter = function (input, context) {
945
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.availabilityZones != null && {
946
- availabilityZones: serializeAws_json1_1availabilityZones(input.availabilityZones, context),
947
- })), (input.endTimes != null && { endTimes: serializeAws_json1_1dateTimeRangeList(input.endTimes, context) })), (input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) })), (input.entityValues != null && {
948
- entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
949
- })), (input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) })), (input.eventStatusCodes != null && {
950
- eventStatusCodes: serializeAws_json1_1eventStatusCodeList(input.eventStatusCodes, context),
951
- })), (input.eventTypeCategories != null && {
952
- eventTypeCategories: serializeAws_json1_1eventTypeCategoryList2(input.eventTypeCategories, context),
953
- })), (input.eventTypeCodes != null && {
954
- eventTypeCodes: serializeAws_json1_1eventTypeList2(input.eventTypeCodes, context),
955
- })), (input.lastUpdatedTimes != null && {
956
- lastUpdatedTimes: serializeAws_json1_1dateTimeRangeList(input.lastUpdatedTimes, context),
957
- })), (input.regions != null && { regions: serializeAws_json1_1regionList(input.regions, context) })), (input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) })), (input.startTimes != null && { startTimes: serializeAws_json1_1dateTimeRangeList(input.startTimes, context) })), (input.tags != null && { tags: serializeAws_json1_1tagFilter(input.tags, context) }));
958
- };
959
- var serializeAws_json1_1eventStatusCodeList = function (input, context) {
732
+ const serializeAws_json1_1EventFilter = (input, context) => {
733
+ return {
734
+ ...(input.availabilityZones != null && {
735
+ availabilityZones: serializeAws_json1_1availabilityZones(input.availabilityZones, context),
736
+ }),
737
+ ...(input.endTimes != null && { endTimes: serializeAws_json1_1dateTimeRangeList(input.endTimes, context) }),
738
+ ...(input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) }),
739
+ ...(input.entityValues != null && {
740
+ entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
741
+ }),
742
+ ...(input.eventArns != null && { eventArns: serializeAws_json1_1eventArnList(input.eventArns, context) }),
743
+ ...(input.eventStatusCodes != null && {
744
+ eventStatusCodes: serializeAws_json1_1eventStatusCodeList(input.eventStatusCodes, context),
745
+ }),
746
+ ...(input.eventTypeCategories != null && {
747
+ eventTypeCategories: serializeAws_json1_1eventTypeCategoryList2(input.eventTypeCategories, context),
748
+ }),
749
+ ...(input.eventTypeCodes != null && {
750
+ eventTypeCodes: serializeAws_json1_1eventTypeList2(input.eventTypeCodes, context),
751
+ }),
752
+ ...(input.lastUpdatedTimes != null && {
753
+ lastUpdatedTimes: serializeAws_json1_1dateTimeRangeList(input.lastUpdatedTimes, context),
754
+ }),
755
+ ...(input.regions != null && { regions: serializeAws_json1_1regionList(input.regions, context) }),
756
+ ...(input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) }),
757
+ ...(input.startTimes != null && { startTimes: serializeAws_json1_1dateTimeRangeList(input.startTimes, context) }),
758
+ ...(input.tags != null && { tags: serializeAws_json1_1tagFilter(input.tags, context) }),
759
+ };
760
+ };
761
+ const serializeAws_json1_1eventStatusCodeList = (input, context) => {
960
762
  return input
961
- .filter(function (e) { return e != null; })
962
- .map(function (entry) {
763
+ .filter((e) => e != null)
764
+ .map((entry) => {
963
765
  return entry;
964
766
  });
965
767
  };
966
- var serializeAws_json1_1EventTypeCategoryList = function (input, context) {
768
+ const serializeAws_json1_1EventTypeCategoryList = (input, context) => {
967
769
  return input
968
- .filter(function (e) { return e != null; })
969
- .map(function (entry) {
770
+ .filter((e) => e != null)
771
+ .map((entry) => {
970
772
  return entry;
971
773
  });
972
774
  };
973
- var serializeAws_json1_1eventTypeCategoryList2 = function (input, context) {
775
+ const serializeAws_json1_1eventTypeCategoryList2 = (input, context) => {
974
776
  return input
975
- .filter(function (e) { return e != null; })
976
- .map(function (entry) {
777
+ .filter((e) => e != null)
778
+ .map((entry) => {
977
779
  return entry;
978
780
  });
979
781
  };
980
- var serializeAws_json1_1EventTypeCodeList = function (input, context) {
782
+ const serializeAws_json1_1EventTypeCodeList = (input, context) => {
981
783
  return input
982
- .filter(function (e) { return e != null; })
983
- .map(function (entry) {
784
+ .filter((e) => e != null)
785
+ .map((entry) => {
984
786
  return entry;
985
787
  });
986
788
  };
987
- var serializeAws_json1_1EventTypeFilter = function (input, context) {
988
- return __assign(__assign(__assign({}, (input.eventTypeCategories != null && {
989
- eventTypeCategories: serializeAws_json1_1EventTypeCategoryList(input.eventTypeCategories, context),
990
- })), (input.eventTypeCodes != null && {
991
- eventTypeCodes: serializeAws_json1_1EventTypeCodeList(input.eventTypeCodes, context),
992
- })), (input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) }));
789
+ const serializeAws_json1_1EventTypeFilter = (input, context) => {
790
+ return {
791
+ ...(input.eventTypeCategories != null && {
792
+ eventTypeCategories: serializeAws_json1_1EventTypeCategoryList(input.eventTypeCategories, context),
793
+ }),
794
+ ...(input.eventTypeCodes != null && {
795
+ eventTypeCodes: serializeAws_json1_1EventTypeCodeList(input.eventTypeCodes, context),
796
+ }),
797
+ ...(input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) }),
798
+ };
993
799
  };
994
- var serializeAws_json1_1eventTypeList2 = function (input, context) {
800
+ const serializeAws_json1_1eventTypeList2 = (input, context) => {
995
801
  return input
996
- .filter(function (e) { return e != null; })
997
- .map(function (entry) {
802
+ .filter((e) => e != null)
803
+ .map((entry) => {
998
804
  return entry;
999
805
  });
1000
806
  };
1001
- var serializeAws_json1_1OrganizationEntityFiltersList = function (input, context) {
807
+ const serializeAws_json1_1OrganizationEntityFiltersList = (input, context) => {
1002
808
  return input
1003
- .filter(function (e) { return e != null; })
1004
- .map(function (entry) {
809
+ .filter((e) => e != null)
810
+ .map((entry) => {
1005
811
  return serializeAws_json1_1EventAccountFilter(entry, context);
1006
812
  });
1007
813
  };
1008
- var serializeAws_json1_1OrganizationEventDetailFiltersList = function (input, context) {
814
+ const serializeAws_json1_1OrganizationEventDetailFiltersList = (input, context) => {
1009
815
  return input
1010
- .filter(function (e) { return e != null; })
1011
- .map(function (entry) {
816
+ .filter((e) => e != null)
817
+ .map((entry) => {
1012
818
  return serializeAws_json1_1EventAccountFilter(entry, context);
1013
819
  });
1014
820
  };
1015
- var serializeAws_json1_1OrganizationEventFilter = function (input, context) {
1016
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.awsAccountIds != null && {
1017
- awsAccountIds: serializeAws_json1_1awsAccountIdsList(input.awsAccountIds, context),
1018
- })), (input.endTime != null && { endTime: serializeAws_json1_1DateTimeRange(input.endTime, context) })), (input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) })), (input.entityValues != null && {
1019
- entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
1020
- })), (input.eventStatusCodes != null && {
1021
- eventStatusCodes: serializeAws_json1_1eventStatusCodeList(input.eventStatusCodes, context),
1022
- })), (input.eventTypeCategories != null && {
1023
- eventTypeCategories: serializeAws_json1_1eventTypeCategoryList2(input.eventTypeCategories, context),
1024
- })), (input.eventTypeCodes != null && {
1025
- eventTypeCodes: serializeAws_json1_1eventTypeList2(input.eventTypeCodes, context),
1026
- })), (input.lastUpdatedTime != null && {
1027
- lastUpdatedTime: serializeAws_json1_1DateTimeRange(input.lastUpdatedTime, context),
1028
- })), (input.regions != null && { regions: serializeAws_json1_1regionList(input.regions, context) })), (input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) })), (input.startTime != null && { startTime: serializeAws_json1_1DateTimeRange(input.startTime, context) }));
1029
- };
1030
- var serializeAws_json1_1regionList = function (input, context) {
821
+ const serializeAws_json1_1OrganizationEventFilter = (input, context) => {
822
+ return {
823
+ ...(input.awsAccountIds != null && {
824
+ awsAccountIds: serializeAws_json1_1awsAccountIdsList(input.awsAccountIds, context),
825
+ }),
826
+ ...(input.endTime != null && { endTime: serializeAws_json1_1DateTimeRange(input.endTime, context) }),
827
+ ...(input.entityArns != null && { entityArns: serializeAws_json1_1entityArnList(input.entityArns, context) }),
828
+ ...(input.entityValues != null && {
829
+ entityValues: serializeAws_json1_1entityValueList(input.entityValues, context),
830
+ }),
831
+ ...(input.eventStatusCodes != null && {
832
+ eventStatusCodes: serializeAws_json1_1eventStatusCodeList(input.eventStatusCodes, context),
833
+ }),
834
+ ...(input.eventTypeCategories != null && {
835
+ eventTypeCategories: serializeAws_json1_1eventTypeCategoryList2(input.eventTypeCategories, context),
836
+ }),
837
+ ...(input.eventTypeCodes != null && {
838
+ eventTypeCodes: serializeAws_json1_1eventTypeList2(input.eventTypeCodes, context),
839
+ }),
840
+ ...(input.lastUpdatedTime != null && {
841
+ lastUpdatedTime: serializeAws_json1_1DateTimeRange(input.lastUpdatedTime, context),
842
+ }),
843
+ ...(input.regions != null && { regions: serializeAws_json1_1regionList(input.regions, context) }),
844
+ ...(input.services != null && { services: serializeAws_json1_1serviceList(input.services, context) }),
845
+ ...(input.startTime != null && { startTime: serializeAws_json1_1DateTimeRange(input.startTime, context) }),
846
+ };
847
+ };
848
+ const serializeAws_json1_1regionList = (input, context) => {
1031
849
  return input
1032
- .filter(function (e) { return e != null; })
1033
- .map(function (entry) {
850
+ .filter((e) => e != null)
851
+ .map((entry) => {
1034
852
  return entry;
1035
853
  });
1036
854
  };
1037
- var serializeAws_json1_1serviceList = function (input, context) {
855
+ const serializeAws_json1_1serviceList = (input, context) => {
1038
856
  return input
1039
- .filter(function (e) { return e != null; })
1040
- .map(function (entry) {
857
+ .filter((e) => e != null)
858
+ .map((entry) => {
1041
859
  return entry;
1042
860
  });
1043
861
  };
1044
- var serializeAws_json1_1tagFilter = function (input, context) {
862
+ const serializeAws_json1_1tagFilter = (input, context) => {
1045
863
  return input
1046
- .filter(function (e) { return e != null; })
1047
- .map(function (entry) {
864
+ .filter((e) => e != null)
865
+ .map((entry) => {
1048
866
  return serializeAws_json1_1tagSet(entry, context);
1049
867
  });
1050
868
  };
1051
- var serializeAws_json1_1tagSet = function (input, context) {
1052
- return Object.entries(input).reduce(function (acc, _a) {
1053
- var _b;
1054
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
869
+ const serializeAws_json1_1tagSet = (input, context) => {
870
+ return Object.entries(input).reduce((acc, [key, value]) => {
1055
871
  if (value === null) {
1056
872
  return acc;
1057
873
  }
1058
- return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
874
+ return {
875
+ ...acc,
876
+ [key]: value,
877
+ };
1059
878
  }, {});
1060
879
  };
1061
- var deserializeAws_json1_1affectedAccountsList = function (output, context) {
1062
- var retVal = (output || [])
1063
- .filter(function (e) { return e != null; })
1064
- .map(function (entry) {
880
+ const deserializeAws_json1_1affectedAccountsList = (output, context) => {
881
+ const retVal = (output || [])
882
+ .filter((e) => e != null)
883
+ .map((entry) => {
1065
884
  if (entry === null) {
1066
885
  return null;
1067
886
  }
@@ -1069,7 +888,7 @@ var deserializeAws_json1_1affectedAccountsList = function (output, context) {
1069
888
  });
1070
889
  return retVal;
1071
890
  };
1072
- var deserializeAws_json1_1AffectedEntity = function (output, context) {
891
+ const deserializeAws_json1_1AffectedEntity = (output, context) => {
1073
892
  return {
1074
893
  awsAccountId: __expectString(output.awsAccountId),
1075
894
  entityArn: __expectString(output.entityArn),
@@ -1083,12 +902,12 @@ var deserializeAws_json1_1AffectedEntity = function (output, context) {
1083
902
  tags: output.tags != null ? deserializeAws_json1_1tagSet(output.tags, context) : undefined,
1084
903
  };
1085
904
  };
1086
- var deserializeAws_json1_1ConcurrentModificationException = function (output, context) {
905
+ const deserializeAws_json1_1ConcurrentModificationException = (output, context) => {
1087
906
  return {
1088
907
  message: __expectString(output.message),
1089
908
  };
1090
909
  };
1091
- var deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse = function (output, context) {
910
+ const deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse = (output, context) => {
1092
911
  return {
1093
912
  affectedAccounts: output.affectedAccounts != null
1094
913
  ? deserializeAws_json1_1affectedAccountsList(output.affectedAccounts, context)
@@ -1097,10 +916,10 @@ var deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse = func
1097
916
  nextToken: __expectString(output.nextToken),
1098
917
  };
1099
918
  };
1100
- var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationFailedSet = function (output, context) {
1101
- var retVal = (output || [])
1102
- .filter(function (e) { return e != null; })
1103
- .map(function (entry) {
919
+ const deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationFailedSet = (output, context) => {
920
+ const retVal = (output || [])
921
+ .filter((e) => e != null)
922
+ .map((entry) => {
1104
923
  if (entry === null) {
1105
924
  return null;
1106
925
  }
@@ -1108,7 +927,7 @@ var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationFailedSet = fun
1108
927
  });
1109
928
  return retVal;
1110
929
  };
1111
- var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse = function (output, context) {
930
+ const deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse = (output, context) => {
1112
931
  return {
1113
932
  entities: output.entities != null ? deserializeAws_json1_1EntityList(output.entities, context) : undefined,
1114
933
  failedSet: output.failedSet != null
@@ -1117,20 +936,20 @@ var deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse = func
1117
936
  nextToken: __expectString(output.nextToken),
1118
937
  };
1119
938
  };
1120
- var deserializeAws_json1_1DescribeAffectedEntitiesResponse = function (output, context) {
939
+ const deserializeAws_json1_1DescribeAffectedEntitiesResponse = (output, context) => {
1121
940
  return {
1122
941
  entities: output.entities != null ? deserializeAws_json1_1EntityList(output.entities, context) : undefined,
1123
942
  nextToken: __expectString(output.nextToken),
1124
943
  };
1125
944
  };
1126
- var deserializeAws_json1_1DescribeEntityAggregatesResponse = function (output, context) {
945
+ const deserializeAws_json1_1DescribeEntityAggregatesResponse = (output, context) => {
1127
946
  return {
1128
947
  entityAggregates: output.entityAggregates != null
1129
948
  ? deserializeAws_json1_1EntityAggregateList(output.entityAggregates, context)
1130
949
  : undefined,
1131
950
  };
1132
951
  };
1133
- var deserializeAws_json1_1DescribeEventAggregatesResponse = function (output, context) {
952
+ const deserializeAws_json1_1DescribeEventAggregatesResponse = (output, context) => {
1134
953
  return {
1135
954
  eventAggregates: output.eventAggregates != null
1136
955
  ? deserializeAws_json1_1EventAggregateList(output.eventAggregates, context)
@@ -1138,10 +957,10 @@ var deserializeAws_json1_1DescribeEventAggregatesResponse = function (output, co
1138
957
  nextToken: __expectString(output.nextToken),
1139
958
  };
1140
959
  };
1141
- var deserializeAws_json1_1DescribeEventDetailsFailedSet = function (output, context) {
1142
- var retVal = (output || [])
1143
- .filter(function (e) { return e != null; })
1144
- .map(function (entry) {
960
+ const deserializeAws_json1_1DescribeEventDetailsFailedSet = (output, context) => {
961
+ const retVal = (output || [])
962
+ .filter((e) => e != null)
963
+ .map((entry) => {
1145
964
  if (entry === null) {
1146
965
  return null;
1147
966
  }
@@ -1149,10 +968,10 @@ var deserializeAws_json1_1DescribeEventDetailsFailedSet = function (output, cont
1149
968
  });
1150
969
  return retVal;
1151
970
  };
1152
- var deserializeAws_json1_1DescribeEventDetailsForOrganizationFailedSet = function (output, context) {
1153
- var retVal = (output || [])
1154
- .filter(function (e) { return e != null; })
1155
- .map(function (entry) {
971
+ const deserializeAws_json1_1DescribeEventDetailsForOrganizationFailedSet = (output, context) => {
972
+ const retVal = (output || [])
973
+ .filter((e) => e != null)
974
+ .map((entry) => {
1156
975
  if (entry === null) {
1157
976
  return null;
1158
977
  }
@@ -1160,7 +979,7 @@ var deserializeAws_json1_1DescribeEventDetailsForOrganizationFailedSet = functio
1160
979
  });
1161
980
  return retVal;
1162
981
  };
1163
- var deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse = function (output, context) {
982
+ const deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse = (output, context) => {
1164
983
  return {
1165
984
  failedSet: output.failedSet != null
1166
985
  ? deserializeAws_json1_1DescribeEventDetailsForOrganizationFailedSet(output.failedSet, context)
@@ -1170,10 +989,10 @@ var deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse = function
1170
989
  : undefined,
1171
990
  };
1172
991
  };
1173
- var deserializeAws_json1_1DescribeEventDetailsForOrganizationSuccessfulSet = function (output, context) {
1174
- var retVal = (output || [])
1175
- .filter(function (e) { return e != null; })
1176
- .map(function (entry) {
992
+ const deserializeAws_json1_1DescribeEventDetailsForOrganizationSuccessfulSet = (output, context) => {
993
+ const retVal = (output || [])
994
+ .filter((e) => e != null)
995
+ .map((entry) => {
1177
996
  if (entry === null) {
1178
997
  return null;
1179
998
  }
@@ -1181,7 +1000,7 @@ var deserializeAws_json1_1DescribeEventDetailsForOrganizationSuccessfulSet = fun
1181
1000
  });
1182
1001
  return retVal;
1183
1002
  };
1184
- var deserializeAws_json1_1DescribeEventDetailsResponse = function (output, context) {
1003
+ const deserializeAws_json1_1DescribeEventDetailsResponse = (output, context) => {
1185
1004
  return {
1186
1005
  failedSet: output.failedSet != null
1187
1006
  ? deserializeAws_json1_1DescribeEventDetailsFailedSet(output.failedSet, context)
@@ -1191,10 +1010,10 @@ var deserializeAws_json1_1DescribeEventDetailsResponse = function (output, conte
1191
1010
  : undefined,
1192
1011
  };
1193
1012
  };
1194
- var deserializeAws_json1_1DescribeEventDetailsSuccessfulSet = function (output, context) {
1195
- var retVal = (output || [])
1196
- .filter(function (e) { return e != null; })
1197
- .map(function (entry) {
1013
+ const deserializeAws_json1_1DescribeEventDetailsSuccessfulSet = (output, context) => {
1014
+ const retVal = (output || [])
1015
+ .filter((e) => e != null)
1016
+ .map((entry) => {
1198
1017
  if (entry === null) {
1199
1018
  return null;
1200
1019
  }
@@ -1202,39 +1021,39 @@ var deserializeAws_json1_1DescribeEventDetailsSuccessfulSet = function (output,
1202
1021
  });
1203
1022
  return retVal;
1204
1023
  };
1205
- var deserializeAws_json1_1DescribeEventsForOrganizationResponse = function (output, context) {
1024
+ const deserializeAws_json1_1DescribeEventsForOrganizationResponse = (output, context) => {
1206
1025
  return {
1207
1026
  events: output.events != null ? deserializeAws_json1_1OrganizationEventList(output.events, context) : undefined,
1208
1027
  nextToken: __expectString(output.nextToken),
1209
1028
  };
1210
1029
  };
1211
- var deserializeAws_json1_1DescribeEventsResponse = function (output, context) {
1030
+ const deserializeAws_json1_1DescribeEventsResponse = (output, context) => {
1212
1031
  return {
1213
1032
  events: output.events != null ? deserializeAws_json1_1EventList(output.events, context) : undefined,
1214
1033
  nextToken: __expectString(output.nextToken),
1215
1034
  };
1216
1035
  };
1217
- var deserializeAws_json1_1DescribeEventTypesResponse = function (output, context) {
1036
+ const deserializeAws_json1_1DescribeEventTypesResponse = (output, context) => {
1218
1037
  return {
1219
1038
  eventTypes: output.eventTypes != null ? deserializeAws_json1_1EventTypeList(output.eventTypes, context) : undefined,
1220
1039
  nextToken: __expectString(output.nextToken),
1221
1040
  };
1222
1041
  };
1223
- var deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationResponse = function (output, context) {
1042
+ const deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationResponse = (output, context) => {
1224
1043
  return {
1225
1044
  healthServiceAccessStatusForOrganization: __expectString(output.healthServiceAccessStatusForOrganization),
1226
1045
  };
1227
1046
  };
1228
- var deserializeAws_json1_1EntityAggregate = function (output, context) {
1047
+ const deserializeAws_json1_1EntityAggregate = (output, context) => {
1229
1048
  return {
1230
1049
  count: __expectInt32(output.count),
1231
1050
  eventArn: __expectString(output.eventArn),
1232
1051
  };
1233
1052
  };
1234
- var deserializeAws_json1_1EntityAggregateList = function (output, context) {
1235
- var retVal = (output || [])
1236
- .filter(function (e) { return e != null; })
1237
- .map(function (entry) {
1053
+ const deserializeAws_json1_1EntityAggregateList = (output, context) => {
1054
+ const retVal = (output || [])
1055
+ .filter((e) => e != null)
1056
+ .map((entry) => {
1238
1057
  if (entry === null) {
1239
1058
  return null;
1240
1059
  }
@@ -1242,10 +1061,10 @@ var deserializeAws_json1_1EntityAggregateList = function (output, context) {
1242
1061
  });
1243
1062
  return retVal;
1244
1063
  };
1245
- var deserializeAws_json1_1EntityList = function (output, context) {
1246
- var retVal = (output || [])
1247
- .filter(function (e) { return e != null; })
1248
- .map(function (entry) {
1064
+ const deserializeAws_json1_1EntityList = (output, context) => {
1065
+ const retVal = (output || [])
1066
+ .filter((e) => e != null)
1067
+ .map((entry) => {
1249
1068
  if (entry === null) {
1250
1069
  return null;
1251
1070
  }
@@ -1253,7 +1072,7 @@ var deserializeAws_json1_1EntityList = function (output, context) {
1253
1072
  });
1254
1073
  return retVal;
1255
1074
  };
1256
- var deserializeAws_json1_1Event = function (output, context) {
1075
+ const deserializeAws_json1_1Event = (output, context) => {
1257
1076
  return {
1258
1077
  arn: __expectString(output.arn),
1259
1078
  availabilityZone: __expectString(output.availabilityZone),
@@ -1270,16 +1089,16 @@ var deserializeAws_json1_1Event = function (output, context) {
1270
1089
  statusCode: __expectString(output.statusCode),
1271
1090
  };
1272
1091
  };
1273
- var deserializeAws_json1_1EventAggregate = function (output, context) {
1092
+ const deserializeAws_json1_1EventAggregate = (output, context) => {
1274
1093
  return {
1275
1094
  aggregateValue: __expectString(output.aggregateValue),
1276
1095
  count: __expectInt32(output.count),
1277
1096
  };
1278
1097
  };
1279
- var deserializeAws_json1_1EventAggregateList = function (output, context) {
1280
- var retVal = (output || [])
1281
- .filter(function (e) { return e != null; })
1282
- .map(function (entry) {
1098
+ const deserializeAws_json1_1EventAggregateList = (output, context) => {
1099
+ const retVal = (output || [])
1100
+ .filter((e) => e != null)
1101
+ .map((entry) => {
1283
1102
  if (entry === null) {
1284
1103
  return null;
1285
1104
  }
@@ -1287,12 +1106,12 @@ var deserializeAws_json1_1EventAggregateList = function (output, context) {
1287
1106
  });
1288
1107
  return retVal;
1289
1108
  };
1290
- var deserializeAws_json1_1EventDescription = function (output, context) {
1109
+ const deserializeAws_json1_1EventDescription = (output, context) => {
1291
1110
  return {
1292
1111
  latestDescription: __expectString(output.latestDescription),
1293
1112
  };
1294
1113
  };
1295
- var deserializeAws_json1_1EventDetails = function (output, context) {
1114
+ const deserializeAws_json1_1EventDetails = (output, context) => {
1296
1115
  return {
1297
1116
  event: output.event != null ? deserializeAws_json1_1Event(output.event, context) : undefined,
1298
1117
  eventDescription: output.eventDescription != null
@@ -1301,17 +1120,17 @@ var deserializeAws_json1_1EventDetails = function (output, context) {
1301
1120
  eventMetadata: output.eventMetadata != null ? deserializeAws_json1_1eventMetadata(output.eventMetadata, context) : undefined,
1302
1121
  };
1303
1122
  };
1304
- var deserializeAws_json1_1EventDetailsErrorItem = function (output, context) {
1123
+ const deserializeAws_json1_1EventDetailsErrorItem = (output, context) => {
1305
1124
  return {
1306
1125
  errorMessage: __expectString(output.errorMessage),
1307
1126
  errorName: __expectString(output.errorName),
1308
1127
  eventArn: __expectString(output.eventArn),
1309
1128
  };
1310
1129
  };
1311
- var deserializeAws_json1_1EventList = function (output, context) {
1312
- var retVal = (output || [])
1313
- .filter(function (e) { return e != null; })
1314
- .map(function (entry) {
1130
+ const deserializeAws_json1_1EventList = (output, context) => {
1131
+ const retVal = (output || [])
1132
+ .filter((e) => e != null)
1133
+ .map((entry) => {
1315
1134
  if (entry === null) {
1316
1135
  return null;
1317
1136
  }
@@ -1319,27 +1138,28 @@ var deserializeAws_json1_1EventList = function (output, context) {
1319
1138
  });
1320
1139
  return retVal;
1321
1140
  };
1322
- var deserializeAws_json1_1eventMetadata = function (output, context) {
1323
- return Object.entries(output).reduce(function (acc, _a) {
1324
- var _b;
1325
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1141
+ const deserializeAws_json1_1eventMetadata = (output, context) => {
1142
+ return Object.entries(output).reduce((acc, [key, value]) => {
1326
1143
  if (value === null) {
1327
1144
  return acc;
1328
1145
  }
1329
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1146
+ return {
1147
+ ...acc,
1148
+ [key]: __expectString(value),
1149
+ };
1330
1150
  }, {});
1331
1151
  };
1332
- var deserializeAws_json1_1EventType = function (output, context) {
1152
+ const deserializeAws_json1_1EventType = (output, context) => {
1333
1153
  return {
1334
1154
  category: __expectString(output.category),
1335
1155
  code: __expectString(output.code),
1336
1156
  service: __expectString(output.service),
1337
1157
  };
1338
1158
  };
1339
- var deserializeAws_json1_1EventTypeList = function (output, context) {
1340
- var retVal = (output || [])
1341
- .filter(function (e) { return e != null; })
1342
- .map(function (entry) {
1159
+ const deserializeAws_json1_1EventTypeList = (output, context) => {
1160
+ const retVal = (output || [])
1161
+ .filter((e) => e != null)
1162
+ .map((entry) => {
1343
1163
  if (entry === null) {
1344
1164
  return null;
1345
1165
  }
@@ -1347,12 +1167,12 @@ var deserializeAws_json1_1EventTypeList = function (output, context) {
1347
1167
  });
1348
1168
  return retVal;
1349
1169
  };
1350
- var deserializeAws_json1_1InvalidPaginationToken = function (output, context) {
1170
+ const deserializeAws_json1_1InvalidPaginationToken = (output, context) => {
1351
1171
  return {
1352
1172
  message: __expectString(output.message),
1353
1173
  };
1354
1174
  };
1355
- var deserializeAws_json1_1OrganizationAffectedEntitiesErrorItem = function (output, context) {
1175
+ const deserializeAws_json1_1OrganizationAffectedEntitiesErrorItem = (output, context) => {
1356
1176
  return {
1357
1177
  awsAccountId: __expectString(output.awsAccountId),
1358
1178
  errorMessage: __expectString(output.errorMessage),
@@ -1360,7 +1180,7 @@ var deserializeAws_json1_1OrganizationAffectedEntitiesErrorItem = function (outp
1360
1180
  eventArn: __expectString(output.eventArn),
1361
1181
  };
1362
1182
  };
1363
- var deserializeAws_json1_1OrganizationEvent = function (output, context) {
1183
+ const deserializeAws_json1_1OrganizationEvent = (output, context) => {
1364
1184
  return {
1365
1185
  arn: __expectString(output.arn),
1366
1186
  endTime: output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
@@ -1376,7 +1196,7 @@ var deserializeAws_json1_1OrganizationEvent = function (output, context) {
1376
1196
  statusCode: __expectString(output.statusCode),
1377
1197
  };
1378
1198
  };
1379
- var deserializeAws_json1_1OrganizationEventDetails = function (output, context) {
1199
+ const deserializeAws_json1_1OrganizationEventDetails = (output, context) => {
1380
1200
  return {
1381
1201
  awsAccountId: __expectString(output.awsAccountId),
1382
1202
  event: output.event != null ? deserializeAws_json1_1Event(output.event, context) : undefined,
@@ -1386,7 +1206,7 @@ var deserializeAws_json1_1OrganizationEventDetails = function (output, context)
1386
1206
  eventMetadata: output.eventMetadata != null ? deserializeAws_json1_1eventMetadata(output.eventMetadata, context) : undefined,
1387
1207
  };
1388
1208
  };
1389
- var deserializeAws_json1_1OrganizationEventDetailsErrorItem = function (output, context) {
1209
+ const deserializeAws_json1_1OrganizationEventDetailsErrorItem = (output, context) => {
1390
1210
  return {
1391
1211
  awsAccountId: __expectString(output.awsAccountId),
1392
1212
  errorMessage: __expectString(output.errorMessage),
@@ -1394,10 +1214,10 @@ var deserializeAws_json1_1OrganizationEventDetailsErrorItem = function (output,
1394
1214
  eventArn: __expectString(output.eventArn),
1395
1215
  };
1396
1216
  };
1397
- var deserializeAws_json1_1OrganizationEventList = function (output, context) {
1398
- var retVal = (output || [])
1399
- .filter(function (e) { return e != null; })
1400
- .map(function (entry) {
1217
+ const deserializeAws_json1_1OrganizationEventList = (output, context) => {
1218
+ const retVal = (output || [])
1219
+ .filter((e) => e != null)
1220
+ .map((entry) => {
1401
1221
  if (entry === null) {
1402
1222
  return null;
1403
1223
  }
@@ -1405,90 +1225,68 @@ var deserializeAws_json1_1OrganizationEventList = function (output, context) {
1405
1225
  });
1406
1226
  return retVal;
1407
1227
  };
1408
- var deserializeAws_json1_1tagSet = function (output, context) {
1409
- return Object.entries(output).reduce(function (acc, _a) {
1410
- var _b;
1411
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
1228
+ const deserializeAws_json1_1tagSet = (output, context) => {
1229
+ return Object.entries(output).reduce((acc, [key, value]) => {
1412
1230
  if (value === null) {
1413
1231
  return acc;
1414
1232
  }
1415
- return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
1233
+ return {
1234
+ ...acc,
1235
+ [key]: __expectString(value),
1236
+ };
1416
1237
  }, {});
1417
1238
  };
1418
- var deserializeAws_json1_1UnsupportedLocale = function (output, context) {
1239
+ const deserializeAws_json1_1UnsupportedLocale = (output, context) => {
1419
1240
  return {
1420
1241
  message: __expectString(output.message),
1421
1242
  };
1422
1243
  };
1423
- var deserializeMetadata = function (output) {
1424
- var _a;
1425
- return ({
1426
- httpStatusCode: output.statusCode,
1427
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
1428
- extendedRequestId: output.headers["x-amz-id-2"],
1429
- cfId: output.headers["x-amz-cf-id"],
1430
- });
1431
- };
1432
- var collectBody = function (streamBody, context) {
1433
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
1244
+ const deserializeMetadata = (output) => ({
1245
+ httpStatusCode: output.statusCode,
1246
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1247
+ extendedRequestId: output.headers["x-amz-id-2"],
1248
+ cfId: output.headers["x-amz-cf-id"],
1249
+ });
1250
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1434
1251
  if (streamBody instanceof Uint8Array) {
1435
1252
  return Promise.resolve(streamBody);
1436
1253
  }
1437
1254
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1438
1255
  };
1439
- var collectBodyString = function (streamBody, context) {
1440
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1441
- };
1442
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1443
- var _a, hostname, _b, protocol, port, basePath, contents;
1444
- return __generator(this, function (_c) {
1445
- switch (_c.label) {
1446
- case 0: return [4, context.endpoint()];
1447
- case 1:
1448
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1449
- contents = {
1450
- protocol: protocol,
1451
- hostname: hostname,
1452
- port: port,
1453
- method: "POST",
1454
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1455
- headers: headers,
1456
- };
1457
- if (resolvedHostname !== undefined) {
1458
- contents.hostname = resolvedHostname;
1459
- }
1460
- if (body !== undefined) {
1461
- contents.body = body;
1462
- }
1463
- return [2, new __HttpRequest(contents)];
1464
- }
1465
- });
1466
- }); };
1467
- var parseBody = function (streamBody, context) {
1468
- return collectBodyString(streamBody, context).then(function (encoded) {
1469
- if (encoded.length) {
1470
- return JSON.parse(encoded);
1471
- }
1472
- return {};
1473
- });
1256
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1257
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1258
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1259
+ const contents = {
1260
+ protocol,
1261
+ hostname,
1262
+ port,
1263
+ method: "POST",
1264
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1265
+ headers,
1266
+ };
1267
+ if (resolvedHostname !== undefined) {
1268
+ contents.hostname = resolvedHostname;
1269
+ }
1270
+ if (body !== undefined) {
1271
+ contents.body = body;
1272
+ }
1273
+ return new __HttpRequest(contents);
1474
1274
  };
1475
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1476
- var value;
1477
- var _a;
1478
- return __generator(this, function (_b) {
1479
- switch (_b.label) {
1480
- case 0: return [4, parseBody(errorBody, context)];
1481
- case 1:
1482
- value = _b.sent();
1483
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1484
- return [2, value];
1485
- }
1486
- });
1487
- }); };
1488
- var loadRestJsonErrorCode = function (output, data) {
1489
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1490
- var sanitizeErrorCode = function (rawValue) {
1491
- var cleanValue = rawValue;
1275
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1276
+ if (encoded.length) {
1277
+ return JSON.parse(encoded);
1278
+ }
1279
+ return {};
1280
+ });
1281
+ const parseErrorBody = async (errorBody, context) => {
1282
+ const value = await parseBody(errorBody, context);
1283
+ value.message = value.message ?? value.Message;
1284
+ return value;
1285
+ };
1286
+ const loadRestJsonErrorCode = (output, data) => {
1287
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1288
+ const sanitizeErrorCode = (rawValue) => {
1289
+ let cleanValue = rawValue;
1492
1290
  if (typeof cleanValue === "number") {
1493
1291
  cleanValue = cleanValue.toString();
1494
1292
  }
@@ -1503,7 +1301,7 @@ var loadRestJsonErrorCode = function (output, data) {
1503
1301
  }
1504
1302
  return cleanValue;
1505
1303
  };
1506
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1304
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1507
1305
  if (headerKey !== undefined) {
1508
1306
  return sanitizeErrorCode(output.headers[headerKey]);
1509
1307
  }