@aws-sdk/client-location 3.312.0 → 3.316.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.
@@ -16,9 +16,9 @@ const se_AssociateTrackerConsumerCommand = async (input, context) => {
16
16
  "/tracking/v0/trackers/{TrackerName}/consumers";
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
18
18
  let body;
19
- body = JSON.stringify({
20
- ...(input.ConsumerArn != null && { ConsumerArn: input.ConsumerArn }),
21
- });
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ ConsumerArn: [],
21
+ }));
22
22
  let { hostname: resolvedHostname } = await context.endpoint();
23
23
  if (context.disableHostPrefix !== true) {
24
24
  resolvedHostname = "tracking." + resolvedHostname;
@@ -46,9 +46,9 @@ const se_BatchDeleteDevicePositionHistoryCommand = async (input, context) => {
46
46
  "/tracking/v0/trackers/{TrackerName}/delete-positions";
47
47
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
48
48
  let body;
49
- body = JSON.stringify({
50
- ...(input.DeviceIds != null && { DeviceIds: se_DeviceIdsList(input.DeviceIds, context) }),
51
- });
49
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
50
+ DeviceIds: (_) => (0, smithy_client_1._json)(_),
51
+ }));
52
52
  let { hostname: resolvedHostname } = await context.endpoint();
53
53
  if (context.disableHostPrefix !== true) {
54
54
  resolvedHostname = "tracking." + resolvedHostname;
@@ -76,9 +76,9 @@ const se_BatchDeleteGeofenceCommand = async (input, context) => {
76
76
  "/geofencing/v0/collections/{CollectionName}/delete-geofences";
77
77
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
78
78
  let body;
79
- body = JSON.stringify({
80
- ...(input.GeofenceIds != null && { GeofenceIds: se_IdList(input.GeofenceIds, context) }),
81
- });
79
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
80
+ GeofenceIds: (_) => (0, smithy_client_1._json)(_),
81
+ }));
82
82
  let { hostname: resolvedHostname } = await context.endpoint();
83
83
  if (context.disableHostPrefix !== true) {
84
84
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -106,11 +106,9 @@ const se_BatchEvaluateGeofencesCommand = async (input, context) => {
106
106
  "/geofencing/v0/collections/{CollectionName}/positions";
107
107
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
108
108
  let body;
109
- body = JSON.stringify({
110
- ...(input.DevicePositionUpdates != null && {
111
- DevicePositionUpdates: se_DevicePositionUpdateList(input.DevicePositionUpdates, context),
112
- }),
113
- });
109
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
110
+ DevicePositionUpdates: (_) => se_DevicePositionUpdateList(_, context),
111
+ }));
114
112
  let { hostname: resolvedHostname } = await context.endpoint();
115
113
  if (context.disableHostPrefix !== true) {
116
114
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -138,9 +136,9 @@ const se_BatchGetDevicePositionCommand = async (input, context) => {
138
136
  "/tracking/v0/trackers/{TrackerName}/get-positions";
139
137
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
140
138
  let body;
141
- body = JSON.stringify({
142
- ...(input.DeviceIds != null && { DeviceIds: se_IdList(input.DeviceIds, context) }),
143
- });
139
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
140
+ DeviceIds: (_) => (0, smithy_client_1._json)(_),
141
+ }));
144
142
  let { hostname: resolvedHostname } = await context.endpoint();
145
143
  if (context.disableHostPrefix !== true) {
146
144
  resolvedHostname = "tracking." + resolvedHostname;
@@ -168,9 +166,9 @@ const se_BatchPutGeofenceCommand = async (input, context) => {
168
166
  "/geofencing/v0/collections/{CollectionName}/put-geofences";
169
167
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
170
168
  let body;
171
- body = JSON.stringify({
172
- ...(input.Entries != null && { Entries: se_BatchPutGeofenceRequestEntryList(input.Entries, context) }),
173
- });
169
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
170
+ Entries: (_) => se_BatchPutGeofenceRequestEntryList(_, context),
171
+ }));
174
172
  let { hostname: resolvedHostname } = await context.endpoint();
175
173
  if (context.disableHostPrefix !== true) {
176
174
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -198,9 +196,9 @@ const se_BatchUpdateDevicePositionCommand = async (input, context) => {
198
196
  "/tracking/v0/trackers/{TrackerName}/positions";
199
197
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
200
198
  let body;
201
- body = JSON.stringify({
202
- ...(input.Updates != null && { Updates: se_DevicePositionUpdateList(input.Updates, context) }),
203
- });
199
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
200
+ Updates: (_) => se_DevicePositionUpdateList(_, context),
201
+ }));
204
202
  let { hostname: resolvedHostname } = await context.endpoint();
205
203
  if (context.disableHostPrefix !== true) {
206
204
  resolvedHostname = "tracking." + resolvedHostname;
@@ -228,24 +226,18 @@ const se_CalculateRouteCommand = async (input, context) => {
228
226
  "/routes/v0/calculators/{CalculatorName}/calculate/route";
229
227
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
230
228
  let body;
231
- body = JSON.stringify({
232
- ...(input.CarModeOptions != null && {
233
- CarModeOptions: se_CalculateRouteCarModeOptions(input.CarModeOptions, context),
234
- }),
235
- ...(input.DepartNow != null && { DepartNow: input.DepartNow }),
236
- ...(input.DeparturePosition != null && { DeparturePosition: se_Position(input.DeparturePosition, context) }),
237
- ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" }),
238
- ...(input.DestinationPosition != null && { DestinationPosition: se_Position(input.DestinationPosition, context) }),
239
- ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }),
240
- ...(input.IncludeLegGeometry != null && { IncludeLegGeometry: input.IncludeLegGeometry }),
241
- ...(input.TravelMode != null && { TravelMode: input.TravelMode }),
242
- ...(input.TruckModeOptions != null && {
243
- TruckModeOptions: se_CalculateRouteTruckModeOptions(input.TruckModeOptions, context),
244
- }),
245
- ...(input.WaypointPositions != null && {
246
- WaypointPositions: se_WaypointPositionList(input.WaypointPositions, context),
247
- }),
248
- });
229
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
230
+ CarModeOptions: (_) => (0, smithy_client_1._json)(_),
231
+ DepartNow: [],
232
+ DeparturePosition: (_) => se_Position(_, context),
233
+ DepartureTime: (_) => _.toISOString().split(".")[0] + "Z",
234
+ DestinationPosition: (_) => se_Position(_, context),
235
+ DistanceUnit: [],
236
+ IncludeLegGeometry: [],
237
+ TravelMode: [],
238
+ TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context),
239
+ WaypointPositions: (_) => se_WaypointPositionList(_, context),
240
+ }));
249
241
  let { hostname: resolvedHostname } = await context.endpoint();
250
242
  if (context.disableHostPrefix !== true) {
251
243
  resolvedHostname = "routes." + resolvedHostname;
@@ -273,22 +265,16 @@ const se_CalculateRouteMatrixCommand = async (input, context) => {
273
265
  "/routes/v0/calculators/{CalculatorName}/calculate/route-matrix";
274
266
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
275
267
  let body;
276
- body = JSON.stringify({
277
- ...(input.CarModeOptions != null && {
278
- CarModeOptions: se_CalculateRouteCarModeOptions(input.CarModeOptions, context),
279
- }),
280
- ...(input.DepartNow != null && { DepartNow: input.DepartNow }),
281
- ...(input.DeparturePositions != null && { DeparturePositions: se_PositionList(input.DeparturePositions, context) }),
282
- ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" }),
283
- ...(input.DestinationPositions != null && {
284
- DestinationPositions: se_PositionList(input.DestinationPositions, context),
285
- }),
286
- ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }),
287
- ...(input.TravelMode != null && { TravelMode: input.TravelMode }),
288
- ...(input.TruckModeOptions != null && {
289
- TruckModeOptions: se_CalculateRouteTruckModeOptions(input.TruckModeOptions, context),
290
- }),
291
- });
268
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
269
+ CarModeOptions: (_) => (0, smithy_client_1._json)(_),
270
+ DepartNow: [],
271
+ DeparturePositions: (_) => se_PositionList(_, context),
272
+ DepartureTime: (_) => _.toISOString().split(".")[0] + "Z",
273
+ DestinationPositions: (_) => se_PositionList(_, context),
274
+ DistanceUnit: [],
275
+ TravelMode: [],
276
+ TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context),
277
+ }));
292
278
  let { hostname: resolvedHostname } = await context.endpoint();
293
279
  if (context.disableHostPrefix !== true) {
294
280
  resolvedHostname = "routes." + resolvedHostname;
@@ -314,14 +300,14 @@ const se_CreateGeofenceCollectionCommand = async (input, context) => {
314
300
  };
315
301
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/geofencing/v0/collections";
316
302
  let body;
317
- body = JSON.stringify({
318
- ...(input.CollectionName != null && { CollectionName: input.CollectionName }),
319
- ...(input.Description != null && { Description: input.Description }),
320
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
321
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
322
- ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),
323
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
324
- });
303
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
304
+ CollectionName: [],
305
+ Description: [],
306
+ KmsKeyId: [],
307
+ PricingPlan: [],
308
+ PricingPlanDataSource: [],
309
+ Tags: (_) => (0, smithy_client_1._json)(_),
310
+ }));
325
311
  let { hostname: resolvedHostname } = await context.endpoint();
326
312
  if (context.disableHostPrefix !== true) {
327
313
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -347,14 +333,14 @@ const se_CreateKeyCommand = async (input, context) => {
347
333
  };
348
334
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys";
349
335
  let body;
350
- body = JSON.stringify({
351
- ...(input.Description != null && { Description: input.Description }),
352
- ...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }),
353
- ...(input.KeyName != null && { KeyName: input.KeyName }),
354
- ...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }),
355
- ...(input.Restrictions != null && { Restrictions: se_ApiKeyRestrictions(input.Restrictions, context) }),
356
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
357
- });
336
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
337
+ Description: [],
338
+ ExpireTime: (_) => _.toISOString().split(".")[0] + "Z",
339
+ KeyName: [],
340
+ NoExpiry: [],
341
+ Restrictions: (_) => (0, smithy_client_1._json)(_),
342
+ Tags: (_) => (0, smithy_client_1._json)(_),
343
+ }));
358
344
  let { hostname: resolvedHostname } = await context.endpoint();
359
345
  if (context.disableHostPrefix !== true) {
360
346
  resolvedHostname = "metadata." + resolvedHostname;
@@ -380,13 +366,13 @@ const se_CreateMapCommand = async (input, context) => {
380
366
  };
381
367
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps";
382
368
  let body;
383
- body = JSON.stringify({
384
- ...(input.Configuration != null && { Configuration: se_MapConfiguration(input.Configuration, context) }),
385
- ...(input.Description != null && { Description: input.Description }),
386
- ...(input.MapName != null && { MapName: input.MapName }),
387
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
388
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
389
- });
369
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
370
+ Configuration: (_) => (0, smithy_client_1._json)(_),
371
+ Description: [],
372
+ MapName: [],
373
+ PricingPlan: [],
374
+ Tags: (_) => (0, smithy_client_1._json)(_),
375
+ }));
390
376
  let { hostname: resolvedHostname } = await context.endpoint();
391
377
  if (context.disableHostPrefix !== true) {
392
378
  resolvedHostname = "maps." + resolvedHostname;
@@ -412,16 +398,14 @@ const se_CreatePlaceIndexCommand = async (input, context) => {
412
398
  };
413
399
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/indexes";
414
400
  let body;
415
- body = JSON.stringify({
416
- ...(input.DataSource != null && { DataSource: input.DataSource }),
417
- ...(input.DataSourceConfiguration != null && {
418
- DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context),
419
- }),
420
- ...(input.Description != null && { Description: input.Description }),
421
- ...(input.IndexName != null && { IndexName: input.IndexName }),
422
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
423
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
424
- });
401
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
402
+ DataSource: [],
403
+ DataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
404
+ Description: [],
405
+ IndexName: [],
406
+ PricingPlan: [],
407
+ Tags: (_) => (0, smithy_client_1._json)(_),
408
+ }));
425
409
  let { hostname: resolvedHostname } = await context.endpoint();
426
410
  if (context.disableHostPrefix !== true) {
427
411
  resolvedHostname = "places." + resolvedHostname;
@@ -447,13 +431,13 @@ const se_CreateRouteCalculatorCommand = async (input, context) => {
447
431
  };
448
432
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routes/v0/calculators";
449
433
  let body;
450
- body = JSON.stringify({
451
- ...(input.CalculatorName != null && { CalculatorName: input.CalculatorName }),
452
- ...(input.DataSource != null && { DataSource: input.DataSource }),
453
- ...(input.Description != null && { Description: input.Description }),
454
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
455
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
456
- });
434
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
435
+ CalculatorName: [],
436
+ DataSource: [],
437
+ Description: [],
438
+ PricingPlan: [],
439
+ Tags: (_) => (0, smithy_client_1._json)(_),
440
+ }));
457
441
  let { hostname: resolvedHostname } = await context.endpoint();
458
442
  if (context.disableHostPrefix !== true) {
459
443
  resolvedHostname = "routes." + resolvedHostname;
@@ -479,15 +463,15 @@ const se_CreateTrackerCommand = async (input, context) => {
479
463
  };
480
464
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/trackers";
481
465
  let body;
482
- body = JSON.stringify({
483
- ...(input.Description != null && { Description: input.Description }),
484
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
485
- ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }),
486
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
487
- ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),
488
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
489
- ...(input.TrackerName != null && { TrackerName: input.TrackerName }),
490
- });
466
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
467
+ Description: [],
468
+ KmsKeyId: [],
469
+ PositionFiltering: [],
470
+ PricingPlan: [],
471
+ PricingPlanDataSource: [],
472
+ Tags: (_) => (0, smithy_client_1._json)(_),
473
+ TrackerName: [],
474
+ }));
491
475
  let { hostname: resolvedHostname } = await context.endpoint();
492
476
  if (context.disableHostPrefix !== true) {
493
477
  resolvedHostname = "tracking." + resolvedHostname;
@@ -858,16 +842,12 @@ const se_GetDevicePositionHistoryCommand = async (input, context) => {
858
842
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
859
843
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
860
844
  let body;
861
- body = JSON.stringify({
862
- ...(input.EndTimeExclusive != null && {
863
- EndTimeExclusive: input.EndTimeExclusive.toISOString().split(".")[0] + "Z",
864
- }),
865
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
866
- ...(input.NextToken != null && { NextToken: input.NextToken }),
867
- ...(input.StartTimeInclusive != null && {
868
- StartTimeInclusive: input.StartTimeInclusive.toISOString().split(".")[0] + "Z",
869
- }),
870
- });
845
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
846
+ EndTimeExclusive: (_) => _.toISOString().split(".")[0] + "Z",
847
+ MaxResults: [],
848
+ NextToken: [],
849
+ StartTimeInclusive: (_) => _.toISOString().split(".")[0] + "Z",
850
+ }));
871
851
  let { hostname: resolvedHostname } = await context.endpoint();
872
852
  if (context.disableHostPrefix !== true) {
873
853
  resolvedHostname = "tracking." + resolvedHostname;
@@ -920,7 +900,7 @@ const se_GetMapGlyphsCommand = async (input, context) => {
920
900
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
921
901
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FontStack", () => input.FontStack, "{FontStack}", false);
922
902
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FontUnicodeRange", () => input.FontUnicodeRange, "{FontUnicodeRange}", false);
923
- const query = map({
903
+ const query = (0, smithy_client_1.map)({
924
904
  key: [, input.Key],
925
905
  });
926
906
  let body;
@@ -950,7 +930,7 @@ const se_GetMapSpritesCommand = async (input, context) => {
950
930
  "/maps/v0/maps/{MapName}/sprites/{FileName}";
951
931
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
952
932
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileName", () => input.FileName, "{FileName}", false);
953
- const query = map({
933
+ const query = (0, smithy_client_1.map)({
954
934
  key: [, input.Key],
955
935
  });
956
936
  let body;
@@ -978,7 +958,7 @@ const se_GetMapStyleDescriptorCommand = async (input, context) => {
978
958
  const headers = {};
979
959
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps/{MapName}/style-descriptor";
980
960
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
981
- const query = map({
961
+ const query = (0, smithy_client_1.map)({
982
962
  key: [, input.Key],
983
963
  });
984
964
  let body;
@@ -1009,7 +989,7 @@ const se_GetMapTileCommand = async (input, context) => {
1009
989
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Z", () => input.Z, "{Z}", false);
1010
990
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "X", () => input.X, "{X}", false);
1011
991
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Y", () => input.Y, "{Y}", false);
1012
- const query = map({
992
+ const query = (0, smithy_client_1.map)({
1013
993
  key: [, input.Key],
1014
994
  });
1015
995
  let body;
@@ -1039,7 +1019,7 @@ const se_GetPlaceCommand = async (input, context) => {
1039
1019
  "/places/v0/indexes/{IndexName}/places/{PlaceId}";
1040
1020
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
1041
1021
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PlaceId", () => input.PlaceId, "{PlaceId}", false);
1042
- const query = map({
1022
+ const query = (0, smithy_client_1.map)({
1043
1023
  language: [, input.Language],
1044
1024
  });
1045
1025
  let body;
@@ -1071,10 +1051,10 @@ const se_ListDevicePositionsCommand = async (input, context) => {
1071
1051
  "/tracking/v0/trackers/{TrackerName}/list-positions";
1072
1052
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
1073
1053
  let body;
1074
- body = JSON.stringify({
1075
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1076
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1077
- });
1054
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1055
+ MaxResults: [],
1056
+ NextToken: [],
1057
+ }));
1078
1058
  let { hostname: resolvedHostname } = await context.endpoint();
1079
1059
  if (context.disableHostPrefix !== true) {
1080
1060
  resolvedHostname = "tracking." + resolvedHostname;
@@ -1100,10 +1080,10 @@ const se_ListGeofenceCollectionsCommand = async (input, context) => {
1100
1080
  };
1101
1081
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/geofencing/v0/list-collections";
1102
1082
  let body;
1103
- body = JSON.stringify({
1104
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1105
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1106
- });
1083
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1084
+ MaxResults: [],
1085
+ NextToken: [],
1086
+ }));
1107
1087
  let { hostname: resolvedHostname } = await context.endpoint();
1108
1088
  if (context.disableHostPrefix !== true) {
1109
1089
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -1131,10 +1111,10 @@ const se_ListGeofencesCommand = async (input, context) => {
1131
1111
  "/geofencing/v0/collections/{CollectionName}/list-geofences";
1132
1112
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
1133
1113
  let body;
1134
- body = JSON.stringify({
1135
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1136
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1137
- });
1114
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1115
+ MaxResults: [],
1116
+ NextToken: [],
1117
+ }));
1138
1118
  let { hostname: resolvedHostname } = await context.endpoint();
1139
1119
  if (context.disableHostPrefix !== true) {
1140
1120
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -1160,11 +1140,11 @@ const se_ListKeysCommand = async (input, context) => {
1160
1140
  };
1161
1141
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/list-keys";
1162
1142
  let body;
1163
- body = JSON.stringify({
1164
- ...(input.Filter != null && { Filter: se_ApiKeyFilter(input.Filter, context) }),
1165
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1166
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1167
- });
1143
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1144
+ Filter: (_) => (0, smithy_client_1._json)(_),
1145
+ MaxResults: [],
1146
+ NextToken: [],
1147
+ }));
1168
1148
  let { hostname: resolvedHostname } = await context.endpoint();
1169
1149
  if (context.disableHostPrefix !== true) {
1170
1150
  resolvedHostname = "metadata." + resolvedHostname;
@@ -1190,10 +1170,10 @@ const se_ListMapsCommand = async (input, context) => {
1190
1170
  };
1191
1171
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/list-maps";
1192
1172
  let body;
1193
- body = JSON.stringify({
1194
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1195
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1196
- });
1173
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1174
+ MaxResults: [],
1175
+ NextToken: [],
1176
+ }));
1197
1177
  let { hostname: resolvedHostname } = await context.endpoint();
1198
1178
  if (context.disableHostPrefix !== true) {
1199
1179
  resolvedHostname = "maps." + resolvedHostname;
@@ -1219,10 +1199,10 @@ const se_ListPlaceIndexesCommand = async (input, context) => {
1219
1199
  };
1220
1200
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/list-indexes";
1221
1201
  let body;
1222
- body = JSON.stringify({
1223
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1224
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1225
- });
1202
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1203
+ MaxResults: [],
1204
+ NextToken: [],
1205
+ }));
1226
1206
  let { hostname: resolvedHostname } = await context.endpoint();
1227
1207
  if (context.disableHostPrefix !== true) {
1228
1208
  resolvedHostname = "places." + resolvedHostname;
@@ -1248,10 +1228,10 @@ const se_ListRouteCalculatorsCommand = async (input, context) => {
1248
1228
  };
1249
1229
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routes/v0/list-calculators";
1250
1230
  let body;
1251
- body = JSON.stringify({
1252
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1253
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1254
- });
1231
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1232
+ MaxResults: [],
1233
+ NextToken: [],
1234
+ }));
1255
1235
  let { hostname: resolvedHostname } = await context.endpoint();
1256
1236
  if (context.disableHostPrefix !== true) {
1257
1237
  resolvedHostname = "routes." + resolvedHostname;
@@ -1303,10 +1283,10 @@ const se_ListTrackerConsumersCommand = async (input, context) => {
1303
1283
  "/tracking/v0/trackers/{TrackerName}/list-consumers";
1304
1284
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
1305
1285
  let body;
1306
- body = JSON.stringify({
1307
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1308
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1309
- });
1286
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1287
+ MaxResults: [],
1288
+ NextToken: [],
1289
+ }));
1310
1290
  let { hostname: resolvedHostname } = await context.endpoint();
1311
1291
  if (context.disableHostPrefix !== true) {
1312
1292
  resolvedHostname = "tracking." + resolvedHostname;
@@ -1332,10 +1312,10 @@ const se_ListTrackersCommand = async (input, context) => {
1332
1312
  };
1333
1313
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/list-trackers";
1334
1314
  let body;
1335
- body = JSON.stringify({
1336
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1337
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1338
- });
1315
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1316
+ MaxResults: [],
1317
+ NextToken: [],
1318
+ }));
1339
1319
  let { hostname: resolvedHostname } = await context.endpoint();
1340
1320
  if (context.disableHostPrefix !== true) {
1341
1321
  resolvedHostname = "tracking." + resolvedHostname;
@@ -1364,9 +1344,9 @@ const se_PutGeofenceCommand = async (input, context) => {
1364
1344
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
1365
1345
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GeofenceId", () => input.GeofenceId, "{GeofenceId}", false);
1366
1346
  let body;
1367
- body = JSON.stringify({
1368
- ...(input.Geometry != null && { Geometry: se_GeofenceGeometry(input.Geometry, context) }),
1369
- });
1347
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1348
+ Geometry: (_) => se_GeofenceGeometry(_, context),
1349
+ }));
1370
1350
  let { hostname: resolvedHostname } = await context.endpoint();
1371
1351
  if (context.disableHostPrefix !== true) {
1372
1352
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -1394,11 +1374,11 @@ const se_SearchPlaceIndexForPositionCommand = async (input, context) => {
1394
1374
  "/places/v0/indexes/{IndexName}/search/position";
1395
1375
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
1396
1376
  let body;
1397
- body = JSON.stringify({
1398
- ...(input.Language != null && { Language: input.Language }),
1399
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1400
- ...(input.Position != null && { Position: se_Position(input.Position, context) }),
1401
- });
1377
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1378
+ Language: [],
1379
+ MaxResults: [],
1380
+ Position: (_) => se_Position(_, context),
1381
+ }));
1402
1382
  let { hostname: resolvedHostname } = await context.endpoint();
1403
1383
  if (context.disableHostPrefix !== true) {
1404
1384
  resolvedHostname = "places." + resolvedHostname;
@@ -1426,14 +1406,14 @@ const se_SearchPlaceIndexForSuggestionsCommand = async (input, context) => {
1426
1406
  "/places/v0/indexes/{IndexName}/search/suggestions";
1427
1407
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
1428
1408
  let body;
1429
- body = JSON.stringify({
1430
- ...(input.BiasPosition != null && { BiasPosition: se_Position(input.BiasPosition, context) }),
1431
- ...(input.FilterBBox != null && { FilterBBox: se_BoundingBox(input.FilterBBox, context) }),
1432
- ...(input.FilterCountries != null && { FilterCountries: se_CountryCodeList(input.FilterCountries, context) }),
1433
- ...(input.Language != null && { Language: input.Language }),
1434
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1435
- ...(input.Text != null && { Text: input.Text }),
1436
- });
1409
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1410
+ BiasPosition: (_) => se_Position(_, context),
1411
+ FilterBBox: (_) => se_BoundingBox(_, context),
1412
+ FilterCountries: (_) => (0, smithy_client_1._json)(_),
1413
+ Language: [],
1414
+ MaxResults: [],
1415
+ Text: [],
1416
+ }));
1437
1417
  let { hostname: resolvedHostname } = await context.endpoint();
1438
1418
  if (context.disableHostPrefix !== true) {
1439
1419
  resolvedHostname = "places." + resolvedHostname;
@@ -1461,14 +1441,14 @@ const se_SearchPlaceIndexForTextCommand = async (input, context) => {
1461
1441
  "/places/v0/indexes/{IndexName}/search/text";
1462
1442
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
1463
1443
  let body;
1464
- body = JSON.stringify({
1465
- ...(input.BiasPosition != null && { BiasPosition: se_Position(input.BiasPosition, context) }),
1466
- ...(input.FilterBBox != null && { FilterBBox: se_BoundingBox(input.FilterBBox, context) }),
1467
- ...(input.FilterCountries != null && { FilterCountries: se_CountryCodeList(input.FilterCountries, context) }),
1468
- ...(input.Language != null && { Language: input.Language }),
1469
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1470
- ...(input.Text != null && { Text: input.Text }),
1471
- });
1444
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1445
+ BiasPosition: (_) => se_Position(_, context),
1446
+ FilterBBox: (_) => se_BoundingBox(_, context),
1447
+ FilterCountries: (_) => (0, smithy_client_1._json)(_),
1448
+ Language: [],
1449
+ MaxResults: [],
1450
+ Text: [],
1451
+ }));
1472
1452
  let { hostname: resolvedHostname } = await context.endpoint();
1473
1453
  if (context.disableHostPrefix !== true) {
1474
1454
  resolvedHostname = "places." + resolvedHostname;
@@ -1495,9 +1475,9 @@ const se_TagResourceCommand = async (input, context) => {
1495
1475
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
1496
1476
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1497
1477
  let body;
1498
- body = JSON.stringify({
1499
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
1500
- });
1478
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1479
+ Tags: (_) => (0, smithy_client_1._json)(_),
1480
+ }));
1501
1481
  let { hostname: resolvedHostname } = await context.endpoint();
1502
1482
  if (context.disableHostPrefix !== true) {
1503
1483
  resolvedHostname = "metadata." + resolvedHostname;
@@ -1521,7 +1501,7 @@ const se_UntagResourceCommand = async (input, context) => {
1521
1501
  const headers = {};
1522
1502
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
1523
1503
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1524
- const query = map({
1504
+ const query = (0, smithy_client_1.map)({
1525
1505
  tagKeys: [
1526
1506
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
1527
1507
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -1556,11 +1536,11 @@ const se_UpdateGeofenceCollectionCommand = async (input, context) => {
1556
1536
  "/geofencing/v0/collections/{CollectionName}";
1557
1537
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CollectionName", () => input.CollectionName, "{CollectionName}", false);
1558
1538
  let body;
1559
- body = JSON.stringify({
1560
- ...(input.Description != null && { Description: input.Description }),
1561
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
1562
- ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),
1563
- });
1539
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1540
+ Description: [],
1541
+ PricingPlan: [],
1542
+ PricingPlanDataSource: [],
1543
+ }));
1564
1544
  let { hostname: resolvedHostname } = await context.endpoint();
1565
1545
  if (context.disableHostPrefix !== true) {
1566
1546
  resolvedHostname = "geofencing." + resolvedHostname;
@@ -1587,13 +1567,13 @@ const se_UpdateKeyCommand = async (input, context) => {
1587
1567
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys/{KeyName}";
1588
1568
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyName", () => input.KeyName, "{KeyName}", false);
1589
1569
  let body;
1590
- body = JSON.stringify({
1591
- ...(input.Description != null && { Description: input.Description }),
1592
- ...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }),
1593
- ...(input.ForceUpdate != null && { ForceUpdate: input.ForceUpdate }),
1594
- ...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }),
1595
- ...(input.Restrictions != null && { Restrictions: se_ApiKeyRestrictions(input.Restrictions, context) }),
1596
- });
1570
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1571
+ Description: [],
1572
+ ExpireTime: (_) => _.toISOString().split(".")[0] + "Z",
1573
+ ForceUpdate: [],
1574
+ NoExpiry: [],
1575
+ Restrictions: (_) => (0, smithy_client_1._json)(_),
1576
+ }));
1597
1577
  let { hostname: resolvedHostname } = await context.endpoint();
1598
1578
  if (context.disableHostPrefix !== true) {
1599
1579
  resolvedHostname = "metadata." + resolvedHostname;
@@ -1620,10 +1600,10 @@ const se_UpdateMapCommand = async (input, context) => {
1620
1600
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps/{MapName}";
1621
1601
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
1622
1602
  let body;
1623
- body = JSON.stringify({
1624
- ...(input.Description != null && { Description: input.Description }),
1625
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
1626
- });
1603
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1604
+ Description: [],
1605
+ PricingPlan: [],
1606
+ }));
1627
1607
  let { hostname: resolvedHostname } = await context.endpoint();
1628
1608
  if (context.disableHostPrefix !== true) {
1629
1609
  resolvedHostname = "maps." + resolvedHostname;
@@ -1650,13 +1630,11 @@ const se_UpdatePlaceIndexCommand = async (input, context) => {
1650
1630
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/indexes/{IndexName}";
1651
1631
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
1652
1632
  let body;
1653
- body = JSON.stringify({
1654
- ...(input.DataSourceConfiguration != null && {
1655
- DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context),
1656
- }),
1657
- ...(input.Description != null && { Description: input.Description }),
1658
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
1659
- });
1633
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1634
+ DataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
1635
+ Description: [],
1636
+ PricingPlan: [],
1637
+ }));
1660
1638
  let { hostname: resolvedHostname } = await context.endpoint();
1661
1639
  if (context.disableHostPrefix !== true) {
1662
1640
  resolvedHostname = "places." + resolvedHostname;
@@ -1683,10 +1661,10 @@ const se_UpdateRouteCalculatorCommand = async (input, context) => {
1683
1661
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routes/v0/calculators/{CalculatorName}";
1684
1662
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
1685
1663
  let body;
1686
- body = JSON.stringify({
1687
- ...(input.Description != null && { Description: input.Description }),
1688
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
1689
- });
1664
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1665
+ Description: [],
1666
+ PricingPlan: [],
1667
+ }));
1690
1668
  let { hostname: resolvedHostname } = await context.endpoint();
1691
1669
  if (context.disableHostPrefix !== true) {
1692
1670
  resolvedHostname = "routes." + resolvedHostname;
@@ -1713,12 +1691,12 @@ const se_UpdateTrackerCommand = async (input, context) => {
1713
1691
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/trackers/{TrackerName}";
1714
1692
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TrackerName", () => input.TrackerName, "{TrackerName}", false);
1715
1693
  let body;
1716
- body = JSON.stringify({
1717
- ...(input.Description != null && { Description: input.Description }),
1718
- ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }),
1719
- ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
1720
- ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }),
1721
- });
1694
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1695
+ Description: [],
1696
+ PositionFiltering: [],
1697
+ PricingPlan: [],
1698
+ PricingPlanDataSource: [],
1699
+ }));
1722
1700
  let { hostname: resolvedHostname } = await context.endpoint();
1723
1701
  if (context.disableHostPrefix !== true) {
1724
1702
  resolvedHostname = "tracking." + resolvedHostname;
@@ -1741,7 +1719,7 @@ const de_AssociateTrackerConsumerCommand = async (output, context) => {
1741
1719
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1742
1720
  return de_AssociateTrackerConsumerCommandError(output, context);
1743
1721
  }
1744
- const contents = map({
1722
+ const contents = (0, smithy_client_1.map)({
1745
1723
  $metadata: deserializeMetadata(output),
1746
1724
  });
1747
1725
  await collectBody(output.body, context);
@@ -1778,10 +1756,9 @@ const de_AssociateTrackerConsumerCommandError = async (output, context) => {
1778
1756
  throw await de_ValidationExceptionRes(parsedOutput, context);
1779
1757
  default:
1780
1758
  const parsedBody = parsedOutput.body;
1781
- (0, smithy_client_1.throwDefaultError)({
1759
+ return throwDefaultError({
1782
1760
  output,
1783
1761
  parsedBody,
1784
- exceptionCtor: LocationServiceException_1.LocationServiceException,
1785
1762
  errorCode,
1786
1763
  });
1787
1764
  }
@@ -1790,13 +1767,14 @@ const de_BatchDeleteDevicePositionHistoryCommand = async (output, context) => {
1790
1767
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1791
1768
  return de_BatchDeleteDevicePositionHistoryCommandError(output, context);
1792
1769
  }
1793
- const contents = map({
1770
+ const contents = (0, smithy_client_1.map)({
1794
1771
  $metadata: deserializeMetadata(output),
1795
1772
  });
1796
1773
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1797
- if (data.Errors != null) {
1798
- contents.Errors = de_BatchDeleteDevicePositionHistoryErrorList(data.Errors, context);
1799
- }
1774
+ const doc = (0, smithy_client_1.take)(data, {
1775
+ Errors: smithy_client_1._json,
1776
+ });
1777
+ Object.assign(contents, doc);
1800
1778
  return contents;
1801
1779
  };
1802
1780
  exports.de_BatchDeleteDevicePositionHistoryCommand = de_BatchDeleteDevicePositionHistoryCommand;
@@ -1824,10 +1802,9 @@ const de_BatchDeleteDevicePositionHistoryCommandError = async (output, context)
1824
1802
  throw await de_ValidationExceptionRes(parsedOutput, context);
1825
1803
  default:
1826
1804
  const parsedBody = parsedOutput.body;
1827
- (0, smithy_client_1.throwDefaultError)({
1805
+ return throwDefaultError({
1828
1806
  output,
1829
1807
  parsedBody,
1830
- exceptionCtor: LocationServiceException_1.LocationServiceException,
1831
1808
  errorCode,
1832
1809
  });
1833
1810
  }
@@ -1836,13 +1813,14 @@ const de_BatchDeleteGeofenceCommand = async (output, context) => {
1836
1813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1837
1814
  return de_BatchDeleteGeofenceCommandError(output, context);
1838
1815
  }
1839
- const contents = map({
1816
+ const contents = (0, smithy_client_1.map)({
1840
1817
  $metadata: deserializeMetadata(output),
1841
1818
  });
1842
1819
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1843
- if (data.Errors != null) {
1844
- contents.Errors = de_BatchDeleteGeofenceErrorList(data.Errors, context);
1845
- }
1820
+ const doc = (0, smithy_client_1.take)(data, {
1821
+ Errors: smithy_client_1._json,
1822
+ });
1823
+ Object.assign(contents, doc);
1846
1824
  return contents;
1847
1825
  };
1848
1826
  exports.de_BatchDeleteGeofenceCommand = de_BatchDeleteGeofenceCommand;
@@ -1870,10 +1848,9 @@ const de_BatchDeleteGeofenceCommandError = async (output, context) => {
1870
1848
  throw await de_ValidationExceptionRes(parsedOutput, context);
1871
1849
  default:
1872
1850
  const parsedBody = parsedOutput.body;
1873
- (0, smithy_client_1.throwDefaultError)({
1851
+ return throwDefaultError({
1874
1852
  output,
1875
1853
  parsedBody,
1876
- exceptionCtor: LocationServiceException_1.LocationServiceException,
1877
1854
  errorCode,
1878
1855
  });
1879
1856
  }
@@ -1882,13 +1859,14 @@ const de_BatchEvaluateGeofencesCommand = async (output, context) => {
1882
1859
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1883
1860
  return de_BatchEvaluateGeofencesCommandError(output, context);
1884
1861
  }
1885
- const contents = map({
1862
+ const contents = (0, smithy_client_1.map)({
1886
1863
  $metadata: deserializeMetadata(output),
1887
1864
  });
1888
1865
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1889
- if (data.Errors != null) {
1890
- contents.Errors = de_BatchEvaluateGeofencesErrorList(data.Errors, context);
1891
- }
1866
+ const doc = (0, smithy_client_1.take)(data, {
1867
+ Errors: (_) => de_BatchEvaluateGeofencesErrorList(_, context),
1868
+ });
1869
+ Object.assign(contents, doc);
1892
1870
  return contents;
1893
1871
  };
1894
1872
  exports.de_BatchEvaluateGeofencesCommand = de_BatchEvaluateGeofencesCommand;
@@ -1916,10 +1894,9 @@ const de_BatchEvaluateGeofencesCommandError = async (output, context) => {
1916
1894
  throw await de_ValidationExceptionRes(parsedOutput, context);
1917
1895
  default:
1918
1896
  const parsedBody = parsedOutput.body;
1919
- (0, smithy_client_1.throwDefaultError)({
1897
+ return throwDefaultError({
1920
1898
  output,
1921
1899
  parsedBody,
1922
- exceptionCtor: LocationServiceException_1.LocationServiceException,
1923
1900
  errorCode,
1924
1901
  });
1925
1902
  }
@@ -1928,16 +1905,15 @@ const de_BatchGetDevicePositionCommand = async (output, context) => {
1928
1905
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1929
1906
  return de_BatchGetDevicePositionCommandError(output, context);
1930
1907
  }
1931
- const contents = map({
1908
+ const contents = (0, smithy_client_1.map)({
1932
1909
  $metadata: deserializeMetadata(output),
1933
1910
  });
1934
1911
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1935
- if (data.DevicePositions != null) {
1936
- contents.DevicePositions = de_DevicePositionList(data.DevicePositions, context);
1937
- }
1938
- if (data.Errors != null) {
1939
- contents.Errors = de_BatchGetDevicePositionErrorList(data.Errors, context);
1940
- }
1912
+ const doc = (0, smithy_client_1.take)(data, {
1913
+ DevicePositions: (_) => de_DevicePositionList(_, context),
1914
+ Errors: smithy_client_1._json,
1915
+ });
1916
+ Object.assign(contents, doc);
1941
1917
  return contents;
1942
1918
  };
1943
1919
  exports.de_BatchGetDevicePositionCommand = de_BatchGetDevicePositionCommand;
@@ -1965,10 +1941,9 @@ const de_BatchGetDevicePositionCommandError = async (output, context) => {
1965
1941
  throw await de_ValidationExceptionRes(parsedOutput, context);
1966
1942
  default:
1967
1943
  const parsedBody = parsedOutput.body;
1968
- (0, smithy_client_1.throwDefaultError)({
1944
+ return throwDefaultError({
1969
1945
  output,
1970
1946
  parsedBody,
1971
- exceptionCtor: LocationServiceException_1.LocationServiceException,
1972
1947
  errorCode,
1973
1948
  });
1974
1949
  }
@@ -1977,16 +1952,15 @@ const de_BatchPutGeofenceCommand = async (output, context) => {
1977
1952
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1978
1953
  return de_BatchPutGeofenceCommandError(output, context);
1979
1954
  }
1980
- const contents = map({
1955
+ const contents = (0, smithy_client_1.map)({
1981
1956
  $metadata: deserializeMetadata(output),
1982
1957
  });
1983
1958
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1984
- if (data.Errors != null) {
1985
- contents.Errors = de_BatchPutGeofenceErrorList(data.Errors, context);
1986
- }
1987
- if (data.Successes != null) {
1988
- contents.Successes = de_BatchPutGeofenceSuccessList(data.Successes, context);
1989
- }
1959
+ const doc = (0, smithy_client_1.take)(data, {
1960
+ Errors: smithy_client_1._json,
1961
+ Successes: (_) => de_BatchPutGeofenceSuccessList(_, context),
1962
+ });
1963
+ Object.assign(contents, doc);
1990
1964
  return contents;
1991
1965
  };
1992
1966
  exports.de_BatchPutGeofenceCommand = de_BatchPutGeofenceCommand;
@@ -2014,10 +1988,9 @@ const de_BatchPutGeofenceCommandError = async (output, context) => {
2014
1988
  throw await de_ValidationExceptionRes(parsedOutput, context);
2015
1989
  default:
2016
1990
  const parsedBody = parsedOutput.body;
2017
- (0, smithy_client_1.throwDefaultError)({
1991
+ return throwDefaultError({
2018
1992
  output,
2019
1993
  parsedBody,
2020
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2021
1994
  errorCode,
2022
1995
  });
2023
1996
  }
@@ -2026,13 +1999,14 @@ const de_BatchUpdateDevicePositionCommand = async (output, context) => {
2026
1999
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2027
2000
  return de_BatchUpdateDevicePositionCommandError(output, context);
2028
2001
  }
2029
- const contents = map({
2002
+ const contents = (0, smithy_client_1.map)({
2030
2003
  $metadata: deserializeMetadata(output),
2031
2004
  });
2032
2005
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2033
- if (data.Errors != null) {
2034
- contents.Errors = de_BatchUpdateDevicePositionErrorList(data.Errors, context);
2035
- }
2006
+ const doc = (0, smithy_client_1.take)(data, {
2007
+ Errors: (_) => de_BatchUpdateDevicePositionErrorList(_, context),
2008
+ });
2009
+ Object.assign(contents, doc);
2036
2010
  return contents;
2037
2011
  };
2038
2012
  exports.de_BatchUpdateDevicePositionCommand = de_BatchUpdateDevicePositionCommand;
@@ -2060,10 +2034,9 @@ const de_BatchUpdateDevicePositionCommandError = async (output, context) => {
2060
2034
  throw await de_ValidationExceptionRes(parsedOutput, context);
2061
2035
  default:
2062
2036
  const parsedBody = parsedOutput.body;
2063
- (0, smithy_client_1.throwDefaultError)({
2037
+ return throwDefaultError({
2064
2038
  output,
2065
2039
  parsedBody,
2066
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2067
2040
  errorCode,
2068
2041
  });
2069
2042
  }
@@ -2072,16 +2045,15 @@ const de_CalculateRouteCommand = async (output, context) => {
2072
2045
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2073
2046
  return de_CalculateRouteCommandError(output, context);
2074
2047
  }
2075
- const contents = map({
2048
+ const contents = (0, smithy_client_1.map)({
2076
2049
  $metadata: deserializeMetadata(output),
2077
2050
  });
2078
2051
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2079
- if (data.Legs != null) {
2080
- contents.Legs = de_LegList(data.Legs, context);
2081
- }
2082
- if (data.Summary != null) {
2083
- contents.Summary = de_CalculateRouteSummary(data.Summary, context);
2084
- }
2052
+ const doc = (0, smithy_client_1.take)(data, {
2053
+ Legs: (_) => de_LegList(_, context),
2054
+ Summary: (_) => de_CalculateRouteSummary(_, context),
2055
+ });
2056
+ Object.assign(contents, doc);
2085
2057
  return contents;
2086
2058
  };
2087
2059
  exports.de_CalculateRouteCommand = de_CalculateRouteCommand;
@@ -2109,10 +2081,9 @@ const de_CalculateRouteCommandError = async (output, context) => {
2109
2081
  throw await de_ValidationExceptionRes(parsedOutput, context);
2110
2082
  default:
2111
2083
  const parsedBody = parsedOutput.body;
2112
- (0, smithy_client_1.throwDefaultError)({
2084
+ return throwDefaultError({
2113
2085
  output,
2114
2086
  parsedBody,
2115
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2116
2087
  errorCode,
2117
2088
  });
2118
2089
  }
@@ -2121,22 +2092,17 @@ const de_CalculateRouteMatrixCommand = async (output, context) => {
2121
2092
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2122
2093
  return de_CalculateRouteMatrixCommandError(output, context);
2123
2094
  }
2124
- const contents = map({
2095
+ const contents = (0, smithy_client_1.map)({
2125
2096
  $metadata: deserializeMetadata(output),
2126
2097
  });
2127
2098
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2128
- if (data.RouteMatrix != null) {
2129
- contents.RouteMatrix = de_RouteMatrix(data.RouteMatrix, context);
2130
- }
2131
- if (data.SnappedDeparturePositions != null) {
2132
- contents.SnappedDeparturePositions = de_PositionList(data.SnappedDeparturePositions, context);
2133
- }
2134
- if (data.SnappedDestinationPositions != null) {
2135
- contents.SnappedDestinationPositions = de_PositionList(data.SnappedDestinationPositions, context);
2136
- }
2137
- if (data.Summary != null) {
2138
- contents.Summary = de_CalculateRouteMatrixSummary(data.Summary, context);
2139
- }
2099
+ const doc = (0, smithy_client_1.take)(data, {
2100
+ RouteMatrix: (_) => de_RouteMatrix(_, context),
2101
+ SnappedDeparturePositions: (_) => de_PositionList(_, context),
2102
+ SnappedDestinationPositions: (_) => de_PositionList(_, context),
2103
+ Summary: smithy_client_1._json,
2104
+ });
2105
+ Object.assign(contents, doc);
2140
2106
  return contents;
2141
2107
  };
2142
2108
  exports.de_CalculateRouteMatrixCommand = de_CalculateRouteMatrixCommand;
@@ -2164,10 +2130,9 @@ const de_CalculateRouteMatrixCommandError = async (output, context) => {
2164
2130
  throw await de_ValidationExceptionRes(parsedOutput, context);
2165
2131
  default:
2166
2132
  const parsedBody = parsedOutput.body;
2167
- (0, smithy_client_1.throwDefaultError)({
2133
+ return throwDefaultError({
2168
2134
  output,
2169
2135
  parsedBody,
2170
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2171
2136
  errorCode,
2172
2137
  });
2173
2138
  }
@@ -2176,19 +2141,16 @@ const de_CreateGeofenceCollectionCommand = async (output, context) => {
2176
2141
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2177
2142
  return de_CreateGeofenceCollectionCommandError(output, context);
2178
2143
  }
2179
- const contents = map({
2144
+ const contents = (0, smithy_client_1.map)({
2180
2145
  $metadata: deserializeMetadata(output),
2181
2146
  });
2182
2147
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2183
- if (data.CollectionArn != null) {
2184
- contents.CollectionArn = (0, smithy_client_1.expectString)(data.CollectionArn);
2185
- }
2186
- if (data.CollectionName != null) {
2187
- contents.CollectionName = (0, smithy_client_1.expectString)(data.CollectionName);
2188
- }
2189
- if (data.CreateTime != null) {
2190
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2191
- }
2148
+ const doc = (0, smithy_client_1.take)(data, {
2149
+ CollectionArn: smithy_client_1.expectString,
2150
+ CollectionName: smithy_client_1.expectString,
2151
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2152
+ });
2153
+ Object.assign(contents, doc);
2192
2154
  return contents;
2193
2155
  };
2194
2156
  exports.de_CreateGeofenceCollectionCommand = de_CreateGeofenceCollectionCommand;
@@ -2219,10 +2181,9 @@ const de_CreateGeofenceCollectionCommandError = async (output, context) => {
2219
2181
  throw await de_ValidationExceptionRes(parsedOutput, context);
2220
2182
  default:
2221
2183
  const parsedBody = parsedOutput.body;
2222
- (0, smithy_client_1.throwDefaultError)({
2184
+ return throwDefaultError({
2223
2185
  output,
2224
2186
  parsedBody,
2225
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2226
2187
  errorCode,
2227
2188
  });
2228
2189
  }
@@ -2231,22 +2192,17 @@ const de_CreateKeyCommand = async (output, context) => {
2231
2192
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2232
2193
  return de_CreateKeyCommandError(output, context);
2233
2194
  }
2234
- const contents = map({
2195
+ const contents = (0, smithy_client_1.map)({
2235
2196
  $metadata: deserializeMetadata(output),
2236
2197
  });
2237
2198
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2238
- if (data.CreateTime != null) {
2239
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2240
- }
2241
- if (data.Key != null) {
2242
- contents.Key = (0, smithy_client_1.expectString)(data.Key);
2243
- }
2244
- if (data.KeyArn != null) {
2245
- contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
2246
- }
2247
- if (data.KeyName != null) {
2248
- contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
2249
- }
2199
+ const doc = (0, smithy_client_1.take)(data, {
2200
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2201
+ Key: smithy_client_1.expectString,
2202
+ KeyArn: smithy_client_1.expectString,
2203
+ KeyName: smithy_client_1.expectString,
2204
+ });
2205
+ Object.assign(contents, doc);
2250
2206
  return contents;
2251
2207
  };
2252
2208
  exports.de_CreateKeyCommand = de_CreateKeyCommand;
@@ -2277,10 +2233,9 @@ const de_CreateKeyCommandError = async (output, context) => {
2277
2233
  throw await de_ValidationExceptionRes(parsedOutput, context);
2278
2234
  default:
2279
2235
  const parsedBody = parsedOutput.body;
2280
- (0, smithy_client_1.throwDefaultError)({
2236
+ return throwDefaultError({
2281
2237
  output,
2282
2238
  parsedBody,
2283
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2284
2239
  errorCode,
2285
2240
  });
2286
2241
  }
@@ -2289,19 +2244,16 @@ const de_CreateMapCommand = async (output, context) => {
2289
2244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2290
2245
  return de_CreateMapCommandError(output, context);
2291
2246
  }
2292
- const contents = map({
2247
+ const contents = (0, smithy_client_1.map)({
2293
2248
  $metadata: deserializeMetadata(output),
2294
2249
  });
2295
2250
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2296
- if (data.CreateTime != null) {
2297
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2298
- }
2299
- if (data.MapArn != null) {
2300
- contents.MapArn = (0, smithy_client_1.expectString)(data.MapArn);
2301
- }
2302
- if (data.MapName != null) {
2303
- contents.MapName = (0, smithy_client_1.expectString)(data.MapName);
2304
- }
2251
+ const doc = (0, smithy_client_1.take)(data, {
2252
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2253
+ MapArn: smithy_client_1.expectString,
2254
+ MapName: smithy_client_1.expectString,
2255
+ });
2256
+ Object.assign(contents, doc);
2305
2257
  return contents;
2306
2258
  };
2307
2259
  exports.de_CreateMapCommand = de_CreateMapCommand;
@@ -2332,10 +2284,9 @@ const de_CreateMapCommandError = async (output, context) => {
2332
2284
  throw await de_ValidationExceptionRes(parsedOutput, context);
2333
2285
  default:
2334
2286
  const parsedBody = parsedOutput.body;
2335
- (0, smithy_client_1.throwDefaultError)({
2287
+ return throwDefaultError({
2336
2288
  output,
2337
2289
  parsedBody,
2338
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2339
2290
  errorCode,
2340
2291
  });
2341
2292
  }
@@ -2344,19 +2295,16 @@ const de_CreatePlaceIndexCommand = async (output, context) => {
2344
2295
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2345
2296
  return de_CreatePlaceIndexCommandError(output, context);
2346
2297
  }
2347
- const contents = map({
2298
+ const contents = (0, smithy_client_1.map)({
2348
2299
  $metadata: deserializeMetadata(output),
2349
2300
  });
2350
2301
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2351
- if (data.CreateTime != null) {
2352
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2353
- }
2354
- if (data.IndexArn != null) {
2355
- contents.IndexArn = (0, smithy_client_1.expectString)(data.IndexArn);
2356
- }
2357
- if (data.IndexName != null) {
2358
- contents.IndexName = (0, smithy_client_1.expectString)(data.IndexName);
2359
- }
2302
+ const doc = (0, smithy_client_1.take)(data, {
2303
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2304
+ IndexArn: smithy_client_1.expectString,
2305
+ IndexName: smithy_client_1.expectString,
2306
+ });
2307
+ Object.assign(contents, doc);
2360
2308
  return contents;
2361
2309
  };
2362
2310
  exports.de_CreatePlaceIndexCommand = de_CreatePlaceIndexCommand;
@@ -2387,10 +2335,9 @@ const de_CreatePlaceIndexCommandError = async (output, context) => {
2387
2335
  throw await de_ValidationExceptionRes(parsedOutput, context);
2388
2336
  default:
2389
2337
  const parsedBody = parsedOutput.body;
2390
- (0, smithy_client_1.throwDefaultError)({
2338
+ return throwDefaultError({
2391
2339
  output,
2392
2340
  parsedBody,
2393
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2394
2341
  errorCode,
2395
2342
  });
2396
2343
  }
@@ -2399,19 +2346,16 @@ const de_CreateRouteCalculatorCommand = async (output, context) => {
2399
2346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2400
2347
  return de_CreateRouteCalculatorCommandError(output, context);
2401
2348
  }
2402
- const contents = map({
2349
+ const contents = (0, smithy_client_1.map)({
2403
2350
  $metadata: deserializeMetadata(output),
2404
2351
  });
2405
2352
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2406
- if (data.CalculatorArn != null) {
2407
- contents.CalculatorArn = (0, smithy_client_1.expectString)(data.CalculatorArn);
2408
- }
2409
- if (data.CalculatorName != null) {
2410
- contents.CalculatorName = (0, smithy_client_1.expectString)(data.CalculatorName);
2411
- }
2412
- if (data.CreateTime != null) {
2413
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2414
- }
2353
+ const doc = (0, smithy_client_1.take)(data, {
2354
+ CalculatorArn: smithy_client_1.expectString,
2355
+ CalculatorName: smithy_client_1.expectString,
2356
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2357
+ });
2358
+ Object.assign(contents, doc);
2415
2359
  return contents;
2416
2360
  };
2417
2361
  exports.de_CreateRouteCalculatorCommand = de_CreateRouteCalculatorCommand;
@@ -2442,10 +2386,9 @@ const de_CreateRouteCalculatorCommandError = async (output, context) => {
2442
2386
  throw await de_ValidationExceptionRes(parsedOutput, context);
2443
2387
  default:
2444
2388
  const parsedBody = parsedOutput.body;
2445
- (0, smithy_client_1.throwDefaultError)({
2389
+ return throwDefaultError({
2446
2390
  output,
2447
2391
  parsedBody,
2448
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2449
2392
  errorCode,
2450
2393
  });
2451
2394
  }
@@ -2454,19 +2397,16 @@ const de_CreateTrackerCommand = async (output, context) => {
2454
2397
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2455
2398
  return de_CreateTrackerCommandError(output, context);
2456
2399
  }
2457
- const contents = map({
2400
+ const contents = (0, smithy_client_1.map)({
2458
2401
  $metadata: deserializeMetadata(output),
2459
2402
  });
2460
2403
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2461
- if (data.CreateTime != null) {
2462
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2463
- }
2464
- if (data.TrackerArn != null) {
2465
- contents.TrackerArn = (0, smithy_client_1.expectString)(data.TrackerArn);
2466
- }
2467
- if (data.TrackerName != null) {
2468
- contents.TrackerName = (0, smithy_client_1.expectString)(data.TrackerName);
2469
- }
2404
+ const doc = (0, smithy_client_1.take)(data, {
2405
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2406
+ TrackerArn: smithy_client_1.expectString,
2407
+ TrackerName: smithy_client_1.expectString,
2408
+ });
2409
+ Object.assign(contents, doc);
2470
2410
  return contents;
2471
2411
  };
2472
2412
  exports.de_CreateTrackerCommand = de_CreateTrackerCommand;
@@ -2494,10 +2434,9 @@ const de_CreateTrackerCommandError = async (output, context) => {
2494
2434
  throw await de_ValidationExceptionRes(parsedOutput, context);
2495
2435
  default:
2496
2436
  const parsedBody = parsedOutput.body;
2497
- (0, smithy_client_1.throwDefaultError)({
2437
+ return throwDefaultError({
2498
2438
  output,
2499
2439
  parsedBody,
2500
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2501
2440
  errorCode,
2502
2441
  });
2503
2442
  }
@@ -2506,7 +2445,7 @@ const de_DeleteGeofenceCollectionCommand = async (output, context) => {
2506
2445
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2507
2446
  return de_DeleteGeofenceCollectionCommandError(output, context);
2508
2447
  }
2509
- const contents = map({
2448
+ const contents = (0, smithy_client_1.map)({
2510
2449
  $metadata: deserializeMetadata(output),
2511
2450
  });
2512
2451
  await collectBody(output.body, context);
@@ -2537,10 +2476,9 @@ const de_DeleteGeofenceCollectionCommandError = async (output, context) => {
2537
2476
  throw await de_ValidationExceptionRes(parsedOutput, context);
2538
2477
  default:
2539
2478
  const parsedBody = parsedOutput.body;
2540
- (0, smithy_client_1.throwDefaultError)({
2479
+ return throwDefaultError({
2541
2480
  output,
2542
2481
  parsedBody,
2543
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2544
2482
  errorCode,
2545
2483
  });
2546
2484
  }
@@ -2549,7 +2487,7 @@ const de_DeleteKeyCommand = async (output, context) => {
2549
2487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2550
2488
  return de_DeleteKeyCommandError(output, context);
2551
2489
  }
2552
- const contents = map({
2490
+ const contents = (0, smithy_client_1.map)({
2553
2491
  $metadata: deserializeMetadata(output),
2554
2492
  });
2555
2493
  await collectBody(output.body, context);
@@ -2580,10 +2518,9 @@ const de_DeleteKeyCommandError = async (output, context) => {
2580
2518
  throw await de_ValidationExceptionRes(parsedOutput, context);
2581
2519
  default:
2582
2520
  const parsedBody = parsedOutput.body;
2583
- (0, smithy_client_1.throwDefaultError)({
2521
+ return throwDefaultError({
2584
2522
  output,
2585
2523
  parsedBody,
2586
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2587
2524
  errorCode,
2588
2525
  });
2589
2526
  }
@@ -2592,7 +2529,7 @@ const de_DeleteMapCommand = async (output, context) => {
2592
2529
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2593
2530
  return de_DeleteMapCommandError(output, context);
2594
2531
  }
2595
- const contents = map({
2532
+ const contents = (0, smithy_client_1.map)({
2596
2533
  $metadata: deserializeMetadata(output),
2597
2534
  });
2598
2535
  await collectBody(output.body, context);
@@ -2623,10 +2560,9 @@ const de_DeleteMapCommandError = async (output, context) => {
2623
2560
  throw await de_ValidationExceptionRes(parsedOutput, context);
2624
2561
  default:
2625
2562
  const parsedBody = parsedOutput.body;
2626
- (0, smithy_client_1.throwDefaultError)({
2563
+ return throwDefaultError({
2627
2564
  output,
2628
2565
  parsedBody,
2629
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2630
2566
  errorCode,
2631
2567
  });
2632
2568
  }
@@ -2635,7 +2571,7 @@ const de_DeletePlaceIndexCommand = async (output, context) => {
2635
2571
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2636
2572
  return de_DeletePlaceIndexCommandError(output, context);
2637
2573
  }
2638
- const contents = map({
2574
+ const contents = (0, smithy_client_1.map)({
2639
2575
  $metadata: deserializeMetadata(output),
2640
2576
  });
2641
2577
  await collectBody(output.body, context);
@@ -2666,10 +2602,9 @@ const de_DeletePlaceIndexCommandError = async (output, context) => {
2666
2602
  throw await de_ValidationExceptionRes(parsedOutput, context);
2667
2603
  default:
2668
2604
  const parsedBody = parsedOutput.body;
2669
- (0, smithy_client_1.throwDefaultError)({
2605
+ return throwDefaultError({
2670
2606
  output,
2671
2607
  parsedBody,
2672
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2673
2608
  errorCode,
2674
2609
  });
2675
2610
  }
@@ -2678,7 +2613,7 @@ const de_DeleteRouteCalculatorCommand = async (output, context) => {
2678
2613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2679
2614
  return de_DeleteRouteCalculatorCommandError(output, context);
2680
2615
  }
2681
- const contents = map({
2616
+ const contents = (0, smithy_client_1.map)({
2682
2617
  $metadata: deserializeMetadata(output),
2683
2618
  });
2684
2619
  await collectBody(output.body, context);
@@ -2709,10 +2644,9 @@ const de_DeleteRouteCalculatorCommandError = async (output, context) => {
2709
2644
  throw await de_ValidationExceptionRes(parsedOutput, context);
2710
2645
  default:
2711
2646
  const parsedBody = parsedOutput.body;
2712
- (0, smithy_client_1.throwDefaultError)({
2647
+ return throwDefaultError({
2713
2648
  output,
2714
2649
  parsedBody,
2715
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2716
2650
  errorCode,
2717
2651
  });
2718
2652
  }
@@ -2721,7 +2655,7 @@ const de_DeleteTrackerCommand = async (output, context) => {
2721
2655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2722
2656
  return de_DeleteTrackerCommandError(output, context);
2723
2657
  }
2724
- const contents = map({
2658
+ const contents = (0, smithy_client_1.map)({
2725
2659
  $metadata: deserializeMetadata(output),
2726
2660
  });
2727
2661
  await collectBody(output.body, context);
@@ -2752,10 +2686,9 @@ const de_DeleteTrackerCommandError = async (output, context) => {
2752
2686
  throw await de_ValidationExceptionRes(parsedOutput, context);
2753
2687
  default:
2754
2688
  const parsedBody = parsedOutput.body;
2755
- (0, smithy_client_1.throwDefaultError)({
2689
+ return throwDefaultError({
2756
2690
  output,
2757
2691
  parsedBody,
2758
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2759
2692
  errorCode,
2760
2693
  });
2761
2694
  }
@@ -2764,37 +2697,22 @@ const de_DescribeGeofenceCollectionCommand = async (output, context) => {
2764
2697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2765
2698
  return de_DescribeGeofenceCollectionCommandError(output, context);
2766
2699
  }
2767
- const contents = map({
2700
+ const contents = (0, smithy_client_1.map)({
2768
2701
  $metadata: deserializeMetadata(output),
2769
2702
  });
2770
2703
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2771
- if (data.CollectionArn != null) {
2772
- contents.CollectionArn = (0, smithy_client_1.expectString)(data.CollectionArn);
2773
- }
2774
- if (data.CollectionName != null) {
2775
- contents.CollectionName = (0, smithy_client_1.expectString)(data.CollectionName);
2776
- }
2777
- if (data.CreateTime != null) {
2778
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2779
- }
2780
- if (data.Description != null) {
2781
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
2782
- }
2783
- if (data.KmsKeyId != null) {
2784
- contents.KmsKeyId = (0, smithy_client_1.expectString)(data.KmsKeyId);
2785
- }
2786
- if (data.PricingPlan != null) {
2787
- contents.PricingPlan = (0, smithy_client_1.expectString)(data.PricingPlan);
2788
- }
2789
- if (data.PricingPlanDataSource != null) {
2790
- contents.PricingPlanDataSource = (0, smithy_client_1.expectString)(data.PricingPlanDataSource);
2791
- }
2792
- if (data.Tags != null) {
2793
- contents.Tags = de_TagMap(data.Tags, context);
2794
- }
2795
- if (data.UpdateTime != null) {
2796
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
2797
- }
2704
+ const doc = (0, smithy_client_1.take)(data, {
2705
+ CollectionArn: smithy_client_1.expectString,
2706
+ CollectionName: smithy_client_1.expectString,
2707
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2708
+ Description: smithy_client_1.expectString,
2709
+ KmsKeyId: smithy_client_1.expectString,
2710
+ PricingPlan: smithy_client_1.expectString,
2711
+ PricingPlanDataSource: smithy_client_1.expectString,
2712
+ Tags: smithy_client_1._json,
2713
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2714
+ });
2715
+ Object.assign(contents, doc);
2798
2716
  return contents;
2799
2717
  };
2800
2718
  exports.de_DescribeGeofenceCollectionCommand = de_DescribeGeofenceCollectionCommand;
@@ -2822,10 +2740,9 @@ const de_DescribeGeofenceCollectionCommandError = async (output, context) => {
2822
2740
  throw await de_ValidationExceptionRes(parsedOutput, context);
2823
2741
  default:
2824
2742
  const parsedBody = parsedOutput.body;
2825
- (0, smithy_client_1.throwDefaultError)({
2743
+ return throwDefaultError({
2826
2744
  output,
2827
2745
  parsedBody,
2828
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2829
2746
  errorCode,
2830
2747
  });
2831
2748
  }
@@ -2834,37 +2751,22 @@ const de_DescribeKeyCommand = async (output, context) => {
2834
2751
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2835
2752
  return de_DescribeKeyCommandError(output, context);
2836
2753
  }
2837
- const contents = map({
2754
+ const contents = (0, smithy_client_1.map)({
2838
2755
  $metadata: deserializeMetadata(output),
2839
2756
  });
2840
2757
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2841
- if (data.CreateTime != null) {
2842
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2843
- }
2844
- if (data.Description != null) {
2845
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
2846
- }
2847
- if (data.ExpireTime != null) {
2848
- contents.ExpireTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.ExpireTime));
2849
- }
2850
- if (data.Key != null) {
2851
- contents.Key = (0, smithy_client_1.expectString)(data.Key);
2852
- }
2853
- if (data.KeyArn != null) {
2854
- contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
2855
- }
2856
- if (data.KeyName != null) {
2857
- contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
2858
- }
2859
- if (data.Restrictions != null) {
2860
- contents.Restrictions = de_ApiKeyRestrictions(data.Restrictions, context);
2861
- }
2862
- if (data.Tags != null) {
2863
- contents.Tags = de_TagMap(data.Tags, context);
2864
- }
2865
- if (data.UpdateTime != null) {
2866
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
2867
- }
2758
+ const doc = (0, smithy_client_1.take)(data, {
2759
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2760
+ Description: smithy_client_1.expectString,
2761
+ ExpireTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2762
+ Key: smithy_client_1.expectString,
2763
+ KeyArn: smithy_client_1.expectString,
2764
+ KeyName: smithy_client_1.expectString,
2765
+ Restrictions: smithy_client_1._json,
2766
+ Tags: smithy_client_1._json,
2767
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2768
+ });
2769
+ Object.assign(contents, doc);
2868
2770
  return contents;
2869
2771
  };
2870
2772
  exports.de_DescribeKeyCommand = de_DescribeKeyCommand;
@@ -2892,10 +2794,9 @@ const de_DescribeKeyCommandError = async (output, context) => {
2892
2794
  throw await de_ValidationExceptionRes(parsedOutput, context);
2893
2795
  default:
2894
2796
  const parsedBody = parsedOutput.body;
2895
- (0, smithy_client_1.throwDefaultError)({
2797
+ return throwDefaultError({
2896
2798
  output,
2897
2799
  parsedBody,
2898
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2899
2800
  errorCode,
2900
2801
  });
2901
2802
  }
@@ -2904,37 +2805,22 @@ const de_DescribeMapCommand = async (output, context) => {
2904
2805
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2905
2806
  return de_DescribeMapCommandError(output, context);
2906
2807
  }
2907
- const contents = map({
2808
+ const contents = (0, smithy_client_1.map)({
2908
2809
  $metadata: deserializeMetadata(output),
2909
2810
  });
2910
2811
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2911
- if (data.Configuration != null) {
2912
- contents.Configuration = de_MapConfiguration(data.Configuration, context);
2913
- }
2914
- if (data.CreateTime != null) {
2915
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2916
- }
2917
- if (data.DataSource != null) {
2918
- contents.DataSource = (0, smithy_client_1.expectString)(data.DataSource);
2919
- }
2920
- if (data.Description != null) {
2921
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
2922
- }
2923
- if (data.MapArn != null) {
2924
- contents.MapArn = (0, smithy_client_1.expectString)(data.MapArn);
2925
- }
2926
- if (data.MapName != null) {
2927
- contents.MapName = (0, smithy_client_1.expectString)(data.MapName);
2928
- }
2929
- if (data.PricingPlan != null) {
2930
- contents.PricingPlan = (0, smithy_client_1.expectString)(data.PricingPlan);
2931
- }
2932
- if (data.Tags != null) {
2933
- contents.Tags = de_TagMap(data.Tags, context);
2934
- }
2935
- if (data.UpdateTime != null) {
2936
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
2937
- }
2812
+ const doc = (0, smithy_client_1.take)(data, {
2813
+ Configuration: smithy_client_1._json,
2814
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2815
+ DataSource: smithy_client_1.expectString,
2816
+ Description: smithy_client_1.expectString,
2817
+ MapArn: smithy_client_1.expectString,
2818
+ MapName: smithy_client_1.expectString,
2819
+ PricingPlan: smithy_client_1.expectString,
2820
+ Tags: smithy_client_1._json,
2821
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2822
+ });
2823
+ Object.assign(contents, doc);
2938
2824
  return contents;
2939
2825
  };
2940
2826
  exports.de_DescribeMapCommand = de_DescribeMapCommand;
@@ -2962,10 +2848,9 @@ const de_DescribeMapCommandError = async (output, context) => {
2962
2848
  throw await de_ValidationExceptionRes(parsedOutput, context);
2963
2849
  default:
2964
2850
  const parsedBody = parsedOutput.body;
2965
- (0, smithy_client_1.throwDefaultError)({
2851
+ return throwDefaultError({
2966
2852
  output,
2967
2853
  parsedBody,
2968
- exceptionCtor: LocationServiceException_1.LocationServiceException,
2969
2854
  errorCode,
2970
2855
  });
2971
2856
  }
@@ -2974,37 +2859,22 @@ const de_DescribePlaceIndexCommand = async (output, context) => {
2974
2859
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2975
2860
  return de_DescribePlaceIndexCommandError(output, context);
2976
2861
  }
2977
- const contents = map({
2862
+ const contents = (0, smithy_client_1.map)({
2978
2863
  $metadata: deserializeMetadata(output),
2979
2864
  });
2980
2865
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2981
- if (data.CreateTime != null) {
2982
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
2983
- }
2984
- if (data.DataSource != null) {
2985
- contents.DataSource = (0, smithy_client_1.expectString)(data.DataSource);
2986
- }
2987
- if (data.DataSourceConfiguration != null) {
2988
- contents.DataSourceConfiguration = de_DataSourceConfiguration(data.DataSourceConfiguration, context);
2989
- }
2990
- if (data.Description != null) {
2991
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
2992
- }
2993
- if (data.IndexArn != null) {
2994
- contents.IndexArn = (0, smithy_client_1.expectString)(data.IndexArn);
2995
- }
2996
- if (data.IndexName != null) {
2997
- contents.IndexName = (0, smithy_client_1.expectString)(data.IndexName);
2998
- }
2999
- if (data.PricingPlan != null) {
3000
- contents.PricingPlan = (0, smithy_client_1.expectString)(data.PricingPlan);
3001
- }
3002
- if (data.Tags != null) {
3003
- contents.Tags = de_TagMap(data.Tags, context);
3004
- }
3005
- if (data.UpdateTime != null) {
3006
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
3007
- }
2866
+ const doc = (0, smithy_client_1.take)(data, {
2867
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2868
+ DataSource: smithy_client_1.expectString,
2869
+ DataSourceConfiguration: smithy_client_1._json,
2870
+ Description: smithy_client_1.expectString,
2871
+ IndexArn: smithy_client_1.expectString,
2872
+ IndexName: smithy_client_1.expectString,
2873
+ PricingPlan: smithy_client_1.expectString,
2874
+ Tags: smithy_client_1._json,
2875
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2876
+ });
2877
+ Object.assign(contents, doc);
3008
2878
  return contents;
3009
2879
  };
3010
2880
  exports.de_DescribePlaceIndexCommand = de_DescribePlaceIndexCommand;
@@ -3032,10 +2902,9 @@ const de_DescribePlaceIndexCommandError = async (output, context) => {
3032
2902
  throw await de_ValidationExceptionRes(parsedOutput, context);
3033
2903
  default:
3034
2904
  const parsedBody = parsedOutput.body;
3035
- (0, smithy_client_1.throwDefaultError)({
2905
+ return throwDefaultError({
3036
2906
  output,
3037
2907
  parsedBody,
3038
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3039
2908
  errorCode,
3040
2909
  });
3041
2910
  }
@@ -3044,34 +2913,21 @@ const de_DescribeRouteCalculatorCommand = async (output, context) => {
3044
2913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3045
2914
  return de_DescribeRouteCalculatorCommandError(output, context);
3046
2915
  }
3047
- const contents = map({
2916
+ const contents = (0, smithy_client_1.map)({
3048
2917
  $metadata: deserializeMetadata(output),
3049
2918
  });
3050
2919
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3051
- if (data.CalculatorArn != null) {
3052
- contents.CalculatorArn = (0, smithy_client_1.expectString)(data.CalculatorArn);
3053
- }
3054
- if (data.CalculatorName != null) {
3055
- contents.CalculatorName = (0, smithy_client_1.expectString)(data.CalculatorName);
3056
- }
3057
- if (data.CreateTime != null) {
3058
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
3059
- }
3060
- if (data.DataSource != null) {
3061
- contents.DataSource = (0, smithy_client_1.expectString)(data.DataSource);
3062
- }
3063
- if (data.Description != null) {
3064
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
3065
- }
3066
- if (data.PricingPlan != null) {
3067
- contents.PricingPlan = (0, smithy_client_1.expectString)(data.PricingPlan);
3068
- }
3069
- if (data.Tags != null) {
3070
- contents.Tags = de_TagMap(data.Tags, context);
3071
- }
3072
- if (data.UpdateTime != null) {
3073
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
3074
- }
2920
+ const doc = (0, smithy_client_1.take)(data, {
2921
+ CalculatorArn: smithy_client_1.expectString,
2922
+ CalculatorName: smithy_client_1.expectString,
2923
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2924
+ DataSource: smithy_client_1.expectString,
2925
+ Description: smithy_client_1.expectString,
2926
+ PricingPlan: smithy_client_1.expectString,
2927
+ Tags: smithy_client_1._json,
2928
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2929
+ });
2930
+ Object.assign(contents, doc);
3075
2931
  return contents;
3076
2932
  };
3077
2933
  exports.de_DescribeRouteCalculatorCommand = de_DescribeRouteCalculatorCommand;
@@ -3099,10 +2955,9 @@ const de_DescribeRouteCalculatorCommandError = async (output, context) => {
3099
2955
  throw await de_ValidationExceptionRes(parsedOutput, context);
3100
2956
  default:
3101
2957
  const parsedBody = parsedOutput.body;
3102
- (0, smithy_client_1.throwDefaultError)({
2958
+ return throwDefaultError({
3103
2959
  output,
3104
2960
  parsedBody,
3105
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3106
2961
  errorCode,
3107
2962
  });
3108
2963
  }
@@ -3111,40 +2966,23 @@ const de_DescribeTrackerCommand = async (output, context) => {
3111
2966
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3112
2967
  return de_DescribeTrackerCommandError(output, context);
3113
2968
  }
3114
- const contents = map({
2969
+ const contents = (0, smithy_client_1.map)({
3115
2970
  $metadata: deserializeMetadata(output),
3116
2971
  });
3117
2972
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3118
- if (data.CreateTime != null) {
3119
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
3120
- }
3121
- if (data.Description != null) {
3122
- contents.Description = (0, smithy_client_1.expectString)(data.Description);
3123
- }
3124
- if (data.KmsKeyId != null) {
3125
- contents.KmsKeyId = (0, smithy_client_1.expectString)(data.KmsKeyId);
3126
- }
3127
- if (data.PositionFiltering != null) {
3128
- contents.PositionFiltering = (0, smithy_client_1.expectString)(data.PositionFiltering);
3129
- }
3130
- if (data.PricingPlan != null) {
3131
- contents.PricingPlan = (0, smithy_client_1.expectString)(data.PricingPlan);
3132
- }
3133
- if (data.PricingPlanDataSource != null) {
3134
- contents.PricingPlanDataSource = (0, smithy_client_1.expectString)(data.PricingPlanDataSource);
3135
- }
3136
- if (data.Tags != null) {
3137
- contents.Tags = de_TagMap(data.Tags, context);
3138
- }
3139
- if (data.TrackerArn != null) {
3140
- contents.TrackerArn = (0, smithy_client_1.expectString)(data.TrackerArn);
3141
- }
3142
- if (data.TrackerName != null) {
3143
- contents.TrackerName = (0, smithy_client_1.expectString)(data.TrackerName);
3144
- }
3145
- if (data.UpdateTime != null) {
3146
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
3147
- }
2973
+ const doc = (0, smithy_client_1.take)(data, {
2974
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2975
+ Description: smithy_client_1.expectString,
2976
+ KmsKeyId: smithy_client_1.expectString,
2977
+ PositionFiltering: smithy_client_1.expectString,
2978
+ PricingPlan: smithy_client_1.expectString,
2979
+ PricingPlanDataSource: smithy_client_1.expectString,
2980
+ Tags: smithy_client_1._json,
2981
+ TrackerArn: smithy_client_1.expectString,
2982
+ TrackerName: smithy_client_1.expectString,
2983
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2984
+ });
2985
+ Object.assign(contents, doc);
3148
2986
  return contents;
3149
2987
  };
3150
2988
  exports.de_DescribeTrackerCommand = de_DescribeTrackerCommand;
@@ -3172,10 +3010,9 @@ const de_DescribeTrackerCommandError = async (output, context) => {
3172
3010
  throw await de_ValidationExceptionRes(parsedOutput, context);
3173
3011
  default:
3174
3012
  const parsedBody = parsedOutput.body;
3175
- (0, smithy_client_1.throwDefaultError)({
3013
+ return throwDefaultError({
3176
3014
  output,
3177
3015
  parsedBody,
3178
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3179
3016
  errorCode,
3180
3017
  });
3181
3018
  }
@@ -3184,7 +3021,7 @@ const de_DisassociateTrackerConsumerCommand = async (output, context) => {
3184
3021
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3185
3022
  return de_DisassociateTrackerConsumerCommandError(output, context);
3186
3023
  }
3187
- const contents = map({
3024
+ const contents = (0, smithy_client_1.map)({
3188
3025
  $metadata: deserializeMetadata(output),
3189
3026
  });
3190
3027
  await collectBody(output.body, context);
@@ -3215,10 +3052,9 @@ const de_DisassociateTrackerConsumerCommandError = async (output, context) => {
3215
3052
  throw await de_ValidationExceptionRes(parsedOutput, context);
3216
3053
  default:
3217
3054
  const parsedBody = parsedOutput.body;
3218
- (0, smithy_client_1.throwDefaultError)({
3055
+ return throwDefaultError({
3219
3056
  output,
3220
3057
  parsedBody,
3221
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3222
3058
  errorCode,
3223
3059
  });
3224
3060
  }
@@ -3227,28 +3063,19 @@ const de_GetDevicePositionCommand = async (output, context) => {
3227
3063
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3228
3064
  return de_GetDevicePositionCommandError(output, context);
3229
3065
  }
3230
- const contents = map({
3066
+ const contents = (0, smithy_client_1.map)({
3231
3067
  $metadata: deserializeMetadata(output),
3232
3068
  });
3233
3069
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3234
- if (data.Accuracy != null) {
3235
- contents.Accuracy = de_PositionalAccuracy(data.Accuracy, context);
3236
- }
3237
- if (data.DeviceId != null) {
3238
- contents.DeviceId = (0, smithy_client_1.expectString)(data.DeviceId);
3239
- }
3240
- if (data.Position != null) {
3241
- contents.Position = de_Position(data.Position, context);
3242
- }
3243
- if (data.PositionProperties != null) {
3244
- contents.PositionProperties = de_PropertyMap(data.PositionProperties, context);
3245
- }
3246
- if (data.ReceivedTime != null) {
3247
- contents.ReceivedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.ReceivedTime));
3248
- }
3249
- if (data.SampleTime != null) {
3250
- contents.SampleTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.SampleTime));
3251
- }
3070
+ const doc = (0, smithy_client_1.take)(data, {
3071
+ Accuracy: (_) => de_PositionalAccuracy(_, context),
3072
+ DeviceId: smithy_client_1.expectString,
3073
+ Position: (_) => de_Position(_, context),
3074
+ PositionProperties: smithy_client_1._json,
3075
+ ReceivedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3076
+ SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3077
+ });
3078
+ Object.assign(contents, doc);
3252
3079
  return contents;
3253
3080
  };
3254
3081
  exports.de_GetDevicePositionCommand = de_GetDevicePositionCommand;
@@ -3276,10 +3103,9 @@ const de_GetDevicePositionCommandError = async (output, context) => {
3276
3103
  throw await de_ValidationExceptionRes(parsedOutput, context);
3277
3104
  default:
3278
3105
  const parsedBody = parsedOutput.body;
3279
- (0, smithy_client_1.throwDefaultError)({
3106
+ return throwDefaultError({
3280
3107
  output,
3281
3108
  parsedBody,
3282
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3283
3109
  errorCode,
3284
3110
  });
3285
3111
  }
@@ -3288,16 +3114,15 @@ const de_GetDevicePositionHistoryCommand = async (output, context) => {
3288
3114
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3289
3115
  return de_GetDevicePositionHistoryCommandError(output, context);
3290
3116
  }
3291
- const contents = map({
3117
+ const contents = (0, smithy_client_1.map)({
3292
3118
  $metadata: deserializeMetadata(output),
3293
3119
  });
3294
3120
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3295
- if (data.DevicePositions != null) {
3296
- contents.DevicePositions = de_DevicePositionList(data.DevicePositions, context);
3297
- }
3298
- if (data.NextToken != null) {
3299
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3300
- }
3121
+ const doc = (0, smithy_client_1.take)(data, {
3122
+ DevicePositions: (_) => de_DevicePositionList(_, context),
3123
+ NextToken: smithy_client_1.expectString,
3124
+ });
3125
+ Object.assign(contents, doc);
3301
3126
  return contents;
3302
3127
  };
3303
3128
  exports.de_GetDevicePositionHistoryCommand = de_GetDevicePositionHistoryCommand;
@@ -3325,10 +3150,9 @@ const de_GetDevicePositionHistoryCommandError = async (output, context) => {
3325
3150
  throw await de_ValidationExceptionRes(parsedOutput, context);
3326
3151
  default:
3327
3152
  const parsedBody = parsedOutput.body;
3328
- (0, smithy_client_1.throwDefaultError)({
3153
+ return throwDefaultError({
3329
3154
  output,
3330
3155
  parsedBody,
3331
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3332
3156
  errorCode,
3333
3157
  });
3334
3158
  }
@@ -3337,25 +3161,18 @@ const de_GetGeofenceCommand = async (output, context) => {
3337
3161
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3338
3162
  return de_GetGeofenceCommandError(output, context);
3339
3163
  }
3340
- const contents = map({
3164
+ const contents = (0, smithy_client_1.map)({
3341
3165
  $metadata: deserializeMetadata(output),
3342
3166
  });
3343
3167
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3344
- if (data.CreateTime != null) {
3345
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
3346
- }
3347
- if (data.GeofenceId != null) {
3348
- contents.GeofenceId = (0, smithy_client_1.expectString)(data.GeofenceId);
3349
- }
3350
- if (data.Geometry != null) {
3351
- contents.Geometry = de_GeofenceGeometry(data.Geometry, context);
3352
- }
3353
- if (data.Status != null) {
3354
- contents.Status = (0, smithy_client_1.expectString)(data.Status);
3355
- }
3356
- if (data.UpdateTime != null) {
3357
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
3358
- }
3168
+ const doc = (0, smithy_client_1.take)(data, {
3169
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3170
+ GeofenceId: smithy_client_1.expectString,
3171
+ Geometry: (_) => de_GeofenceGeometry(_, context),
3172
+ Status: smithy_client_1.expectString,
3173
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3174
+ });
3175
+ Object.assign(contents, doc);
3359
3176
  return contents;
3360
3177
  };
3361
3178
  exports.de_GetGeofenceCommand = de_GetGeofenceCommand;
@@ -3383,10 +3200,9 @@ const de_GetGeofenceCommandError = async (output, context) => {
3383
3200
  throw await de_ValidationExceptionRes(parsedOutput, context);
3384
3201
  default:
3385
3202
  const parsedBody = parsedOutput.body;
3386
- (0, smithy_client_1.throwDefaultError)({
3203
+ return throwDefaultError({
3387
3204
  output,
3388
3205
  parsedBody,
3389
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3390
3206
  errorCode,
3391
3207
  });
3392
3208
  }
@@ -3395,7 +3211,7 @@ const de_GetMapGlyphsCommand = async (output, context) => {
3395
3211
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3396
3212
  return de_GetMapGlyphsCommandError(output, context);
3397
3213
  }
3398
- const contents = map({
3214
+ const contents = (0, smithy_client_1.map)({
3399
3215
  $metadata: deserializeMetadata(output),
3400
3216
  ContentType: [, output.headers["content-type"]],
3401
3217
  CacheControl: [, output.headers["cache-control"]],
@@ -3429,10 +3245,9 @@ const de_GetMapGlyphsCommandError = async (output, context) => {
3429
3245
  throw await de_ValidationExceptionRes(parsedOutput, context);
3430
3246
  default:
3431
3247
  const parsedBody = parsedOutput.body;
3432
- (0, smithy_client_1.throwDefaultError)({
3248
+ return throwDefaultError({
3433
3249
  output,
3434
3250
  parsedBody,
3435
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3436
3251
  errorCode,
3437
3252
  });
3438
3253
  }
@@ -3441,7 +3256,7 @@ const de_GetMapSpritesCommand = async (output, context) => {
3441
3256
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3442
3257
  return de_GetMapSpritesCommandError(output, context);
3443
3258
  }
3444
- const contents = map({
3259
+ const contents = (0, smithy_client_1.map)({
3445
3260
  $metadata: deserializeMetadata(output),
3446
3261
  ContentType: [, output.headers["content-type"]],
3447
3262
  CacheControl: [, output.headers["cache-control"]],
@@ -3475,10 +3290,9 @@ const de_GetMapSpritesCommandError = async (output, context) => {
3475
3290
  throw await de_ValidationExceptionRes(parsedOutput, context);
3476
3291
  default:
3477
3292
  const parsedBody = parsedOutput.body;
3478
- (0, smithy_client_1.throwDefaultError)({
3293
+ return throwDefaultError({
3479
3294
  output,
3480
3295
  parsedBody,
3481
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3482
3296
  errorCode,
3483
3297
  });
3484
3298
  }
@@ -3487,7 +3301,7 @@ const de_GetMapStyleDescriptorCommand = async (output, context) => {
3487
3301
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3488
3302
  return de_GetMapStyleDescriptorCommandError(output, context);
3489
3303
  }
3490
- const contents = map({
3304
+ const contents = (0, smithy_client_1.map)({
3491
3305
  $metadata: deserializeMetadata(output),
3492
3306
  ContentType: [, output.headers["content-type"]],
3493
3307
  CacheControl: [, output.headers["cache-control"]],
@@ -3521,10 +3335,9 @@ const de_GetMapStyleDescriptorCommandError = async (output, context) => {
3521
3335
  throw await de_ValidationExceptionRes(parsedOutput, context);
3522
3336
  default:
3523
3337
  const parsedBody = parsedOutput.body;
3524
- (0, smithy_client_1.throwDefaultError)({
3338
+ return throwDefaultError({
3525
3339
  output,
3526
3340
  parsedBody,
3527
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3528
3341
  errorCode,
3529
3342
  });
3530
3343
  }
@@ -3533,7 +3346,7 @@ const de_GetMapTileCommand = async (output, context) => {
3533
3346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3534
3347
  return de_GetMapTileCommandError(output, context);
3535
3348
  }
3536
- const contents = map({
3349
+ const contents = (0, smithy_client_1.map)({
3537
3350
  $metadata: deserializeMetadata(output),
3538
3351
  ContentType: [, output.headers["content-type"]],
3539
3352
  CacheControl: [, output.headers["cache-control"]],
@@ -3567,10 +3380,9 @@ const de_GetMapTileCommandError = async (output, context) => {
3567
3380
  throw await de_ValidationExceptionRes(parsedOutput, context);
3568
3381
  default:
3569
3382
  const parsedBody = parsedOutput.body;
3570
- (0, smithy_client_1.throwDefaultError)({
3383
+ return throwDefaultError({
3571
3384
  output,
3572
3385
  parsedBody,
3573
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3574
3386
  errorCode,
3575
3387
  });
3576
3388
  }
@@ -3579,13 +3391,14 @@ const de_GetPlaceCommand = async (output, context) => {
3579
3391
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3580
3392
  return de_GetPlaceCommandError(output, context);
3581
3393
  }
3582
- const contents = map({
3394
+ const contents = (0, smithy_client_1.map)({
3583
3395
  $metadata: deserializeMetadata(output),
3584
3396
  });
3585
3397
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3586
- if (data.Place != null) {
3587
- contents.Place = de_Place(data.Place, context);
3588
- }
3398
+ const doc = (0, smithy_client_1.take)(data, {
3399
+ Place: (_) => de_Place(_, context),
3400
+ });
3401
+ Object.assign(contents, doc);
3589
3402
  return contents;
3590
3403
  };
3591
3404
  exports.de_GetPlaceCommand = de_GetPlaceCommand;
@@ -3613,10 +3426,9 @@ const de_GetPlaceCommandError = async (output, context) => {
3613
3426
  throw await de_ValidationExceptionRes(parsedOutput, context);
3614
3427
  default:
3615
3428
  const parsedBody = parsedOutput.body;
3616
- (0, smithy_client_1.throwDefaultError)({
3429
+ return throwDefaultError({
3617
3430
  output,
3618
3431
  parsedBody,
3619
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3620
3432
  errorCode,
3621
3433
  });
3622
3434
  }
@@ -3625,16 +3437,15 @@ const de_ListDevicePositionsCommand = async (output, context) => {
3625
3437
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3626
3438
  return de_ListDevicePositionsCommandError(output, context);
3627
3439
  }
3628
- const contents = map({
3440
+ const contents = (0, smithy_client_1.map)({
3629
3441
  $metadata: deserializeMetadata(output),
3630
3442
  });
3631
3443
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3632
- if (data.Entries != null) {
3633
- contents.Entries = de_ListDevicePositionsResponseEntryList(data.Entries, context);
3634
- }
3635
- if (data.NextToken != null) {
3636
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3637
- }
3444
+ const doc = (0, smithy_client_1.take)(data, {
3445
+ Entries: (_) => de_ListDevicePositionsResponseEntryList(_, context),
3446
+ NextToken: smithy_client_1.expectString,
3447
+ });
3448
+ Object.assign(contents, doc);
3638
3449
  return contents;
3639
3450
  };
3640
3451
  exports.de_ListDevicePositionsCommand = de_ListDevicePositionsCommand;
@@ -3659,10 +3470,9 @@ const de_ListDevicePositionsCommandError = async (output, context) => {
3659
3470
  throw await de_ValidationExceptionRes(parsedOutput, context);
3660
3471
  default:
3661
3472
  const parsedBody = parsedOutput.body;
3662
- (0, smithy_client_1.throwDefaultError)({
3473
+ return throwDefaultError({
3663
3474
  output,
3664
3475
  parsedBody,
3665
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3666
3476
  errorCode,
3667
3477
  });
3668
3478
  }
@@ -3671,16 +3481,15 @@ const de_ListGeofenceCollectionsCommand = async (output, context) => {
3671
3481
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3672
3482
  return de_ListGeofenceCollectionsCommandError(output, context);
3673
3483
  }
3674
- const contents = map({
3484
+ const contents = (0, smithy_client_1.map)({
3675
3485
  $metadata: deserializeMetadata(output),
3676
3486
  });
3677
3487
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3678
- if (data.Entries != null) {
3679
- contents.Entries = de_ListGeofenceCollectionsResponseEntryList(data.Entries, context);
3680
- }
3681
- if (data.NextToken != null) {
3682
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3683
- }
3488
+ const doc = (0, smithy_client_1.take)(data, {
3489
+ Entries: (_) => de_ListGeofenceCollectionsResponseEntryList(_, context),
3490
+ NextToken: smithy_client_1.expectString,
3491
+ });
3492
+ Object.assign(contents, doc);
3684
3493
  return contents;
3685
3494
  };
3686
3495
  exports.de_ListGeofenceCollectionsCommand = de_ListGeofenceCollectionsCommand;
@@ -3705,10 +3514,9 @@ const de_ListGeofenceCollectionsCommandError = async (output, context) => {
3705
3514
  throw await de_ValidationExceptionRes(parsedOutput, context);
3706
3515
  default:
3707
3516
  const parsedBody = parsedOutput.body;
3708
- (0, smithy_client_1.throwDefaultError)({
3517
+ return throwDefaultError({
3709
3518
  output,
3710
3519
  parsedBody,
3711
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3712
3520
  errorCode,
3713
3521
  });
3714
3522
  }
@@ -3717,16 +3525,15 @@ const de_ListGeofencesCommand = async (output, context) => {
3717
3525
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3718
3526
  return de_ListGeofencesCommandError(output, context);
3719
3527
  }
3720
- const contents = map({
3528
+ const contents = (0, smithy_client_1.map)({
3721
3529
  $metadata: deserializeMetadata(output),
3722
3530
  });
3723
3531
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3724
- if (data.Entries != null) {
3725
- contents.Entries = de_ListGeofenceResponseEntryList(data.Entries, context);
3726
- }
3727
- if (data.NextToken != null) {
3728
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3729
- }
3532
+ const doc = (0, smithy_client_1.take)(data, {
3533
+ Entries: (_) => de_ListGeofenceResponseEntryList(_, context),
3534
+ NextToken: smithy_client_1.expectString,
3535
+ });
3536
+ Object.assign(contents, doc);
3730
3537
  return contents;
3731
3538
  };
3732
3539
  exports.de_ListGeofencesCommand = de_ListGeofencesCommand;
@@ -3754,10 +3561,9 @@ const de_ListGeofencesCommandError = async (output, context) => {
3754
3561
  throw await de_ValidationExceptionRes(parsedOutput, context);
3755
3562
  default:
3756
3563
  const parsedBody = parsedOutput.body;
3757
- (0, smithy_client_1.throwDefaultError)({
3564
+ return throwDefaultError({
3758
3565
  output,
3759
3566
  parsedBody,
3760
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3761
3567
  errorCode,
3762
3568
  });
3763
3569
  }
@@ -3766,16 +3572,15 @@ const de_ListKeysCommand = async (output, context) => {
3766
3572
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3767
3573
  return de_ListKeysCommandError(output, context);
3768
3574
  }
3769
- const contents = map({
3575
+ const contents = (0, smithy_client_1.map)({
3770
3576
  $metadata: deserializeMetadata(output),
3771
3577
  });
3772
3578
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3773
- if (data.Entries != null) {
3774
- contents.Entries = de_ListKeysResponseEntryList(data.Entries, context);
3775
- }
3776
- if (data.NextToken != null) {
3777
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3778
- }
3579
+ const doc = (0, smithy_client_1.take)(data, {
3580
+ Entries: (_) => de_ListKeysResponseEntryList(_, context),
3581
+ NextToken: smithy_client_1.expectString,
3582
+ });
3583
+ Object.assign(contents, doc);
3779
3584
  return contents;
3780
3585
  };
3781
3586
  exports.de_ListKeysCommand = de_ListKeysCommand;
@@ -3800,10 +3605,9 @@ const de_ListKeysCommandError = async (output, context) => {
3800
3605
  throw await de_ValidationExceptionRes(parsedOutput, context);
3801
3606
  default:
3802
3607
  const parsedBody = parsedOutput.body;
3803
- (0, smithy_client_1.throwDefaultError)({
3608
+ return throwDefaultError({
3804
3609
  output,
3805
3610
  parsedBody,
3806
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3807
3611
  errorCode,
3808
3612
  });
3809
3613
  }
@@ -3812,16 +3616,15 @@ const de_ListMapsCommand = async (output, context) => {
3812
3616
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3813
3617
  return de_ListMapsCommandError(output, context);
3814
3618
  }
3815
- const contents = map({
3619
+ const contents = (0, smithy_client_1.map)({
3816
3620
  $metadata: deserializeMetadata(output),
3817
3621
  });
3818
3622
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3819
- if (data.Entries != null) {
3820
- contents.Entries = de_ListMapsResponseEntryList(data.Entries, context);
3821
- }
3822
- if (data.NextToken != null) {
3823
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3824
- }
3623
+ const doc = (0, smithy_client_1.take)(data, {
3624
+ Entries: (_) => de_ListMapsResponseEntryList(_, context),
3625
+ NextToken: smithy_client_1.expectString,
3626
+ });
3627
+ Object.assign(contents, doc);
3825
3628
  return contents;
3826
3629
  };
3827
3630
  exports.de_ListMapsCommand = de_ListMapsCommand;
@@ -3846,10 +3649,9 @@ const de_ListMapsCommandError = async (output, context) => {
3846
3649
  throw await de_ValidationExceptionRes(parsedOutput, context);
3847
3650
  default:
3848
3651
  const parsedBody = parsedOutput.body;
3849
- (0, smithy_client_1.throwDefaultError)({
3652
+ return throwDefaultError({
3850
3653
  output,
3851
3654
  parsedBody,
3852
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3853
3655
  errorCode,
3854
3656
  });
3855
3657
  }
@@ -3858,16 +3660,15 @@ const de_ListPlaceIndexesCommand = async (output, context) => {
3858
3660
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3859
3661
  return de_ListPlaceIndexesCommandError(output, context);
3860
3662
  }
3861
- const contents = map({
3663
+ const contents = (0, smithy_client_1.map)({
3862
3664
  $metadata: deserializeMetadata(output),
3863
3665
  });
3864
3666
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3865
- if (data.Entries != null) {
3866
- contents.Entries = de_ListPlaceIndexesResponseEntryList(data.Entries, context);
3867
- }
3868
- if (data.NextToken != null) {
3869
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3870
- }
3667
+ const doc = (0, smithy_client_1.take)(data, {
3668
+ Entries: (_) => de_ListPlaceIndexesResponseEntryList(_, context),
3669
+ NextToken: smithy_client_1.expectString,
3670
+ });
3671
+ Object.assign(contents, doc);
3871
3672
  return contents;
3872
3673
  };
3873
3674
  exports.de_ListPlaceIndexesCommand = de_ListPlaceIndexesCommand;
@@ -3892,10 +3693,9 @@ const de_ListPlaceIndexesCommandError = async (output, context) => {
3892
3693
  throw await de_ValidationExceptionRes(parsedOutput, context);
3893
3694
  default:
3894
3695
  const parsedBody = parsedOutput.body;
3895
- (0, smithy_client_1.throwDefaultError)({
3696
+ return throwDefaultError({
3896
3697
  output,
3897
3698
  parsedBody,
3898
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3899
3699
  errorCode,
3900
3700
  });
3901
3701
  }
@@ -3904,16 +3704,15 @@ const de_ListRouteCalculatorsCommand = async (output, context) => {
3904
3704
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3905
3705
  return de_ListRouteCalculatorsCommandError(output, context);
3906
3706
  }
3907
- const contents = map({
3707
+ const contents = (0, smithy_client_1.map)({
3908
3708
  $metadata: deserializeMetadata(output),
3909
3709
  });
3910
3710
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3911
- if (data.Entries != null) {
3912
- contents.Entries = de_ListRouteCalculatorsResponseEntryList(data.Entries, context);
3913
- }
3914
- if (data.NextToken != null) {
3915
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3916
- }
3711
+ const doc = (0, smithy_client_1.take)(data, {
3712
+ Entries: (_) => de_ListRouteCalculatorsResponseEntryList(_, context),
3713
+ NextToken: smithy_client_1.expectString,
3714
+ });
3715
+ Object.assign(contents, doc);
3917
3716
  return contents;
3918
3717
  };
3919
3718
  exports.de_ListRouteCalculatorsCommand = de_ListRouteCalculatorsCommand;
@@ -3938,10 +3737,9 @@ const de_ListRouteCalculatorsCommandError = async (output, context) => {
3938
3737
  throw await de_ValidationExceptionRes(parsedOutput, context);
3939
3738
  default:
3940
3739
  const parsedBody = parsedOutput.body;
3941
- (0, smithy_client_1.throwDefaultError)({
3740
+ return throwDefaultError({
3942
3741
  output,
3943
3742
  parsedBody,
3944
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3945
3743
  errorCode,
3946
3744
  });
3947
3745
  }
@@ -3950,13 +3748,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
3950
3748
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3951
3749
  return de_ListTagsForResourceCommandError(output, context);
3952
3750
  }
3953
- const contents = map({
3751
+ const contents = (0, smithy_client_1.map)({
3954
3752
  $metadata: deserializeMetadata(output),
3955
3753
  });
3956
3754
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3957
- if (data.Tags != null) {
3958
- contents.Tags = de_TagMap(data.Tags, context);
3959
- }
3755
+ const doc = (0, smithy_client_1.take)(data, {
3756
+ Tags: smithy_client_1._json,
3757
+ });
3758
+ Object.assign(contents, doc);
3960
3759
  return contents;
3961
3760
  };
3962
3761
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -3984,10 +3783,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
3984
3783
  throw await de_ValidationExceptionRes(parsedOutput, context);
3985
3784
  default:
3986
3785
  const parsedBody = parsedOutput.body;
3987
- (0, smithy_client_1.throwDefaultError)({
3786
+ return throwDefaultError({
3988
3787
  output,
3989
3788
  parsedBody,
3990
- exceptionCtor: LocationServiceException_1.LocationServiceException,
3991
3789
  errorCode,
3992
3790
  });
3993
3791
  }
@@ -3996,16 +3794,15 @@ const de_ListTrackerConsumersCommand = async (output, context) => {
3996
3794
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3997
3795
  return de_ListTrackerConsumersCommandError(output, context);
3998
3796
  }
3999
- const contents = map({
3797
+ const contents = (0, smithy_client_1.map)({
4000
3798
  $metadata: deserializeMetadata(output),
4001
3799
  });
4002
3800
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4003
- if (data.ConsumerArns != null) {
4004
- contents.ConsumerArns = de_ArnList(data.ConsumerArns, context);
4005
- }
4006
- if (data.NextToken != null) {
4007
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4008
- }
3801
+ const doc = (0, smithy_client_1.take)(data, {
3802
+ ConsumerArns: smithy_client_1._json,
3803
+ NextToken: smithy_client_1.expectString,
3804
+ });
3805
+ Object.assign(contents, doc);
4009
3806
  return contents;
4010
3807
  };
4011
3808
  exports.de_ListTrackerConsumersCommand = de_ListTrackerConsumersCommand;
@@ -4033,10 +3830,9 @@ const de_ListTrackerConsumersCommandError = async (output, context) => {
4033
3830
  throw await de_ValidationExceptionRes(parsedOutput, context);
4034
3831
  default:
4035
3832
  const parsedBody = parsedOutput.body;
4036
- (0, smithy_client_1.throwDefaultError)({
3833
+ return throwDefaultError({
4037
3834
  output,
4038
3835
  parsedBody,
4039
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4040
3836
  errorCode,
4041
3837
  });
4042
3838
  }
@@ -4045,16 +3841,15 @@ const de_ListTrackersCommand = async (output, context) => {
4045
3841
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4046
3842
  return de_ListTrackersCommandError(output, context);
4047
3843
  }
4048
- const contents = map({
3844
+ const contents = (0, smithy_client_1.map)({
4049
3845
  $metadata: deserializeMetadata(output),
4050
3846
  });
4051
3847
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4052
- if (data.Entries != null) {
4053
- contents.Entries = de_ListTrackersResponseEntryList(data.Entries, context);
4054
- }
4055
- if (data.NextToken != null) {
4056
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4057
- }
3848
+ const doc = (0, smithy_client_1.take)(data, {
3849
+ Entries: (_) => de_ListTrackersResponseEntryList(_, context),
3850
+ NextToken: smithy_client_1.expectString,
3851
+ });
3852
+ Object.assign(contents, doc);
4058
3853
  return contents;
4059
3854
  };
4060
3855
  exports.de_ListTrackersCommand = de_ListTrackersCommand;
@@ -4079,10 +3874,9 @@ const de_ListTrackersCommandError = async (output, context) => {
4079
3874
  throw await de_ValidationExceptionRes(parsedOutput, context);
4080
3875
  default:
4081
3876
  const parsedBody = parsedOutput.body;
4082
- (0, smithy_client_1.throwDefaultError)({
3877
+ return throwDefaultError({
4083
3878
  output,
4084
3879
  parsedBody,
4085
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4086
3880
  errorCode,
4087
3881
  });
4088
3882
  }
@@ -4091,19 +3885,16 @@ const de_PutGeofenceCommand = async (output, context) => {
4091
3885
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4092
3886
  return de_PutGeofenceCommandError(output, context);
4093
3887
  }
4094
- const contents = map({
3888
+ const contents = (0, smithy_client_1.map)({
4095
3889
  $metadata: deserializeMetadata(output),
4096
3890
  });
4097
3891
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4098
- if (data.CreateTime != null) {
4099
- contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
4100
- }
4101
- if (data.GeofenceId != null) {
4102
- contents.GeofenceId = (0, smithy_client_1.expectString)(data.GeofenceId);
4103
- }
4104
- if (data.UpdateTime != null) {
4105
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4106
- }
3892
+ const doc = (0, smithy_client_1.take)(data, {
3893
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3894
+ GeofenceId: smithy_client_1.expectString,
3895
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3896
+ });
3897
+ Object.assign(contents, doc);
4107
3898
  return contents;
4108
3899
  };
4109
3900
  exports.de_PutGeofenceCommand = de_PutGeofenceCommand;
@@ -4134,10 +3925,9 @@ const de_PutGeofenceCommandError = async (output, context) => {
4134
3925
  throw await de_ValidationExceptionRes(parsedOutput, context);
4135
3926
  default:
4136
3927
  const parsedBody = parsedOutput.body;
4137
- (0, smithy_client_1.throwDefaultError)({
3928
+ return throwDefaultError({
4138
3929
  output,
4139
3930
  parsedBody,
4140
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4141
3931
  errorCode,
4142
3932
  });
4143
3933
  }
@@ -4146,16 +3936,15 @@ const de_SearchPlaceIndexForPositionCommand = async (output, context) => {
4146
3936
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4147
3937
  return de_SearchPlaceIndexForPositionCommandError(output, context);
4148
3938
  }
4149
- const contents = map({
3939
+ const contents = (0, smithy_client_1.map)({
4150
3940
  $metadata: deserializeMetadata(output),
4151
3941
  });
4152
3942
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4153
- if (data.Results != null) {
4154
- contents.Results = de_SearchForPositionResultList(data.Results, context);
4155
- }
4156
- if (data.Summary != null) {
4157
- contents.Summary = de_SearchPlaceIndexForPositionSummary(data.Summary, context);
4158
- }
3943
+ const doc = (0, smithy_client_1.take)(data, {
3944
+ Results: (_) => de_SearchForPositionResultList(_, context),
3945
+ Summary: (_) => de_SearchPlaceIndexForPositionSummary(_, context),
3946
+ });
3947
+ Object.assign(contents, doc);
4159
3948
  return contents;
4160
3949
  };
4161
3950
  exports.de_SearchPlaceIndexForPositionCommand = de_SearchPlaceIndexForPositionCommand;
@@ -4183,10 +3972,9 @@ const de_SearchPlaceIndexForPositionCommandError = async (output, context) => {
4183
3972
  throw await de_ValidationExceptionRes(parsedOutput, context);
4184
3973
  default:
4185
3974
  const parsedBody = parsedOutput.body;
4186
- (0, smithy_client_1.throwDefaultError)({
3975
+ return throwDefaultError({
4187
3976
  output,
4188
3977
  parsedBody,
4189
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4190
3978
  errorCode,
4191
3979
  });
4192
3980
  }
@@ -4195,16 +3983,15 @@ const de_SearchPlaceIndexForSuggestionsCommand = async (output, context) => {
4195
3983
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4196
3984
  return de_SearchPlaceIndexForSuggestionsCommandError(output, context);
4197
3985
  }
4198
- const contents = map({
3986
+ const contents = (0, smithy_client_1.map)({
4199
3987
  $metadata: deserializeMetadata(output),
4200
3988
  });
4201
3989
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4202
- if (data.Results != null) {
4203
- contents.Results = de_SearchForSuggestionsResultList(data.Results, context);
4204
- }
4205
- if (data.Summary != null) {
4206
- contents.Summary = de_SearchPlaceIndexForSuggestionsSummary(data.Summary, context);
4207
- }
3990
+ const doc = (0, smithy_client_1.take)(data, {
3991
+ Results: smithy_client_1._json,
3992
+ Summary: (_) => de_SearchPlaceIndexForSuggestionsSummary(_, context),
3993
+ });
3994
+ Object.assign(contents, doc);
4208
3995
  return contents;
4209
3996
  };
4210
3997
  exports.de_SearchPlaceIndexForSuggestionsCommand = de_SearchPlaceIndexForSuggestionsCommand;
@@ -4232,10 +4019,9 @@ const de_SearchPlaceIndexForSuggestionsCommandError = async (output, context) =>
4232
4019
  throw await de_ValidationExceptionRes(parsedOutput, context);
4233
4020
  default:
4234
4021
  const parsedBody = parsedOutput.body;
4235
- (0, smithy_client_1.throwDefaultError)({
4022
+ return throwDefaultError({
4236
4023
  output,
4237
4024
  parsedBody,
4238
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4239
4025
  errorCode,
4240
4026
  });
4241
4027
  }
@@ -4244,16 +4030,15 @@ const de_SearchPlaceIndexForTextCommand = async (output, context) => {
4244
4030
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4245
4031
  return de_SearchPlaceIndexForTextCommandError(output, context);
4246
4032
  }
4247
- const contents = map({
4033
+ const contents = (0, smithy_client_1.map)({
4248
4034
  $metadata: deserializeMetadata(output),
4249
4035
  });
4250
4036
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4251
- if (data.Results != null) {
4252
- contents.Results = de_SearchForTextResultList(data.Results, context);
4253
- }
4254
- if (data.Summary != null) {
4255
- contents.Summary = de_SearchPlaceIndexForTextSummary(data.Summary, context);
4256
- }
4037
+ const doc = (0, smithy_client_1.take)(data, {
4038
+ Results: (_) => de_SearchForTextResultList(_, context),
4039
+ Summary: (_) => de_SearchPlaceIndexForTextSummary(_, context),
4040
+ });
4041
+ Object.assign(contents, doc);
4257
4042
  return contents;
4258
4043
  };
4259
4044
  exports.de_SearchPlaceIndexForTextCommand = de_SearchPlaceIndexForTextCommand;
@@ -4281,10 +4066,9 @@ const de_SearchPlaceIndexForTextCommandError = async (output, context) => {
4281
4066
  throw await de_ValidationExceptionRes(parsedOutput, context);
4282
4067
  default:
4283
4068
  const parsedBody = parsedOutput.body;
4284
- (0, smithy_client_1.throwDefaultError)({
4069
+ return throwDefaultError({
4285
4070
  output,
4286
4071
  parsedBody,
4287
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4288
4072
  errorCode,
4289
4073
  });
4290
4074
  }
@@ -4293,7 +4077,7 @@ const de_TagResourceCommand = async (output, context) => {
4293
4077
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4294
4078
  return de_TagResourceCommandError(output, context);
4295
4079
  }
4296
- const contents = map({
4080
+ const contents = (0, smithy_client_1.map)({
4297
4081
  $metadata: deserializeMetadata(output),
4298
4082
  });
4299
4083
  await collectBody(output.body, context);
@@ -4324,10 +4108,9 @@ const de_TagResourceCommandError = async (output, context) => {
4324
4108
  throw await de_ValidationExceptionRes(parsedOutput, context);
4325
4109
  default:
4326
4110
  const parsedBody = parsedOutput.body;
4327
- (0, smithy_client_1.throwDefaultError)({
4111
+ return throwDefaultError({
4328
4112
  output,
4329
4113
  parsedBody,
4330
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4331
4114
  errorCode,
4332
4115
  });
4333
4116
  }
@@ -4336,7 +4119,7 @@ const de_UntagResourceCommand = async (output, context) => {
4336
4119
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4337
4120
  return de_UntagResourceCommandError(output, context);
4338
4121
  }
4339
- const contents = map({
4122
+ const contents = (0, smithy_client_1.map)({
4340
4123
  $metadata: deserializeMetadata(output),
4341
4124
  });
4342
4125
  await collectBody(output.body, context);
@@ -4367,10 +4150,9 @@ const de_UntagResourceCommandError = async (output, context) => {
4367
4150
  throw await de_ValidationExceptionRes(parsedOutput, context);
4368
4151
  default:
4369
4152
  const parsedBody = parsedOutput.body;
4370
- (0, smithy_client_1.throwDefaultError)({
4153
+ return throwDefaultError({
4371
4154
  output,
4372
4155
  parsedBody,
4373
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4374
4156
  errorCode,
4375
4157
  });
4376
4158
  }
@@ -4379,19 +4161,16 @@ const de_UpdateGeofenceCollectionCommand = async (output, context) => {
4379
4161
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4380
4162
  return de_UpdateGeofenceCollectionCommandError(output, context);
4381
4163
  }
4382
- const contents = map({
4164
+ const contents = (0, smithy_client_1.map)({
4383
4165
  $metadata: deserializeMetadata(output),
4384
4166
  });
4385
4167
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4386
- if (data.CollectionArn != null) {
4387
- contents.CollectionArn = (0, smithy_client_1.expectString)(data.CollectionArn);
4388
- }
4389
- if (data.CollectionName != null) {
4390
- contents.CollectionName = (0, smithy_client_1.expectString)(data.CollectionName);
4391
- }
4392
- if (data.UpdateTime != null) {
4393
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4394
- }
4168
+ const doc = (0, smithy_client_1.take)(data, {
4169
+ CollectionArn: smithy_client_1.expectString,
4170
+ CollectionName: smithy_client_1.expectString,
4171
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4172
+ });
4173
+ Object.assign(contents, doc);
4395
4174
  return contents;
4396
4175
  };
4397
4176
  exports.de_UpdateGeofenceCollectionCommand = de_UpdateGeofenceCollectionCommand;
@@ -4419,10 +4198,9 @@ const de_UpdateGeofenceCollectionCommandError = async (output, context) => {
4419
4198
  throw await de_ValidationExceptionRes(parsedOutput, context);
4420
4199
  default:
4421
4200
  const parsedBody = parsedOutput.body;
4422
- (0, smithy_client_1.throwDefaultError)({
4201
+ return throwDefaultError({
4423
4202
  output,
4424
4203
  parsedBody,
4425
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4426
4204
  errorCode,
4427
4205
  });
4428
4206
  }
@@ -4431,19 +4209,16 @@ const de_UpdateKeyCommand = async (output, context) => {
4431
4209
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4432
4210
  return de_UpdateKeyCommandError(output, context);
4433
4211
  }
4434
- const contents = map({
4212
+ const contents = (0, smithy_client_1.map)({
4435
4213
  $metadata: deserializeMetadata(output),
4436
4214
  });
4437
4215
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4438
- if (data.KeyArn != null) {
4439
- contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
4440
- }
4441
- if (data.KeyName != null) {
4442
- contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
4443
- }
4444
- if (data.UpdateTime != null) {
4445
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4446
- }
4216
+ const doc = (0, smithy_client_1.take)(data, {
4217
+ KeyArn: smithy_client_1.expectString,
4218
+ KeyName: smithy_client_1.expectString,
4219
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4220
+ });
4221
+ Object.assign(contents, doc);
4447
4222
  return contents;
4448
4223
  };
4449
4224
  exports.de_UpdateKeyCommand = de_UpdateKeyCommand;
@@ -4471,10 +4246,9 @@ const de_UpdateKeyCommandError = async (output, context) => {
4471
4246
  throw await de_ValidationExceptionRes(parsedOutput, context);
4472
4247
  default:
4473
4248
  const parsedBody = parsedOutput.body;
4474
- (0, smithy_client_1.throwDefaultError)({
4249
+ return throwDefaultError({
4475
4250
  output,
4476
4251
  parsedBody,
4477
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4478
4252
  errorCode,
4479
4253
  });
4480
4254
  }
@@ -4483,19 +4257,16 @@ const de_UpdateMapCommand = async (output, context) => {
4483
4257
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4484
4258
  return de_UpdateMapCommandError(output, context);
4485
4259
  }
4486
- const contents = map({
4260
+ const contents = (0, smithy_client_1.map)({
4487
4261
  $metadata: deserializeMetadata(output),
4488
4262
  });
4489
4263
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4490
- if (data.MapArn != null) {
4491
- contents.MapArn = (0, smithy_client_1.expectString)(data.MapArn);
4492
- }
4493
- if (data.MapName != null) {
4494
- contents.MapName = (0, smithy_client_1.expectString)(data.MapName);
4495
- }
4496
- if (data.UpdateTime != null) {
4497
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4498
- }
4264
+ const doc = (0, smithy_client_1.take)(data, {
4265
+ MapArn: smithy_client_1.expectString,
4266
+ MapName: smithy_client_1.expectString,
4267
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4268
+ });
4269
+ Object.assign(contents, doc);
4499
4270
  return contents;
4500
4271
  };
4501
4272
  exports.de_UpdateMapCommand = de_UpdateMapCommand;
@@ -4523,10 +4294,9 @@ const de_UpdateMapCommandError = async (output, context) => {
4523
4294
  throw await de_ValidationExceptionRes(parsedOutput, context);
4524
4295
  default:
4525
4296
  const parsedBody = parsedOutput.body;
4526
- (0, smithy_client_1.throwDefaultError)({
4297
+ return throwDefaultError({
4527
4298
  output,
4528
4299
  parsedBody,
4529
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4530
4300
  errorCode,
4531
4301
  });
4532
4302
  }
@@ -4535,19 +4305,16 @@ const de_UpdatePlaceIndexCommand = async (output, context) => {
4535
4305
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4536
4306
  return de_UpdatePlaceIndexCommandError(output, context);
4537
4307
  }
4538
- const contents = map({
4308
+ const contents = (0, smithy_client_1.map)({
4539
4309
  $metadata: deserializeMetadata(output),
4540
4310
  });
4541
4311
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4542
- if (data.IndexArn != null) {
4543
- contents.IndexArn = (0, smithy_client_1.expectString)(data.IndexArn);
4544
- }
4545
- if (data.IndexName != null) {
4546
- contents.IndexName = (0, smithy_client_1.expectString)(data.IndexName);
4547
- }
4548
- if (data.UpdateTime != null) {
4549
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4550
- }
4312
+ const doc = (0, smithy_client_1.take)(data, {
4313
+ IndexArn: smithy_client_1.expectString,
4314
+ IndexName: smithy_client_1.expectString,
4315
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4316
+ });
4317
+ Object.assign(contents, doc);
4551
4318
  return contents;
4552
4319
  };
4553
4320
  exports.de_UpdatePlaceIndexCommand = de_UpdatePlaceIndexCommand;
@@ -4575,10 +4342,9 @@ const de_UpdatePlaceIndexCommandError = async (output, context) => {
4575
4342
  throw await de_ValidationExceptionRes(parsedOutput, context);
4576
4343
  default:
4577
4344
  const parsedBody = parsedOutput.body;
4578
- (0, smithy_client_1.throwDefaultError)({
4345
+ return throwDefaultError({
4579
4346
  output,
4580
4347
  parsedBody,
4581
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4582
4348
  errorCode,
4583
4349
  });
4584
4350
  }
@@ -4587,19 +4353,16 @@ const de_UpdateRouteCalculatorCommand = async (output, context) => {
4587
4353
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4588
4354
  return de_UpdateRouteCalculatorCommandError(output, context);
4589
4355
  }
4590
- const contents = map({
4356
+ const contents = (0, smithy_client_1.map)({
4591
4357
  $metadata: deserializeMetadata(output),
4592
4358
  });
4593
4359
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4594
- if (data.CalculatorArn != null) {
4595
- contents.CalculatorArn = (0, smithy_client_1.expectString)(data.CalculatorArn);
4596
- }
4597
- if (data.CalculatorName != null) {
4598
- contents.CalculatorName = (0, smithy_client_1.expectString)(data.CalculatorName);
4599
- }
4600
- if (data.UpdateTime != null) {
4601
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4602
- }
4360
+ const doc = (0, smithy_client_1.take)(data, {
4361
+ CalculatorArn: smithy_client_1.expectString,
4362
+ CalculatorName: smithy_client_1.expectString,
4363
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4364
+ });
4365
+ Object.assign(contents, doc);
4603
4366
  return contents;
4604
4367
  };
4605
4368
  exports.de_UpdateRouteCalculatorCommand = de_UpdateRouteCalculatorCommand;
@@ -4627,10 +4390,9 @@ const de_UpdateRouteCalculatorCommandError = async (output, context) => {
4627
4390
  throw await de_ValidationExceptionRes(parsedOutput, context);
4628
4391
  default:
4629
4392
  const parsedBody = parsedOutput.body;
4630
- (0, smithy_client_1.throwDefaultError)({
4393
+ return throwDefaultError({
4631
4394
  output,
4632
4395
  parsedBody,
4633
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4634
4396
  errorCode,
4635
4397
  });
4636
4398
  }
@@ -4639,19 +4401,16 @@ const de_UpdateTrackerCommand = async (output, context) => {
4639
4401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4640
4402
  return de_UpdateTrackerCommandError(output, context);
4641
4403
  }
4642
- const contents = map({
4404
+ const contents = (0, smithy_client_1.map)({
4643
4405
  $metadata: deserializeMetadata(output),
4644
4406
  });
4645
4407
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4646
- if (data.TrackerArn != null) {
4647
- contents.TrackerArn = (0, smithy_client_1.expectString)(data.TrackerArn);
4648
- }
4649
- if (data.TrackerName != null) {
4650
- contents.TrackerName = (0, smithy_client_1.expectString)(data.TrackerName);
4651
- }
4652
- if (data.UpdateTime != null) {
4653
- contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
4654
- }
4408
+ const doc = (0, smithy_client_1.take)(data, {
4409
+ TrackerArn: smithy_client_1.expectString,
4410
+ TrackerName: smithy_client_1.expectString,
4411
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4412
+ });
4413
+ Object.assign(contents, doc);
4655
4414
  return contents;
4656
4415
  };
4657
4416
  exports.de_UpdateTrackerCommand = de_UpdateTrackerCommand;
@@ -4679,21 +4438,21 @@ const de_UpdateTrackerCommandError = async (output, context) => {
4679
4438
  throw await de_ValidationExceptionRes(parsedOutput, context);
4680
4439
  default:
4681
4440
  const parsedBody = parsedOutput.body;
4682
- (0, smithy_client_1.throwDefaultError)({
4441
+ return throwDefaultError({
4683
4442
  output,
4684
4443
  parsedBody,
4685
- exceptionCtor: LocationServiceException_1.LocationServiceException,
4686
4444
  errorCode,
4687
4445
  });
4688
4446
  }
4689
4447
  };
4690
- const map = smithy_client_1.map;
4448
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(LocationServiceException_1.LocationServiceException);
4691
4449
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
4692
- const contents = map({});
4450
+ const contents = (0, smithy_client_1.map)({});
4693
4451
  const data = parsedOutput.body;
4694
- if (data.message != null) {
4695
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4696
- }
4452
+ const doc = (0, smithy_client_1.take)(data, {
4453
+ Message: [, smithy_client_1.expectString, `message`],
4454
+ });
4455
+ Object.assign(contents, doc);
4697
4456
  const exception = new models_0_1.AccessDeniedException({
4698
4457
  $metadata: deserializeMetadata(parsedOutput),
4699
4458
  ...contents,
@@ -4701,11 +4460,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
4701
4460
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4702
4461
  };
4703
4462
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
4704
- const contents = map({});
4463
+ const contents = (0, smithy_client_1.map)({});
4705
4464
  const data = parsedOutput.body;
4706
- if (data.message != null) {
4707
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4708
- }
4465
+ const doc = (0, smithy_client_1.take)(data, {
4466
+ Message: [, smithy_client_1.expectString, `message`],
4467
+ });
4468
+ Object.assign(contents, doc);
4709
4469
  const exception = new models_0_1.ConflictException({
4710
4470
  $metadata: deserializeMetadata(parsedOutput),
4711
4471
  ...contents,
@@ -4713,11 +4473,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
4713
4473
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4714
4474
  };
4715
4475
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4716
- const contents = map({});
4476
+ const contents = (0, smithy_client_1.map)({});
4717
4477
  const data = parsedOutput.body;
4718
- if (data.message != null) {
4719
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4720
- }
4478
+ const doc = (0, smithy_client_1.take)(data, {
4479
+ Message: [, smithy_client_1.expectString, `message`],
4480
+ });
4481
+ Object.assign(contents, doc);
4721
4482
  const exception = new models_0_1.InternalServerException({
4722
4483
  $metadata: deserializeMetadata(parsedOutput),
4723
4484
  ...contents,
@@ -4725,11 +4486,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4725
4486
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4726
4487
  };
4727
4488
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4728
- const contents = map({});
4489
+ const contents = (0, smithy_client_1.map)({});
4729
4490
  const data = parsedOutput.body;
4730
- if (data.message != null) {
4731
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4732
- }
4491
+ const doc = (0, smithy_client_1.take)(data, {
4492
+ Message: [, smithy_client_1.expectString, `message`],
4493
+ });
4494
+ Object.assign(contents, doc);
4733
4495
  const exception = new models_0_1.ResourceNotFoundException({
4734
4496
  $metadata: deserializeMetadata(parsedOutput),
4735
4497
  ...contents,
@@ -4737,11 +4499,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4737
4499
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4738
4500
  };
4739
4501
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4740
- const contents = map({});
4502
+ const contents = (0, smithy_client_1.map)({});
4741
4503
  const data = parsedOutput.body;
4742
- if (data.message != null) {
4743
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4744
- }
4504
+ const doc = (0, smithy_client_1.take)(data, {
4505
+ Message: [, smithy_client_1.expectString, `message`],
4506
+ });
4507
+ Object.assign(contents, doc);
4745
4508
  const exception = new models_0_1.ServiceQuotaExceededException({
4746
4509
  $metadata: deserializeMetadata(parsedOutput),
4747
4510
  ...contents,
@@ -4749,11 +4512,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4749
4512
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4750
4513
  };
4751
4514
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4752
- const contents = map({});
4515
+ const contents = (0, smithy_client_1.map)({});
4753
4516
  const data = parsedOutput.body;
4754
- if (data.message != null) {
4755
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4756
- }
4517
+ const doc = (0, smithy_client_1.take)(data, {
4518
+ Message: [, smithy_client_1.expectString, `message`],
4519
+ });
4520
+ Object.assign(contents, doc);
4757
4521
  const exception = new models_0_1.ThrottlingException({
4758
4522
  $metadata: deserializeMetadata(parsedOutput),
4759
4523
  ...contents,
@@ -4761,47 +4525,25 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4761
4525
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4762
4526
  };
4763
4527
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
4764
- const contents = map({});
4528
+ const contents = (0, smithy_client_1.map)({});
4765
4529
  const data = parsedOutput.body;
4766
- if (data.fieldList != null) {
4767
- contents.FieldList = de_ValidationExceptionFieldList(data.fieldList, context);
4768
- }
4769
- if (data.message != null) {
4770
- contents.Message = (0, smithy_client_1.expectString)(data.message);
4771
- }
4772
- if (data.reason != null) {
4773
- contents.Reason = (0, smithy_client_1.expectString)(data.reason);
4774
- }
4530
+ const doc = (0, smithy_client_1.take)(data, {
4531
+ FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`],
4532
+ Message: [, smithy_client_1.expectString, `message`],
4533
+ Reason: [, smithy_client_1.expectString, `reason`],
4534
+ });
4535
+ Object.assign(contents, doc);
4775
4536
  const exception = new models_0_1.ValidationException({
4776
4537
  $metadata: deserializeMetadata(parsedOutput),
4777
4538
  ...contents,
4778
4539
  });
4779
4540
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4780
4541
  };
4781
- const se_ApiKeyActionList = (input, context) => {
4782
- return input
4783
- .filter((e) => e != null)
4784
- .map((entry) => {
4785
- return entry;
4786
- });
4787
- };
4788
- const se_ApiKeyFilter = (input, context) => {
4789
- return {
4790
- ...(input.KeyStatus != null && { KeyStatus: input.KeyStatus }),
4791
- };
4792
- };
4793
- const se_ApiKeyRestrictions = (input, context) => {
4794
- return {
4795
- ...(input.AllowActions != null && { AllowActions: se_ApiKeyActionList(input.AllowActions, context) }),
4796
- ...(input.AllowReferers != null && { AllowReferers: se_RefererPatternList(input.AllowReferers, context) }),
4797
- ...(input.AllowResources != null && { AllowResources: se_GeoArnList(input.AllowResources, context) }),
4798
- };
4799
- };
4800
4542
  const se_BatchPutGeofenceRequestEntry = (input, context) => {
4801
- return {
4802
- ...(input.GeofenceId != null && { GeofenceId: input.GeofenceId }),
4803
- ...(input.Geometry != null && { Geometry: se_GeofenceGeometry(input.Geometry, context) }),
4804
- };
4543
+ return (0, smithy_client_1.take)(input, {
4544
+ GeofenceId: [],
4545
+ Geometry: (_) => se_GeofenceGeometry(_, context),
4546
+ });
4805
4547
  };
4806
4548
  const se_BatchPutGeofenceRequestEntryList = (input, context) => {
4807
4549
  return input
@@ -4817,53 +4559,28 @@ const se_BoundingBox = (input, context) => {
4817
4559
  return (0, smithy_client_1.serializeFloat)(entry);
4818
4560
  });
4819
4561
  };
4820
- const se_CalculateRouteCarModeOptions = (input, context) => {
4821
- return {
4822
- ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }),
4823
- ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }),
4824
- };
4825
- };
4826
4562
  const se_CalculateRouteTruckModeOptions = (input, context) => {
4827
- return {
4828
- ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }),
4829
- ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }),
4830
- ...(input.Dimensions != null && { Dimensions: se_TruckDimensions(input.Dimensions, context) }),
4831
- ...(input.Weight != null && { Weight: se_TruckWeight(input.Weight, context) }),
4832
- };
4833
- };
4834
- const se_Circle = (input, context) => {
4835
- return {
4836
- ...(input.Center != null && { Center: se_Position(input.Center, context) }),
4837
- ...(input.Radius != null && { Radius: (0, smithy_client_1.serializeFloat)(input.Radius) }),
4838
- };
4839
- };
4840
- const se_CountryCodeList = (input, context) => {
4841
- return input
4842
- .filter((e) => e != null)
4843
- .map((entry) => {
4844
- return entry;
4563
+ return (0, smithy_client_1.take)(input, {
4564
+ AvoidFerries: [],
4565
+ AvoidTolls: [],
4566
+ Dimensions: (_) => se_TruckDimensions(_, context),
4567
+ Weight: (_) => se_TruckWeight(_, context),
4845
4568
  });
4846
4569
  };
4847
- const se_DataSourceConfiguration = (input, context) => {
4848
- return {
4849
- ...(input.IntendedUse != null && { IntendedUse: input.IntendedUse }),
4850
- };
4851
- };
4852
- const se_DeviceIdsList = (input, context) => {
4853
- return input
4854
- .filter((e) => e != null)
4855
- .map((entry) => {
4856
- return entry;
4570
+ const se_Circle = (input, context) => {
4571
+ return (0, smithy_client_1.take)(input, {
4572
+ Center: (_) => se_Position(_, context),
4573
+ Radius: smithy_client_1.serializeFloat,
4857
4574
  });
4858
4575
  };
4859
4576
  const se_DevicePositionUpdate = (input, context) => {
4860
- return {
4861
- ...(input.Accuracy != null && { Accuracy: se_PositionalAccuracy(input.Accuracy, context) }),
4862
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
4863
- ...(input.Position != null && { Position: se_Position(input.Position, context) }),
4864
- ...(input.PositionProperties != null && { PositionProperties: se_PropertyMap(input.PositionProperties, context) }),
4865
- ...(input.SampleTime != null && { SampleTime: input.SampleTime.toISOString().split(".")[0] + "Z" }),
4866
- };
4577
+ return (0, smithy_client_1.take)(input, {
4578
+ Accuracy: (_) => se_PositionalAccuracy(_, context),
4579
+ DeviceId: [],
4580
+ Position: (_) => se_Position(_, context),
4581
+ PositionProperties: smithy_client_1._json,
4582
+ SampleTime: (_) => _.toISOString().split(".")[0] + "Z",
4583
+ });
4867
4584
  };
4868
4585
  const se_DevicePositionUpdateList = (input, context) => {
4869
4586
  return input
@@ -4872,24 +4589,10 @@ const se_DevicePositionUpdateList = (input, context) => {
4872
4589
  return se_DevicePositionUpdate(entry, context);
4873
4590
  });
4874
4591
  };
4875
- const se_GeoArnList = (input, context) => {
4876
- return input
4877
- .filter((e) => e != null)
4878
- .map((entry) => {
4879
- return entry;
4880
- });
4881
- };
4882
4592
  const se_GeofenceGeometry = (input, context) => {
4883
- return {
4884
- ...(input.Circle != null && { Circle: se_Circle(input.Circle, context) }),
4885
- ...(input.Polygon != null && { Polygon: se_LinearRings(input.Polygon, context) }),
4886
- };
4887
- };
4888
- const se_IdList = (input, context) => {
4889
- return input
4890
- .filter((e) => e != null)
4891
- .map((entry) => {
4892
- return entry;
4593
+ return (0, smithy_client_1.take)(input, {
4594
+ Circle: (_) => se_Circle(_, context),
4595
+ Polygon: (_) => se_LinearRings(_, context),
4893
4596
  });
4894
4597
  };
4895
4598
  const se_LinearRing = (input, context) => {
@@ -4906,11 +4609,6 @@ const se_LinearRings = (input, context) => {
4906
4609
  return se_LinearRing(entry, context);
4907
4610
  });
4908
4611
  };
4909
- const se_MapConfiguration = (input, context) => {
4910
- return {
4911
- ...(input.Style != null && { Style: input.Style }),
4912
- };
4913
- };
4914
4612
  const se_Position = (input, context) => {
4915
4613
  return input
4916
4614
  .filter((e) => e != null)
@@ -4919,9 +4617,9 @@ const se_Position = (input, context) => {
4919
4617
  });
4920
4618
  };
4921
4619
  const se_PositionalAccuracy = (input, context) => {
4922
- return {
4923
- ...(input.Horizontal != null && { Horizontal: (0, smithy_client_1.serializeFloat)(input.Horizontal) }),
4924
- };
4620
+ return (0, smithy_client_1.take)(input, {
4621
+ Horizontal: smithy_client_1.serializeFloat,
4622
+ });
4925
4623
  };
4926
4624
  const se_PositionList = (input, context) => {
4927
4625
  return input
@@ -4930,44 +4628,19 @@ const se_PositionList = (input, context) => {
4930
4628
  return se_Position(entry, context);
4931
4629
  });
4932
4630
  };
4933
- const se_PropertyMap = (input, context) => {
4934
- return Object.entries(input).reduce((acc, [key, value]) => {
4935
- if (value === null) {
4936
- return acc;
4937
- }
4938
- acc[key] = value;
4939
- return acc;
4940
- }, {});
4941
- };
4942
- const se_RefererPatternList = (input, context) => {
4943
- return input
4944
- .filter((e) => e != null)
4945
- .map((entry) => {
4946
- return entry;
4947
- });
4948
- };
4949
- const se_TagMap = (input, context) => {
4950
- return Object.entries(input).reduce((acc, [key, value]) => {
4951
- if (value === null) {
4952
- return acc;
4953
- }
4954
- acc[key] = value;
4955
- return acc;
4956
- }, {});
4957
- };
4958
4631
  const se_TruckDimensions = (input, context) => {
4959
- return {
4960
- ...(input.Height != null && { Height: (0, smithy_client_1.serializeFloat)(input.Height) }),
4961
- ...(input.Length != null && { Length: (0, smithy_client_1.serializeFloat)(input.Length) }),
4962
- ...(input.Unit != null && { Unit: input.Unit }),
4963
- ...(input.Width != null && { Width: (0, smithy_client_1.serializeFloat)(input.Width) }),
4964
- };
4632
+ return (0, smithy_client_1.take)(input, {
4633
+ Height: smithy_client_1.serializeFloat,
4634
+ Length: smithy_client_1.serializeFloat,
4635
+ Unit: [],
4636
+ Width: smithy_client_1.serializeFloat,
4637
+ });
4965
4638
  };
4966
4639
  const se_TruckWeight = (input, context) => {
4967
- return {
4968
- ...(input.Total != null && { Total: (0, smithy_client_1.serializeFloat)(input.Total) }),
4969
- ...(input.Unit != null && { Unit: input.Unit }),
4970
- };
4640
+ return (0, smithy_client_1.take)(input, {
4641
+ Total: smithy_client_1.serializeFloat,
4642
+ Unit: [],
4643
+ });
4971
4644
  };
4972
4645
  const se_WaypointPositionList = (input, context) => {
4973
4646
  return input
@@ -4976,159 +4649,47 @@ const se_WaypointPositionList = (input, context) => {
4976
4649
  return se_Position(entry, context);
4977
4650
  });
4978
4651
  };
4979
- const de_ApiKeyActionList = (output, context) => {
4980
- const retVal = (output || [])
4981
- .filter((e) => e != null)
4982
- .map((entry) => {
4983
- if (entry === null) {
4984
- return null;
4985
- }
4986
- return (0, smithy_client_1.expectString)(entry);
4987
- });
4988
- return retVal;
4989
- };
4990
- const de_ApiKeyRestrictions = (output, context) => {
4991
- return {
4992
- AllowActions: output.AllowActions != null ? de_ApiKeyActionList(output.AllowActions, context) : undefined,
4993
- AllowReferers: output.AllowReferers != null ? de_RefererPatternList(output.AllowReferers, context) : undefined,
4994
- AllowResources: output.AllowResources != null ? de_GeoArnList(output.AllowResources, context) : undefined,
4995
- };
4996
- };
4997
- const de_ArnList = (output, context) => {
4998
- const retVal = (output || [])
4999
- .filter((e) => e != null)
5000
- .map((entry) => {
5001
- if (entry === null) {
5002
- return null;
5003
- }
5004
- return (0, smithy_client_1.expectString)(entry);
5005
- });
5006
- return retVal;
5007
- };
5008
- const de_BatchDeleteDevicePositionHistoryError = (output, context) => {
5009
- return {
5010
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5011
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5012
- };
5013
- };
5014
- const de_BatchDeleteDevicePositionHistoryErrorList = (output, context) => {
5015
- const retVal = (output || [])
5016
- .filter((e) => e != null)
5017
- .map((entry) => {
5018
- if (entry === null) {
5019
- return null;
5020
- }
5021
- return de_BatchDeleteDevicePositionHistoryError(entry, context);
5022
- });
5023
- return retVal;
5024
- };
5025
- const de_BatchDeleteGeofenceError = (output, context) => {
5026
- return {
5027
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5028
- GeofenceId: (0, smithy_client_1.expectString)(output.GeofenceId),
5029
- };
5030
- };
5031
- const de_BatchDeleteGeofenceErrorList = (output, context) => {
5032
- const retVal = (output || [])
5033
- .filter((e) => e != null)
5034
- .map((entry) => {
5035
- if (entry === null) {
5036
- return null;
5037
- }
5038
- return de_BatchDeleteGeofenceError(entry, context);
5039
- });
5040
- return retVal;
5041
- };
5042
4652
  const de_BatchEvaluateGeofencesError = (output, context) => {
5043
- return {
5044
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5045
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5046
- SampleTime: output.SampleTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.SampleTime)) : undefined,
5047
- };
4653
+ return (0, smithy_client_1.take)(output, {
4654
+ DeviceId: smithy_client_1.expectString,
4655
+ Error: smithy_client_1._json,
4656
+ SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4657
+ });
5048
4658
  };
5049
4659
  const de_BatchEvaluateGeofencesErrorList = (output, context) => {
5050
4660
  const retVal = (output || [])
5051
4661
  .filter((e) => e != null)
5052
4662
  .map((entry) => {
5053
- if (entry === null) {
5054
- return null;
5055
- }
5056
4663
  return de_BatchEvaluateGeofencesError(entry, context);
5057
4664
  });
5058
4665
  return retVal;
5059
4666
  };
5060
- const de_BatchGetDevicePositionError = (output, context) => {
5061
- return {
5062
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5063
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5064
- };
5065
- };
5066
- const de_BatchGetDevicePositionErrorList = (output, context) => {
5067
- const retVal = (output || [])
5068
- .filter((e) => e != null)
5069
- .map((entry) => {
5070
- if (entry === null) {
5071
- return null;
5072
- }
5073
- return de_BatchGetDevicePositionError(entry, context);
5074
- });
5075
- return retVal;
5076
- };
5077
- const de_BatchItemError = (output, context) => {
5078
- return {
5079
- Code: (0, smithy_client_1.expectString)(output.Code),
5080
- Message: (0, smithy_client_1.expectString)(output.Message),
5081
- };
5082
- };
5083
- const de_BatchPutGeofenceError = (output, context) => {
5084
- return {
5085
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5086
- GeofenceId: (0, smithy_client_1.expectString)(output.GeofenceId),
5087
- };
5088
- };
5089
- const de_BatchPutGeofenceErrorList = (output, context) => {
5090
- const retVal = (output || [])
5091
- .filter((e) => e != null)
5092
- .map((entry) => {
5093
- if (entry === null) {
5094
- return null;
5095
- }
5096
- return de_BatchPutGeofenceError(entry, context);
5097
- });
5098
- return retVal;
5099
- };
5100
4667
  const de_BatchPutGeofenceSuccess = (output, context) => {
5101
- return {
5102
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5103
- GeofenceId: (0, smithy_client_1.expectString)(output.GeofenceId),
5104
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5105
- };
4668
+ return (0, smithy_client_1.take)(output, {
4669
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4670
+ GeofenceId: smithy_client_1.expectString,
4671
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4672
+ });
5106
4673
  };
5107
4674
  const de_BatchPutGeofenceSuccessList = (output, context) => {
5108
4675
  const retVal = (output || [])
5109
4676
  .filter((e) => e != null)
5110
4677
  .map((entry) => {
5111
- if (entry === null) {
5112
- return null;
5113
- }
5114
4678
  return de_BatchPutGeofenceSuccess(entry, context);
5115
4679
  });
5116
4680
  return retVal;
5117
4681
  };
5118
4682
  const de_BatchUpdateDevicePositionError = (output, context) => {
5119
- return {
5120
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5121
- Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined,
5122
- SampleTime: output.SampleTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.SampleTime)) : undefined,
5123
- };
4683
+ return (0, smithy_client_1.take)(output, {
4684
+ DeviceId: smithy_client_1.expectString,
4685
+ Error: smithy_client_1._json,
4686
+ SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4687
+ });
5124
4688
  };
5125
4689
  const de_BatchUpdateDevicePositionErrorList = (output, context) => {
5126
4690
  const retVal = (output || [])
5127
4691
  .filter((e) => e != null)
5128
4692
  .map((entry) => {
5129
- if (entry === null) {
5130
- return null;
5131
- }
5132
4693
  return de_BatchUpdateDevicePositionError(entry, context);
5133
4694
  });
5134
4695
  return retVal;
@@ -5137,112 +4698,68 @@ const de_BoundingBox = (output, context) => {
5137
4698
  const retVal = (output || [])
5138
4699
  .filter((e) => e != null)
5139
4700
  .map((entry) => {
5140
- if (entry === null) {
5141
- return null;
5142
- }
5143
4701
  return (0, smithy_client_1.limitedParseDouble)(entry);
5144
4702
  });
5145
4703
  return retVal;
5146
4704
  };
5147
- const de_CalculateRouteMatrixSummary = (output, context) => {
5148
- return {
5149
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5150
- DistanceUnit: (0, smithy_client_1.expectString)(output.DistanceUnit),
5151
- ErrorCount: (0, smithy_client_1.expectInt32)(output.ErrorCount),
5152
- RouteCount: (0, smithy_client_1.expectInt32)(output.RouteCount),
5153
- };
5154
- };
5155
4705
  const de_CalculateRouteSummary = (output, context) => {
5156
- return {
5157
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5158
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5159
- DistanceUnit: (0, smithy_client_1.expectString)(output.DistanceUnit),
5160
- DurationSeconds: (0, smithy_client_1.limitedParseDouble)(output.DurationSeconds),
5161
- RouteBBox: output.RouteBBox != null ? de_BoundingBox(output.RouteBBox, context) : undefined,
5162
- };
4706
+ return (0, smithy_client_1.take)(output, {
4707
+ DataSource: smithy_client_1.expectString,
4708
+ Distance: smithy_client_1.limitedParseDouble,
4709
+ DistanceUnit: smithy_client_1.expectString,
4710
+ DurationSeconds: smithy_client_1.limitedParseDouble,
4711
+ RouteBBox: (_) => de_BoundingBox(_, context),
4712
+ });
5163
4713
  };
5164
4714
  const de_Circle = (output, context) => {
5165
- return {
5166
- Center: output.Center != null ? de_Position(output.Center, context) : undefined,
5167
- Radius: (0, smithy_client_1.limitedParseDouble)(output.Radius),
5168
- };
5169
- };
5170
- const de_CountryCodeList = (output, context) => {
5171
- const retVal = (output || [])
5172
- .filter((e) => e != null)
5173
- .map((entry) => {
5174
- if (entry === null) {
5175
- return null;
5176
- }
5177
- return (0, smithy_client_1.expectString)(entry);
4715
+ return (0, smithy_client_1.take)(output, {
4716
+ Center: (_) => de_Position(_, context),
4717
+ Radius: smithy_client_1.limitedParseDouble,
5178
4718
  });
5179
- return retVal;
5180
- };
5181
- const de_DataSourceConfiguration = (output, context) => {
5182
- return {
5183
- IntendedUse: (0, smithy_client_1.expectString)(output.IntendedUse),
5184
- };
5185
4719
  };
5186
4720
  const de_DevicePosition = (output, context) => {
5187
- return {
5188
- Accuracy: output.Accuracy != null ? de_PositionalAccuracy(output.Accuracy, context) : undefined,
5189
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5190
- Position: output.Position != null ? de_Position(output.Position, context) : undefined,
5191
- PositionProperties: output.PositionProperties != null ? de_PropertyMap(output.PositionProperties, context) : undefined,
5192
- ReceivedTime: output.ReceivedTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ReceivedTime)) : undefined,
5193
- SampleTime: output.SampleTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.SampleTime)) : undefined,
5194
- };
4721
+ return (0, smithy_client_1.take)(output, {
4722
+ Accuracy: (_) => de_PositionalAccuracy(_, context),
4723
+ DeviceId: smithy_client_1.expectString,
4724
+ Position: (_) => de_Position(_, context),
4725
+ PositionProperties: smithy_client_1._json,
4726
+ ReceivedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4727
+ SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4728
+ });
5195
4729
  };
5196
4730
  const de_DevicePositionList = (output, context) => {
5197
4731
  const retVal = (output || [])
5198
4732
  .filter((e) => e != null)
5199
4733
  .map((entry) => {
5200
- if (entry === null) {
5201
- return null;
5202
- }
5203
4734
  return de_DevicePosition(entry, context);
5204
4735
  });
5205
4736
  return retVal;
5206
4737
  };
5207
- const de_GeoArnList = (output, context) => {
5208
- const retVal = (output || [])
5209
- .filter((e) => e != null)
5210
- .map((entry) => {
5211
- if (entry === null) {
5212
- return null;
5213
- }
5214
- return (0, smithy_client_1.expectString)(entry);
5215
- });
5216
- return retVal;
5217
- };
5218
4738
  const de_GeofenceGeometry = (output, context) => {
5219
- return {
5220
- Circle: output.Circle != null ? de_Circle(output.Circle, context) : undefined,
5221
- Polygon: output.Polygon != null ? de_LinearRings(output.Polygon, context) : undefined,
5222
- };
4739
+ return (0, smithy_client_1.take)(output, {
4740
+ Circle: (_) => de_Circle(_, context),
4741
+ Polygon: (_) => de_LinearRings(_, context),
4742
+ });
5223
4743
  };
5224
4744
  const de_Leg = (output, context) => {
5225
- return {
5226
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5227
- DurationSeconds: (0, smithy_client_1.limitedParseDouble)(output.DurationSeconds),
5228
- EndPosition: output.EndPosition != null ? de_Position(output.EndPosition, context) : undefined,
5229
- Geometry: output.Geometry != null ? de_LegGeometry(output.Geometry, context) : undefined,
5230
- StartPosition: output.StartPosition != null ? de_Position(output.StartPosition, context) : undefined,
5231
- Steps: output.Steps != null ? de_StepList(output.Steps, context) : undefined,
5232
- };
4745
+ return (0, smithy_client_1.take)(output, {
4746
+ Distance: smithy_client_1.limitedParseDouble,
4747
+ DurationSeconds: smithy_client_1.limitedParseDouble,
4748
+ EndPosition: (_) => de_Position(_, context),
4749
+ Geometry: (_) => de_LegGeometry(_, context),
4750
+ StartPosition: (_) => de_Position(_, context),
4751
+ Steps: (_) => de_StepList(_, context),
4752
+ });
5233
4753
  };
5234
4754
  const de_LegGeometry = (output, context) => {
5235
- return {
5236
- LineString: output.LineString != null ? de_LineString(output.LineString, context) : undefined,
5237
- };
4755
+ return (0, smithy_client_1.take)(output, {
4756
+ LineString: (_) => de_LineString(_, context),
4757
+ });
5238
4758
  };
5239
4759
  const de_LegList = (output, context) => {
5240
4760
  const retVal = (output || [])
5241
4761
  .filter((e) => e != null)
5242
4762
  .map((entry) => {
5243
- if (entry === null) {
5244
- return null;
5245
- }
5246
4763
  return de_Leg(entry, context);
5247
4764
  });
5248
4765
  return retVal;
@@ -5251,9 +4768,6 @@ const de_LinearRing = (output, context) => {
5251
4768
  const retVal = (output || [])
5252
4769
  .filter((e) => e != null)
5253
4770
  .map((entry) => {
5254
- if (entry === null) {
5255
- return null;
5256
- }
5257
4771
  return de_Position(entry, context);
5258
4772
  });
5259
4773
  return retVal;
@@ -5262,9 +4776,6 @@ const de_LinearRings = (output, context) => {
5262
4776
  const retVal = (output || [])
5263
4777
  .filter((e) => e != null)
5264
4778
  .map((entry) => {
5265
- if (entry === null) {
5266
- return null;
5267
- }
5268
4779
  return de_LinearRing(entry, context);
5269
4780
  });
5270
4781
  return retVal;
@@ -5273,422 +4784,308 @@ const de_LineString = (output, context) => {
5273
4784
  const retVal = (output || [])
5274
4785
  .filter((e) => e != null)
5275
4786
  .map((entry) => {
5276
- if (entry === null) {
5277
- return null;
5278
- }
5279
4787
  return de_Position(entry, context);
5280
4788
  });
5281
4789
  return retVal;
5282
4790
  };
5283
4791
  const de_ListDevicePositionsResponseEntry = (output, context) => {
5284
- return {
5285
- Accuracy: output.Accuracy != null ? de_PositionalAccuracy(output.Accuracy, context) : undefined,
5286
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
5287
- Position: output.Position != null ? de_Position(output.Position, context) : undefined,
5288
- PositionProperties: output.PositionProperties != null ? de_PropertyMap(output.PositionProperties, context) : undefined,
5289
- SampleTime: output.SampleTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.SampleTime)) : undefined,
5290
- };
4792
+ return (0, smithy_client_1.take)(output, {
4793
+ Accuracy: (_) => de_PositionalAccuracy(_, context),
4794
+ DeviceId: smithy_client_1.expectString,
4795
+ Position: (_) => de_Position(_, context),
4796
+ PositionProperties: smithy_client_1._json,
4797
+ SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4798
+ });
5291
4799
  };
5292
4800
  const de_ListDevicePositionsResponseEntryList = (output, context) => {
5293
4801
  const retVal = (output || [])
5294
4802
  .filter((e) => e != null)
5295
4803
  .map((entry) => {
5296
- if (entry === null) {
5297
- return null;
5298
- }
5299
4804
  return de_ListDevicePositionsResponseEntry(entry, context);
5300
4805
  });
5301
4806
  return retVal;
5302
4807
  };
5303
4808
  const de_ListGeofenceCollectionsResponseEntry = (output, context) => {
5304
- return {
5305
- CollectionName: (0, smithy_client_1.expectString)(output.CollectionName),
5306
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5307
- Description: (0, smithy_client_1.expectString)(output.Description),
5308
- PricingPlan: (0, smithy_client_1.expectString)(output.PricingPlan),
5309
- PricingPlanDataSource: (0, smithy_client_1.expectString)(output.PricingPlanDataSource),
5310
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5311
- };
4809
+ return (0, smithy_client_1.take)(output, {
4810
+ CollectionName: smithy_client_1.expectString,
4811
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4812
+ Description: smithy_client_1.expectString,
4813
+ PricingPlan: smithy_client_1.expectString,
4814
+ PricingPlanDataSource: smithy_client_1.expectString,
4815
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4816
+ });
5312
4817
  };
5313
4818
  const de_ListGeofenceCollectionsResponseEntryList = (output, context) => {
5314
4819
  const retVal = (output || [])
5315
4820
  .filter((e) => e != null)
5316
4821
  .map((entry) => {
5317
- if (entry === null) {
5318
- return null;
5319
- }
5320
4822
  return de_ListGeofenceCollectionsResponseEntry(entry, context);
5321
4823
  });
5322
4824
  return retVal;
5323
4825
  };
5324
4826
  const de_ListGeofenceResponseEntry = (output, context) => {
5325
- return {
5326
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5327
- GeofenceId: (0, smithy_client_1.expectString)(output.GeofenceId),
5328
- Geometry: output.Geometry != null ? de_GeofenceGeometry(output.Geometry, context) : undefined,
5329
- Status: (0, smithy_client_1.expectString)(output.Status),
5330
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5331
- };
4827
+ return (0, smithy_client_1.take)(output, {
4828
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4829
+ GeofenceId: smithy_client_1.expectString,
4830
+ Geometry: (_) => de_GeofenceGeometry(_, context),
4831
+ Status: smithy_client_1.expectString,
4832
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4833
+ });
5332
4834
  };
5333
4835
  const de_ListGeofenceResponseEntryList = (output, context) => {
5334
4836
  const retVal = (output || [])
5335
4837
  .filter((e) => e != null)
5336
4838
  .map((entry) => {
5337
- if (entry === null) {
5338
- return null;
5339
- }
5340
4839
  return de_ListGeofenceResponseEntry(entry, context);
5341
4840
  });
5342
4841
  return retVal;
5343
4842
  };
5344
4843
  const de_ListKeysResponseEntry = (output, context) => {
5345
- return {
5346
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5347
- Description: (0, smithy_client_1.expectString)(output.Description),
5348
- ExpireTime: output.ExpireTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ExpireTime)) : undefined,
5349
- KeyName: (0, smithy_client_1.expectString)(output.KeyName),
5350
- Restrictions: output.Restrictions != null ? de_ApiKeyRestrictions(output.Restrictions, context) : undefined,
5351
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5352
- };
4844
+ return (0, smithy_client_1.take)(output, {
4845
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4846
+ Description: smithy_client_1.expectString,
4847
+ ExpireTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4848
+ KeyName: smithy_client_1.expectString,
4849
+ Restrictions: smithy_client_1._json,
4850
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4851
+ });
5353
4852
  };
5354
4853
  const de_ListKeysResponseEntryList = (output, context) => {
5355
4854
  const retVal = (output || [])
5356
4855
  .filter((e) => e != null)
5357
4856
  .map((entry) => {
5358
- if (entry === null) {
5359
- return null;
5360
- }
5361
4857
  return de_ListKeysResponseEntry(entry, context);
5362
4858
  });
5363
4859
  return retVal;
5364
4860
  };
5365
4861
  const de_ListMapsResponseEntry = (output, context) => {
5366
- return {
5367
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5368
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5369
- Description: (0, smithy_client_1.expectString)(output.Description),
5370
- MapName: (0, smithy_client_1.expectString)(output.MapName),
5371
- PricingPlan: (0, smithy_client_1.expectString)(output.PricingPlan),
5372
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5373
- };
4862
+ return (0, smithy_client_1.take)(output, {
4863
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4864
+ DataSource: smithy_client_1.expectString,
4865
+ Description: smithy_client_1.expectString,
4866
+ MapName: smithy_client_1.expectString,
4867
+ PricingPlan: smithy_client_1.expectString,
4868
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4869
+ });
5374
4870
  };
5375
4871
  const de_ListMapsResponseEntryList = (output, context) => {
5376
4872
  const retVal = (output || [])
5377
4873
  .filter((e) => e != null)
5378
4874
  .map((entry) => {
5379
- if (entry === null) {
5380
- return null;
5381
- }
5382
4875
  return de_ListMapsResponseEntry(entry, context);
5383
4876
  });
5384
4877
  return retVal;
5385
4878
  };
5386
4879
  const de_ListPlaceIndexesResponseEntry = (output, context) => {
5387
- return {
5388
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5389
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5390
- Description: (0, smithy_client_1.expectString)(output.Description),
5391
- IndexName: (0, smithy_client_1.expectString)(output.IndexName),
5392
- PricingPlan: (0, smithy_client_1.expectString)(output.PricingPlan),
5393
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5394
- };
4880
+ return (0, smithy_client_1.take)(output, {
4881
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4882
+ DataSource: smithy_client_1.expectString,
4883
+ Description: smithy_client_1.expectString,
4884
+ IndexName: smithy_client_1.expectString,
4885
+ PricingPlan: smithy_client_1.expectString,
4886
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4887
+ });
5395
4888
  };
5396
4889
  const de_ListPlaceIndexesResponseEntryList = (output, context) => {
5397
4890
  const retVal = (output || [])
5398
4891
  .filter((e) => e != null)
5399
4892
  .map((entry) => {
5400
- if (entry === null) {
5401
- return null;
5402
- }
5403
4893
  return de_ListPlaceIndexesResponseEntry(entry, context);
5404
4894
  });
5405
4895
  return retVal;
5406
4896
  };
5407
4897
  const de_ListRouteCalculatorsResponseEntry = (output, context) => {
5408
- return {
5409
- CalculatorName: (0, smithy_client_1.expectString)(output.CalculatorName),
5410
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5411
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5412
- Description: (0, smithy_client_1.expectString)(output.Description),
5413
- PricingPlan: (0, smithy_client_1.expectString)(output.PricingPlan),
5414
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5415
- };
4898
+ return (0, smithy_client_1.take)(output, {
4899
+ CalculatorName: smithy_client_1.expectString,
4900
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4901
+ DataSource: smithy_client_1.expectString,
4902
+ Description: smithy_client_1.expectString,
4903
+ PricingPlan: smithy_client_1.expectString,
4904
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4905
+ });
5416
4906
  };
5417
4907
  const de_ListRouteCalculatorsResponseEntryList = (output, context) => {
5418
4908
  const retVal = (output || [])
5419
4909
  .filter((e) => e != null)
5420
4910
  .map((entry) => {
5421
- if (entry === null) {
5422
- return null;
5423
- }
5424
4911
  return de_ListRouteCalculatorsResponseEntry(entry, context);
5425
4912
  });
5426
4913
  return retVal;
5427
4914
  };
5428
4915
  const de_ListTrackersResponseEntry = (output, context) => {
5429
- return {
5430
- CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
5431
- Description: (0, smithy_client_1.expectString)(output.Description),
5432
- PricingPlan: (0, smithy_client_1.expectString)(output.PricingPlan),
5433
- PricingPlanDataSource: (0, smithy_client_1.expectString)(output.PricingPlanDataSource),
5434
- TrackerName: (0, smithy_client_1.expectString)(output.TrackerName),
5435
- UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
5436
- };
4916
+ return (0, smithy_client_1.take)(output, {
4917
+ CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4918
+ Description: smithy_client_1.expectString,
4919
+ PricingPlan: smithy_client_1.expectString,
4920
+ PricingPlanDataSource: smithy_client_1.expectString,
4921
+ TrackerName: smithy_client_1.expectString,
4922
+ UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4923
+ });
5437
4924
  };
5438
4925
  const de_ListTrackersResponseEntryList = (output, context) => {
5439
4926
  const retVal = (output || [])
5440
4927
  .filter((e) => e != null)
5441
4928
  .map((entry) => {
5442
- if (entry === null) {
5443
- return null;
5444
- }
5445
4929
  return de_ListTrackersResponseEntry(entry, context);
5446
4930
  });
5447
4931
  return retVal;
5448
4932
  };
5449
- const de_MapConfiguration = (output, context) => {
5450
- return {
5451
- Style: (0, smithy_client_1.expectString)(output.Style),
5452
- };
5453
- };
5454
4933
  const de_Place = (output, context) => {
5455
- return {
5456
- AddressNumber: (0, smithy_client_1.expectString)(output.AddressNumber),
5457
- Country: (0, smithy_client_1.expectString)(output.Country),
5458
- Geometry: output.Geometry != null ? de_PlaceGeometry(output.Geometry, context) : undefined,
5459
- Interpolated: (0, smithy_client_1.expectBoolean)(output.Interpolated),
5460
- Label: (0, smithy_client_1.expectString)(output.Label),
5461
- Municipality: (0, smithy_client_1.expectString)(output.Municipality),
5462
- Neighborhood: (0, smithy_client_1.expectString)(output.Neighborhood),
5463
- PostalCode: (0, smithy_client_1.expectString)(output.PostalCode),
5464
- Region: (0, smithy_client_1.expectString)(output.Region),
5465
- Street: (0, smithy_client_1.expectString)(output.Street),
5466
- SubRegion: (0, smithy_client_1.expectString)(output.SubRegion),
5467
- TimeZone: output.TimeZone != null ? de_TimeZone(output.TimeZone, context) : undefined,
5468
- UnitNumber: (0, smithy_client_1.expectString)(output.UnitNumber),
5469
- UnitType: (0, smithy_client_1.expectString)(output.UnitType),
5470
- };
4934
+ return (0, smithy_client_1.take)(output, {
4935
+ AddressNumber: smithy_client_1.expectString,
4936
+ Country: smithy_client_1.expectString,
4937
+ Geometry: (_) => de_PlaceGeometry(_, context),
4938
+ Interpolated: smithy_client_1.expectBoolean,
4939
+ Label: smithy_client_1.expectString,
4940
+ Municipality: smithy_client_1.expectString,
4941
+ Neighborhood: smithy_client_1.expectString,
4942
+ PostalCode: smithy_client_1.expectString,
4943
+ Region: smithy_client_1.expectString,
4944
+ Street: smithy_client_1.expectString,
4945
+ SubRegion: smithy_client_1.expectString,
4946
+ TimeZone: smithy_client_1._json,
4947
+ UnitNumber: smithy_client_1.expectString,
4948
+ UnitType: smithy_client_1.expectString,
4949
+ });
5471
4950
  };
5472
4951
  const de_PlaceGeometry = (output, context) => {
5473
- return {
5474
- Point: output.Point != null ? de_Position(output.Point, context) : undefined,
5475
- };
4952
+ return (0, smithy_client_1.take)(output, {
4953
+ Point: (_) => de_Position(_, context),
4954
+ });
5476
4955
  };
5477
4956
  const de_Position = (output, context) => {
5478
4957
  const retVal = (output || [])
5479
4958
  .filter((e) => e != null)
5480
4959
  .map((entry) => {
5481
- if (entry === null) {
5482
- return null;
5483
- }
5484
4960
  return (0, smithy_client_1.limitedParseDouble)(entry);
5485
4961
  });
5486
4962
  return retVal;
5487
4963
  };
5488
4964
  const de_PositionalAccuracy = (output, context) => {
5489
- return {
5490
- Horizontal: (0, smithy_client_1.limitedParseDouble)(output.Horizontal),
5491
- };
4965
+ return (0, smithy_client_1.take)(output, {
4966
+ Horizontal: smithy_client_1.limitedParseDouble,
4967
+ });
5492
4968
  };
5493
4969
  const de_PositionList = (output, context) => {
5494
4970
  const retVal = (output || [])
5495
4971
  .filter((e) => e != null)
5496
4972
  .map((entry) => {
5497
- if (entry === null) {
5498
- return null;
5499
- }
5500
4973
  return de_Position(entry, context);
5501
4974
  });
5502
4975
  return retVal;
5503
4976
  };
5504
- const de_PropertyMap = (output, context) => {
5505
- return Object.entries(output).reduce((acc, [key, value]) => {
5506
- if (value === null) {
5507
- return acc;
5508
- }
5509
- acc[key] = (0, smithy_client_1.expectString)(value);
5510
- return acc;
5511
- }, {});
5512
- };
5513
- const de_RefererPatternList = (output, context) => {
5514
- const retVal = (output || [])
5515
- .filter((e) => e != null)
5516
- .map((entry) => {
5517
- if (entry === null) {
5518
- return null;
5519
- }
5520
- return (0, smithy_client_1.expectString)(entry);
5521
- });
5522
- return retVal;
5523
- };
5524
4977
  const de_RouteMatrix = (output, context) => {
5525
4978
  const retVal = (output || [])
5526
4979
  .filter((e) => e != null)
5527
4980
  .map((entry) => {
5528
- if (entry === null) {
5529
- return null;
5530
- }
5531
4981
  return de_RouteMatrixRow(entry, context);
5532
4982
  });
5533
4983
  return retVal;
5534
4984
  };
5535
4985
  const de_RouteMatrixEntry = (output, context) => {
5536
- return {
5537
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5538
- DurationSeconds: (0, smithy_client_1.limitedParseDouble)(output.DurationSeconds),
5539
- Error: output.Error != null ? de_RouteMatrixEntryError(output.Error, context) : undefined,
5540
- };
5541
- };
5542
- const de_RouteMatrixEntryError = (output, context) => {
5543
- return {
5544
- Code: (0, smithy_client_1.expectString)(output.Code),
5545
- Message: (0, smithy_client_1.expectString)(output.Message),
5546
- };
4986
+ return (0, smithy_client_1.take)(output, {
4987
+ Distance: smithy_client_1.limitedParseDouble,
4988
+ DurationSeconds: smithy_client_1.limitedParseDouble,
4989
+ Error: smithy_client_1._json,
4990
+ });
5547
4991
  };
5548
4992
  const de_RouteMatrixRow = (output, context) => {
5549
4993
  const retVal = (output || [])
5550
4994
  .filter((e) => e != null)
5551
4995
  .map((entry) => {
5552
- if (entry === null) {
5553
- return null;
5554
- }
5555
4996
  return de_RouteMatrixEntry(entry, context);
5556
4997
  });
5557
4998
  return retVal;
5558
4999
  };
5559
5000
  const de_SearchForPositionResult = (output, context) => {
5560
- return {
5561
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5562
- Place: output.Place != null ? de_Place(output.Place, context) : undefined,
5563
- PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
5564
- };
5001
+ return (0, smithy_client_1.take)(output, {
5002
+ Distance: smithy_client_1.limitedParseDouble,
5003
+ Place: (_) => de_Place(_, context),
5004
+ PlaceId: smithy_client_1.expectString,
5005
+ });
5565
5006
  };
5566
5007
  const de_SearchForPositionResultList = (output, context) => {
5567
5008
  const retVal = (output || [])
5568
5009
  .filter((e) => e != null)
5569
5010
  .map((entry) => {
5570
- if (entry === null) {
5571
- return null;
5572
- }
5573
5011
  return de_SearchForPositionResult(entry, context);
5574
5012
  });
5575
5013
  return retVal;
5576
5014
  };
5577
- const de_SearchForSuggestionsResult = (output, context) => {
5578
- return {
5579
- PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
5580
- Text: (0, smithy_client_1.expectString)(output.Text),
5581
- };
5582
- };
5583
- const de_SearchForSuggestionsResultList = (output, context) => {
5584
- const retVal = (output || [])
5585
- .filter((e) => e != null)
5586
- .map((entry) => {
5587
- if (entry === null) {
5588
- return null;
5589
- }
5590
- return de_SearchForSuggestionsResult(entry, context);
5591
- });
5592
- return retVal;
5593
- };
5594
5015
  const de_SearchForTextResult = (output, context) => {
5595
- return {
5596
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5597
- Place: output.Place != null ? de_Place(output.Place, context) : undefined,
5598
- PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
5599
- Relevance: (0, smithy_client_1.limitedParseDouble)(output.Relevance),
5600
- };
5016
+ return (0, smithy_client_1.take)(output, {
5017
+ Distance: smithy_client_1.limitedParseDouble,
5018
+ Place: (_) => de_Place(_, context),
5019
+ PlaceId: smithy_client_1.expectString,
5020
+ Relevance: smithy_client_1.limitedParseDouble,
5021
+ });
5601
5022
  };
5602
5023
  const de_SearchForTextResultList = (output, context) => {
5603
5024
  const retVal = (output || [])
5604
5025
  .filter((e) => e != null)
5605
5026
  .map((entry) => {
5606
- if (entry === null) {
5607
- return null;
5608
- }
5609
5027
  return de_SearchForTextResult(entry, context);
5610
5028
  });
5611
5029
  return retVal;
5612
5030
  };
5613
5031
  const de_SearchPlaceIndexForPositionSummary = (output, context) => {
5614
- return {
5615
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5616
- Language: (0, smithy_client_1.expectString)(output.Language),
5617
- MaxResults: (0, smithy_client_1.expectInt32)(output.MaxResults),
5618
- Position: output.Position != null ? de_Position(output.Position, context) : undefined,
5619
- };
5032
+ return (0, smithy_client_1.take)(output, {
5033
+ DataSource: smithy_client_1.expectString,
5034
+ Language: smithy_client_1.expectString,
5035
+ MaxResults: smithy_client_1.expectInt32,
5036
+ Position: (_) => de_Position(_, context),
5037
+ });
5620
5038
  };
5621
5039
  const de_SearchPlaceIndexForSuggestionsSummary = (output, context) => {
5622
- return {
5623
- BiasPosition: output.BiasPosition != null ? de_Position(output.BiasPosition, context) : undefined,
5624
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5625
- FilterBBox: output.FilterBBox != null ? de_BoundingBox(output.FilterBBox, context) : undefined,
5626
- FilterCountries: output.FilterCountries != null ? de_CountryCodeList(output.FilterCountries, context) : undefined,
5627
- Language: (0, smithy_client_1.expectString)(output.Language),
5628
- MaxResults: (0, smithy_client_1.expectInt32)(output.MaxResults),
5629
- Text: (0, smithy_client_1.expectString)(output.Text),
5630
- };
5040
+ return (0, smithy_client_1.take)(output, {
5041
+ BiasPosition: (_) => de_Position(_, context),
5042
+ DataSource: smithy_client_1.expectString,
5043
+ FilterBBox: (_) => de_BoundingBox(_, context),
5044
+ FilterCountries: smithy_client_1._json,
5045
+ Language: smithy_client_1.expectString,
5046
+ MaxResults: smithy_client_1.expectInt32,
5047
+ Text: smithy_client_1.expectString,
5048
+ });
5631
5049
  };
5632
5050
  const de_SearchPlaceIndexForTextSummary = (output, context) => {
5633
- return {
5634
- BiasPosition: output.BiasPosition != null ? de_Position(output.BiasPosition, context) : undefined,
5635
- DataSource: (0, smithy_client_1.expectString)(output.DataSource),
5636
- FilterBBox: output.FilterBBox != null ? de_BoundingBox(output.FilterBBox, context) : undefined,
5637
- FilterCountries: output.FilterCountries != null ? de_CountryCodeList(output.FilterCountries, context) : undefined,
5638
- Language: (0, smithy_client_1.expectString)(output.Language),
5639
- MaxResults: (0, smithy_client_1.expectInt32)(output.MaxResults),
5640
- ResultBBox: output.ResultBBox != null ? de_BoundingBox(output.ResultBBox, context) : undefined,
5641
- Text: (0, smithy_client_1.expectString)(output.Text),
5642
- };
5051
+ return (0, smithy_client_1.take)(output, {
5052
+ BiasPosition: (_) => de_Position(_, context),
5053
+ DataSource: smithy_client_1.expectString,
5054
+ FilterBBox: (_) => de_BoundingBox(_, context),
5055
+ FilterCountries: smithy_client_1._json,
5056
+ Language: smithy_client_1.expectString,
5057
+ MaxResults: smithy_client_1.expectInt32,
5058
+ ResultBBox: (_) => de_BoundingBox(_, context),
5059
+ Text: smithy_client_1.expectString,
5060
+ });
5643
5061
  };
5644
5062
  const de_Step = (output, context) => {
5645
- return {
5646
- Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5647
- DurationSeconds: (0, smithy_client_1.limitedParseDouble)(output.DurationSeconds),
5648
- EndPosition: output.EndPosition != null ? de_Position(output.EndPosition, context) : undefined,
5649
- GeometryOffset: (0, smithy_client_1.expectInt32)(output.GeometryOffset),
5650
- StartPosition: output.StartPosition != null ? de_Position(output.StartPosition, context) : undefined,
5651
- };
5063
+ return (0, smithy_client_1.take)(output, {
5064
+ Distance: smithy_client_1.limitedParseDouble,
5065
+ DurationSeconds: smithy_client_1.limitedParseDouble,
5066
+ EndPosition: (_) => de_Position(_, context),
5067
+ GeometryOffset: smithy_client_1.expectInt32,
5068
+ StartPosition: (_) => de_Position(_, context),
5069
+ });
5652
5070
  };
5653
5071
  const de_StepList = (output, context) => {
5654
5072
  const retVal = (output || [])
5655
5073
  .filter((e) => e != null)
5656
5074
  .map((entry) => {
5657
- if (entry === null) {
5658
- return null;
5659
- }
5660
5075
  return de_Step(entry, context);
5661
5076
  });
5662
5077
  return retVal;
5663
5078
  };
5664
- const de_TagMap = (output, context) => {
5665
- return Object.entries(output).reduce((acc, [key, value]) => {
5666
- if (value === null) {
5667
- return acc;
5668
- }
5669
- acc[key] = (0, smithy_client_1.expectString)(value);
5670
- return acc;
5671
- }, {});
5672
- };
5673
- const de_TimeZone = (output, context) => {
5674
- return {
5675
- Name: (0, smithy_client_1.expectString)(output.Name),
5676
- Offset: (0, smithy_client_1.expectInt32)(output.Offset),
5677
- };
5678
- };
5679
5079
  const de_ValidationExceptionField = (output, context) => {
5680
- return {
5681
- Message: (0, smithy_client_1.expectString)(output.message),
5682
- Name: (0, smithy_client_1.expectString)(output.name),
5683
- };
5080
+ return (0, smithy_client_1.take)(output, {
5081
+ Message: [, smithy_client_1.expectString, `message`],
5082
+ Name: [, smithy_client_1.expectString, `name`],
5083
+ });
5684
5084
  };
5685
5085
  const de_ValidationExceptionFieldList = (output, context) => {
5686
5086
  const retVal = (output || [])
5687
5087
  .filter((e) => e != null)
5688
5088
  .map((entry) => {
5689
- if (entry === null) {
5690
- return null;
5691
- }
5692
5089
  return de_ValidationExceptionField(entry, context);
5693
5090
  });
5694
5091
  return retVal;