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