@aws-sdk/client-location 3.276.0 → 3.278.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/dist-cjs/Location.js +75 -0
- package/dist-cjs/commands/CreateKeyCommand.js +46 -0
- package/dist-cjs/commands/DeleteKeyCommand.js +46 -0
- package/dist-cjs/commands/DescribeKeyCommand.js +46 -0
- package/dist-cjs/commands/ListKeysCommand.js +46 -0
- package/dist-cjs/commands/UpdateKeyCommand.js +46 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +80 -22
- package/dist-cjs/pagination/ListKeysPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +544 -3
- package/dist-es/Location.js +75 -0
- package/dist-es/commands/CreateKeyCommand.js +42 -0
- package/dist-es/commands/DeleteKeyCommand.js +42 -0
- package/dist-es/commands/DescribeKeyCommand.js +42 -0
- package/dist-es/commands/ListKeysCommand.js +42 -0
- package/dist-es/commands/UpdateKeyCommand.js +42 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +60 -15
- package/dist-es/pagination/ListKeysPaginator.js +32 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +531 -0
- package/dist-types/Location.d.ts +82 -24
- package/dist-types/LocationClient.d.ts +7 -2
- package/dist-types/commands/CreateKeyCommand.d.ts +44 -0
- package/dist-types/commands/CreateMapCommand.d.ts +2 -2
- package/dist-types/commands/CreatePlaceIndexCommand.d.ts +2 -2
- package/dist-types/commands/CreateRouteCalculatorCommand.d.ts +2 -2
- package/dist-types/commands/CreateTrackerCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGeofenceCollectionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteKeyCommand.d.ts +38 -0
- package/dist-types/commands/DeleteMapCommand.d.ts +1 -1
- package/dist-types/commands/DeletePlaceIndexCommand.d.ts +1 -1
- package/dist-types/commands/DeleteRouteCalculatorCommand.d.ts +1 -1
- package/dist-types/commands/DeleteTrackerCommand.d.ts +1 -1
- package/dist-types/commands/DescribeKeyCommand.d.ts +42 -0
- package/dist-types/commands/GetPlaceCommand.d.ts +2 -2
- package/dist-types/commands/ListGeofenceCollectionsCommand.d.ts +1 -1
- package/dist-types/commands/ListKeysCommand.d.ts +42 -0
- package/dist-types/commands/ListMapsCommand.d.ts +1 -1
- package/dist-types/commands/ListPlaceIndexesCommand.d.ts +1 -1
- package/dist-types/commands/ListRouteCalculatorsCommand.d.ts +1 -1
- package/dist-types/commands/ListTrackersCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +5 -5
- package/dist-types/commands/UpdateKeyCommand.d.ts +42 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +548 -67
- package/dist-types/pagination/ListKeysPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
- package/dist-types/ts3.4/Location.d.ts +85 -0
- package/dist-types/ts3.4/LocationClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/CreateKeyCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/DeleteKeyCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/DescribeKeyCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/UpdateKeyCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +131 -15
- package/dist-types/ts3.4/pagination/ListKeysPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +4 -4
|
@@ -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 = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = void 0;
|
|
3
|
+
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_restJson1ListKeysCommand = exports.serializeAws_restJson1ListGeofencesCommand = exports.serializeAws_restJson1ListGeofenceCollectionsCommand = exports.serializeAws_restJson1ListDevicePositionsCommand = exports.serializeAws_restJson1GetPlaceCommand = exports.serializeAws_restJson1GetMapTileCommand = exports.serializeAws_restJson1GetMapStyleDescriptorCommand = exports.serializeAws_restJson1GetMapSpritesCommand = exports.serializeAws_restJson1GetMapGlyphsCommand = exports.serializeAws_restJson1GetGeofenceCommand = exports.serializeAws_restJson1GetDevicePositionHistoryCommand = exports.serializeAws_restJson1GetDevicePositionCommand = exports.serializeAws_restJson1DisassociateTrackerConsumerCommand = exports.serializeAws_restJson1DescribeTrackerCommand = exports.serializeAws_restJson1DescribeRouteCalculatorCommand = exports.serializeAws_restJson1DescribePlaceIndexCommand = exports.serializeAws_restJson1DescribeMapCommand = exports.serializeAws_restJson1DescribeKeyCommand = exports.serializeAws_restJson1DescribeGeofenceCollectionCommand = exports.serializeAws_restJson1DeleteTrackerCommand = exports.serializeAws_restJson1DeleteRouteCalculatorCommand = exports.serializeAws_restJson1DeletePlaceIndexCommand = exports.serializeAws_restJson1DeleteMapCommand = exports.serializeAws_restJson1DeleteKeyCommand = exports.serializeAws_restJson1DeleteGeofenceCollectionCommand = exports.serializeAws_restJson1CreateTrackerCommand = exports.serializeAws_restJson1CreateRouteCalculatorCommand = exports.serializeAws_restJson1CreatePlaceIndexCommand = exports.serializeAws_restJson1CreateMapCommand = exports.serializeAws_restJson1CreateKeyCommand = 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_restJson1ListPlaceIndexesCommand = exports.deserializeAws_restJson1ListMapsCommand = exports.deserializeAws_restJson1ListKeysCommand = exports.deserializeAws_restJson1ListGeofencesCommand = exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = exports.deserializeAws_restJson1ListDevicePositionsCommand = exports.deserializeAws_restJson1GetPlaceCommand = exports.deserializeAws_restJson1GetMapTileCommand = exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = exports.deserializeAws_restJson1GetMapSpritesCommand = exports.deserializeAws_restJson1GetMapGlyphsCommand = exports.deserializeAws_restJson1GetGeofenceCommand = exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = exports.deserializeAws_restJson1GetDevicePositionCommand = exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = exports.deserializeAws_restJson1DescribeTrackerCommand = exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = exports.deserializeAws_restJson1DescribePlaceIndexCommand = exports.deserializeAws_restJson1DescribeMapCommand = exports.deserializeAws_restJson1DescribeKeyCommand = exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = exports.deserializeAws_restJson1DeleteTrackerCommand = exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = exports.deserializeAws_restJson1DeletePlaceIndexCommand = exports.deserializeAws_restJson1DeleteMapCommand = exports.deserializeAws_restJson1DeleteKeyCommand = exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = exports.deserializeAws_restJson1CreateTrackerCommand = exports.deserializeAws_restJson1CreateRouteCalculatorCommand = exports.deserializeAws_restJson1CreatePlaceIndexCommand = exports.deserializeAws_restJson1CreateMapCommand = exports.deserializeAws_restJson1CreateKeyCommand = exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = exports.deserializeAws_restJson1CalculateRouteMatrixCommand = exports.deserializeAws_restJson1CalculateRouteCommand = exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = exports.deserializeAws_restJson1BatchPutGeofenceCommand = exports.deserializeAws_restJson1BatchGetDevicePositionCommand = exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = exports.serializeAws_restJson1UpdateTrackerCommand = exports.serializeAws_restJson1UpdateRouteCalculatorCommand = exports.serializeAws_restJson1UpdatePlaceIndexCommand = exports.serializeAws_restJson1UpdateMapCommand = exports.serializeAws_restJson1UpdateKeyCommand = exports.serializeAws_restJson1UpdateGeofenceCollectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateTrackerCommand = exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = exports.deserializeAws_restJson1UpdatePlaceIndexCommand = exports.deserializeAws_restJson1UpdateMapCommand = exports.deserializeAws_restJson1UpdateKeyCommand = 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 = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const LocationServiceException_1 = require("../models/LocationServiceException");
|
|
@@ -348,6 +348,41 @@ const serializeAws_restJson1CreateGeofenceCollectionCommand = async (input, cont
|
|
|
348
348
|
});
|
|
349
349
|
};
|
|
350
350
|
exports.serializeAws_restJson1CreateGeofenceCollectionCommand = serializeAws_restJson1CreateGeofenceCollectionCommand;
|
|
351
|
+
const serializeAws_restJson1CreateKeyCommand = async (input, context) => {
|
|
352
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
353
|
+
const headers = {
|
|
354
|
+
"content-type": "application/json",
|
|
355
|
+
};
|
|
356
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys";
|
|
357
|
+
let body;
|
|
358
|
+
body = JSON.stringify({
|
|
359
|
+
...(input.Description != null && { Description: input.Description }),
|
|
360
|
+
...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }),
|
|
361
|
+
...(input.KeyName != null && { KeyName: input.KeyName }),
|
|
362
|
+
...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }),
|
|
363
|
+
...(input.Restrictions != null && {
|
|
364
|
+
Restrictions: serializeAws_restJson1ApiKeyRestrictions(input.Restrictions, context),
|
|
365
|
+
}),
|
|
366
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
367
|
+
});
|
|
368
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
369
|
+
if (context.disableHostPrefix !== true) {
|
|
370
|
+
resolvedHostname = "metadata." + resolvedHostname;
|
|
371
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
372
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return new protocol_http_1.HttpRequest({
|
|
376
|
+
protocol,
|
|
377
|
+
hostname: resolvedHostname,
|
|
378
|
+
port,
|
|
379
|
+
method: "POST",
|
|
380
|
+
headers,
|
|
381
|
+
path: resolvedPath,
|
|
382
|
+
body,
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
exports.serializeAws_restJson1CreateKeyCommand = serializeAws_restJson1CreateKeyCommand;
|
|
351
386
|
const serializeAws_restJson1CreateMapCommand = async (input, context) => {
|
|
352
387
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
353
388
|
const headers = {
|
|
@@ -508,6 +543,30 @@ const serializeAws_restJson1DeleteGeofenceCollectionCommand = async (input, cont
|
|
|
508
543
|
});
|
|
509
544
|
};
|
|
510
545
|
exports.serializeAws_restJson1DeleteGeofenceCollectionCommand = serializeAws_restJson1DeleteGeofenceCollectionCommand;
|
|
546
|
+
const serializeAws_restJson1DeleteKeyCommand = async (input, context) => {
|
|
547
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
548
|
+
const headers = {};
|
|
549
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys/{KeyName}";
|
|
550
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyName", () => input.KeyName, "{KeyName}", false);
|
|
551
|
+
let body;
|
|
552
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
553
|
+
if (context.disableHostPrefix !== true) {
|
|
554
|
+
resolvedHostname = "metadata." + resolvedHostname;
|
|
555
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
556
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return new protocol_http_1.HttpRequest({
|
|
560
|
+
protocol,
|
|
561
|
+
hostname: resolvedHostname,
|
|
562
|
+
port,
|
|
563
|
+
method: "DELETE",
|
|
564
|
+
headers,
|
|
565
|
+
path: resolvedPath,
|
|
566
|
+
body,
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
exports.serializeAws_restJson1DeleteKeyCommand = serializeAws_restJson1DeleteKeyCommand;
|
|
511
570
|
const serializeAws_restJson1DeleteMapCommand = async (input, context) => {
|
|
512
571
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
513
572
|
const headers = {};
|
|
@@ -629,6 +688,30 @@ const serializeAws_restJson1DescribeGeofenceCollectionCommand = async (input, co
|
|
|
629
688
|
});
|
|
630
689
|
};
|
|
631
690
|
exports.serializeAws_restJson1DescribeGeofenceCollectionCommand = serializeAws_restJson1DescribeGeofenceCollectionCommand;
|
|
691
|
+
const serializeAws_restJson1DescribeKeyCommand = async (input, context) => {
|
|
692
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
693
|
+
const headers = {};
|
|
694
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys/{KeyName}";
|
|
695
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyName", () => input.KeyName, "{KeyName}", false);
|
|
696
|
+
let body;
|
|
697
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
698
|
+
if (context.disableHostPrefix !== true) {
|
|
699
|
+
resolvedHostname = "metadata." + resolvedHostname;
|
|
700
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
701
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
return new protocol_http_1.HttpRequest({
|
|
705
|
+
protocol,
|
|
706
|
+
hostname: resolvedHostname,
|
|
707
|
+
port,
|
|
708
|
+
method: "GET",
|
|
709
|
+
headers,
|
|
710
|
+
path: resolvedPath,
|
|
711
|
+
body,
|
|
712
|
+
});
|
|
713
|
+
};
|
|
714
|
+
exports.serializeAws_restJson1DescribeKeyCommand = serializeAws_restJson1DescribeKeyCommand;
|
|
632
715
|
const serializeAws_restJson1DescribeMapCommand = async (input, context) => {
|
|
633
716
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
634
717
|
const headers = {};
|
|
@@ -849,6 +932,9 @@ const serializeAws_restJson1GetMapGlyphsCommand = async (input, context) => {
|
|
|
849
932
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
|
|
850
933
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FontStack", () => input.FontStack, "{FontStack}", false);
|
|
851
934
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FontUnicodeRange", () => input.FontUnicodeRange, "{FontUnicodeRange}", false);
|
|
935
|
+
const query = map({
|
|
936
|
+
key: [, input.Key],
|
|
937
|
+
});
|
|
852
938
|
let body;
|
|
853
939
|
let { hostname: resolvedHostname } = await context.endpoint();
|
|
854
940
|
if (context.disableHostPrefix !== true) {
|
|
@@ -864,6 +950,7 @@ const serializeAws_restJson1GetMapGlyphsCommand = async (input, context) => {
|
|
|
864
950
|
method: "GET",
|
|
865
951
|
headers,
|
|
866
952
|
path: resolvedPath,
|
|
953
|
+
query,
|
|
867
954
|
body,
|
|
868
955
|
});
|
|
869
956
|
};
|
|
@@ -875,6 +962,9 @@ const serializeAws_restJson1GetMapSpritesCommand = async (input, context) => {
|
|
|
875
962
|
"/maps/v0/maps/{MapName}/sprites/{FileName}";
|
|
876
963
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
|
|
877
964
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "FileName", () => input.FileName, "{FileName}", false);
|
|
965
|
+
const query = map({
|
|
966
|
+
key: [, input.Key],
|
|
967
|
+
});
|
|
878
968
|
let body;
|
|
879
969
|
let { hostname: resolvedHostname } = await context.endpoint();
|
|
880
970
|
if (context.disableHostPrefix !== true) {
|
|
@@ -890,6 +980,7 @@ const serializeAws_restJson1GetMapSpritesCommand = async (input, context) => {
|
|
|
890
980
|
method: "GET",
|
|
891
981
|
headers,
|
|
892
982
|
path: resolvedPath,
|
|
983
|
+
query,
|
|
893
984
|
body,
|
|
894
985
|
});
|
|
895
986
|
};
|
|
@@ -899,6 +990,9 @@ const serializeAws_restJson1GetMapStyleDescriptorCommand = async (input, context
|
|
|
899
990
|
const headers = {};
|
|
900
991
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps/{MapName}/style-descriptor";
|
|
901
992
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MapName", () => input.MapName, "{MapName}", false);
|
|
993
|
+
const query = map({
|
|
994
|
+
key: [, input.Key],
|
|
995
|
+
});
|
|
902
996
|
let body;
|
|
903
997
|
let { hostname: resolvedHostname } = await context.endpoint();
|
|
904
998
|
if (context.disableHostPrefix !== true) {
|
|
@@ -914,6 +1008,7 @@ const serializeAws_restJson1GetMapStyleDescriptorCommand = async (input, context
|
|
|
914
1008
|
method: "GET",
|
|
915
1009
|
headers,
|
|
916
1010
|
path: resolvedPath,
|
|
1011
|
+
query,
|
|
917
1012
|
body,
|
|
918
1013
|
});
|
|
919
1014
|
};
|
|
@@ -926,6 +1021,9 @@ const serializeAws_restJson1GetMapTileCommand = async (input, context) => {
|
|
|
926
1021
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Z", () => input.Z, "{Z}", false);
|
|
927
1022
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "X", () => input.X, "{X}", false);
|
|
928
1023
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Y", () => input.Y, "{Y}", false);
|
|
1024
|
+
const query = map({
|
|
1025
|
+
key: [, input.Key],
|
|
1026
|
+
});
|
|
929
1027
|
let body;
|
|
930
1028
|
let { hostname: resolvedHostname } = await context.endpoint();
|
|
931
1029
|
if (context.disableHostPrefix !== true) {
|
|
@@ -941,6 +1039,7 @@ const serializeAws_restJson1GetMapTileCommand = async (input, context) => {
|
|
|
941
1039
|
method: "GET",
|
|
942
1040
|
headers,
|
|
943
1041
|
path: resolvedPath,
|
|
1042
|
+
query,
|
|
944
1043
|
body,
|
|
945
1044
|
});
|
|
946
1045
|
};
|
|
@@ -1066,6 +1165,36 @@ const serializeAws_restJson1ListGeofencesCommand = async (input, context) => {
|
|
|
1066
1165
|
});
|
|
1067
1166
|
};
|
|
1068
1167
|
exports.serializeAws_restJson1ListGeofencesCommand = serializeAws_restJson1ListGeofencesCommand;
|
|
1168
|
+
const serializeAws_restJson1ListKeysCommand = async (input, context) => {
|
|
1169
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1170
|
+
const headers = {
|
|
1171
|
+
"content-type": "application/json",
|
|
1172
|
+
};
|
|
1173
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/list-keys";
|
|
1174
|
+
let body;
|
|
1175
|
+
body = JSON.stringify({
|
|
1176
|
+
...(input.Filter != null && { Filter: serializeAws_restJson1ApiKeyFilter(input.Filter, context) }),
|
|
1177
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1178
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1179
|
+
});
|
|
1180
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1181
|
+
if (context.disableHostPrefix !== true) {
|
|
1182
|
+
resolvedHostname = "metadata." + resolvedHostname;
|
|
1183
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
1184
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
return new protocol_http_1.HttpRequest({
|
|
1188
|
+
protocol,
|
|
1189
|
+
hostname: resolvedHostname,
|
|
1190
|
+
port,
|
|
1191
|
+
method: "POST",
|
|
1192
|
+
headers,
|
|
1193
|
+
path: resolvedPath,
|
|
1194
|
+
body,
|
|
1195
|
+
});
|
|
1196
|
+
};
|
|
1197
|
+
exports.serializeAws_restJson1ListKeysCommand = serializeAws_restJson1ListKeysCommand;
|
|
1069
1198
|
const serializeAws_restJson1ListMapsCommand = async (input, context) => {
|
|
1070
1199
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1071
1200
|
const headers = {
|
|
@@ -1466,6 +1595,41 @@ const serializeAws_restJson1UpdateGeofenceCollectionCommand = async (input, cont
|
|
|
1466
1595
|
});
|
|
1467
1596
|
};
|
|
1468
1597
|
exports.serializeAws_restJson1UpdateGeofenceCollectionCommand = serializeAws_restJson1UpdateGeofenceCollectionCommand;
|
|
1598
|
+
const serializeAws_restJson1UpdateKeyCommand = async (input, context) => {
|
|
1599
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1600
|
+
const headers = {
|
|
1601
|
+
"content-type": "application/json",
|
|
1602
|
+
};
|
|
1603
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys/{KeyName}";
|
|
1604
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyName", () => input.KeyName, "{KeyName}", false);
|
|
1605
|
+
let body;
|
|
1606
|
+
body = JSON.stringify({
|
|
1607
|
+
...(input.Description != null && { Description: input.Description }),
|
|
1608
|
+
...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }),
|
|
1609
|
+
...(input.ForceUpdate != null && { ForceUpdate: input.ForceUpdate }),
|
|
1610
|
+
...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }),
|
|
1611
|
+
...(input.Restrictions != null && {
|
|
1612
|
+
Restrictions: serializeAws_restJson1ApiKeyRestrictions(input.Restrictions, context),
|
|
1613
|
+
}),
|
|
1614
|
+
});
|
|
1615
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
1616
|
+
if (context.disableHostPrefix !== true) {
|
|
1617
|
+
resolvedHostname = "metadata." + resolvedHostname;
|
|
1618
|
+
if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
|
|
1619
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
return new protocol_http_1.HttpRequest({
|
|
1623
|
+
protocol,
|
|
1624
|
+
hostname: resolvedHostname,
|
|
1625
|
+
port,
|
|
1626
|
+
method: "PATCH",
|
|
1627
|
+
headers,
|
|
1628
|
+
path: resolvedPath,
|
|
1629
|
+
body,
|
|
1630
|
+
});
|
|
1631
|
+
};
|
|
1632
|
+
exports.serializeAws_restJson1UpdateKeyCommand = serializeAws_restJson1UpdateKeyCommand;
|
|
1469
1633
|
const serializeAws_restJson1UpdateMapCommand = async (input, context) => {
|
|
1470
1634
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1471
1635
|
const headers = {
|
|
@@ -2081,6 +2245,64 @@ const deserializeAws_restJson1CreateGeofenceCollectionCommandError = async (outp
|
|
|
2081
2245
|
});
|
|
2082
2246
|
}
|
|
2083
2247
|
};
|
|
2248
|
+
const deserializeAws_restJson1CreateKeyCommand = async (output, context) => {
|
|
2249
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2250
|
+
return deserializeAws_restJson1CreateKeyCommandError(output, context);
|
|
2251
|
+
}
|
|
2252
|
+
const contents = map({
|
|
2253
|
+
$metadata: deserializeMetadata(output),
|
|
2254
|
+
});
|
|
2255
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2256
|
+
if (data.CreateTime != null) {
|
|
2257
|
+
contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
|
|
2258
|
+
}
|
|
2259
|
+
if (data.Key != null) {
|
|
2260
|
+
contents.Key = (0, smithy_client_1.expectString)(data.Key);
|
|
2261
|
+
}
|
|
2262
|
+
if (data.KeyArn != null) {
|
|
2263
|
+
contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
|
|
2264
|
+
}
|
|
2265
|
+
if (data.KeyName != null) {
|
|
2266
|
+
contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
|
|
2267
|
+
}
|
|
2268
|
+
return contents;
|
|
2269
|
+
};
|
|
2270
|
+
exports.deserializeAws_restJson1CreateKeyCommand = deserializeAws_restJson1CreateKeyCommand;
|
|
2271
|
+
const deserializeAws_restJson1CreateKeyCommandError = async (output, context) => {
|
|
2272
|
+
const parsedOutput = {
|
|
2273
|
+
...output,
|
|
2274
|
+
body: await parseErrorBody(output.body, context),
|
|
2275
|
+
};
|
|
2276
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2277
|
+
switch (errorCode) {
|
|
2278
|
+
case "AccessDeniedException":
|
|
2279
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
2280
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2281
|
+
case "ConflictException":
|
|
2282
|
+
case "com.amazonaws.location#ConflictException":
|
|
2283
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
2284
|
+
case "InternalServerException":
|
|
2285
|
+
case "com.amazonaws.location#InternalServerException":
|
|
2286
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2287
|
+
case "ServiceQuotaExceededException":
|
|
2288
|
+
case "com.amazonaws.location#ServiceQuotaExceededException":
|
|
2289
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
2290
|
+
case "ThrottlingException":
|
|
2291
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
2292
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2293
|
+
case "ValidationException":
|
|
2294
|
+
case "com.amazonaws.location#ValidationException":
|
|
2295
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2296
|
+
default:
|
|
2297
|
+
const parsedBody = parsedOutput.body;
|
|
2298
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2299
|
+
output,
|
|
2300
|
+
parsedBody,
|
|
2301
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
2302
|
+
errorCode,
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
};
|
|
2084
2306
|
const deserializeAws_restJson1CreateMapCommand = async (output, context) => {
|
|
2085
2307
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2086
2308
|
return deserializeAws_restJson1CreateMapCommandError(output, context);
|
|
@@ -2341,6 +2563,49 @@ const deserializeAws_restJson1DeleteGeofenceCollectionCommandError = async (outp
|
|
|
2341
2563
|
});
|
|
2342
2564
|
}
|
|
2343
2565
|
};
|
|
2566
|
+
const deserializeAws_restJson1DeleteKeyCommand = async (output, context) => {
|
|
2567
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2568
|
+
return deserializeAws_restJson1DeleteKeyCommandError(output, context);
|
|
2569
|
+
}
|
|
2570
|
+
const contents = map({
|
|
2571
|
+
$metadata: deserializeMetadata(output),
|
|
2572
|
+
});
|
|
2573
|
+
await collectBody(output.body, context);
|
|
2574
|
+
return contents;
|
|
2575
|
+
};
|
|
2576
|
+
exports.deserializeAws_restJson1DeleteKeyCommand = deserializeAws_restJson1DeleteKeyCommand;
|
|
2577
|
+
const deserializeAws_restJson1DeleteKeyCommandError = async (output, context) => {
|
|
2578
|
+
const parsedOutput = {
|
|
2579
|
+
...output,
|
|
2580
|
+
body: await parseErrorBody(output.body, context),
|
|
2581
|
+
};
|
|
2582
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2583
|
+
switch (errorCode) {
|
|
2584
|
+
case "AccessDeniedException":
|
|
2585
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
2586
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2587
|
+
case "InternalServerException":
|
|
2588
|
+
case "com.amazonaws.location#InternalServerException":
|
|
2589
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2590
|
+
case "ResourceNotFoundException":
|
|
2591
|
+
case "com.amazonaws.location#ResourceNotFoundException":
|
|
2592
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2593
|
+
case "ThrottlingException":
|
|
2594
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
2595
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2596
|
+
case "ValidationException":
|
|
2597
|
+
case "com.amazonaws.location#ValidationException":
|
|
2598
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2599
|
+
default:
|
|
2600
|
+
const parsedBody = parsedOutput.body;
|
|
2601
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2602
|
+
output,
|
|
2603
|
+
parsedBody,
|
|
2604
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
2605
|
+
errorCode,
|
|
2606
|
+
});
|
|
2607
|
+
}
|
|
2608
|
+
};
|
|
2344
2609
|
const deserializeAws_restJson1DeleteMapCommand = async (output, context) => {
|
|
2345
2610
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2346
2611
|
return deserializeAws_restJson1DeleteMapCommandError(output, context);
|
|
@@ -2583,6 +2848,76 @@ const deserializeAws_restJson1DescribeGeofenceCollectionCommandError = async (ou
|
|
|
2583
2848
|
});
|
|
2584
2849
|
}
|
|
2585
2850
|
};
|
|
2851
|
+
const deserializeAws_restJson1DescribeKeyCommand = async (output, context) => {
|
|
2852
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2853
|
+
return deserializeAws_restJson1DescribeKeyCommandError(output, context);
|
|
2854
|
+
}
|
|
2855
|
+
const contents = map({
|
|
2856
|
+
$metadata: deserializeMetadata(output),
|
|
2857
|
+
});
|
|
2858
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2859
|
+
if (data.CreateTime != null) {
|
|
2860
|
+
contents.CreateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.CreateTime));
|
|
2861
|
+
}
|
|
2862
|
+
if (data.Description != null) {
|
|
2863
|
+
contents.Description = (0, smithy_client_1.expectString)(data.Description);
|
|
2864
|
+
}
|
|
2865
|
+
if (data.ExpireTime != null) {
|
|
2866
|
+
contents.ExpireTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.ExpireTime));
|
|
2867
|
+
}
|
|
2868
|
+
if (data.Key != null) {
|
|
2869
|
+
contents.Key = (0, smithy_client_1.expectString)(data.Key);
|
|
2870
|
+
}
|
|
2871
|
+
if (data.KeyArn != null) {
|
|
2872
|
+
contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
|
|
2873
|
+
}
|
|
2874
|
+
if (data.KeyName != null) {
|
|
2875
|
+
contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
|
|
2876
|
+
}
|
|
2877
|
+
if (data.Restrictions != null) {
|
|
2878
|
+
contents.Restrictions = deserializeAws_restJson1ApiKeyRestrictions(data.Restrictions, context);
|
|
2879
|
+
}
|
|
2880
|
+
if (data.Tags != null) {
|
|
2881
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
2882
|
+
}
|
|
2883
|
+
if (data.UpdateTime != null) {
|
|
2884
|
+
contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
|
|
2885
|
+
}
|
|
2886
|
+
return contents;
|
|
2887
|
+
};
|
|
2888
|
+
exports.deserializeAws_restJson1DescribeKeyCommand = deserializeAws_restJson1DescribeKeyCommand;
|
|
2889
|
+
const deserializeAws_restJson1DescribeKeyCommandError = async (output, context) => {
|
|
2890
|
+
const parsedOutput = {
|
|
2891
|
+
...output,
|
|
2892
|
+
body: await parseErrorBody(output.body, context),
|
|
2893
|
+
};
|
|
2894
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2895
|
+
switch (errorCode) {
|
|
2896
|
+
case "AccessDeniedException":
|
|
2897
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
2898
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2899
|
+
case "InternalServerException":
|
|
2900
|
+
case "com.amazonaws.location#InternalServerException":
|
|
2901
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2902
|
+
case "ResourceNotFoundException":
|
|
2903
|
+
case "com.amazonaws.location#ResourceNotFoundException":
|
|
2904
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2905
|
+
case "ThrottlingException":
|
|
2906
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
2907
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2908
|
+
case "ValidationException":
|
|
2909
|
+
case "com.amazonaws.location#ValidationException":
|
|
2910
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2911
|
+
default:
|
|
2912
|
+
const parsedBody = parsedOutput.body;
|
|
2913
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2914
|
+
output,
|
|
2915
|
+
parsedBody,
|
|
2916
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
2917
|
+
errorCode,
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2920
|
+
};
|
|
2586
2921
|
const deserializeAws_restJson1DescribeMapCommand = async (output, context) => {
|
|
2587
2922
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2588
2923
|
return deserializeAws_restJson1DescribeMapCommandError(output, context);
|
|
@@ -3081,6 +3416,7 @@ const deserializeAws_restJson1GetMapGlyphsCommand = async (output, context) => {
|
|
|
3081
3416
|
const contents = map({
|
|
3082
3417
|
$metadata: deserializeMetadata(output),
|
|
3083
3418
|
ContentType: [, output.headers["content-type"]],
|
|
3419
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
3084
3420
|
});
|
|
3085
3421
|
const data = await collectBody(output.body, context);
|
|
3086
3422
|
contents.Blob = data;
|
|
@@ -3126,6 +3462,7 @@ const deserializeAws_restJson1GetMapSpritesCommand = async (output, context) =>
|
|
|
3126
3462
|
const contents = map({
|
|
3127
3463
|
$metadata: deserializeMetadata(output),
|
|
3128
3464
|
ContentType: [, output.headers["content-type"]],
|
|
3465
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
3129
3466
|
});
|
|
3130
3467
|
const data = await collectBody(output.body, context);
|
|
3131
3468
|
contents.Blob = data;
|
|
@@ -3171,6 +3508,7 @@ const deserializeAws_restJson1GetMapStyleDescriptorCommand = async (output, cont
|
|
|
3171
3508
|
const contents = map({
|
|
3172
3509
|
$metadata: deserializeMetadata(output),
|
|
3173
3510
|
ContentType: [, output.headers["content-type"]],
|
|
3511
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
3174
3512
|
});
|
|
3175
3513
|
const data = await collectBody(output.body, context);
|
|
3176
3514
|
contents.Blob = data;
|
|
@@ -3216,6 +3554,7 @@ const deserializeAws_restJson1GetMapTileCommand = async (output, context) => {
|
|
|
3216
3554
|
const contents = map({
|
|
3217
3555
|
$metadata: deserializeMetadata(output),
|
|
3218
3556
|
ContentType: [, output.headers["content-type"]],
|
|
3557
|
+
CacheControl: [, output.headers["cache-control"]],
|
|
3219
3558
|
});
|
|
3220
3559
|
const data = await collectBody(output.body, context);
|
|
3221
3560
|
contents.Blob = data;
|
|
@@ -3441,6 +3780,52 @@ const deserializeAws_restJson1ListGeofencesCommandError = async (output, context
|
|
|
3441
3780
|
});
|
|
3442
3781
|
}
|
|
3443
3782
|
};
|
|
3783
|
+
const deserializeAws_restJson1ListKeysCommand = async (output, context) => {
|
|
3784
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3785
|
+
return deserializeAws_restJson1ListKeysCommandError(output, context);
|
|
3786
|
+
}
|
|
3787
|
+
const contents = map({
|
|
3788
|
+
$metadata: deserializeMetadata(output),
|
|
3789
|
+
});
|
|
3790
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3791
|
+
if (data.Entries != null) {
|
|
3792
|
+
contents.Entries = deserializeAws_restJson1ListKeysResponseEntryList(data.Entries, context);
|
|
3793
|
+
}
|
|
3794
|
+
if (data.NextToken != null) {
|
|
3795
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3796
|
+
}
|
|
3797
|
+
return contents;
|
|
3798
|
+
};
|
|
3799
|
+
exports.deserializeAws_restJson1ListKeysCommand = deserializeAws_restJson1ListKeysCommand;
|
|
3800
|
+
const deserializeAws_restJson1ListKeysCommandError = async (output, context) => {
|
|
3801
|
+
const parsedOutput = {
|
|
3802
|
+
...output,
|
|
3803
|
+
body: await parseErrorBody(output.body, context),
|
|
3804
|
+
};
|
|
3805
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3806
|
+
switch (errorCode) {
|
|
3807
|
+
case "AccessDeniedException":
|
|
3808
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
3809
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
3810
|
+
case "InternalServerException":
|
|
3811
|
+
case "com.amazonaws.location#InternalServerException":
|
|
3812
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
3813
|
+
case "ThrottlingException":
|
|
3814
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
3815
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3816
|
+
case "ValidationException":
|
|
3817
|
+
case "com.amazonaws.location#ValidationException":
|
|
3818
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3819
|
+
default:
|
|
3820
|
+
const parsedBody = parsedOutput.body;
|
|
3821
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3822
|
+
output,
|
|
3823
|
+
parsedBody,
|
|
3824
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
3825
|
+
errorCode,
|
|
3826
|
+
});
|
|
3827
|
+
}
|
|
3828
|
+
};
|
|
3444
3829
|
const deserializeAws_restJson1ListMapsCommand = async (output, context) => {
|
|
3445
3830
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3446
3831
|
return deserializeAws_restJson1ListMapsCommandError(output, context);
|
|
@@ -4060,6 +4445,58 @@ const deserializeAws_restJson1UpdateGeofenceCollectionCommandError = async (outp
|
|
|
4060
4445
|
});
|
|
4061
4446
|
}
|
|
4062
4447
|
};
|
|
4448
|
+
const deserializeAws_restJson1UpdateKeyCommand = async (output, context) => {
|
|
4449
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4450
|
+
return deserializeAws_restJson1UpdateKeyCommandError(output, context);
|
|
4451
|
+
}
|
|
4452
|
+
const contents = map({
|
|
4453
|
+
$metadata: deserializeMetadata(output),
|
|
4454
|
+
});
|
|
4455
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4456
|
+
if (data.KeyArn != null) {
|
|
4457
|
+
contents.KeyArn = (0, smithy_client_1.expectString)(data.KeyArn);
|
|
4458
|
+
}
|
|
4459
|
+
if (data.KeyName != null) {
|
|
4460
|
+
contents.KeyName = (0, smithy_client_1.expectString)(data.KeyName);
|
|
4461
|
+
}
|
|
4462
|
+
if (data.UpdateTime != null) {
|
|
4463
|
+
contents.UpdateTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(data.UpdateTime));
|
|
4464
|
+
}
|
|
4465
|
+
return contents;
|
|
4466
|
+
};
|
|
4467
|
+
exports.deserializeAws_restJson1UpdateKeyCommand = deserializeAws_restJson1UpdateKeyCommand;
|
|
4468
|
+
const deserializeAws_restJson1UpdateKeyCommandError = async (output, context) => {
|
|
4469
|
+
const parsedOutput = {
|
|
4470
|
+
...output,
|
|
4471
|
+
body: await parseErrorBody(output.body, context),
|
|
4472
|
+
};
|
|
4473
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4474
|
+
switch (errorCode) {
|
|
4475
|
+
case "AccessDeniedException":
|
|
4476
|
+
case "com.amazonaws.location#AccessDeniedException":
|
|
4477
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
4478
|
+
case "InternalServerException":
|
|
4479
|
+
case "com.amazonaws.location#InternalServerException":
|
|
4480
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
4481
|
+
case "ResourceNotFoundException":
|
|
4482
|
+
case "com.amazonaws.location#ResourceNotFoundException":
|
|
4483
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
4484
|
+
case "ThrottlingException":
|
|
4485
|
+
case "com.amazonaws.location#ThrottlingException":
|
|
4486
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
4487
|
+
case "ValidationException":
|
|
4488
|
+
case "com.amazonaws.location#ValidationException":
|
|
4489
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
4490
|
+
default:
|
|
4491
|
+
const parsedBody = parsedOutput.body;
|
|
4492
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
4493
|
+
output,
|
|
4494
|
+
parsedBody,
|
|
4495
|
+
exceptionCtor: LocationServiceException_1.LocationServiceException,
|
|
4496
|
+
errorCode,
|
|
4497
|
+
});
|
|
4498
|
+
}
|
|
4499
|
+
};
|
|
4063
4500
|
const deserializeAws_restJson1UpdateMapCommand = async (output, context) => {
|
|
4064
4501
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4065
4502
|
return deserializeAws_restJson1UpdateMapCommandError(output, context);
|
|
@@ -4359,6 +4796,31 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
4359
4796
|
});
|
|
4360
4797
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4361
4798
|
};
|
|
4799
|
+
const serializeAws_restJson1ApiKeyActionList = (input, context) => {
|
|
4800
|
+
return input
|
|
4801
|
+
.filter((e) => e != null)
|
|
4802
|
+
.map((entry) => {
|
|
4803
|
+
return entry;
|
|
4804
|
+
});
|
|
4805
|
+
};
|
|
4806
|
+
const serializeAws_restJson1ApiKeyFilter = (input, context) => {
|
|
4807
|
+
return {
|
|
4808
|
+
...(input.KeyStatus != null && { KeyStatus: input.KeyStatus }),
|
|
4809
|
+
};
|
|
4810
|
+
};
|
|
4811
|
+
const serializeAws_restJson1ApiKeyRestrictions = (input, context) => {
|
|
4812
|
+
return {
|
|
4813
|
+
...(input.AllowActions != null && {
|
|
4814
|
+
AllowActions: serializeAws_restJson1ApiKeyActionList(input.AllowActions, context),
|
|
4815
|
+
}),
|
|
4816
|
+
...(input.AllowReferers != null && {
|
|
4817
|
+
AllowReferers: serializeAws_restJson1RefererPatternList(input.AllowReferers, context),
|
|
4818
|
+
}),
|
|
4819
|
+
...(input.AllowResources != null && {
|
|
4820
|
+
AllowResources: serializeAws_restJson1GeoArnList(input.AllowResources, context),
|
|
4821
|
+
}),
|
|
4822
|
+
};
|
|
4823
|
+
};
|
|
4362
4824
|
const serializeAws_restJson1BatchPutGeofenceRequestEntry = (input, context) => {
|
|
4363
4825
|
return {
|
|
4364
4826
|
...(input.GeofenceId != null && { GeofenceId: input.GeofenceId }),
|
|
@@ -4436,6 +4898,13 @@ const serializeAws_restJson1DevicePositionUpdateList = (input, context) => {
|
|
|
4436
4898
|
return serializeAws_restJson1DevicePositionUpdate(entry, context);
|
|
4437
4899
|
});
|
|
4438
4900
|
};
|
|
4901
|
+
const serializeAws_restJson1GeoArnList = (input, context) => {
|
|
4902
|
+
return input
|
|
4903
|
+
.filter((e) => e != null)
|
|
4904
|
+
.map((entry) => {
|
|
4905
|
+
return entry;
|
|
4906
|
+
});
|
|
4907
|
+
};
|
|
4439
4908
|
const serializeAws_restJson1GeofenceGeometry = (input, context) => {
|
|
4440
4909
|
return {
|
|
4441
4910
|
...(input.Circle != null && { Circle: serializeAws_restJson1Circle(input.Circle, context) }),
|
|
@@ -4496,6 +4965,13 @@ const serializeAws_restJson1PropertyMap = (input, context) => {
|
|
|
4496
4965
|
return acc;
|
|
4497
4966
|
}, {});
|
|
4498
4967
|
};
|
|
4968
|
+
const serializeAws_restJson1RefererPatternList = (input, context) => {
|
|
4969
|
+
return input
|
|
4970
|
+
.filter((e) => e != null)
|
|
4971
|
+
.map((entry) => {
|
|
4972
|
+
return entry;
|
|
4973
|
+
});
|
|
4974
|
+
};
|
|
4499
4975
|
const serializeAws_restJson1TagMap = (input, context) => {
|
|
4500
4976
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
4501
4977
|
if (value === null) {
|
|
@@ -4526,6 +5002,26 @@ const serializeAws_restJson1WaypointPositionList = (input, context) => {
|
|
|
4526
5002
|
return serializeAws_restJson1Position(entry, context);
|
|
4527
5003
|
});
|
|
4528
5004
|
};
|
|
5005
|
+
const deserializeAws_restJson1ApiKeyActionList = (output, context) => {
|
|
5006
|
+
const retVal = (output || [])
|
|
5007
|
+
.filter((e) => e != null)
|
|
5008
|
+
.map((entry) => {
|
|
5009
|
+
if (entry === null) {
|
|
5010
|
+
return null;
|
|
5011
|
+
}
|
|
5012
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
5013
|
+
});
|
|
5014
|
+
return retVal;
|
|
5015
|
+
};
|
|
5016
|
+
const deserializeAws_restJson1ApiKeyRestrictions = (output, context) => {
|
|
5017
|
+
return {
|
|
5018
|
+
AllowActions: output.AllowActions != null ? deserializeAws_restJson1ApiKeyActionList(output.AllowActions, context) : undefined,
|
|
5019
|
+
AllowReferers: output.AllowReferers != null
|
|
5020
|
+
? deserializeAws_restJson1RefererPatternList(output.AllowReferers, context)
|
|
5021
|
+
: undefined,
|
|
5022
|
+
AllowResources: output.AllowResources != null ? deserializeAws_restJson1GeoArnList(output.AllowResources, context) : undefined,
|
|
5023
|
+
};
|
|
5024
|
+
};
|
|
4529
5025
|
const deserializeAws_restJson1ArnList = (output, context) => {
|
|
4530
5026
|
const retVal = (output || [])
|
|
4531
5027
|
.filter((e) => e != null)
|
|
@@ -4738,6 +5234,17 @@ const deserializeAws_restJson1DevicePositionList = (output, context) => {
|
|
|
4738
5234
|
});
|
|
4739
5235
|
return retVal;
|
|
4740
5236
|
};
|
|
5237
|
+
const deserializeAws_restJson1GeoArnList = (output, context) => {
|
|
5238
|
+
const retVal = (output || [])
|
|
5239
|
+
.filter((e) => e != null)
|
|
5240
|
+
.map((entry) => {
|
|
5241
|
+
if (entry === null) {
|
|
5242
|
+
return null;
|
|
5243
|
+
}
|
|
5244
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
5245
|
+
});
|
|
5246
|
+
return retVal;
|
|
5247
|
+
};
|
|
4741
5248
|
const deserializeAws_restJson1GeofenceGeometry = (output, context) => {
|
|
4742
5249
|
return {
|
|
4743
5250
|
Circle: output.Circle != null ? deserializeAws_restJson1Circle(output.Circle, context) : undefined,
|
|
@@ -4866,6 +5373,29 @@ const deserializeAws_restJson1ListGeofenceResponseEntryList = (output, context)
|
|
|
4866
5373
|
});
|
|
4867
5374
|
return retVal;
|
|
4868
5375
|
};
|
|
5376
|
+
const deserializeAws_restJson1ListKeysResponseEntry = (output, context) => {
|
|
5377
|
+
return {
|
|
5378
|
+
CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
|
|
5379
|
+
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
5380
|
+
ExpireTime: output.ExpireTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.ExpireTime)) : undefined,
|
|
5381
|
+
KeyName: (0, smithy_client_1.expectString)(output.KeyName),
|
|
5382
|
+
Restrictions: output.Restrictions != null
|
|
5383
|
+
? deserializeAws_restJson1ApiKeyRestrictions(output.Restrictions, context)
|
|
5384
|
+
: undefined,
|
|
5385
|
+
UpdateTime: output.UpdateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.UpdateTime)) : undefined,
|
|
5386
|
+
};
|
|
5387
|
+
};
|
|
5388
|
+
const deserializeAws_restJson1ListKeysResponseEntryList = (output, context) => {
|
|
5389
|
+
const retVal = (output || [])
|
|
5390
|
+
.filter((e) => e != null)
|
|
5391
|
+
.map((entry) => {
|
|
5392
|
+
if (entry === null) {
|
|
5393
|
+
return null;
|
|
5394
|
+
}
|
|
5395
|
+
return deserializeAws_restJson1ListKeysResponseEntry(entry, context);
|
|
5396
|
+
});
|
|
5397
|
+
return retVal;
|
|
5398
|
+
};
|
|
4869
5399
|
const deserializeAws_restJson1ListMapsResponseEntry = (output, context) => {
|
|
4870
5400
|
return {
|
|
4871
5401
|
CreateTime: output.CreateTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.CreateTime)) : undefined,
|
|
@@ -5014,6 +5544,17 @@ const deserializeAws_restJson1PropertyMap = (output, context) => {
|
|
|
5014
5544
|
return acc;
|
|
5015
5545
|
}, {});
|
|
5016
5546
|
};
|
|
5547
|
+
const deserializeAws_restJson1RefererPatternList = (output, context) => {
|
|
5548
|
+
const retVal = (output || [])
|
|
5549
|
+
.filter((e) => e != null)
|
|
5550
|
+
.map((entry) => {
|
|
5551
|
+
if (entry === null) {
|
|
5552
|
+
return null;
|
|
5553
|
+
}
|
|
5554
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
5555
|
+
});
|
|
5556
|
+
return retVal;
|
|
5557
|
+
};
|
|
5017
5558
|
const deserializeAws_restJson1RouteMatrix = (output, context) => {
|
|
5018
5559
|
const retVal = (output || [])
|
|
5019
5560
|
.filter((e) => e != null)
|