@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
@@ -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";
@@ -1,9 +1,5 @@
1
1
  import { __assign } from "tslib";
2
2
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
- export var AccessDeniedException;
4
- (function (AccessDeniedException) {
5
- AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
6
- })(AccessDeniedException || (AccessDeniedException = {}));
7
3
  export var AssociateTrackerConsumerRequest;
8
4
  (function (AssociateTrackerConsumerRequest) {
9
5
  AssociateTrackerConsumerRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -12,34 +8,10 @@ export var AssociateTrackerConsumerResponse;
12
8
  (function (AssociateTrackerConsumerResponse) {
13
9
  AssociateTrackerConsumerResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
14
10
  })(AssociateTrackerConsumerResponse || (AssociateTrackerConsumerResponse = {}));
15
- export var ConflictException;
16
- (function (ConflictException) {
17
- ConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
18
- })(ConflictException || (ConflictException = {}));
19
- export var InternalServerException;
20
- (function (InternalServerException) {
21
- InternalServerException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
22
- })(InternalServerException || (InternalServerException = {}));
23
- export var ResourceNotFoundException;
24
- (function (ResourceNotFoundException) {
25
- ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
26
- })(ResourceNotFoundException || (ResourceNotFoundException = {}));
27
- export var ServiceQuotaExceededException;
28
- (function (ServiceQuotaExceededException) {
29
- ServiceQuotaExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
30
- })(ServiceQuotaExceededException || (ServiceQuotaExceededException = {}));
31
- export var ThrottlingException;
32
- (function (ThrottlingException) {
33
- ThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
34
- })(ThrottlingException || (ThrottlingException = {}));
35
11
  export var ValidationExceptionField;
36
12
  (function (ValidationExceptionField) {
37
13
  ValidationExceptionField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
38
14
  })(ValidationExceptionField || (ValidationExceptionField = {}));
39
- export var ValidationException;
40
- (function (ValidationException) {
41
- ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
42
- })(ValidationException || (ValidationException = {}));
43
15
  export var BatchDeleteDevicePositionHistoryRequest;
44
16
  (function (BatchDeleteDevicePositionHistoryRequest) {
45
17
  BatchDeleteDevicePositionHistoryRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -184,6 +156,26 @@ export var CalculateRouteResponse;
184
156
  (function (CalculateRouteResponse) {
185
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) }))); };
186
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 = {}));
187
179
  export var CreateGeofenceCollectionRequest;
188
180
  (function (CreateGeofenceCollectionRequest) {
189
181
  CreateGeofenceCollectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -380,6 +380,63 @@ export var serializeAws_restJson1CalculateRouteCommand = function (input, contex
380
380
  }
381
381
  });
382
382
  }); };
383
+ export var serializeAws_restJson1CalculateRouteMatrixCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
384
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body, resolvedHostname;
385
+ return __generator(this, function (_c) {
386
+ switch (_c.label) {
387
+ case 0: return [4, context.endpoint()];
388
+ case 1:
389
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
390
+ headers = {
391
+ "content-type": "application/json",
392
+ };
393
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
394
+ "/routes/v0/calculators/{CalculatorName}/calculate/route-matrix";
395
+ if (input.CalculatorName !== undefined) {
396
+ labelValue = input.CalculatorName;
397
+ if (labelValue.length <= 0) {
398
+ throw new Error("Empty value provided for input HTTP label: CalculatorName.");
399
+ }
400
+ resolvedPath = resolvedPath.replace("{CalculatorName}", __extendedEncodeURIComponent(labelValue));
401
+ }
402
+ else {
403
+ throw new Error("No value provided for input HTTP label: CalculatorName.");
404
+ }
405
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.CarModeOptions !== undefined &&
406
+ input.CarModeOptions !== null && {
407
+ CarModeOptions: serializeAws_restJson1CalculateRouteCarModeOptions(input.CarModeOptions, context),
408
+ })), (input.DepartNow !== undefined && input.DepartNow !== null && { DepartNow: input.DepartNow })), (input.DeparturePositions !== undefined &&
409
+ input.DeparturePositions !== null && {
410
+ DeparturePositions: serializeAws_restJson1PositionList(input.DeparturePositions, context),
411
+ })), (input.DepartureTime !== undefined &&
412
+ input.DepartureTime !== null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" })), (input.DestinationPositions !== undefined &&
413
+ input.DestinationPositions !== null && {
414
+ DestinationPositions: serializeAws_restJson1PositionList(input.DestinationPositions, context),
415
+ })), (input.DistanceUnit !== undefined && input.DistanceUnit !== null && { DistanceUnit: input.DistanceUnit })), (input.TravelMode !== undefined && input.TravelMode !== null && { TravelMode: input.TravelMode })), (input.TruckModeOptions !== undefined &&
416
+ input.TruckModeOptions !== null && {
417
+ TruckModeOptions: serializeAws_restJson1CalculateRouteTruckModeOptions(input.TruckModeOptions, context),
418
+ })));
419
+ return [4, context.endpoint()];
420
+ case 2:
421
+ resolvedHostname = (_c.sent()).hostname;
422
+ if (context.disableHostPrefix !== true) {
423
+ resolvedHostname = "routes." + resolvedHostname;
424
+ if (!__isValidHostname(resolvedHostname)) {
425
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
426
+ }
427
+ }
428
+ return [2, new __HttpRequest({
429
+ protocol: protocol,
430
+ hostname: resolvedHostname,
431
+ port: port,
432
+ method: "POST",
433
+ headers: headers,
434
+ path: resolvedPath,
435
+ body: body,
436
+ })];
437
+ }
438
+ });
439
+ }); };
383
440
  export var serializeAws_restJson1CreateGeofenceCollectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
384
441
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
385
442
  return __generator(this, function (_c) {
@@ -3009,6 +3066,112 @@ var deserializeAws_restJson1CalculateRouteCommandError = function (output, conte
3009
3066
  }
3010
3067
  });
3011
3068
  }); };
3069
+ export var deserializeAws_restJson1CalculateRouteMatrixCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3070
+ var contents, data, _a, _b;
3071
+ return __generator(this, function (_c) {
3072
+ switch (_c.label) {
3073
+ case 0:
3074
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3075
+ return [2, deserializeAws_restJson1CalculateRouteMatrixCommandError(output, context)];
3076
+ }
3077
+ contents = {
3078
+ $metadata: deserializeMetadata(output),
3079
+ RouteMatrix: undefined,
3080
+ SnappedDeparturePositions: undefined,
3081
+ SnappedDestinationPositions: undefined,
3082
+ Summary: undefined,
3083
+ };
3084
+ _a = __expectNonNull;
3085
+ _b = __expectObject;
3086
+ return [4, parseBody(output.body, context)];
3087
+ case 1:
3088
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3089
+ if (data.RouteMatrix !== undefined && data.RouteMatrix !== null) {
3090
+ contents.RouteMatrix = deserializeAws_restJson1RouteMatrix(data.RouteMatrix, context);
3091
+ }
3092
+ if (data.SnappedDeparturePositions !== undefined && data.SnappedDeparturePositions !== null) {
3093
+ contents.SnappedDeparturePositions = deserializeAws_restJson1PositionList(data.SnappedDeparturePositions, context);
3094
+ }
3095
+ if (data.SnappedDestinationPositions !== undefined && data.SnappedDestinationPositions !== null) {
3096
+ contents.SnappedDestinationPositions = deserializeAws_restJson1PositionList(data.SnappedDestinationPositions, context);
3097
+ }
3098
+ if (data.Summary !== undefined && data.Summary !== null) {
3099
+ contents.Summary = deserializeAws_restJson1CalculateRouteMatrixSummary(data.Summary, context);
3100
+ }
3101
+ return [2, Promise.resolve(contents)];
3102
+ }
3103
+ });
3104
+ }); };
3105
+ var deserializeAws_restJson1CalculateRouteMatrixCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3106
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
3107
+ var _h;
3108
+ return __generator(this, function (_j) {
3109
+ switch (_j.label) {
3110
+ case 0:
3111
+ _a = [__assign({}, output)];
3112
+ _h = {};
3113
+ return [4, parseBody(output.body, context)];
3114
+ case 1:
3115
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
3116
+ errorCode = "UnknownError";
3117
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3118
+ _b = errorCode;
3119
+ switch (_b) {
3120
+ case "AccessDeniedException": return [3, 2];
3121
+ case "com.amazonaws.location#AccessDeniedException": return [3, 2];
3122
+ case "InternalServerException": return [3, 4];
3123
+ case "com.amazonaws.location#InternalServerException": return [3, 4];
3124
+ case "ResourceNotFoundException": return [3, 6];
3125
+ case "com.amazonaws.location#ResourceNotFoundException": return [3, 6];
3126
+ case "ThrottlingException": return [3, 8];
3127
+ case "com.amazonaws.location#ThrottlingException": return [3, 8];
3128
+ case "ValidationException": return [3, 10];
3129
+ case "com.amazonaws.location#ValidationException": return [3, 10];
3130
+ }
3131
+ return [3, 12];
3132
+ case 2:
3133
+ _c = [{}];
3134
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
3135
+ case 3:
3136
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3137
+ return [3, 13];
3138
+ case 4:
3139
+ _d = [{}];
3140
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
3141
+ case 5:
3142
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3143
+ return [3, 13];
3144
+ case 6:
3145
+ _e = [{}];
3146
+ return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
3147
+ case 7:
3148
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3149
+ return [3, 13];
3150
+ case 8:
3151
+ _f = [{}];
3152
+ return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3153
+ case 9:
3154
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3155
+ return [3, 13];
3156
+ case 10:
3157
+ _g = [{}];
3158
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
3159
+ case 11:
3160
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3161
+ return [3, 13];
3162
+ case 12:
3163
+ parsedBody = parsedOutput.body;
3164
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3165
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
3166
+ _j.label = 13;
3167
+ case 13:
3168
+ message = response.message || response.Message || errorCode;
3169
+ response.message = message;
3170
+ delete response.Message;
3171
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
3172
+ }
3173
+ });
3174
+ }); };
3012
3175
  export var deserializeAws_restJson1CreateGeofenceCollectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3013
3176
  var contents, data, _a, _b;
3014
3177
  return __generator(this, function (_c) {
@@ -7542,6 +7705,16 @@ var serializeAws_restJson1PositionalAccuracy = function (input, context) {
7542
7705
  return __assign({}, (input.Horizontal !== undefined &&
7543
7706
  input.Horizontal !== null && { Horizontal: __serializeFloat(input.Horizontal) }));
7544
7707
  };
7708
+ var serializeAws_restJson1PositionList = function (input, context) {
7709
+ return input
7710
+ .filter(function (e) { return e != null; })
7711
+ .map(function (entry) {
7712
+ if (entry === null) {
7713
+ return null;
7714
+ }
7715
+ return serializeAws_restJson1Position(entry, context);
7716
+ });
7717
+ };
7545
7718
  var serializeAws_restJson1PropertyMap = function (input, context) {
7546
7719
  return Object.entries(input).reduce(function (acc, _a) {
7547
7720
  var _b;
@@ -7739,6 +7912,14 @@ var deserializeAws_restJson1BoundingBox = function (output, context) {
7739
7912
  return __limitedParseDouble(entry);
7740
7913
  });
7741
7914
  };
7915
+ var deserializeAws_restJson1CalculateRouteMatrixSummary = function (output, context) {
7916
+ return {
7917
+ DataSource: __expectString(output.DataSource),
7918
+ DistanceUnit: __expectString(output.DistanceUnit),
7919
+ ErrorCount: __expectInt32(output.ErrorCount),
7920
+ RouteCount: __expectInt32(output.RouteCount),
7921
+ };
7922
+ };
7742
7923
  var deserializeAws_restJson1CalculateRouteSummary = function (output, context) {
7743
7924
  return {
7744
7925
  DataSource: __expectString(output.DataSource),
@@ -8086,6 +8267,16 @@ var deserializeAws_restJson1PositionalAccuracy = function (output, context) {
8086
8267
  Horizontal: __limitedParseDouble(output.Horizontal),
8087
8268
  };
8088
8269
  };
8270
+ var deserializeAws_restJson1PositionList = function (output, context) {
8271
+ return (output || [])
8272
+ .filter(function (e) { return e != null; })
8273
+ .map(function (entry) {
8274
+ if (entry === null) {
8275
+ return null;
8276
+ }
8277
+ return deserializeAws_restJson1Position(entry, context);
8278
+ });
8279
+ };
8089
8280
  var deserializeAws_restJson1PropertyMap = function (output, context) {
8090
8281
  return Object.entries(output).reduce(function (acc, _a) {
8091
8282
  var _b;
@@ -8096,6 +8287,41 @@ var deserializeAws_restJson1PropertyMap = function (output, context) {
8096
8287
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
8097
8288
  }, {});
8098
8289
  };
8290
+ var deserializeAws_restJson1RouteMatrix = function (output, context) {
8291
+ return (output || [])
8292
+ .filter(function (e) { return e != null; })
8293
+ .map(function (entry) {
8294
+ if (entry === null) {
8295
+ return null;
8296
+ }
8297
+ return deserializeAws_restJson1RouteMatrixRow(entry, context);
8298
+ });
8299
+ };
8300
+ var deserializeAws_restJson1RouteMatrixEntry = function (output, context) {
8301
+ return {
8302
+ Distance: __limitedParseDouble(output.Distance),
8303
+ DurationSeconds: __limitedParseDouble(output.DurationSeconds),
8304
+ Error: output.Error !== undefined && output.Error !== null
8305
+ ? deserializeAws_restJson1RouteMatrixEntryError(output.Error, context)
8306
+ : undefined,
8307
+ };
8308
+ };
8309
+ var deserializeAws_restJson1RouteMatrixEntryError = function (output, context) {
8310
+ return {
8311
+ Code: __expectString(output.Code),
8312
+ Message: __expectString(output.Message),
8313
+ };
8314
+ };
8315
+ var deserializeAws_restJson1RouteMatrixRow = function (output, context) {
8316
+ return (output || [])
8317
+ .filter(function (e) { return e != null; })
8318
+ .map(function (entry) {
8319
+ if (entry === null) {
8320
+ return null;
8321
+ }
8322
+ return deserializeAws_restJson1RouteMatrixEntry(entry, context);
8323
+ });
8324
+ };
8099
8325
  var deserializeAws_restJson1SearchForPositionResult = function (output, context) {
8100
8326
  return {
8101
8327
  Distance: __limitedParseDouble(output.Distance),
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,19 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
17
  export var getRuntimeConfig = function (config) {
16
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
17
21
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
19
28
  };
@@ -7,6 +7,7 @@ import { BatchGetDevicePositionCommandInput, BatchGetDevicePositionCommandOutput
7
7
  import { BatchPutGeofenceCommandInput, BatchPutGeofenceCommandOutput } from "./commands/BatchPutGeofenceCommand";
8
8
  import { BatchUpdateDevicePositionCommandInput, BatchUpdateDevicePositionCommandOutput } from "./commands/BatchUpdateDevicePositionCommand";
9
9
  import { CalculateRouteCommandInput, CalculateRouteCommandOutput } from "./commands/CalculateRouteCommand";
10
+ import { CalculateRouteMatrixCommandInput, CalculateRouteMatrixCommandOutput } from "./commands/CalculateRouteMatrixCommand";
10
11
  import { CreateGeofenceCollectionCommandInput, CreateGeofenceCollectionCommandOutput } from "./commands/CreateGeofenceCollectionCommand";
11
12
  import { CreateMapCommandInput, CreateMapCommandOutput } from "./commands/CreateMapCommand";
12
13
  import { CreatePlaceIndexCommandInput, CreatePlaceIndexCommandOutput } from "./commands/CreatePlaceIndexCommand";
@@ -152,7 +153,7 @@ export declare class Location extends LocationClient {
152
153
  /**
153
154
  * <p>
154
155
  * <a href="https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html">Calculates a route</a> given the following required parameters:
155
- * <code>DeparturePostiton</code> and <code>DestinationPosition</code>. Requires that
156
+ * <code>DeparturePosition</code> and <code>DestinationPosition</code>. Requires that
156
157
  * you first <a href="https://docs.aws.amazon.com/location-routes/latest/APIReference/API_CreateRouteCalculator.html">create a
157
158
  * route calculator resource</a>.</p>
158
159
  * <p>By default, a request that doesn't specify a departure time uses the best time of day
@@ -161,29 +162,72 @@ export declare class Location extends LocationClient {
161
162
  * <ul>
162
163
  * <li>
163
164
  * <p>
164
- * <a href="https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#departure-time">Specifying a departure time</a> using either <code>DepartureTime</code> or
165
- * <code>DepartureNow</code>. This calculates a route based on predictive
166
- * traffic data at the given time. </p>
165
+ * <a href="https://docs.aws.amazon.com/location/latest/developerguide/departure-time.html">Specifying a departure time</a> using either <code>DepartureTime</code>
166
+ * or <code>DepartNow</code>. This calculates a route based on predictive traffic
167
+ * data at the given time. </p>
167
168
  * <note>
168
169
  * <p>You can't specify both <code>DepartureTime</code> and
169
- * <code>DepartureNow</code> in a single request. Specifying both
170
- * parameters returns a validation error.</p>
170
+ * <code>DepartNow</code> in a single request. Specifying both parameters
171
+ * returns a validation error.</p>
171
172
  * </note>
172
173
  * </li>
173
174
  * <li>
174
175
  * <p>
175
- * <a href="https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#travel-mode">Specifying a travel mode</a> using TravelMode. This lets you specify an
176
- * additional route preference such as <code>CarModeOptions</code> if traveling by
177
- * <code>Car</code>, or <code>TruckModeOptions</code> if traveling by
178
- * <code>Truck</code>.</p>
176
+ * <a href="https://docs.aws.amazon.com/location/latest/developerguide/travel-mode.html">Specifying a travel mode</a> using TravelMode sets the transportation
177
+ * mode used to calculate the routes. This also lets you specify additional route
178
+ * preferences in <code>CarModeOptions</code> if traveling by <code>Car</code>, or
179
+ * <code>TruckModeOptions</code> if traveling by <code>Truck</code>.</p>
179
180
  * </li>
180
181
  * </ul>
181
- * <p>
182
- * </p>
183
182
  */
184
183
  calculateRoute(args: CalculateRouteCommandInput, options?: __HttpHandlerOptions): Promise<CalculateRouteCommandOutput>;
185
184
  calculateRoute(args: CalculateRouteCommandInput, cb: (err: any, data?: CalculateRouteCommandOutput) => void): void;
186
185
  calculateRoute(args: CalculateRouteCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CalculateRouteCommandOutput) => void): void;
186
+ /**
187
+ * <p>
188
+ * <a href="https://docs.aws.amazon.com/location/latest/developerguide/calculate-route-matrix.html"> Calculates a
189
+ * route matrix</a> given the following required parameters:
190
+ * <code>DeparturePositions</code> and <code>DestinationPositions</code>.
191
+ * <code>CalculateRouteMatrix</code> calculates routes and returns the travel time and
192
+ * travel distance from each departure position to each destination position in the
193
+ * request. For example, given departure positions A and B, and destination positions
194
+ * X and Y, <code>CalculateRouteMatrix</code> will return time and distance for routes
195
+ * from A to X, A to Y, B to X, and B to Y (in that order). The number of results returned
196
+ * (and routes calculated) will be the number of <code>DeparturePositions</code>
197
+ * times the number of <code>DestinationPositions</code>.</p>
198
+ * <note>
199
+ * <p>Your account is charged for each route calculated, not the number of requests.</p>
200
+ * </note>
201
+ * <p>Requires that you first <a href="https://docs.aws.amazon.com/location-routes/latest/APIReference/API_CreateRouteCalculator.html">create a
202
+ * route calculator resource</a>.</p>
203
+ * <p>By default, a request that doesn't specify a departure time uses the best time of day
204
+ * to travel with the best traffic conditions when calculating routes.</p>
205
+ * <p>Additional options include:</p>
206
+ * <ul>
207
+ * <li>
208
+ * <p>
209
+ * <a href="https://docs.aws.amazon.com/location/latest/developerguide/departure-time.html">
210
+ * Specifying a departure time</a> using either <code>DepartureTime</code>
211
+ * or <code>DepartNow</code>. This calculates routes based on predictive traffic
212
+ * data at the given time. </p>
213
+ * <note>
214
+ * <p>You can't specify both <code>DepartureTime</code> and
215
+ * <code>DepartNow</code> in a single request. Specifying both parameters
216
+ * returns a validation error.</p>
217
+ * </note>
218
+ * </li>
219
+ * <li>
220
+ * <p>
221
+ * <a href="https://docs.aws.amazon.com/location/latest/developerguide/travel-mode.html">Specifying a travel mode</a> using TravelMode sets the transportation
222
+ * mode used to calculate the routes. This also lets you specify additional route
223
+ * preferences in <code>CarModeOptions</code> if traveling by <code>Car</code>, or
224
+ * <code>TruckModeOptions</code> if traveling by <code>Truck</code>.</p>
225
+ * </li>
226
+ * </ul>
227
+ */
228
+ calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, options?: __HttpHandlerOptions): Promise<CalculateRouteMatrixCommandOutput>;
229
+ calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, cb: (err: any, data?: CalculateRouteMatrixCommandOutput) => void): void;
230
+ calculateRouteMatrix(args: CalculateRouteMatrixCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CalculateRouteMatrixCommandOutput) => void): void;
187
231
  /**
188
232
  * <p>Creates a geofence collection, which manages and stores geofences.</p>
189
233
  */
@@ -193,6 +237,12 @@ export declare class Location extends LocationClient {
193
237
  /**
194
238
  * <p>Creates a map resource in your AWS account, which provides map tiles of different
195
239
  * styles sourced from global location data providers.</p>
240
+ * <note>
241
+ * <p>If your application is tracking or routing assets you use in your business, such
242
+ * as delivery vehicles or employees, you may only use HERE as your geolocation
243
+ * provider. See section 82 of the <a href="http://aws.amazon.com/service-terms">AWS
244
+ * service terms</a> for more details.</p>
245
+ * </note>
196
246
  */
197
247
  createMap(args: CreateMapCommandInput, options?: __HttpHandlerOptions): Promise<CreateMapCommandOutput>;
198
248
  createMap(args: CreateMapCommandInput, cb: (err: any, data?: CreateMapCommandOutput) => void): void;
@@ -202,6 +252,12 @@ export declare class Location extends LocationClient {
202
252
  * geocode addresses and other text queries by using the <code>SearchPlaceIndexForText</code> operation,
203
253
  * and reverse geocode coordinates by using the <code>SearchPlaceIndexForPosition</code> operation, and
204
254
  * enable autosuggestions by using the <code>SearchPlaceIndexForSuggestions</code> operation.</p>
255
+ * <note>
256
+ * <p>If your application is tracking or routing assets you use in your business, such
257
+ * as delivery vehicles or employees, you may only use HERE as your geolocation
258
+ * provider. See section 82 of the <a href="http://aws.amazon.com/service-terms">AWS
259
+ * service terms</a> for more details.</p>
260
+ * </note>
205
261
  */
206
262
  createPlaceIndex(args: CreatePlaceIndexCommandInput, options?: __HttpHandlerOptions): Promise<CreatePlaceIndexCommandOutput>;
207
263
  createPlaceIndex(args: CreatePlaceIndexCommandInput, cb: (err: any, data?: CreatePlaceIndexCommandOutput) => void): void;
@@ -211,6 +267,12 @@ export declare class Location extends LocationClient {
211
267
  * <p>You can send requests to a route calculator resource to estimate travel time,
212
268
  * distance, and get directions. A route calculator sources traffic and road network data
213
269
  * from your chosen data provider.</p>
270
+ * <note>
271
+ * <p>If your application is tracking or routing assets you use in your business, such
272
+ * as delivery vehicles or employees, you may only use HERE as your geolocation
273
+ * provider. See section 82 of the <a href="http://aws.amazon.com/service-terms">AWS
274
+ * service terms</a> for more details.</p>
275
+ * </note>
214
276
  */
215
277
  createRouteCalculator(args: CreateRouteCalculatorCommandInput, options?: __HttpHandlerOptions): Promise<CreateRouteCalculatorCommandOutput>;
216
278
  createRouteCalculator(args: CreateRouteCalculatorCommandInput, cb: (err: any, data?: CreateRouteCalculatorCommandOutput) => void): void;