@aws-sdk/client-location 3.46.0 → 3.48.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/Location.js +15 -0
  3. package/dist-cjs/commands/CalculateRouteMatrixCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +37 -45
  6. package/dist-cjs/protocols/Aws_restJson1.js +217 -3
  7. package/dist-cjs/runtimeConfig.browser.js +7 -2
  8. package/dist-cjs/runtimeConfig.js +10 -2
  9. package/dist-es/Location.js +15 -0
  10. package/dist-es/commands/CalculateRouteMatrixCommand.js +39 -0
  11. package/dist-es/commands/index.js +1 -0
  12. package/dist-es/models/models_0.js +20 -28
  13. package/dist-es/protocols/Aws_restJson1.js +226 -0
  14. package/dist-es/runtimeConfig.browser.js +12 -3
  15. package/dist-es/runtimeConfig.js +13 -4
  16. package/dist-types/Location.d.ts +74 -12
  17. package/dist-types/LocationClient.d.ts +8 -3
  18. package/dist-types/commands/CalculateRouteCommand.d.ts +10 -12
  19. package/dist-types/commands/CalculateRouteMatrixCommand.d.ts +74 -0
  20. package/dist-types/commands/CreateMapCommand.d.ts +6 -0
  21. package/dist-types/commands/CreatePlaceIndexCommand.d.ts +6 -0
  22. package/dist-types/commands/CreateRouteCalculatorCommand.d.ts +6 -0
  23. package/dist-types/commands/index.d.ts +1 -0
  24. package/dist-types/models/models_0.d.ts +398 -169
  25. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  26. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  27. package/dist-types/runtimeConfig.d.ts +4 -3
  28. package/dist-types/runtimeConfig.native.d.ts +1 -0
  29. package/dist-types/ts3.4/Location.d.ts +5 -0
  30. package/dist-types/ts3.4/LocationClient.d.ts +6 -3
  31. package/dist-types/ts3.4/commands/CalculateRouteMatrixCommand.d.ts +17 -0
  32. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  33. package/dist-types/ts3.4/models/models_0.d.ts +89 -38
  34. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  35. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  36. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  37. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  38. package/package.json +35 -35
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.48.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.2...v3.48.0) (2022-01-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 2022/01/21 ([#3228](https://github.com/aws/aws-sdk-js-v3/issues/3228)) ([fa713ef](https://github.com/aws/aws-sdk-js-v3/commit/fa713efca6b2f424c27535d000359f08830960b1))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.47.2](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.1...v3.47.2) (2022-01-21)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-location
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.47.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.0-release-test-1...v3.47.1) (2022-01-20)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-location
28
+
29
+
30
+
31
+
32
+
33
+ # [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
34
+
35
+
36
+ ### Features
37
+
38
+ * **clients:** update clients to use default values inferred from defaults mode ([#3192](https://github.com/aws/aws-sdk-js-v3/issues/3192)) ([9152e21](https://github.com/aws/aws-sdk-js-v3/commit/9152e210c6ec29f34bb070eaf2874039022e6ab7))
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
7
45
 
8
46
 
@@ -9,6 +9,7 @@ const BatchGetDevicePositionCommand_1 = require("./commands/BatchGetDevicePositi
9
9
  const BatchPutGeofenceCommand_1 = require("./commands/BatchPutGeofenceCommand");
10
10
  const BatchUpdateDevicePositionCommand_1 = require("./commands/BatchUpdateDevicePositionCommand");
11
11
  const CalculateRouteCommand_1 = require("./commands/CalculateRouteCommand");
12
+ const CalculateRouteMatrixCommand_1 = require("./commands/CalculateRouteMatrixCommand");
12
13
  const CreateGeofenceCollectionCommand_1 = require("./commands/CreateGeofenceCollectionCommand");
13
14
  const CreateMapCommand_1 = require("./commands/CreateMapCommand");
14
15
  const CreatePlaceIndexCommand_1 = require("./commands/CreatePlaceIndexCommand");
@@ -166,6 +167,20 @@ class Location extends LocationClient_1.LocationClient {
166
167
  return this.send(command, optionsOrCb);
167
168
  }
168
169
  }
170
+ calculateRouteMatrix(args, optionsOrCb, cb) {
171
+ const command = new CalculateRouteMatrixCommand_1.CalculateRouteMatrixCommand(args);
172
+ if (typeof optionsOrCb === "function") {
173
+ this.send(command, optionsOrCb);
174
+ }
175
+ else if (typeof cb === "function") {
176
+ if (typeof optionsOrCb !== "object")
177
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
178
+ this.send(command, optionsOrCb || {}, cb);
179
+ }
180
+ else {
181
+ return this.send(command, optionsOrCb);
182
+ }
183
+ }
169
184
  createGeofenceCollection(args, optionsOrCb, cb) {
170
185
  const command = new CreateGeofenceCollectionCommand_1.CreateGeofenceCollectionCommand(args);
171
186
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CalculateRouteMatrixCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class CalculateRouteMatrixCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "LocationClient";
18
+ const commandName = "CalculateRouteMatrixCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.CalculateRouteMatrixRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.CalculateRouteMatrixResponse.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return Aws_restJson1_1.serializeAws_restJson1CalculateRouteMatrixCommand(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return Aws_restJson1_1.deserializeAws_restJson1CalculateRouteMatrixCommand(output, context);
34
+ }
35
+ }
36
+ exports.CalculateRouteMatrixCommand = CalculateRouteMatrixCommand;
@@ -9,6 +9,7 @@ tslib_1.__exportStar(require("./BatchGetDevicePositionCommand"), exports);
9
9
  tslib_1.__exportStar(require("./BatchPutGeofenceCommand"), exports);
10
10
  tslib_1.__exportStar(require("./BatchUpdateDevicePositionCommand"), exports);
11
11
  tslib_1.__exportStar(require("./CalculateRouteCommand"), exports);
12
+ tslib_1.__exportStar(require("./CalculateRouteMatrixCommand"), exports);
12
13
  tslib_1.__exportStar(require("./CreateGeofenceCollectionCommand"), exports);
13
14
  tslib_1.__exportStar(require("./CreateMapCommand"), exports);
14
15
  tslib_1.__exportStar(require("./CreatePlaceIndexCommand"), exports);
@@ -1,15 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateMapResponse = exports.CreateMapRequest = exports.MapConfiguration = exports.CreateGeofenceCollectionResponse = exports.CreateGeofenceCollectionRequest = exports.CalculateRouteResponse = exports.CalculateRouteSummary = exports.Leg = exports.Step = exports.LegGeometry = exports.CalculateRouteRequest = exports.CalculateRouteTruckModeOptions = exports.TruckWeight = exports.TruckDimensions = exports.CalculateRouteCarModeOptions = exports.BatchUpdateDevicePositionResponse = exports.BatchUpdateDevicePositionError = exports.BatchUpdateDevicePositionRequest = exports.BatchPutGeofenceResponse = exports.BatchPutGeofenceSuccess = exports.BatchPutGeofenceError = exports.BatchPutGeofenceRequest = exports.BatchPutGeofenceRequestEntry = exports.GeofenceGeometry = exports.BatchGetDevicePositionResponse = exports.BatchGetDevicePositionError = exports.DevicePosition = exports.BatchGetDevicePositionRequest = exports.BatchEvaluateGeofencesResponse = exports.BatchEvaluateGeofencesError = exports.BatchEvaluateGeofencesRequest = exports.DevicePositionUpdate = exports.PositionalAccuracy = exports.BatchDeleteGeofenceResponse = exports.BatchDeleteGeofenceError = exports.BatchDeleteGeofenceRequest = exports.BatchDeleteDevicePositionHistoryResponse = exports.BatchDeleteDevicePositionHistoryError = exports.BatchItemError = exports.BatchDeleteDevicePositionHistoryRequest = exports.ValidationException = exports.ValidationExceptionField = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AssociateTrackerConsumerResponse = exports.AssociateTrackerConsumerRequest = exports.AccessDeniedException = void 0;
4
- exports.GetDevicePositionHistoryRequest = exports.GetDevicePositionResponse = exports.GetDevicePositionRequest = exports.UpdateGeofenceCollectionResponse = exports.UpdateGeofenceCollectionRequest = exports.PutGeofenceResponse = exports.PutGeofenceRequest = exports.ListGeofencesResponse = exports.ListGeofenceResponseEntry = exports.ListGeofencesRequest = exports.ListGeofenceCollectionsResponse = exports.ListGeofenceCollectionsResponseEntry = exports.ListGeofenceCollectionsRequest = exports.GetGeofenceResponse = exports.GetGeofenceRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.DisassociateTrackerConsumerResponse = exports.DisassociateTrackerConsumerRequest = exports.DescribeTrackerResponse = exports.DescribeTrackerRequest = exports.DescribeRouteCalculatorResponse = exports.DescribeRouteCalculatorRequest = exports.DescribePlaceIndexResponse = exports.DescribePlaceIndexRequest = exports.DescribeMapResponse = exports.DescribeMapRequest = exports.DescribeGeofenceCollectionResponse = exports.DescribeGeofenceCollectionRequest = exports.DeleteTrackerResponse = exports.DeleteTrackerRequest = exports.DeleteRouteCalculatorResponse = exports.DeleteRouteCalculatorRequest = exports.DeletePlaceIndexResponse = exports.DeletePlaceIndexRequest = exports.DeleteMapResponse = exports.DeleteMapRequest = exports.DeleteGeofenceCollectionResponse = exports.DeleteGeofenceCollectionRequest = exports.CreateTrackerResponse = exports.CreateTrackerRequest = exports.CreateRouteCalculatorResponse = exports.CreateRouteCalculatorRequest = exports.CreatePlaceIndexResponse = exports.CreatePlaceIndexRequest = exports.DataSourceConfiguration = void 0;
5
- exports.UpdateTrackerResponse = exports.UpdateTrackerRequest = exports.UpdateRouteCalculatorResponse = exports.UpdateRouteCalculatorRequest = exports.UpdatePlaceIndexResponse = exports.UpdatePlaceIndexRequest = exports.SearchPlaceIndexForTextResponse = exports.SearchPlaceIndexForTextSummary = exports.SearchForTextResult = exports.SearchPlaceIndexForTextRequest = exports.SearchPlaceIndexForSuggestionsResponse = exports.SearchPlaceIndexForSuggestionsSummary = exports.SearchForSuggestionsResult = exports.SearchPlaceIndexForSuggestionsRequest = exports.SearchPlaceIndexForPositionResponse = exports.SearchPlaceIndexForPositionSummary = exports.SearchForPositionResult = exports.Place = exports.TimeZone = exports.PlaceGeometry = exports.SearchPlaceIndexForPositionRequest = exports.UpdateMapResponse = exports.UpdateMapRequest = exports.ListTrackersResponse = exports.ListTrackersResponseEntry = exports.ListTrackersRequest = exports.ListTrackerConsumersResponse = exports.ListTrackerConsumersRequest = exports.ListRouteCalculatorsResponse = exports.ListRouteCalculatorsResponseEntry = exports.ListRouteCalculatorsRequest = exports.ListPlaceIndexesResponse = exports.ListPlaceIndexesResponseEntry = exports.ListPlaceIndexesRequest = exports.ListMapsResponse = exports.ListMapsResponseEntry = exports.ListMapsRequest = exports.ListDevicePositionsResponse = exports.ListDevicePositionsResponseEntry = exports.ListDevicePositionsRequest = exports.GetMapTileResponse = exports.GetMapTileRequest = exports.GetMapStyleDescriptorResponse = exports.GetMapStyleDescriptorRequest = exports.GetMapSpritesResponse = exports.GetMapSpritesRequest = exports.GetMapGlyphsResponse = exports.GetMapGlyphsRequest = exports.GetDevicePositionHistoryResponse = void 0;
3
+ exports.CreatePlaceIndexRequest = exports.DataSourceConfiguration = exports.CreateMapResponse = exports.CreateMapRequest = exports.MapConfiguration = exports.CreateGeofenceCollectionResponse = exports.CreateGeofenceCollectionRequest = exports.CalculateRouteMatrixResponse = exports.CalculateRouteMatrixSummary = exports.RouteMatrixEntry = exports.RouteMatrixEntryError = exports.CalculateRouteMatrixRequest = exports.CalculateRouteResponse = exports.CalculateRouteSummary = exports.Leg = exports.Step = exports.LegGeometry = exports.CalculateRouteRequest = exports.CalculateRouteTruckModeOptions = exports.TruckWeight = exports.TruckDimensions = exports.CalculateRouteCarModeOptions = exports.BatchUpdateDevicePositionResponse = exports.BatchUpdateDevicePositionError = exports.BatchUpdateDevicePositionRequest = exports.BatchPutGeofenceResponse = exports.BatchPutGeofenceSuccess = exports.BatchPutGeofenceError = exports.BatchPutGeofenceRequest = exports.BatchPutGeofenceRequestEntry = exports.GeofenceGeometry = exports.BatchGetDevicePositionResponse = exports.BatchGetDevicePositionError = exports.DevicePosition = exports.BatchGetDevicePositionRequest = exports.BatchEvaluateGeofencesResponse = exports.BatchEvaluateGeofencesError = exports.BatchEvaluateGeofencesRequest = exports.DevicePositionUpdate = exports.PositionalAccuracy = exports.BatchDeleteGeofenceResponse = exports.BatchDeleteGeofenceError = exports.BatchDeleteGeofenceRequest = exports.BatchDeleteDevicePositionHistoryResponse = exports.BatchDeleteDevicePositionHistoryError = exports.BatchItemError = exports.BatchDeleteDevicePositionHistoryRequest = exports.ValidationExceptionField = exports.AssociateTrackerConsumerResponse = exports.AssociateTrackerConsumerRequest = void 0;
4
+ exports.GetMapGlyphsRequest = exports.GetDevicePositionHistoryResponse = exports.GetDevicePositionHistoryRequest = exports.GetDevicePositionResponse = exports.GetDevicePositionRequest = exports.UpdateGeofenceCollectionResponse = exports.UpdateGeofenceCollectionRequest = exports.PutGeofenceResponse = exports.PutGeofenceRequest = exports.ListGeofencesResponse = exports.ListGeofenceResponseEntry = exports.ListGeofencesRequest = exports.ListGeofenceCollectionsResponse = exports.ListGeofenceCollectionsResponseEntry = exports.ListGeofenceCollectionsRequest = exports.GetGeofenceResponse = exports.GetGeofenceRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.DisassociateTrackerConsumerResponse = exports.DisassociateTrackerConsumerRequest = exports.DescribeTrackerResponse = exports.DescribeTrackerRequest = exports.DescribeRouteCalculatorResponse = exports.DescribeRouteCalculatorRequest = exports.DescribePlaceIndexResponse = exports.DescribePlaceIndexRequest = exports.DescribeMapResponse = exports.DescribeMapRequest = exports.DescribeGeofenceCollectionResponse = exports.DescribeGeofenceCollectionRequest = exports.DeleteTrackerResponse = exports.DeleteTrackerRequest = exports.DeleteRouteCalculatorResponse = exports.DeleteRouteCalculatorRequest = exports.DeletePlaceIndexResponse = exports.DeletePlaceIndexRequest = exports.DeleteMapResponse = exports.DeleteMapRequest = exports.DeleteGeofenceCollectionResponse = exports.DeleteGeofenceCollectionRequest = exports.CreateTrackerResponse = exports.CreateTrackerRequest = exports.CreateRouteCalculatorResponse = exports.CreateRouteCalculatorRequest = exports.CreatePlaceIndexResponse = void 0;
5
+ exports.UpdateTrackerResponse = exports.UpdateTrackerRequest = exports.UpdateRouteCalculatorResponse = exports.UpdateRouteCalculatorRequest = exports.UpdatePlaceIndexResponse = exports.UpdatePlaceIndexRequest = exports.SearchPlaceIndexForTextResponse = exports.SearchPlaceIndexForTextSummary = exports.SearchForTextResult = exports.SearchPlaceIndexForTextRequest = exports.SearchPlaceIndexForSuggestionsResponse = exports.SearchPlaceIndexForSuggestionsSummary = exports.SearchForSuggestionsResult = exports.SearchPlaceIndexForSuggestionsRequest = exports.SearchPlaceIndexForPositionResponse = exports.SearchPlaceIndexForPositionSummary = exports.SearchForPositionResult = exports.Place = exports.TimeZone = exports.PlaceGeometry = exports.SearchPlaceIndexForPositionRequest = exports.UpdateMapResponse = exports.UpdateMapRequest = exports.ListTrackersResponse = exports.ListTrackersResponseEntry = exports.ListTrackersRequest = exports.ListTrackerConsumersResponse = exports.ListTrackerConsumersRequest = exports.ListRouteCalculatorsResponse = exports.ListRouteCalculatorsResponseEntry = exports.ListRouteCalculatorsRequest = exports.ListPlaceIndexesResponse = exports.ListPlaceIndexesResponseEntry = exports.ListPlaceIndexesRequest = exports.ListMapsResponse = exports.ListMapsResponseEntry = exports.ListMapsRequest = exports.ListDevicePositionsResponse = exports.ListDevicePositionsResponseEntry = exports.ListDevicePositionsRequest = exports.GetMapTileResponse = exports.GetMapTileRequest = exports.GetMapStyleDescriptorResponse = exports.GetMapStyleDescriptorRequest = exports.GetMapSpritesResponse = exports.GetMapSpritesRequest = exports.GetMapGlyphsResponse = void 0;
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
- var AccessDeniedException;
8
- (function (AccessDeniedException) {
9
- AccessDeniedException.filterSensitiveLog = (obj) => ({
10
- ...obj,
11
- });
12
- })(AccessDeniedException = exports.AccessDeniedException || (exports.AccessDeniedException = {}));
13
7
  var AssociateTrackerConsumerRequest;
14
8
  (function (AssociateTrackerConsumerRequest) {
15
9
  AssociateTrackerConsumerRequest.filterSensitiveLog = (obj) => ({
@@ -22,48 +16,12 @@ var AssociateTrackerConsumerResponse;
22
16
  ...obj,
23
17
  });
24
18
  })(AssociateTrackerConsumerResponse = exports.AssociateTrackerConsumerResponse || (exports.AssociateTrackerConsumerResponse = {}));
25
- var ConflictException;
26
- (function (ConflictException) {
27
- ConflictException.filterSensitiveLog = (obj) => ({
28
- ...obj,
29
- });
30
- })(ConflictException = exports.ConflictException || (exports.ConflictException = {}));
31
- var InternalServerException;
32
- (function (InternalServerException) {
33
- InternalServerException.filterSensitiveLog = (obj) => ({
34
- ...obj,
35
- });
36
- })(InternalServerException = exports.InternalServerException || (exports.InternalServerException = {}));
37
- var ResourceNotFoundException;
38
- (function (ResourceNotFoundException) {
39
- ResourceNotFoundException.filterSensitiveLog = (obj) => ({
40
- ...obj,
41
- });
42
- })(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {}));
43
- var ServiceQuotaExceededException;
44
- (function (ServiceQuotaExceededException) {
45
- ServiceQuotaExceededException.filterSensitiveLog = (obj) => ({
46
- ...obj,
47
- });
48
- })(ServiceQuotaExceededException = exports.ServiceQuotaExceededException || (exports.ServiceQuotaExceededException = {}));
49
- var ThrottlingException;
50
- (function (ThrottlingException) {
51
- ThrottlingException.filterSensitiveLog = (obj) => ({
52
- ...obj,
53
- });
54
- })(ThrottlingException = exports.ThrottlingException || (exports.ThrottlingException = {}));
55
19
  var ValidationExceptionField;
56
20
  (function (ValidationExceptionField) {
57
21
  ValidationExceptionField.filterSensitiveLog = (obj) => ({
58
22
  ...obj,
59
23
  });
60
24
  })(ValidationExceptionField = exports.ValidationExceptionField || (exports.ValidationExceptionField = {}));
61
- var ValidationException;
62
- (function (ValidationException) {
63
- ValidationException.filterSensitiveLog = (obj) => ({
64
- ...obj,
65
- });
66
- })(ValidationException = exports.ValidationException || (exports.ValidationException = {}));
67
25
  var BatchDeleteDevicePositionHistoryRequest;
68
26
  (function (BatchDeleteDevicePositionHistoryRequest) {
69
27
  BatchDeleteDevicePositionHistoryRequest.filterSensitiveLog = (obj) => ({
@@ -301,6 +259,40 @@ var CalculateRouteResponse;
301
259
  ...(obj.Summary && { Summary: CalculateRouteSummary.filterSensitiveLog(obj.Summary) }),
302
260
  });
303
261
  })(CalculateRouteResponse = exports.CalculateRouteResponse || (exports.CalculateRouteResponse = {}));
262
+ var CalculateRouteMatrixRequest;
263
+ (function (CalculateRouteMatrixRequest) {
264
+ CalculateRouteMatrixRequest.filterSensitiveLog = (obj) => ({
265
+ ...obj,
266
+ ...(obj.DeparturePositions && { DeparturePositions: smithy_client_1.SENSITIVE_STRING }),
267
+ ...(obj.DestinationPositions && { DestinationPositions: smithy_client_1.SENSITIVE_STRING }),
268
+ });
269
+ })(CalculateRouteMatrixRequest = exports.CalculateRouteMatrixRequest || (exports.CalculateRouteMatrixRequest = {}));
270
+ var RouteMatrixEntryError;
271
+ (function (RouteMatrixEntryError) {
272
+ RouteMatrixEntryError.filterSensitiveLog = (obj) => ({
273
+ ...obj,
274
+ });
275
+ })(RouteMatrixEntryError = exports.RouteMatrixEntryError || (exports.RouteMatrixEntryError = {}));
276
+ var RouteMatrixEntry;
277
+ (function (RouteMatrixEntry) {
278
+ RouteMatrixEntry.filterSensitiveLog = (obj) => ({
279
+ ...obj,
280
+ });
281
+ })(RouteMatrixEntry = exports.RouteMatrixEntry || (exports.RouteMatrixEntry = {}));
282
+ var CalculateRouteMatrixSummary;
283
+ (function (CalculateRouteMatrixSummary) {
284
+ CalculateRouteMatrixSummary.filterSensitiveLog = (obj) => ({
285
+ ...obj,
286
+ });
287
+ })(CalculateRouteMatrixSummary = exports.CalculateRouteMatrixSummary || (exports.CalculateRouteMatrixSummary = {}));
288
+ var CalculateRouteMatrixResponse;
289
+ (function (CalculateRouteMatrixResponse) {
290
+ CalculateRouteMatrixResponse.filterSensitiveLog = (obj) => ({
291
+ ...obj,
292
+ ...(obj.SnappedDeparturePositions && { SnappedDeparturePositions: smithy_client_1.SENSITIVE_STRING }),
293
+ ...(obj.SnappedDestinationPositions && { SnappedDestinationPositions: smithy_client_1.SENSITIVE_STRING }),
294
+ });
295
+ })(CalculateRouteMatrixResponse = exports.CalculateRouteMatrixResponse || (exports.CalculateRouteMatrixResponse = {}));
304
296
  var CreateGeofenceCollectionRequest;
305
297
  (function (CreateGeofenceCollectionRequest) {
306
298
  CreateGeofenceCollectionRequest.filterSensitiveLog = (obj) => ({
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeAws_restJson1UpdateRouteCalculatorCommand = 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_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_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = 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_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 = void 0;
5
- exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = void 0;
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;
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 serializeAws_restJson1AssociateTrackerConsumerCommand = async (input, context) => {
@@ -353,6 +353,65 @@ const serializeAws_restJson1CalculateRouteCommand = async (input, context) => {
353
353
  });
354
354
  };
355
355
  exports.serializeAws_restJson1CalculateRouteCommand = serializeAws_restJson1CalculateRouteCommand;
356
+ const serializeAws_restJson1CalculateRouteMatrixCommand = async (input, context) => {
357
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const headers = {
359
+ "content-type": "application/json",
360
+ };
361
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
362
+ "/routes/v0/calculators/{CalculatorName}/calculate/route-matrix";
363
+ if (input.CalculatorName !== undefined) {
364
+ const labelValue = input.CalculatorName;
365
+ if (labelValue.length <= 0) {
366
+ throw new Error("Empty value provided for input HTTP label: CalculatorName.");
367
+ }
368
+ resolvedPath = resolvedPath.replace("{CalculatorName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
369
+ }
370
+ else {
371
+ throw new Error("No value provided for input HTTP label: CalculatorName.");
372
+ }
373
+ let body;
374
+ body = JSON.stringify({
375
+ ...(input.CarModeOptions !== undefined &&
376
+ input.CarModeOptions !== null && {
377
+ CarModeOptions: serializeAws_restJson1CalculateRouteCarModeOptions(input.CarModeOptions, context),
378
+ }),
379
+ ...(input.DepartNow !== undefined && input.DepartNow !== null && { DepartNow: input.DepartNow }),
380
+ ...(input.DeparturePositions !== undefined &&
381
+ input.DeparturePositions !== null && {
382
+ DeparturePositions: serializeAws_restJson1PositionList(input.DeparturePositions, context),
383
+ }),
384
+ ...(input.DepartureTime !== undefined &&
385
+ input.DepartureTime !== null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" }),
386
+ ...(input.DestinationPositions !== undefined &&
387
+ input.DestinationPositions !== null && {
388
+ DestinationPositions: serializeAws_restJson1PositionList(input.DestinationPositions, context),
389
+ }),
390
+ ...(input.DistanceUnit !== undefined && input.DistanceUnit !== null && { DistanceUnit: input.DistanceUnit }),
391
+ ...(input.TravelMode !== undefined && input.TravelMode !== null && { TravelMode: input.TravelMode }),
392
+ ...(input.TruckModeOptions !== undefined &&
393
+ input.TruckModeOptions !== null && {
394
+ TruckModeOptions: serializeAws_restJson1CalculateRouteTruckModeOptions(input.TruckModeOptions, context),
395
+ }),
396
+ });
397
+ let { hostname: resolvedHostname } = await context.endpoint();
398
+ if (context.disableHostPrefix !== true) {
399
+ resolvedHostname = "routes." + resolvedHostname;
400
+ if (!protocol_http_1.isValidHostname(resolvedHostname)) {
401
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
402
+ }
403
+ }
404
+ return new protocol_http_1.HttpRequest({
405
+ protocol,
406
+ hostname: resolvedHostname,
407
+ port,
408
+ method: "POST",
409
+ headers,
410
+ path: resolvedPath,
411
+ body,
412
+ });
413
+ };
414
+ exports.serializeAws_restJson1CalculateRouteMatrixCommand = serializeAws_restJson1CalculateRouteMatrixCommand;
356
415
  const serializeAws_restJson1CreateGeofenceCollectionCommand = async (input, context) => {
357
416
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
417
  const headers = {
@@ -2675,6 +2734,98 @@ const deserializeAws_restJson1CalculateRouteCommandError = async (output, contex
2675
2734
  delete response.Message;
2676
2735
  return Promise.reject(Object.assign(new Error(message), response));
2677
2736
  };
2737
+ const deserializeAws_restJson1CalculateRouteMatrixCommand = async (output, context) => {
2738
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2739
+ return deserializeAws_restJson1CalculateRouteMatrixCommandError(output, context);
2740
+ }
2741
+ const contents = {
2742
+ $metadata: deserializeMetadata(output),
2743
+ RouteMatrix: undefined,
2744
+ SnappedDeparturePositions: undefined,
2745
+ SnappedDestinationPositions: undefined,
2746
+ Summary: undefined,
2747
+ };
2748
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2749
+ if (data.RouteMatrix !== undefined && data.RouteMatrix !== null) {
2750
+ contents.RouteMatrix = deserializeAws_restJson1RouteMatrix(data.RouteMatrix, context);
2751
+ }
2752
+ if (data.SnappedDeparturePositions !== undefined && data.SnappedDeparturePositions !== null) {
2753
+ contents.SnappedDeparturePositions = deserializeAws_restJson1PositionList(data.SnappedDeparturePositions, context);
2754
+ }
2755
+ if (data.SnappedDestinationPositions !== undefined && data.SnappedDestinationPositions !== null) {
2756
+ contents.SnappedDestinationPositions = deserializeAws_restJson1PositionList(data.SnappedDestinationPositions, context);
2757
+ }
2758
+ if (data.Summary !== undefined && data.Summary !== null) {
2759
+ contents.Summary = deserializeAws_restJson1CalculateRouteMatrixSummary(data.Summary, context);
2760
+ }
2761
+ return Promise.resolve(contents);
2762
+ };
2763
+ exports.deserializeAws_restJson1CalculateRouteMatrixCommand = deserializeAws_restJson1CalculateRouteMatrixCommand;
2764
+ const deserializeAws_restJson1CalculateRouteMatrixCommandError = async (output, context) => {
2765
+ const parsedOutput = {
2766
+ ...output,
2767
+ body: await parseBody(output.body, context),
2768
+ };
2769
+ let response;
2770
+ let errorCode = "UnknownError";
2771
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2772
+ switch (errorCode) {
2773
+ case "AccessDeniedException":
2774
+ case "com.amazonaws.location#AccessDeniedException":
2775
+ response = {
2776
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2777
+ name: errorCode,
2778
+ $metadata: deserializeMetadata(output),
2779
+ };
2780
+ break;
2781
+ case "InternalServerException":
2782
+ case "com.amazonaws.location#InternalServerException":
2783
+ response = {
2784
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
2785
+ name: errorCode,
2786
+ $metadata: deserializeMetadata(output),
2787
+ };
2788
+ break;
2789
+ case "ResourceNotFoundException":
2790
+ case "com.amazonaws.location#ResourceNotFoundException":
2791
+ response = {
2792
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2793
+ name: errorCode,
2794
+ $metadata: deserializeMetadata(output),
2795
+ };
2796
+ break;
2797
+ case "ThrottlingException":
2798
+ case "com.amazonaws.location#ThrottlingException":
2799
+ response = {
2800
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
2801
+ name: errorCode,
2802
+ $metadata: deserializeMetadata(output),
2803
+ };
2804
+ break;
2805
+ case "ValidationException":
2806
+ case "com.amazonaws.location#ValidationException":
2807
+ response = {
2808
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
2809
+ name: errorCode,
2810
+ $metadata: deserializeMetadata(output),
2811
+ };
2812
+ break;
2813
+ default:
2814
+ const parsedBody = parsedOutput.body;
2815
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2816
+ response = {
2817
+ ...parsedBody,
2818
+ name: `${errorCode}`,
2819
+ message: parsedBody.message || parsedBody.Message || errorCode,
2820
+ $fault: "client",
2821
+ $metadata: deserializeMetadata(output),
2822
+ };
2823
+ }
2824
+ const message = response.message || response.Message || errorCode;
2825
+ response.message = message;
2826
+ delete response.Message;
2827
+ return Promise.reject(Object.assign(new Error(message), response));
2828
+ };
2678
2829
  const deserializeAws_restJson1CreateGeofenceCollectionCommand = async (output, context) => {
2679
2830
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2680
2831
  return deserializeAws_restJson1CreateGeofenceCollectionCommandError(output, context);
@@ -6634,6 +6785,16 @@ const serializeAws_restJson1PositionalAccuracy = (input, context) => {
6634
6785
  input.Horizontal !== null && { Horizontal: smithy_client_1.serializeFloat(input.Horizontal) }),
6635
6786
  };
6636
6787
  };
6788
+ const serializeAws_restJson1PositionList = (input, context) => {
6789
+ return input
6790
+ .filter((e) => e != null)
6791
+ .map((entry) => {
6792
+ if (entry === null) {
6793
+ return null;
6794
+ }
6795
+ return serializeAws_restJson1Position(entry, context);
6796
+ });
6797
+ };
6637
6798
  const serializeAws_restJson1PropertyMap = (input, context) => {
6638
6799
  return Object.entries(input).reduce((acc, [key, value]) => {
6639
6800
  if (value === null) {
@@ -6841,6 +7002,14 @@ const deserializeAws_restJson1BoundingBox = (output, context) => {
6841
7002
  return smithy_client_1.limitedParseDouble(entry);
6842
7003
  });
6843
7004
  };
7005
+ const deserializeAws_restJson1CalculateRouteMatrixSummary = (output, context) => {
7006
+ return {
7007
+ DataSource: smithy_client_1.expectString(output.DataSource),
7008
+ DistanceUnit: smithy_client_1.expectString(output.DistanceUnit),
7009
+ ErrorCount: smithy_client_1.expectInt32(output.ErrorCount),
7010
+ RouteCount: smithy_client_1.expectInt32(output.RouteCount),
7011
+ };
7012
+ };
6844
7013
  const deserializeAws_restJson1CalculateRouteSummary = (output, context) => {
6845
7014
  return {
6846
7015
  DataSource: smithy_client_1.expectString(output.DataSource),
@@ -7188,6 +7357,16 @@ const deserializeAws_restJson1PositionalAccuracy = (output, context) => {
7188
7357
  Horizontal: smithy_client_1.limitedParseDouble(output.Horizontal),
7189
7358
  };
7190
7359
  };
7360
+ const deserializeAws_restJson1PositionList = (output, context) => {
7361
+ return (output || [])
7362
+ .filter((e) => e != null)
7363
+ .map((entry) => {
7364
+ if (entry === null) {
7365
+ return null;
7366
+ }
7367
+ return deserializeAws_restJson1Position(entry, context);
7368
+ });
7369
+ };
7191
7370
  const deserializeAws_restJson1PropertyMap = (output, context) => {
7192
7371
  return Object.entries(output).reduce((acc, [key, value]) => {
7193
7372
  if (value === null) {
@@ -7199,6 +7378,41 @@ const deserializeAws_restJson1PropertyMap = (output, context) => {
7199
7378
  };
7200
7379
  }, {});
7201
7380
  };
7381
+ const deserializeAws_restJson1RouteMatrix = (output, context) => {
7382
+ return (output || [])
7383
+ .filter((e) => e != null)
7384
+ .map((entry) => {
7385
+ if (entry === null) {
7386
+ return null;
7387
+ }
7388
+ return deserializeAws_restJson1RouteMatrixRow(entry, context);
7389
+ });
7390
+ };
7391
+ const deserializeAws_restJson1RouteMatrixEntry = (output, context) => {
7392
+ return {
7393
+ Distance: smithy_client_1.limitedParseDouble(output.Distance),
7394
+ DurationSeconds: smithy_client_1.limitedParseDouble(output.DurationSeconds),
7395
+ Error: output.Error !== undefined && output.Error !== null
7396
+ ? deserializeAws_restJson1RouteMatrixEntryError(output.Error, context)
7397
+ : undefined,
7398
+ };
7399
+ };
7400
+ const deserializeAws_restJson1RouteMatrixEntryError = (output, context) => {
7401
+ return {
7402
+ Code: smithy_client_1.expectString(output.Code),
7403
+ Message: smithy_client_1.expectString(output.Message),
7404
+ };
7405
+ };
7406
+ const deserializeAws_restJson1RouteMatrixRow = (output, context) => {
7407
+ return (output || [])
7408
+ .filter((e) => e != null)
7409
+ .map((entry) => {
7410
+ if (entry === null) {
7411
+ return null;
7412
+ }
7413
+ return deserializeAws_restJson1RouteMatrixEntry(entry, context);
7414
+ });
7415
+ };
7202
7416
  const deserializeAws_restJson1SearchForPositionResult = (output, context) => {
7203
7417
  return {
7204
7418
  Distance: smithy_client_1.limitedParseDouble(output.Distance),
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
13
13
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
14
14
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
15
15
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
17
+ const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
16
18
  const getRuntimeConfig = (config) => {
17
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
+ const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
21
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
18
22
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
19
23
  return {
20
24
  ...clientSharedValues,
21
25
  ...config,
22
26
  runtime: "browser",
27
+ defaultsMode,
23
28
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
24
29
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
25
30
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
27
32
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
33
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
29
34
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
30
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
31
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
35
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
32
37
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
33
38
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
34
39
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
@@ -15,13 +15,18 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
15
15
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
16
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
18
20
  const getRuntimeConfig = (config) => {
19
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
22
+ const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
20
24
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
21
25
  return {
22
26
  ...clientSharedValues,
23
27
  ...config,
24
28
  runtime: "node",
29
+ defaultsMode,
25
30
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
26
31
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
27
32
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
@@ -29,8 +34,11 @@ const getRuntimeConfig = (config) => {
29
34
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
30
35
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
31
36
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
32
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
33
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
37
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
38
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
39
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
41
+ }),
34
42
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
35
43
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
36
44
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
@@ -7,6 +7,7 @@ import { BatchGetDevicePositionCommand, } from "./commands/BatchGetDevicePositio
7
7
  import { BatchPutGeofenceCommand, } from "./commands/BatchPutGeofenceCommand";
8
8
  import { BatchUpdateDevicePositionCommand, } from "./commands/BatchUpdateDevicePositionCommand";
9
9
  import { CalculateRouteCommand, } from "./commands/CalculateRouteCommand";
10
+ import { CalculateRouteMatrixCommand, } from "./commands/CalculateRouteMatrixCommand";
10
11
  import { CreateGeofenceCollectionCommand, } from "./commands/CreateGeofenceCollectionCommand";
11
12
  import { CreateMapCommand } from "./commands/CreateMapCommand";
12
13
  import { CreatePlaceIndexCommand, } from "./commands/CreatePlaceIndexCommand";
@@ -168,6 +169,20 @@ var Location = (function (_super) {
168
169
  return this.send(command, optionsOrCb);
169
170
  }
170
171
  };
172
+ Location.prototype.calculateRouteMatrix = function (args, optionsOrCb, cb) {
173
+ var command = new CalculateRouteMatrixCommand(args);
174
+ if (typeof optionsOrCb === "function") {
175
+ this.send(command, optionsOrCb);
176
+ }
177
+ else if (typeof cb === "function") {
178
+ if (typeof optionsOrCb !== "object")
179
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
180
+ this.send(command, optionsOrCb || {}, cb);
181
+ }
182
+ else {
183
+ return this.send(command, optionsOrCb);
184
+ }
185
+ };
171
186
  Location.prototype.createGeofenceCollection = function (args, optionsOrCb, cb) {
172
187
  var command = new CreateGeofenceCollectionCommand(args);
173
188
  if (typeof optionsOrCb === "function") {