@aws-sdk/client-xray 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.
@@ -13,10 +13,10 @@ const se_BatchGetTracesCommand = async (input, context) => {
13
13
  };
14
14
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Traces";
15
15
  let body;
16
- body = JSON.stringify({
17
- ...(input.NextToken != null && { NextToken: input.NextToken }),
18
- ...(input.TraceIds != null && { TraceIds: se_TraceIdList(input.TraceIds, context) }),
19
- });
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ NextToken: [],
18
+ TraceIds: (_) => (0, smithy_client_1._json)(_),
19
+ }));
20
20
  return new protocol_http_1.HttpRequest({
21
21
  protocol,
22
22
  hostname,
@@ -35,14 +35,12 @@ const se_CreateGroupCommand = async (input, context) => {
35
35
  };
36
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateGroup";
37
37
  let body;
38
- body = JSON.stringify({
39
- ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }),
40
- ...(input.GroupName != null && { GroupName: input.GroupName }),
41
- ...(input.InsightsConfiguration != null && {
42
- InsightsConfiguration: se_InsightsConfiguration(input.InsightsConfiguration, context),
43
- }),
44
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
45
- });
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ FilterExpression: [],
40
+ GroupName: [],
41
+ InsightsConfiguration: (_) => (0, smithy_client_1._json)(_),
42
+ Tags: (_) => (0, smithy_client_1._json)(_),
43
+ }));
46
44
  return new protocol_http_1.HttpRequest({
47
45
  protocol,
48
46
  hostname,
@@ -61,10 +59,10 @@ const se_CreateSamplingRuleCommand = async (input, context) => {
61
59
  };
62
60
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSamplingRule";
63
61
  let body;
64
- body = JSON.stringify({
65
- ...(input.SamplingRule != null && { SamplingRule: se_SamplingRule(input.SamplingRule, context) }),
66
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
67
- });
62
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
63
+ SamplingRule: (_) => se_SamplingRule(_, context),
64
+ Tags: (_) => (0, smithy_client_1._json)(_),
65
+ }));
68
66
  return new protocol_http_1.HttpRequest({
69
67
  protocol,
70
68
  hostname,
@@ -83,10 +81,10 @@ const se_DeleteGroupCommand = async (input, context) => {
83
81
  };
84
82
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteGroup";
85
83
  let body;
86
- body = JSON.stringify({
87
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
88
- ...(input.GroupName != null && { GroupName: input.GroupName }),
89
- });
84
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
85
+ GroupARN: [],
86
+ GroupName: [],
87
+ }));
90
88
  return new protocol_http_1.HttpRequest({
91
89
  protocol,
92
90
  hostname,
@@ -105,10 +103,10 @@ const se_DeleteResourcePolicyCommand = async (input, context) => {
105
103
  };
106
104
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteResourcePolicy";
107
105
  let body;
108
- body = JSON.stringify({
109
- ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
110
- ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }),
111
- });
106
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
107
+ PolicyName: [],
108
+ PolicyRevisionId: [],
109
+ }));
112
110
  return new protocol_http_1.HttpRequest({
113
111
  protocol,
114
112
  hostname,
@@ -127,10 +125,10 @@ const se_DeleteSamplingRuleCommand = async (input, context) => {
127
125
  };
128
126
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSamplingRule";
129
127
  let body;
130
- body = JSON.stringify({
131
- ...(input.RuleARN != null && { RuleARN: input.RuleARN }),
132
- ...(input.RuleName != null && { RuleName: input.RuleName }),
133
- });
128
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
129
+ RuleARN: [],
130
+ RuleName: [],
131
+ }));
134
132
  return new protocol_http_1.HttpRequest({
135
133
  protocol,
136
134
  hostname,
@@ -168,10 +166,10 @@ const se_GetGroupCommand = async (input, context) => {
168
166
  };
169
167
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetGroup";
170
168
  let body;
171
- body = JSON.stringify({
172
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
173
- ...(input.GroupName != null && { GroupName: input.GroupName }),
174
- });
169
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
170
+ GroupARN: [],
171
+ GroupName: [],
172
+ }));
175
173
  return new protocol_http_1.HttpRequest({
176
174
  protocol,
177
175
  hostname,
@@ -190,9 +188,9 @@ const se_GetGroupsCommand = async (input, context) => {
190
188
  };
191
189
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Groups";
192
190
  let body;
193
- body = JSON.stringify({
194
- ...(input.NextToken != null && { NextToken: input.NextToken }),
195
- });
191
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
192
+ NextToken: [],
193
+ }));
196
194
  return new protocol_http_1.HttpRequest({
197
195
  protocol,
198
196
  hostname,
@@ -211,9 +209,9 @@ const se_GetInsightCommand = async (input, context) => {
211
209
  };
212
210
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Insight";
213
211
  let body;
214
- body = JSON.stringify({
215
- ...(input.InsightId != null && { InsightId: input.InsightId }),
216
- });
212
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
213
+ InsightId: [],
214
+ }));
217
215
  return new protocol_http_1.HttpRequest({
218
216
  protocol,
219
217
  hostname,
@@ -232,11 +230,11 @@ const se_GetInsightEventsCommand = async (input, context) => {
232
230
  };
233
231
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightEvents";
234
232
  let body;
235
- body = JSON.stringify({
236
- ...(input.InsightId != null && { InsightId: input.InsightId }),
237
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
238
- ...(input.NextToken != null && { NextToken: input.NextToken }),
239
- });
233
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
234
+ InsightId: [],
235
+ MaxResults: [],
236
+ NextToken: [],
237
+ }));
240
238
  return new protocol_http_1.HttpRequest({
241
239
  protocol,
242
240
  hostname,
@@ -255,12 +253,12 @@ const se_GetInsightImpactGraphCommand = async (input, context) => {
255
253
  };
256
254
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightImpactGraph";
257
255
  let body;
258
- body = JSON.stringify({
259
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
260
- ...(input.InsightId != null && { InsightId: input.InsightId }),
261
- ...(input.NextToken != null && { NextToken: input.NextToken }),
262
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
263
- });
256
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
257
+ EndTime: (_) => Math.round(_.getTime() / 1000),
258
+ InsightId: [],
259
+ NextToken: [],
260
+ StartTime: (_) => Math.round(_.getTime() / 1000),
261
+ }));
264
262
  return new protocol_http_1.HttpRequest({
265
263
  protocol,
266
264
  hostname,
@@ -279,15 +277,15 @@ const se_GetInsightSummariesCommand = async (input, context) => {
279
277
  };
280
278
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightSummaries";
281
279
  let body;
282
- body = JSON.stringify({
283
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
284
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
285
- ...(input.GroupName != null && { GroupName: input.GroupName }),
286
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
287
- ...(input.NextToken != null && { NextToken: input.NextToken }),
288
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
289
- ...(input.States != null && { States: se_InsightStateList(input.States, context) }),
290
- });
280
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
281
+ EndTime: (_) => Math.round(_.getTime() / 1000),
282
+ GroupARN: [],
283
+ GroupName: [],
284
+ MaxResults: [],
285
+ NextToken: [],
286
+ StartTime: (_) => Math.round(_.getTime() / 1000),
287
+ States: (_) => (0, smithy_client_1._json)(_),
288
+ }));
291
289
  return new protocol_http_1.HttpRequest({
292
290
  protocol,
293
291
  hostname,
@@ -306,9 +304,9 @@ const se_GetSamplingRulesCommand = async (input, context) => {
306
304
  };
307
305
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetSamplingRules";
308
306
  let body;
309
- body = JSON.stringify({
310
- ...(input.NextToken != null && { NextToken: input.NextToken }),
311
- });
307
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
308
+ NextToken: [],
309
+ }));
312
310
  return new protocol_http_1.HttpRequest({
313
311
  protocol,
314
312
  hostname,
@@ -327,9 +325,9 @@ const se_GetSamplingStatisticSummariesCommand = async (input, context) => {
327
325
  };
328
326
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SamplingStatisticSummaries";
329
327
  let body;
330
- body = JSON.stringify({
331
- ...(input.NextToken != null && { NextToken: input.NextToken }),
332
- });
328
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
329
+ NextToken: [],
330
+ }));
333
331
  return new protocol_http_1.HttpRequest({
334
332
  protocol,
335
333
  hostname,
@@ -348,11 +346,9 @@ const se_GetSamplingTargetsCommand = async (input, context) => {
348
346
  };
349
347
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SamplingTargets";
350
348
  let body;
351
- body = JSON.stringify({
352
- ...(input.SamplingStatisticsDocuments != null && {
353
- SamplingStatisticsDocuments: se_SamplingStatisticsDocumentList(input.SamplingStatisticsDocuments, context),
354
- }),
355
- });
349
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
350
+ SamplingStatisticsDocuments: (_) => se_SamplingStatisticsDocumentList(_, context),
351
+ }));
356
352
  return new protocol_http_1.HttpRequest({
357
353
  protocol,
358
354
  hostname,
@@ -371,13 +367,13 @@ const se_GetServiceGraphCommand = async (input, context) => {
371
367
  };
372
368
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ServiceGraph";
373
369
  let body;
374
- body = JSON.stringify({
375
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
376
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
377
- ...(input.GroupName != null && { GroupName: input.GroupName }),
378
- ...(input.NextToken != null && { NextToken: input.NextToken }),
379
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
380
- });
370
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
371
+ EndTime: (_) => Math.round(_.getTime() / 1000),
372
+ GroupARN: [],
373
+ GroupName: [],
374
+ NextToken: [],
375
+ StartTime: (_) => Math.round(_.getTime() / 1000),
376
+ }));
381
377
  return new protocol_http_1.HttpRequest({
382
378
  protocol,
383
379
  hostname,
@@ -396,16 +392,16 @@ const se_GetTimeSeriesServiceStatisticsCommand = async (input, context) => {
396
392
  };
397
393
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TimeSeriesServiceStatistics";
398
394
  let body;
399
- body = JSON.stringify({
400
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
401
- ...(input.EntitySelectorExpression != null && { EntitySelectorExpression: input.EntitySelectorExpression }),
402
- ...(input.ForecastStatistics != null && { ForecastStatistics: input.ForecastStatistics }),
403
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
404
- ...(input.GroupName != null && { GroupName: input.GroupName }),
405
- ...(input.NextToken != null && { NextToken: input.NextToken }),
406
- ...(input.Period != null && { Period: input.Period }),
407
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
408
- });
395
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
396
+ EndTime: (_) => Math.round(_.getTime() / 1000),
397
+ EntitySelectorExpression: [],
398
+ ForecastStatistics: [],
399
+ GroupARN: [],
400
+ GroupName: [],
401
+ NextToken: [],
402
+ Period: [],
403
+ StartTime: (_) => Math.round(_.getTime() / 1000),
404
+ }));
409
405
  return new protocol_http_1.HttpRequest({
410
406
  protocol,
411
407
  hostname,
@@ -424,10 +420,10 @@ const se_GetTraceGraphCommand = async (input, context) => {
424
420
  };
425
421
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceGraph";
426
422
  let body;
427
- body = JSON.stringify({
428
- ...(input.NextToken != null && { NextToken: input.NextToken }),
429
- ...(input.TraceIds != null && { TraceIds: se_TraceIdList(input.TraceIds, context) }),
430
- });
423
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
424
+ NextToken: [],
425
+ TraceIds: (_) => (0, smithy_client_1._json)(_),
426
+ }));
431
427
  return new protocol_http_1.HttpRequest({
432
428
  protocol,
433
429
  hostname,
@@ -446,15 +442,15 @@ const se_GetTraceSummariesCommand = async (input, context) => {
446
442
  };
447
443
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceSummaries";
448
444
  let body;
449
- body = JSON.stringify({
450
- ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
451
- ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }),
452
- ...(input.NextToken != null && { NextToken: input.NextToken }),
453
- ...(input.Sampling != null && { Sampling: input.Sampling }),
454
- ...(input.SamplingStrategy != null && { SamplingStrategy: se_SamplingStrategy(input.SamplingStrategy, context) }),
455
- ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
456
- ...(input.TimeRangeType != null && { TimeRangeType: input.TimeRangeType }),
457
- });
445
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
446
+ EndTime: (_) => Math.round(_.getTime() / 1000),
447
+ FilterExpression: [],
448
+ NextToken: [],
449
+ Sampling: [],
450
+ SamplingStrategy: (_) => se_SamplingStrategy(_, context),
451
+ StartTime: (_) => Math.round(_.getTime() / 1000),
452
+ TimeRangeType: [],
453
+ }));
458
454
  return new protocol_http_1.HttpRequest({
459
455
  protocol,
460
456
  hostname,
@@ -473,9 +469,9 @@ const se_ListResourcePoliciesCommand = async (input, context) => {
473
469
  };
474
470
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListResourcePolicies";
475
471
  let body;
476
- body = JSON.stringify({
477
- ...(input.NextToken != null && { NextToken: input.NextToken }),
478
- });
472
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
473
+ NextToken: [],
474
+ }));
479
475
  return new protocol_http_1.HttpRequest({
480
476
  protocol,
481
477
  hostname,
@@ -494,10 +490,10 @@ const se_ListTagsForResourceCommand = async (input, context) => {
494
490
  };
495
491
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource";
496
492
  let body;
497
- body = JSON.stringify({
498
- ...(input.NextToken != null && { NextToken: input.NextToken }),
499
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
500
- });
493
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
494
+ NextToken: [],
495
+ ResourceARN: [],
496
+ }));
501
497
  return new protocol_http_1.HttpRequest({
502
498
  protocol,
503
499
  hostname,
@@ -516,10 +512,10 @@ const se_PutEncryptionConfigCommand = async (input, context) => {
516
512
  };
517
513
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutEncryptionConfig";
518
514
  let body;
519
- body = JSON.stringify({
520
- ...(input.KeyId != null && { KeyId: input.KeyId }),
521
- ...(input.Type != null && { Type: input.Type }),
522
- });
515
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
516
+ KeyId: [],
517
+ Type: [],
518
+ }));
523
519
  return new protocol_http_1.HttpRequest({
524
520
  protocol,
525
521
  hostname,
@@ -538,12 +534,12 @@ const se_PutResourcePolicyCommand = async (input, context) => {
538
534
  };
539
535
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutResourcePolicy";
540
536
  let body;
541
- body = JSON.stringify({
542
- ...(input.BypassPolicyLockoutCheck != null && { BypassPolicyLockoutCheck: input.BypassPolicyLockoutCheck }),
543
- ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }),
544
- ...(input.PolicyName != null && { PolicyName: input.PolicyName }),
545
- ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }),
546
- });
537
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
538
+ BypassPolicyLockoutCheck: [],
539
+ PolicyDocument: [],
540
+ PolicyName: [],
541
+ PolicyRevisionId: [],
542
+ }));
547
543
  return new protocol_http_1.HttpRequest({
548
544
  protocol,
549
545
  hostname,
@@ -562,14 +558,12 @@ const se_PutTelemetryRecordsCommand = async (input, context) => {
562
558
  };
563
559
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TelemetryRecords";
564
560
  let body;
565
- body = JSON.stringify({
566
- ...(input.EC2InstanceId != null && { EC2InstanceId: input.EC2InstanceId }),
567
- ...(input.Hostname != null && { Hostname: input.Hostname }),
568
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
569
- ...(input.TelemetryRecords != null && {
570
- TelemetryRecords: se_TelemetryRecordList(input.TelemetryRecords, context),
571
- }),
572
- });
561
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
562
+ EC2InstanceId: [],
563
+ Hostname: [],
564
+ ResourceARN: [],
565
+ TelemetryRecords: (_) => se_TelemetryRecordList(_, context),
566
+ }));
573
567
  return new protocol_http_1.HttpRequest({
574
568
  protocol,
575
569
  hostname,
@@ -588,11 +582,9 @@ const se_PutTraceSegmentsCommand = async (input, context) => {
588
582
  };
589
583
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceSegments";
590
584
  let body;
591
- body = JSON.stringify({
592
- ...(input.TraceSegmentDocuments != null && {
593
- TraceSegmentDocuments: se_TraceSegmentDocumentList(input.TraceSegmentDocuments, context),
594
- }),
595
- });
585
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
586
+ TraceSegmentDocuments: (_) => (0, smithy_client_1._json)(_),
587
+ }));
596
588
  return new protocol_http_1.HttpRequest({
597
589
  protocol,
598
590
  hostname,
@@ -611,10 +603,10 @@ const se_TagResourceCommand = async (input, context) => {
611
603
  };
612
604
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource";
613
605
  let body;
614
- body = JSON.stringify({
615
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
616
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
617
- });
606
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
607
+ ResourceARN: [],
608
+ Tags: (_) => (0, smithy_client_1._json)(_),
609
+ }));
618
610
  return new protocol_http_1.HttpRequest({
619
611
  protocol,
620
612
  hostname,
@@ -633,10 +625,10 @@ const se_UntagResourceCommand = async (input, context) => {
633
625
  };
634
626
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource";
635
627
  let body;
636
- body = JSON.stringify({
637
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
638
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
639
- });
628
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
629
+ ResourceARN: [],
630
+ TagKeys: (_) => (0, smithy_client_1._json)(_),
631
+ }));
640
632
  return new protocol_http_1.HttpRequest({
641
633
  protocol,
642
634
  hostname,
@@ -655,14 +647,12 @@ const se_UpdateGroupCommand = async (input, context) => {
655
647
  };
656
648
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateGroup";
657
649
  let body;
658
- body = JSON.stringify({
659
- ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }),
660
- ...(input.GroupARN != null && { GroupARN: input.GroupARN }),
661
- ...(input.GroupName != null && { GroupName: input.GroupName }),
662
- ...(input.InsightsConfiguration != null && {
663
- InsightsConfiguration: se_InsightsConfiguration(input.InsightsConfiguration, context),
664
- }),
665
- });
650
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
651
+ FilterExpression: [],
652
+ GroupARN: [],
653
+ GroupName: [],
654
+ InsightsConfiguration: (_) => (0, smithy_client_1._json)(_),
655
+ }));
666
656
  return new protocol_http_1.HttpRequest({
667
657
  protocol,
668
658
  hostname,
@@ -681,11 +671,9 @@ const se_UpdateSamplingRuleCommand = async (input, context) => {
681
671
  };
682
672
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateSamplingRule";
683
673
  let body;
684
- body = JSON.stringify({
685
- ...(input.SamplingRuleUpdate != null && {
686
- SamplingRuleUpdate: se_SamplingRuleUpdate(input.SamplingRuleUpdate, context),
687
- }),
688
- });
674
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
675
+ SamplingRuleUpdate: (_) => se_SamplingRuleUpdate(_, context),
676
+ }));
689
677
  return new protocol_http_1.HttpRequest({
690
678
  protocol,
691
679
  hostname,
@@ -701,19 +689,16 @@ const de_BatchGetTracesCommand = async (output, context) => {
701
689
  if (output.statusCode !== 200 && output.statusCode >= 300) {
702
690
  return de_BatchGetTracesCommandError(output, context);
703
691
  }
704
- const contents = map({
692
+ const contents = (0, smithy_client_1.map)({
705
693
  $metadata: deserializeMetadata(output),
706
694
  });
707
695
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
708
- if (data.NextToken != null) {
709
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
710
- }
711
- if (data.Traces != null) {
712
- contents.Traces = de_TraceList(data.Traces, context);
713
- }
714
- if (data.UnprocessedTraceIds != null) {
715
- contents.UnprocessedTraceIds = de_UnprocessedTraceIdList(data.UnprocessedTraceIds, context);
716
- }
696
+ const doc = (0, smithy_client_1.take)(data, {
697
+ NextToken: smithy_client_1.expectString,
698
+ Traces: (_) => de_TraceList(_, context),
699
+ UnprocessedTraceIds: smithy_client_1._json,
700
+ });
701
+ Object.assign(contents, doc);
717
702
  return contents;
718
703
  };
719
704
  exports.de_BatchGetTracesCommand = de_BatchGetTracesCommand;
@@ -732,10 +717,9 @@ const de_BatchGetTracesCommandError = async (output, context) => {
732
717
  throw await de_ThrottledExceptionRes(parsedOutput, context);
733
718
  default:
734
719
  const parsedBody = parsedOutput.body;
735
- (0, smithy_client_1.throwDefaultError)({
720
+ return throwDefaultError({
736
721
  output,
737
722
  parsedBody,
738
- exceptionCtor: XRayServiceException_1.XRayServiceException,
739
723
  errorCode,
740
724
  });
741
725
  }
@@ -744,13 +728,14 @@ const de_CreateGroupCommand = async (output, context) => {
744
728
  if (output.statusCode !== 200 && output.statusCode >= 300) {
745
729
  return de_CreateGroupCommandError(output, context);
746
730
  }
747
- const contents = map({
731
+ const contents = (0, smithy_client_1.map)({
748
732
  $metadata: deserializeMetadata(output),
749
733
  });
750
734
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
751
- if (data.Group != null) {
752
- contents.Group = de_Group(data.Group, context);
753
- }
735
+ const doc = (0, smithy_client_1.take)(data, {
736
+ Group: smithy_client_1._json,
737
+ });
738
+ Object.assign(contents, doc);
754
739
  return contents;
755
740
  };
756
741
  exports.de_CreateGroupCommand = de_CreateGroupCommand;
@@ -769,10 +754,9 @@ const de_CreateGroupCommandError = async (output, context) => {
769
754
  throw await de_ThrottledExceptionRes(parsedOutput, context);
770
755
  default:
771
756
  const parsedBody = parsedOutput.body;
772
- (0, smithy_client_1.throwDefaultError)({
757
+ return throwDefaultError({
773
758
  output,
774
759
  parsedBody,
775
- exceptionCtor: XRayServiceException_1.XRayServiceException,
776
760
  errorCode,
777
761
  });
778
762
  }
@@ -781,13 +765,14 @@ const de_CreateSamplingRuleCommand = async (output, context) => {
781
765
  if (output.statusCode !== 200 && output.statusCode >= 300) {
782
766
  return de_CreateSamplingRuleCommandError(output, context);
783
767
  }
784
- const contents = map({
768
+ const contents = (0, smithy_client_1.map)({
785
769
  $metadata: deserializeMetadata(output),
786
770
  });
787
771
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
788
- if (data.SamplingRuleRecord != null) {
789
- contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context);
790
- }
772
+ const doc = (0, smithy_client_1.take)(data, {
773
+ SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context),
774
+ });
775
+ Object.assign(contents, doc);
791
776
  return contents;
792
777
  };
793
778
  exports.de_CreateSamplingRuleCommand = de_CreateSamplingRuleCommand;
@@ -809,10 +794,9 @@ const de_CreateSamplingRuleCommandError = async (output, context) => {
809
794
  throw await de_ThrottledExceptionRes(parsedOutput, context);
810
795
  default:
811
796
  const parsedBody = parsedOutput.body;
812
- (0, smithy_client_1.throwDefaultError)({
797
+ return throwDefaultError({
813
798
  output,
814
799
  parsedBody,
815
- exceptionCtor: XRayServiceException_1.XRayServiceException,
816
800
  errorCode,
817
801
  });
818
802
  }
@@ -821,7 +805,7 @@ const de_DeleteGroupCommand = async (output, context) => {
821
805
  if (output.statusCode !== 200 && output.statusCode >= 300) {
822
806
  return de_DeleteGroupCommandError(output, context);
823
807
  }
824
- const contents = map({
808
+ const contents = (0, smithy_client_1.map)({
825
809
  $metadata: deserializeMetadata(output),
826
810
  });
827
811
  await collectBody(output.body, context);
@@ -843,10 +827,9 @@ const de_DeleteGroupCommandError = async (output, context) => {
843
827
  throw await de_ThrottledExceptionRes(parsedOutput, context);
844
828
  default:
845
829
  const parsedBody = parsedOutput.body;
846
- (0, smithy_client_1.throwDefaultError)({
830
+ return throwDefaultError({
847
831
  output,
848
832
  parsedBody,
849
- exceptionCtor: XRayServiceException_1.XRayServiceException,
850
833
  errorCode,
851
834
  });
852
835
  }
@@ -855,7 +838,7 @@ const de_DeleteResourcePolicyCommand = async (output, context) => {
855
838
  if (output.statusCode !== 200 && output.statusCode >= 300) {
856
839
  return de_DeleteResourcePolicyCommandError(output, context);
857
840
  }
858
- const contents = map({
841
+ const contents = (0, smithy_client_1.map)({
859
842
  $metadata: deserializeMetadata(output),
860
843
  });
861
844
  await collectBody(output.body, context);
@@ -880,10 +863,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
880
863
  throw await de_ThrottledExceptionRes(parsedOutput, context);
881
864
  default:
882
865
  const parsedBody = parsedOutput.body;
883
- (0, smithy_client_1.throwDefaultError)({
866
+ return throwDefaultError({
884
867
  output,
885
868
  parsedBody,
886
- exceptionCtor: XRayServiceException_1.XRayServiceException,
887
869
  errorCode,
888
870
  });
889
871
  }
@@ -892,13 +874,14 @@ const de_DeleteSamplingRuleCommand = async (output, context) => {
892
874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
893
875
  return de_DeleteSamplingRuleCommandError(output, context);
894
876
  }
895
- const contents = map({
877
+ const contents = (0, smithy_client_1.map)({
896
878
  $metadata: deserializeMetadata(output),
897
879
  });
898
880
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
899
- if (data.SamplingRuleRecord != null) {
900
- contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context);
901
- }
881
+ const doc = (0, smithy_client_1.take)(data, {
882
+ SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context),
883
+ });
884
+ Object.assign(contents, doc);
902
885
  return contents;
903
886
  };
904
887
  exports.de_DeleteSamplingRuleCommand = de_DeleteSamplingRuleCommand;
@@ -917,10 +900,9 @@ const de_DeleteSamplingRuleCommandError = async (output, context) => {
917
900
  throw await de_ThrottledExceptionRes(parsedOutput, context);
918
901
  default:
919
902
  const parsedBody = parsedOutput.body;
920
- (0, smithy_client_1.throwDefaultError)({
903
+ return throwDefaultError({
921
904
  output,
922
905
  parsedBody,
923
- exceptionCtor: XRayServiceException_1.XRayServiceException,
924
906
  errorCode,
925
907
  });
926
908
  }
@@ -929,13 +911,14 @@ const de_GetEncryptionConfigCommand = async (output, context) => {
929
911
  if (output.statusCode !== 200 && output.statusCode >= 300) {
930
912
  return de_GetEncryptionConfigCommandError(output, context);
931
913
  }
932
- const contents = map({
914
+ const contents = (0, smithy_client_1.map)({
933
915
  $metadata: deserializeMetadata(output),
934
916
  });
935
917
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
936
- if (data.EncryptionConfig != null) {
937
- contents.EncryptionConfig = de_EncryptionConfig(data.EncryptionConfig, context);
938
- }
918
+ const doc = (0, smithy_client_1.take)(data, {
919
+ EncryptionConfig: smithy_client_1._json,
920
+ });
921
+ Object.assign(contents, doc);
939
922
  return contents;
940
923
  };
941
924
  exports.de_GetEncryptionConfigCommand = de_GetEncryptionConfigCommand;
@@ -954,10 +937,9 @@ const de_GetEncryptionConfigCommandError = async (output, context) => {
954
937
  throw await de_ThrottledExceptionRes(parsedOutput, context);
955
938
  default:
956
939
  const parsedBody = parsedOutput.body;
957
- (0, smithy_client_1.throwDefaultError)({
940
+ return throwDefaultError({
958
941
  output,
959
942
  parsedBody,
960
- exceptionCtor: XRayServiceException_1.XRayServiceException,
961
943
  errorCode,
962
944
  });
963
945
  }
@@ -966,13 +948,14 @@ const de_GetGroupCommand = async (output, context) => {
966
948
  if (output.statusCode !== 200 && output.statusCode >= 300) {
967
949
  return de_GetGroupCommandError(output, context);
968
950
  }
969
- const contents = map({
951
+ const contents = (0, smithy_client_1.map)({
970
952
  $metadata: deserializeMetadata(output),
971
953
  });
972
954
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
973
- if (data.Group != null) {
974
- contents.Group = de_Group(data.Group, context);
975
- }
955
+ const doc = (0, smithy_client_1.take)(data, {
956
+ Group: smithy_client_1._json,
957
+ });
958
+ Object.assign(contents, doc);
976
959
  return contents;
977
960
  };
978
961
  exports.de_GetGroupCommand = de_GetGroupCommand;
@@ -991,10 +974,9 @@ const de_GetGroupCommandError = async (output, context) => {
991
974
  throw await de_ThrottledExceptionRes(parsedOutput, context);
992
975
  default:
993
976
  const parsedBody = parsedOutput.body;
994
- (0, smithy_client_1.throwDefaultError)({
977
+ return throwDefaultError({
995
978
  output,
996
979
  parsedBody,
997
- exceptionCtor: XRayServiceException_1.XRayServiceException,
998
980
  errorCode,
999
981
  });
1000
982
  }
@@ -1003,16 +985,15 @@ const de_GetGroupsCommand = async (output, context) => {
1003
985
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1004
986
  return de_GetGroupsCommandError(output, context);
1005
987
  }
1006
- const contents = map({
988
+ const contents = (0, smithy_client_1.map)({
1007
989
  $metadata: deserializeMetadata(output),
1008
990
  });
1009
991
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1010
- if (data.Groups != null) {
1011
- contents.Groups = de_GroupSummaryList(data.Groups, context);
1012
- }
1013
- if (data.NextToken != null) {
1014
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1015
- }
992
+ const doc = (0, smithy_client_1.take)(data, {
993
+ Groups: smithy_client_1._json,
994
+ NextToken: smithy_client_1.expectString,
995
+ });
996
+ Object.assign(contents, doc);
1016
997
  return contents;
1017
998
  };
1018
999
  exports.de_GetGroupsCommand = de_GetGroupsCommand;
@@ -1031,10 +1012,9 @@ const de_GetGroupsCommandError = async (output, context) => {
1031
1012
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1032
1013
  default:
1033
1014
  const parsedBody = parsedOutput.body;
1034
- (0, smithy_client_1.throwDefaultError)({
1015
+ return throwDefaultError({
1035
1016
  output,
1036
1017
  parsedBody,
1037
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1038
1018
  errorCode,
1039
1019
  });
1040
1020
  }
@@ -1043,13 +1023,14 @@ const de_GetInsightCommand = async (output, context) => {
1043
1023
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1044
1024
  return de_GetInsightCommandError(output, context);
1045
1025
  }
1046
- const contents = map({
1026
+ const contents = (0, smithy_client_1.map)({
1047
1027
  $metadata: deserializeMetadata(output),
1048
1028
  });
1049
1029
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1050
- if (data.Insight != null) {
1051
- contents.Insight = de_Insight(data.Insight, context);
1052
- }
1030
+ const doc = (0, smithy_client_1.take)(data, {
1031
+ Insight: (_) => de_Insight(_, context),
1032
+ });
1033
+ Object.assign(contents, doc);
1053
1034
  return contents;
1054
1035
  };
1055
1036
  exports.de_GetInsightCommand = de_GetInsightCommand;
@@ -1068,10 +1049,9 @@ const de_GetInsightCommandError = async (output, context) => {
1068
1049
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1069
1050
  default:
1070
1051
  const parsedBody = parsedOutput.body;
1071
- (0, smithy_client_1.throwDefaultError)({
1052
+ return throwDefaultError({
1072
1053
  output,
1073
1054
  parsedBody,
1074
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1075
1055
  errorCode,
1076
1056
  });
1077
1057
  }
@@ -1080,16 +1060,15 @@ const de_GetInsightEventsCommand = async (output, context) => {
1080
1060
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1081
1061
  return de_GetInsightEventsCommandError(output, context);
1082
1062
  }
1083
- const contents = map({
1063
+ const contents = (0, smithy_client_1.map)({
1084
1064
  $metadata: deserializeMetadata(output),
1085
1065
  });
1086
1066
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1087
- if (data.InsightEvents != null) {
1088
- contents.InsightEvents = de_InsightEventList(data.InsightEvents, context);
1089
- }
1090
- if (data.NextToken != null) {
1091
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1092
- }
1067
+ const doc = (0, smithy_client_1.take)(data, {
1068
+ InsightEvents: (_) => de_InsightEventList(_, context),
1069
+ NextToken: smithy_client_1.expectString,
1070
+ });
1071
+ Object.assign(contents, doc);
1093
1072
  return contents;
1094
1073
  };
1095
1074
  exports.de_GetInsightEventsCommand = de_GetInsightEventsCommand;
@@ -1108,10 +1087,9 @@ const de_GetInsightEventsCommandError = async (output, context) => {
1108
1087
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1109
1088
  default:
1110
1089
  const parsedBody = parsedOutput.body;
1111
- (0, smithy_client_1.throwDefaultError)({
1090
+ return throwDefaultError({
1112
1091
  output,
1113
1092
  parsedBody,
1114
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1115
1093
  errorCode,
1116
1094
  });
1117
1095
  }
@@ -1120,31 +1098,20 @@ const de_GetInsightImpactGraphCommand = async (output, context) => {
1120
1098
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1121
1099
  return de_GetInsightImpactGraphCommandError(output, context);
1122
1100
  }
1123
- const contents = map({
1101
+ const contents = (0, smithy_client_1.map)({
1124
1102
  $metadata: deserializeMetadata(output),
1125
1103
  });
1126
1104
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1127
- if (data.EndTime != null) {
1128
- contents.EndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.EndTime)));
1129
- }
1130
- if (data.InsightId != null) {
1131
- contents.InsightId = (0, smithy_client_1.expectString)(data.InsightId);
1132
- }
1133
- if (data.NextToken != null) {
1134
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1135
- }
1136
- if (data.ServiceGraphEndTime != null) {
1137
- contents.ServiceGraphEndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ServiceGraphEndTime)));
1138
- }
1139
- if (data.ServiceGraphStartTime != null) {
1140
- contents.ServiceGraphStartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ServiceGraphStartTime)));
1141
- }
1142
- if (data.Services != null) {
1143
- contents.Services = de_InsightImpactGraphServiceList(data.Services, context);
1144
- }
1145
- if (data.StartTime != null) {
1146
- contents.StartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.StartTime)));
1147
- }
1105
+ const doc = (0, smithy_client_1.take)(data, {
1106
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1107
+ InsightId: smithy_client_1.expectString,
1108
+ NextToken: smithy_client_1.expectString,
1109
+ ServiceGraphEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1110
+ ServiceGraphStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1111
+ Services: smithy_client_1._json,
1112
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1113
+ });
1114
+ Object.assign(contents, doc);
1148
1115
  return contents;
1149
1116
  };
1150
1117
  exports.de_GetInsightImpactGraphCommand = de_GetInsightImpactGraphCommand;
@@ -1163,10 +1130,9 @@ const de_GetInsightImpactGraphCommandError = async (output, context) => {
1163
1130
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1164
1131
  default:
1165
1132
  const parsedBody = parsedOutput.body;
1166
- (0, smithy_client_1.throwDefaultError)({
1133
+ return throwDefaultError({
1167
1134
  output,
1168
1135
  parsedBody,
1169
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1170
1136
  errorCode,
1171
1137
  });
1172
1138
  }
@@ -1175,16 +1141,15 @@ const de_GetInsightSummariesCommand = async (output, context) => {
1175
1141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1176
1142
  return de_GetInsightSummariesCommandError(output, context);
1177
1143
  }
1178
- const contents = map({
1144
+ const contents = (0, smithy_client_1.map)({
1179
1145
  $metadata: deserializeMetadata(output),
1180
1146
  });
1181
1147
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1182
- if (data.InsightSummaries != null) {
1183
- contents.InsightSummaries = de_InsightSummaryList(data.InsightSummaries, context);
1184
- }
1185
- if (data.NextToken != null) {
1186
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1187
- }
1148
+ const doc = (0, smithy_client_1.take)(data, {
1149
+ InsightSummaries: (_) => de_InsightSummaryList(_, context),
1150
+ NextToken: smithy_client_1.expectString,
1151
+ });
1152
+ Object.assign(contents, doc);
1188
1153
  return contents;
1189
1154
  };
1190
1155
  exports.de_GetInsightSummariesCommand = de_GetInsightSummariesCommand;
@@ -1203,10 +1168,9 @@ const de_GetInsightSummariesCommandError = async (output, context) => {
1203
1168
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1204
1169
  default:
1205
1170
  const parsedBody = parsedOutput.body;
1206
- (0, smithy_client_1.throwDefaultError)({
1171
+ return throwDefaultError({
1207
1172
  output,
1208
1173
  parsedBody,
1209
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1210
1174
  errorCode,
1211
1175
  });
1212
1176
  }
@@ -1215,16 +1179,15 @@ const de_GetSamplingRulesCommand = async (output, context) => {
1215
1179
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1216
1180
  return de_GetSamplingRulesCommandError(output, context);
1217
1181
  }
1218
- const contents = map({
1182
+ const contents = (0, smithy_client_1.map)({
1219
1183
  $metadata: deserializeMetadata(output),
1220
1184
  });
1221
1185
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1222
- if (data.NextToken != null) {
1223
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1224
- }
1225
- if (data.SamplingRuleRecords != null) {
1226
- contents.SamplingRuleRecords = de_SamplingRuleRecordList(data.SamplingRuleRecords, context);
1227
- }
1186
+ const doc = (0, smithy_client_1.take)(data, {
1187
+ NextToken: smithy_client_1.expectString,
1188
+ SamplingRuleRecords: (_) => de_SamplingRuleRecordList(_, context),
1189
+ });
1190
+ Object.assign(contents, doc);
1228
1191
  return contents;
1229
1192
  };
1230
1193
  exports.de_GetSamplingRulesCommand = de_GetSamplingRulesCommand;
@@ -1243,10 +1206,9 @@ const de_GetSamplingRulesCommandError = async (output, context) => {
1243
1206
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1244
1207
  default:
1245
1208
  const parsedBody = parsedOutput.body;
1246
- (0, smithy_client_1.throwDefaultError)({
1209
+ return throwDefaultError({
1247
1210
  output,
1248
1211
  parsedBody,
1249
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1250
1212
  errorCode,
1251
1213
  });
1252
1214
  }
@@ -1255,16 +1217,15 @@ const de_GetSamplingStatisticSummariesCommand = async (output, context) => {
1255
1217
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1256
1218
  return de_GetSamplingStatisticSummariesCommandError(output, context);
1257
1219
  }
1258
- const contents = map({
1220
+ const contents = (0, smithy_client_1.map)({
1259
1221
  $metadata: deserializeMetadata(output),
1260
1222
  });
1261
1223
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1262
- if (data.NextToken != null) {
1263
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1264
- }
1265
- if (data.SamplingStatisticSummaries != null) {
1266
- contents.SamplingStatisticSummaries = de_SamplingStatisticSummaryList(data.SamplingStatisticSummaries, context);
1267
- }
1224
+ const doc = (0, smithy_client_1.take)(data, {
1225
+ NextToken: smithy_client_1.expectString,
1226
+ SamplingStatisticSummaries: (_) => de_SamplingStatisticSummaryList(_, context),
1227
+ });
1228
+ Object.assign(contents, doc);
1268
1229
  return contents;
1269
1230
  };
1270
1231
  exports.de_GetSamplingStatisticSummariesCommand = de_GetSamplingStatisticSummariesCommand;
@@ -1283,10 +1244,9 @@ const de_GetSamplingStatisticSummariesCommandError = async (output, context) =>
1283
1244
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1284
1245
  default:
1285
1246
  const parsedBody = parsedOutput.body;
1286
- (0, smithy_client_1.throwDefaultError)({
1247
+ return throwDefaultError({
1287
1248
  output,
1288
1249
  parsedBody,
1289
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1290
1250
  errorCode,
1291
1251
  });
1292
1252
  }
@@ -1295,19 +1255,16 @@ const de_GetSamplingTargetsCommand = async (output, context) => {
1295
1255
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1296
1256
  return de_GetSamplingTargetsCommandError(output, context);
1297
1257
  }
1298
- const contents = map({
1258
+ const contents = (0, smithy_client_1.map)({
1299
1259
  $metadata: deserializeMetadata(output),
1300
1260
  });
1301
1261
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1302
- if (data.LastRuleModification != null) {
1303
- contents.LastRuleModification = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastRuleModification)));
1304
- }
1305
- if (data.SamplingTargetDocuments != null) {
1306
- contents.SamplingTargetDocuments = de_SamplingTargetDocumentList(data.SamplingTargetDocuments, context);
1307
- }
1308
- if (data.UnprocessedStatistics != null) {
1309
- contents.UnprocessedStatistics = de_UnprocessedStatisticsList(data.UnprocessedStatistics, context);
1310
- }
1262
+ const doc = (0, smithy_client_1.take)(data, {
1263
+ LastRuleModification: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1264
+ SamplingTargetDocuments: (_) => de_SamplingTargetDocumentList(_, context),
1265
+ UnprocessedStatistics: smithy_client_1._json,
1266
+ });
1267
+ Object.assign(contents, doc);
1311
1268
  return contents;
1312
1269
  };
1313
1270
  exports.de_GetSamplingTargetsCommand = de_GetSamplingTargetsCommand;
@@ -1326,10 +1283,9 @@ const de_GetSamplingTargetsCommandError = async (output, context) => {
1326
1283
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1327
1284
  default:
1328
1285
  const parsedBody = parsedOutput.body;
1329
- (0, smithy_client_1.throwDefaultError)({
1286
+ return throwDefaultError({
1330
1287
  output,
1331
1288
  parsedBody,
1332
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1333
1289
  errorCode,
1334
1290
  });
1335
1291
  }
@@ -1338,25 +1294,18 @@ const de_GetServiceGraphCommand = async (output, context) => {
1338
1294
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1339
1295
  return de_GetServiceGraphCommandError(output, context);
1340
1296
  }
1341
- const contents = map({
1297
+ const contents = (0, smithy_client_1.map)({
1342
1298
  $metadata: deserializeMetadata(output),
1343
1299
  });
1344
1300
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1345
- if (data.ContainsOldGroupVersions != null) {
1346
- contents.ContainsOldGroupVersions = (0, smithy_client_1.expectBoolean)(data.ContainsOldGroupVersions);
1347
- }
1348
- if (data.EndTime != null) {
1349
- contents.EndTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.EndTime)));
1350
- }
1351
- if (data.NextToken != null) {
1352
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1353
- }
1354
- if (data.Services != null) {
1355
- contents.Services = de_ServiceList(data.Services, context);
1356
- }
1357
- if (data.StartTime != null) {
1358
- contents.StartTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.StartTime)));
1359
- }
1301
+ const doc = (0, smithy_client_1.take)(data, {
1302
+ ContainsOldGroupVersions: smithy_client_1.expectBoolean,
1303
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1304
+ NextToken: smithy_client_1.expectString,
1305
+ Services: (_) => de_ServiceList(_, context),
1306
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1307
+ });
1308
+ Object.assign(contents, doc);
1360
1309
  return contents;
1361
1310
  };
1362
1311
  exports.de_GetServiceGraphCommand = de_GetServiceGraphCommand;
@@ -1375,10 +1324,9 @@ const de_GetServiceGraphCommandError = async (output, context) => {
1375
1324
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1376
1325
  default:
1377
1326
  const parsedBody = parsedOutput.body;
1378
- (0, smithy_client_1.throwDefaultError)({
1327
+ return throwDefaultError({
1379
1328
  output,
1380
1329
  parsedBody,
1381
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1382
1330
  errorCode,
1383
1331
  });
1384
1332
  }
@@ -1387,19 +1335,16 @@ const de_GetTimeSeriesServiceStatisticsCommand = async (output, context) => {
1387
1335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1388
1336
  return de_GetTimeSeriesServiceStatisticsCommandError(output, context);
1389
1337
  }
1390
- const contents = map({
1338
+ const contents = (0, smithy_client_1.map)({
1391
1339
  $metadata: deserializeMetadata(output),
1392
1340
  });
1393
1341
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1394
- if (data.ContainsOldGroupVersions != null) {
1395
- contents.ContainsOldGroupVersions = (0, smithy_client_1.expectBoolean)(data.ContainsOldGroupVersions);
1396
- }
1397
- if (data.NextToken != null) {
1398
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1399
- }
1400
- if (data.TimeSeriesServiceStatistics != null) {
1401
- contents.TimeSeriesServiceStatistics = de_TimeSeriesServiceStatisticsList(data.TimeSeriesServiceStatistics, context);
1402
- }
1342
+ const doc = (0, smithy_client_1.take)(data, {
1343
+ ContainsOldGroupVersions: smithy_client_1.expectBoolean,
1344
+ NextToken: smithy_client_1.expectString,
1345
+ TimeSeriesServiceStatistics: (_) => de_TimeSeriesServiceStatisticsList(_, context),
1346
+ });
1347
+ Object.assign(contents, doc);
1403
1348
  return contents;
1404
1349
  };
1405
1350
  exports.de_GetTimeSeriesServiceStatisticsCommand = de_GetTimeSeriesServiceStatisticsCommand;
@@ -1418,10 +1363,9 @@ const de_GetTimeSeriesServiceStatisticsCommandError = async (output, context) =>
1418
1363
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1419
1364
  default:
1420
1365
  const parsedBody = parsedOutput.body;
1421
- (0, smithy_client_1.throwDefaultError)({
1366
+ return throwDefaultError({
1422
1367
  output,
1423
1368
  parsedBody,
1424
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1425
1369
  errorCode,
1426
1370
  });
1427
1371
  }
@@ -1430,16 +1374,15 @@ const de_GetTraceGraphCommand = async (output, context) => {
1430
1374
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1431
1375
  return de_GetTraceGraphCommandError(output, context);
1432
1376
  }
1433
- const contents = map({
1377
+ const contents = (0, smithy_client_1.map)({
1434
1378
  $metadata: deserializeMetadata(output),
1435
1379
  });
1436
1380
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1437
- if (data.NextToken != null) {
1438
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1439
- }
1440
- if (data.Services != null) {
1441
- contents.Services = de_ServiceList(data.Services, context);
1442
- }
1381
+ const doc = (0, smithy_client_1.take)(data, {
1382
+ NextToken: smithy_client_1.expectString,
1383
+ Services: (_) => de_ServiceList(_, context),
1384
+ });
1385
+ Object.assign(contents, doc);
1443
1386
  return contents;
1444
1387
  };
1445
1388
  exports.de_GetTraceGraphCommand = de_GetTraceGraphCommand;
@@ -1458,10 +1401,9 @@ const de_GetTraceGraphCommandError = async (output, context) => {
1458
1401
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1459
1402
  default:
1460
1403
  const parsedBody = parsedOutput.body;
1461
- (0, smithy_client_1.throwDefaultError)({
1404
+ return throwDefaultError({
1462
1405
  output,
1463
1406
  parsedBody,
1464
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1465
1407
  errorCode,
1466
1408
  });
1467
1409
  }
@@ -1470,22 +1412,17 @@ const de_GetTraceSummariesCommand = async (output, context) => {
1470
1412
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1471
1413
  return de_GetTraceSummariesCommandError(output, context);
1472
1414
  }
1473
- const contents = map({
1415
+ const contents = (0, smithy_client_1.map)({
1474
1416
  $metadata: deserializeMetadata(output),
1475
1417
  });
1476
1418
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1477
- if (data.ApproximateTime != null) {
1478
- contents.ApproximateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.ApproximateTime)));
1479
- }
1480
- if (data.NextToken != null) {
1481
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1482
- }
1483
- if (data.TraceSummaries != null) {
1484
- contents.TraceSummaries = de_TraceSummaryList(data.TraceSummaries, context);
1485
- }
1486
- if (data.TracesProcessedCount != null) {
1487
- contents.TracesProcessedCount = (0, smithy_client_1.expectLong)(data.TracesProcessedCount);
1488
- }
1419
+ const doc = (0, smithy_client_1.take)(data, {
1420
+ ApproximateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1421
+ NextToken: smithy_client_1.expectString,
1422
+ TraceSummaries: (_) => de_TraceSummaryList(_, context),
1423
+ TracesProcessedCount: smithy_client_1.expectLong,
1424
+ });
1425
+ Object.assign(contents, doc);
1489
1426
  return contents;
1490
1427
  };
1491
1428
  exports.de_GetTraceSummariesCommand = de_GetTraceSummariesCommand;
@@ -1504,10 +1441,9 @@ const de_GetTraceSummariesCommandError = async (output, context) => {
1504
1441
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1505
1442
  default:
1506
1443
  const parsedBody = parsedOutput.body;
1507
- (0, smithy_client_1.throwDefaultError)({
1444
+ return throwDefaultError({
1508
1445
  output,
1509
1446
  parsedBody,
1510
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1511
1447
  errorCode,
1512
1448
  });
1513
1449
  }
@@ -1516,16 +1452,15 @@ const de_ListResourcePoliciesCommand = async (output, context) => {
1516
1452
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1517
1453
  return de_ListResourcePoliciesCommandError(output, context);
1518
1454
  }
1519
- const contents = map({
1455
+ const contents = (0, smithy_client_1.map)({
1520
1456
  $metadata: deserializeMetadata(output),
1521
1457
  });
1522
1458
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1523
- if (data.NextToken != null) {
1524
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1525
- }
1526
- if (data.ResourcePolicies != null) {
1527
- contents.ResourcePolicies = de_ResourcePolicyList(data.ResourcePolicies, context);
1528
- }
1459
+ const doc = (0, smithy_client_1.take)(data, {
1460
+ NextToken: smithy_client_1.expectString,
1461
+ ResourcePolicies: (_) => de_ResourcePolicyList(_, context),
1462
+ });
1463
+ Object.assign(contents, doc);
1529
1464
  return contents;
1530
1465
  };
1531
1466
  exports.de_ListResourcePoliciesCommand = de_ListResourcePoliciesCommand;
@@ -1544,10 +1479,9 @@ const de_ListResourcePoliciesCommandError = async (output, context) => {
1544
1479
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1545
1480
  default:
1546
1481
  const parsedBody = parsedOutput.body;
1547
- (0, smithy_client_1.throwDefaultError)({
1482
+ return throwDefaultError({
1548
1483
  output,
1549
1484
  parsedBody,
1550
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1551
1485
  errorCode,
1552
1486
  });
1553
1487
  }
@@ -1556,16 +1490,15 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1556
1490
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1557
1491
  return de_ListTagsForResourceCommandError(output, context);
1558
1492
  }
1559
- const contents = map({
1493
+ const contents = (0, smithy_client_1.map)({
1560
1494
  $metadata: deserializeMetadata(output),
1561
1495
  });
1562
1496
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1563
- if (data.NextToken != null) {
1564
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1565
- }
1566
- if (data.Tags != null) {
1567
- contents.Tags = de_TagList(data.Tags, context);
1568
- }
1497
+ const doc = (0, smithy_client_1.take)(data, {
1498
+ NextToken: smithy_client_1.expectString,
1499
+ Tags: smithy_client_1._json,
1500
+ });
1501
+ Object.assign(contents, doc);
1569
1502
  return contents;
1570
1503
  };
1571
1504
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -1587,10 +1520,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1587
1520
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1588
1521
  default:
1589
1522
  const parsedBody = parsedOutput.body;
1590
- (0, smithy_client_1.throwDefaultError)({
1523
+ return throwDefaultError({
1591
1524
  output,
1592
1525
  parsedBody,
1593
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1594
1526
  errorCode,
1595
1527
  });
1596
1528
  }
@@ -1599,13 +1531,14 @@ const de_PutEncryptionConfigCommand = async (output, context) => {
1599
1531
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1600
1532
  return de_PutEncryptionConfigCommandError(output, context);
1601
1533
  }
1602
- const contents = map({
1534
+ const contents = (0, smithy_client_1.map)({
1603
1535
  $metadata: deserializeMetadata(output),
1604
1536
  });
1605
1537
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1606
- if (data.EncryptionConfig != null) {
1607
- contents.EncryptionConfig = de_EncryptionConfig(data.EncryptionConfig, context);
1608
- }
1538
+ const doc = (0, smithy_client_1.take)(data, {
1539
+ EncryptionConfig: smithy_client_1._json,
1540
+ });
1541
+ Object.assign(contents, doc);
1609
1542
  return contents;
1610
1543
  };
1611
1544
  exports.de_PutEncryptionConfigCommand = de_PutEncryptionConfigCommand;
@@ -1624,10 +1557,9 @@ const de_PutEncryptionConfigCommandError = async (output, context) => {
1624
1557
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1625
1558
  default:
1626
1559
  const parsedBody = parsedOutput.body;
1627
- (0, smithy_client_1.throwDefaultError)({
1560
+ return throwDefaultError({
1628
1561
  output,
1629
1562
  parsedBody,
1630
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1631
1563
  errorCode,
1632
1564
  });
1633
1565
  }
@@ -1636,13 +1568,14 @@ const de_PutResourcePolicyCommand = async (output, context) => {
1636
1568
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1637
1569
  return de_PutResourcePolicyCommandError(output, context);
1638
1570
  }
1639
- const contents = map({
1571
+ const contents = (0, smithy_client_1.map)({
1640
1572
  $metadata: deserializeMetadata(output),
1641
1573
  });
1642
1574
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1643
- if (data.ResourcePolicy != null) {
1644
- contents.ResourcePolicy = de_ResourcePolicy(data.ResourcePolicy, context);
1645
- }
1575
+ const doc = (0, smithy_client_1.take)(data, {
1576
+ ResourcePolicy: (_) => de_ResourcePolicy(_, context),
1577
+ });
1578
+ Object.assign(contents, doc);
1646
1579
  return contents;
1647
1580
  };
1648
1581
  exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
@@ -1673,10 +1606,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
1673
1606
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1674
1607
  default:
1675
1608
  const parsedBody = parsedOutput.body;
1676
- (0, smithy_client_1.throwDefaultError)({
1609
+ return throwDefaultError({
1677
1610
  output,
1678
1611
  parsedBody,
1679
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1680
1612
  errorCode,
1681
1613
  });
1682
1614
  }
@@ -1685,7 +1617,7 @@ const de_PutTelemetryRecordsCommand = async (output, context) => {
1685
1617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1686
1618
  return de_PutTelemetryRecordsCommandError(output, context);
1687
1619
  }
1688
- const contents = map({
1620
+ const contents = (0, smithy_client_1.map)({
1689
1621
  $metadata: deserializeMetadata(output),
1690
1622
  });
1691
1623
  await collectBody(output.body, context);
@@ -1707,10 +1639,9 @@ const de_PutTelemetryRecordsCommandError = async (output, context) => {
1707
1639
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1708
1640
  default:
1709
1641
  const parsedBody = parsedOutput.body;
1710
- (0, smithy_client_1.throwDefaultError)({
1642
+ return throwDefaultError({
1711
1643
  output,
1712
1644
  parsedBody,
1713
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1714
1645
  errorCode,
1715
1646
  });
1716
1647
  }
@@ -1719,13 +1650,14 @@ const de_PutTraceSegmentsCommand = async (output, context) => {
1719
1650
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1720
1651
  return de_PutTraceSegmentsCommandError(output, context);
1721
1652
  }
1722
- const contents = map({
1653
+ const contents = (0, smithy_client_1.map)({
1723
1654
  $metadata: deserializeMetadata(output),
1724
1655
  });
1725
1656
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1726
- if (data.UnprocessedTraceSegments != null) {
1727
- contents.UnprocessedTraceSegments = de_UnprocessedTraceSegmentList(data.UnprocessedTraceSegments, context);
1728
- }
1657
+ const doc = (0, smithy_client_1.take)(data, {
1658
+ UnprocessedTraceSegments: smithy_client_1._json,
1659
+ });
1660
+ Object.assign(contents, doc);
1729
1661
  return contents;
1730
1662
  };
1731
1663
  exports.de_PutTraceSegmentsCommand = de_PutTraceSegmentsCommand;
@@ -1744,10 +1676,9 @@ const de_PutTraceSegmentsCommandError = async (output, context) => {
1744
1676
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1745
1677
  default:
1746
1678
  const parsedBody = parsedOutput.body;
1747
- (0, smithy_client_1.throwDefaultError)({
1679
+ return throwDefaultError({
1748
1680
  output,
1749
1681
  parsedBody,
1750
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1751
1682
  errorCode,
1752
1683
  });
1753
1684
  }
@@ -1756,7 +1687,7 @@ const de_TagResourceCommand = async (output, context) => {
1756
1687
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1757
1688
  return de_TagResourceCommandError(output, context);
1758
1689
  }
1759
- const contents = map({
1690
+ const contents = (0, smithy_client_1.map)({
1760
1691
  $metadata: deserializeMetadata(output),
1761
1692
  });
1762
1693
  await collectBody(output.body, context);
@@ -1784,10 +1715,9 @@ const de_TagResourceCommandError = async (output, context) => {
1784
1715
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1785
1716
  default:
1786
1717
  const parsedBody = parsedOutput.body;
1787
- (0, smithy_client_1.throwDefaultError)({
1718
+ return throwDefaultError({
1788
1719
  output,
1789
1720
  parsedBody,
1790
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1791
1721
  errorCode,
1792
1722
  });
1793
1723
  }
@@ -1796,7 +1726,7 @@ const de_UntagResourceCommand = async (output, context) => {
1796
1726
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1797
1727
  return de_UntagResourceCommandError(output, context);
1798
1728
  }
1799
- const contents = map({
1729
+ const contents = (0, smithy_client_1.map)({
1800
1730
  $metadata: deserializeMetadata(output),
1801
1731
  });
1802
1732
  await collectBody(output.body, context);
@@ -1821,10 +1751,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1821
1751
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1822
1752
  default:
1823
1753
  const parsedBody = parsedOutput.body;
1824
- (0, smithy_client_1.throwDefaultError)({
1754
+ return throwDefaultError({
1825
1755
  output,
1826
1756
  parsedBody,
1827
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1828
1757
  errorCode,
1829
1758
  });
1830
1759
  }
@@ -1833,13 +1762,14 @@ const de_UpdateGroupCommand = async (output, context) => {
1833
1762
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1834
1763
  return de_UpdateGroupCommandError(output, context);
1835
1764
  }
1836
- const contents = map({
1765
+ const contents = (0, smithy_client_1.map)({
1837
1766
  $metadata: deserializeMetadata(output),
1838
1767
  });
1839
1768
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1840
- if (data.Group != null) {
1841
- contents.Group = de_Group(data.Group, context);
1842
- }
1769
+ const doc = (0, smithy_client_1.take)(data, {
1770
+ Group: smithy_client_1._json,
1771
+ });
1772
+ Object.assign(contents, doc);
1843
1773
  return contents;
1844
1774
  };
1845
1775
  exports.de_UpdateGroupCommand = de_UpdateGroupCommand;
@@ -1858,10 +1788,9 @@ const de_UpdateGroupCommandError = async (output, context) => {
1858
1788
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1859
1789
  default:
1860
1790
  const parsedBody = parsedOutput.body;
1861
- (0, smithy_client_1.throwDefaultError)({
1791
+ return throwDefaultError({
1862
1792
  output,
1863
1793
  parsedBody,
1864
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1865
1794
  errorCode,
1866
1795
  });
1867
1796
  }
@@ -1870,13 +1799,14 @@ const de_UpdateSamplingRuleCommand = async (output, context) => {
1870
1799
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1871
1800
  return de_UpdateSamplingRuleCommandError(output, context);
1872
1801
  }
1873
- const contents = map({
1802
+ const contents = (0, smithy_client_1.map)({
1874
1803
  $metadata: deserializeMetadata(output),
1875
1804
  });
1876
1805
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1877
- if (data.SamplingRuleRecord != null) {
1878
- contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context);
1879
- }
1806
+ const doc = (0, smithy_client_1.take)(data, {
1807
+ SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context),
1808
+ });
1809
+ Object.assign(contents, doc);
1880
1810
  return contents;
1881
1811
  };
1882
1812
  exports.de_UpdateSamplingRuleCommand = de_UpdateSamplingRuleCommand;
@@ -1895,21 +1825,21 @@ const de_UpdateSamplingRuleCommandError = async (output, context) => {
1895
1825
  throw await de_ThrottledExceptionRes(parsedOutput, context);
1896
1826
  default:
1897
1827
  const parsedBody = parsedOutput.body;
1898
- (0, smithy_client_1.throwDefaultError)({
1828
+ return throwDefaultError({
1899
1829
  output,
1900
1830
  parsedBody,
1901
- exceptionCtor: XRayServiceException_1.XRayServiceException,
1902
1831
  errorCode,
1903
1832
  });
1904
1833
  }
1905
1834
  };
1906
- const map = smithy_client_1.map;
1835
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(XRayServiceException_1.XRayServiceException);
1907
1836
  const de_InvalidPolicyRevisionIdExceptionRes = async (parsedOutput, context) => {
1908
- const contents = map({});
1837
+ const contents = (0, smithy_client_1.map)({});
1909
1838
  const data = parsedOutput.body;
1910
- if (data.Message != null) {
1911
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1912
- }
1839
+ const doc = (0, smithy_client_1.take)(data, {
1840
+ Message: smithy_client_1.expectString,
1841
+ });
1842
+ Object.assign(contents, doc);
1913
1843
  const exception = new models_0_1.InvalidPolicyRevisionIdException({
1914
1844
  $metadata: deserializeMetadata(parsedOutput),
1915
1845
  ...contents,
@@ -1917,11 +1847,12 @@ const de_InvalidPolicyRevisionIdExceptionRes = async (parsedOutput, context) =>
1917
1847
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1918
1848
  };
1919
1849
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1920
- const contents = map({});
1850
+ const contents = (0, smithy_client_1.map)({});
1921
1851
  const data = parsedOutput.body;
1922
- if (data.Message != null) {
1923
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1924
- }
1852
+ const doc = (0, smithy_client_1.take)(data, {
1853
+ Message: smithy_client_1.expectString,
1854
+ });
1855
+ Object.assign(contents, doc);
1925
1856
  const exception = new models_0_1.InvalidRequestException({
1926
1857
  $metadata: deserializeMetadata(parsedOutput),
1927
1858
  ...contents,
@@ -1929,11 +1860,12 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1929
1860
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1930
1861
  };
1931
1862
  const de_LockoutPreventionExceptionRes = async (parsedOutput, context) => {
1932
- const contents = map({});
1863
+ const contents = (0, smithy_client_1.map)({});
1933
1864
  const data = parsedOutput.body;
1934
- if (data.Message != null) {
1935
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1936
- }
1865
+ const doc = (0, smithy_client_1.take)(data, {
1866
+ Message: smithy_client_1.expectString,
1867
+ });
1868
+ Object.assign(contents, doc);
1937
1869
  const exception = new models_0_1.LockoutPreventionException({
1938
1870
  $metadata: deserializeMetadata(parsedOutput),
1939
1871
  ...contents,
@@ -1941,11 +1873,12 @@ const de_LockoutPreventionExceptionRes = async (parsedOutput, context) => {
1941
1873
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1942
1874
  };
1943
1875
  const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
1944
- const contents = map({});
1876
+ const contents = (0, smithy_client_1.map)({});
1945
1877
  const data = parsedOutput.body;
1946
- if (data.Message != null) {
1947
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1948
- }
1878
+ const doc = (0, smithy_client_1.take)(data, {
1879
+ Message: smithy_client_1.expectString,
1880
+ });
1881
+ Object.assign(contents, doc);
1949
1882
  const exception = new models_0_1.MalformedPolicyDocumentException({
1950
1883
  $metadata: deserializeMetadata(parsedOutput),
1951
1884
  ...contents,
@@ -1953,11 +1886,12 @@ const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) =>
1953
1886
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1954
1887
  };
1955
1888
  const de_PolicyCountLimitExceededExceptionRes = async (parsedOutput, context) => {
1956
- const contents = map({});
1889
+ const contents = (0, smithy_client_1.map)({});
1957
1890
  const data = parsedOutput.body;
1958
- if (data.Message != null) {
1959
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1960
- }
1891
+ const doc = (0, smithy_client_1.take)(data, {
1892
+ Message: smithy_client_1.expectString,
1893
+ });
1894
+ Object.assign(contents, doc);
1961
1895
  const exception = new models_0_1.PolicyCountLimitExceededException({
1962
1896
  $metadata: deserializeMetadata(parsedOutput),
1963
1897
  ...contents,
@@ -1965,11 +1899,12 @@ const de_PolicyCountLimitExceededExceptionRes = async (parsedOutput, context) =>
1965
1899
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1966
1900
  };
1967
1901
  const de_PolicySizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1968
- const contents = map({});
1902
+ const contents = (0, smithy_client_1.map)({});
1969
1903
  const data = parsedOutput.body;
1970
- if (data.Message != null) {
1971
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1972
- }
1904
+ const doc = (0, smithy_client_1.take)(data, {
1905
+ Message: smithy_client_1.expectString,
1906
+ });
1907
+ Object.assign(contents, doc);
1973
1908
  const exception = new models_0_1.PolicySizeLimitExceededException({
1974
1909
  $metadata: deserializeMetadata(parsedOutput),
1975
1910
  ...contents,
@@ -1977,14 +1912,13 @@ const de_PolicySizeLimitExceededExceptionRes = async (parsedOutput, context) =>
1977
1912
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1978
1913
  };
1979
1914
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1980
- const contents = map({});
1915
+ const contents = (0, smithy_client_1.map)({});
1981
1916
  const data = parsedOutput.body;
1982
- if (data.Message != null) {
1983
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1984
- }
1985
- if (data.ResourceName != null) {
1986
- contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
1987
- }
1917
+ const doc = (0, smithy_client_1.take)(data, {
1918
+ Message: smithy_client_1.expectString,
1919
+ ResourceName: smithy_client_1.expectString,
1920
+ });
1921
+ Object.assign(contents, doc);
1988
1922
  const exception = new models_0_1.ResourceNotFoundException({
1989
1923
  $metadata: deserializeMetadata(parsedOutput),
1990
1924
  ...contents,
@@ -1992,11 +1926,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1992
1926
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1993
1927
  };
1994
1928
  const de_RuleLimitExceededExceptionRes = async (parsedOutput, context) => {
1995
- const contents = map({});
1929
+ const contents = (0, smithy_client_1.map)({});
1996
1930
  const data = parsedOutput.body;
1997
- if (data.Message != null) {
1998
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1999
- }
1931
+ const doc = (0, smithy_client_1.take)(data, {
1932
+ Message: smithy_client_1.expectString,
1933
+ });
1934
+ Object.assign(contents, doc);
2000
1935
  const exception = new models_0_1.RuleLimitExceededException({
2001
1936
  $metadata: deserializeMetadata(parsedOutput),
2002
1937
  ...contents,
@@ -2004,11 +1939,12 @@ const de_RuleLimitExceededExceptionRes = async (parsedOutput, context) => {
2004
1939
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2005
1940
  };
2006
1941
  const de_ThrottledExceptionRes = async (parsedOutput, context) => {
2007
- const contents = map({});
1942
+ const contents = (0, smithy_client_1.map)({});
2008
1943
  const data = parsedOutput.body;
2009
- if (data.Message != null) {
2010
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2011
- }
1944
+ const doc = (0, smithy_client_1.take)(data, {
1945
+ Message: smithy_client_1.expectString,
1946
+ });
1947
+ Object.assign(contents, doc);
2012
1948
  const exception = new models_0_1.ThrottledException({
2013
1949
  $metadata: deserializeMetadata(parsedOutput),
2014
1950
  ...contents,
@@ -2016,94 +1952,61 @@ const de_ThrottledExceptionRes = async (parsedOutput, context) => {
2016
1952
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2017
1953
  };
2018
1954
  const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2019
- const contents = map({});
1955
+ const contents = (0, smithy_client_1.map)({});
2020
1956
  const data = parsedOutput.body;
2021
- if (data.Message != null) {
2022
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
2023
- }
2024
- if (data.ResourceName != null) {
2025
- contents.ResourceName = (0, smithy_client_1.expectString)(data.ResourceName);
2026
- }
1957
+ const doc = (0, smithy_client_1.take)(data, {
1958
+ Message: smithy_client_1.expectString,
1959
+ ResourceName: smithy_client_1.expectString,
1960
+ });
1961
+ Object.assign(contents, doc);
2027
1962
  const exception = new models_0_1.TooManyTagsException({
2028
1963
  $metadata: deserializeMetadata(parsedOutput),
2029
1964
  ...contents,
2030
1965
  });
2031
1966
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2032
1967
  };
2033
- const se_AttributeMap = (input, context) => {
2034
- return Object.entries(input).reduce((acc, [key, value]) => {
2035
- if (value === null) {
2036
- return acc;
2037
- }
2038
- acc[key] = value;
2039
- return acc;
2040
- }, {});
2041
- };
2042
- const se_BackendConnectionErrors = (input, context) => {
2043
- return {
2044
- ...(input.ConnectionRefusedCount != null && { ConnectionRefusedCount: input.ConnectionRefusedCount }),
2045
- ...(input.HTTPCode4XXCount != null && { HTTPCode4XXCount: input.HTTPCode4XXCount }),
2046
- ...(input.HTTPCode5XXCount != null && { HTTPCode5XXCount: input.HTTPCode5XXCount }),
2047
- ...(input.OtherCount != null && { OtherCount: input.OtherCount }),
2048
- ...(input.TimeoutCount != null && { TimeoutCount: input.TimeoutCount }),
2049
- ...(input.UnknownHostCount != null && { UnknownHostCount: input.UnknownHostCount }),
2050
- };
2051
- };
2052
- const se_InsightsConfiguration = (input, context) => {
2053
- return {
2054
- ...(input.InsightsEnabled != null && { InsightsEnabled: input.InsightsEnabled }),
2055
- ...(input.NotificationsEnabled != null && { NotificationsEnabled: input.NotificationsEnabled }),
2056
- };
2057
- };
2058
- const se_InsightStateList = (input, context) => {
2059
- return input
2060
- .filter((e) => e != null)
2061
- .map((entry) => {
2062
- return entry;
2063
- });
2064
- };
2065
1968
  const se_SamplingRule = (input, context) => {
2066
- return {
2067
- ...(input.Attributes != null && { Attributes: se_AttributeMap(input.Attributes, context) }),
2068
- ...(input.FixedRate != null && { FixedRate: (0, smithy_client_1.serializeFloat)(input.FixedRate) }),
2069
- ...(input.HTTPMethod != null && { HTTPMethod: input.HTTPMethod }),
2070
- ...(input.Host != null && { Host: input.Host }),
2071
- ...(input.Priority != null && { Priority: input.Priority }),
2072
- ...(input.ReservoirSize != null && { ReservoirSize: input.ReservoirSize }),
2073
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2074
- ...(input.RuleARN != null && { RuleARN: input.RuleARN }),
2075
- ...(input.RuleName != null && { RuleName: input.RuleName }),
2076
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
2077
- ...(input.ServiceType != null && { ServiceType: input.ServiceType }),
2078
- ...(input.URLPath != null && { URLPath: input.URLPath }),
2079
- ...(input.Version != null && { Version: input.Version }),
2080
- };
1969
+ return (0, smithy_client_1.take)(input, {
1970
+ Attributes: smithy_client_1._json,
1971
+ FixedRate: smithy_client_1.serializeFloat,
1972
+ HTTPMethod: [],
1973
+ Host: [],
1974
+ Priority: [],
1975
+ ReservoirSize: [],
1976
+ ResourceARN: [],
1977
+ RuleARN: [],
1978
+ RuleName: [],
1979
+ ServiceName: [],
1980
+ ServiceType: [],
1981
+ URLPath: [],
1982
+ Version: [],
1983
+ });
2081
1984
  };
2082
1985
  const se_SamplingRuleUpdate = (input, context) => {
2083
- return {
2084
- ...(input.Attributes != null && { Attributes: se_AttributeMap(input.Attributes, context) }),
2085
- ...(input.FixedRate != null && { FixedRate: (0, smithy_client_1.serializeFloat)(input.FixedRate) }),
2086
- ...(input.HTTPMethod != null && { HTTPMethod: input.HTTPMethod }),
2087
- ...(input.Host != null && { Host: input.Host }),
2088
- ...(input.Priority != null && { Priority: input.Priority }),
2089
- ...(input.ReservoirSize != null && { ReservoirSize: input.ReservoirSize }),
2090
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
2091
- ...(input.RuleARN != null && { RuleARN: input.RuleARN }),
2092
- ...(input.RuleName != null && { RuleName: input.RuleName }),
2093
- ...(input.ServiceName != null && { ServiceName: input.ServiceName }),
2094
- ...(input.ServiceType != null && { ServiceType: input.ServiceType }),
2095
- ...(input.URLPath != null && { URLPath: input.URLPath }),
2096
- };
1986
+ return (0, smithy_client_1.take)(input, {
1987
+ Attributes: smithy_client_1._json,
1988
+ FixedRate: smithy_client_1.serializeFloat,
1989
+ HTTPMethod: [],
1990
+ Host: [],
1991
+ Priority: [],
1992
+ ReservoirSize: [],
1993
+ ResourceARN: [],
1994
+ RuleARN: [],
1995
+ RuleName: [],
1996
+ ServiceName: [],
1997
+ ServiceType: [],
1998
+ URLPath: [],
1999
+ });
2097
2000
  };
2098
2001
  const se_SamplingStatisticsDocument = (input, context) => {
2099
- return {
2100
- ...(input.BorrowCount != null && { BorrowCount: input.BorrowCount }),
2101
- ...(input.ClientID != null && { ClientID: input.ClientID }),
2102
- ...(input.RequestCount != null && { RequestCount: input.RequestCount }),
2103
- ...(input.RuleName != null && { RuleName: input.RuleName }),
2104
- ...(input.SampledCount != null && { SampledCount: input.SampledCount }),
2105
- ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
2106
- };
2002
+ return (0, smithy_client_1.take)(input, {
2003
+ BorrowCount: [],
2004
+ ClientID: [],
2005
+ RequestCount: [],
2006
+ RuleName: [],
2007
+ SampledCount: [],
2008
+ Timestamp: (_) => Math.round(_.getTime() / 1000),
2009
+ });
2107
2010
  };
2108
2011
  const se_SamplingStatisticsDocumentList = (input, context) => {
2109
2012
  return input
@@ -2113,42 +2016,20 @@ const se_SamplingStatisticsDocumentList = (input, context) => {
2113
2016
  });
2114
2017
  };
2115
2018
  const se_SamplingStrategy = (input, context) => {
2116
- return {
2117
- ...(input.Name != null && { Name: input.Name }),
2118
- ...(input.Value != null && { Value: (0, smithy_client_1.serializeFloat)(input.Value) }),
2119
- };
2120
- };
2121
- const se_Tag = (input, context) => {
2122
- return {
2123
- ...(input.Key != null && { Key: input.Key }),
2124
- ...(input.Value != null && { Value: input.Value }),
2125
- };
2126
- };
2127
- const se_TagKeyList = (input, context) => {
2128
- return input
2129
- .filter((e) => e != null)
2130
- .map((entry) => {
2131
- return entry;
2132
- });
2133
- };
2134
- const se_TagList = (input, context) => {
2135
- return input
2136
- .filter((e) => e != null)
2137
- .map((entry) => {
2138
- return se_Tag(entry, context);
2019
+ return (0, smithy_client_1.take)(input, {
2020
+ Name: [],
2021
+ Value: smithy_client_1.serializeFloat,
2139
2022
  });
2140
2023
  };
2141
2024
  const se_TelemetryRecord = (input, context) => {
2142
- return {
2143
- ...(input.BackendConnectionErrors != null && {
2144
- BackendConnectionErrors: se_BackendConnectionErrors(input.BackendConnectionErrors, context),
2145
- }),
2146
- ...(input.SegmentsReceivedCount != null && { SegmentsReceivedCount: input.SegmentsReceivedCount }),
2147
- ...(input.SegmentsRejectedCount != null && { SegmentsRejectedCount: input.SegmentsRejectedCount }),
2148
- ...(input.SegmentsSentCount != null && { SegmentsSentCount: input.SegmentsSentCount }),
2149
- ...(input.SegmentsSpilloverCount != null && { SegmentsSpilloverCount: input.SegmentsSpilloverCount }),
2150
- ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
2151
- };
2025
+ return (0, smithy_client_1.take)(input, {
2026
+ BackendConnectionErrors: smithy_client_1._json,
2027
+ SegmentsReceivedCount: [],
2028
+ SegmentsRejectedCount: [],
2029
+ SegmentsSentCount: [],
2030
+ SegmentsSpilloverCount: [],
2031
+ Timestamp: (_) => Math.round(_.getTime() / 1000),
2032
+ });
2152
2033
  };
2153
2034
  const se_TelemetryRecordList = (input, context) => {
2154
2035
  return input
@@ -2157,49 +2038,6 @@ const se_TelemetryRecordList = (input, context) => {
2157
2038
  return se_TelemetryRecord(entry, context);
2158
2039
  });
2159
2040
  };
2160
- const se_TraceIdList = (input, context) => {
2161
- return input
2162
- .filter((e) => e != null)
2163
- .map((entry) => {
2164
- return entry;
2165
- });
2166
- };
2167
- const se_TraceSegmentDocumentList = (input, context) => {
2168
- return input
2169
- .filter((e) => e != null)
2170
- .map((entry) => {
2171
- return entry;
2172
- });
2173
- };
2174
- const de_Alias = (output, context) => {
2175
- return {
2176
- Name: (0, smithy_client_1.expectString)(output.Name),
2177
- Names: output.Names != null ? de_AliasNames(output.Names, context) : undefined,
2178
- Type: (0, smithy_client_1.expectString)(output.Type),
2179
- };
2180
- };
2181
- const de_AliasList = (output, context) => {
2182
- const retVal = (output || [])
2183
- .filter((e) => e != null)
2184
- .map((entry) => {
2185
- if (entry === null) {
2186
- return null;
2187
- }
2188
- return de_Alias(entry, context);
2189
- });
2190
- return retVal;
2191
- };
2192
- const de_AliasNames = (output, context) => {
2193
- const retVal = (output || [])
2194
- .filter((e) => e != null)
2195
- .map((entry) => {
2196
- if (entry === null) {
2197
- return null;
2198
- }
2199
- return (0, smithy_client_1.expectString)(entry);
2200
- });
2201
- return retVal;
2202
- };
2203
2041
  const de_Annotations = (output, context) => {
2204
2042
  return Object.entries(output).reduce((acc, [key, value]) => {
2205
2043
  if (value === null) {
@@ -2221,453 +2059,140 @@ const de_AnnotationValue = (output, context) => {
2221
2059
  }
2222
2060
  return { $unknown: Object.entries(output)[0] };
2223
2061
  };
2224
- const de_AnomalousService = (output, context) => {
2225
- return {
2226
- ServiceId: output.ServiceId != null ? de_ServiceId(output.ServiceId, context) : undefined,
2227
- };
2228
- };
2229
- const de_AnomalousServiceList = (output, context) => {
2230
- const retVal = (output || [])
2231
- .filter((e) => e != null)
2232
- .map((entry) => {
2233
- if (entry === null) {
2234
- return null;
2235
- }
2236
- return de_AnomalousService(entry, context);
2237
- });
2238
- return retVal;
2239
- };
2240
- const de_AttributeMap = (output, context) => {
2241
- return Object.entries(output).reduce((acc, [key, value]) => {
2242
- if (value === null) {
2243
- return acc;
2244
- }
2245
- acc[key] = (0, smithy_client_1.expectString)(value);
2246
- return acc;
2247
- }, {});
2248
- };
2249
- const de_AvailabilityZoneDetail = (output, context) => {
2250
- return {
2251
- Name: (0, smithy_client_1.expectString)(output.Name),
2252
- };
2253
- };
2254
2062
  const de_Edge = (output, context) => {
2255
- return {
2256
- Aliases: output.Aliases != null ? de_AliasList(output.Aliases, context) : undefined,
2257
- EdgeType: (0, smithy_client_1.expectString)(output.EdgeType),
2258
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2259
- ReceivedEventAgeHistogram: output.ReceivedEventAgeHistogram != null ? de_Histogram(output.ReceivedEventAgeHistogram, context) : undefined,
2260
- ReferenceId: (0, smithy_client_1.expectInt32)(output.ReferenceId),
2261
- ResponseTimeHistogram: output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined,
2262
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2263
- SummaryStatistics: output.SummaryStatistics != null ? de_EdgeStatistics(output.SummaryStatistics, context) : undefined,
2264
- };
2063
+ return (0, smithy_client_1.take)(output, {
2064
+ Aliases: smithy_client_1._json,
2065
+ EdgeType: smithy_client_1.expectString,
2066
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2067
+ ReceivedEventAgeHistogram: (_) => de_Histogram(_, context),
2068
+ ReferenceId: smithy_client_1.expectInt32,
2069
+ ResponseTimeHistogram: (_) => de_Histogram(_, context),
2070
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2071
+ SummaryStatistics: (_) => de_EdgeStatistics(_, context),
2072
+ });
2265
2073
  };
2266
2074
  const de_EdgeList = (output, context) => {
2267
2075
  const retVal = (output || [])
2268
2076
  .filter((e) => e != null)
2269
2077
  .map((entry) => {
2270
- if (entry === null) {
2271
- return null;
2272
- }
2273
2078
  return de_Edge(entry, context);
2274
2079
  });
2275
2080
  return retVal;
2276
2081
  };
2277
2082
  const de_EdgeStatistics = (output, context) => {
2278
- return {
2279
- ErrorStatistics: output.ErrorStatistics != null ? de_ErrorStatistics(output.ErrorStatistics, context) : undefined,
2280
- FaultStatistics: output.FaultStatistics != null ? de_FaultStatistics(output.FaultStatistics, context) : undefined,
2281
- OkCount: (0, smithy_client_1.expectLong)(output.OkCount),
2282
- TotalCount: (0, smithy_client_1.expectLong)(output.TotalCount),
2283
- TotalResponseTime: (0, smithy_client_1.limitedParseDouble)(output.TotalResponseTime),
2284
- };
2285
- };
2286
- const de_EncryptionConfig = (output, context) => {
2287
- return {
2288
- KeyId: (0, smithy_client_1.expectString)(output.KeyId),
2289
- Status: (0, smithy_client_1.expectString)(output.Status),
2290
- Type: (0, smithy_client_1.expectString)(output.Type),
2291
- };
2292
- };
2293
- const de_ErrorRootCause = (output, context) => {
2294
- return {
2295
- ClientImpacting: (0, smithy_client_1.expectBoolean)(output.ClientImpacting),
2296
- Services: output.Services != null ? de_ErrorRootCauseServices(output.Services, context) : undefined,
2297
- };
2298
- };
2299
- const de_ErrorRootCauseEntity = (output, context) => {
2300
- return {
2301
- Exceptions: output.Exceptions != null ? de_RootCauseExceptions(output.Exceptions, context) : undefined,
2302
- Name: (0, smithy_client_1.expectString)(output.Name),
2303
- Remote: (0, smithy_client_1.expectBoolean)(output.Remote),
2304
- };
2305
- };
2306
- const de_ErrorRootCauseEntityPath = (output, context) => {
2307
- const retVal = (output || [])
2308
- .filter((e) => e != null)
2309
- .map((entry) => {
2310
- if (entry === null) {
2311
- return null;
2312
- }
2313
- return de_ErrorRootCauseEntity(entry, context);
2314
- });
2315
- return retVal;
2316
- };
2317
- const de_ErrorRootCauses = (output, context) => {
2318
- const retVal = (output || [])
2319
- .filter((e) => e != null)
2320
- .map((entry) => {
2321
- if (entry === null) {
2322
- return null;
2323
- }
2324
- return de_ErrorRootCause(entry, context);
2083
+ return (0, smithy_client_1.take)(output, {
2084
+ ErrorStatistics: smithy_client_1._json,
2085
+ FaultStatistics: smithy_client_1._json,
2086
+ OkCount: smithy_client_1.expectLong,
2087
+ TotalCount: smithy_client_1.expectLong,
2088
+ TotalResponseTime: smithy_client_1.limitedParseDouble,
2325
2089
  });
2326
- return retVal;
2327
- };
2328
- const de_ErrorRootCauseService = (output, context) => {
2329
- return {
2330
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2331
- EntityPath: output.EntityPath != null ? de_ErrorRootCauseEntityPath(output.EntityPath, context) : undefined,
2332
- Inferred: (0, smithy_client_1.expectBoolean)(output.Inferred),
2333
- Name: (0, smithy_client_1.expectString)(output.Name),
2334
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2335
- Type: (0, smithy_client_1.expectString)(output.Type),
2336
- };
2337
- };
2338
- const de_ErrorRootCauseServices = (output, context) => {
2339
- const retVal = (output || [])
2340
- .filter((e) => e != null)
2341
- .map((entry) => {
2342
- if (entry === null) {
2343
- return null;
2344
- }
2345
- return de_ErrorRootCauseService(entry, context);
2346
- });
2347
- return retVal;
2348
- };
2349
- const de_ErrorStatistics = (output, context) => {
2350
- return {
2351
- OtherCount: (0, smithy_client_1.expectLong)(output.OtherCount),
2352
- ThrottleCount: (0, smithy_client_1.expectLong)(output.ThrottleCount),
2353
- TotalCount: (0, smithy_client_1.expectLong)(output.TotalCount),
2354
- };
2355
- };
2356
- const de_FaultRootCause = (output, context) => {
2357
- return {
2358
- ClientImpacting: (0, smithy_client_1.expectBoolean)(output.ClientImpacting),
2359
- Services: output.Services != null ? de_FaultRootCauseServices(output.Services, context) : undefined,
2360
- };
2361
- };
2362
- const de_FaultRootCauseEntity = (output, context) => {
2363
- return {
2364
- Exceptions: output.Exceptions != null ? de_RootCauseExceptions(output.Exceptions, context) : undefined,
2365
- Name: (0, smithy_client_1.expectString)(output.Name),
2366
- Remote: (0, smithy_client_1.expectBoolean)(output.Remote),
2367
- };
2368
- };
2369
- const de_FaultRootCauseEntityPath = (output, context) => {
2370
- const retVal = (output || [])
2371
- .filter((e) => e != null)
2372
- .map((entry) => {
2373
- if (entry === null) {
2374
- return null;
2375
- }
2376
- return de_FaultRootCauseEntity(entry, context);
2377
- });
2378
- return retVal;
2379
- };
2380
- const de_FaultRootCauses = (output, context) => {
2381
- const retVal = (output || [])
2382
- .filter((e) => e != null)
2383
- .map((entry) => {
2384
- if (entry === null) {
2385
- return null;
2386
- }
2387
- return de_FaultRootCause(entry, context);
2388
- });
2389
- return retVal;
2390
- };
2391
- const de_FaultRootCauseService = (output, context) => {
2392
- return {
2393
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2394
- EntityPath: output.EntityPath != null ? de_FaultRootCauseEntityPath(output.EntityPath, context) : undefined,
2395
- Inferred: (0, smithy_client_1.expectBoolean)(output.Inferred),
2396
- Name: (0, smithy_client_1.expectString)(output.Name),
2397
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2398
- Type: (0, smithy_client_1.expectString)(output.Type),
2399
- };
2400
- };
2401
- const de_FaultRootCauseServices = (output, context) => {
2402
- const retVal = (output || [])
2403
- .filter((e) => e != null)
2404
- .map((entry) => {
2405
- if (entry === null) {
2406
- return null;
2407
- }
2408
- return de_FaultRootCauseService(entry, context);
2409
- });
2410
- return retVal;
2411
- };
2412
- const de_FaultStatistics = (output, context) => {
2413
- return {
2414
- OtherCount: (0, smithy_client_1.expectLong)(output.OtherCount),
2415
- TotalCount: (0, smithy_client_1.expectLong)(output.TotalCount),
2416
- };
2417
- };
2418
- const de_ForecastStatistics = (output, context) => {
2419
- return {
2420
- FaultCountHigh: (0, smithy_client_1.expectLong)(output.FaultCountHigh),
2421
- FaultCountLow: (0, smithy_client_1.expectLong)(output.FaultCountLow),
2422
- };
2423
- };
2424
- const de_Group = (output, context) => {
2425
- return {
2426
- FilterExpression: (0, smithy_client_1.expectString)(output.FilterExpression),
2427
- GroupARN: (0, smithy_client_1.expectString)(output.GroupARN),
2428
- GroupName: (0, smithy_client_1.expectString)(output.GroupName),
2429
- InsightsConfiguration: output.InsightsConfiguration != null
2430
- ? de_InsightsConfiguration(output.InsightsConfiguration, context)
2431
- : undefined,
2432
- };
2433
- };
2434
- const de_GroupSummary = (output, context) => {
2435
- return {
2436
- FilterExpression: (0, smithy_client_1.expectString)(output.FilterExpression),
2437
- GroupARN: (0, smithy_client_1.expectString)(output.GroupARN),
2438
- GroupName: (0, smithy_client_1.expectString)(output.GroupName),
2439
- InsightsConfiguration: output.InsightsConfiguration != null
2440
- ? de_InsightsConfiguration(output.InsightsConfiguration, context)
2441
- : undefined,
2442
- };
2443
- };
2444
- const de_GroupSummaryList = (output, context) => {
2445
- const retVal = (output || [])
2446
- .filter((e) => e != null)
2447
- .map((entry) => {
2448
- if (entry === null) {
2449
- return null;
2450
- }
2451
- return de_GroupSummary(entry, context);
2452
- });
2453
- return retVal;
2454
2090
  };
2455
2091
  const de_Histogram = (output, context) => {
2456
2092
  const retVal = (output || [])
2457
2093
  .filter((e) => e != null)
2458
2094
  .map((entry) => {
2459
- if (entry === null) {
2460
- return null;
2461
- }
2462
2095
  return de_HistogramEntry(entry, context);
2463
2096
  });
2464
2097
  return retVal;
2465
2098
  };
2466
2099
  const de_HistogramEntry = (output, context) => {
2467
- return {
2468
- Count: (0, smithy_client_1.expectInt32)(output.Count),
2469
- Value: (0, smithy_client_1.limitedParseDouble)(output.Value),
2470
- };
2471
- };
2472
- const de_Http = (output, context) => {
2473
- return {
2474
- ClientIp: (0, smithy_client_1.expectString)(output.ClientIp),
2475
- HttpMethod: (0, smithy_client_1.expectString)(output.HttpMethod),
2476
- HttpStatus: (0, smithy_client_1.expectInt32)(output.HttpStatus),
2477
- HttpURL: (0, smithy_client_1.expectString)(output.HttpURL),
2478
- UserAgent: (0, smithy_client_1.expectString)(output.UserAgent),
2479
- };
2100
+ return (0, smithy_client_1.take)(output, {
2101
+ Count: smithy_client_1.expectInt32,
2102
+ Value: smithy_client_1.limitedParseDouble,
2103
+ });
2480
2104
  };
2481
2105
  const de_Insight = (output, context) => {
2482
- return {
2483
- Categories: output.Categories != null ? de_InsightCategoryList(output.Categories, context) : undefined,
2484
- ClientRequestImpactStatistics: output.ClientRequestImpactStatistics != null
2485
- ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context)
2486
- : undefined,
2487
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2488
- GroupARN: (0, smithy_client_1.expectString)(output.GroupARN),
2489
- GroupName: (0, smithy_client_1.expectString)(output.GroupName),
2490
- InsightId: (0, smithy_client_1.expectString)(output.InsightId),
2491
- RootCauseServiceId: output.RootCauseServiceId != null ? de_ServiceId(output.RootCauseServiceId, context) : undefined,
2492
- RootCauseServiceRequestImpactStatistics: output.RootCauseServiceRequestImpactStatistics != null
2493
- ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context)
2494
- : undefined,
2495
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2496
- State: (0, smithy_client_1.expectString)(output.State),
2497
- Summary: (0, smithy_client_1.expectString)(output.Summary),
2498
- TopAnomalousServices: output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined,
2499
- };
2500
- };
2501
- const de_InsightCategoryList = (output, context) => {
2502
- const retVal = (output || [])
2503
- .filter((e) => e != null)
2504
- .map((entry) => {
2505
- if (entry === null) {
2506
- return null;
2507
- }
2508
- return (0, smithy_client_1.expectString)(entry);
2106
+ return (0, smithy_client_1.take)(output, {
2107
+ Categories: smithy_client_1._json,
2108
+ ClientRequestImpactStatistics: smithy_client_1._json,
2109
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2110
+ GroupARN: smithy_client_1.expectString,
2111
+ GroupName: smithy_client_1.expectString,
2112
+ InsightId: smithy_client_1.expectString,
2113
+ RootCauseServiceId: smithy_client_1._json,
2114
+ RootCauseServiceRequestImpactStatistics: smithy_client_1._json,
2115
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2116
+ State: smithy_client_1.expectString,
2117
+ Summary: smithy_client_1.expectString,
2118
+ TopAnomalousServices: smithy_client_1._json,
2509
2119
  });
2510
- return retVal;
2511
2120
  };
2512
2121
  const de_InsightEvent = (output, context) => {
2513
- return {
2514
- ClientRequestImpactStatistics: output.ClientRequestImpactStatistics != null
2515
- ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context)
2516
- : undefined,
2517
- EventTime: output.EventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EventTime))) : undefined,
2518
- RootCauseServiceRequestImpactStatistics: output.RootCauseServiceRequestImpactStatistics != null
2519
- ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context)
2520
- : undefined,
2521
- Summary: (0, smithy_client_1.expectString)(output.Summary),
2522
- TopAnomalousServices: output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined,
2523
- };
2122
+ return (0, smithy_client_1.take)(output, {
2123
+ ClientRequestImpactStatistics: smithy_client_1._json,
2124
+ EventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2125
+ RootCauseServiceRequestImpactStatistics: smithy_client_1._json,
2126
+ Summary: smithy_client_1.expectString,
2127
+ TopAnomalousServices: smithy_client_1._json,
2128
+ });
2524
2129
  };
2525
2130
  const de_InsightEventList = (output, context) => {
2526
2131
  const retVal = (output || [])
2527
2132
  .filter((e) => e != null)
2528
2133
  .map((entry) => {
2529
- if (entry === null) {
2530
- return null;
2531
- }
2532
2134
  return de_InsightEvent(entry, context);
2533
2135
  });
2534
2136
  return retVal;
2535
2137
  };
2536
- const de_InsightImpactGraphEdge = (output, context) => {
2537
- return {
2538
- ReferenceId: (0, smithy_client_1.expectInt32)(output.ReferenceId),
2539
- };
2540
- };
2541
- const de_InsightImpactGraphEdgeList = (output, context) => {
2542
- const retVal = (output || [])
2543
- .filter((e) => e != null)
2544
- .map((entry) => {
2545
- if (entry === null) {
2546
- return null;
2547
- }
2548
- return de_InsightImpactGraphEdge(entry, context);
2549
- });
2550
- return retVal;
2551
- };
2552
- const de_InsightImpactGraphService = (output, context) => {
2553
- return {
2554
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2555
- Edges: output.Edges != null ? de_InsightImpactGraphEdgeList(output.Edges, context) : undefined,
2556
- Name: (0, smithy_client_1.expectString)(output.Name),
2557
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2558
- ReferenceId: (0, smithy_client_1.expectInt32)(output.ReferenceId),
2559
- Type: (0, smithy_client_1.expectString)(output.Type),
2560
- };
2561
- };
2562
- const de_InsightImpactGraphServiceList = (output, context) => {
2563
- const retVal = (output || [])
2564
- .filter((e) => e != null)
2565
- .map((entry) => {
2566
- if (entry === null) {
2567
- return null;
2568
- }
2569
- return de_InsightImpactGraphService(entry, context);
2570
- });
2571
- return retVal;
2572
- };
2573
- const de_InsightsConfiguration = (output, context) => {
2574
- return {
2575
- InsightsEnabled: (0, smithy_client_1.expectBoolean)(output.InsightsEnabled),
2576
- NotificationsEnabled: (0, smithy_client_1.expectBoolean)(output.NotificationsEnabled),
2577
- };
2578
- };
2579
2138
  const de_InsightSummary = (output, context) => {
2580
- return {
2581
- Categories: output.Categories != null ? de_InsightCategoryList(output.Categories, context) : undefined,
2582
- ClientRequestImpactStatistics: output.ClientRequestImpactStatistics != null
2583
- ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context)
2584
- : undefined,
2585
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2586
- GroupARN: (0, smithy_client_1.expectString)(output.GroupARN),
2587
- GroupName: (0, smithy_client_1.expectString)(output.GroupName),
2588
- InsightId: (0, smithy_client_1.expectString)(output.InsightId),
2589
- LastUpdateTime: output.LastUpdateTime != null
2590
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdateTime)))
2591
- : undefined,
2592
- RootCauseServiceId: output.RootCauseServiceId != null ? de_ServiceId(output.RootCauseServiceId, context) : undefined,
2593
- RootCauseServiceRequestImpactStatistics: output.RootCauseServiceRequestImpactStatistics != null
2594
- ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context)
2595
- : undefined,
2596
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2597
- State: (0, smithy_client_1.expectString)(output.State),
2598
- Summary: (0, smithy_client_1.expectString)(output.Summary),
2599
- TopAnomalousServices: output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined,
2600
- };
2139
+ return (0, smithy_client_1.take)(output, {
2140
+ Categories: smithy_client_1._json,
2141
+ ClientRequestImpactStatistics: smithy_client_1._json,
2142
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2143
+ GroupARN: smithy_client_1.expectString,
2144
+ GroupName: smithy_client_1.expectString,
2145
+ InsightId: smithy_client_1.expectString,
2146
+ LastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2147
+ RootCauseServiceId: smithy_client_1._json,
2148
+ RootCauseServiceRequestImpactStatistics: smithy_client_1._json,
2149
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2150
+ State: smithy_client_1.expectString,
2151
+ Summary: smithy_client_1.expectString,
2152
+ TopAnomalousServices: smithy_client_1._json,
2153
+ });
2601
2154
  };
2602
2155
  const de_InsightSummaryList = (output, context) => {
2603
2156
  const retVal = (output || [])
2604
2157
  .filter((e) => e != null)
2605
2158
  .map((entry) => {
2606
- if (entry === null) {
2607
- return null;
2608
- }
2609
2159
  return de_InsightSummary(entry, context);
2610
2160
  });
2611
2161
  return retVal;
2612
2162
  };
2613
- const de_InstanceIdDetail = (output, context) => {
2614
- return {
2615
- Id: (0, smithy_client_1.expectString)(output.Id),
2616
- };
2617
- };
2618
- const de_RequestImpactStatistics = (output, context) => {
2619
- return {
2620
- FaultCount: (0, smithy_client_1.expectLong)(output.FaultCount),
2621
- OkCount: (0, smithy_client_1.expectLong)(output.OkCount),
2622
- TotalCount: (0, smithy_client_1.expectLong)(output.TotalCount),
2623
- };
2624
- };
2625
- const de_ResourceARNDetail = (output, context) => {
2626
- return {
2627
- ARN: (0, smithy_client_1.expectString)(output.ARN),
2628
- };
2629
- };
2630
2163
  const de_ResourcePolicy = (output, context) => {
2631
- return {
2632
- LastUpdatedTime: output.LastUpdatedTime != null
2633
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
2634
- : undefined,
2635
- PolicyDocument: (0, smithy_client_1.expectString)(output.PolicyDocument),
2636
- PolicyName: (0, smithy_client_1.expectString)(output.PolicyName),
2637
- PolicyRevisionId: (0, smithy_client_1.expectString)(output.PolicyRevisionId),
2638
- };
2164
+ return (0, smithy_client_1.take)(output, {
2165
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2166
+ PolicyDocument: smithy_client_1.expectString,
2167
+ PolicyName: smithy_client_1.expectString,
2168
+ PolicyRevisionId: smithy_client_1.expectString,
2169
+ });
2639
2170
  };
2640
2171
  const de_ResourcePolicyList = (output, context) => {
2641
2172
  const retVal = (output || [])
2642
2173
  .filter((e) => e != null)
2643
2174
  .map((entry) => {
2644
- if (entry === null) {
2645
- return null;
2646
- }
2647
2175
  return de_ResourcePolicy(entry, context);
2648
2176
  });
2649
2177
  return retVal;
2650
2178
  };
2651
2179
  const de_ResponseTimeRootCause = (output, context) => {
2652
- return {
2653
- ClientImpacting: (0, smithy_client_1.expectBoolean)(output.ClientImpacting),
2654
- Services: output.Services != null ? de_ResponseTimeRootCauseServices(output.Services, context) : undefined,
2655
- };
2180
+ return (0, smithy_client_1.take)(output, {
2181
+ ClientImpacting: smithy_client_1.expectBoolean,
2182
+ Services: (_) => de_ResponseTimeRootCauseServices(_, context),
2183
+ });
2656
2184
  };
2657
2185
  const de_ResponseTimeRootCauseEntity = (output, context) => {
2658
- return {
2659
- Coverage: (0, smithy_client_1.limitedParseDouble)(output.Coverage),
2660
- Name: (0, smithy_client_1.expectString)(output.Name),
2661
- Remote: (0, smithy_client_1.expectBoolean)(output.Remote),
2662
- };
2186
+ return (0, smithy_client_1.take)(output, {
2187
+ Coverage: smithy_client_1.limitedParseDouble,
2188
+ Name: smithy_client_1.expectString,
2189
+ Remote: smithy_client_1.expectBoolean,
2190
+ });
2663
2191
  };
2664
2192
  const de_ResponseTimeRootCauseEntityPath = (output, context) => {
2665
2193
  const retVal = (output || [])
2666
2194
  .filter((e) => e != null)
2667
2195
  .map((entry) => {
2668
- if (entry === null) {
2669
- return null;
2670
- }
2671
2196
  return de_ResponseTimeRootCauseEntity(entry, context);
2672
2197
  });
2673
2198
  return retVal;
@@ -2676,424 +2201,206 @@ const de_ResponseTimeRootCauses = (output, context) => {
2676
2201
  const retVal = (output || [])
2677
2202
  .filter((e) => e != null)
2678
2203
  .map((entry) => {
2679
- if (entry === null) {
2680
- return null;
2681
- }
2682
2204
  return de_ResponseTimeRootCause(entry, context);
2683
2205
  });
2684
2206
  return retVal;
2685
2207
  };
2686
2208
  const de_ResponseTimeRootCauseService = (output, context) => {
2687
- return {
2688
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2689
- EntityPath: output.EntityPath != null ? de_ResponseTimeRootCauseEntityPath(output.EntityPath, context) : undefined,
2690
- Inferred: (0, smithy_client_1.expectBoolean)(output.Inferred),
2691
- Name: (0, smithy_client_1.expectString)(output.Name),
2692
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2693
- Type: (0, smithy_client_1.expectString)(output.Type),
2694
- };
2209
+ return (0, smithy_client_1.take)(output, {
2210
+ AccountId: smithy_client_1.expectString,
2211
+ EntityPath: (_) => de_ResponseTimeRootCauseEntityPath(_, context),
2212
+ Inferred: smithy_client_1.expectBoolean,
2213
+ Name: smithy_client_1.expectString,
2214
+ Names: smithy_client_1._json,
2215
+ Type: smithy_client_1.expectString,
2216
+ });
2695
2217
  };
2696
2218
  const de_ResponseTimeRootCauseServices = (output, context) => {
2697
2219
  const retVal = (output || [])
2698
2220
  .filter((e) => e != null)
2699
2221
  .map((entry) => {
2700
- if (entry === null) {
2701
- return null;
2702
- }
2703
2222
  return de_ResponseTimeRootCauseService(entry, context);
2704
2223
  });
2705
2224
  return retVal;
2706
2225
  };
2707
- const de_RootCauseException = (output, context) => {
2708
- return {
2709
- Message: (0, smithy_client_1.expectString)(output.Message),
2710
- Name: (0, smithy_client_1.expectString)(output.Name),
2711
- };
2712
- };
2713
- const de_RootCauseExceptions = (output, context) => {
2714
- const retVal = (output || [])
2715
- .filter((e) => e != null)
2716
- .map((entry) => {
2717
- if (entry === null) {
2718
- return null;
2719
- }
2720
- return de_RootCauseException(entry, context);
2721
- });
2722
- return retVal;
2723
- };
2724
2226
  const de_SamplingRule = (output, context) => {
2725
- return {
2726
- Attributes: output.Attributes != null ? de_AttributeMap(output.Attributes, context) : undefined,
2727
- FixedRate: (0, smithy_client_1.limitedParseDouble)(output.FixedRate),
2728
- HTTPMethod: (0, smithy_client_1.expectString)(output.HTTPMethod),
2729
- Host: (0, smithy_client_1.expectString)(output.Host),
2730
- Priority: (0, smithy_client_1.expectInt32)(output.Priority),
2731
- ReservoirSize: (0, smithy_client_1.expectInt32)(output.ReservoirSize),
2732
- ResourceARN: (0, smithy_client_1.expectString)(output.ResourceARN),
2733
- RuleARN: (0, smithy_client_1.expectString)(output.RuleARN),
2734
- RuleName: (0, smithy_client_1.expectString)(output.RuleName),
2735
- ServiceName: (0, smithy_client_1.expectString)(output.ServiceName),
2736
- ServiceType: (0, smithy_client_1.expectString)(output.ServiceType),
2737
- URLPath: (0, smithy_client_1.expectString)(output.URLPath),
2738
- Version: (0, smithy_client_1.expectInt32)(output.Version),
2739
- };
2227
+ return (0, smithy_client_1.take)(output, {
2228
+ Attributes: smithy_client_1._json,
2229
+ FixedRate: smithy_client_1.limitedParseDouble,
2230
+ HTTPMethod: smithy_client_1.expectString,
2231
+ Host: smithy_client_1.expectString,
2232
+ Priority: smithy_client_1.expectInt32,
2233
+ ReservoirSize: smithy_client_1.expectInt32,
2234
+ ResourceARN: smithy_client_1.expectString,
2235
+ RuleARN: smithy_client_1.expectString,
2236
+ RuleName: smithy_client_1.expectString,
2237
+ ServiceName: smithy_client_1.expectString,
2238
+ ServiceType: smithy_client_1.expectString,
2239
+ URLPath: smithy_client_1.expectString,
2240
+ Version: smithy_client_1.expectInt32,
2241
+ });
2740
2242
  };
2741
2243
  const de_SamplingRuleRecord = (output, context) => {
2742
- return {
2743
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
2744
- ModifiedAt: output.ModifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ModifiedAt))) : undefined,
2745
- SamplingRule: output.SamplingRule != null ? de_SamplingRule(output.SamplingRule, context) : undefined,
2746
- };
2244
+ return (0, smithy_client_1.take)(output, {
2245
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2246
+ ModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2247
+ SamplingRule: (_) => de_SamplingRule(_, context),
2248
+ });
2747
2249
  };
2748
2250
  const de_SamplingRuleRecordList = (output, context) => {
2749
2251
  const retVal = (output || [])
2750
2252
  .filter((e) => e != null)
2751
2253
  .map((entry) => {
2752
- if (entry === null) {
2753
- return null;
2754
- }
2755
2254
  return de_SamplingRuleRecord(entry, context);
2756
2255
  });
2757
2256
  return retVal;
2758
2257
  };
2759
2258
  const de_SamplingStatisticSummary = (output, context) => {
2760
- return {
2761
- BorrowCount: (0, smithy_client_1.expectInt32)(output.BorrowCount),
2762
- RequestCount: (0, smithy_client_1.expectInt32)(output.RequestCount),
2763
- RuleName: (0, smithy_client_1.expectString)(output.RuleName),
2764
- SampledCount: (0, smithy_client_1.expectInt32)(output.SampledCount),
2765
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
2766
- };
2259
+ return (0, smithy_client_1.take)(output, {
2260
+ BorrowCount: smithy_client_1.expectInt32,
2261
+ RequestCount: smithy_client_1.expectInt32,
2262
+ RuleName: smithy_client_1.expectString,
2263
+ SampledCount: smithy_client_1.expectInt32,
2264
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2265
+ });
2767
2266
  };
2768
2267
  const de_SamplingStatisticSummaryList = (output, context) => {
2769
2268
  const retVal = (output || [])
2770
2269
  .filter((e) => e != null)
2771
2270
  .map((entry) => {
2772
- if (entry === null) {
2773
- return null;
2774
- }
2775
2271
  return de_SamplingStatisticSummary(entry, context);
2776
2272
  });
2777
2273
  return retVal;
2778
2274
  };
2779
2275
  const de_SamplingTargetDocument = (output, context) => {
2780
- return {
2781
- FixedRate: (0, smithy_client_1.limitedParseDouble)(output.FixedRate),
2782
- Interval: (0, smithy_client_1.expectInt32)(output.Interval),
2783
- ReservoirQuota: (0, smithy_client_1.expectInt32)(output.ReservoirQuota),
2784
- ReservoirQuotaTTL: output.ReservoirQuotaTTL != null
2785
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ReservoirQuotaTTL)))
2786
- : undefined,
2787
- RuleName: (0, smithy_client_1.expectString)(output.RuleName),
2788
- };
2276
+ return (0, smithy_client_1.take)(output, {
2277
+ FixedRate: smithy_client_1.limitedParseDouble,
2278
+ Interval: smithy_client_1.expectInt32,
2279
+ ReservoirQuota: smithy_client_1.expectInt32,
2280
+ ReservoirQuotaTTL: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2281
+ RuleName: smithy_client_1.expectString,
2282
+ });
2789
2283
  };
2790
2284
  const de_SamplingTargetDocumentList = (output, context) => {
2791
2285
  const retVal = (output || [])
2792
2286
  .filter((e) => e != null)
2793
2287
  .map((entry) => {
2794
- if (entry === null) {
2795
- return null;
2796
- }
2797
2288
  return de_SamplingTargetDocument(entry, context);
2798
2289
  });
2799
2290
  return retVal;
2800
2291
  };
2801
- const de_Segment = (output, context) => {
2802
- return {
2803
- Document: (0, smithy_client_1.expectString)(output.Document),
2804
- Id: (0, smithy_client_1.expectString)(output.Id),
2805
- };
2806
- };
2807
- const de_SegmentList = (output, context) => {
2808
- const retVal = (output || [])
2809
- .filter((e) => e != null)
2810
- .map((entry) => {
2811
- if (entry === null) {
2812
- return null;
2813
- }
2814
- return de_Segment(entry, context);
2815
- });
2816
- return retVal;
2817
- };
2818
2292
  const de_Service = (output, context) => {
2819
- return {
2820
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2821
- DurationHistogram: output.DurationHistogram != null ? de_Histogram(output.DurationHistogram, context) : undefined,
2822
- Edges: output.Edges != null ? de_EdgeList(output.Edges, context) : undefined,
2823
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
2824
- Name: (0, smithy_client_1.expectString)(output.Name),
2825
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2826
- ReferenceId: (0, smithy_client_1.expectInt32)(output.ReferenceId),
2827
- ResponseTimeHistogram: output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined,
2828
- Root: (0, smithy_client_1.expectBoolean)(output.Root),
2829
- StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
2830
- State: (0, smithy_client_1.expectString)(output.State),
2831
- SummaryStatistics: output.SummaryStatistics != null ? de_ServiceStatistics(output.SummaryStatistics, context) : undefined,
2832
- Type: (0, smithy_client_1.expectString)(output.Type),
2833
- };
2834
- };
2835
- const de_ServiceId = (output, context) => {
2836
- return {
2837
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
2838
- Name: (0, smithy_client_1.expectString)(output.Name),
2839
- Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined,
2840
- Type: (0, smithy_client_1.expectString)(output.Type),
2841
- };
2842
- };
2843
- const de_ServiceIds = (output, context) => {
2844
- const retVal = (output || [])
2845
- .filter((e) => e != null)
2846
- .map((entry) => {
2847
- if (entry === null) {
2848
- return null;
2849
- }
2850
- return de_ServiceId(entry, context);
2293
+ return (0, smithy_client_1.take)(output, {
2294
+ AccountId: smithy_client_1.expectString,
2295
+ DurationHistogram: (_) => de_Histogram(_, context),
2296
+ Edges: (_) => de_EdgeList(_, context),
2297
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2298
+ Name: smithy_client_1.expectString,
2299
+ Names: smithy_client_1._json,
2300
+ ReferenceId: smithy_client_1.expectInt32,
2301
+ ResponseTimeHistogram: (_) => de_Histogram(_, context),
2302
+ Root: smithy_client_1.expectBoolean,
2303
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2304
+ State: smithy_client_1.expectString,
2305
+ SummaryStatistics: (_) => de_ServiceStatistics(_, context),
2306
+ Type: smithy_client_1.expectString,
2851
2307
  });
2852
- return retVal;
2853
2308
  };
2854
2309
  const de_ServiceList = (output, context) => {
2855
2310
  const retVal = (output || [])
2856
2311
  .filter((e) => e != null)
2857
2312
  .map((entry) => {
2858
- if (entry === null) {
2859
- return null;
2860
- }
2861
2313
  return de_Service(entry, context);
2862
2314
  });
2863
2315
  return retVal;
2864
2316
  };
2865
- const de_ServiceNames = (output, context) => {
2866
- const retVal = (output || [])
2867
- .filter((e) => e != null)
2868
- .map((entry) => {
2869
- if (entry === null) {
2870
- return null;
2871
- }
2872
- return (0, smithy_client_1.expectString)(entry);
2873
- });
2874
- return retVal;
2875
- };
2876
2317
  const de_ServiceStatistics = (output, context) => {
2877
- return {
2878
- ErrorStatistics: output.ErrorStatistics != null ? de_ErrorStatistics(output.ErrorStatistics, context) : undefined,
2879
- FaultStatistics: output.FaultStatistics != null ? de_FaultStatistics(output.FaultStatistics, context) : undefined,
2880
- OkCount: (0, smithy_client_1.expectLong)(output.OkCount),
2881
- TotalCount: (0, smithy_client_1.expectLong)(output.TotalCount),
2882
- TotalResponseTime: (0, smithy_client_1.limitedParseDouble)(output.TotalResponseTime),
2883
- };
2884
- };
2885
- const de_Tag = (output, context) => {
2886
- return {
2887
- Key: (0, smithy_client_1.expectString)(output.Key),
2888
- Value: (0, smithy_client_1.expectString)(output.Value),
2889
- };
2890
- };
2891
- const de_TagList = (output, context) => {
2892
- const retVal = (output || [])
2893
- .filter((e) => e != null)
2894
- .map((entry) => {
2895
- if (entry === null) {
2896
- return null;
2897
- }
2898
- return de_Tag(entry, context);
2318
+ return (0, smithy_client_1.take)(output, {
2319
+ ErrorStatistics: smithy_client_1._json,
2320
+ FaultStatistics: smithy_client_1._json,
2321
+ OkCount: smithy_client_1.expectLong,
2322
+ TotalCount: smithy_client_1.expectLong,
2323
+ TotalResponseTime: smithy_client_1.limitedParseDouble,
2899
2324
  });
2900
- return retVal;
2901
2325
  };
2902
2326
  const de_TimeSeriesServiceStatistics = (output, context) => {
2903
- return {
2904
- EdgeSummaryStatistics: output.EdgeSummaryStatistics != null ? de_EdgeStatistics(output.EdgeSummaryStatistics, context) : undefined,
2905
- ResponseTimeHistogram: output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined,
2906
- ServiceForecastStatistics: output.ServiceForecastStatistics != null
2907
- ? de_ForecastStatistics(output.ServiceForecastStatistics, context)
2908
- : undefined,
2909
- ServiceSummaryStatistics: output.ServiceSummaryStatistics != null
2910
- ? de_ServiceStatistics(output.ServiceSummaryStatistics, context)
2911
- : undefined,
2912
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
2913
- };
2327
+ return (0, smithy_client_1.take)(output, {
2328
+ EdgeSummaryStatistics: (_) => de_EdgeStatistics(_, context),
2329
+ ResponseTimeHistogram: (_) => de_Histogram(_, context),
2330
+ ServiceForecastStatistics: smithy_client_1._json,
2331
+ ServiceSummaryStatistics: (_) => de_ServiceStatistics(_, context),
2332
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2333
+ });
2914
2334
  };
2915
2335
  const de_TimeSeriesServiceStatisticsList = (output, context) => {
2916
2336
  const retVal = (output || [])
2917
2337
  .filter((e) => e != null)
2918
2338
  .map((entry) => {
2919
- if (entry === null) {
2920
- return null;
2921
- }
2922
2339
  return de_TimeSeriesServiceStatistics(entry, context);
2923
2340
  });
2924
2341
  return retVal;
2925
2342
  };
2926
2343
  const de_Trace = (output, context) => {
2927
- return {
2928
- Duration: (0, smithy_client_1.limitedParseDouble)(output.Duration),
2929
- Id: (0, smithy_client_1.expectString)(output.Id),
2930
- LimitExceeded: (0, smithy_client_1.expectBoolean)(output.LimitExceeded),
2931
- Segments: output.Segments != null ? de_SegmentList(output.Segments, context) : undefined,
2932
- };
2933
- };
2934
- const de_TraceAvailabilityZones = (output, context) => {
2935
- const retVal = (output || [])
2936
- .filter((e) => e != null)
2937
- .map((entry) => {
2938
- if (entry === null) {
2939
- return null;
2940
- }
2941
- return de_AvailabilityZoneDetail(entry, context);
2344
+ return (0, smithy_client_1.take)(output, {
2345
+ Duration: smithy_client_1.limitedParseDouble,
2346
+ Id: smithy_client_1.expectString,
2347
+ LimitExceeded: smithy_client_1.expectBoolean,
2348
+ Segments: smithy_client_1._json,
2942
2349
  });
2943
- return retVal;
2944
- };
2945
- const de_TraceInstanceIds = (output, context) => {
2946
- const retVal = (output || [])
2947
- .filter((e) => e != null)
2948
- .map((entry) => {
2949
- if (entry === null) {
2950
- return null;
2951
- }
2952
- return de_InstanceIdDetail(entry, context);
2953
- });
2954
- return retVal;
2955
2350
  };
2956
2351
  const de_TraceList = (output, context) => {
2957
2352
  const retVal = (output || [])
2958
2353
  .filter((e) => e != null)
2959
2354
  .map((entry) => {
2960
- if (entry === null) {
2961
- return null;
2962
- }
2963
2355
  return de_Trace(entry, context);
2964
2356
  });
2965
2357
  return retVal;
2966
2358
  };
2967
- const de_TraceResourceARNs = (output, context) => {
2968
- const retVal = (output || [])
2969
- .filter((e) => e != null)
2970
- .map((entry) => {
2971
- if (entry === null) {
2972
- return null;
2973
- }
2974
- return de_ResourceARNDetail(entry, context);
2975
- });
2976
- return retVal;
2977
- };
2978
2359
  const de_TraceSummary = (output, context) => {
2979
- return {
2980
- Annotations: output.Annotations != null ? de_Annotations(output.Annotations, context) : undefined,
2981
- AvailabilityZones: output.AvailabilityZones != null ? de_TraceAvailabilityZones(output.AvailabilityZones, context) : undefined,
2982
- Duration: (0, smithy_client_1.limitedParseDouble)(output.Duration),
2983
- EntryPoint: output.EntryPoint != null ? de_ServiceId(output.EntryPoint, context) : undefined,
2984
- ErrorRootCauses: output.ErrorRootCauses != null ? de_ErrorRootCauses(output.ErrorRootCauses, context) : undefined,
2985
- FaultRootCauses: output.FaultRootCauses != null ? de_FaultRootCauses(output.FaultRootCauses, context) : undefined,
2986
- HasError: (0, smithy_client_1.expectBoolean)(output.HasError),
2987
- HasFault: (0, smithy_client_1.expectBoolean)(output.HasFault),
2988
- HasThrottle: (0, smithy_client_1.expectBoolean)(output.HasThrottle),
2989
- Http: output.Http != null ? de_Http(output.Http, context) : undefined,
2990
- Id: (0, smithy_client_1.expectString)(output.Id),
2991
- InstanceIds: output.InstanceIds != null ? de_TraceInstanceIds(output.InstanceIds, context) : undefined,
2992
- IsPartial: (0, smithy_client_1.expectBoolean)(output.IsPartial),
2993
- MatchedEventTime: output.MatchedEventTime != null
2994
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.MatchedEventTime)))
2995
- : undefined,
2996
- ResourceARNs: output.ResourceARNs != null ? de_TraceResourceARNs(output.ResourceARNs, context) : undefined,
2997
- ResponseTime: (0, smithy_client_1.limitedParseDouble)(output.ResponseTime),
2998
- ResponseTimeRootCauses: output.ResponseTimeRootCauses != null
2999
- ? de_ResponseTimeRootCauses(output.ResponseTimeRootCauses, context)
3000
- : undefined,
3001
- Revision: (0, smithy_client_1.expectInt32)(output.Revision),
3002
- ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined,
3003
- Users: output.Users != null ? de_TraceUsers(output.Users, context) : undefined,
3004
- };
2360
+ return (0, smithy_client_1.take)(output, {
2361
+ Annotations: (_) => de_Annotations(_, context),
2362
+ AvailabilityZones: smithy_client_1._json,
2363
+ Duration: smithy_client_1.limitedParseDouble,
2364
+ EntryPoint: smithy_client_1._json,
2365
+ ErrorRootCauses: smithy_client_1._json,
2366
+ FaultRootCauses: smithy_client_1._json,
2367
+ HasError: smithy_client_1.expectBoolean,
2368
+ HasFault: smithy_client_1.expectBoolean,
2369
+ HasThrottle: smithy_client_1.expectBoolean,
2370
+ Http: smithy_client_1._json,
2371
+ Id: smithy_client_1.expectString,
2372
+ InstanceIds: smithy_client_1._json,
2373
+ IsPartial: smithy_client_1.expectBoolean,
2374
+ MatchedEventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2375
+ ResourceARNs: smithy_client_1._json,
2376
+ ResponseTime: smithy_client_1.limitedParseDouble,
2377
+ ResponseTimeRootCauses: (_) => de_ResponseTimeRootCauses(_, context),
2378
+ Revision: smithy_client_1.expectInt32,
2379
+ ServiceIds: smithy_client_1._json,
2380
+ Users: smithy_client_1._json,
2381
+ });
3005
2382
  };
3006
2383
  const de_TraceSummaryList = (output, context) => {
3007
2384
  const retVal = (output || [])
3008
2385
  .filter((e) => e != null)
3009
2386
  .map((entry) => {
3010
- if (entry === null) {
3011
- return null;
3012
- }
3013
2387
  return de_TraceSummary(entry, context);
3014
2388
  });
3015
2389
  return retVal;
3016
2390
  };
3017
- const de_TraceUser = (output, context) => {
3018
- return {
3019
- ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined,
3020
- UserName: (0, smithy_client_1.expectString)(output.UserName),
3021
- };
3022
- };
3023
- const de_TraceUsers = (output, context) => {
3024
- const retVal = (output || [])
3025
- .filter((e) => e != null)
3026
- .map((entry) => {
3027
- if (entry === null) {
3028
- return null;
3029
- }
3030
- return de_TraceUser(entry, context);
3031
- });
3032
- return retVal;
3033
- };
3034
- const de_UnprocessedStatistics = (output, context) => {
3035
- return {
3036
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
3037
- Message: (0, smithy_client_1.expectString)(output.Message),
3038
- RuleName: (0, smithy_client_1.expectString)(output.RuleName),
3039
- };
3040
- };
3041
- const de_UnprocessedStatisticsList = (output, context) => {
3042
- const retVal = (output || [])
3043
- .filter((e) => e != null)
3044
- .map((entry) => {
3045
- if (entry === null) {
3046
- return null;
3047
- }
3048
- return de_UnprocessedStatistics(entry, context);
3049
- });
3050
- return retVal;
3051
- };
3052
- const de_UnprocessedTraceIdList = (output, context) => {
3053
- const retVal = (output || [])
3054
- .filter((e) => e != null)
3055
- .map((entry) => {
3056
- if (entry === null) {
3057
- return null;
3058
- }
3059
- return (0, smithy_client_1.expectString)(entry);
3060
- });
3061
- return retVal;
3062
- };
3063
- const de_UnprocessedTraceSegment = (output, context) => {
3064
- return {
3065
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
3066
- Id: (0, smithy_client_1.expectString)(output.Id),
3067
- Message: (0, smithy_client_1.expectString)(output.Message),
3068
- };
3069
- };
3070
- const de_UnprocessedTraceSegmentList = (output, context) => {
3071
- const retVal = (output || [])
3072
- .filter((e) => e != null)
3073
- .map((entry) => {
3074
- if (entry === null) {
3075
- return null;
3076
- }
3077
- return de_UnprocessedTraceSegment(entry, context);
3078
- });
3079
- return retVal;
3080
- };
3081
2391
  const de_ValuesWithServiceIds = (output, context) => {
3082
2392
  const retVal = (output || [])
3083
2393
  .filter((e) => e != null)
3084
2394
  .map((entry) => {
3085
- if (entry === null) {
3086
- return null;
3087
- }
3088
2395
  return de_ValueWithServiceIds(entry, context);
3089
2396
  });
3090
2397
  return retVal;
3091
2398
  };
3092
2399
  const de_ValueWithServiceIds = (output, context) => {
3093
- return {
3094
- AnnotationValue: output.AnnotationValue != null ? de_AnnotationValue((0, smithy_client_1.expectUnion)(output.AnnotationValue), context) : undefined,
3095
- ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined,
3096
- };
2400
+ return (0, smithy_client_1.take)(output, {
2401
+ AnnotationValue: (_) => de_AnnotationValue((0, smithy_client_1.expectUnion)(_), context),
2402
+ ServiceIds: smithy_client_1._json,
2403
+ });
3097
2404
  };
3098
2405
  const deserializeMetadata = (output) => ({
3099
2406
  httpStatusCode: output.statusCode,