@aws-sdk/client-health 3.310.0 → 3.315.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.
@@ -6,128 +6,89 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const HealthServiceException_1 = require("../models/HealthServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_DescribeAffectedAccountsForOrganizationCommand = async (input, context) => {
9
- const headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedAccountsForOrganization",
12
- };
9
+ const headers = sharedHeaders("DescribeAffectedAccountsForOrganization");
13
10
  let body;
14
- body = JSON.stringify(se_DescribeAffectedAccountsForOrganizationRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
15
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
13
  };
17
14
  exports.se_DescribeAffectedAccountsForOrganizationCommand = se_DescribeAffectedAccountsForOrganizationCommand;
18
15
  const se_DescribeAffectedEntitiesCommand = async (input, context) => {
19
- const headers = {
20
- "content-type": "application/x-amz-json-1.1",
21
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntities",
22
- };
16
+ const headers = sharedHeaders("DescribeAffectedEntities");
23
17
  let body;
24
18
  body = JSON.stringify(se_DescribeAffectedEntitiesRequest(input, context));
25
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
20
  };
27
21
  exports.se_DescribeAffectedEntitiesCommand = se_DescribeAffectedEntitiesCommand;
28
22
  const se_DescribeAffectedEntitiesForOrganizationCommand = async (input, context) => {
29
- const headers = {
30
- "content-type": "application/x-amz-json-1.1",
31
- "x-amz-target": "AWSHealth_20160804.DescribeAffectedEntitiesForOrganization",
32
- };
23
+ const headers = sharedHeaders("DescribeAffectedEntitiesForOrganization");
33
24
  let body;
34
- body = JSON.stringify(se_DescribeAffectedEntitiesForOrganizationRequest(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
35
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
27
  };
37
28
  exports.se_DescribeAffectedEntitiesForOrganizationCommand = se_DescribeAffectedEntitiesForOrganizationCommand;
38
29
  const se_DescribeEntityAggregatesCommand = async (input, context) => {
39
- const headers = {
40
- "content-type": "application/x-amz-json-1.1",
41
- "x-amz-target": "AWSHealth_20160804.DescribeEntityAggregates",
42
- };
30
+ const headers = sharedHeaders("DescribeEntityAggregates");
43
31
  let body;
44
- body = JSON.stringify(se_DescribeEntityAggregatesRequest(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
45
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
34
  };
47
35
  exports.se_DescribeEntityAggregatesCommand = se_DescribeEntityAggregatesCommand;
48
36
  const se_DescribeEventAggregatesCommand = async (input, context) => {
49
- const headers = {
50
- "content-type": "application/x-amz-json-1.1",
51
- "x-amz-target": "AWSHealth_20160804.DescribeEventAggregates",
52
- };
37
+ const headers = sharedHeaders("DescribeEventAggregates");
53
38
  let body;
54
39
  body = JSON.stringify(se_DescribeEventAggregatesRequest(input, context));
55
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
41
  };
57
42
  exports.se_DescribeEventAggregatesCommand = se_DescribeEventAggregatesCommand;
58
43
  const se_DescribeEventDetailsCommand = async (input, context) => {
59
- const headers = {
60
- "content-type": "application/x-amz-json-1.1",
61
- "x-amz-target": "AWSHealth_20160804.DescribeEventDetails",
62
- };
44
+ const headers = sharedHeaders("DescribeEventDetails");
63
45
  let body;
64
- body = JSON.stringify(se_DescribeEventDetailsRequest(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
65
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
48
  };
67
49
  exports.se_DescribeEventDetailsCommand = se_DescribeEventDetailsCommand;
68
50
  const se_DescribeEventDetailsForOrganizationCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSHealth_20160804.DescribeEventDetailsForOrganization",
72
- };
51
+ const headers = sharedHeaders("DescribeEventDetailsForOrganization");
73
52
  let body;
74
- body = JSON.stringify(se_DescribeEventDetailsForOrganizationRequest(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
75
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
55
  };
77
56
  exports.se_DescribeEventDetailsForOrganizationCommand = se_DescribeEventDetailsForOrganizationCommand;
78
57
  const se_DescribeEventsCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.1",
81
- "x-amz-target": "AWSHealth_20160804.DescribeEvents",
82
- };
58
+ const headers = sharedHeaders("DescribeEvents");
83
59
  let body;
84
60
  body = JSON.stringify(se_DescribeEventsRequest(input, context));
85
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
62
  };
87
63
  exports.se_DescribeEventsCommand = se_DescribeEventsCommand;
88
64
  const se_DescribeEventsForOrganizationCommand = async (input, context) => {
89
- const headers = {
90
- "content-type": "application/x-amz-json-1.1",
91
- "x-amz-target": "AWSHealth_20160804.DescribeEventsForOrganization",
92
- };
65
+ const headers = sharedHeaders("DescribeEventsForOrganization");
93
66
  let body;
94
67
  body = JSON.stringify(se_DescribeEventsForOrganizationRequest(input, context));
95
68
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
69
  };
97
70
  exports.se_DescribeEventsForOrganizationCommand = se_DescribeEventsForOrganizationCommand;
98
71
  const se_DescribeEventTypesCommand = async (input, context) => {
99
- const headers = {
100
- "content-type": "application/x-amz-json-1.1",
101
- "x-amz-target": "AWSHealth_20160804.DescribeEventTypes",
102
- };
72
+ const headers = sharedHeaders("DescribeEventTypes");
103
73
  let body;
104
- body = JSON.stringify(se_DescribeEventTypesRequest(input, context));
74
+ body = JSON.stringify((0, smithy_client_1._json)(input));
105
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
76
  };
107
77
  exports.se_DescribeEventTypesCommand = se_DescribeEventTypesCommand;
108
78
  const se_DescribeHealthServiceStatusForOrganizationCommand = async (input, context) => {
109
- const headers = {
110
- "content-type": "application/x-amz-json-1.1",
111
- "x-amz-target": "AWSHealth_20160804.DescribeHealthServiceStatusForOrganization",
112
- };
79
+ const headers = sharedHeaders("DescribeHealthServiceStatusForOrganization");
113
80
  const body = "{}";
114
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
115
82
  };
116
83
  exports.se_DescribeHealthServiceStatusForOrganizationCommand = se_DescribeHealthServiceStatusForOrganizationCommand;
117
84
  const se_DisableHealthServiceAccessForOrganizationCommand = async (input, context) => {
118
- const headers = {
119
- "content-type": "application/x-amz-json-1.1",
120
- "x-amz-target": "AWSHealth_20160804.DisableHealthServiceAccessForOrganization",
121
- };
85
+ const headers = sharedHeaders("DisableHealthServiceAccessForOrganization");
122
86
  const body = "{}";
123
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
88
  };
125
89
  exports.se_DisableHealthServiceAccessForOrganizationCommand = se_DisableHealthServiceAccessForOrganizationCommand;
126
90
  const se_EnableHealthServiceAccessForOrganizationCommand = async (input, context) => {
127
- const headers = {
128
- "content-type": "application/x-amz-json-1.1",
129
- "x-amz-target": "AWSHealth_20160804.EnableHealthServiceAccessForOrganization",
130
- };
91
+ const headers = sharedHeaders("EnableHealthServiceAccessForOrganization");
131
92
  const body = "{}";
132
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
94
  };
@@ -138,12 +99,12 @@ const de_DescribeAffectedAccountsForOrganizationCommand = async (output, context
138
99
  }
139
100
  const data = await parseBody(output.body, context);
140
101
  let contents = {};
141
- contents = de_DescribeAffectedAccountsForOrganizationResponse(data, context);
102
+ contents = (0, smithy_client_1._json)(data);
142
103
  const response = {
143
104
  $metadata: deserializeMetadata(output),
144
105
  ...contents,
145
106
  };
146
- return Promise.resolve(response);
107
+ return response;
147
108
  };
148
109
  exports.de_DescribeAffectedAccountsForOrganizationCommand = de_DescribeAffectedAccountsForOrganizationCommand;
149
110
  const de_DescribeAffectedAccountsForOrganizationCommandError = async (output, context) => {
@@ -158,10 +119,9 @@ const de_DescribeAffectedAccountsForOrganizationCommandError = async (output, co
158
119
  throw await de_InvalidPaginationTokenRes(parsedOutput, context);
159
120
  default:
160
121
  const parsedBody = parsedOutput.body;
161
- (0, smithy_client_1.throwDefaultError)({
122
+ return throwDefaultError({
162
123
  output,
163
124
  parsedBody,
164
- exceptionCtor: HealthServiceException_1.HealthServiceException,
165
125
  errorCode,
166
126
  });
167
127
  }
@@ -177,7 +137,7 @@ const de_DescribeAffectedEntitiesCommand = async (output, context) => {
177
137
  $metadata: deserializeMetadata(output),
178
138
  ...contents,
179
139
  };
180
- return Promise.resolve(response);
140
+ return response;
181
141
  };
182
142
  exports.de_DescribeAffectedEntitiesCommand = de_DescribeAffectedEntitiesCommand;
183
143
  const de_DescribeAffectedEntitiesCommandError = async (output, context) => {
@@ -195,10 +155,9 @@ const de_DescribeAffectedEntitiesCommandError = async (output, context) => {
195
155
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
196
156
  default:
197
157
  const parsedBody = parsedOutput.body;
198
- (0, smithy_client_1.throwDefaultError)({
158
+ return throwDefaultError({
199
159
  output,
200
160
  parsedBody,
201
- exceptionCtor: HealthServiceException_1.HealthServiceException,
202
161
  errorCode,
203
162
  });
204
163
  }
@@ -214,7 +173,7 @@ const de_DescribeAffectedEntitiesForOrganizationCommand = async (output, context
214
173
  $metadata: deserializeMetadata(output),
215
174
  ...contents,
216
175
  };
217
- return Promise.resolve(response);
176
+ return response;
218
177
  };
219
178
  exports.de_DescribeAffectedEntitiesForOrganizationCommand = de_DescribeAffectedEntitiesForOrganizationCommand;
220
179
  const de_DescribeAffectedEntitiesForOrganizationCommandError = async (output, context) => {
@@ -232,10 +191,9 @@ const de_DescribeAffectedEntitiesForOrganizationCommandError = async (output, co
232
191
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
233
192
  default:
234
193
  const parsedBody = parsedOutput.body;
235
- (0, smithy_client_1.throwDefaultError)({
194
+ return throwDefaultError({
236
195
  output,
237
196
  parsedBody,
238
- exceptionCtor: HealthServiceException_1.HealthServiceException,
239
197
  errorCode,
240
198
  });
241
199
  }
@@ -246,12 +204,12 @@ const de_DescribeEntityAggregatesCommand = async (output, context) => {
246
204
  }
247
205
  const data = await parseBody(output.body, context);
248
206
  let contents = {};
249
- contents = de_DescribeEntityAggregatesResponse(data, context);
207
+ contents = (0, smithy_client_1._json)(data);
250
208
  const response = {
251
209
  $metadata: deserializeMetadata(output),
252
210
  ...contents,
253
211
  };
254
- return Promise.resolve(response);
212
+ return response;
255
213
  };
256
214
  exports.de_DescribeEntityAggregatesCommand = de_DescribeEntityAggregatesCommand;
257
215
  const de_DescribeEntityAggregatesCommandError = async (output, context) => {
@@ -261,10 +219,9 @@ const de_DescribeEntityAggregatesCommandError = async (output, context) => {
261
219
  };
262
220
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
221
  const parsedBody = parsedOutput.body;
264
- (0, smithy_client_1.throwDefaultError)({
222
+ return throwDefaultError({
265
223
  output,
266
224
  parsedBody,
267
- exceptionCtor: HealthServiceException_1.HealthServiceException,
268
225
  errorCode,
269
226
  });
270
227
  };
@@ -274,12 +231,12 @@ const de_DescribeEventAggregatesCommand = async (output, context) => {
274
231
  }
275
232
  const data = await parseBody(output.body, context);
276
233
  let contents = {};
277
- contents = de_DescribeEventAggregatesResponse(data, context);
234
+ contents = (0, smithy_client_1._json)(data);
278
235
  const response = {
279
236
  $metadata: deserializeMetadata(output),
280
237
  ...contents,
281
238
  };
282
- return Promise.resolve(response);
239
+ return response;
283
240
  };
284
241
  exports.de_DescribeEventAggregatesCommand = de_DescribeEventAggregatesCommand;
285
242
  const de_DescribeEventAggregatesCommandError = async (output, context) => {
@@ -294,10 +251,9 @@ const de_DescribeEventAggregatesCommandError = async (output, context) => {
294
251
  throw await de_InvalidPaginationTokenRes(parsedOutput, context);
295
252
  default:
296
253
  const parsedBody = parsedOutput.body;
297
- (0, smithy_client_1.throwDefaultError)({
254
+ return throwDefaultError({
298
255
  output,
299
256
  parsedBody,
300
- exceptionCtor: HealthServiceException_1.HealthServiceException,
301
257
  errorCode,
302
258
  });
303
259
  }
@@ -313,7 +269,7 @@ const de_DescribeEventDetailsCommand = async (output, context) => {
313
269
  $metadata: deserializeMetadata(output),
314
270
  ...contents,
315
271
  };
316
- return Promise.resolve(response);
272
+ return response;
317
273
  };
318
274
  exports.de_DescribeEventDetailsCommand = de_DescribeEventDetailsCommand;
319
275
  const de_DescribeEventDetailsCommandError = async (output, context) => {
@@ -328,10 +284,9 @@ const de_DescribeEventDetailsCommandError = async (output, context) => {
328
284
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
329
285
  default:
330
286
  const parsedBody = parsedOutput.body;
331
- (0, smithy_client_1.throwDefaultError)({
287
+ return throwDefaultError({
332
288
  output,
333
289
  parsedBody,
334
- exceptionCtor: HealthServiceException_1.HealthServiceException,
335
290
  errorCode,
336
291
  });
337
292
  }
@@ -347,7 +302,7 @@ const de_DescribeEventDetailsForOrganizationCommand = async (output, context) =>
347
302
  $metadata: deserializeMetadata(output),
348
303
  ...contents,
349
304
  };
350
- return Promise.resolve(response);
305
+ return response;
351
306
  };
352
307
  exports.de_DescribeEventDetailsForOrganizationCommand = de_DescribeEventDetailsForOrganizationCommand;
353
308
  const de_DescribeEventDetailsForOrganizationCommandError = async (output, context) => {
@@ -362,10 +317,9 @@ const de_DescribeEventDetailsForOrganizationCommandError = async (output, contex
362
317
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
363
318
  default:
364
319
  const parsedBody = parsedOutput.body;
365
- (0, smithy_client_1.throwDefaultError)({
320
+ return throwDefaultError({
366
321
  output,
367
322
  parsedBody,
368
- exceptionCtor: HealthServiceException_1.HealthServiceException,
369
323
  errorCode,
370
324
  });
371
325
  }
@@ -381,7 +335,7 @@ const de_DescribeEventsCommand = async (output, context) => {
381
335
  $metadata: deserializeMetadata(output),
382
336
  ...contents,
383
337
  };
384
- return Promise.resolve(response);
338
+ return response;
385
339
  };
386
340
  exports.de_DescribeEventsCommand = de_DescribeEventsCommand;
387
341
  const de_DescribeEventsCommandError = async (output, context) => {
@@ -399,10 +353,9 @@ const de_DescribeEventsCommandError = async (output, context) => {
399
353
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
400
354
  default:
401
355
  const parsedBody = parsedOutput.body;
402
- (0, smithy_client_1.throwDefaultError)({
356
+ return throwDefaultError({
403
357
  output,
404
358
  parsedBody,
405
- exceptionCtor: HealthServiceException_1.HealthServiceException,
406
359
  errorCode,
407
360
  });
408
361
  }
@@ -418,7 +371,7 @@ const de_DescribeEventsForOrganizationCommand = async (output, context) => {
418
371
  $metadata: deserializeMetadata(output),
419
372
  ...contents,
420
373
  };
421
- return Promise.resolve(response);
374
+ return response;
422
375
  };
423
376
  exports.de_DescribeEventsForOrganizationCommand = de_DescribeEventsForOrganizationCommand;
424
377
  const de_DescribeEventsForOrganizationCommandError = async (output, context) => {
@@ -436,10 +389,9 @@ const de_DescribeEventsForOrganizationCommandError = async (output, context) =>
436
389
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
437
390
  default:
438
391
  const parsedBody = parsedOutput.body;
439
- (0, smithy_client_1.throwDefaultError)({
392
+ return throwDefaultError({
440
393
  output,
441
394
  parsedBody,
442
- exceptionCtor: HealthServiceException_1.HealthServiceException,
443
395
  errorCode,
444
396
  });
445
397
  }
@@ -450,12 +402,12 @@ const de_DescribeEventTypesCommand = async (output, context) => {
450
402
  }
451
403
  const data = await parseBody(output.body, context);
452
404
  let contents = {};
453
- contents = de_DescribeEventTypesResponse(data, context);
405
+ contents = (0, smithy_client_1._json)(data);
454
406
  const response = {
455
407
  $metadata: deserializeMetadata(output),
456
408
  ...contents,
457
409
  };
458
- return Promise.resolve(response);
410
+ return response;
459
411
  };
460
412
  exports.de_DescribeEventTypesCommand = de_DescribeEventTypesCommand;
461
413
  const de_DescribeEventTypesCommandError = async (output, context) => {
@@ -473,10 +425,9 @@ const de_DescribeEventTypesCommandError = async (output, context) => {
473
425
  throw await de_UnsupportedLocaleRes(parsedOutput, context);
474
426
  default:
475
427
  const parsedBody = parsedOutput.body;
476
- (0, smithy_client_1.throwDefaultError)({
428
+ return throwDefaultError({
477
429
  output,
478
430
  parsedBody,
479
- exceptionCtor: HealthServiceException_1.HealthServiceException,
480
431
  errorCode,
481
432
  });
482
433
  }
@@ -487,12 +438,12 @@ const de_DescribeHealthServiceStatusForOrganizationCommand = async (output, cont
487
438
  }
488
439
  const data = await parseBody(output.body, context);
489
440
  let contents = {};
490
- contents = de_DescribeHealthServiceStatusForOrganizationResponse(data, context);
441
+ contents = (0, smithy_client_1._json)(data);
491
442
  const response = {
492
443
  $metadata: deserializeMetadata(output),
493
444
  ...contents,
494
445
  };
495
- return Promise.resolve(response);
446
+ return response;
496
447
  };
497
448
  exports.de_DescribeHealthServiceStatusForOrganizationCommand = de_DescribeHealthServiceStatusForOrganizationCommand;
498
449
  const de_DescribeHealthServiceStatusForOrganizationCommandError = async (output, context) => {
@@ -502,10 +453,9 @@ const de_DescribeHealthServiceStatusForOrganizationCommandError = async (output,
502
453
  };
503
454
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
455
  const parsedBody = parsedOutput.body;
505
- (0, smithy_client_1.throwDefaultError)({
456
+ return throwDefaultError({
506
457
  output,
507
458
  parsedBody,
508
- exceptionCtor: HealthServiceException_1.HealthServiceException,
509
459
  errorCode,
510
460
  });
511
461
  };
@@ -517,7 +467,7 @@ const de_DisableHealthServiceAccessForOrganizationCommand = async (output, conte
517
467
  const response = {
518
468
  $metadata: deserializeMetadata(output),
519
469
  };
520
- return Promise.resolve(response);
470
+ return response;
521
471
  };
522
472
  exports.de_DisableHealthServiceAccessForOrganizationCommand = de_DisableHealthServiceAccessForOrganizationCommand;
523
473
  const de_DisableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
@@ -532,10 +482,9 @@ const de_DisableHealthServiceAccessForOrganizationCommandError = async (output,
532
482
  throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
533
483
  default:
534
484
  const parsedBody = parsedOutput.body;
535
- (0, smithy_client_1.throwDefaultError)({
485
+ return throwDefaultError({
536
486
  output,
537
487
  parsedBody,
538
- exceptionCtor: HealthServiceException_1.HealthServiceException,
539
488
  errorCode,
540
489
  });
541
490
  }
@@ -548,7 +497,7 @@ const de_EnableHealthServiceAccessForOrganizationCommand = async (output, contex
548
497
  const response = {
549
498
  $metadata: deserializeMetadata(output),
550
499
  };
551
- return Promise.resolve(response);
500
+ return response;
552
501
  };
553
502
  exports.de_EnableHealthServiceAccessForOrganizationCommand = de_EnableHealthServiceAccessForOrganizationCommand;
554
503
  const de_EnableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
@@ -563,17 +512,16 @@ const de_EnableHealthServiceAccessForOrganizationCommandError = async (output, c
563
512
  throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
564
513
  default:
565
514
  const parsedBody = parsedOutput.body;
566
- (0, smithy_client_1.throwDefaultError)({
515
+ return throwDefaultError({
567
516
  output,
568
517
  parsedBody,
569
- exceptionCtor: HealthServiceException_1.HealthServiceException,
570
518
  errorCode,
571
519
  });
572
520
  }
573
521
  };
574
522
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
575
523
  const body = parsedOutput.body;
576
- const deserialized = de_ConcurrentModificationException(body, context);
524
+ const deserialized = (0, smithy_client_1._json)(body);
577
525
  const exception = new models_0_1.ConcurrentModificationException({
578
526
  $metadata: deserializeMetadata(parsedOutput),
579
527
  ...deserialized,
@@ -582,7 +530,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
582
530
  };
583
531
  const de_InvalidPaginationTokenRes = async (parsedOutput, context) => {
584
532
  const body = parsedOutput.body;
585
- const deserialized = de_InvalidPaginationToken(body, context);
533
+ const deserialized = (0, smithy_client_1._json)(body);
586
534
  const exception = new models_0_1.InvalidPaginationToken({
587
535
  $metadata: deserializeMetadata(parsedOutput),
588
536
  ...deserialized,
@@ -591,32 +539,18 @@ const de_InvalidPaginationTokenRes = async (parsedOutput, context) => {
591
539
  };
592
540
  const de_UnsupportedLocaleRes = async (parsedOutput, context) => {
593
541
  const body = parsedOutput.body;
594
- const deserialized = de_UnsupportedLocale(body, context);
542
+ const deserialized = (0, smithy_client_1._json)(body);
595
543
  const exception = new models_0_1.UnsupportedLocale({
596
544
  $metadata: deserializeMetadata(parsedOutput),
597
545
  ...deserialized,
598
546
  });
599
547
  return (0, smithy_client_1.decorateServiceException)(exception, body);
600
548
  };
601
- const se_availabilityZones = (input, context) => {
602
- return input
603
- .filter((e) => e != null)
604
- .map((entry) => {
605
- return entry;
606
- });
607
- };
608
- const se_awsAccountIdsList = (input, context) => {
609
- return input
610
- .filter((e) => e != null)
611
- .map((entry) => {
612
- return entry;
613
- });
614
- };
615
549
  const se_DateTimeRange = (input, context) => {
616
- return {
617
- ...(input.from != null && { from: Math.round(input.from.getTime() / 1000) }),
618
- ...(input.to != null && { to: Math.round(input.to.getTime() / 1000) }),
619
- };
550
+ return (0, smithy_client_1.take)(input, {
551
+ from: (_) => Math.round(_.getTime() / 1000),
552
+ to: (_) => Math.round(_.getTime() / 1000),
553
+ });
620
554
  };
621
555
  const se_dateTimeRangeList = (input, context) => {
622
556
  return input
@@ -625,607 +559,213 @@ const se_dateTimeRangeList = (input, context) => {
625
559
  return se_DateTimeRange(entry, context);
626
560
  });
627
561
  };
628
- const se_DescribeAffectedAccountsForOrganizationRequest = (input, context) => {
629
- return {
630
- ...(input.eventArn != null && { eventArn: input.eventArn }),
631
- ...(input.maxResults != null && { maxResults: input.maxResults }),
632
- ...(input.nextToken != null && { nextToken: input.nextToken }),
633
- };
634
- };
635
- const se_DescribeAffectedEntitiesForOrganizationRequest = (input, context) => {
636
- return {
637
- ...(input.locale != null && { locale: input.locale }),
638
- ...(input.maxResults != null && { maxResults: input.maxResults }),
639
- ...(input.nextToken != null && { nextToken: input.nextToken }),
640
- ...(input.organizationEntityFilters != null && {
641
- organizationEntityFilters: se_OrganizationEntityFiltersList(input.organizationEntityFilters, context),
642
- }),
643
- };
644
- };
645
562
  const se_DescribeAffectedEntitiesRequest = (input, context) => {
646
- return {
647
- ...(input.filter != null && { filter: se_EntityFilter(input.filter, context) }),
648
- ...(input.locale != null && { locale: input.locale }),
649
- ...(input.maxResults != null && { maxResults: input.maxResults }),
650
- ...(input.nextToken != null && { nextToken: input.nextToken }),
651
- };
652
- };
653
- const se_DescribeEntityAggregatesRequest = (input, context) => {
654
- return {
655
- ...(input.eventArns != null && { eventArns: se_EventArnsList(input.eventArns, context) }),
656
- };
563
+ return (0, smithy_client_1.take)(input, {
564
+ filter: (_) => se_EntityFilter(_, context),
565
+ locale: [],
566
+ maxResults: [],
567
+ nextToken: [],
568
+ });
657
569
  };
658
570
  const se_DescribeEventAggregatesRequest = (input, context) => {
659
- return {
660
- ...(input.aggregateField != null && { aggregateField: input.aggregateField }),
661
- ...(input.filter != null && { filter: se_EventFilter(input.filter, context) }),
662
- ...(input.maxResults != null && { maxResults: input.maxResults }),
663
- ...(input.nextToken != null && { nextToken: input.nextToken }),
664
- };
665
- };
666
- const se_DescribeEventDetailsForOrganizationRequest = (input, context) => {
667
- return {
668
- ...(input.locale != null && { locale: input.locale }),
669
- ...(input.organizationEventDetailFilters != null && {
670
- organizationEventDetailFilters: se_OrganizationEventDetailFiltersList(input.organizationEventDetailFilters, context),
671
- }),
672
- };
673
- };
674
- const se_DescribeEventDetailsRequest = (input, context) => {
675
- return {
676
- ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }),
677
- ...(input.locale != null && { locale: input.locale }),
678
- };
571
+ return (0, smithy_client_1.take)(input, {
572
+ aggregateField: [],
573
+ filter: (_) => se_EventFilter(_, context),
574
+ maxResults: [],
575
+ nextToken: [],
576
+ });
679
577
  };
680
578
  const se_DescribeEventsForOrganizationRequest = (input, context) => {
681
- return {
682
- ...(input.filter != null && { filter: se_OrganizationEventFilter(input.filter, context) }),
683
- ...(input.locale != null && { locale: input.locale }),
684
- ...(input.maxResults != null && { maxResults: input.maxResults }),
685
- ...(input.nextToken != null && { nextToken: input.nextToken }),
686
- };
579
+ return (0, smithy_client_1.take)(input, {
580
+ filter: (_) => se_OrganizationEventFilter(_, context),
581
+ locale: [],
582
+ maxResults: [],
583
+ nextToken: [],
584
+ });
687
585
  };
688
586
  const se_DescribeEventsRequest = (input, context) => {
689
- return {
690
- ...(input.filter != null && { filter: se_EventFilter(input.filter, context) }),
691
- ...(input.locale != null && { locale: input.locale }),
692
- ...(input.maxResults != null && { maxResults: input.maxResults }),
693
- ...(input.nextToken != null && { nextToken: input.nextToken }),
694
- };
695
- };
696
- const se_DescribeEventTypesRequest = (input, context) => {
697
- return {
698
- ...(input.filter != null && { filter: se_EventTypeFilter(input.filter, context) }),
699
- ...(input.locale != null && { locale: input.locale }),
700
- ...(input.maxResults != null && { maxResults: input.maxResults }),
701
- ...(input.nextToken != null && { nextToken: input.nextToken }),
702
- };
703
- };
704
- const se_entityArnList = (input, context) => {
705
- return input
706
- .filter((e) => e != null)
707
- .map((entry) => {
708
- return entry;
587
+ return (0, smithy_client_1.take)(input, {
588
+ filter: (_) => se_EventFilter(_, context),
589
+ locale: [],
590
+ maxResults: [],
591
+ nextToken: [],
709
592
  });
710
593
  };
711
594
  const se_EntityFilter = (input, context) => {
712
- return {
713
- ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }),
714
- ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }),
715
- ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }),
716
- ...(input.lastUpdatedTimes != null && { lastUpdatedTimes: se_dateTimeRangeList(input.lastUpdatedTimes, context) }),
717
- ...(input.statusCodes != null && { statusCodes: se_entityStatusCodeList(input.statusCodes, context) }),
718
- ...(input.tags != null && { tags: se_tagFilter(input.tags, context) }),
719
- };
720
- };
721
- const se_entityStatusCodeList = (input, context) => {
722
- return input
723
- .filter((e) => e != null)
724
- .map((entry) => {
725
- return entry;
726
- });
727
- };
728
- const se_entityValueList = (input, context) => {
729
- return input
730
- .filter((e) => e != null)
731
- .map((entry) => {
732
- return entry;
733
- });
734
- };
735
- const se_EventAccountFilter = (input, context) => {
736
- return {
737
- ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }),
738
- ...(input.eventArn != null && { eventArn: input.eventArn }),
739
- };
740
- };
741
- const se_eventArnList = (input, context) => {
742
- return input
743
- .filter((e) => e != null)
744
- .map((entry) => {
745
- return entry;
746
- });
747
- };
748
- const se_EventArnsList = (input, context) => {
749
- return input
750
- .filter((e) => e != null)
751
- .map((entry) => {
752
- return entry;
595
+ return (0, smithy_client_1.take)(input, {
596
+ entityArns: smithy_client_1._json,
597
+ entityValues: smithy_client_1._json,
598
+ eventArns: smithy_client_1._json,
599
+ lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context),
600
+ statusCodes: smithy_client_1._json,
601
+ tags: smithy_client_1._json,
753
602
  });
754
603
  };
755
604
  const se_EventFilter = (input, context) => {
756
- return {
757
- ...(input.availabilityZones != null && {
758
- availabilityZones: se_availabilityZones(input.availabilityZones, context),
759
- }),
760
- ...(input.endTimes != null && { endTimes: se_dateTimeRangeList(input.endTimes, context) }),
761
- ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }),
762
- ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }),
763
- ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }),
764
- ...(input.eventStatusCodes != null && {
765
- eventStatusCodes: se_eventStatusCodeList(input.eventStatusCodes, context),
766
- }),
767
- ...(input.eventTypeCategories != null && {
768
- eventTypeCategories: se_eventTypeCategoryList2(input.eventTypeCategories, context),
769
- }),
770
- ...(input.eventTypeCodes != null && { eventTypeCodes: se_eventTypeList2(input.eventTypeCodes, context) }),
771
- ...(input.lastUpdatedTimes != null && { lastUpdatedTimes: se_dateTimeRangeList(input.lastUpdatedTimes, context) }),
772
- ...(input.regions != null && { regions: se_regionList(input.regions, context) }),
773
- ...(input.services != null && { services: se_serviceList(input.services, context) }),
774
- ...(input.startTimes != null && { startTimes: se_dateTimeRangeList(input.startTimes, context) }),
775
- ...(input.tags != null && { tags: se_tagFilter(input.tags, context) }),
776
- };
777
- };
778
- const se_eventStatusCodeList = (input, context) => {
779
- return input
780
- .filter((e) => e != null)
781
- .map((entry) => {
782
- return entry;
783
- });
784
- };
785
- const se_EventTypeCategoryList = (input, context) => {
786
- return input
787
- .filter((e) => e != null)
788
- .map((entry) => {
789
- return entry;
790
- });
791
- };
792
- const se_eventTypeCategoryList2 = (input, context) => {
793
- return input
794
- .filter((e) => e != null)
795
- .map((entry) => {
796
- return entry;
797
- });
798
- };
799
- const se_EventTypeCodeList = (input, context) => {
800
- return input
801
- .filter((e) => e != null)
802
- .map((entry) => {
803
- return entry;
804
- });
805
- };
806
- const se_EventTypeFilter = (input, context) => {
807
- return {
808
- ...(input.eventTypeCategories != null && {
809
- eventTypeCategories: se_EventTypeCategoryList(input.eventTypeCategories, context),
810
- }),
811
- ...(input.eventTypeCodes != null && { eventTypeCodes: se_EventTypeCodeList(input.eventTypeCodes, context) }),
812
- ...(input.services != null && { services: se_serviceList(input.services, context) }),
813
- };
814
- };
815
- const se_eventTypeList2 = (input, context) => {
816
- return input
817
- .filter((e) => e != null)
818
- .map((entry) => {
819
- return entry;
820
- });
821
- };
822
- const se_OrganizationEntityFiltersList = (input, context) => {
823
- return input
824
- .filter((e) => e != null)
825
- .map((entry) => {
826
- return se_EventAccountFilter(entry, context);
827
- });
828
- };
829
- const se_OrganizationEventDetailFiltersList = (input, context) => {
830
- return input
831
- .filter((e) => e != null)
832
- .map((entry) => {
833
- return se_EventAccountFilter(entry, context);
605
+ return (0, smithy_client_1.take)(input, {
606
+ availabilityZones: smithy_client_1._json,
607
+ endTimes: (_) => se_dateTimeRangeList(_, context),
608
+ entityArns: smithy_client_1._json,
609
+ entityValues: smithy_client_1._json,
610
+ eventArns: smithy_client_1._json,
611
+ eventStatusCodes: smithy_client_1._json,
612
+ eventTypeCategories: smithy_client_1._json,
613
+ eventTypeCodes: smithy_client_1._json,
614
+ lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context),
615
+ regions: smithy_client_1._json,
616
+ services: smithy_client_1._json,
617
+ startTimes: (_) => se_dateTimeRangeList(_, context),
618
+ tags: smithy_client_1._json,
834
619
  });
835
620
  };
836
621
  const se_OrganizationEventFilter = (input, context) => {
837
- return {
838
- ...(input.awsAccountIds != null && { awsAccountIds: se_awsAccountIdsList(input.awsAccountIds, context) }),
839
- ...(input.endTime != null && { endTime: se_DateTimeRange(input.endTime, context) }),
840
- ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }),
841
- ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }),
842
- ...(input.eventStatusCodes != null && {
843
- eventStatusCodes: se_eventStatusCodeList(input.eventStatusCodes, context),
844
- }),
845
- ...(input.eventTypeCategories != null && {
846
- eventTypeCategories: se_eventTypeCategoryList2(input.eventTypeCategories, context),
847
- }),
848
- ...(input.eventTypeCodes != null && { eventTypeCodes: se_eventTypeList2(input.eventTypeCodes, context) }),
849
- ...(input.lastUpdatedTime != null && { lastUpdatedTime: se_DateTimeRange(input.lastUpdatedTime, context) }),
850
- ...(input.regions != null && { regions: se_regionList(input.regions, context) }),
851
- ...(input.services != null && { services: se_serviceList(input.services, context) }),
852
- ...(input.startTime != null && { startTime: se_DateTimeRange(input.startTime, context) }),
853
- };
854
- };
855
- const se_regionList = (input, context) => {
856
- return input
857
- .filter((e) => e != null)
858
- .map((entry) => {
859
- return entry;
860
- });
861
- };
862
- const se_serviceList = (input, context) => {
863
- return input
864
- .filter((e) => e != null)
865
- .map((entry) => {
866
- return entry;
867
- });
868
- };
869
- const se_tagFilter = (input, context) => {
870
- return input
871
- .filter((e) => e != null)
872
- .map((entry) => {
873
- return se_tagSet(entry, context);
622
+ return (0, smithy_client_1.take)(input, {
623
+ awsAccountIds: smithy_client_1._json,
624
+ endTime: (_) => se_DateTimeRange(_, context),
625
+ entityArns: smithy_client_1._json,
626
+ entityValues: smithy_client_1._json,
627
+ eventStatusCodes: smithy_client_1._json,
628
+ eventTypeCategories: smithy_client_1._json,
629
+ eventTypeCodes: smithy_client_1._json,
630
+ lastUpdatedTime: (_) => se_DateTimeRange(_, context),
631
+ regions: smithy_client_1._json,
632
+ services: smithy_client_1._json,
633
+ startTime: (_) => se_DateTimeRange(_, context),
874
634
  });
875
635
  };
876
- const se_tagSet = (input, context) => {
877
- return Object.entries(input).reduce((acc, [key, value]) => {
878
- if (value === null) {
879
- return acc;
880
- }
881
- acc[key] = value;
882
- return acc;
883
- }, {});
884
- };
885
- const de_affectedAccountsList = (output, context) => {
886
- const retVal = (output || [])
887
- .filter((e) => e != null)
888
- .map((entry) => {
889
- if (entry === null) {
890
- return null;
891
- }
892
- return (0, smithy_client_1.expectString)(entry);
893
- });
894
- return retVal;
895
- };
896
636
  const de_AffectedEntity = (output, context) => {
897
- return {
898
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
899
- entityArn: (0, smithy_client_1.expectString)(output.entityArn),
900
- entityUrl: (0, smithy_client_1.expectString)(output.entityUrl),
901
- entityValue: (0, smithy_client_1.expectString)(output.entityValue),
902
- eventArn: (0, smithy_client_1.expectString)(output.eventArn),
903
- lastUpdatedTime: output.lastUpdatedTime != null
904
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
905
- : undefined,
906
- statusCode: (0, smithy_client_1.expectString)(output.statusCode),
907
- tags: output.tags != null ? de_tagSet(output.tags, context) : undefined,
908
- };
909
- };
910
- const de_ConcurrentModificationException = (output, context) => {
911
- return {
912
- message: (0, smithy_client_1.expectString)(output.message),
913
- };
914
- };
915
- const de_DescribeAffectedAccountsForOrganizationResponse = (output, context) => {
916
- return {
917
- affectedAccounts: output.affectedAccounts != null ? de_affectedAccountsList(output.affectedAccounts, context) : undefined,
918
- eventScopeCode: (0, smithy_client_1.expectString)(output.eventScopeCode),
919
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
920
- };
921
- };
922
- const de_DescribeAffectedEntitiesForOrganizationFailedSet = (output, context) => {
923
- const retVal = (output || [])
924
- .filter((e) => e != null)
925
- .map((entry) => {
926
- if (entry === null) {
927
- return null;
928
- }
929
- return de_OrganizationAffectedEntitiesErrorItem(entry, context);
637
+ return (0, smithy_client_1.take)(output, {
638
+ awsAccountId: smithy_client_1.expectString,
639
+ entityArn: smithy_client_1.expectString,
640
+ entityUrl: smithy_client_1.expectString,
641
+ entityValue: smithy_client_1.expectString,
642
+ eventArn: smithy_client_1.expectString,
643
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
644
+ statusCode: smithy_client_1.expectString,
645
+ tags: smithy_client_1._json,
930
646
  });
931
- return retVal;
932
647
  };
933
648
  const de_DescribeAffectedEntitiesForOrganizationResponse = (output, context) => {
934
- return {
935
- entities: output.entities != null ? de_EntityList(output.entities, context) : undefined,
936
- failedSet: output.failedSet != null
937
- ? de_DescribeAffectedEntitiesForOrganizationFailedSet(output.failedSet, context)
938
- : undefined,
939
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
940
- };
941
- };
942
- const de_DescribeAffectedEntitiesResponse = (output, context) => {
943
- return {
944
- entities: output.entities != null ? de_EntityList(output.entities, context) : undefined,
945
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
946
- };
947
- };
948
- const de_DescribeEntityAggregatesResponse = (output, context) => {
949
- return {
950
- entityAggregates: output.entityAggregates != null ? de_EntityAggregateList(output.entityAggregates, context) : undefined,
951
- };
952
- };
953
- const de_DescribeEventAggregatesResponse = (output, context) => {
954
- return {
955
- eventAggregates: output.eventAggregates != null ? de_EventAggregateList(output.eventAggregates, context) : undefined,
956
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
957
- };
958
- };
959
- const de_DescribeEventDetailsFailedSet = (output, context) => {
960
- const retVal = (output || [])
961
- .filter((e) => e != null)
962
- .map((entry) => {
963
- if (entry === null) {
964
- return null;
965
- }
966
- return de_EventDetailsErrorItem(entry, context);
649
+ return (0, smithy_client_1.take)(output, {
650
+ entities: (_) => de_EntityList(_, context),
651
+ failedSet: smithy_client_1._json,
652
+ nextToken: smithy_client_1.expectString,
967
653
  });
968
- return retVal;
969
654
  };
970
- const de_DescribeEventDetailsForOrganizationFailedSet = (output, context) => {
971
- const retVal = (output || [])
972
- .filter((e) => e != null)
973
- .map((entry) => {
974
- if (entry === null) {
975
- return null;
976
- }
977
- return de_OrganizationEventDetailsErrorItem(entry, context);
655
+ const de_DescribeAffectedEntitiesResponse = (output, context) => {
656
+ return (0, smithy_client_1.take)(output, {
657
+ entities: (_) => de_EntityList(_, context),
658
+ nextToken: smithy_client_1.expectString,
978
659
  });
979
- return retVal;
980
660
  };
981
661
  const de_DescribeEventDetailsForOrganizationResponse = (output, context) => {
982
- return {
983
- failedSet: output.failedSet != null ? de_DescribeEventDetailsForOrganizationFailedSet(output.failedSet, context) : undefined,
984
- successfulSet: output.successfulSet != null
985
- ? de_DescribeEventDetailsForOrganizationSuccessfulSet(output.successfulSet, context)
986
- : undefined,
987
- };
662
+ return (0, smithy_client_1.take)(output, {
663
+ failedSet: smithy_client_1._json,
664
+ successfulSet: (_) => de_DescribeEventDetailsForOrganizationSuccessfulSet(_, context),
665
+ });
988
666
  };
989
667
  const de_DescribeEventDetailsForOrganizationSuccessfulSet = (output, context) => {
990
668
  const retVal = (output || [])
991
669
  .filter((e) => e != null)
992
670
  .map((entry) => {
993
- if (entry === null) {
994
- return null;
995
- }
996
671
  return de_OrganizationEventDetails(entry, context);
997
672
  });
998
673
  return retVal;
999
674
  };
1000
675
  const de_DescribeEventDetailsResponse = (output, context) => {
1001
- return {
1002
- failedSet: output.failedSet != null ? de_DescribeEventDetailsFailedSet(output.failedSet, context) : undefined,
1003
- successfulSet: output.successfulSet != null ? de_DescribeEventDetailsSuccessfulSet(output.successfulSet, context) : undefined,
1004
- };
676
+ return (0, smithy_client_1.take)(output, {
677
+ failedSet: smithy_client_1._json,
678
+ successfulSet: (_) => de_DescribeEventDetailsSuccessfulSet(_, context),
679
+ });
1005
680
  };
1006
681
  const de_DescribeEventDetailsSuccessfulSet = (output, context) => {
1007
682
  const retVal = (output || [])
1008
683
  .filter((e) => e != null)
1009
684
  .map((entry) => {
1010
- if (entry === null) {
1011
- return null;
1012
- }
1013
685
  return de_EventDetails(entry, context);
1014
686
  });
1015
687
  return retVal;
1016
688
  };
1017
689
  const de_DescribeEventsForOrganizationResponse = (output, context) => {
1018
- return {
1019
- events: output.events != null ? de_OrganizationEventList(output.events, context) : undefined,
1020
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1021
- };
690
+ return (0, smithy_client_1.take)(output, {
691
+ events: (_) => de_OrganizationEventList(_, context),
692
+ nextToken: smithy_client_1.expectString,
693
+ });
1022
694
  };
1023
695
  const de_DescribeEventsResponse = (output, context) => {
1024
- return {
1025
- events: output.events != null ? de_EventList(output.events, context) : undefined,
1026
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1027
- };
1028
- };
1029
- const de_DescribeEventTypesResponse = (output, context) => {
1030
- return {
1031
- eventTypes: output.eventTypes != null ? de_EventTypeList(output.eventTypes, context) : undefined,
1032
- nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1033
- };
1034
- };
1035
- const de_DescribeHealthServiceStatusForOrganizationResponse = (output, context) => {
1036
- return {
1037
- healthServiceAccessStatusForOrganization: (0, smithy_client_1.expectString)(output.healthServiceAccessStatusForOrganization),
1038
- };
1039
- };
1040
- const de_EntityAggregate = (output, context) => {
1041
- return {
1042
- count: (0, smithy_client_1.expectInt32)(output.count),
1043
- eventArn: (0, smithy_client_1.expectString)(output.eventArn),
1044
- };
1045
- };
1046
- const de_EntityAggregateList = (output, context) => {
1047
- const retVal = (output || [])
1048
- .filter((e) => e != null)
1049
- .map((entry) => {
1050
- if (entry === null) {
1051
- return null;
1052
- }
1053
- return de_EntityAggregate(entry, context);
696
+ return (0, smithy_client_1.take)(output, {
697
+ events: (_) => de_EventList(_, context),
698
+ nextToken: smithy_client_1.expectString,
1054
699
  });
1055
- return retVal;
1056
700
  };
1057
701
  const de_EntityList = (output, context) => {
1058
702
  const retVal = (output || [])
1059
703
  .filter((e) => e != null)
1060
704
  .map((entry) => {
1061
- if (entry === null) {
1062
- return null;
1063
- }
1064
705
  return de_AffectedEntity(entry, context);
1065
706
  });
1066
707
  return retVal;
1067
708
  };
1068
709
  const de_Event = (output, context) => {
1069
- return {
1070
- arn: (0, smithy_client_1.expectString)(output.arn),
1071
- availabilityZone: (0, smithy_client_1.expectString)(output.availabilityZone),
1072
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
1073
- eventScopeCode: (0, smithy_client_1.expectString)(output.eventScopeCode),
1074
- eventTypeCategory: (0, smithy_client_1.expectString)(output.eventTypeCategory),
1075
- eventTypeCode: (0, smithy_client_1.expectString)(output.eventTypeCode),
1076
- lastUpdatedTime: output.lastUpdatedTime != null
1077
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
1078
- : undefined,
1079
- region: (0, smithy_client_1.expectString)(output.region),
1080
- service: (0, smithy_client_1.expectString)(output.service),
1081
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
1082
- statusCode: (0, smithy_client_1.expectString)(output.statusCode),
1083
- };
1084
- };
1085
- const de_EventAggregate = (output, context) => {
1086
- return {
1087
- aggregateValue: (0, smithy_client_1.expectString)(output.aggregateValue),
1088
- count: (0, smithy_client_1.expectInt32)(output.count),
1089
- };
1090
- };
1091
- const de_EventAggregateList = (output, context) => {
1092
- const retVal = (output || [])
1093
- .filter((e) => e != null)
1094
- .map((entry) => {
1095
- if (entry === null) {
1096
- return null;
1097
- }
1098
- return de_EventAggregate(entry, context);
710
+ return (0, smithy_client_1.take)(output, {
711
+ arn: smithy_client_1.expectString,
712
+ availabilityZone: smithy_client_1.expectString,
713
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
714
+ eventScopeCode: smithy_client_1.expectString,
715
+ eventTypeCategory: smithy_client_1.expectString,
716
+ eventTypeCode: smithy_client_1.expectString,
717
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
718
+ region: smithy_client_1.expectString,
719
+ service: smithy_client_1.expectString,
720
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
721
+ statusCode: smithy_client_1.expectString,
1099
722
  });
1100
- return retVal;
1101
- };
1102
- const de_EventDescription = (output, context) => {
1103
- return {
1104
- latestDescription: (0, smithy_client_1.expectString)(output.latestDescription),
1105
- };
1106
723
  };
1107
724
  const de_EventDetails = (output, context) => {
1108
- return {
1109
- event: output.event != null ? de_Event(output.event, context) : undefined,
1110
- eventDescription: output.eventDescription != null ? de_EventDescription(output.eventDescription, context) : undefined,
1111
- eventMetadata: output.eventMetadata != null ? de_eventMetadata(output.eventMetadata, context) : undefined,
1112
- };
1113
- };
1114
- const de_EventDetailsErrorItem = (output, context) => {
1115
- return {
1116
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
1117
- errorName: (0, smithy_client_1.expectString)(output.errorName),
1118
- eventArn: (0, smithy_client_1.expectString)(output.eventArn),
1119
- };
725
+ return (0, smithy_client_1.take)(output, {
726
+ event: (_) => de_Event(_, context),
727
+ eventDescription: smithy_client_1._json,
728
+ eventMetadata: smithy_client_1._json,
729
+ });
1120
730
  };
1121
731
  const de_EventList = (output, context) => {
1122
732
  const retVal = (output || [])
1123
733
  .filter((e) => e != null)
1124
734
  .map((entry) => {
1125
- if (entry === null) {
1126
- return null;
1127
- }
1128
735
  return de_Event(entry, context);
1129
736
  });
1130
737
  return retVal;
1131
738
  };
1132
- const de_eventMetadata = (output, context) => {
1133
- return Object.entries(output).reduce((acc, [key, value]) => {
1134
- if (value === null) {
1135
- return acc;
1136
- }
1137
- acc[key] = (0, smithy_client_1.expectString)(value);
1138
- return acc;
1139
- }, {});
1140
- };
1141
- const de_EventType = (output, context) => {
1142
- return {
1143
- category: (0, smithy_client_1.expectString)(output.category),
1144
- code: (0, smithy_client_1.expectString)(output.code),
1145
- service: (0, smithy_client_1.expectString)(output.service),
1146
- };
1147
- };
1148
- const de_EventTypeList = (output, context) => {
1149
- const retVal = (output || [])
1150
- .filter((e) => e != null)
1151
- .map((entry) => {
1152
- if (entry === null) {
1153
- return null;
1154
- }
1155
- return de_EventType(entry, context);
1156
- });
1157
- return retVal;
1158
- };
1159
- const de_InvalidPaginationToken = (output, context) => {
1160
- return {
1161
- message: (0, smithy_client_1.expectString)(output.message),
1162
- };
1163
- };
1164
- const de_OrganizationAffectedEntitiesErrorItem = (output, context) => {
1165
- return {
1166
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
1167
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
1168
- errorName: (0, smithy_client_1.expectString)(output.errorName),
1169
- eventArn: (0, smithy_client_1.expectString)(output.eventArn),
1170
- };
1171
- };
1172
739
  const de_OrganizationEvent = (output, context) => {
1173
- return {
1174
- arn: (0, smithy_client_1.expectString)(output.arn),
1175
- endTime: output.endTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.endTime))) : undefined,
1176
- eventScopeCode: (0, smithy_client_1.expectString)(output.eventScopeCode),
1177
- eventTypeCategory: (0, smithy_client_1.expectString)(output.eventTypeCategory),
1178
- eventTypeCode: (0, smithy_client_1.expectString)(output.eventTypeCode),
1179
- lastUpdatedTime: output.lastUpdatedTime != null
1180
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedTime)))
1181
- : undefined,
1182
- region: (0, smithy_client_1.expectString)(output.region),
1183
- service: (0, smithy_client_1.expectString)(output.service),
1184
- startTime: output.startTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.startTime))) : undefined,
1185
- statusCode: (0, smithy_client_1.expectString)(output.statusCode),
1186
- };
740
+ return (0, smithy_client_1.take)(output, {
741
+ arn: smithy_client_1.expectString,
742
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
743
+ eventScopeCode: smithy_client_1.expectString,
744
+ eventTypeCategory: smithy_client_1.expectString,
745
+ eventTypeCode: smithy_client_1.expectString,
746
+ lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
747
+ region: smithy_client_1.expectString,
748
+ service: smithy_client_1.expectString,
749
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
750
+ statusCode: smithy_client_1.expectString,
751
+ });
1187
752
  };
1188
753
  const de_OrganizationEventDetails = (output, context) => {
1189
- return {
1190
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
1191
- event: output.event != null ? de_Event(output.event, context) : undefined,
1192
- eventDescription: output.eventDescription != null ? de_EventDescription(output.eventDescription, context) : undefined,
1193
- eventMetadata: output.eventMetadata != null ? de_eventMetadata(output.eventMetadata, context) : undefined,
1194
- };
1195
- };
1196
- const de_OrganizationEventDetailsErrorItem = (output, context) => {
1197
- return {
1198
- awsAccountId: (0, smithy_client_1.expectString)(output.awsAccountId),
1199
- errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
1200
- errorName: (0, smithy_client_1.expectString)(output.errorName),
1201
- eventArn: (0, smithy_client_1.expectString)(output.eventArn),
1202
- };
754
+ return (0, smithy_client_1.take)(output, {
755
+ awsAccountId: smithy_client_1.expectString,
756
+ event: (_) => de_Event(_, context),
757
+ eventDescription: smithy_client_1._json,
758
+ eventMetadata: smithy_client_1._json,
759
+ });
1203
760
  };
1204
761
  const de_OrganizationEventList = (output, context) => {
1205
762
  const retVal = (output || [])
1206
763
  .filter((e) => e != null)
1207
764
  .map((entry) => {
1208
- if (entry === null) {
1209
- return null;
1210
- }
1211
765
  return de_OrganizationEvent(entry, context);
1212
766
  });
1213
767
  return retVal;
1214
768
  };
1215
- const de_tagSet = (output, context) => {
1216
- return Object.entries(output).reduce((acc, [key, value]) => {
1217
- if (value === null) {
1218
- return acc;
1219
- }
1220
- acc[key] = (0, smithy_client_1.expectString)(value);
1221
- return acc;
1222
- }, {});
1223
- };
1224
- const de_UnsupportedLocale = (output, context) => {
1225
- return {
1226
- message: (0, smithy_client_1.expectString)(output.message),
1227
- };
1228
- };
1229
769
  const deserializeMetadata = (output) => ({
1230
770
  httpStatusCode: output.statusCode,
1231
771
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1239,6 +779,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1239
779
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1240
780
  };
1241
781
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
782
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(HealthServiceException_1.HealthServiceException);
1242
783
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1243
784
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1244
785
  const contents = {
@@ -1257,6 +798,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1257
798
  }
1258
799
  return new protocol_http_1.HttpRequest(contents);
1259
800
  };
801
+ function sharedHeaders(operation) {
802
+ return {
803
+ "content-type": "application/x-amz-json-1.1",
804
+ "x-amz-target": `AWSHealth_20160804.${operation}`,
805
+ };
806
+ }
1260
807
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1261
808
  if (encoded.length) {
1262
809
  return JSON.parse(encoded);