@aws-sdk/client-location 3.179.0 → 3.181.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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeAws_restJson1UpdatePlaceIndexCommand = exports.serializeAws_restJson1UpdateMapCommand = exports.serializeAws_restJson1UpdateGeofenceCollectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SearchPlaceIndexForTextCommand = exports.serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.serializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.serializeAws_restJson1PutGeofenceCommand = exports.serializeAws_restJson1ListTrackersCommand = exports.serializeAws_restJson1ListTrackerConsumersCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRouteCalculatorsCommand = exports.serializeAws_restJson1ListPlaceIndexesCommand = exports.serializeAws_restJson1ListMapsCommand = exports.serializeAws_restJson1ListGeofencesCommand = exports.serializeAws_restJson1ListGeofenceCollectionsCommand = exports.serializeAws_restJson1ListDevicePositionsCommand = exports.serializeAws_restJson1GetMapTileCommand = exports.serializeAws_restJson1GetMapStyleDescriptorCommand = exports.serializeAws_restJson1GetMapSpritesCommand = exports.serializeAws_restJson1GetMapGlyphsCommand = exports.serializeAws_restJson1GetGeofenceCommand = exports.serializeAws_restJson1GetDevicePositionHistoryCommand = exports.serializeAws_restJson1GetDevicePositionCommand = exports.serializeAws_restJson1DisassociateTrackerConsumerCommand = exports.serializeAws_restJson1DescribeTrackerCommand = exports.serializeAws_restJson1DescribeRouteCalculatorCommand = exports.serializeAws_restJson1DescribePlaceIndexCommand = exports.serializeAws_restJson1DescribeMapCommand = exports.serializeAws_restJson1DescribeGeofenceCollectionCommand = exports.serializeAws_restJson1DeleteTrackerCommand = exports.serializeAws_restJson1DeleteRouteCalculatorCommand = exports.serializeAws_restJson1DeletePlaceIndexCommand = exports.serializeAws_restJson1DeleteMapCommand = exports.serializeAws_restJson1DeleteGeofenceCollectionCommand = exports.serializeAws_restJson1CreateTrackerCommand = exports.serializeAws_restJson1CreateRouteCalculatorCommand = exports.serializeAws_restJson1CreatePlaceIndexCommand = exports.serializeAws_restJson1CreateMapCommand = exports.serializeAws_restJson1CreateGeofenceCollectionCommand = exports.serializeAws_restJson1CalculateRouteMatrixCommand = exports.serializeAws_restJson1CalculateRouteCommand = exports.serializeAws_restJson1BatchUpdateDevicePositionCommand = exports.serializeAws_restJson1BatchPutGeofenceCommand = exports.serializeAws_restJson1BatchGetDevicePositionCommand = exports.serializeAws_restJson1BatchEvaluateGeofencesCommand = exports.serializeAws_restJson1BatchDeleteGeofenceCommand = exports.serializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.serializeAws_restJson1AssociateTrackerConsumerCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SearchPlaceIndexForTextCommand = exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.deserializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.deserializeAws_restJson1PutGeofenceCommand = exports.deserializeAws_restJson1ListTrackersCommand = exports.deserializeAws_restJson1ListTrackerConsumersCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRouteCalculatorsCommand = exports.deserializeAws_restJson1ListPlaceIndexesCommand = exports.deserializeAws_restJson1ListMapsCommand = exports.deserializeAws_restJson1ListGeofencesCommand = exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = exports.deserializeAws_restJson1ListDevicePositionsCommand = exports.deserializeAws_restJson1GetMapTileCommand = exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = exports.deserializeAws_restJson1GetMapSpritesCommand = exports.deserializeAws_restJson1GetMapGlyphsCommand = exports.deserializeAws_restJson1GetGeofenceCommand = exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = exports.deserializeAws_restJson1GetDevicePositionCommand = exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = exports.deserializeAws_restJson1DescribeTrackerCommand = exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = exports.deserializeAws_restJson1DescribePlaceIndexCommand = exports.deserializeAws_restJson1DescribeMapCommand = exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = exports.deserializeAws_restJson1DeleteTrackerCommand = exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = exports.deserializeAws_restJson1DeletePlaceIndexCommand = exports.deserializeAws_restJson1DeleteMapCommand = exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = exports.deserializeAws_restJson1CreateTrackerCommand = exports.deserializeAws_restJson1CreateRouteCalculatorCommand = exports.deserializeAws_restJson1CreatePlaceIndexCommand = exports.deserializeAws_restJson1CreateMapCommand = exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = exports.deserializeAws_restJson1CalculateRouteMatrixCommand = exports.deserializeAws_restJson1CalculateRouteCommand = exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = exports.deserializeAws_restJson1BatchPutGeofenceCommand = exports.deserializeAws_restJson1BatchGetDevicePositionCommand = exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = exports.serializeAws_restJson1UpdateTrackerCommand = exports.serializeAws_restJson1UpdateRouteCalculatorCommand = void 0;
5
- exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = void 0;
3
+ exports.serializeAws_restJson1UpdateMapCommand = exports.serializeAws_restJson1UpdateGeofenceCollectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SearchPlaceIndexForTextCommand = exports.serializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.serializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.serializeAws_restJson1PutGeofenceCommand = exports.serializeAws_restJson1ListTrackersCommand = exports.serializeAws_restJson1ListTrackerConsumersCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListRouteCalculatorsCommand = exports.serializeAws_restJson1ListPlaceIndexesCommand = exports.serializeAws_restJson1ListMapsCommand = exports.serializeAws_restJson1ListGeofencesCommand = exports.serializeAws_restJson1ListGeofenceCollectionsCommand = exports.serializeAws_restJson1ListDevicePositionsCommand = exports.serializeAws_restJson1GetPlaceCommand = exports.serializeAws_restJson1GetMapTileCommand = exports.serializeAws_restJson1GetMapStyleDescriptorCommand = exports.serializeAws_restJson1GetMapSpritesCommand = exports.serializeAws_restJson1GetMapGlyphsCommand = exports.serializeAws_restJson1GetGeofenceCommand = exports.serializeAws_restJson1GetDevicePositionHistoryCommand = exports.serializeAws_restJson1GetDevicePositionCommand = exports.serializeAws_restJson1DisassociateTrackerConsumerCommand = exports.serializeAws_restJson1DescribeTrackerCommand = exports.serializeAws_restJson1DescribeRouteCalculatorCommand = exports.serializeAws_restJson1DescribePlaceIndexCommand = exports.serializeAws_restJson1DescribeMapCommand = exports.serializeAws_restJson1DescribeGeofenceCollectionCommand = exports.serializeAws_restJson1DeleteTrackerCommand = exports.serializeAws_restJson1DeleteRouteCalculatorCommand = exports.serializeAws_restJson1DeletePlaceIndexCommand = exports.serializeAws_restJson1DeleteMapCommand = exports.serializeAws_restJson1DeleteGeofenceCollectionCommand = exports.serializeAws_restJson1CreateTrackerCommand = exports.serializeAws_restJson1CreateRouteCalculatorCommand = exports.serializeAws_restJson1CreatePlaceIndexCommand = exports.serializeAws_restJson1CreateMapCommand = exports.serializeAws_restJson1CreateGeofenceCollectionCommand = exports.serializeAws_restJson1CalculateRouteMatrixCommand = exports.serializeAws_restJson1CalculateRouteCommand = exports.serializeAws_restJson1BatchUpdateDevicePositionCommand = exports.serializeAws_restJson1BatchPutGeofenceCommand = exports.serializeAws_restJson1BatchGetDevicePositionCommand = exports.serializeAws_restJson1BatchEvaluateGeofencesCommand = exports.serializeAws_restJson1BatchDeleteGeofenceCommand = exports.serializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.serializeAws_restJson1AssociateTrackerConsumerCommand = void 0;
4
+ exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SearchPlaceIndexForTextCommand = exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = exports.deserializeAws_restJson1SearchPlaceIndexForPositionCommand = exports.deserializeAws_restJson1PutGeofenceCommand = exports.deserializeAws_restJson1ListTrackersCommand = exports.deserializeAws_restJson1ListTrackerConsumersCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListRouteCalculatorsCommand = exports.deserializeAws_restJson1ListPlaceIndexesCommand = exports.deserializeAws_restJson1ListMapsCommand = exports.deserializeAws_restJson1ListGeofencesCommand = exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = exports.deserializeAws_restJson1ListDevicePositionsCommand = exports.deserializeAws_restJson1GetPlaceCommand = exports.deserializeAws_restJson1GetMapTileCommand = exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = exports.deserializeAws_restJson1GetMapSpritesCommand = exports.deserializeAws_restJson1GetMapGlyphsCommand = exports.deserializeAws_restJson1GetGeofenceCommand = exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = exports.deserializeAws_restJson1GetDevicePositionCommand = exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = exports.deserializeAws_restJson1DescribeTrackerCommand = exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = exports.deserializeAws_restJson1DescribePlaceIndexCommand = exports.deserializeAws_restJson1DescribeMapCommand = exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = exports.deserializeAws_restJson1DeleteTrackerCommand = exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = exports.deserializeAws_restJson1DeletePlaceIndexCommand = exports.deserializeAws_restJson1DeleteMapCommand = exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = exports.deserializeAws_restJson1CreateTrackerCommand = exports.deserializeAws_restJson1CreateRouteCalculatorCommand = exports.deserializeAws_restJson1CreatePlaceIndexCommand = exports.deserializeAws_restJson1CreateMapCommand = exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = exports.deserializeAws_restJson1CalculateRouteMatrixCommand = exports.deserializeAws_restJson1CalculateRouteCommand = exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = exports.deserializeAws_restJson1BatchPutGeofenceCommand = exports.deserializeAws_restJson1BatchGetDevicePositionCommand = exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = exports.serializeAws_restJson1UpdateTrackerCommand = exports.serializeAws_restJson1UpdateRouteCalculatorCommand = exports.serializeAws_restJson1UpdatePlaceIndexCommand = void 0;
5
+ exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = void 0;
6
6
  const protocol_http_1 = require("@aws-sdk/protocol-http");
7
7
  const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const LocationServiceException_1 = require("../models/LocationServiceException");
@@ -945,6 +945,36 @@ const serializeAws_restJson1GetMapTileCommand = async (input, context) => {
945
945
  });
946
946
  };
947
947
  exports.serializeAws_restJson1GetMapTileCommand = serializeAws_restJson1GetMapTileCommand;
948
+ const serializeAws_restJson1GetPlaceCommand = async (input, context) => {
949
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
950
+ const headers = {};
951
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
952
+ "/places/v0/indexes/{IndexName}/places/{PlaceId}";
953
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IndexName", () => input.IndexName, "{IndexName}", false);
954
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PlaceId", () => input.PlaceId, "{PlaceId}", false);
955
+ const query = map({
956
+ language: [, input.Language],
957
+ });
958
+ let body;
959
+ let { hostname: resolvedHostname } = await context.endpoint();
960
+ if (context.disableHostPrefix !== true) {
961
+ resolvedHostname = "places." + resolvedHostname;
962
+ if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
963
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
964
+ }
965
+ }
966
+ return new protocol_http_1.HttpRequest({
967
+ protocol,
968
+ hostname: resolvedHostname,
969
+ port,
970
+ method: "GET",
971
+ headers,
972
+ path: resolvedPath,
973
+ query,
974
+ body,
975
+ });
976
+ };
977
+ exports.serializeAws_restJson1GetPlaceCommand = serializeAws_restJson1GetPlaceCommand;
948
978
  const serializeAws_restJson1ListDevicePositionsCommand = async (input, context) => {
949
979
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
950
980
  const headers = {
@@ -1572,7 +1602,7 @@ exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = deserializeAws
1572
1602
  const deserializeAws_restJson1AssociateTrackerConsumerCommandError = async (output, context) => {
1573
1603
  const parsedOutput = {
1574
1604
  ...output,
1575
- body: await parseBody(output.body, context),
1605
+ body: await parseErrorBody(output.body, context),
1576
1606
  };
1577
1607
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1578
1608
  switch (errorCode) {
@@ -1624,7 +1654,7 @@ exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = deseri
1624
1654
  const deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommandError = async (output, context) => {
1625
1655
  const parsedOutput = {
1626
1656
  ...output,
1627
- body: await parseBody(output.body, context),
1657
+ body: await parseErrorBody(output.body, context),
1628
1658
  };
1629
1659
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1630
1660
  switch (errorCode) {
@@ -1670,7 +1700,7 @@ exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = deserializeAws_rest
1670
1700
  const deserializeAws_restJson1BatchDeleteGeofenceCommandError = async (output, context) => {
1671
1701
  const parsedOutput = {
1672
1702
  ...output,
1673
- body: await parseBody(output.body, context),
1703
+ body: await parseErrorBody(output.body, context),
1674
1704
  };
1675
1705
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1676
1706
  switch (errorCode) {
@@ -1716,7 +1746,7 @@ exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = deserializeAws_r
1716
1746
  const deserializeAws_restJson1BatchEvaluateGeofencesCommandError = async (output, context) => {
1717
1747
  const parsedOutput = {
1718
1748
  ...output,
1719
- body: await parseBody(output.body, context),
1749
+ body: await parseErrorBody(output.body, context),
1720
1750
  };
1721
1751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1722
1752
  switch (errorCode) {
@@ -1765,7 +1795,7 @@ exports.deserializeAws_restJson1BatchGetDevicePositionCommand = deserializeAws_r
1765
1795
  const deserializeAws_restJson1BatchGetDevicePositionCommandError = async (output, context) => {
1766
1796
  const parsedOutput = {
1767
1797
  ...output,
1768
- body: await parseBody(output.body, context),
1798
+ body: await parseErrorBody(output.body, context),
1769
1799
  };
1770
1800
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1771
1801
  switch (errorCode) {
@@ -1814,7 +1844,7 @@ exports.deserializeAws_restJson1BatchPutGeofenceCommand = deserializeAws_restJso
1814
1844
  const deserializeAws_restJson1BatchPutGeofenceCommandError = async (output, context) => {
1815
1845
  const parsedOutput = {
1816
1846
  ...output,
1817
- body: await parseBody(output.body, context),
1847
+ body: await parseErrorBody(output.body, context),
1818
1848
  };
1819
1849
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1820
1850
  switch (errorCode) {
@@ -1860,7 +1890,7 @@ exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = deserializeAw
1860
1890
  const deserializeAws_restJson1BatchUpdateDevicePositionCommandError = async (output, context) => {
1861
1891
  const parsedOutput = {
1862
1892
  ...output,
1863
- body: await parseBody(output.body, context),
1893
+ body: await parseErrorBody(output.body, context),
1864
1894
  };
1865
1895
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1866
1896
  switch (errorCode) {
@@ -1909,7 +1939,7 @@ exports.deserializeAws_restJson1CalculateRouteCommand = deserializeAws_restJson1
1909
1939
  const deserializeAws_restJson1CalculateRouteCommandError = async (output, context) => {
1910
1940
  const parsedOutput = {
1911
1941
  ...output,
1912
- body: await parseBody(output.body, context),
1942
+ body: await parseErrorBody(output.body, context),
1913
1943
  };
1914
1944
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1915
1945
  switch (errorCode) {
@@ -1964,7 +1994,7 @@ exports.deserializeAws_restJson1CalculateRouteMatrixCommand = deserializeAws_res
1964
1994
  const deserializeAws_restJson1CalculateRouteMatrixCommandError = async (output, context) => {
1965
1995
  const parsedOutput = {
1966
1996
  ...output,
1967
- body: await parseBody(output.body, context),
1997
+ body: await parseErrorBody(output.body, context),
1968
1998
  };
1969
1999
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1970
2000
  switch (errorCode) {
@@ -2016,7 +2046,7 @@ exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = deserializeAws
2016
2046
  const deserializeAws_restJson1CreateGeofenceCollectionCommandError = async (output, context) => {
2017
2047
  const parsedOutput = {
2018
2048
  ...output,
2019
- body: await parseBody(output.body, context),
2049
+ body: await parseErrorBody(output.body, context),
2020
2050
  };
2021
2051
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2022
2052
  switch (errorCode) {
@@ -2068,7 +2098,7 @@ exports.deserializeAws_restJson1CreateMapCommand = deserializeAws_restJson1Creat
2068
2098
  const deserializeAws_restJson1CreateMapCommandError = async (output, context) => {
2069
2099
  const parsedOutput = {
2070
2100
  ...output,
2071
- body: await parseBody(output.body, context),
2101
+ body: await parseErrorBody(output.body, context),
2072
2102
  };
2073
2103
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2074
2104
  switch (errorCode) {
@@ -2120,7 +2150,7 @@ exports.deserializeAws_restJson1CreatePlaceIndexCommand = deserializeAws_restJso
2120
2150
  const deserializeAws_restJson1CreatePlaceIndexCommandError = async (output, context) => {
2121
2151
  const parsedOutput = {
2122
2152
  ...output,
2123
- body: await parseBody(output.body, context),
2153
+ body: await parseErrorBody(output.body, context),
2124
2154
  };
2125
2155
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2126
2156
  switch (errorCode) {
@@ -2172,7 +2202,7 @@ exports.deserializeAws_restJson1CreateRouteCalculatorCommand = deserializeAws_re
2172
2202
  const deserializeAws_restJson1CreateRouteCalculatorCommandError = async (output, context) => {
2173
2203
  const parsedOutput = {
2174
2204
  ...output,
2175
- body: await parseBody(output.body, context),
2205
+ body: await parseErrorBody(output.body, context),
2176
2206
  };
2177
2207
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2178
2208
  switch (errorCode) {
@@ -2224,7 +2254,7 @@ exports.deserializeAws_restJson1CreateTrackerCommand = deserializeAws_restJson1C
2224
2254
  const deserializeAws_restJson1CreateTrackerCommandError = async (output, context) => {
2225
2255
  const parsedOutput = {
2226
2256
  ...output,
2227
- body: await parseBody(output.body, context),
2257
+ body: await parseErrorBody(output.body, context),
2228
2258
  };
2229
2259
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2230
2260
  switch (errorCode) {
@@ -2267,7 +2297,7 @@ exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = deserializeAws
2267
2297
  const deserializeAws_restJson1DeleteGeofenceCollectionCommandError = async (output, context) => {
2268
2298
  const parsedOutput = {
2269
2299
  ...output,
2270
- body: await parseBody(output.body, context),
2300
+ body: await parseErrorBody(output.body, context),
2271
2301
  };
2272
2302
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2273
2303
  switch (errorCode) {
@@ -2310,7 +2340,7 @@ exports.deserializeAws_restJson1DeleteMapCommand = deserializeAws_restJson1Delet
2310
2340
  const deserializeAws_restJson1DeleteMapCommandError = async (output, context) => {
2311
2341
  const parsedOutput = {
2312
2342
  ...output,
2313
- body: await parseBody(output.body, context),
2343
+ body: await parseErrorBody(output.body, context),
2314
2344
  };
2315
2345
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2316
2346
  switch (errorCode) {
@@ -2353,7 +2383,7 @@ exports.deserializeAws_restJson1DeletePlaceIndexCommand = deserializeAws_restJso
2353
2383
  const deserializeAws_restJson1DeletePlaceIndexCommandError = async (output, context) => {
2354
2384
  const parsedOutput = {
2355
2385
  ...output,
2356
- body: await parseBody(output.body, context),
2386
+ body: await parseErrorBody(output.body, context),
2357
2387
  };
2358
2388
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2359
2389
  switch (errorCode) {
@@ -2396,7 +2426,7 @@ exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = deserializeAws_re
2396
2426
  const deserializeAws_restJson1DeleteRouteCalculatorCommandError = async (output, context) => {
2397
2427
  const parsedOutput = {
2398
2428
  ...output,
2399
- body: await parseBody(output.body, context),
2429
+ body: await parseErrorBody(output.body, context),
2400
2430
  };
2401
2431
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2402
2432
  switch (errorCode) {
@@ -2439,7 +2469,7 @@ exports.deserializeAws_restJson1DeleteTrackerCommand = deserializeAws_restJson1D
2439
2469
  const deserializeAws_restJson1DeleteTrackerCommandError = async (output, context) => {
2440
2470
  const parsedOutput = {
2441
2471
  ...output,
2442
- body: await parseBody(output.body, context),
2472
+ body: await parseErrorBody(output.body, context),
2443
2473
  };
2444
2474
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
2475
  switch (errorCode) {
@@ -2509,7 +2539,7 @@ exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = deserializeA
2509
2539
  const deserializeAws_restJson1DescribeGeofenceCollectionCommandError = async (output, context) => {
2510
2540
  const parsedOutput = {
2511
2541
  ...output,
2512
- body: await parseBody(output.body, context),
2542
+ body: await parseErrorBody(output.body, context),
2513
2543
  };
2514
2544
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2515
2545
  switch (errorCode) {
@@ -2579,7 +2609,7 @@ exports.deserializeAws_restJson1DescribeMapCommand = deserializeAws_restJson1Des
2579
2609
  const deserializeAws_restJson1DescribeMapCommandError = async (output, context) => {
2580
2610
  const parsedOutput = {
2581
2611
  ...output,
2582
- body: await parseBody(output.body, context),
2612
+ body: await parseErrorBody(output.body, context),
2583
2613
  };
2584
2614
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2585
2615
  switch (errorCode) {
@@ -2649,7 +2679,7 @@ exports.deserializeAws_restJson1DescribePlaceIndexCommand = deserializeAws_restJ
2649
2679
  const deserializeAws_restJson1DescribePlaceIndexCommandError = async (output, context) => {
2650
2680
  const parsedOutput = {
2651
2681
  ...output,
2652
- body: await parseBody(output.body, context),
2682
+ body: await parseErrorBody(output.body, context),
2653
2683
  };
2654
2684
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2655
2685
  switch (errorCode) {
@@ -2716,7 +2746,7 @@ exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = deserializeAws_
2716
2746
  const deserializeAws_restJson1DescribeRouteCalculatorCommandError = async (output, context) => {
2717
2747
  const parsedOutput = {
2718
2748
  ...output,
2719
- body: await parseBody(output.body, context),
2749
+ body: await parseErrorBody(output.body, context),
2720
2750
  };
2721
2751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2722
2752
  switch (errorCode) {
@@ -2789,7 +2819,7 @@ exports.deserializeAws_restJson1DescribeTrackerCommand = deserializeAws_restJson
2789
2819
  const deserializeAws_restJson1DescribeTrackerCommandError = async (output, context) => {
2790
2820
  const parsedOutput = {
2791
2821
  ...output,
2792
- body: await parseBody(output.body, context),
2822
+ body: await parseErrorBody(output.body, context),
2793
2823
  };
2794
2824
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2795
2825
  switch (errorCode) {
@@ -2832,7 +2862,7 @@ exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = deserialize
2832
2862
  const deserializeAws_restJson1DisassociateTrackerConsumerCommandError = async (output, context) => {
2833
2863
  const parsedOutput = {
2834
2864
  ...output,
2835
- body: await parseBody(output.body, context),
2865
+ body: await parseErrorBody(output.body, context),
2836
2866
  };
2837
2867
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2838
2868
  switch (errorCode) {
@@ -2893,7 +2923,7 @@ exports.deserializeAws_restJson1GetDevicePositionCommand = deserializeAws_restJs
2893
2923
  const deserializeAws_restJson1GetDevicePositionCommandError = async (output, context) => {
2894
2924
  const parsedOutput = {
2895
2925
  ...output,
2896
- body: await parseBody(output.body, context),
2926
+ body: await parseErrorBody(output.body, context),
2897
2927
  };
2898
2928
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2899
2929
  switch (errorCode) {
@@ -2942,7 +2972,7 @@ exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = deserializeAws
2942
2972
  const deserializeAws_restJson1GetDevicePositionHistoryCommandError = async (output, context) => {
2943
2973
  const parsedOutput = {
2944
2974
  ...output,
2945
- body: await parseBody(output.body, context),
2975
+ body: await parseErrorBody(output.body, context),
2946
2976
  };
2947
2977
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2948
2978
  switch (errorCode) {
@@ -3000,7 +3030,7 @@ exports.deserializeAws_restJson1GetGeofenceCommand = deserializeAws_restJson1Get
3000
3030
  const deserializeAws_restJson1GetGeofenceCommandError = async (output, context) => {
3001
3031
  const parsedOutput = {
3002
3032
  ...output,
3003
- body: await parseBody(output.body, context),
3033
+ body: await parseErrorBody(output.body, context),
3004
3034
  };
3005
3035
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3006
3036
  switch (errorCode) {
@@ -3045,7 +3075,7 @@ exports.deserializeAws_restJson1GetMapGlyphsCommand = deserializeAws_restJson1Ge
3045
3075
  const deserializeAws_restJson1GetMapGlyphsCommandError = async (output, context) => {
3046
3076
  const parsedOutput = {
3047
3077
  ...output,
3048
- body: await parseBody(output.body, context),
3078
+ body: await parseErrorBody(output.body, context),
3049
3079
  };
3050
3080
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3051
3081
  switch (errorCode) {
@@ -3090,7 +3120,7 @@ exports.deserializeAws_restJson1GetMapSpritesCommand = deserializeAws_restJson1G
3090
3120
  const deserializeAws_restJson1GetMapSpritesCommandError = async (output, context) => {
3091
3121
  const parsedOutput = {
3092
3122
  ...output,
3093
- body: await parseBody(output.body, context),
3123
+ body: await parseErrorBody(output.body, context),
3094
3124
  };
3095
3125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3096
3126
  switch (errorCode) {
@@ -3135,7 +3165,7 @@ exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = deserializeAws_re
3135
3165
  const deserializeAws_restJson1GetMapStyleDescriptorCommandError = async (output, context) => {
3136
3166
  const parsedOutput = {
3137
3167
  ...output,
3138
- body: await parseBody(output.body, context),
3168
+ body: await parseErrorBody(output.body, context),
3139
3169
  };
3140
3170
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3141
3171
  switch (errorCode) {
@@ -3180,7 +3210,53 @@ exports.deserializeAws_restJson1GetMapTileCommand = deserializeAws_restJson1GetM
3180
3210
  const deserializeAws_restJson1GetMapTileCommandError = async (output, context) => {
3181
3211
  const parsedOutput = {
3182
3212
  ...output,
3183
- body: await parseBody(output.body, context),
3213
+ body: await parseErrorBody(output.body, context),
3214
+ };
3215
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3216
+ switch (errorCode) {
3217
+ case "AccessDeniedException":
3218
+ case "com.amazonaws.location#AccessDeniedException":
3219
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3220
+ case "InternalServerException":
3221
+ case "com.amazonaws.location#InternalServerException":
3222
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3223
+ case "ResourceNotFoundException":
3224
+ case "com.amazonaws.location#ResourceNotFoundException":
3225
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3226
+ case "ThrottlingException":
3227
+ case "com.amazonaws.location#ThrottlingException":
3228
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3229
+ case "ValidationException":
3230
+ case "com.amazonaws.location#ValidationException":
3231
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3232
+ default:
3233
+ const parsedBody = parsedOutput.body;
3234
+ (0, smithy_client_1.throwDefaultError)({
3235
+ output,
3236
+ parsedBody,
3237
+ exceptionCtor: LocationServiceException_1.LocationServiceException,
3238
+ errorCode,
3239
+ });
3240
+ }
3241
+ };
3242
+ const deserializeAws_restJson1GetPlaceCommand = async (output, context) => {
3243
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3244
+ return deserializeAws_restJson1GetPlaceCommandError(output, context);
3245
+ }
3246
+ const contents = map({
3247
+ $metadata: deserializeMetadata(output),
3248
+ });
3249
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3250
+ if (data.Place != null) {
3251
+ contents.Place = deserializeAws_restJson1Place(data.Place, context);
3252
+ }
3253
+ return contents;
3254
+ };
3255
+ exports.deserializeAws_restJson1GetPlaceCommand = deserializeAws_restJson1GetPlaceCommand;
3256
+ const deserializeAws_restJson1GetPlaceCommandError = async (output, context) => {
3257
+ const parsedOutput = {
3258
+ ...output,
3259
+ body: await parseErrorBody(output.body, context),
3184
3260
  };
3185
3261
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3186
3262
  switch (errorCode) {
@@ -3229,7 +3305,7 @@ exports.deserializeAws_restJson1ListDevicePositionsCommand = deserializeAws_rest
3229
3305
  const deserializeAws_restJson1ListDevicePositionsCommandError = async (output, context) => {
3230
3306
  const parsedOutput = {
3231
3307
  ...output,
3232
- body: await parseBody(output.body, context),
3308
+ body: await parseErrorBody(output.body, context),
3233
3309
  };
3234
3310
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3235
3311
  switch (errorCode) {
@@ -3275,7 +3351,7 @@ exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = deserializeAws_
3275
3351
  const deserializeAws_restJson1ListGeofenceCollectionsCommandError = async (output, context) => {
3276
3352
  const parsedOutput = {
3277
3353
  ...output,
3278
- body: await parseBody(output.body, context),
3354
+ body: await parseErrorBody(output.body, context),
3279
3355
  };
3280
3356
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3281
3357
  switch (errorCode) {
@@ -3321,7 +3397,7 @@ exports.deserializeAws_restJson1ListGeofencesCommand = deserializeAws_restJson1L
3321
3397
  const deserializeAws_restJson1ListGeofencesCommandError = async (output, context) => {
3322
3398
  const parsedOutput = {
3323
3399
  ...output,
3324
- body: await parseBody(output.body, context),
3400
+ body: await parseErrorBody(output.body, context),
3325
3401
  };
3326
3402
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3327
3403
  switch (errorCode) {
@@ -3370,7 +3446,7 @@ exports.deserializeAws_restJson1ListMapsCommand = deserializeAws_restJson1ListMa
3370
3446
  const deserializeAws_restJson1ListMapsCommandError = async (output, context) => {
3371
3447
  const parsedOutput = {
3372
3448
  ...output,
3373
- body: await parseBody(output.body, context),
3449
+ body: await parseErrorBody(output.body, context),
3374
3450
  };
3375
3451
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3376
3452
  switch (errorCode) {
@@ -3416,7 +3492,7 @@ exports.deserializeAws_restJson1ListPlaceIndexesCommand = deserializeAws_restJso
3416
3492
  const deserializeAws_restJson1ListPlaceIndexesCommandError = async (output, context) => {
3417
3493
  const parsedOutput = {
3418
3494
  ...output,
3419
- body: await parseBody(output.body, context),
3495
+ body: await parseErrorBody(output.body, context),
3420
3496
  };
3421
3497
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3422
3498
  switch (errorCode) {
@@ -3462,7 +3538,7 @@ exports.deserializeAws_restJson1ListRouteCalculatorsCommand = deserializeAws_res
3462
3538
  const deserializeAws_restJson1ListRouteCalculatorsCommandError = async (output, context) => {
3463
3539
  const parsedOutput = {
3464
3540
  ...output,
3465
- body: await parseBody(output.body, context),
3541
+ body: await parseErrorBody(output.body, context),
3466
3542
  };
3467
3543
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3468
3544
  switch (errorCode) {
@@ -3505,7 +3581,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
3505
3581
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
3506
3582
  const parsedOutput = {
3507
3583
  ...output,
3508
- body: await parseBody(output.body, context),
3584
+ body: await parseErrorBody(output.body, context),
3509
3585
  };
3510
3586
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3511
3587
  switch (errorCode) {
@@ -3554,7 +3630,7 @@ exports.deserializeAws_restJson1ListTrackerConsumersCommand = deserializeAws_res
3554
3630
  const deserializeAws_restJson1ListTrackerConsumersCommandError = async (output, context) => {
3555
3631
  const parsedOutput = {
3556
3632
  ...output,
3557
- body: await parseBody(output.body, context),
3633
+ body: await parseErrorBody(output.body, context),
3558
3634
  };
3559
3635
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3560
3636
  switch (errorCode) {
@@ -3603,7 +3679,7 @@ exports.deserializeAws_restJson1ListTrackersCommand = deserializeAws_restJson1Li
3603
3679
  const deserializeAws_restJson1ListTrackersCommandError = async (output, context) => {
3604
3680
  const parsedOutput = {
3605
3681
  ...output,
3606
- body: await parseBody(output.body, context),
3682
+ body: await parseErrorBody(output.body, context),
3607
3683
  };
3608
3684
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3609
3685
  switch (errorCode) {
@@ -3652,7 +3728,7 @@ exports.deserializeAws_restJson1PutGeofenceCommand = deserializeAws_restJson1Put
3652
3728
  const deserializeAws_restJson1PutGeofenceCommandError = async (output, context) => {
3653
3729
  const parsedOutput = {
3654
3730
  ...output,
3655
- body: await parseBody(output.body, context),
3731
+ body: await parseErrorBody(output.body, context),
3656
3732
  };
3657
3733
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3658
3734
  switch (errorCode) {
@@ -3704,7 +3780,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForPositionCommand = deserialize
3704
3780
  const deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = async (output, context) => {
3705
3781
  const parsedOutput = {
3706
3782
  ...output,
3707
- body: await parseBody(output.body, context),
3783
+ body: await parseErrorBody(output.body, context),
3708
3784
  };
3709
3785
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3710
3786
  switch (errorCode) {
@@ -3753,7 +3829,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = deserial
3753
3829
  const deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = async (output, context) => {
3754
3830
  const parsedOutput = {
3755
3831
  ...output,
3756
- body: await parseBody(output.body, context),
3832
+ body: await parseErrorBody(output.body, context),
3757
3833
  };
3758
3834
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3759
3835
  switch (errorCode) {
@@ -3802,7 +3878,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForTextCommand = deserializeAws_
3802
3878
  const deserializeAws_restJson1SearchPlaceIndexForTextCommandError = async (output, context) => {
3803
3879
  const parsedOutput = {
3804
3880
  ...output,
3805
- body: await parseBody(output.body, context),
3881
+ body: await parseErrorBody(output.body, context),
3806
3882
  };
3807
3883
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3808
3884
  switch (errorCode) {
@@ -3845,7 +3921,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
3845
3921
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
3846
3922
  const parsedOutput = {
3847
3923
  ...output,
3848
- body: await parseBody(output.body, context),
3924
+ body: await parseErrorBody(output.body, context),
3849
3925
  };
3850
3926
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3851
3927
  switch (errorCode) {
@@ -3888,7 +3964,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
3888
3964
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
3889
3965
  const parsedOutput = {
3890
3966
  ...output,
3891
- body: await parseBody(output.body, context),
3967
+ body: await parseErrorBody(output.body, context),
3892
3968
  };
3893
3969
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3894
3970
  switch (errorCode) {
@@ -3940,7 +4016,7 @@ exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = deserializeAws
3940
4016
  const deserializeAws_restJson1UpdateGeofenceCollectionCommandError = async (output, context) => {
3941
4017
  const parsedOutput = {
3942
4018
  ...output,
3943
- body: await parseBody(output.body, context),
4019
+ body: await parseErrorBody(output.body, context),
3944
4020
  };
3945
4021
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3946
4022
  switch (errorCode) {
@@ -3992,7 +4068,7 @@ exports.deserializeAws_restJson1UpdateMapCommand = deserializeAws_restJson1Updat
3992
4068
  const deserializeAws_restJson1UpdateMapCommandError = async (output, context) => {
3993
4069
  const parsedOutput = {
3994
4070
  ...output,
3995
- body: await parseBody(output.body, context),
4071
+ body: await parseErrorBody(output.body, context),
3996
4072
  };
3997
4073
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3998
4074
  switch (errorCode) {
@@ -4044,7 +4120,7 @@ exports.deserializeAws_restJson1UpdatePlaceIndexCommand = deserializeAws_restJso
4044
4120
  const deserializeAws_restJson1UpdatePlaceIndexCommandError = async (output, context) => {
4045
4121
  const parsedOutput = {
4046
4122
  ...output,
4047
- body: await parseBody(output.body, context),
4123
+ body: await parseErrorBody(output.body, context),
4048
4124
  };
4049
4125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4050
4126
  switch (errorCode) {
@@ -4096,7 +4172,7 @@ exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = deserializeAws_re
4096
4172
  const deserializeAws_restJson1UpdateRouteCalculatorCommandError = async (output, context) => {
4097
4173
  const parsedOutput = {
4098
4174
  ...output,
4099
- body: await parseBody(output.body, context),
4175
+ body: await parseErrorBody(output.body, context),
4100
4176
  };
4101
4177
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4102
4178
  switch (errorCode) {
@@ -4148,7 +4224,7 @@ exports.deserializeAws_restJson1UpdateTrackerCommand = deserializeAws_restJson1U
4148
4224
  const deserializeAws_restJson1UpdateTrackerCommandError = async (output, context) => {
4149
4225
  const parsedOutput = {
4150
4226
  ...output,
4151
- body: await parseBody(output.body, context),
4227
+ body: await parseErrorBody(output.body, context),
4152
4228
  };
4153
4229
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4154
4230
  switch (errorCode) {
@@ -4882,6 +4958,8 @@ const deserializeAws_restJson1Place = (output, context) => {
4882
4958
  Street: (0, smithy_client_1.expectString)(output.Street),
4883
4959
  SubRegion: (0, smithy_client_1.expectString)(output.SubRegion),
4884
4960
  TimeZone: output.TimeZone != null ? deserializeAws_restJson1TimeZone(output.TimeZone, context) : undefined,
4961
+ UnitNumber: (0, smithy_client_1.expectString)(output.UnitNumber),
4962
+ UnitType: (0, smithy_client_1.expectString)(output.UnitType),
4885
4963
  };
4886
4964
  };
4887
4965
  const deserializeAws_restJson1PlaceGeometry = (output, context) => {
@@ -4966,6 +5044,7 @@ const deserializeAws_restJson1SearchForPositionResult = (output, context) => {
4966
5044
  return {
4967
5045
  Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
4968
5046
  Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
5047
+ PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
4969
5048
  };
4970
5049
  };
4971
5050
  const deserializeAws_restJson1SearchForPositionResultList = (output, context) => {
@@ -4981,6 +5060,7 @@ const deserializeAws_restJson1SearchForPositionResultList = (output, context) =>
4981
5060
  };
4982
5061
  const deserializeAws_restJson1SearchForSuggestionsResult = (output, context) => {
4983
5062
  return {
5063
+ PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
4984
5064
  Text: (0, smithy_client_1.expectString)(output.Text),
4985
5065
  };
4986
5066
  };
@@ -4999,6 +5079,7 @@ const deserializeAws_restJson1SearchForTextResult = (output, context) => {
4999
5079
  return {
5000
5080
  Distance: (0, smithy_client_1.limitedParseDouble)(output.Distance),
5001
5081
  Place: output.Place != null ? deserializeAws_restJson1Place(output.Place, context) : undefined,
5082
+ PlaceId: (0, smithy_client_1.expectString)(output.PlaceId),
5002
5083
  Relevance: (0, smithy_client_1.limitedParseDouble)(output.Relevance),
5003
5084
  };
5004
5085
  };
@@ -5129,6 +5210,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
5129
5210
  }
5130
5211
  return {};
5131
5212
  });
5213
+ const parseErrorBody = async (errorBody, context) => {
5214
+ var _a;
5215
+ const value = await parseBody(errorBody, context);
5216
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
5217
+ return value;
5218
+ };
5132
5219
  const loadRestJsonErrorCode = (output, data) => {
5133
5220
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
5134
5221
  const sanitizeErrorCode = (rawValue) => {
@@ -31,6 +31,7 @@ import { GetMapGlyphsCommand, } from "./commands/GetMapGlyphsCommand";
31
31
  import { GetMapSpritesCommand, } from "./commands/GetMapSpritesCommand";
32
32
  import { GetMapStyleDescriptorCommand, } from "./commands/GetMapStyleDescriptorCommand";
33
33
  import { GetMapTileCommand } from "./commands/GetMapTileCommand";
34
+ import { GetPlaceCommand } from "./commands/GetPlaceCommand";
34
35
  import { ListDevicePositionsCommand, } from "./commands/ListDevicePositionsCommand";
35
36
  import { ListGeofenceCollectionsCommand, } from "./commands/ListGeofenceCollectionsCommand";
36
37
  import { ListGeofencesCommand, } from "./commands/ListGeofencesCommand";
@@ -505,6 +506,20 @@ var Location = (function (_super) {
505
506
  return this.send(command, optionsOrCb);
506
507
  }
507
508
  };
509
+ Location.prototype.getPlace = function (args, optionsOrCb, cb) {
510
+ var command = new GetPlaceCommand(args);
511
+ if (typeof optionsOrCb === "function") {
512
+ this.send(command, optionsOrCb);
513
+ }
514
+ else if (typeof cb === "function") {
515
+ if (typeof optionsOrCb !== "object")
516
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
517
+ this.send(command, optionsOrCb || {}, cb);
518
+ }
519
+ else {
520
+ return this.send(command, optionsOrCb);
521
+ }
522
+ };
508
523
  Location.prototype.listDevicePositions = function (args, optionsOrCb, cb) {
509
524
  var command = new ListDevicePositionsCommand(args);
510
525
  if (typeof optionsOrCb === "function") {