@aws-sdk/client-location 3.47.1 → 3.50.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.
- package/CHANGELOG.md +35 -0
- package/dist-cjs/Location.js +15 -0
- package/dist-cjs/commands/CalculateRouteMatrixCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +37 -3
- package/dist-cjs/protocols/Aws_restJson1.js +217 -3
- package/dist-es/Location.js +15 -0
- package/dist-es/commands/CalculateRouteMatrixCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +20 -0
- package/dist-es/protocols/Aws_restJson1.js +226 -0
- package/dist-types/Location.d.ts +74 -12
- package/dist-types/LocationClient.d.ts +3 -2
- package/dist-types/commands/CalculateRouteCommand.d.ts +10 -12
- package/dist-types/commands/CalculateRouteMatrixCommand.d.ts +74 -0
- package/dist-types/commands/CreateMapCommand.d.ts +6 -0
- package/dist-types/commands/CreatePlaceIndexCommand.d.ts +6 -0
- package/dist-types/commands/CreateRouteCalculatorCommand.d.ts +6 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +398 -127
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +39 -33
- package/dist-types/ts3.4/Location.d.ts +0 -260
- package/dist-types/ts3.4/LocationClient.d.ts +0 -124
- package/dist-types/ts3.4/commands/AssociateTrackerConsumerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchDeleteDevicePositionHistoryCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchDeleteGeofenceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchEvaluateGeofencesCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchGetDevicePositionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchPutGeofenceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/BatchUpdateDevicePositionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CalculateRouteCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CreateGeofenceCollectionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CreateMapCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CreatePlaceIndexCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CreateRouteCalculatorCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/CreateTrackerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DeleteGeofenceCollectionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DeleteMapCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DeletePlaceIndexCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DeleteRouteCalculatorCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DeleteTrackerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DescribeGeofenceCollectionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DescribeMapCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DescribePlaceIndexCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DescribeRouteCalculatorCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DescribeTrackerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/DisassociateTrackerConsumerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetDevicePositionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetDevicePositionHistoryCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetGeofenceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetMapGlyphsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetMapSpritesCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetMapStyleDescriptorCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/GetMapTileCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListDevicePositionsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListGeofenceCollectionsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListGeofencesCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListMapsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListPlaceIndexesCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListRouteCalculatorsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListTrackerConsumersCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/ListTrackersCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/PutGeofenceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/SearchPlaceIndexForPositionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/SearchPlaceIndexForSuggestionsCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/SearchPlaceIndexForTextCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UpdateGeofenceCollectionCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UpdateMapCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UpdatePlaceIndexCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UpdateRouteCalculatorCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/UpdateTrackerCommand.d.ts +0 -17
- package/dist-types/ts3.4/commands/index.d.ts +0 -51
- package/dist-types/ts3.4/endpoints.d.ts +0 -2
- package/dist-types/ts3.4/index.d.ts +0 -5
- package/dist-types/ts3.4/models/index.d.ts +0 -1
- package/dist-types/ts3.4/models/models_0.d.ts +0 -1838
- package/dist-types/ts3.4/pagination/GetDevicePositionHistoryPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +0 -6
- package/dist-types/ts3.4/pagination/ListDevicePositionsPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListGeofenceCollectionsPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListGeofencesPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListMapsPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListPlaceIndexesPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListRouteCalculatorsPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListTrackerConsumersPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/ListTrackersPaginator.d.ts +0 -4
- package/dist-types/ts3.4/pagination/index.d.ts +0 -10
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -155
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +0 -38
- package/dist-types/ts3.4/runtimeConfig.d.ts +0 -38
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +0 -37
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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.50.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.49.0...v3.50.0) (2022-02-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-location
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.49.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.48.0...v3.49.0) (2022-01-29)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-location
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.48.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.2...v3.48.0) (2022-01-22)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **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))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [3.47.2](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.1...v3.47.2) (2022-01-21)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @aws-sdk/client-location
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [3.47.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.0-release-test-1...v3.47.1) (2022-01-20)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @aws-sdk/client-location
|
package/dist-cjs/Location.js
CHANGED
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
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 = 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
7
|
var AssociateTrackerConsumerRequest;
|
|
8
8
|
(function (AssociateTrackerConsumerRequest) {
|
|
@@ -259,6 +259,40 @@ var CalculateRouteResponse;
|
|
|
259
259
|
...(obj.Summary && { Summary: CalculateRouteSummary.filterSensitiveLog(obj.Summary) }),
|
|
260
260
|
});
|
|
261
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 = {}));
|
|
262
296
|
var CreateGeofenceCollectionRequest;
|
|
263
297
|
(function (CreateGeofenceCollectionRequest) {
|
|
264
298
|
CreateGeofenceCollectionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
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),
|
package/dist-es/Location.js
CHANGED
|
@@ -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") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { CalculateRouteMatrixRequest, CalculateRouteMatrixResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1CalculateRouteMatrixCommand, serializeAws_restJson1CalculateRouteMatrixCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var CalculateRouteMatrixCommand = (function (_super) {
|
|
7
|
+
__extends(CalculateRouteMatrixCommand, _super);
|
|
8
|
+
function CalculateRouteMatrixCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
CalculateRouteMatrixCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "LocationClient";
|
|
18
|
+
var commandName = "CalculateRouteMatrixCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: CalculateRouteMatrixRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: CalculateRouteMatrixResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
CalculateRouteMatrixCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1CalculateRouteMatrixCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
CalculateRouteMatrixCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1CalculateRouteMatrixCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return CalculateRouteMatrixCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { CalculateRouteMatrixCommand };
|
|
@@ -6,6 +6,7 @@ export * from "./BatchGetDevicePositionCommand";
|
|
|
6
6
|
export * from "./BatchPutGeofenceCommand";
|
|
7
7
|
export * from "./BatchUpdateDevicePositionCommand";
|
|
8
8
|
export * from "./CalculateRouteCommand";
|
|
9
|
+
export * from "./CalculateRouteMatrixCommand";
|
|
9
10
|
export * from "./CreateGeofenceCollectionCommand";
|
|
10
11
|
export * from "./CreateMapCommand";
|
|
11
12
|
export * from "./CreatePlaceIndexCommand";
|
|
@@ -156,6 +156,26 @@ export var CalculateRouteResponse;
|
|
|
156
156
|
(function (CalculateRouteResponse) {
|
|
157
157
|
CalculateRouteResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Legs && { Legs: obj.Legs.map(function (item) { return Leg.filterSensitiveLog(item); }) })), (obj.Summary && { Summary: CalculateRouteSummary.filterSensitiveLog(obj.Summary) }))); };
|
|
158
158
|
})(CalculateRouteResponse || (CalculateRouteResponse = {}));
|
|
159
|
+
export var CalculateRouteMatrixRequest;
|
|
160
|
+
(function (CalculateRouteMatrixRequest) {
|
|
161
|
+
CalculateRouteMatrixRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.DeparturePositions && { DeparturePositions: SENSITIVE_STRING })), (obj.DestinationPositions && { DestinationPositions: SENSITIVE_STRING }))); };
|
|
162
|
+
})(CalculateRouteMatrixRequest || (CalculateRouteMatrixRequest = {}));
|
|
163
|
+
export var RouteMatrixEntryError;
|
|
164
|
+
(function (RouteMatrixEntryError) {
|
|
165
|
+
RouteMatrixEntryError.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
166
|
+
})(RouteMatrixEntryError || (RouteMatrixEntryError = {}));
|
|
167
|
+
export var RouteMatrixEntry;
|
|
168
|
+
(function (RouteMatrixEntry) {
|
|
169
|
+
RouteMatrixEntry.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
170
|
+
})(RouteMatrixEntry || (RouteMatrixEntry = {}));
|
|
171
|
+
export var CalculateRouteMatrixSummary;
|
|
172
|
+
(function (CalculateRouteMatrixSummary) {
|
|
173
|
+
CalculateRouteMatrixSummary.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
174
|
+
})(CalculateRouteMatrixSummary || (CalculateRouteMatrixSummary = {}));
|
|
175
|
+
export var CalculateRouteMatrixResponse;
|
|
176
|
+
(function (CalculateRouteMatrixResponse) {
|
|
177
|
+
CalculateRouteMatrixResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.SnappedDeparturePositions && { SnappedDeparturePositions: SENSITIVE_STRING })), (obj.SnappedDestinationPositions && { SnappedDestinationPositions: SENSITIVE_STRING }))); };
|
|
178
|
+
})(CalculateRouteMatrixResponse || (CalculateRouteMatrixResponse = {}));
|
|
159
179
|
export var CreateGeofenceCollectionRequest;
|
|
160
180
|
(function (CreateGeofenceCollectionRequest) {
|
|
161
181
|
CreateGeofenceCollectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|