@aws-sdk/client-location 3.491.0 → 3.495.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 (82) hide show
  1. package/dist-cjs/Location.js +1 -127
  2. package/dist-cjs/LocationClient.js +1 -43
  3. package/dist-cjs/commands/AssociateTrackerConsumerCommand.js +1 -28
  4. package/dist-cjs/commands/BatchDeleteDevicePositionHistoryCommand.js +1 -28
  5. package/dist-cjs/commands/BatchDeleteGeofenceCommand.js +1 -28
  6. package/dist-cjs/commands/BatchEvaluateGeofencesCommand.js +1 -29
  7. package/dist-cjs/commands/BatchGetDevicePositionCommand.js +1 -29
  8. package/dist-cjs/commands/BatchPutGeofenceCommand.js +1 -29
  9. package/dist-cjs/commands/BatchUpdateDevicePositionCommand.js +1 -29
  10. package/dist-cjs/commands/CalculateRouteCommand.js +1 -29
  11. package/dist-cjs/commands/CalculateRouteMatrixCommand.js +1 -29
  12. package/dist-cjs/commands/CreateGeofenceCollectionCommand.js +1 -28
  13. package/dist-cjs/commands/CreateKeyCommand.js +1 -29
  14. package/dist-cjs/commands/CreateMapCommand.js +1 -28
  15. package/dist-cjs/commands/CreatePlaceIndexCommand.js +1 -28
  16. package/dist-cjs/commands/CreateRouteCalculatorCommand.js +1 -28
  17. package/dist-cjs/commands/CreateTrackerCommand.js +1 -28
  18. package/dist-cjs/commands/DeleteGeofenceCollectionCommand.js +1 -28
  19. package/dist-cjs/commands/DeleteKeyCommand.js +1 -28
  20. package/dist-cjs/commands/DeleteMapCommand.js +1 -28
  21. package/dist-cjs/commands/DeletePlaceIndexCommand.js +1 -28
  22. package/dist-cjs/commands/DeleteRouteCalculatorCommand.js +1 -28
  23. package/dist-cjs/commands/DeleteTrackerCommand.js +1 -28
  24. package/dist-cjs/commands/DescribeGeofenceCollectionCommand.js +1 -28
  25. package/dist-cjs/commands/DescribeKeyCommand.js +1 -29
  26. package/dist-cjs/commands/DescribeMapCommand.js +1 -28
  27. package/dist-cjs/commands/DescribePlaceIndexCommand.js +1 -28
  28. package/dist-cjs/commands/DescribeRouteCalculatorCommand.js +1 -28
  29. package/dist-cjs/commands/DescribeTrackerCommand.js +1 -28
  30. package/dist-cjs/commands/DisassociateTrackerConsumerCommand.js +1 -28
  31. package/dist-cjs/commands/GetDevicePositionCommand.js +1 -29
  32. package/dist-cjs/commands/GetDevicePositionHistoryCommand.js +1 -29
  33. package/dist-cjs/commands/GetGeofenceCommand.js +1 -29
  34. package/dist-cjs/commands/GetMapGlyphsCommand.js +1 -29
  35. package/dist-cjs/commands/GetMapSpritesCommand.js +1 -29
  36. package/dist-cjs/commands/GetMapStyleDescriptorCommand.js +1 -29
  37. package/dist-cjs/commands/GetMapTileCommand.js +1 -29
  38. package/dist-cjs/commands/GetPlaceCommand.js +1 -29
  39. package/dist-cjs/commands/ListDevicePositionsCommand.js +1 -29
  40. package/dist-cjs/commands/ListGeofenceCollectionsCommand.js +1 -28
  41. package/dist-cjs/commands/ListGeofencesCommand.js +1 -29
  42. package/dist-cjs/commands/ListKeysCommand.js +1 -28
  43. package/dist-cjs/commands/ListMapsCommand.js +1 -28
  44. package/dist-cjs/commands/ListPlaceIndexesCommand.js +1 -28
  45. package/dist-cjs/commands/ListRouteCalculatorsCommand.js +1 -28
  46. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  47. package/dist-cjs/commands/ListTrackerConsumersCommand.js +1 -28
  48. package/dist-cjs/commands/ListTrackersCommand.js +1 -28
  49. package/dist-cjs/commands/PutGeofenceCommand.js +1 -29
  50. package/dist-cjs/commands/SearchPlaceIndexForPositionCommand.js +1 -29
  51. package/dist-cjs/commands/SearchPlaceIndexForSuggestionsCommand.js +1 -29
  52. package/dist-cjs/commands/SearchPlaceIndexForTextCommand.js +1 -29
  53. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  54. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  55. package/dist-cjs/commands/UpdateGeofenceCollectionCommand.js +1 -28
  56. package/dist-cjs/commands/UpdateKeyCommand.js +1 -28
  57. package/dist-cjs/commands/UpdateMapCommand.js +1 -28
  58. package/dist-cjs/commands/UpdatePlaceIndexCommand.js +1 -28
  59. package/dist-cjs/commands/UpdateRouteCalculatorCommand.js +1 -28
  60. package/dist-cjs/commands/UpdateTrackerCommand.js +1 -28
  61. package/dist-cjs/commands/index.js +1 -61
  62. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  63. package/dist-cjs/extensionConfiguration.js +1 -2
  64. package/dist-cjs/index.js +6554 -11
  65. package/dist-cjs/models/LocationServiceException.js +1 -12
  66. package/dist-cjs/models/index.js +1 -4
  67. package/dist-cjs/models/models_0.js +1 -388
  68. package/dist-cjs/pagination/GetDevicePositionHistoryPaginator.js +1 -7
  69. package/dist-cjs/pagination/Interfaces.js +1 -2
  70. package/dist-cjs/pagination/ListDevicePositionsPaginator.js +1 -7
  71. package/dist-cjs/pagination/ListGeofenceCollectionsPaginator.js +1 -7
  72. package/dist-cjs/pagination/ListGeofencesPaginator.js +1 -7
  73. package/dist-cjs/pagination/ListKeysPaginator.js +1 -7
  74. package/dist-cjs/pagination/ListMapsPaginator.js +1 -7
  75. package/dist-cjs/pagination/ListPlaceIndexesPaginator.js +1 -7
  76. package/dist-cjs/pagination/ListRouteCalculatorsPaginator.js +1 -7
  77. package/dist-cjs/pagination/ListTrackerConsumersPaginator.js +1 -7
  78. package/dist-cjs/pagination/ListTrackersPaginator.js +1 -7
  79. package/dist-cjs/pagination/index.js +1 -14
  80. package/dist-cjs/protocols/Aws_restJson1.js +1 -4826
  81. package/dist-cjs/runtimeExtensions.js +1 -22
  82. package/package.json +41 -41
@@ -1,4826 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_SearchPlaceIndexForTextCommand = exports.se_SearchPlaceIndexForSuggestionsCommand = exports.se_SearchPlaceIndexForPositionCommand = exports.se_PutGeofenceCommand = exports.se_ListTrackersCommand = exports.se_ListTrackerConsumersCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRouteCalculatorsCommand = exports.se_ListPlaceIndexesCommand = exports.se_ListMapsCommand = exports.se_ListKeysCommand = exports.se_ListGeofencesCommand = exports.se_ListGeofenceCollectionsCommand = exports.se_ListDevicePositionsCommand = exports.se_GetPlaceCommand = exports.se_GetMapTileCommand = exports.se_GetMapStyleDescriptorCommand = exports.se_GetMapSpritesCommand = exports.se_GetMapGlyphsCommand = exports.se_GetGeofenceCommand = exports.se_GetDevicePositionHistoryCommand = exports.se_GetDevicePositionCommand = exports.se_DisassociateTrackerConsumerCommand = exports.se_DescribeTrackerCommand = exports.se_DescribeRouteCalculatorCommand = exports.se_DescribePlaceIndexCommand = exports.se_DescribeMapCommand = exports.se_DescribeKeyCommand = exports.se_DescribeGeofenceCollectionCommand = exports.se_DeleteTrackerCommand = exports.se_DeleteRouteCalculatorCommand = exports.se_DeletePlaceIndexCommand = exports.se_DeleteMapCommand = exports.se_DeleteKeyCommand = exports.se_DeleteGeofenceCollectionCommand = exports.se_CreateTrackerCommand = exports.se_CreateRouteCalculatorCommand = exports.se_CreatePlaceIndexCommand = exports.se_CreateMapCommand = exports.se_CreateKeyCommand = exports.se_CreateGeofenceCollectionCommand = exports.se_CalculateRouteMatrixCommand = exports.se_CalculateRouteCommand = exports.se_BatchUpdateDevicePositionCommand = exports.se_BatchPutGeofenceCommand = exports.se_BatchGetDevicePositionCommand = exports.se_BatchEvaluateGeofencesCommand = exports.se_BatchDeleteGeofenceCommand = exports.se_BatchDeleteDevicePositionHistoryCommand = exports.se_AssociateTrackerConsumerCommand = void 0;
4
- exports.de_ListPlaceIndexesCommand = exports.de_ListMapsCommand = exports.de_ListKeysCommand = exports.de_ListGeofencesCommand = exports.de_ListGeofenceCollectionsCommand = exports.de_ListDevicePositionsCommand = exports.de_GetPlaceCommand = exports.de_GetMapTileCommand = exports.de_GetMapStyleDescriptorCommand = exports.de_GetMapSpritesCommand = exports.de_GetMapGlyphsCommand = exports.de_GetGeofenceCommand = exports.de_GetDevicePositionHistoryCommand = exports.de_GetDevicePositionCommand = exports.de_DisassociateTrackerConsumerCommand = exports.de_DescribeTrackerCommand = exports.de_DescribeRouteCalculatorCommand = exports.de_DescribePlaceIndexCommand = exports.de_DescribeMapCommand = exports.de_DescribeKeyCommand = exports.de_DescribeGeofenceCollectionCommand = exports.de_DeleteTrackerCommand = exports.de_DeleteRouteCalculatorCommand = exports.de_DeletePlaceIndexCommand = exports.de_DeleteMapCommand = exports.de_DeleteKeyCommand = exports.de_DeleteGeofenceCollectionCommand = exports.de_CreateTrackerCommand = exports.de_CreateRouteCalculatorCommand = exports.de_CreatePlaceIndexCommand = exports.de_CreateMapCommand = exports.de_CreateKeyCommand = exports.de_CreateGeofenceCollectionCommand = exports.de_CalculateRouteMatrixCommand = exports.de_CalculateRouteCommand = exports.de_BatchUpdateDevicePositionCommand = exports.de_BatchPutGeofenceCommand = exports.de_BatchGetDevicePositionCommand = exports.de_BatchEvaluateGeofencesCommand = exports.de_BatchDeleteGeofenceCommand = exports.de_BatchDeleteDevicePositionHistoryCommand = exports.de_AssociateTrackerConsumerCommand = exports.se_UpdateTrackerCommand = exports.se_UpdateRouteCalculatorCommand = exports.se_UpdatePlaceIndexCommand = exports.se_UpdateMapCommand = exports.se_UpdateKeyCommand = exports.se_UpdateGeofenceCollectionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = void 0;
5
- exports.de_UpdateTrackerCommand = exports.de_UpdateRouteCalculatorCommand = exports.de_UpdatePlaceIndexCommand = exports.de_UpdateMapCommand = exports.de_UpdateKeyCommand = exports.de_UpdateGeofenceCollectionCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchPlaceIndexForTextCommand = exports.de_SearchPlaceIndexForSuggestionsCommand = exports.de_SearchPlaceIndexForPositionCommand = exports.de_PutGeofenceCommand = exports.de_ListTrackersCommand = exports.de_ListTrackerConsumersCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRouteCalculatorsCommand = void 0;
6
- const core_1 = require("@smithy/core");
7
- const protocol_http_1 = require("@smithy/protocol-http");
8
- const smithy_client_1 = require("@smithy/smithy-client");
9
- const LocationServiceException_1 = require("../models/LocationServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_AssociateTrackerConsumerCommand = async (input, context) => {
12
- const b = (0, core_1.requestBuilder)(input, context);
13
- const headers = {
14
- "content-type": "application/json",
15
- };
16
- b.bp("/tracking/v0/trackers/{TrackerName}/consumers");
17
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1.take)(input, {
20
- ConsumerArn: [],
21
- }));
22
- let { hostname: resolvedHostname } = await context.endpoint();
23
- if (context.disableHostPrefix !== true) {
24
- resolvedHostname = "cp.tracking." + resolvedHostname;
25
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
26
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
27
- }
28
- }
29
- b.hn(resolvedHostname);
30
- b.m("POST").h(headers).b(body);
31
- return b.build();
32
- };
33
- exports.se_AssociateTrackerConsumerCommand = se_AssociateTrackerConsumerCommand;
34
- const se_BatchDeleteDevicePositionHistoryCommand = async (input, context) => {
35
- const b = (0, core_1.requestBuilder)(input, context);
36
- const headers = {
37
- "content-type": "application/json",
38
- };
39
- b.bp("/tracking/v0/trackers/{TrackerName}/delete-positions");
40
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
41
- let body;
42
- body = JSON.stringify((0, smithy_client_1.take)(input, {
43
- DeviceIds: (_) => (0, smithy_client_1._json)(_),
44
- }));
45
- let { hostname: resolvedHostname } = await context.endpoint();
46
- if (context.disableHostPrefix !== true) {
47
- resolvedHostname = "tracking." + resolvedHostname;
48
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
49
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
50
- }
51
- }
52
- b.hn(resolvedHostname);
53
- b.m("POST").h(headers).b(body);
54
- return b.build();
55
- };
56
- exports.se_BatchDeleteDevicePositionHistoryCommand = se_BatchDeleteDevicePositionHistoryCommand;
57
- const se_BatchDeleteGeofenceCommand = async (input, context) => {
58
- const b = (0, core_1.requestBuilder)(input, context);
59
- const headers = {
60
- "content-type": "application/json",
61
- };
62
- b.bp("/geofencing/v0/collections/{CollectionName}/delete-geofences");
63
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
64
- let body;
65
- body = JSON.stringify((0, smithy_client_1.take)(input, {
66
- GeofenceIds: (_) => (0, smithy_client_1._json)(_),
67
- }));
68
- let { hostname: resolvedHostname } = await context.endpoint();
69
- if (context.disableHostPrefix !== true) {
70
- resolvedHostname = "geofencing." + resolvedHostname;
71
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
72
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
73
- }
74
- }
75
- b.hn(resolvedHostname);
76
- b.m("POST").h(headers).b(body);
77
- return b.build();
78
- };
79
- exports.se_BatchDeleteGeofenceCommand = se_BatchDeleteGeofenceCommand;
80
- const se_BatchEvaluateGeofencesCommand = async (input, context) => {
81
- const b = (0, core_1.requestBuilder)(input, context);
82
- const headers = {
83
- "content-type": "application/json",
84
- };
85
- b.bp("/geofencing/v0/collections/{CollectionName}/positions");
86
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
87
- let body;
88
- body = JSON.stringify((0, smithy_client_1.take)(input, {
89
- DevicePositionUpdates: (_) => se_DevicePositionUpdateList(_, context),
90
- }));
91
- let { hostname: resolvedHostname } = await context.endpoint();
92
- if (context.disableHostPrefix !== true) {
93
- resolvedHostname = "geofencing." + resolvedHostname;
94
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
95
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
96
- }
97
- }
98
- b.hn(resolvedHostname);
99
- b.m("POST").h(headers).b(body);
100
- return b.build();
101
- };
102
- exports.se_BatchEvaluateGeofencesCommand = se_BatchEvaluateGeofencesCommand;
103
- const se_BatchGetDevicePositionCommand = async (input, context) => {
104
- const b = (0, core_1.requestBuilder)(input, context);
105
- const headers = {
106
- "content-type": "application/json",
107
- };
108
- b.bp("/tracking/v0/trackers/{TrackerName}/get-positions");
109
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
110
- let body;
111
- body = JSON.stringify((0, smithy_client_1.take)(input, {
112
- DeviceIds: (_) => (0, smithy_client_1._json)(_),
113
- }));
114
- let { hostname: resolvedHostname } = await context.endpoint();
115
- if (context.disableHostPrefix !== true) {
116
- resolvedHostname = "tracking." + resolvedHostname;
117
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
118
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
119
- }
120
- }
121
- b.hn(resolvedHostname);
122
- b.m("POST").h(headers).b(body);
123
- return b.build();
124
- };
125
- exports.se_BatchGetDevicePositionCommand = se_BatchGetDevicePositionCommand;
126
- const se_BatchPutGeofenceCommand = async (input, context) => {
127
- const b = (0, core_1.requestBuilder)(input, context);
128
- const headers = {
129
- "content-type": "application/json",
130
- };
131
- b.bp("/geofencing/v0/collections/{CollectionName}/put-geofences");
132
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
133
- let body;
134
- body = JSON.stringify((0, smithy_client_1.take)(input, {
135
- Entries: (_) => se_BatchPutGeofenceRequestEntryList(_, context),
136
- }));
137
- let { hostname: resolvedHostname } = await context.endpoint();
138
- if (context.disableHostPrefix !== true) {
139
- resolvedHostname = "geofencing." + resolvedHostname;
140
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
141
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
142
- }
143
- }
144
- b.hn(resolvedHostname);
145
- b.m("POST").h(headers).b(body);
146
- return b.build();
147
- };
148
- exports.se_BatchPutGeofenceCommand = se_BatchPutGeofenceCommand;
149
- const se_BatchUpdateDevicePositionCommand = async (input, context) => {
150
- const b = (0, core_1.requestBuilder)(input, context);
151
- const headers = {
152
- "content-type": "application/json",
153
- };
154
- b.bp("/tracking/v0/trackers/{TrackerName}/positions");
155
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
156
- let body;
157
- body = JSON.stringify((0, smithy_client_1.take)(input, {
158
- Updates: (_) => se_DevicePositionUpdateList(_, context),
159
- }));
160
- let { hostname: resolvedHostname } = await context.endpoint();
161
- if (context.disableHostPrefix !== true) {
162
- resolvedHostname = "tracking." + resolvedHostname;
163
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
164
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
165
- }
166
- }
167
- b.hn(resolvedHostname);
168
- b.m("POST").h(headers).b(body);
169
- return b.build();
170
- };
171
- exports.se_BatchUpdateDevicePositionCommand = se_BatchUpdateDevicePositionCommand;
172
- const se_CalculateRouteCommand = async (input, context) => {
173
- const b = (0, core_1.requestBuilder)(input, context);
174
- const headers = {
175
- "content-type": "application/json",
176
- };
177
- b.bp("/routes/v0/calculators/{CalculatorName}/calculate/route");
178
- b.p("CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
179
- const query = (0, smithy_client_1.map)({
180
- [_k]: [, input[_K]],
181
- });
182
- let body;
183
- body = JSON.stringify((0, smithy_client_1.take)(input, {
184
- ArrivalTime: (_) => _.toISOString().split(".")[0] + "Z",
185
- CarModeOptions: (_) => (0, smithy_client_1._json)(_),
186
- DepartNow: [],
187
- DeparturePosition: (_) => se_Position(_, context),
188
- DepartureTime: (_) => _.toISOString().split(".")[0] + "Z",
189
- DestinationPosition: (_) => se_Position(_, context),
190
- DistanceUnit: [],
191
- IncludeLegGeometry: [],
192
- OptimizeFor: [],
193
- TravelMode: [],
194
- TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context),
195
- WaypointPositions: (_) => se_WaypointPositionList(_, context),
196
- }));
197
- let { hostname: resolvedHostname } = await context.endpoint();
198
- if (context.disableHostPrefix !== true) {
199
- resolvedHostname = "routes." + resolvedHostname;
200
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
201
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
202
- }
203
- }
204
- b.hn(resolvedHostname);
205
- b.m("POST").h(headers).q(query).b(body);
206
- return b.build();
207
- };
208
- exports.se_CalculateRouteCommand = se_CalculateRouteCommand;
209
- const se_CalculateRouteMatrixCommand = async (input, context) => {
210
- const b = (0, core_1.requestBuilder)(input, context);
211
- const headers = {
212
- "content-type": "application/json",
213
- };
214
- b.bp("/routes/v0/calculators/{CalculatorName}/calculate/route-matrix");
215
- b.p("CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
216
- const query = (0, smithy_client_1.map)({
217
- [_k]: [, input[_K]],
218
- });
219
- let body;
220
- body = JSON.stringify((0, smithy_client_1.take)(input, {
221
- CarModeOptions: (_) => (0, smithy_client_1._json)(_),
222
- DepartNow: [],
223
- DeparturePositions: (_) => se_PositionList(_, context),
224
- DepartureTime: (_) => _.toISOString().split(".")[0] + "Z",
225
- DestinationPositions: (_) => se_PositionList(_, context),
226
- DistanceUnit: [],
227
- TravelMode: [],
228
- TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context),
229
- }));
230
- let { hostname: resolvedHostname } = await context.endpoint();
231
- if (context.disableHostPrefix !== true) {
232
- resolvedHostname = "routes." + resolvedHostname;
233
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
234
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
235
- }
236
- }
237
- b.hn(resolvedHostname);
238
- b.m("POST").h(headers).q(query).b(body);
239
- return b.build();
240
- };
241
- exports.se_CalculateRouteMatrixCommand = se_CalculateRouteMatrixCommand;
242
- const se_CreateGeofenceCollectionCommand = async (input, context) => {
243
- const b = (0, core_1.requestBuilder)(input, context);
244
- const headers = {
245
- "content-type": "application/json",
246
- };
247
- b.bp("/geofencing/v0/collections");
248
- let body;
249
- body = JSON.stringify((0, smithy_client_1.take)(input, {
250
- CollectionName: [],
251
- Description: [],
252
- KmsKeyId: [],
253
- PricingPlan: [],
254
- PricingPlanDataSource: [],
255
- Tags: (_) => (0, smithy_client_1._json)(_),
256
- }));
257
- let { hostname: resolvedHostname } = await context.endpoint();
258
- if (context.disableHostPrefix !== true) {
259
- resolvedHostname = "cp.geofencing." + resolvedHostname;
260
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
261
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
262
- }
263
- }
264
- b.hn(resolvedHostname);
265
- b.m("POST").h(headers).b(body);
266
- return b.build();
267
- };
268
- exports.se_CreateGeofenceCollectionCommand = se_CreateGeofenceCollectionCommand;
269
- const se_CreateKeyCommand = async (input, context) => {
270
- const b = (0, core_1.requestBuilder)(input, context);
271
- const headers = {
272
- "content-type": "application/json",
273
- };
274
- b.bp("/metadata/v0/keys");
275
- let body;
276
- body = JSON.stringify((0, smithy_client_1.take)(input, {
277
- Description: [],
278
- ExpireTime: (_) => _.toISOString().split(".")[0] + "Z",
279
- KeyName: [],
280
- NoExpiry: [],
281
- Restrictions: (_) => (0, smithy_client_1._json)(_),
282
- Tags: (_) => (0, smithy_client_1._json)(_),
283
- }));
284
- let { hostname: resolvedHostname } = await context.endpoint();
285
- if (context.disableHostPrefix !== true) {
286
- resolvedHostname = "cp.metadata." + resolvedHostname;
287
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
288
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
289
- }
290
- }
291
- b.hn(resolvedHostname);
292
- b.m("POST").h(headers).b(body);
293
- return b.build();
294
- };
295
- exports.se_CreateKeyCommand = se_CreateKeyCommand;
296
- const se_CreateMapCommand = async (input, context) => {
297
- const b = (0, core_1.requestBuilder)(input, context);
298
- const headers = {
299
- "content-type": "application/json",
300
- };
301
- b.bp("/maps/v0/maps");
302
- let body;
303
- body = JSON.stringify((0, smithy_client_1.take)(input, {
304
- Configuration: (_) => (0, smithy_client_1._json)(_),
305
- Description: [],
306
- MapName: [],
307
- PricingPlan: [],
308
- Tags: (_) => (0, smithy_client_1._json)(_),
309
- }));
310
- let { hostname: resolvedHostname } = await context.endpoint();
311
- if (context.disableHostPrefix !== true) {
312
- resolvedHostname = "cp.maps." + resolvedHostname;
313
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
314
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
315
- }
316
- }
317
- b.hn(resolvedHostname);
318
- b.m("POST").h(headers).b(body);
319
- return b.build();
320
- };
321
- exports.se_CreateMapCommand = se_CreateMapCommand;
322
- const se_CreatePlaceIndexCommand = async (input, context) => {
323
- const b = (0, core_1.requestBuilder)(input, context);
324
- const headers = {
325
- "content-type": "application/json",
326
- };
327
- b.bp("/places/v0/indexes");
328
- let body;
329
- body = JSON.stringify((0, smithy_client_1.take)(input, {
330
- DataSource: [],
331
- DataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
332
- Description: [],
333
- IndexName: [],
334
- PricingPlan: [],
335
- Tags: (_) => (0, smithy_client_1._json)(_),
336
- }));
337
- let { hostname: resolvedHostname } = await context.endpoint();
338
- if (context.disableHostPrefix !== true) {
339
- resolvedHostname = "cp.places." + resolvedHostname;
340
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
341
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
342
- }
343
- }
344
- b.hn(resolvedHostname);
345
- b.m("POST").h(headers).b(body);
346
- return b.build();
347
- };
348
- exports.se_CreatePlaceIndexCommand = se_CreatePlaceIndexCommand;
349
- const se_CreateRouteCalculatorCommand = async (input, context) => {
350
- const b = (0, core_1.requestBuilder)(input, context);
351
- const headers = {
352
- "content-type": "application/json",
353
- };
354
- b.bp("/routes/v0/calculators");
355
- let body;
356
- body = JSON.stringify((0, smithy_client_1.take)(input, {
357
- CalculatorName: [],
358
- DataSource: [],
359
- Description: [],
360
- PricingPlan: [],
361
- Tags: (_) => (0, smithy_client_1._json)(_),
362
- }));
363
- let { hostname: resolvedHostname } = await context.endpoint();
364
- if (context.disableHostPrefix !== true) {
365
- resolvedHostname = "cp.routes." + resolvedHostname;
366
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
367
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
368
- }
369
- }
370
- b.hn(resolvedHostname);
371
- b.m("POST").h(headers).b(body);
372
- return b.build();
373
- };
374
- exports.se_CreateRouteCalculatorCommand = se_CreateRouteCalculatorCommand;
375
- const se_CreateTrackerCommand = async (input, context) => {
376
- const b = (0, core_1.requestBuilder)(input, context);
377
- const headers = {
378
- "content-type": "application/json",
379
- };
380
- b.bp("/tracking/v0/trackers");
381
- let body;
382
- body = JSON.stringify((0, smithy_client_1.take)(input, {
383
- Description: [],
384
- EventBridgeEnabled: [],
385
- KmsKeyEnableGeospatialQueries: [],
386
- KmsKeyId: [],
387
- PositionFiltering: [],
388
- PricingPlan: [],
389
- PricingPlanDataSource: [],
390
- Tags: (_) => (0, smithy_client_1._json)(_),
391
- TrackerName: [],
392
- }));
393
- let { hostname: resolvedHostname } = await context.endpoint();
394
- if (context.disableHostPrefix !== true) {
395
- resolvedHostname = "cp.tracking." + resolvedHostname;
396
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
397
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
398
- }
399
- }
400
- b.hn(resolvedHostname);
401
- b.m("POST").h(headers).b(body);
402
- return b.build();
403
- };
404
- exports.se_CreateTrackerCommand = se_CreateTrackerCommand;
405
- const se_DeleteGeofenceCollectionCommand = async (input, context) => {
406
- const b = (0, core_1.requestBuilder)(input, context);
407
- const headers = {};
408
- b.bp("/geofencing/v0/collections/{CollectionName}");
409
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
410
- let body;
411
- let { hostname: resolvedHostname } = await context.endpoint();
412
- if (context.disableHostPrefix !== true) {
413
- resolvedHostname = "cp.geofencing." + resolvedHostname;
414
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
415
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
416
- }
417
- }
418
- b.hn(resolvedHostname);
419
- b.m("DELETE").h(headers).b(body);
420
- return b.build();
421
- };
422
- exports.se_DeleteGeofenceCollectionCommand = se_DeleteGeofenceCollectionCommand;
423
- const se_DeleteKeyCommand = async (input, context) => {
424
- const b = (0, core_1.requestBuilder)(input, context);
425
- const headers = {};
426
- b.bp("/metadata/v0/keys/{KeyName}");
427
- b.p("KeyName", () => input.KeyName, "{KeyName}", false);
428
- const query = (0, smithy_client_1.map)({
429
- [_fD]: [() => input.ForceDelete !== void 0, () => input[_FD].toString()],
430
- });
431
- let body;
432
- let { hostname: resolvedHostname } = await context.endpoint();
433
- if (context.disableHostPrefix !== true) {
434
- resolvedHostname = "cp.metadata." + resolvedHostname;
435
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
436
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
437
- }
438
- }
439
- b.hn(resolvedHostname);
440
- b.m("DELETE").h(headers).q(query).b(body);
441
- return b.build();
442
- };
443
- exports.se_DeleteKeyCommand = se_DeleteKeyCommand;
444
- const se_DeleteMapCommand = async (input, context) => {
445
- const b = (0, core_1.requestBuilder)(input, context);
446
- const headers = {};
447
- b.bp("/maps/v0/maps/{MapName}");
448
- b.p("MapName", () => input.MapName, "{MapName}", false);
449
- let body;
450
- let { hostname: resolvedHostname } = await context.endpoint();
451
- if (context.disableHostPrefix !== true) {
452
- resolvedHostname = "cp.maps." + resolvedHostname;
453
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
454
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
455
- }
456
- }
457
- b.hn(resolvedHostname);
458
- b.m("DELETE").h(headers).b(body);
459
- return b.build();
460
- };
461
- exports.se_DeleteMapCommand = se_DeleteMapCommand;
462
- const se_DeletePlaceIndexCommand = async (input, context) => {
463
- const b = (0, core_1.requestBuilder)(input, context);
464
- const headers = {};
465
- b.bp("/places/v0/indexes/{IndexName}");
466
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
467
- let body;
468
- let { hostname: resolvedHostname } = await context.endpoint();
469
- if (context.disableHostPrefix !== true) {
470
- resolvedHostname = "cp.places." + resolvedHostname;
471
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
472
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
473
- }
474
- }
475
- b.hn(resolvedHostname);
476
- b.m("DELETE").h(headers).b(body);
477
- return b.build();
478
- };
479
- exports.se_DeletePlaceIndexCommand = se_DeletePlaceIndexCommand;
480
- const se_DeleteRouteCalculatorCommand = async (input, context) => {
481
- const b = (0, core_1.requestBuilder)(input, context);
482
- const headers = {};
483
- b.bp("/routes/v0/calculators/{CalculatorName}");
484
- b.p("CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
485
- let body;
486
- let { hostname: resolvedHostname } = await context.endpoint();
487
- if (context.disableHostPrefix !== true) {
488
- resolvedHostname = "cp.routes." + resolvedHostname;
489
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
490
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
491
- }
492
- }
493
- b.hn(resolvedHostname);
494
- b.m("DELETE").h(headers).b(body);
495
- return b.build();
496
- };
497
- exports.se_DeleteRouteCalculatorCommand = se_DeleteRouteCalculatorCommand;
498
- const se_DeleteTrackerCommand = async (input, context) => {
499
- const b = (0, core_1.requestBuilder)(input, context);
500
- const headers = {};
501
- b.bp("/tracking/v0/trackers/{TrackerName}");
502
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
503
- let body;
504
- let { hostname: resolvedHostname } = await context.endpoint();
505
- if (context.disableHostPrefix !== true) {
506
- resolvedHostname = "cp.tracking." + resolvedHostname;
507
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
508
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
509
- }
510
- }
511
- b.hn(resolvedHostname);
512
- b.m("DELETE").h(headers).b(body);
513
- return b.build();
514
- };
515
- exports.se_DeleteTrackerCommand = se_DeleteTrackerCommand;
516
- const se_DescribeGeofenceCollectionCommand = async (input, context) => {
517
- const b = (0, core_1.requestBuilder)(input, context);
518
- const headers = {};
519
- b.bp("/geofencing/v0/collections/{CollectionName}");
520
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
521
- let body;
522
- let { hostname: resolvedHostname } = await context.endpoint();
523
- if (context.disableHostPrefix !== true) {
524
- resolvedHostname = "cp.geofencing." + resolvedHostname;
525
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
526
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
527
- }
528
- }
529
- b.hn(resolvedHostname);
530
- b.m("GET").h(headers).b(body);
531
- return b.build();
532
- };
533
- exports.se_DescribeGeofenceCollectionCommand = se_DescribeGeofenceCollectionCommand;
534
- const se_DescribeKeyCommand = async (input, context) => {
535
- const b = (0, core_1.requestBuilder)(input, context);
536
- const headers = {};
537
- b.bp("/metadata/v0/keys/{KeyName}");
538
- b.p("KeyName", () => input.KeyName, "{KeyName}", false);
539
- let body;
540
- let { hostname: resolvedHostname } = await context.endpoint();
541
- if (context.disableHostPrefix !== true) {
542
- resolvedHostname = "cp.metadata." + resolvedHostname;
543
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
544
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
545
- }
546
- }
547
- b.hn(resolvedHostname);
548
- b.m("GET").h(headers).b(body);
549
- return b.build();
550
- };
551
- exports.se_DescribeKeyCommand = se_DescribeKeyCommand;
552
- const se_DescribeMapCommand = async (input, context) => {
553
- const b = (0, core_1.requestBuilder)(input, context);
554
- const headers = {};
555
- b.bp("/maps/v0/maps/{MapName}");
556
- b.p("MapName", () => input.MapName, "{MapName}", false);
557
- let body;
558
- let { hostname: resolvedHostname } = await context.endpoint();
559
- if (context.disableHostPrefix !== true) {
560
- resolvedHostname = "cp.maps." + resolvedHostname;
561
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
562
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
563
- }
564
- }
565
- b.hn(resolvedHostname);
566
- b.m("GET").h(headers).b(body);
567
- return b.build();
568
- };
569
- exports.se_DescribeMapCommand = se_DescribeMapCommand;
570
- const se_DescribePlaceIndexCommand = async (input, context) => {
571
- const b = (0, core_1.requestBuilder)(input, context);
572
- const headers = {};
573
- b.bp("/places/v0/indexes/{IndexName}");
574
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
575
- let body;
576
- let { hostname: resolvedHostname } = await context.endpoint();
577
- if (context.disableHostPrefix !== true) {
578
- resolvedHostname = "cp.places." + resolvedHostname;
579
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
580
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
581
- }
582
- }
583
- b.hn(resolvedHostname);
584
- b.m("GET").h(headers).b(body);
585
- return b.build();
586
- };
587
- exports.se_DescribePlaceIndexCommand = se_DescribePlaceIndexCommand;
588
- const se_DescribeRouteCalculatorCommand = async (input, context) => {
589
- const b = (0, core_1.requestBuilder)(input, context);
590
- const headers = {};
591
- b.bp("/routes/v0/calculators/{CalculatorName}");
592
- b.p("CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
593
- let body;
594
- let { hostname: resolvedHostname } = await context.endpoint();
595
- if (context.disableHostPrefix !== true) {
596
- resolvedHostname = "cp.routes." + resolvedHostname;
597
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
598
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
599
- }
600
- }
601
- b.hn(resolvedHostname);
602
- b.m("GET").h(headers).b(body);
603
- return b.build();
604
- };
605
- exports.se_DescribeRouteCalculatorCommand = se_DescribeRouteCalculatorCommand;
606
- const se_DescribeTrackerCommand = async (input, context) => {
607
- const b = (0, core_1.requestBuilder)(input, context);
608
- const headers = {};
609
- b.bp("/tracking/v0/trackers/{TrackerName}");
610
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
611
- let body;
612
- let { hostname: resolvedHostname } = await context.endpoint();
613
- if (context.disableHostPrefix !== true) {
614
- resolvedHostname = "cp.tracking." + resolvedHostname;
615
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
616
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
617
- }
618
- }
619
- b.hn(resolvedHostname);
620
- b.m("GET").h(headers).b(body);
621
- return b.build();
622
- };
623
- exports.se_DescribeTrackerCommand = se_DescribeTrackerCommand;
624
- const se_DisassociateTrackerConsumerCommand = async (input, context) => {
625
- const b = (0, core_1.requestBuilder)(input, context);
626
- const headers = {};
627
- b.bp("/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}");
628
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
629
- b.p("ConsumerArn", () => input.ConsumerArn, "{ConsumerArn}", false);
630
- let body;
631
- let { hostname: resolvedHostname } = await context.endpoint();
632
- if (context.disableHostPrefix !== true) {
633
- resolvedHostname = "cp.tracking." + resolvedHostname;
634
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
635
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
636
- }
637
- }
638
- b.hn(resolvedHostname);
639
- b.m("DELETE").h(headers).b(body);
640
- return b.build();
641
- };
642
- exports.se_DisassociateTrackerConsumerCommand = se_DisassociateTrackerConsumerCommand;
643
- const se_GetDevicePositionCommand = async (input, context) => {
644
- const b = (0, core_1.requestBuilder)(input, context);
645
- const headers = {};
646
- b.bp("/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest");
647
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
648
- b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
649
- let body;
650
- let { hostname: resolvedHostname } = await context.endpoint();
651
- if (context.disableHostPrefix !== true) {
652
- resolvedHostname = "tracking." + resolvedHostname;
653
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
654
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
655
- }
656
- }
657
- b.hn(resolvedHostname);
658
- b.m("GET").h(headers).b(body);
659
- return b.build();
660
- };
661
- exports.se_GetDevicePositionCommand = se_GetDevicePositionCommand;
662
- const se_GetDevicePositionHistoryCommand = async (input, context) => {
663
- const b = (0, core_1.requestBuilder)(input, context);
664
- const headers = {
665
- "content-type": "application/json",
666
- };
667
- b.bp("/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions");
668
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
669
- b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
670
- let body;
671
- body = JSON.stringify((0, smithy_client_1.take)(input, {
672
- EndTimeExclusive: (_) => _.toISOString().split(".")[0] + "Z",
673
- MaxResults: [],
674
- NextToken: [],
675
- StartTimeInclusive: (_) => _.toISOString().split(".")[0] + "Z",
676
- }));
677
- let { hostname: resolvedHostname } = await context.endpoint();
678
- if (context.disableHostPrefix !== true) {
679
- resolvedHostname = "tracking." + resolvedHostname;
680
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
681
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
682
- }
683
- }
684
- b.hn(resolvedHostname);
685
- b.m("POST").h(headers).b(body);
686
- return b.build();
687
- };
688
- exports.se_GetDevicePositionHistoryCommand = se_GetDevicePositionHistoryCommand;
689
- const se_GetGeofenceCommand = async (input, context) => {
690
- const b = (0, core_1.requestBuilder)(input, context);
691
- const headers = {};
692
- b.bp("/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}");
693
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
694
- b.p("GeofenceId", () => input.GeofenceId, "{GeofenceId}", false);
695
- let body;
696
- let { hostname: resolvedHostname } = await context.endpoint();
697
- if (context.disableHostPrefix !== true) {
698
- resolvedHostname = "geofencing." + resolvedHostname;
699
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
700
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
701
- }
702
- }
703
- b.hn(resolvedHostname);
704
- b.m("GET").h(headers).b(body);
705
- return b.build();
706
- };
707
- exports.se_GetGeofenceCommand = se_GetGeofenceCommand;
708
- const se_GetMapGlyphsCommand = async (input, context) => {
709
- const b = (0, core_1.requestBuilder)(input, context);
710
- const headers = {};
711
- b.bp("/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}");
712
- b.p("MapName", () => input.MapName, "{MapName}", false);
713
- b.p("FontStack", () => input.FontStack, "{FontStack}", false);
714
- b.p("FontUnicodeRange", () => input.FontUnicodeRange, "{FontUnicodeRange}", false);
715
- const query = (0, smithy_client_1.map)({
716
- [_k]: [, input[_K]],
717
- });
718
- let body;
719
- let { hostname: resolvedHostname } = await context.endpoint();
720
- if (context.disableHostPrefix !== true) {
721
- resolvedHostname = "maps." + resolvedHostname;
722
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
723
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
724
- }
725
- }
726
- b.hn(resolvedHostname);
727
- b.m("GET").h(headers).q(query).b(body);
728
- return b.build();
729
- };
730
- exports.se_GetMapGlyphsCommand = se_GetMapGlyphsCommand;
731
- const se_GetMapSpritesCommand = async (input, context) => {
732
- const b = (0, core_1.requestBuilder)(input, context);
733
- const headers = {};
734
- b.bp("/maps/v0/maps/{MapName}/sprites/{FileName}");
735
- b.p("MapName", () => input.MapName, "{MapName}", false);
736
- b.p("FileName", () => input.FileName, "{FileName}", false);
737
- const query = (0, smithy_client_1.map)({
738
- [_k]: [, input[_K]],
739
- });
740
- let body;
741
- let { hostname: resolvedHostname } = await context.endpoint();
742
- if (context.disableHostPrefix !== true) {
743
- resolvedHostname = "maps." + resolvedHostname;
744
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
745
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
746
- }
747
- }
748
- b.hn(resolvedHostname);
749
- b.m("GET").h(headers).q(query).b(body);
750
- return b.build();
751
- };
752
- exports.se_GetMapSpritesCommand = se_GetMapSpritesCommand;
753
- const se_GetMapStyleDescriptorCommand = async (input, context) => {
754
- const b = (0, core_1.requestBuilder)(input, context);
755
- const headers = {};
756
- b.bp("/maps/v0/maps/{MapName}/style-descriptor");
757
- b.p("MapName", () => input.MapName, "{MapName}", false);
758
- const query = (0, smithy_client_1.map)({
759
- [_k]: [, input[_K]],
760
- });
761
- let body;
762
- let { hostname: resolvedHostname } = await context.endpoint();
763
- if (context.disableHostPrefix !== true) {
764
- resolvedHostname = "maps." + resolvedHostname;
765
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
766
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
767
- }
768
- }
769
- b.hn(resolvedHostname);
770
- b.m("GET").h(headers).q(query).b(body);
771
- return b.build();
772
- };
773
- exports.se_GetMapStyleDescriptorCommand = se_GetMapStyleDescriptorCommand;
774
- const se_GetMapTileCommand = async (input, context) => {
775
- const b = (0, core_1.requestBuilder)(input, context);
776
- const headers = {};
777
- b.bp("/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}");
778
- b.p("MapName", () => input.MapName, "{MapName}", false);
779
- b.p("Z", () => input.Z, "{Z}", false);
780
- b.p("X", () => input.X, "{X}", false);
781
- b.p("Y", () => input.Y, "{Y}", false);
782
- const query = (0, smithy_client_1.map)({
783
- [_k]: [, input[_K]],
784
- });
785
- let body;
786
- let { hostname: resolvedHostname } = await context.endpoint();
787
- if (context.disableHostPrefix !== true) {
788
- resolvedHostname = "maps." + resolvedHostname;
789
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
790
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
791
- }
792
- }
793
- b.hn(resolvedHostname);
794
- b.m("GET").h(headers).q(query).b(body);
795
- return b.build();
796
- };
797
- exports.se_GetMapTileCommand = se_GetMapTileCommand;
798
- const se_GetPlaceCommand = async (input, context) => {
799
- const b = (0, core_1.requestBuilder)(input, context);
800
- const headers = {};
801
- b.bp("/places/v0/indexes/{IndexName}/places/{PlaceId}");
802
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
803
- b.p("PlaceId", () => input.PlaceId, "{PlaceId}", false);
804
- const query = (0, smithy_client_1.map)({
805
- [_l]: [, input[_L]],
806
- [_k]: [, input[_K]],
807
- });
808
- let body;
809
- let { hostname: resolvedHostname } = await context.endpoint();
810
- if (context.disableHostPrefix !== true) {
811
- resolvedHostname = "places." + resolvedHostname;
812
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
813
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
814
- }
815
- }
816
- b.hn(resolvedHostname);
817
- b.m("GET").h(headers).q(query).b(body);
818
- return b.build();
819
- };
820
- exports.se_GetPlaceCommand = se_GetPlaceCommand;
821
- const se_ListDevicePositionsCommand = async (input, context) => {
822
- const b = (0, core_1.requestBuilder)(input, context);
823
- const headers = {
824
- "content-type": "application/json",
825
- };
826
- b.bp("/tracking/v0/trackers/{TrackerName}/list-positions");
827
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
828
- let body;
829
- body = JSON.stringify((0, smithy_client_1.take)(input, {
830
- FilterGeometry: (_) => se_TrackingFilterGeometry(_, context),
831
- MaxResults: [],
832
- NextToken: [],
833
- }));
834
- let { hostname: resolvedHostname } = await context.endpoint();
835
- if (context.disableHostPrefix !== true) {
836
- resolvedHostname = "tracking." + resolvedHostname;
837
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
838
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
839
- }
840
- }
841
- b.hn(resolvedHostname);
842
- b.m("POST").h(headers).b(body);
843
- return b.build();
844
- };
845
- exports.se_ListDevicePositionsCommand = se_ListDevicePositionsCommand;
846
- const se_ListGeofenceCollectionsCommand = async (input, context) => {
847
- const b = (0, core_1.requestBuilder)(input, context);
848
- const headers = {
849
- "content-type": "application/json",
850
- };
851
- b.bp("/geofencing/v0/list-collections");
852
- let body;
853
- body = JSON.stringify((0, smithy_client_1.take)(input, {
854
- MaxResults: [],
855
- NextToken: [],
856
- }));
857
- let { hostname: resolvedHostname } = await context.endpoint();
858
- if (context.disableHostPrefix !== true) {
859
- resolvedHostname = "cp.geofencing." + resolvedHostname;
860
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
861
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
862
- }
863
- }
864
- b.hn(resolvedHostname);
865
- b.m("POST").h(headers).b(body);
866
- return b.build();
867
- };
868
- exports.se_ListGeofenceCollectionsCommand = se_ListGeofenceCollectionsCommand;
869
- const se_ListGeofencesCommand = async (input, context) => {
870
- const b = (0, core_1.requestBuilder)(input, context);
871
- const headers = {
872
- "content-type": "application/json",
873
- };
874
- b.bp("/geofencing/v0/collections/{CollectionName}/list-geofences");
875
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
876
- let body;
877
- body = JSON.stringify((0, smithy_client_1.take)(input, {
878
- MaxResults: [],
879
- NextToken: [],
880
- }));
881
- let { hostname: resolvedHostname } = await context.endpoint();
882
- if (context.disableHostPrefix !== true) {
883
- resolvedHostname = "geofencing." + resolvedHostname;
884
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
885
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
886
- }
887
- }
888
- b.hn(resolvedHostname);
889
- b.m("POST").h(headers).b(body);
890
- return b.build();
891
- };
892
- exports.se_ListGeofencesCommand = se_ListGeofencesCommand;
893
- const se_ListKeysCommand = async (input, context) => {
894
- const b = (0, core_1.requestBuilder)(input, context);
895
- const headers = {
896
- "content-type": "application/json",
897
- };
898
- b.bp("/metadata/v0/list-keys");
899
- let body;
900
- body = JSON.stringify((0, smithy_client_1.take)(input, {
901
- Filter: (_) => (0, smithy_client_1._json)(_),
902
- MaxResults: [],
903
- NextToken: [],
904
- }));
905
- let { hostname: resolvedHostname } = await context.endpoint();
906
- if (context.disableHostPrefix !== true) {
907
- resolvedHostname = "cp.metadata." + resolvedHostname;
908
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
909
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
910
- }
911
- }
912
- b.hn(resolvedHostname);
913
- b.m("POST").h(headers).b(body);
914
- return b.build();
915
- };
916
- exports.se_ListKeysCommand = se_ListKeysCommand;
917
- const se_ListMapsCommand = async (input, context) => {
918
- const b = (0, core_1.requestBuilder)(input, context);
919
- const headers = {
920
- "content-type": "application/json",
921
- };
922
- b.bp("/maps/v0/list-maps");
923
- let body;
924
- body = JSON.stringify((0, smithy_client_1.take)(input, {
925
- MaxResults: [],
926
- NextToken: [],
927
- }));
928
- let { hostname: resolvedHostname } = await context.endpoint();
929
- if (context.disableHostPrefix !== true) {
930
- resolvedHostname = "cp.maps." + resolvedHostname;
931
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
932
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
933
- }
934
- }
935
- b.hn(resolvedHostname);
936
- b.m("POST").h(headers).b(body);
937
- return b.build();
938
- };
939
- exports.se_ListMapsCommand = se_ListMapsCommand;
940
- const se_ListPlaceIndexesCommand = async (input, context) => {
941
- const b = (0, core_1.requestBuilder)(input, context);
942
- const headers = {
943
- "content-type": "application/json",
944
- };
945
- b.bp("/places/v0/list-indexes");
946
- let body;
947
- body = JSON.stringify((0, smithy_client_1.take)(input, {
948
- MaxResults: [],
949
- NextToken: [],
950
- }));
951
- let { hostname: resolvedHostname } = await context.endpoint();
952
- if (context.disableHostPrefix !== true) {
953
- resolvedHostname = "cp.places." + resolvedHostname;
954
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
955
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
956
- }
957
- }
958
- b.hn(resolvedHostname);
959
- b.m("POST").h(headers).b(body);
960
- return b.build();
961
- };
962
- exports.se_ListPlaceIndexesCommand = se_ListPlaceIndexesCommand;
963
- const se_ListRouteCalculatorsCommand = async (input, context) => {
964
- const b = (0, core_1.requestBuilder)(input, context);
965
- const headers = {
966
- "content-type": "application/json",
967
- };
968
- b.bp("/routes/v0/list-calculators");
969
- let body;
970
- body = JSON.stringify((0, smithy_client_1.take)(input, {
971
- MaxResults: [],
972
- NextToken: [],
973
- }));
974
- let { hostname: resolvedHostname } = await context.endpoint();
975
- if (context.disableHostPrefix !== true) {
976
- resolvedHostname = "cp.routes." + resolvedHostname;
977
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
978
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
979
- }
980
- }
981
- b.hn(resolvedHostname);
982
- b.m("POST").h(headers).b(body);
983
- return b.build();
984
- };
985
- exports.se_ListRouteCalculatorsCommand = se_ListRouteCalculatorsCommand;
986
- const se_ListTagsForResourceCommand = async (input, context) => {
987
- const b = (0, core_1.requestBuilder)(input, context);
988
- const headers = {};
989
- b.bp("/tags/{ResourceArn}");
990
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
991
- let body;
992
- let { hostname: resolvedHostname } = await context.endpoint();
993
- if (context.disableHostPrefix !== true) {
994
- resolvedHostname = "cp.metadata." + resolvedHostname;
995
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
996
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
997
- }
998
- }
999
- b.hn(resolvedHostname);
1000
- b.m("GET").h(headers).b(body);
1001
- return b.build();
1002
- };
1003
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
1004
- const se_ListTrackerConsumersCommand = async (input, context) => {
1005
- const b = (0, core_1.requestBuilder)(input, context);
1006
- const headers = {
1007
- "content-type": "application/json",
1008
- };
1009
- b.bp("/tracking/v0/trackers/{TrackerName}/list-consumers");
1010
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
1011
- let body;
1012
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1013
- MaxResults: [],
1014
- NextToken: [],
1015
- }));
1016
- let { hostname: resolvedHostname } = await context.endpoint();
1017
- if (context.disableHostPrefix !== true) {
1018
- resolvedHostname = "cp.tracking." + resolvedHostname;
1019
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1020
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1021
- }
1022
- }
1023
- b.hn(resolvedHostname);
1024
- b.m("POST").h(headers).b(body);
1025
- return b.build();
1026
- };
1027
- exports.se_ListTrackerConsumersCommand = se_ListTrackerConsumersCommand;
1028
- const se_ListTrackersCommand = async (input, context) => {
1029
- const b = (0, core_1.requestBuilder)(input, context);
1030
- const headers = {
1031
- "content-type": "application/json",
1032
- };
1033
- b.bp("/tracking/v0/list-trackers");
1034
- let body;
1035
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1036
- MaxResults: [],
1037
- NextToken: [],
1038
- }));
1039
- let { hostname: resolvedHostname } = await context.endpoint();
1040
- if (context.disableHostPrefix !== true) {
1041
- resolvedHostname = "cp.tracking." + resolvedHostname;
1042
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1043
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1044
- }
1045
- }
1046
- b.hn(resolvedHostname);
1047
- b.m("POST").h(headers).b(body);
1048
- return b.build();
1049
- };
1050
- exports.se_ListTrackersCommand = se_ListTrackersCommand;
1051
- const se_PutGeofenceCommand = async (input, context) => {
1052
- const b = (0, core_1.requestBuilder)(input, context);
1053
- const headers = {
1054
- "content-type": "application/json",
1055
- };
1056
- b.bp("/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}");
1057
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
1058
- b.p("GeofenceId", () => input.GeofenceId, "{GeofenceId}", false);
1059
- let body;
1060
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1061
- GeofenceProperties: (_) => (0, smithy_client_1._json)(_),
1062
- Geometry: (_) => se_GeofenceGeometry(_, context),
1063
- }));
1064
- let { hostname: resolvedHostname } = await context.endpoint();
1065
- if (context.disableHostPrefix !== true) {
1066
- resolvedHostname = "geofencing." + resolvedHostname;
1067
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1068
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1069
- }
1070
- }
1071
- b.hn(resolvedHostname);
1072
- b.m("PUT").h(headers).b(body);
1073
- return b.build();
1074
- };
1075
- exports.se_PutGeofenceCommand = se_PutGeofenceCommand;
1076
- const se_SearchPlaceIndexForPositionCommand = async (input, context) => {
1077
- const b = (0, core_1.requestBuilder)(input, context);
1078
- const headers = {
1079
- "content-type": "application/json",
1080
- };
1081
- b.bp("/places/v0/indexes/{IndexName}/search/position");
1082
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
1083
- const query = (0, smithy_client_1.map)({
1084
- [_k]: [, input[_K]],
1085
- });
1086
- let body;
1087
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1088
- Language: [],
1089
- MaxResults: [],
1090
- Position: (_) => se_Position(_, context),
1091
- }));
1092
- let { hostname: resolvedHostname } = await context.endpoint();
1093
- if (context.disableHostPrefix !== true) {
1094
- resolvedHostname = "places." + resolvedHostname;
1095
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1096
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1097
- }
1098
- }
1099
- b.hn(resolvedHostname);
1100
- b.m("POST").h(headers).q(query).b(body);
1101
- return b.build();
1102
- };
1103
- exports.se_SearchPlaceIndexForPositionCommand = se_SearchPlaceIndexForPositionCommand;
1104
- const se_SearchPlaceIndexForSuggestionsCommand = async (input, context) => {
1105
- const b = (0, core_1.requestBuilder)(input, context);
1106
- const headers = {
1107
- "content-type": "application/json",
1108
- };
1109
- b.bp("/places/v0/indexes/{IndexName}/search/suggestions");
1110
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
1111
- const query = (0, smithy_client_1.map)({
1112
- [_k]: [, input[_K]],
1113
- });
1114
- let body;
1115
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1116
- BiasPosition: (_) => se_Position(_, context),
1117
- FilterBBox: (_) => se_BoundingBox(_, context),
1118
- FilterCategories: (_) => (0, smithy_client_1._json)(_),
1119
- FilterCountries: (_) => (0, smithy_client_1._json)(_),
1120
- Language: [],
1121
- MaxResults: [],
1122
- Text: [],
1123
- }));
1124
- let { hostname: resolvedHostname } = await context.endpoint();
1125
- if (context.disableHostPrefix !== true) {
1126
- resolvedHostname = "places." + resolvedHostname;
1127
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1128
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1129
- }
1130
- }
1131
- b.hn(resolvedHostname);
1132
- b.m("POST").h(headers).q(query).b(body);
1133
- return b.build();
1134
- };
1135
- exports.se_SearchPlaceIndexForSuggestionsCommand = se_SearchPlaceIndexForSuggestionsCommand;
1136
- const se_SearchPlaceIndexForTextCommand = async (input, context) => {
1137
- const b = (0, core_1.requestBuilder)(input, context);
1138
- const headers = {
1139
- "content-type": "application/json",
1140
- };
1141
- b.bp("/places/v0/indexes/{IndexName}/search/text");
1142
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
1143
- const query = (0, smithy_client_1.map)({
1144
- [_k]: [, input[_K]],
1145
- });
1146
- let body;
1147
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1148
- BiasPosition: (_) => se_Position(_, context),
1149
- FilterBBox: (_) => se_BoundingBox(_, context),
1150
- FilterCategories: (_) => (0, smithy_client_1._json)(_),
1151
- FilterCountries: (_) => (0, smithy_client_1._json)(_),
1152
- Language: [],
1153
- MaxResults: [],
1154
- Text: [],
1155
- }));
1156
- let { hostname: resolvedHostname } = await context.endpoint();
1157
- if (context.disableHostPrefix !== true) {
1158
- resolvedHostname = "places." + resolvedHostname;
1159
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1160
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1161
- }
1162
- }
1163
- b.hn(resolvedHostname);
1164
- b.m("POST").h(headers).q(query).b(body);
1165
- return b.build();
1166
- };
1167
- exports.se_SearchPlaceIndexForTextCommand = se_SearchPlaceIndexForTextCommand;
1168
- const se_TagResourceCommand = async (input, context) => {
1169
- const b = (0, core_1.requestBuilder)(input, context);
1170
- const headers = {
1171
- "content-type": "application/json",
1172
- };
1173
- b.bp("/tags/{ResourceArn}");
1174
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1175
- let body;
1176
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1177
- Tags: (_) => (0, smithy_client_1._json)(_),
1178
- }));
1179
- let { hostname: resolvedHostname } = await context.endpoint();
1180
- if (context.disableHostPrefix !== true) {
1181
- resolvedHostname = "cp.metadata." + resolvedHostname;
1182
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1183
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1184
- }
1185
- }
1186
- b.hn(resolvedHostname);
1187
- b.m("POST").h(headers).b(body);
1188
- return b.build();
1189
- };
1190
- exports.se_TagResourceCommand = se_TagResourceCommand;
1191
- const se_UntagResourceCommand = async (input, context) => {
1192
- const b = (0, core_1.requestBuilder)(input, context);
1193
- const headers = {};
1194
- b.bp("/tags/{ResourceArn}");
1195
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1196
- const query = (0, smithy_client_1.map)({
1197
- [_tK]: [
1198
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
1199
- () => (input[_TK] || []).map((_entry) => _entry),
1200
- ],
1201
- });
1202
- let body;
1203
- let { hostname: resolvedHostname } = await context.endpoint();
1204
- if (context.disableHostPrefix !== true) {
1205
- resolvedHostname = "cp.metadata." + resolvedHostname;
1206
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1207
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1208
- }
1209
- }
1210
- b.hn(resolvedHostname);
1211
- b.m("DELETE").h(headers).q(query).b(body);
1212
- return b.build();
1213
- };
1214
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
1215
- const se_UpdateGeofenceCollectionCommand = async (input, context) => {
1216
- const b = (0, core_1.requestBuilder)(input, context);
1217
- const headers = {
1218
- "content-type": "application/json",
1219
- };
1220
- b.bp("/geofencing/v0/collections/{CollectionName}");
1221
- b.p("CollectionName", () => input.CollectionName, "{CollectionName}", false);
1222
- let body;
1223
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1224
- Description: [],
1225
- PricingPlan: [],
1226
- PricingPlanDataSource: [],
1227
- }));
1228
- let { hostname: resolvedHostname } = await context.endpoint();
1229
- if (context.disableHostPrefix !== true) {
1230
- resolvedHostname = "cp.geofencing." + resolvedHostname;
1231
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1232
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1233
- }
1234
- }
1235
- b.hn(resolvedHostname);
1236
- b.m("PATCH").h(headers).b(body);
1237
- return b.build();
1238
- };
1239
- exports.se_UpdateGeofenceCollectionCommand = se_UpdateGeofenceCollectionCommand;
1240
- const se_UpdateKeyCommand = async (input, context) => {
1241
- const b = (0, core_1.requestBuilder)(input, context);
1242
- const headers = {
1243
- "content-type": "application/json",
1244
- };
1245
- b.bp("/metadata/v0/keys/{KeyName}");
1246
- b.p("KeyName", () => input.KeyName, "{KeyName}", false);
1247
- let body;
1248
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1249
- Description: [],
1250
- ExpireTime: (_) => _.toISOString().split(".")[0] + "Z",
1251
- ForceUpdate: [],
1252
- NoExpiry: [],
1253
- Restrictions: (_) => (0, smithy_client_1._json)(_),
1254
- }));
1255
- let { hostname: resolvedHostname } = await context.endpoint();
1256
- if (context.disableHostPrefix !== true) {
1257
- resolvedHostname = "cp.metadata." + resolvedHostname;
1258
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1259
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1260
- }
1261
- }
1262
- b.hn(resolvedHostname);
1263
- b.m("PATCH").h(headers).b(body);
1264
- return b.build();
1265
- };
1266
- exports.se_UpdateKeyCommand = se_UpdateKeyCommand;
1267
- const se_UpdateMapCommand = async (input, context) => {
1268
- const b = (0, core_1.requestBuilder)(input, context);
1269
- const headers = {
1270
- "content-type": "application/json",
1271
- };
1272
- b.bp("/maps/v0/maps/{MapName}");
1273
- b.p("MapName", () => input.MapName, "{MapName}", false);
1274
- let body;
1275
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1276
- ConfigurationUpdate: (_) => (0, smithy_client_1._json)(_),
1277
- Description: [],
1278
- PricingPlan: [],
1279
- }));
1280
- let { hostname: resolvedHostname } = await context.endpoint();
1281
- if (context.disableHostPrefix !== true) {
1282
- resolvedHostname = "cp.maps." + resolvedHostname;
1283
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1284
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1285
- }
1286
- }
1287
- b.hn(resolvedHostname);
1288
- b.m("PATCH").h(headers).b(body);
1289
- return b.build();
1290
- };
1291
- exports.se_UpdateMapCommand = se_UpdateMapCommand;
1292
- const se_UpdatePlaceIndexCommand = async (input, context) => {
1293
- const b = (0, core_1.requestBuilder)(input, context);
1294
- const headers = {
1295
- "content-type": "application/json",
1296
- };
1297
- b.bp("/places/v0/indexes/{IndexName}");
1298
- b.p("IndexName", () => input.IndexName, "{IndexName}", false);
1299
- let body;
1300
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1301
- DataSourceConfiguration: (_) => (0, smithy_client_1._json)(_),
1302
- Description: [],
1303
- PricingPlan: [],
1304
- }));
1305
- let { hostname: resolvedHostname } = await context.endpoint();
1306
- if (context.disableHostPrefix !== true) {
1307
- resolvedHostname = "cp.places." + resolvedHostname;
1308
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1309
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1310
- }
1311
- }
1312
- b.hn(resolvedHostname);
1313
- b.m("PATCH").h(headers).b(body);
1314
- return b.build();
1315
- };
1316
- exports.se_UpdatePlaceIndexCommand = se_UpdatePlaceIndexCommand;
1317
- const se_UpdateRouteCalculatorCommand = async (input, context) => {
1318
- const b = (0, core_1.requestBuilder)(input, context);
1319
- const headers = {
1320
- "content-type": "application/json",
1321
- };
1322
- b.bp("/routes/v0/calculators/{CalculatorName}");
1323
- b.p("CalculatorName", () => input.CalculatorName, "{CalculatorName}", false);
1324
- let body;
1325
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1326
- Description: [],
1327
- PricingPlan: [],
1328
- }));
1329
- let { hostname: resolvedHostname } = await context.endpoint();
1330
- if (context.disableHostPrefix !== true) {
1331
- resolvedHostname = "cp.routes." + resolvedHostname;
1332
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1333
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1334
- }
1335
- }
1336
- b.hn(resolvedHostname);
1337
- b.m("PATCH").h(headers).b(body);
1338
- return b.build();
1339
- };
1340
- exports.se_UpdateRouteCalculatorCommand = se_UpdateRouteCalculatorCommand;
1341
- const se_UpdateTrackerCommand = async (input, context) => {
1342
- const b = (0, core_1.requestBuilder)(input, context);
1343
- const headers = {
1344
- "content-type": "application/json",
1345
- };
1346
- b.bp("/tracking/v0/trackers/{TrackerName}");
1347
- b.p("TrackerName", () => input.TrackerName, "{TrackerName}", false);
1348
- let body;
1349
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1350
- Description: [],
1351
- EventBridgeEnabled: [],
1352
- KmsKeyEnableGeospatialQueries: [],
1353
- PositionFiltering: [],
1354
- PricingPlan: [],
1355
- PricingPlanDataSource: [],
1356
- }));
1357
- let { hostname: resolvedHostname } = await context.endpoint();
1358
- if (context.disableHostPrefix !== true) {
1359
- resolvedHostname = "cp.tracking." + resolvedHostname;
1360
- if (!(0, protocol_http_1.isValidHostname)(resolvedHostname)) {
1361
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
1362
- }
1363
- }
1364
- b.hn(resolvedHostname);
1365
- b.m("PATCH").h(headers).b(body);
1366
- return b.build();
1367
- };
1368
- exports.se_UpdateTrackerCommand = se_UpdateTrackerCommand;
1369
- const de_AssociateTrackerConsumerCommand = async (output, context) => {
1370
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1371
- return de_AssociateTrackerConsumerCommandError(output, context);
1372
- }
1373
- const contents = (0, smithy_client_1.map)({
1374
- $metadata: deserializeMetadata(output),
1375
- });
1376
- await (0, smithy_client_1.collectBody)(output.body, context);
1377
- return contents;
1378
- };
1379
- exports.de_AssociateTrackerConsumerCommand = de_AssociateTrackerConsumerCommand;
1380
- const de_AssociateTrackerConsumerCommandError = async (output, context) => {
1381
- const parsedOutput = {
1382
- ...output,
1383
- body: await parseErrorBody(output.body, context),
1384
- };
1385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
- switch (errorCode) {
1387
- case "AccessDeniedException":
1388
- case "com.amazonaws.location#AccessDeniedException":
1389
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1390
- case "ConflictException":
1391
- case "com.amazonaws.location#ConflictException":
1392
- throw await de_ConflictExceptionRes(parsedOutput, context);
1393
- case "InternalServerException":
1394
- case "com.amazonaws.location#InternalServerException":
1395
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1396
- case "ResourceNotFoundException":
1397
- case "com.amazonaws.location#ResourceNotFoundException":
1398
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1399
- case "ServiceQuotaExceededException":
1400
- case "com.amazonaws.location#ServiceQuotaExceededException":
1401
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1402
- case "ThrottlingException":
1403
- case "com.amazonaws.location#ThrottlingException":
1404
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1405
- case "ValidationException":
1406
- case "com.amazonaws.location#ValidationException":
1407
- throw await de_ValidationExceptionRes(parsedOutput, context);
1408
- default:
1409
- const parsedBody = parsedOutput.body;
1410
- return throwDefaultError({
1411
- output,
1412
- parsedBody,
1413
- errorCode,
1414
- });
1415
- }
1416
- };
1417
- const de_BatchDeleteDevicePositionHistoryCommand = async (output, context) => {
1418
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1419
- return de_BatchDeleteDevicePositionHistoryCommandError(output, context);
1420
- }
1421
- const contents = (0, smithy_client_1.map)({
1422
- $metadata: deserializeMetadata(output),
1423
- });
1424
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1425
- const doc = (0, smithy_client_1.take)(data, {
1426
- Errors: smithy_client_1._json,
1427
- });
1428
- Object.assign(contents, doc);
1429
- return contents;
1430
- };
1431
- exports.de_BatchDeleteDevicePositionHistoryCommand = de_BatchDeleteDevicePositionHistoryCommand;
1432
- const de_BatchDeleteDevicePositionHistoryCommandError = async (output, context) => {
1433
- const parsedOutput = {
1434
- ...output,
1435
- body: await parseErrorBody(output.body, context),
1436
- };
1437
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1438
- switch (errorCode) {
1439
- case "AccessDeniedException":
1440
- case "com.amazonaws.location#AccessDeniedException":
1441
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1442
- case "InternalServerException":
1443
- case "com.amazonaws.location#InternalServerException":
1444
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1445
- case "ResourceNotFoundException":
1446
- case "com.amazonaws.location#ResourceNotFoundException":
1447
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1448
- case "ThrottlingException":
1449
- case "com.amazonaws.location#ThrottlingException":
1450
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1451
- case "ValidationException":
1452
- case "com.amazonaws.location#ValidationException":
1453
- throw await de_ValidationExceptionRes(parsedOutput, context);
1454
- default:
1455
- const parsedBody = parsedOutput.body;
1456
- return throwDefaultError({
1457
- output,
1458
- parsedBody,
1459
- errorCode,
1460
- });
1461
- }
1462
- };
1463
- const de_BatchDeleteGeofenceCommand = async (output, context) => {
1464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1465
- return de_BatchDeleteGeofenceCommandError(output, context);
1466
- }
1467
- const contents = (0, smithy_client_1.map)({
1468
- $metadata: deserializeMetadata(output),
1469
- });
1470
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1471
- const doc = (0, smithy_client_1.take)(data, {
1472
- Errors: smithy_client_1._json,
1473
- });
1474
- Object.assign(contents, doc);
1475
- return contents;
1476
- };
1477
- exports.de_BatchDeleteGeofenceCommand = de_BatchDeleteGeofenceCommand;
1478
- const de_BatchDeleteGeofenceCommandError = async (output, context) => {
1479
- const parsedOutput = {
1480
- ...output,
1481
- body: await parseErrorBody(output.body, context),
1482
- };
1483
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1484
- switch (errorCode) {
1485
- case "AccessDeniedException":
1486
- case "com.amazonaws.location#AccessDeniedException":
1487
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1488
- case "InternalServerException":
1489
- case "com.amazonaws.location#InternalServerException":
1490
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1491
- case "ResourceNotFoundException":
1492
- case "com.amazonaws.location#ResourceNotFoundException":
1493
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1494
- case "ThrottlingException":
1495
- case "com.amazonaws.location#ThrottlingException":
1496
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1497
- case "ValidationException":
1498
- case "com.amazonaws.location#ValidationException":
1499
- throw await de_ValidationExceptionRes(parsedOutput, context);
1500
- default:
1501
- const parsedBody = parsedOutput.body;
1502
- return throwDefaultError({
1503
- output,
1504
- parsedBody,
1505
- errorCode,
1506
- });
1507
- }
1508
- };
1509
- const de_BatchEvaluateGeofencesCommand = async (output, context) => {
1510
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1511
- return de_BatchEvaluateGeofencesCommandError(output, context);
1512
- }
1513
- const contents = (0, smithy_client_1.map)({
1514
- $metadata: deserializeMetadata(output),
1515
- });
1516
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1517
- const doc = (0, smithy_client_1.take)(data, {
1518
- Errors: (_) => de_BatchEvaluateGeofencesErrorList(_, context),
1519
- });
1520
- Object.assign(contents, doc);
1521
- return contents;
1522
- };
1523
- exports.de_BatchEvaluateGeofencesCommand = de_BatchEvaluateGeofencesCommand;
1524
- const de_BatchEvaluateGeofencesCommandError = async (output, context) => {
1525
- const parsedOutput = {
1526
- ...output,
1527
- body: await parseErrorBody(output.body, context),
1528
- };
1529
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1530
- switch (errorCode) {
1531
- case "AccessDeniedException":
1532
- case "com.amazonaws.location#AccessDeniedException":
1533
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1534
- case "InternalServerException":
1535
- case "com.amazonaws.location#InternalServerException":
1536
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1537
- case "ResourceNotFoundException":
1538
- case "com.amazonaws.location#ResourceNotFoundException":
1539
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1540
- case "ThrottlingException":
1541
- case "com.amazonaws.location#ThrottlingException":
1542
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1543
- case "ValidationException":
1544
- case "com.amazonaws.location#ValidationException":
1545
- throw await de_ValidationExceptionRes(parsedOutput, context);
1546
- default:
1547
- const parsedBody = parsedOutput.body;
1548
- return throwDefaultError({
1549
- output,
1550
- parsedBody,
1551
- errorCode,
1552
- });
1553
- }
1554
- };
1555
- const de_BatchGetDevicePositionCommand = async (output, context) => {
1556
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1557
- return de_BatchGetDevicePositionCommandError(output, context);
1558
- }
1559
- const contents = (0, smithy_client_1.map)({
1560
- $metadata: deserializeMetadata(output),
1561
- });
1562
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1563
- const doc = (0, smithy_client_1.take)(data, {
1564
- DevicePositions: (_) => de_DevicePositionList(_, context),
1565
- Errors: smithy_client_1._json,
1566
- });
1567
- Object.assign(contents, doc);
1568
- return contents;
1569
- };
1570
- exports.de_BatchGetDevicePositionCommand = de_BatchGetDevicePositionCommand;
1571
- const de_BatchGetDevicePositionCommandError = async (output, context) => {
1572
- const parsedOutput = {
1573
- ...output,
1574
- body: await parseErrorBody(output.body, context),
1575
- };
1576
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1577
- switch (errorCode) {
1578
- case "AccessDeniedException":
1579
- case "com.amazonaws.location#AccessDeniedException":
1580
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1581
- case "InternalServerException":
1582
- case "com.amazonaws.location#InternalServerException":
1583
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1584
- case "ResourceNotFoundException":
1585
- case "com.amazonaws.location#ResourceNotFoundException":
1586
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1587
- case "ThrottlingException":
1588
- case "com.amazonaws.location#ThrottlingException":
1589
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1590
- case "ValidationException":
1591
- case "com.amazonaws.location#ValidationException":
1592
- throw await de_ValidationExceptionRes(parsedOutput, context);
1593
- default:
1594
- const parsedBody = parsedOutput.body;
1595
- return throwDefaultError({
1596
- output,
1597
- parsedBody,
1598
- errorCode,
1599
- });
1600
- }
1601
- };
1602
- const de_BatchPutGeofenceCommand = async (output, context) => {
1603
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1604
- return de_BatchPutGeofenceCommandError(output, context);
1605
- }
1606
- const contents = (0, smithy_client_1.map)({
1607
- $metadata: deserializeMetadata(output),
1608
- });
1609
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1610
- const doc = (0, smithy_client_1.take)(data, {
1611
- Errors: smithy_client_1._json,
1612
- Successes: (_) => de_BatchPutGeofenceSuccessList(_, context),
1613
- });
1614
- Object.assign(contents, doc);
1615
- return contents;
1616
- };
1617
- exports.de_BatchPutGeofenceCommand = de_BatchPutGeofenceCommand;
1618
- const de_BatchPutGeofenceCommandError = async (output, context) => {
1619
- const parsedOutput = {
1620
- ...output,
1621
- body: await parseErrorBody(output.body, context),
1622
- };
1623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1624
- switch (errorCode) {
1625
- case "AccessDeniedException":
1626
- case "com.amazonaws.location#AccessDeniedException":
1627
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1628
- case "InternalServerException":
1629
- case "com.amazonaws.location#InternalServerException":
1630
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1631
- case "ResourceNotFoundException":
1632
- case "com.amazonaws.location#ResourceNotFoundException":
1633
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1634
- case "ThrottlingException":
1635
- case "com.amazonaws.location#ThrottlingException":
1636
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1637
- case "ValidationException":
1638
- case "com.amazonaws.location#ValidationException":
1639
- throw await de_ValidationExceptionRes(parsedOutput, context);
1640
- default:
1641
- const parsedBody = parsedOutput.body;
1642
- return throwDefaultError({
1643
- output,
1644
- parsedBody,
1645
- errorCode,
1646
- });
1647
- }
1648
- };
1649
- const de_BatchUpdateDevicePositionCommand = async (output, context) => {
1650
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1651
- return de_BatchUpdateDevicePositionCommandError(output, context);
1652
- }
1653
- const contents = (0, smithy_client_1.map)({
1654
- $metadata: deserializeMetadata(output),
1655
- });
1656
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1657
- const doc = (0, smithy_client_1.take)(data, {
1658
- Errors: (_) => de_BatchUpdateDevicePositionErrorList(_, context),
1659
- });
1660
- Object.assign(contents, doc);
1661
- return contents;
1662
- };
1663
- exports.de_BatchUpdateDevicePositionCommand = de_BatchUpdateDevicePositionCommand;
1664
- const de_BatchUpdateDevicePositionCommandError = async (output, context) => {
1665
- const parsedOutput = {
1666
- ...output,
1667
- body: await parseErrorBody(output.body, context),
1668
- };
1669
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1670
- switch (errorCode) {
1671
- case "AccessDeniedException":
1672
- case "com.amazonaws.location#AccessDeniedException":
1673
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1674
- case "InternalServerException":
1675
- case "com.amazonaws.location#InternalServerException":
1676
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1677
- case "ResourceNotFoundException":
1678
- case "com.amazonaws.location#ResourceNotFoundException":
1679
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1680
- case "ThrottlingException":
1681
- case "com.amazonaws.location#ThrottlingException":
1682
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1683
- case "ValidationException":
1684
- case "com.amazonaws.location#ValidationException":
1685
- throw await de_ValidationExceptionRes(parsedOutput, context);
1686
- default:
1687
- const parsedBody = parsedOutput.body;
1688
- return throwDefaultError({
1689
- output,
1690
- parsedBody,
1691
- errorCode,
1692
- });
1693
- }
1694
- };
1695
- const de_CalculateRouteCommand = async (output, context) => {
1696
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1697
- return de_CalculateRouteCommandError(output, context);
1698
- }
1699
- const contents = (0, smithy_client_1.map)({
1700
- $metadata: deserializeMetadata(output),
1701
- });
1702
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1703
- const doc = (0, smithy_client_1.take)(data, {
1704
- Legs: (_) => de_LegList(_, context),
1705
- Summary: (_) => de_CalculateRouteSummary(_, context),
1706
- });
1707
- Object.assign(contents, doc);
1708
- return contents;
1709
- };
1710
- exports.de_CalculateRouteCommand = de_CalculateRouteCommand;
1711
- const de_CalculateRouteCommandError = async (output, context) => {
1712
- const parsedOutput = {
1713
- ...output,
1714
- body: await parseErrorBody(output.body, context),
1715
- };
1716
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1717
- switch (errorCode) {
1718
- case "AccessDeniedException":
1719
- case "com.amazonaws.location#AccessDeniedException":
1720
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1721
- case "InternalServerException":
1722
- case "com.amazonaws.location#InternalServerException":
1723
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1724
- case "ResourceNotFoundException":
1725
- case "com.amazonaws.location#ResourceNotFoundException":
1726
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1727
- case "ThrottlingException":
1728
- case "com.amazonaws.location#ThrottlingException":
1729
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1730
- case "ValidationException":
1731
- case "com.amazonaws.location#ValidationException":
1732
- throw await de_ValidationExceptionRes(parsedOutput, context);
1733
- default:
1734
- const parsedBody = parsedOutput.body;
1735
- return throwDefaultError({
1736
- output,
1737
- parsedBody,
1738
- errorCode,
1739
- });
1740
- }
1741
- };
1742
- const de_CalculateRouteMatrixCommand = async (output, context) => {
1743
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1744
- return de_CalculateRouteMatrixCommandError(output, context);
1745
- }
1746
- const contents = (0, smithy_client_1.map)({
1747
- $metadata: deserializeMetadata(output),
1748
- });
1749
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1750
- const doc = (0, smithy_client_1.take)(data, {
1751
- RouteMatrix: (_) => de_RouteMatrix(_, context),
1752
- SnappedDeparturePositions: (_) => de_PositionList(_, context),
1753
- SnappedDestinationPositions: (_) => de_PositionList(_, context),
1754
- Summary: smithy_client_1._json,
1755
- });
1756
- Object.assign(contents, doc);
1757
- return contents;
1758
- };
1759
- exports.de_CalculateRouteMatrixCommand = de_CalculateRouteMatrixCommand;
1760
- const de_CalculateRouteMatrixCommandError = async (output, context) => {
1761
- const parsedOutput = {
1762
- ...output,
1763
- body: await parseErrorBody(output.body, context),
1764
- };
1765
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1766
- switch (errorCode) {
1767
- case "AccessDeniedException":
1768
- case "com.amazonaws.location#AccessDeniedException":
1769
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1770
- case "InternalServerException":
1771
- case "com.amazonaws.location#InternalServerException":
1772
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1773
- case "ResourceNotFoundException":
1774
- case "com.amazonaws.location#ResourceNotFoundException":
1775
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1776
- case "ThrottlingException":
1777
- case "com.amazonaws.location#ThrottlingException":
1778
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1779
- case "ValidationException":
1780
- case "com.amazonaws.location#ValidationException":
1781
- throw await de_ValidationExceptionRes(parsedOutput, context);
1782
- default:
1783
- const parsedBody = parsedOutput.body;
1784
- return throwDefaultError({
1785
- output,
1786
- parsedBody,
1787
- errorCode,
1788
- });
1789
- }
1790
- };
1791
- const de_CreateGeofenceCollectionCommand = async (output, context) => {
1792
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1793
- return de_CreateGeofenceCollectionCommandError(output, context);
1794
- }
1795
- const contents = (0, smithy_client_1.map)({
1796
- $metadata: deserializeMetadata(output),
1797
- });
1798
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1799
- const doc = (0, smithy_client_1.take)(data, {
1800
- CollectionArn: smithy_client_1.expectString,
1801
- CollectionName: smithy_client_1.expectString,
1802
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1803
- });
1804
- Object.assign(contents, doc);
1805
- return contents;
1806
- };
1807
- exports.de_CreateGeofenceCollectionCommand = de_CreateGeofenceCollectionCommand;
1808
- const de_CreateGeofenceCollectionCommandError = async (output, context) => {
1809
- const parsedOutput = {
1810
- ...output,
1811
- body: await parseErrorBody(output.body, context),
1812
- };
1813
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1814
- switch (errorCode) {
1815
- case "AccessDeniedException":
1816
- case "com.amazonaws.location#AccessDeniedException":
1817
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1818
- case "ConflictException":
1819
- case "com.amazonaws.location#ConflictException":
1820
- throw await de_ConflictExceptionRes(parsedOutput, context);
1821
- case "InternalServerException":
1822
- case "com.amazonaws.location#InternalServerException":
1823
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1824
- case "ServiceQuotaExceededException":
1825
- case "com.amazonaws.location#ServiceQuotaExceededException":
1826
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1827
- case "ThrottlingException":
1828
- case "com.amazonaws.location#ThrottlingException":
1829
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1830
- case "ValidationException":
1831
- case "com.amazonaws.location#ValidationException":
1832
- throw await de_ValidationExceptionRes(parsedOutput, context);
1833
- default:
1834
- const parsedBody = parsedOutput.body;
1835
- return throwDefaultError({
1836
- output,
1837
- parsedBody,
1838
- errorCode,
1839
- });
1840
- }
1841
- };
1842
- const de_CreateKeyCommand = async (output, context) => {
1843
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1844
- return de_CreateKeyCommandError(output, context);
1845
- }
1846
- const contents = (0, smithy_client_1.map)({
1847
- $metadata: deserializeMetadata(output),
1848
- });
1849
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1850
- const doc = (0, smithy_client_1.take)(data, {
1851
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1852
- Key: smithy_client_1.expectString,
1853
- KeyArn: smithy_client_1.expectString,
1854
- KeyName: smithy_client_1.expectString,
1855
- });
1856
- Object.assign(contents, doc);
1857
- return contents;
1858
- };
1859
- exports.de_CreateKeyCommand = de_CreateKeyCommand;
1860
- const de_CreateKeyCommandError = async (output, context) => {
1861
- const parsedOutput = {
1862
- ...output,
1863
- body: await parseErrorBody(output.body, context),
1864
- };
1865
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1866
- switch (errorCode) {
1867
- case "AccessDeniedException":
1868
- case "com.amazonaws.location#AccessDeniedException":
1869
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1870
- case "ConflictException":
1871
- case "com.amazonaws.location#ConflictException":
1872
- throw await de_ConflictExceptionRes(parsedOutput, context);
1873
- case "InternalServerException":
1874
- case "com.amazonaws.location#InternalServerException":
1875
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1876
- case "ServiceQuotaExceededException":
1877
- case "com.amazonaws.location#ServiceQuotaExceededException":
1878
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1879
- case "ThrottlingException":
1880
- case "com.amazonaws.location#ThrottlingException":
1881
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1882
- case "ValidationException":
1883
- case "com.amazonaws.location#ValidationException":
1884
- throw await de_ValidationExceptionRes(parsedOutput, context);
1885
- default:
1886
- const parsedBody = parsedOutput.body;
1887
- return throwDefaultError({
1888
- output,
1889
- parsedBody,
1890
- errorCode,
1891
- });
1892
- }
1893
- };
1894
- const de_CreateMapCommand = async (output, context) => {
1895
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
- return de_CreateMapCommandError(output, context);
1897
- }
1898
- const contents = (0, smithy_client_1.map)({
1899
- $metadata: deserializeMetadata(output),
1900
- });
1901
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1902
- const doc = (0, smithy_client_1.take)(data, {
1903
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1904
- MapArn: smithy_client_1.expectString,
1905
- MapName: smithy_client_1.expectString,
1906
- });
1907
- Object.assign(contents, doc);
1908
- return contents;
1909
- };
1910
- exports.de_CreateMapCommand = de_CreateMapCommand;
1911
- const de_CreateMapCommandError = async (output, context) => {
1912
- const parsedOutput = {
1913
- ...output,
1914
- body: await parseErrorBody(output.body, context),
1915
- };
1916
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1917
- switch (errorCode) {
1918
- case "AccessDeniedException":
1919
- case "com.amazonaws.location#AccessDeniedException":
1920
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1921
- case "ConflictException":
1922
- case "com.amazonaws.location#ConflictException":
1923
- throw await de_ConflictExceptionRes(parsedOutput, context);
1924
- case "InternalServerException":
1925
- case "com.amazonaws.location#InternalServerException":
1926
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1927
- case "ServiceQuotaExceededException":
1928
- case "com.amazonaws.location#ServiceQuotaExceededException":
1929
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1930
- case "ThrottlingException":
1931
- case "com.amazonaws.location#ThrottlingException":
1932
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1933
- case "ValidationException":
1934
- case "com.amazonaws.location#ValidationException":
1935
- throw await de_ValidationExceptionRes(parsedOutput, context);
1936
- default:
1937
- const parsedBody = parsedOutput.body;
1938
- return throwDefaultError({
1939
- output,
1940
- parsedBody,
1941
- errorCode,
1942
- });
1943
- }
1944
- };
1945
- const de_CreatePlaceIndexCommand = async (output, context) => {
1946
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1947
- return de_CreatePlaceIndexCommandError(output, context);
1948
- }
1949
- const contents = (0, smithy_client_1.map)({
1950
- $metadata: deserializeMetadata(output),
1951
- });
1952
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1953
- const doc = (0, smithy_client_1.take)(data, {
1954
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1955
- IndexArn: smithy_client_1.expectString,
1956
- IndexName: smithy_client_1.expectString,
1957
- });
1958
- Object.assign(contents, doc);
1959
- return contents;
1960
- };
1961
- exports.de_CreatePlaceIndexCommand = de_CreatePlaceIndexCommand;
1962
- const de_CreatePlaceIndexCommandError = async (output, context) => {
1963
- const parsedOutput = {
1964
- ...output,
1965
- body: await parseErrorBody(output.body, context),
1966
- };
1967
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1968
- switch (errorCode) {
1969
- case "AccessDeniedException":
1970
- case "com.amazonaws.location#AccessDeniedException":
1971
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1972
- case "ConflictException":
1973
- case "com.amazonaws.location#ConflictException":
1974
- throw await de_ConflictExceptionRes(parsedOutput, context);
1975
- case "InternalServerException":
1976
- case "com.amazonaws.location#InternalServerException":
1977
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1978
- case "ServiceQuotaExceededException":
1979
- case "com.amazonaws.location#ServiceQuotaExceededException":
1980
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1981
- case "ThrottlingException":
1982
- case "com.amazonaws.location#ThrottlingException":
1983
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1984
- case "ValidationException":
1985
- case "com.amazonaws.location#ValidationException":
1986
- throw await de_ValidationExceptionRes(parsedOutput, context);
1987
- default:
1988
- const parsedBody = parsedOutput.body;
1989
- return throwDefaultError({
1990
- output,
1991
- parsedBody,
1992
- errorCode,
1993
- });
1994
- }
1995
- };
1996
- const de_CreateRouteCalculatorCommand = async (output, context) => {
1997
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1998
- return de_CreateRouteCalculatorCommandError(output, context);
1999
- }
2000
- const contents = (0, smithy_client_1.map)({
2001
- $metadata: deserializeMetadata(output),
2002
- });
2003
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2004
- const doc = (0, smithy_client_1.take)(data, {
2005
- CalculatorArn: smithy_client_1.expectString,
2006
- CalculatorName: smithy_client_1.expectString,
2007
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2008
- });
2009
- Object.assign(contents, doc);
2010
- return contents;
2011
- };
2012
- exports.de_CreateRouteCalculatorCommand = de_CreateRouteCalculatorCommand;
2013
- const de_CreateRouteCalculatorCommandError = async (output, context) => {
2014
- const parsedOutput = {
2015
- ...output,
2016
- body: await parseErrorBody(output.body, context),
2017
- };
2018
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2019
- switch (errorCode) {
2020
- case "AccessDeniedException":
2021
- case "com.amazonaws.location#AccessDeniedException":
2022
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2023
- case "ConflictException":
2024
- case "com.amazonaws.location#ConflictException":
2025
- throw await de_ConflictExceptionRes(parsedOutput, context);
2026
- case "InternalServerException":
2027
- case "com.amazonaws.location#InternalServerException":
2028
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2029
- case "ServiceQuotaExceededException":
2030
- case "com.amazonaws.location#ServiceQuotaExceededException":
2031
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2032
- case "ThrottlingException":
2033
- case "com.amazonaws.location#ThrottlingException":
2034
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2035
- case "ValidationException":
2036
- case "com.amazonaws.location#ValidationException":
2037
- throw await de_ValidationExceptionRes(parsedOutput, context);
2038
- default:
2039
- const parsedBody = parsedOutput.body;
2040
- return throwDefaultError({
2041
- output,
2042
- parsedBody,
2043
- errorCode,
2044
- });
2045
- }
2046
- };
2047
- const de_CreateTrackerCommand = async (output, context) => {
2048
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2049
- return de_CreateTrackerCommandError(output, context);
2050
- }
2051
- const contents = (0, smithy_client_1.map)({
2052
- $metadata: deserializeMetadata(output),
2053
- });
2054
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2055
- const doc = (0, smithy_client_1.take)(data, {
2056
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2057
- TrackerArn: smithy_client_1.expectString,
2058
- TrackerName: smithy_client_1.expectString,
2059
- });
2060
- Object.assign(contents, doc);
2061
- return contents;
2062
- };
2063
- exports.de_CreateTrackerCommand = de_CreateTrackerCommand;
2064
- const de_CreateTrackerCommandError = async (output, context) => {
2065
- const parsedOutput = {
2066
- ...output,
2067
- body: await parseErrorBody(output.body, context),
2068
- };
2069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2070
- switch (errorCode) {
2071
- case "AccessDeniedException":
2072
- case "com.amazonaws.location#AccessDeniedException":
2073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2074
- case "ConflictException":
2075
- case "com.amazonaws.location#ConflictException":
2076
- throw await de_ConflictExceptionRes(parsedOutput, context);
2077
- case "InternalServerException":
2078
- case "com.amazonaws.location#InternalServerException":
2079
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2080
- case "ServiceQuotaExceededException":
2081
- case "com.amazonaws.location#ServiceQuotaExceededException":
2082
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2083
- case "ThrottlingException":
2084
- case "com.amazonaws.location#ThrottlingException":
2085
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2086
- case "ValidationException":
2087
- case "com.amazonaws.location#ValidationException":
2088
- throw await de_ValidationExceptionRes(parsedOutput, context);
2089
- default:
2090
- const parsedBody = parsedOutput.body;
2091
- return throwDefaultError({
2092
- output,
2093
- parsedBody,
2094
- errorCode,
2095
- });
2096
- }
2097
- };
2098
- const de_DeleteGeofenceCollectionCommand = async (output, context) => {
2099
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2100
- return de_DeleteGeofenceCollectionCommandError(output, context);
2101
- }
2102
- const contents = (0, smithy_client_1.map)({
2103
- $metadata: deserializeMetadata(output),
2104
- });
2105
- await (0, smithy_client_1.collectBody)(output.body, context);
2106
- return contents;
2107
- };
2108
- exports.de_DeleteGeofenceCollectionCommand = de_DeleteGeofenceCollectionCommand;
2109
- const de_DeleteGeofenceCollectionCommandError = async (output, context) => {
2110
- const parsedOutput = {
2111
- ...output,
2112
- body: await parseErrorBody(output.body, context),
2113
- };
2114
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2115
- switch (errorCode) {
2116
- case "AccessDeniedException":
2117
- case "com.amazonaws.location#AccessDeniedException":
2118
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2119
- case "InternalServerException":
2120
- case "com.amazonaws.location#InternalServerException":
2121
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2122
- case "ResourceNotFoundException":
2123
- case "com.amazonaws.location#ResourceNotFoundException":
2124
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2125
- case "ThrottlingException":
2126
- case "com.amazonaws.location#ThrottlingException":
2127
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2128
- case "ValidationException":
2129
- case "com.amazonaws.location#ValidationException":
2130
- throw await de_ValidationExceptionRes(parsedOutput, context);
2131
- default:
2132
- const parsedBody = parsedOutput.body;
2133
- return throwDefaultError({
2134
- output,
2135
- parsedBody,
2136
- errorCode,
2137
- });
2138
- }
2139
- };
2140
- const de_DeleteKeyCommand = async (output, context) => {
2141
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2142
- return de_DeleteKeyCommandError(output, context);
2143
- }
2144
- const contents = (0, smithy_client_1.map)({
2145
- $metadata: deserializeMetadata(output),
2146
- });
2147
- await (0, smithy_client_1.collectBody)(output.body, context);
2148
- return contents;
2149
- };
2150
- exports.de_DeleteKeyCommand = de_DeleteKeyCommand;
2151
- const de_DeleteKeyCommandError = async (output, context) => {
2152
- const parsedOutput = {
2153
- ...output,
2154
- body: await parseErrorBody(output.body, context),
2155
- };
2156
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2157
- switch (errorCode) {
2158
- case "AccessDeniedException":
2159
- case "com.amazonaws.location#AccessDeniedException":
2160
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2161
- case "InternalServerException":
2162
- case "com.amazonaws.location#InternalServerException":
2163
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2164
- case "ResourceNotFoundException":
2165
- case "com.amazonaws.location#ResourceNotFoundException":
2166
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2167
- case "ThrottlingException":
2168
- case "com.amazonaws.location#ThrottlingException":
2169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2170
- case "ValidationException":
2171
- case "com.amazonaws.location#ValidationException":
2172
- throw await de_ValidationExceptionRes(parsedOutput, context);
2173
- default:
2174
- const parsedBody = parsedOutput.body;
2175
- return throwDefaultError({
2176
- output,
2177
- parsedBody,
2178
- errorCode,
2179
- });
2180
- }
2181
- };
2182
- const de_DeleteMapCommand = async (output, context) => {
2183
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2184
- return de_DeleteMapCommandError(output, context);
2185
- }
2186
- const contents = (0, smithy_client_1.map)({
2187
- $metadata: deserializeMetadata(output),
2188
- });
2189
- await (0, smithy_client_1.collectBody)(output.body, context);
2190
- return contents;
2191
- };
2192
- exports.de_DeleteMapCommand = de_DeleteMapCommand;
2193
- const de_DeleteMapCommandError = async (output, context) => {
2194
- const parsedOutput = {
2195
- ...output,
2196
- body: await parseErrorBody(output.body, context),
2197
- };
2198
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
- switch (errorCode) {
2200
- case "AccessDeniedException":
2201
- case "com.amazonaws.location#AccessDeniedException":
2202
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2203
- case "InternalServerException":
2204
- case "com.amazonaws.location#InternalServerException":
2205
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2206
- case "ResourceNotFoundException":
2207
- case "com.amazonaws.location#ResourceNotFoundException":
2208
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2209
- case "ThrottlingException":
2210
- case "com.amazonaws.location#ThrottlingException":
2211
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2212
- case "ValidationException":
2213
- case "com.amazonaws.location#ValidationException":
2214
- throw await de_ValidationExceptionRes(parsedOutput, context);
2215
- default:
2216
- const parsedBody = parsedOutput.body;
2217
- return throwDefaultError({
2218
- output,
2219
- parsedBody,
2220
- errorCode,
2221
- });
2222
- }
2223
- };
2224
- const de_DeletePlaceIndexCommand = async (output, context) => {
2225
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2226
- return de_DeletePlaceIndexCommandError(output, context);
2227
- }
2228
- const contents = (0, smithy_client_1.map)({
2229
- $metadata: deserializeMetadata(output),
2230
- });
2231
- await (0, smithy_client_1.collectBody)(output.body, context);
2232
- return contents;
2233
- };
2234
- exports.de_DeletePlaceIndexCommand = de_DeletePlaceIndexCommand;
2235
- const de_DeletePlaceIndexCommandError = async (output, context) => {
2236
- const parsedOutput = {
2237
- ...output,
2238
- body: await parseErrorBody(output.body, context),
2239
- };
2240
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2241
- switch (errorCode) {
2242
- case "AccessDeniedException":
2243
- case "com.amazonaws.location#AccessDeniedException":
2244
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2245
- case "InternalServerException":
2246
- case "com.amazonaws.location#InternalServerException":
2247
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2248
- case "ResourceNotFoundException":
2249
- case "com.amazonaws.location#ResourceNotFoundException":
2250
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2251
- case "ThrottlingException":
2252
- case "com.amazonaws.location#ThrottlingException":
2253
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2254
- case "ValidationException":
2255
- case "com.amazonaws.location#ValidationException":
2256
- throw await de_ValidationExceptionRes(parsedOutput, context);
2257
- default:
2258
- const parsedBody = parsedOutput.body;
2259
- return throwDefaultError({
2260
- output,
2261
- parsedBody,
2262
- errorCode,
2263
- });
2264
- }
2265
- };
2266
- const de_DeleteRouteCalculatorCommand = async (output, context) => {
2267
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2268
- return de_DeleteRouteCalculatorCommandError(output, context);
2269
- }
2270
- const contents = (0, smithy_client_1.map)({
2271
- $metadata: deserializeMetadata(output),
2272
- });
2273
- await (0, smithy_client_1.collectBody)(output.body, context);
2274
- return contents;
2275
- };
2276
- exports.de_DeleteRouteCalculatorCommand = de_DeleteRouteCalculatorCommand;
2277
- const de_DeleteRouteCalculatorCommandError = async (output, context) => {
2278
- const parsedOutput = {
2279
- ...output,
2280
- body: await parseErrorBody(output.body, context),
2281
- };
2282
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2283
- switch (errorCode) {
2284
- case "AccessDeniedException":
2285
- case "com.amazonaws.location#AccessDeniedException":
2286
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2287
- case "InternalServerException":
2288
- case "com.amazonaws.location#InternalServerException":
2289
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2290
- case "ResourceNotFoundException":
2291
- case "com.amazonaws.location#ResourceNotFoundException":
2292
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2293
- case "ThrottlingException":
2294
- case "com.amazonaws.location#ThrottlingException":
2295
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2296
- case "ValidationException":
2297
- case "com.amazonaws.location#ValidationException":
2298
- throw await de_ValidationExceptionRes(parsedOutput, context);
2299
- default:
2300
- const parsedBody = parsedOutput.body;
2301
- return throwDefaultError({
2302
- output,
2303
- parsedBody,
2304
- errorCode,
2305
- });
2306
- }
2307
- };
2308
- const de_DeleteTrackerCommand = async (output, context) => {
2309
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2310
- return de_DeleteTrackerCommandError(output, context);
2311
- }
2312
- const contents = (0, smithy_client_1.map)({
2313
- $metadata: deserializeMetadata(output),
2314
- });
2315
- await (0, smithy_client_1.collectBody)(output.body, context);
2316
- return contents;
2317
- };
2318
- exports.de_DeleteTrackerCommand = de_DeleteTrackerCommand;
2319
- const de_DeleteTrackerCommandError = async (output, context) => {
2320
- const parsedOutput = {
2321
- ...output,
2322
- body: await parseErrorBody(output.body, context),
2323
- };
2324
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2325
- switch (errorCode) {
2326
- case "AccessDeniedException":
2327
- case "com.amazonaws.location#AccessDeniedException":
2328
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2329
- case "InternalServerException":
2330
- case "com.amazonaws.location#InternalServerException":
2331
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2332
- case "ResourceNotFoundException":
2333
- case "com.amazonaws.location#ResourceNotFoundException":
2334
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2335
- case "ThrottlingException":
2336
- case "com.amazonaws.location#ThrottlingException":
2337
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2338
- case "ValidationException":
2339
- case "com.amazonaws.location#ValidationException":
2340
- throw await de_ValidationExceptionRes(parsedOutput, context);
2341
- default:
2342
- const parsedBody = parsedOutput.body;
2343
- return throwDefaultError({
2344
- output,
2345
- parsedBody,
2346
- errorCode,
2347
- });
2348
- }
2349
- };
2350
- const de_DescribeGeofenceCollectionCommand = async (output, context) => {
2351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2352
- return de_DescribeGeofenceCollectionCommandError(output, context);
2353
- }
2354
- const contents = (0, smithy_client_1.map)({
2355
- $metadata: deserializeMetadata(output),
2356
- });
2357
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2358
- const doc = (0, smithy_client_1.take)(data, {
2359
- CollectionArn: smithy_client_1.expectString,
2360
- CollectionName: smithy_client_1.expectString,
2361
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2362
- Description: smithy_client_1.expectString,
2363
- GeofenceCount: smithy_client_1.expectInt32,
2364
- KmsKeyId: smithy_client_1.expectString,
2365
- PricingPlan: smithy_client_1.expectString,
2366
- PricingPlanDataSource: smithy_client_1.expectString,
2367
- Tags: smithy_client_1._json,
2368
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2369
- });
2370
- Object.assign(contents, doc);
2371
- return contents;
2372
- };
2373
- exports.de_DescribeGeofenceCollectionCommand = de_DescribeGeofenceCollectionCommand;
2374
- const de_DescribeGeofenceCollectionCommandError = async (output, context) => {
2375
- const parsedOutput = {
2376
- ...output,
2377
- body: await parseErrorBody(output.body, context),
2378
- };
2379
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2380
- switch (errorCode) {
2381
- case "AccessDeniedException":
2382
- case "com.amazonaws.location#AccessDeniedException":
2383
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2384
- case "InternalServerException":
2385
- case "com.amazonaws.location#InternalServerException":
2386
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2387
- case "ResourceNotFoundException":
2388
- case "com.amazonaws.location#ResourceNotFoundException":
2389
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2390
- case "ThrottlingException":
2391
- case "com.amazonaws.location#ThrottlingException":
2392
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2393
- case "ValidationException":
2394
- case "com.amazonaws.location#ValidationException":
2395
- throw await de_ValidationExceptionRes(parsedOutput, context);
2396
- default:
2397
- const parsedBody = parsedOutput.body;
2398
- return throwDefaultError({
2399
- output,
2400
- parsedBody,
2401
- errorCode,
2402
- });
2403
- }
2404
- };
2405
- const de_DescribeKeyCommand = async (output, context) => {
2406
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2407
- return de_DescribeKeyCommandError(output, context);
2408
- }
2409
- const contents = (0, smithy_client_1.map)({
2410
- $metadata: deserializeMetadata(output),
2411
- });
2412
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2413
- const doc = (0, smithy_client_1.take)(data, {
2414
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2415
- Description: smithy_client_1.expectString,
2416
- ExpireTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2417
- Key: smithy_client_1.expectString,
2418
- KeyArn: smithy_client_1.expectString,
2419
- KeyName: smithy_client_1.expectString,
2420
- Restrictions: smithy_client_1._json,
2421
- Tags: smithy_client_1._json,
2422
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2423
- });
2424
- Object.assign(contents, doc);
2425
- return contents;
2426
- };
2427
- exports.de_DescribeKeyCommand = de_DescribeKeyCommand;
2428
- const de_DescribeKeyCommandError = async (output, context) => {
2429
- const parsedOutput = {
2430
- ...output,
2431
- body: await parseErrorBody(output.body, context),
2432
- };
2433
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2434
- switch (errorCode) {
2435
- case "AccessDeniedException":
2436
- case "com.amazonaws.location#AccessDeniedException":
2437
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2438
- case "InternalServerException":
2439
- case "com.amazonaws.location#InternalServerException":
2440
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2441
- case "ResourceNotFoundException":
2442
- case "com.amazonaws.location#ResourceNotFoundException":
2443
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2444
- case "ThrottlingException":
2445
- case "com.amazonaws.location#ThrottlingException":
2446
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2447
- case "ValidationException":
2448
- case "com.amazonaws.location#ValidationException":
2449
- throw await de_ValidationExceptionRes(parsedOutput, context);
2450
- default:
2451
- const parsedBody = parsedOutput.body;
2452
- return throwDefaultError({
2453
- output,
2454
- parsedBody,
2455
- errorCode,
2456
- });
2457
- }
2458
- };
2459
- const de_DescribeMapCommand = async (output, context) => {
2460
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2461
- return de_DescribeMapCommandError(output, context);
2462
- }
2463
- const contents = (0, smithy_client_1.map)({
2464
- $metadata: deserializeMetadata(output),
2465
- });
2466
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2467
- const doc = (0, smithy_client_1.take)(data, {
2468
- Configuration: smithy_client_1._json,
2469
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2470
- DataSource: smithy_client_1.expectString,
2471
- Description: smithy_client_1.expectString,
2472
- MapArn: smithy_client_1.expectString,
2473
- MapName: smithy_client_1.expectString,
2474
- PricingPlan: smithy_client_1.expectString,
2475
- Tags: smithy_client_1._json,
2476
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2477
- });
2478
- Object.assign(contents, doc);
2479
- return contents;
2480
- };
2481
- exports.de_DescribeMapCommand = de_DescribeMapCommand;
2482
- const de_DescribeMapCommandError = async (output, context) => {
2483
- const parsedOutput = {
2484
- ...output,
2485
- body: await parseErrorBody(output.body, context),
2486
- };
2487
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2488
- switch (errorCode) {
2489
- case "AccessDeniedException":
2490
- case "com.amazonaws.location#AccessDeniedException":
2491
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2492
- case "InternalServerException":
2493
- case "com.amazonaws.location#InternalServerException":
2494
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2495
- case "ResourceNotFoundException":
2496
- case "com.amazonaws.location#ResourceNotFoundException":
2497
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2498
- case "ThrottlingException":
2499
- case "com.amazonaws.location#ThrottlingException":
2500
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2501
- case "ValidationException":
2502
- case "com.amazonaws.location#ValidationException":
2503
- throw await de_ValidationExceptionRes(parsedOutput, context);
2504
- default:
2505
- const parsedBody = parsedOutput.body;
2506
- return throwDefaultError({
2507
- output,
2508
- parsedBody,
2509
- errorCode,
2510
- });
2511
- }
2512
- };
2513
- const de_DescribePlaceIndexCommand = async (output, context) => {
2514
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2515
- return de_DescribePlaceIndexCommandError(output, context);
2516
- }
2517
- const contents = (0, smithy_client_1.map)({
2518
- $metadata: deserializeMetadata(output),
2519
- });
2520
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2521
- const doc = (0, smithy_client_1.take)(data, {
2522
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2523
- DataSource: smithy_client_1.expectString,
2524
- DataSourceConfiguration: smithy_client_1._json,
2525
- Description: smithy_client_1.expectString,
2526
- IndexArn: smithy_client_1.expectString,
2527
- IndexName: smithy_client_1.expectString,
2528
- PricingPlan: smithy_client_1.expectString,
2529
- Tags: smithy_client_1._json,
2530
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2531
- });
2532
- Object.assign(contents, doc);
2533
- return contents;
2534
- };
2535
- exports.de_DescribePlaceIndexCommand = de_DescribePlaceIndexCommand;
2536
- const de_DescribePlaceIndexCommandError = async (output, context) => {
2537
- const parsedOutput = {
2538
- ...output,
2539
- body: await parseErrorBody(output.body, context),
2540
- };
2541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2542
- switch (errorCode) {
2543
- case "AccessDeniedException":
2544
- case "com.amazonaws.location#AccessDeniedException":
2545
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2546
- case "InternalServerException":
2547
- case "com.amazonaws.location#InternalServerException":
2548
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2549
- case "ResourceNotFoundException":
2550
- case "com.amazonaws.location#ResourceNotFoundException":
2551
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2552
- case "ThrottlingException":
2553
- case "com.amazonaws.location#ThrottlingException":
2554
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2555
- case "ValidationException":
2556
- case "com.amazonaws.location#ValidationException":
2557
- throw await de_ValidationExceptionRes(parsedOutput, context);
2558
- default:
2559
- const parsedBody = parsedOutput.body;
2560
- return throwDefaultError({
2561
- output,
2562
- parsedBody,
2563
- errorCode,
2564
- });
2565
- }
2566
- };
2567
- const de_DescribeRouteCalculatorCommand = async (output, context) => {
2568
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2569
- return de_DescribeRouteCalculatorCommandError(output, context);
2570
- }
2571
- const contents = (0, smithy_client_1.map)({
2572
- $metadata: deserializeMetadata(output),
2573
- });
2574
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2575
- const doc = (0, smithy_client_1.take)(data, {
2576
- CalculatorArn: smithy_client_1.expectString,
2577
- CalculatorName: smithy_client_1.expectString,
2578
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2579
- DataSource: smithy_client_1.expectString,
2580
- Description: smithy_client_1.expectString,
2581
- PricingPlan: smithy_client_1.expectString,
2582
- Tags: smithy_client_1._json,
2583
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2584
- });
2585
- Object.assign(contents, doc);
2586
- return contents;
2587
- };
2588
- exports.de_DescribeRouteCalculatorCommand = de_DescribeRouteCalculatorCommand;
2589
- const de_DescribeRouteCalculatorCommandError = async (output, context) => {
2590
- const parsedOutput = {
2591
- ...output,
2592
- body: await parseErrorBody(output.body, context),
2593
- };
2594
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2595
- switch (errorCode) {
2596
- case "AccessDeniedException":
2597
- case "com.amazonaws.location#AccessDeniedException":
2598
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2599
- case "InternalServerException":
2600
- case "com.amazonaws.location#InternalServerException":
2601
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2602
- case "ResourceNotFoundException":
2603
- case "com.amazonaws.location#ResourceNotFoundException":
2604
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2605
- case "ThrottlingException":
2606
- case "com.amazonaws.location#ThrottlingException":
2607
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2608
- case "ValidationException":
2609
- case "com.amazonaws.location#ValidationException":
2610
- throw await de_ValidationExceptionRes(parsedOutput, context);
2611
- default:
2612
- const parsedBody = parsedOutput.body;
2613
- return throwDefaultError({
2614
- output,
2615
- parsedBody,
2616
- errorCode,
2617
- });
2618
- }
2619
- };
2620
- const de_DescribeTrackerCommand = async (output, context) => {
2621
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2622
- return de_DescribeTrackerCommandError(output, context);
2623
- }
2624
- const contents = (0, smithy_client_1.map)({
2625
- $metadata: deserializeMetadata(output),
2626
- });
2627
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2628
- const doc = (0, smithy_client_1.take)(data, {
2629
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2630
- Description: smithy_client_1.expectString,
2631
- EventBridgeEnabled: smithy_client_1.expectBoolean,
2632
- KmsKeyEnableGeospatialQueries: smithy_client_1.expectBoolean,
2633
- KmsKeyId: smithy_client_1.expectString,
2634
- PositionFiltering: smithy_client_1.expectString,
2635
- PricingPlan: smithy_client_1.expectString,
2636
- PricingPlanDataSource: smithy_client_1.expectString,
2637
- Tags: smithy_client_1._json,
2638
- TrackerArn: smithy_client_1.expectString,
2639
- TrackerName: smithy_client_1.expectString,
2640
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2641
- });
2642
- Object.assign(contents, doc);
2643
- return contents;
2644
- };
2645
- exports.de_DescribeTrackerCommand = de_DescribeTrackerCommand;
2646
- const de_DescribeTrackerCommandError = async (output, context) => {
2647
- const parsedOutput = {
2648
- ...output,
2649
- body: await parseErrorBody(output.body, context),
2650
- };
2651
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2652
- switch (errorCode) {
2653
- case "AccessDeniedException":
2654
- case "com.amazonaws.location#AccessDeniedException":
2655
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2656
- case "InternalServerException":
2657
- case "com.amazonaws.location#InternalServerException":
2658
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2659
- case "ResourceNotFoundException":
2660
- case "com.amazonaws.location#ResourceNotFoundException":
2661
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2662
- case "ThrottlingException":
2663
- case "com.amazonaws.location#ThrottlingException":
2664
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2665
- case "ValidationException":
2666
- case "com.amazonaws.location#ValidationException":
2667
- throw await de_ValidationExceptionRes(parsedOutput, context);
2668
- default:
2669
- const parsedBody = parsedOutput.body;
2670
- return throwDefaultError({
2671
- output,
2672
- parsedBody,
2673
- errorCode,
2674
- });
2675
- }
2676
- };
2677
- const de_DisassociateTrackerConsumerCommand = async (output, context) => {
2678
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2679
- return de_DisassociateTrackerConsumerCommandError(output, context);
2680
- }
2681
- const contents = (0, smithy_client_1.map)({
2682
- $metadata: deserializeMetadata(output),
2683
- });
2684
- await (0, smithy_client_1.collectBody)(output.body, context);
2685
- return contents;
2686
- };
2687
- exports.de_DisassociateTrackerConsumerCommand = de_DisassociateTrackerConsumerCommand;
2688
- const de_DisassociateTrackerConsumerCommandError = async (output, context) => {
2689
- const parsedOutput = {
2690
- ...output,
2691
- body: await parseErrorBody(output.body, context),
2692
- };
2693
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2694
- switch (errorCode) {
2695
- case "AccessDeniedException":
2696
- case "com.amazonaws.location#AccessDeniedException":
2697
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2698
- case "InternalServerException":
2699
- case "com.amazonaws.location#InternalServerException":
2700
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2701
- case "ResourceNotFoundException":
2702
- case "com.amazonaws.location#ResourceNotFoundException":
2703
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2704
- case "ThrottlingException":
2705
- case "com.amazonaws.location#ThrottlingException":
2706
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2707
- case "ValidationException":
2708
- case "com.amazonaws.location#ValidationException":
2709
- throw await de_ValidationExceptionRes(parsedOutput, context);
2710
- default:
2711
- const parsedBody = parsedOutput.body;
2712
- return throwDefaultError({
2713
- output,
2714
- parsedBody,
2715
- errorCode,
2716
- });
2717
- }
2718
- };
2719
- const de_GetDevicePositionCommand = async (output, context) => {
2720
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2721
- return de_GetDevicePositionCommandError(output, context);
2722
- }
2723
- const contents = (0, smithy_client_1.map)({
2724
- $metadata: deserializeMetadata(output),
2725
- });
2726
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2727
- const doc = (0, smithy_client_1.take)(data, {
2728
- Accuracy: (_) => de_PositionalAccuracy(_, context),
2729
- DeviceId: smithy_client_1.expectString,
2730
- Position: (_) => de_Position(_, context),
2731
- PositionProperties: smithy_client_1._json,
2732
- ReceivedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2733
- SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2734
- });
2735
- Object.assign(contents, doc);
2736
- return contents;
2737
- };
2738
- exports.de_GetDevicePositionCommand = de_GetDevicePositionCommand;
2739
- const de_GetDevicePositionCommandError = async (output, context) => {
2740
- const parsedOutput = {
2741
- ...output,
2742
- body: await parseErrorBody(output.body, context),
2743
- };
2744
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2745
- switch (errorCode) {
2746
- case "AccessDeniedException":
2747
- case "com.amazonaws.location#AccessDeniedException":
2748
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2749
- case "InternalServerException":
2750
- case "com.amazonaws.location#InternalServerException":
2751
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2752
- case "ResourceNotFoundException":
2753
- case "com.amazonaws.location#ResourceNotFoundException":
2754
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2755
- case "ThrottlingException":
2756
- case "com.amazonaws.location#ThrottlingException":
2757
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2758
- case "ValidationException":
2759
- case "com.amazonaws.location#ValidationException":
2760
- throw await de_ValidationExceptionRes(parsedOutput, context);
2761
- default:
2762
- const parsedBody = parsedOutput.body;
2763
- return throwDefaultError({
2764
- output,
2765
- parsedBody,
2766
- errorCode,
2767
- });
2768
- }
2769
- };
2770
- const de_GetDevicePositionHistoryCommand = async (output, context) => {
2771
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2772
- return de_GetDevicePositionHistoryCommandError(output, context);
2773
- }
2774
- const contents = (0, smithy_client_1.map)({
2775
- $metadata: deserializeMetadata(output),
2776
- });
2777
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2778
- const doc = (0, smithy_client_1.take)(data, {
2779
- DevicePositions: (_) => de_DevicePositionList(_, context),
2780
- NextToken: smithy_client_1.expectString,
2781
- });
2782
- Object.assign(contents, doc);
2783
- return contents;
2784
- };
2785
- exports.de_GetDevicePositionHistoryCommand = de_GetDevicePositionHistoryCommand;
2786
- const de_GetDevicePositionHistoryCommandError = async (output, context) => {
2787
- const parsedOutput = {
2788
- ...output,
2789
- body: await parseErrorBody(output.body, context),
2790
- };
2791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2792
- switch (errorCode) {
2793
- case "AccessDeniedException":
2794
- case "com.amazonaws.location#AccessDeniedException":
2795
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2796
- case "InternalServerException":
2797
- case "com.amazonaws.location#InternalServerException":
2798
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2799
- case "ResourceNotFoundException":
2800
- case "com.amazonaws.location#ResourceNotFoundException":
2801
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2802
- case "ThrottlingException":
2803
- case "com.amazonaws.location#ThrottlingException":
2804
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2805
- case "ValidationException":
2806
- case "com.amazonaws.location#ValidationException":
2807
- throw await de_ValidationExceptionRes(parsedOutput, context);
2808
- default:
2809
- const parsedBody = parsedOutput.body;
2810
- return throwDefaultError({
2811
- output,
2812
- parsedBody,
2813
- errorCode,
2814
- });
2815
- }
2816
- };
2817
- const de_GetGeofenceCommand = async (output, context) => {
2818
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2819
- return de_GetGeofenceCommandError(output, context);
2820
- }
2821
- const contents = (0, smithy_client_1.map)({
2822
- $metadata: deserializeMetadata(output),
2823
- });
2824
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2825
- const doc = (0, smithy_client_1.take)(data, {
2826
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2827
- GeofenceId: smithy_client_1.expectString,
2828
- GeofenceProperties: smithy_client_1._json,
2829
- Geometry: (_) => de_GeofenceGeometry(_, context),
2830
- Status: smithy_client_1.expectString,
2831
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2832
- });
2833
- Object.assign(contents, doc);
2834
- return contents;
2835
- };
2836
- exports.de_GetGeofenceCommand = de_GetGeofenceCommand;
2837
- const de_GetGeofenceCommandError = async (output, context) => {
2838
- const parsedOutput = {
2839
- ...output,
2840
- body: await parseErrorBody(output.body, context),
2841
- };
2842
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2843
- switch (errorCode) {
2844
- case "AccessDeniedException":
2845
- case "com.amazonaws.location#AccessDeniedException":
2846
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2847
- case "InternalServerException":
2848
- case "com.amazonaws.location#InternalServerException":
2849
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2850
- case "ResourceNotFoundException":
2851
- case "com.amazonaws.location#ResourceNotFoundException":
2852
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2853
- case "ThrottlingException":
2854
- case "com.amazonaws.location#ThrottlingException":
2855
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2856
- case "ValidationException":
2857
- case "com.amazonaws.location#ValidationException":
2858
- throw await de_ValidationExceptionRes(parsedOutput, context);
2859
- default:
2860
- const parsedBody = parsedOutput.body;
2861
- return throwDefaultError({
2862
- output,
2863
- parsedBody,
2864
- errorCode,
2865
- });
2866
- }
2867
- };
2868
- const de_GetMapGlyphsCommand = async (output, context) => {
2869
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2870
- return de_GetMapGlyphsCommandError(output, context);
2871
- }
2872
- const contents = (0, smithy_client_1.map)({
2873
- $metadata: deserializeMetadata(output),
2874
- [_CT]: [, output.headers[_ct]],
2875
- [_CC]: [, output.headers[_cc]],
2876
- });
2877
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
2878
- contents.Blob = data;
2879
- return contents;
2880
- };
2881
- exports.de_GetMapGlyphsCommand = de_GetMapGlyphsCommand;
2882
- const de_GetMapGlyphsCommandError = async (output, context) => {
2883
- const parsedOutput = {
2884
- ...output,
2885
- body: await parseErrorBody(output.body, context),
2886
- };
2887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2888
- switch (errorCode) {
2889
- case "AccessDeniedException":
2890
- case "com.amazonaws.location#AccessDeniedException":
2891
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2892
- case "InternalServerException":
2893
- case "com.amazonaws.location#InternalServerException":
2894
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2895
- case "ResourceNotFoundException":
2896
- case "com.amazonaws.location#ResourceNotFoundException":
2897
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2898
- case "ThrottlingException":
2899
- case "com.amazonaws.location#ThrottlingException":
2900
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2901
- case "ValidationException":
2902
- case "com.amazonaws.location#ValidationException":
2903
- throw await de_ValidationExceptionRes(parsedOutput, context);
2904
- default:
2905
- const parsedBody = parsedOutput.body;
2906
- return throwDefaultError({
2907
- output,
2908
- parsedBody,
2909
- errorCode,
2910
- });
2911
- }
2912
- };
2913
- const de_GetMapSpritesCommand = async (output, context) => {
2914
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2915
- return de_GetMapSpritesCommandError(output, context);
2916
- }
2917
- const contents = (0, smithy_client_1.map)({
2918
- $metadata: deserializeMetadata(output),
2919
- [_CT]: [, output.headers[_ct]],
2920
- [_CC]: [, output.headers[_cc]],
2921
- });
2922
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
2923
- contents.Blob = data;
2924
- return contents;
2925
- };
2926
- exports.de_GetMapSpritesCommand = de_GetMapSpritesCommand;
2927
- const de_GetMapSpritesCommandError = async (output, context) => {
2928
- const parsedOutput = {
2929
- ...output,
2930
- body: await parseErrorBody(output.body, context),
2931
- };
2932
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2933
- switch (errorCode) {
2934
- case "AccessDeniedException":
2935
- case "com.amazonaws.location#AccessDeniedException":
2936
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2937
- case "InternalServerException":
2938
- case "com.amazonaws.location#InternalServerException":
2939
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2940
- case "ResourceNotFoundException":
2941
- case "com.amazonaws.location#ResourceNotFoundException":
2942
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2943
- case "ThrottlingException":
2944
- case "com.amazonaws.location#ThrottlingException":
2945
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2946
- case "ValidationException":
2947
- case "com.amazonaws.location#ValidationException":
2948
- throw await de_ValidationExceptionRes(parsedOutput, context);
2949
- default:
2950
- const parsedBody = parsedOutput.body;
2951
- return throwDefaultError({
2952
- output,
2953
- parsedBody,
2954
- errorCode,
2955
- });
2956
- }
2957
- };
2958
- const de_GetMapStyleDescriptorCommand = async (output, context) => {
2959
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2960
- return de_GetMapStyleDescriptorCommandError(output, context);
2961
- }
2962
- const contents = (0, smithy_client_1.map)({
2963
- $metadata: deserializeMetadata(output),
2964
- [_CT]: [, output.headers[_ct]],
2965
- [_CC]: [, output.headers[_cc]],
2966
- });
2967
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
2968
- contents.Blob = data;
2969
- return contents;
2970
- };
2971
- exports.de_GetMapStyleDescriptorCommand = de_GetMapStyleDescriptorCommand;
2972
- const de_GetMapStyleDescriptorCommandError = async (output, context) => {
2973
- const parsedOutput = {
2974
- ...output,
2975
- body: await parseErrorBody(output.body, context),
2976
- };
2977
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2978
- switch (errorCode) {
2979
- case "AccessDeniedException":
2980
- case "com.amazonaws.location#AccessDeniedException":
2981
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2982
- case "InternalServerException":
2983
- case "com.amazonaws.location#InternalServerException":
2984
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2985
- case "ResourceNotFoundException":
2986
- case "com.amazonaws.location#ResourceNotFoundException":
2987
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2988
- case "ThrottlingException":
2989
- case "com.amazonaws.location#ThrottlingException":
2990
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2991
- case "ValidationException":
2992
- case "com.amazonaws.location#ValidationException":
2993
- throw await de_ValidationExceptionRes(parsedOutput, context);
2994
- default:
2995
- const parsedBody = parsedOutput.body;
2996
- return throwDefaultError({
2997
- output,
2998
- parsedBody,
2999
- errorCode,
3000
- });
3001
- }
3002
- };
3003
- const de_GetMapTileCommand = async (output, context) => {
3004
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3005
- return de_GetMapTileCommandError(output, context);
3006
- }
3007
- const contents = (0, smithy_client_1.map)({
3008
- $metadata: deserializeMetadata(output),
3009
- [_CT]: [, output.headers[_ct]],
3010
- [_CC]: [, output.headers[_cc]],
3011
- });
3012
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
3013
- contents.Blob = data;
3014
- return contents;
3015
- };
3016
- exports.de_GetMapTileCommand = de_GetMapTileCommand;
3017
- const de_GetMapTileCommandError = async (output, context) => {
3018
- const parsedOutput = {
3019
- ...output,
3020
- body: await parseErrorBody(output.body, context),
3021
- };
3022
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3023
- switch (errorCode) {
3024
- case "AccessDeniedException":
3025
- case "com.amazonaws.location#AccessDeniedException":
3026
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3027
- case "InternalServerException":
3028
- case "com.amazonaws.location#InternalServerException":
3029
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3030
- case "ResourceNotFoundException":
3031
- case "com.amazonaws.location#ResourceNotFoundException":
3032
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3033
- case "ThrottlingException":
3034
- case "com.amazonaws.location#ThrottlingException":
3035
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3036
- case "ValidationException":
3037
- case "com.amazonaws.location#ValidationException":
3038
- throw await de_ValidationExceptionRes(parsedOutput, context);
3039
- default:
3040
- const parsedBody = parsedOutput.body;
3041
- return throwDefaultError({
3042
- output,
3043
- parsedBody,
3044
- errorCode,
3045
- });
3046
- }
3047
- };
3048
- const de_GetPlaceCommand = async (output, context) => {
3049
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3050
- return de_GetPlaceCommandError(output, context);
3051
- }
3052
- const contents = (0, smithy_client_1.map)({
3053
- $metadata: deserializeMetadata(output),
3054
- });
3055
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3056
- const doc = (0, smithy_client_1.take)(data, {
3057
- Place: (_) => de_Place(_, context),
3058
- });
3059
- Object.assign(contents, doc);
3060
- return contents;
3061
- };
3062
- exports.de_GetPlaceCommand = de_GetPlaceCommand;
3063
- const de_GetPlaceCommandError = async (output, context) => {
3064
- const parsedOutput = {
3065
- ...output,
3066
- body: await parseErrorBody(output.body, context),
3067
- };
3068
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3069
- switch (errorCode) {
3070
- case "AccessDeniedException":
3071
- case "com.amazonaws.location#AccessDeniedException":
3072
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3073
- case "InternalServerException":
3074
- case "com.amazonaws.location#InternalServerException":
3075
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3076
- case "ResourceNotFoundException":
3077
- case "com.amazonaws.location#ResourceNotFoundException":
3078
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3079
- case "ThrottlingException":
3080
- case "com.amazonaws.location#ThrottlingException":
3081
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3082
- case "ValidationException":
3083
- case "com.amazonaws.location#ValidationException":
3084
- throw await de_ValidationExceptionRes(parsedOutput, context);
3085
- default:
3086
- const parsedBody = parsedOutput.body;
3087
- return throwDefaultError({
3088
- output,
3089
- parsedBody,
3090
- errorCode,
3091
- });
3092
- }
3093
- };
3094
- const de_ListDevicePositionsCommand = async (output, context) => {
3095
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3096
- return de_ListDevicePositionsCommandError(output, context);
3097
- }
3098
- const contents = (0, smithy_client_1.map)({
3099
- $metadata: deserializeMetadata(output),
3100
- });
3101
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3102
- const doc = (0, smithy_client_1.take)(data, {
3103
- Entries: (_) => de_ListDevicePositionsResponseEntryList(_, context),
3104
- NextToken: smithy_client_1.expectString,
3105
- });
3106
- Object.assign(contents, doc);
3107
- return contents;
3108
- };
3109
- exports.de_ListDevicePositionsCommand = de_ListDevicePositionsCommand;
3110
- const de_ListDevicePositionsCommandError = async (output, context) => {
3111
- const parsedOutput = {
3112
- ...output,
3113
- body: await parseErrorBody(output.body, context),
3114
- };
3115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3116
- switch (errorCode) {
3117
- case "AccessDeniedException":
3118
- case "com.amazonaws.location#AccessDeniedException":
3119
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3120
- case "InternalServerException":
3121
- case "com.amazonaws.location#InternalServerException":
3122
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3123
- case "ThrottlingException":
3124
- case "com.amazonaws.location#ThrottlingException":
3125
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3126
- case "ValidationException":
3127
- case "com.amazonaws.location#ValidationException":
3128
- throw await de_ValidationExceptionRes(parsedOutput, context);
3129
- default:
3130
- const parsedBody = parsedOutput.body;
3131
- return throwDefaultError({
3132
- output,
3133
- parsedBody,
3134
- errorCode,
3135
- });
3136
- }
3137
- };
3138
- const de_ListGeofenceCollectionsCommand = async (output, context) => {
3139
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3140
- return de_ListGeofenceCollectionsCommandError(output, context);
3141
- }
3142
- const contents = (0, smithy_client_1.map)({
3143
- $metadata: deserializeMetadata(output),
3144
- });
3145
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3146
- const doc = (0, smithy_client_1.take)(data, {
3147
- Entries: (_) => de_ListGeofenceCollectionsResponseEntryList(_, context),
3148
- NextToken: smithy_client_1.expectString,
3149
- });
3150
- Object.assign(contents, doc);
3151
- return contents;
3152
- };
3153
- exports.de_ListGeofenceCollectionsCommand = de_ListGeofenceCollectionsCommand;
3154
- const de_ListGeofenceCollectionsCommandError = async (output, context) => {
3155
- const parsedOutput = {
3156
- ...output,
3157
- body: await parseErrorBody(output.body, context),
3158
- };
3159
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3160
- switch (errorCode) {
3161
- case "AccessDeniedException":
3162
- case "com.amazonaws.location#AccessDeniedException":
3163
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3164
- case "InternalServerException":
3165
- case "com.amazonaws.location#InternalServerException":
3166
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3167
- case "ThrottlingException":
3168
- case "com.amazonaws.location#ThrottlingException":
3169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3170
- case "ValidationException":
3171
- case "com.amazonaws.location#ValidationException":
3172
- throw await de_ValidationExceptionRes(parsedOutput, context);
3173
- default:
3174
- const parsedBody = parsedOutput.body;
3175
- return throwDefaultError({
3176
- output,
3177
- parsedBody,
3178
- errorCode,
3179
- });
3180
- }
3181
- };
3182
- const de_ListGeofencesCommand = async (output, context) => {
3183
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3184
- return de_ListGeofencesCommandError(output, context);
3185
- }
3186
- const contents = (0, smithy_client_1.map)({
3187
- $metadata: deserializeMetadata(output),
3188
- });
3189
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3190
- const doc = (0, smithy_client_1.take)(data, {
3191
- Entries: (_) => de_ListGeofenceResponseEntryList(_, context),
3192
- NextToken: smithy_client_1.expectString,
3193
- });
3194
- Object.assign(contents, doc);
3195
- return contents;
3196
- };
3197
- exports.de_ListGeofencesCommand = de_ListGeofencesCommand;
3198
- const de_ListGeofencesCommandError = async (output, context) => {
3199
- const parsedOutput = {
3200
- ...output,
3201
- body: await parseErrorBody(output.body, context),
3202
- };
3203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3204
- switch (errorCode) {
3205
- case "AccessDeniedException":
3206
- case "com.amazonaws.location#AccessDeniedException":
3207
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3208
- case "InternalServerException":
3209
- case "com.amazonaws.location#InternalServerException":
3210
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3211
- case "ResourceNotFoundException":
3212
- case "com.amazonaws.location#ResourceNotFoundException":
3213
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3214
- case "ThrottlingException":
3215
- case "com.amazonaws.location#ThrottlingException":
3216
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3217
- case "ValidationException":
3218
- case "com.amazonaws.location#ValidationException":
3219
- throw await de_ValidationExceptionRes(parsedOutput, context);
3220
- default:
3221
- const parsedBody = parsedOutput.body;
3222
- return throwDefaultError({
3223
- output,
3224
- parsedBody,
3225
- errorCode,
3226
- });
3227
- }
3228
- };
3229
- const de_ListKeysCommand = async (output, context) => {
3230
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3231
- return de_ListKeysCommandError(output, context);
3232
- }
3233
- const contents = (0, smithy_client_1.map)({
3234
- $metadata: deserializeMetadata(output),
3235
- });
3236
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3237
- const doc = (0, smithy_client_1.take)(data, {
3238
- Entries: (_) => de_ListKeysResponseEntryList(_, context),
3239
- NextToken: smithy_client_1.expectString,
3240
- });
3241
- Object.assign(contents, doc);
3242
- return contents;
3243
- };
3244
- exports.de_ListKeysCommand = de_ListKeysCommand;
3245
- const de_ListKeysCommandError = async (output, context) => {
3246
- const parsedOutput = {
3247
- ...output,
3248
- body: await parseErrorBody(output.body, context),
3249
- };
3250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3251
- switch (errorCode) {
3252
- case "AccessDeniedException":
3253
- case "com.amazonaws.location#AccessDeniedException":
3254
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3255
- case "InternalServerException":
3256
- case "com.amazonaws.location#InternalServerException":
3257
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3258
- case "ThrottlingException":
3259
- case "com.amazonaws.location#ThrottlingException":
3260
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3261
- case "ValidationException":
3262
- case "com.amazonaws.location#ValidationException":
3263
- throw await de_ValidationExceptionRes(parsedOutput, context);
3264
- default:
3265
- const parsedBody = parsedOutput.body;
3266
- return throwDefaultError({
3267
- output,
3268
- parsedBody,
3269
- errorCode,
3270
- });
3271
- }
3272
- };
3273
- const de_ListMapsCommand = async (output, context) => {
3274
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3275
- return de_ListMapsCommandError(output, context);
3276
- }
3277
- const contents = (0, smithy_client_1.map)({
3278
- $metadata: deserializeMetadata(output),
3279
- });
3280
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3281
- const doc = (0, smithy_client_1.take)(data, {
3282
- Entries: (_) => de_ListMapsResponseEntryList(_, context),
3283
- NextToken: smithy_client_1.expectString,
3284
- });
3285
- Object.assign(contents, doc);
3286
- return contents;
3287
- };
3288
- exports.de_ListMapsCommand = de_ListMapsCommand;
3289
- const de_ListMapsCommandError = async (output, context) => {
3290
- const parsedOutput = {
3291
- ...output,
3292
- body: await parseErrorBody(output.body, context),
3293
- };
3294
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3295
- switch (errorCode) {
3296
- case "AccessDeniedException":
3297
- case "com.amazonaws.location#AccessDeniedException":
3298
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3299
- case "InternalServerException":
3300
- case "com.amazonaws.location#InternalServerException":
3301
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3302
- case "ThrottlingException":
3303
- case "com.amazonaws.location#ThrottlingException":
3304
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3305
- case "ValidationException":
3306
- case "com.amazonaws.location#ValidationException":
3307
- throw await de_ValidationExceptionRes(parsedOutput, context);
3308
- default:
3309
- const parsedBody = parsedOutput.body;
3310
- return throwDefaultError({
3311
- output,
3312
- parsedBody,
3313
- errorCode,
3314
- });
3315
- }
3316
- };
3317
- const de_ListPlaceIndexesCommand = async (output, context) => {
3318
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3319
- return de_ListPlaceIndexesCommandError(output, context);
3320
- }
3321
- const contents = (0, smithy_client_1.map)({
3322
- $metadata: deserializeMetadata(output),
3323
- });
3324
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3325
- const doc = (0, smithy_client_1.take)(data, {
3326
- Entries: (_) => de_ListPlaceIndexesResponseEntryList(_, context),
3327
- NextToken: smithy_client_1.expectString,
3328
- });
3329
- Object.assign(contents, doc);
3330
- return contents;
3331
- };
3332
- exports.de_ListPlaceIndexesCommand = de_ListPlaceIndexesCommand;
3333
- const de_ListPlaceIndexesCommandError = async (output, context) => {
3334
- const parsedOutput = {
3335
- ...output,
3336
- body: await parseErrorBody(output.body, context),
3337
- };
3338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3339
- switch (errorCode) {
3340
- case "AccessDeniedException":
3341
- case "com.amazonaws.location#AccessDeniedException":
3342
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3343
- case "InternalServerException":
3344
- case "com.amazonaws.location#InternalServerException":
3345
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3346
- case "ThrottlingException":
3347
- case "com.amazonaws.location#ThrottlingException":
3348
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3349
- case "ValidationException":
3350
- case "com.amazonaws.location#ValidationException":
3351
- throw await de_ValidationExceptionRes(parsedOutput, context);
3352
- default:
3353
- const parsedBody = parsedOutput.body;
3354
- return throwDefaultError({
3355
- output,
3356
- parsedBody,
3357
- errorCode,
3358
- });
3359
- }
3360
- };
3361
- const de_ListRouteCalculatorsCommand = async (output, context) => {
3362
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3363
- return de_ListRouteCalculatorsCommandError(output, context);
3364
- }
3365
- const contents = (0, smithy_client_1.map)({
3366
- $metadata: deserializeMetadata(output),
3367
- });
3368
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3369
- const doc = (0, smithy_client_1.take)(data, {
3370
- Entries: (_) => de_ListRouteCalculatorsResponseEntryList(_, context),
3371
- NextToken: smithy_client_1.expectString,
3372
- });
3373
- Object.assign(contents, doc);
3374
- return contents;
3375
- };
3376
- exports.de_ListRouteCalculatorsCommand = de_ListRouteCalculatorsCommand;
3377
- const de_ListRouteCalculatorsCommandError = async (output, context) => {
3378
- const parsedOutput = {
3379
- ...output,
3380
- body: await parseErrorBody(output.body, context),
3381
- };
3382
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3383
- switch (errorCode) {
3384
- case "AccessDeniedException":
3385
- case "com.amazonaws.location#AccessDeniedException":
3386
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3387
- case "InternalServerException":
3388
- case "com.amazonaws.location#InternalServerException":
3389
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3390
- case "ThrottlingException":
3391
- case "com.amazonaws.location#ThrottlingException":
3392
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3393
- case "ValidationException":
3394
- case "com.amazonaws.location#ValidationException":
3395
- throw await de_ValidationExceptionRes(parsedOutput, context);
3396
- default:
3397
- const parsedBody = parsedOutput.body;
3398
- return throwDefaultError({
3399
- output,
3400
- parsedBody,
3401
- errorCode,
3402
- });
3403
- }
3404
- };
3405
- const de_ListTagsForResourceCommand = async (output, context) => {
3406
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3407
- return de_ListTagsForResourceCommandError(output, context);
3408
- }
3409
- const contents = (0, smithy_client_1.map)({
3410
- $metadata: deserializeMetadata(output),
3411
- });
3412
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3413
- const doc = (0, smithy_client_1.take)(data, {
3414
- Tags: smithy_client_1._json,
3415
- });
3416
- Object.assign(contents, doc);
3417
- return contents;
3418
- };
3419
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
3420
- const de_ListTagsForResourceCommandError = async (output, context) => {
3421
- const parsedOutput = {
3422
- ...output,
3423
- body: await parseErrorBody(output.body, context),
3424
- };
3425
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3426
- switch (errorCode) {
3427
- case "AccessDeniedException":
3428
- case "com.amazonaws.location#AccessDeniedException":
3429
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3430
- case "InternalServerException":
3431
- case "com.amazonaws.location#InternalServerException":
3432
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3433
- case "ResourceNotFoundException":
3434
- case "com.amazonaws.location#ResourceNotFoundException":
3435
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3436
- case "ThrottlingException":
3437
- case "com.amazonaws.location#ThrottlingException":
3438
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3439
- case "ValidationException":
3440
- case "com.amazonaws.location#ValidationException":
3441
- throw await de_ValidationExceptionRes(parsedOutput, context);
3442
- default:
3443
- const parsedBody = parsedOutput.body;
3444
- return throwDefaultError({
3445
- output,
3446
- parsedBody,
3447
- errorCode,
3448
- });
3449
- }
3450
- };
3451
- const de_ListTrackerConsumersCommand = async (output, context) => {
3452
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3453
- return de_ListTrackerConsumersCommandError(output, context);
3454
- }
3455
- const contents = (0, smithy_client_1.map)({
3456
- $metadata: deserializeMetadata(output),
3457
- });
3458
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3459
- const doc = (0, smithy_client_1.take)(data, {
3460
- ConsumerArns: smithy_client_1._json,
3461
- NextToken: smithy_client_1.expectString,
3462
- });
3463
- Object.assign(contents, doc);
3464
- return contents;
3465
- };
3466
- exports.de_ListTrackerConsumersCommand = de_ListTrackerConsumersCommand;
3467
- const de_ListTrackerConsumersCommandError = async (output, context) => {
3468
- const parsedOutput = {
3469
- ...output,
3470
- body: await parseErrorBody(output.body, context),
3471
- };
3472
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3473
- switch (errorCode) {
3474
- case "AccessDeniedException":
3475
- case "com.amazonaws.location#AccessDeniedException":
3476
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3477
- case "InternalServerException":
3478
- case "com.amazonaws.location#InternalServerException":
3479
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3480
- case "ResourceNotFoundException":
3481
- case "com.amazonaws.location#ResourceNotFoundException":
3482
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3483
- case "ThrottlingException":
3484
- case "com.amazonaws.location#ThrottlingException":
3485
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3486
- case "ValidationException":
3487
- case "com.amazonaws.location#ValidationException":
3488
- throw await de_ValidationExceptionRes(parsedOutput, context);
3489
- default:
3490
- const parsedBody = parsedOutput.body;
3491
- return throwDefaultError({
3492
- output,
3493
- parsedBody,
3494
- errorCode,
3495
- });
3496
- }
3497
- };
3498
- const de_ListTrackersCommand = async (output, context) => {
3499
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3500
- return de_ListTrackersCommandError(output, context);
3501
- }
3502
- const contents = (0, smithy_client_1.map)({
3503
- $metadata: deserializeMetadata(output),
3504
- });
3505
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3506
- const doc = (0, smithy_client_1.take)(data, {
3507
- Entries: (_) => de_ListTrackersResponseEntryList(_, context),
3508
- NextToken: smithy_client_1.expectString,
3509
- });
3510
- Object.assign(contents, doc);
3511
- return contents;
3512
- };
3513
- exports.de_ListTrackersCommand = de_ListTrackersCommand;
3514
- const de_ListTrackersCommandError = async (output, context) => {
3515
- const parsedOutput = {
3516
- ...output,
3517
- body: await parseErrorBody(output.body, context),
3518
- };
3519
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3520
- switch (errorCode) {
3521
- case "AccessDeniedException":
3522
- case "com.amazonaws.location#AccessDeniedException":
3523
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3524
- case "InternalServerException":
3525
- case "com.amazonaws.location#InternalServerException":
3526
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3527
- case "ThrottlingException":
3528
- case "com.amazonaws.location#ThrottlingException":
3529
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3530
- case "ValidationException":
3531
- case "com.amazonaws.location#ValidationException":
3532
- throw await de_ValidationExceptionRes(parsedOutput, context);
3533
- default:
3534
- const parsedBody = parsedOutput.body;
3535
- return throwDefaultError({
3536
- output,
3537
- parsedBody,
3538
- errorCode,
3539
- });
3540
- }
3541
- };
3542
- const de_PutGeofenceCommand = async (output, context) => {
3543
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3544
- return de_PutGeofenceCommandError(output, context);
3545
- }
3546
- const contents = (0, smithy_client_1.map)({
3547
- $metadata: deserializeMetadata(output),
3548
- });
3549
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3550
- const doc = (0, smithy_client_1.take)(data, {
3551
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3552
- GeofenceId: smithy_client_1.expectString,
3553
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3554
- });
3555
- Object.assign(contents, doc);
3556
- return contents;
3557
- };
3558
- exports.de_PutGeofenceCommand = de_PutGeofenceCommand;
3559
- const de_PutGeofenceCommandError = async (output, context) => {
3560
- const parsedOutput = {
3561
- ...output,
3562
- body: await parseErrorBody(output.body, context),
3563
- };
3564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3565
- switch (errorCode) {
3566
- case "AccessDeniedException":
3567
- case "com.amazonaws.location#AccessDeniedException":
3568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3569
- case "ConflictException":
3570
- case "com.amazonaws.location#ConflictException":
3571
- throw await de_ConflictExceptionRes(parsedOutput, context);
3572
- case "InternalServerException":
3573
- case "com.amazonaws.location#InternalServerException":
3574
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3575
- case "ResourceNotFoundException":
3576
- case "com.amazonaws.location#ResourceNotFoundException":
3577
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3578
- case "ThrottlingException":
3579
- case "com.amazonaws.location#ThrottlingException":
3580
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3581
- case "ValidationException":
3582
- case "com.amazonaws.location#ValidationException":
3583
- throw await de_ValidationExceptionRes(parsedOutput, context);
3584
- default:
3585
- const parsedBody = parsedOutput.body;
3586
- return throwDefaultError({
3587
- output,
3588
- parsedBody,
3589
- errorCode,
3590
- });
3591
- }
3592
- };
3593
- const de_SearchPlaceIndexForPositionCommand = async (output, context) => {
3594
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3595
- return de_SearchPlaceIndexForPositionCommandError(output, context);
3596
- }
3597
- const contents = (0, smithy_client_1.map)({
3598
- $metadata: deserializeMetadata(output),
3599
- });
3600
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3601
- const doc = (0, smithy_client_1.take)(data, {
3602
- Results: (_) => de_SearchForPositionResultList(_, context),
3603
- Summary: (_) => de_SearchPlaceIndexForPositionSummary(_, context),
3604
- });
3605
- Object.assign(contents, doc);
3606
- return contents;
3607
- };
3608
- exports.de_SearchPlaceIndexForPositionCommand = de_SearchPlaceIndexForPositionCommand;
3609
- const de_SearchPlaceIndexForPositionCommandError = async (output, context) => {
3610
- const parsedOutput = {
3611
- ...output,
3612
- body: await parseErrorBody(output.body, context),
3613
- };
3614
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3615
- switch (errorCode) {
3616
- case "AccessDeniedException":
3617
- case "com.amazonaws.location#AccessDeniedException":
3618
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3619
- case "InternalServerException":
3620
- case "com.amazonaws.location#InternalServerException":
3621
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3622
- case "ResourceNotFoundException":
3623
- case "com.amazonaws.location#ResourceNotFoundException":
3624
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3625
- case "ThrottlingException":
3626
- case "com.amazonaws.location#ThrottlingException":
3627
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3628
- case "ValidationException":
3629
- case "com.amazonaws.location#ValidationException":
3630
- throw await de_ValidationExceptionRes(parsedOutput, context);
3631
- default:
3632
- const parsedBody = parsedOutput.body;
3633
- return throwDefaultError({
3634
- output,
3635
- parsedBody,
3636
- errorCode,
3637
- });
3638
- }
3639
- };
3640
- const de_SearchPlaceIndexForSuggestionsCommand = async (output, context) => {
3641
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3642
- return de_SearchPlaceIndexForSuggestionsCommandError(output, context);
3643
- }
3644
- const contents = (0, smithy_client_1.map)({
3645
- $metadata: deserializeMetadata(output),
3646
- });
3647
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3648
- const doc = (0, smithy_client_1.take)(data, {
3649
- Results: smithy_client_1._json,
3650
- Summary: (_) => de_SearchPlaceIndexForSuggestionsSummary(_, context),
3651
- });
3652
- Object.assign(contents, doc);
3653
- return contents;
3654
- };
3655
- exports.de_SearchPlaceIndexForSuggestionsCommand = de_SearchPlaceIndexForSuggestionsCommand;
3656
- const de_SearchPlaceIndexForSuggestionsCommandError = async (output, context) => {
3657
- const parsedOutput = {
3658
- ...output,
3659
- body: await parseErrorBody(output.body, context),
3660
- };
3661
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3662
- switch (errorCode) {
3663
- case "AccessDeniedException":
3664
- case "com.amazonaws.location#AccessDeniedException":
3665
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3666
- case "InternalServerException":
3667
- case "com.amazonaws.location#InternalServerException":
3668
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3669
- case "ResourceNotFoundException":
3670
- case "com.amazonaws.location#ResourceNotFoundException":
3671
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3672
- case "ThrottlingException":
3673
- case "com.amazonaws.location#ThrottlingException":
3674
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3675
- case "ValidationException":
3676
- case "com.amazonaws.location#ValidationException":
3677
- throw await de_ValidationExceptionRes(parsedOutput, context);
3678
- default:
3679
- const parsedBody = parsedOutput.body;
3680
- return throwDefaultError({
3681
- output,
3682
- parsedBody,
3683
- errorCode,
3684
- });
3685
- }
3686
- };
3687
- const de_SearchPlaceIndexForTextCommand = async (output, context) => {
3688
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3689
- return de_SearchPlaceIndexForTextCommandError(output, context);
3690
- }
3691
- const contents = (0, smithy_client_1.map)({
3692
- $metadata: deserializeMetadata(output),
3693
- });
3694
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3695
- const doc = (0, smithy_client_1.take)(data, {
3696
- Results: (_) => de_SearchForTextResultList(_, context),
3697
- Summary: (_) => de_SearchPlaceIndexForTextSummary(_, context),
3698
- });
3699
- Object.assign(contents, doc);
3700
- return contents;
3701
- };
3702
- exports.de_SearchPlaceIndexForTextCommand = de_SearchPlaceIndexForTextCommand;
3703
- const de_SearchPlaceIndexForTextCommandError = async (output, context) => {
3704
- const parsedOutput = {
3705
- ...output,
3706
- body: await parseErrorBody(output.body, context),
3707
- };
3708
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3709
- switch (errorCode) {
3710
- case "AccessDeniedException":
3711
- case "com.amazonaws.location#AccessDeniedException":
3712
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3713
- case "InternalServerException":
3714
- case "com.amazonaws.location#InternalServerException":
3715
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3716
- case "ResourceNotFoundException":
3717
- case "com.amazonaws.location#ResourceNotFoundException":
3718
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3719
- case "ThrottlingException":
3720
- case "com.amazonaws.location#ThrottlingException":
3721
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3722
- case "ValidationException":
3723
- case "com.amazonaws.location#ValidationException":
3724
- throw await de_ValidationExceptionRes(parsedOutput, context);
3725
- default:
3726
- const parsedBody = parsedOutput.body;
3727
- return throwDefaultError({
3728
- output,
3729
- parsedBody,
3730
- errorCode,
3731
- });
3732
- }
3733
- };
3734
- const de_TagResourceCommand = async (output, context) => {
3735
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3736
- return de_TagResourceCommandError(output, context);
3737
- }
3738
- const contents = (0, smithy_client_1.map)({
3739
- $metadata: deserializeMetadata(output),
3740
- });
3741
- await (0, smithy_client_1.collectBody)(output.body, context);
3742
- return contents;
3743
- };
3744
- exports.de_TagResourceCommand = de_TagResourceCommand;
3745
- const de_TagResourceCommandError = async (output, context) => {
3746
- const parsedOutput = {
3747
- ...output,
3748
- body: await parseErrorBody(output.body, context),
3749
- };
3750
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3751
- switch (errorCode) {
3752
- case "AccessDeniedException":
3753
- case "com.amazonaws.location#AccessDeniedException":
3754
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3755
- case "InternalServerException":
3756
- case "com.amazonaws.location#InternalServerException":
3757
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3758
- case "ResourceNotFoundException":
3759
- case "com.amazonaws.location#ResourceNotFoundException":
3760
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3761
- case "ThrottlingException":
3762
- case "com.amazonaws.location#ThrottlingException":
3763
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3764
- case "ValidationException":
3765
- case "com.amazonaws.location#ValidationException":
3766
- throw await de_ValidationExceptionRes(parsedOutput, context);
3767
- default:
3768
- const parsedBody = parsedOutput.body;
3769
- return throwDefaultError({
3770
- output,
3771
- parsedBody,
3772
- errorCode,
3773
- });
3774
- }
3775
- };
3776
- const de_UntagResourceCommand = async (output, context) => {
3777
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3778
- return de_UntagResourceCommandError(output, context);
3779
- }
3780
- const contents = (0, smithy_client_1.map)({
3781
- $metadata: deserializeMetadata(output),
3782
- });
3783
- await (0, smithy_client_1.collectBody)(output.body, context);
3784
- return contents;
3785
- };
3786
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
3787
- const de_UntagResourceCommandError = async (output, context) => {
3788
- const parsedOutput = {
3789
- ...output,
3790
- body: await parseErrorBody(output.body, context),
3791
- };
3792
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3793
- switch (errorCode) {
3794
- case "AccessDeniedException":
3795
- case "com.amazonaws.location#AccessDeniedException":
3796
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3797
- case "InternalServerException":
3798
- case "com.amazonaws.location#InternalServerException":
3799
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3800
- case "ResourceNotFoundException":
3801
- case "com.amazonaws.location#ResourceNotFoundException":
3802
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3803
- case "ThrottlingException":
3804
- case "com.amazonaws.location#ThrottlingException":
3805
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3806
- case "ValidationException":
3807
- case "com.amazonaws.location#ValidationException":
3808
- throw await de_ValidationExceptionRes(parsedOutput, context);
3809
- default:
3810
- const parsedBody = parsedOutput.body;
3811
- return throwDefaultError({
3812
- output,
3813
- parsedBody,
3814
- errorCode,
3815
- });
3816
- }
3817
- };
3818
- const de_UpdateGeofenceCollectionCommand = async (output, context) => {
3819
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3820
- return de_UpdateGeofenceCollectionCommandError(output, context);
3821
- }
3822
- const contents = (0, smithy_client_1.map)({
3823
- $metadata: deserializeMetadata(output),
3824
- });
3825
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3826
- const doc = (0, smithy_client_1.take)(data, {
3827
- CollectionArn: smithy_client_1.expectString,
3828
- CollectionName: smithy_client_1.expectString,
3829
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3830
- });
3831
- Object.assign(contents, doc);
3832
- return contents;
3833
- };
3834
- exports.de_UpdateGeofenceCollectionCommand = de_UpdateGeofenceCollectionCommand;
3835
- const de_UpdateGeofenceCollectionCommandError = async (output, context) => {
3836
- const parsedOutput = {
3837
- ...output,
3838
- body: await parseErrorBody(output.body, context),
3839
- };
3840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3841
- switch (errorCode) {
3842
- case "AccessDeniedException":
3843
- case "com.amazonaws.location#AccessDeniedException":
3844
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3845
- case "InternalServerException":
3846
- case "com.amazonaws.location#InternalServerException":
3847
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3848
- case "ResourceNotFoundException":
3849
- case "com.amazonaws.location#ResourceNotFoundException":
3850
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3851
- case "ThrottlingException":
3852
- case "com.amazonaws.location#ThrottlingException":
3853
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3854
- case "ValidationException":
3855
- case "com.amazonaws.location#ValidationException":
3856
- throw await de_ValidationExceptionRes(parsedOutput, context);
3857
- default:
3858
- const parsedBody = parsedOutput.body;
3859
- return throwDefaultError({
3860
- output,
3861
- parsedBody,
3862
- errorCode,
3863
- });
3864
- }
3865
- };
3866
- const de_UpdateKeyCommand = async (output, context) => {
3867
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3868
- return de_UpdateKeyCommandError(output, context);
3869
- }
3870
- const contents = (0, smithy_client_1.map)({
3871
- $metadata: deserializeMetadata(output),
3872
- });
3873
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3874
- const doc = (0, smithy_client_1.take)(data, {
3875
- KeyArn: smithy_client_1.expectString,
3876
- KeyName: smithy_client_1.expectString,
3877
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3878
- });
3879
- Object.assign(contents, doc);
3880
- return contents;
3881
- };
3882
- exports.de_UpdateKeyCommand = de_UpdateKeyCommand;
3883
- const de_UpdateKeyCommandError = async (output, context) => {
3884
- const parsedOutput = {
3885
- ...output,
3886
- body: await parseErrorBody(output.body, context),
3887
- };
3888
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3889
- switch (errorCode) {
3890
- case "AccessDeniedException":
3891
- case "com.amazonaws.location#AccessDeniedException":
3892
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3893
- case "InternalServerException":
3894
- case "com.amazonaws.location#InternalServerException":
3895
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3896
- case "ResourceNotFoundException":
3897
- case "com.amazonaws.location#ResourceNotFoundException":
3898
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3899
- case "ThrottlingException":
3900
- case "com.amazonaws.location#ThrottlingException":
3901
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3902
- case "ValidationException":
3903
- case "com.amazonaws.location#ValidationException":
3904
- throw await de_ValidationExceptionRes(parsedOutput, context);
3905
- default:
3906
- const parsedBody = parsedOutput.body;
3907
- return throwDefaultError({
3908
- output,
3909
- parsedBody,
3910
- errorCode,
3911
- });
3912
- }
3913
- };
3914
- const de_UpdateMapCommand = async (output, context) => {
3915
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3916
- return de_UpdateMapCommandError(output, context);
3917
- }
3918
- const contents = (0, smithy_client_1.map)({
3919
- $metadata: deserializeMetadata(output),
3920
- });
3921
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3922
- const doc = (0, smithy_client_1.take)(data, {
3923
- MapArn: smithy_client_1.expectString,
3924
- MapName: smithy_client_1.expectString,
3925
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3926
- });
3927
- Object.assign(contents, doc);
3928
- return contents;
3929
- };
3930
- exports.de_UpdateMapCommand = de_UpdateMapCommand;
3931
- const de_UpdateMapCommandError = async (output, context) => {
3932
- const parsedOutput = {
3933
- ...output,
3934
- body: await parseErrorBody(output.body, context),
3935
- };
3936
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3937
- switch (errorCode) {
3938
- case "AccessDeniedException":
3939
- case "com.amazonaws.location#AccessDeniedException":
3940
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3941
- case "InternalServerException":
3942
- case "com.amazonaws.location#InternalServerException":
3943
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3944
- case "ResourceNotFoundException":
3945
- case "com.amazonaws.location#ResourceNotFoundException":
3946
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3947
- case "ThrottlingException":
3948
- case "com.amazonaws.location#ThrottlingException":
3949
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3950
- case "ValidationException":
3951
- case "com.amazonaws.location#ValidationException":
3952
- throw await de_ValidationExceptionRes(parsedOutput, context);
3953
- default:
3954
- const parsedBody = parsedOutput.body;
3955
- return throwDefaultError({
3956
- output,
3957
- parsedBody,
3958
- errorCode,
3959
- });
3960
- }
3961
- };
3962
- const de_UpdatePlaceIndexCommand = async (output, context) => {
3963
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3964
- return de_UpdatePlaceIndexCommandError(output, context);
3965
- }
3966
- const contents = (0, smithy_client_1.map)({
3967
- $metadata: deserializeMetadata(output),
3968
- });
3969
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3970
- const doc = (0, smithy_client_1.take)(data, {
3971
- IndexArn: smithy_client_1.expectString,
3972
- IndexName: smithy_client_1.expectString,
3973
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
3974
- });
3975
- Object.assign(contents, doc);
3976
- return contents;
3977
- };
3978
- exports.de_UpdatePlaceIndexCommand = de_UpdatePlaceIndexCommand;
3979
- const de_UpdatePlaceIndexCommandError = async (output, context) => {
3980
- const parsedOutput = {
3981
- ...output,
3982
- body: await parseErrorBody(output.body, context),
3983
- };
3984
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3985
- switch (errorCode) {
3986
- case "AccessDeniedException":
3987
- case "com.amazonaws.location#AccessDeniedException":
3988
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3989
- case "InternalServerException":
3990
- case "com.amazonaws.location#InternalServerException":
3991
- throw await de_InternalServerExceptionRes(parsedOutput, context);
3992
- case "ResourceNotFoundException":
3993
- case "com.amazonaws.location#ResourceNotFoundException":
3994
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3995
- case "ThrottlingException":
3996
- case "com.amazonaws.location#ThrottlingException":
3997
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3998
- case "ValidationException":
3999
- case "com.amazonaws.location#ValidationException":
4000
- throw await de_ValidationExceptionRes(parsedOutput, context);
4001
- default:
4002
- const parsedBody = parsedOutput.body;
4003
- return throwDefaultError({
4004
- output,
4005
- parsedBody,
4006
- errorCode,
4007
- });
4008
- }
4009
- };
4010
- const de_UpdateRouteCalculatorCommand = async (output, context) => {
4011
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4012
- return de_UpdateRouteCalculatorCommandError(output, context);
4013
- }
4014
- const contents = (0, smithy_client_1.map)({
4015
- $metadata: deserializeMetadata(output),
4016
- });
4017
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4018
- const doc = (0, smithy_client_1.take)(data, {
4019
- CalculatorArn: smithy_client_1.expectString,
4020
- CalculatorName: smithy_client_1.expectString,
4021
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4022
- });
4023
- Object.assign(contents, doc);
4024
- return contents;
4025
- };
4026
- exports.de_UpdateRouteCalculatorCommand = de_UpdateRouteCalculatorCommand;
4027
- const de_UpdateRouteCalculatorCommandError = async (output, context) => {
4028
- const parsedOutput = {
4029
- ...output,
4030
- body: await parseErrorBody(output.body, context),
4031
- };
4032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4033
- switch (errorCode) {
4034
- case "AccessDeniedException":
4035
- case "com.amazonaws.location#AccessDeniedException":
4036
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4037
- case "InternalServerException":
4038
- case "com.amazonaws.location#InternalServerException":
4039
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4040
- case "ResourceNotFoundException":
4041
- case "com.amazonaws.location#ResourceNotFoundException":
4042
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4043
- case "ThrottlingException":
4044
- case "com.amazonaws.location#ThrottlingException":
4045
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4046
- case "ValidationException":
4047
- case "com.amazonaws.location#ValidationException":
4048
- throw await de_ValidationExceptionRes(parsedOutput, context);
4049
- default:
4050
- const parsedBody = parsedOutput.body;
4051
- return throwDefaultError({
4052
- output,
4053
- parsedBody,
4054
- errorCode,
4055
- });
4056
- }
4057
- };
4058
- const de_UpdateTrackerCommand = async (output, context) => {
4059
- if (output.statusCode !== 200 && output.statusCode >= 300) {
4060
- return de_UpdateTrackerCommandError(output, context);
4061
- }
4062
- const contents = (0, smithy_client_1.map)({
4063
- $metadata: deserializeMetadata(output),
4064
- });
4065
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4066
- const doc = (0, smithy_client_1.take)(data, {
4067
- TrackerArn: smithy_client_1.expectString,
4068
- TrackerName: smithy_client_1.expectString,
4069
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4070
- });
4071
- Object.assign(contents, doc);
4072
- return contents;
4073
- };
4074
- exports.de_UpdateTrackerCommand = de_UpdateTrackerCommand;
4075
- const de_UpdateTrackerCommandError = async (output, context) => {
4076
- const parsedOutput = {
4077
- ...output,
4078
- body: await parseErrorBody(output.body, context),
4079
- };
4080
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4081
- switch (errorCode) {
4082
- case "AccessDeniedException":
4083
- case "com.amazonaws.location#AccessDeniedException":
4084
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4085
- case "InternalServerException":
4086
- case "com.amazonaws.location#InternalServerException":
4087
- throw await de_InternalServerExceptionRes(parsedOutput, context);
4088
- case "ResourceNotFoundException":
4089
- case "com.amazonaws.location#ResourceNotFoundException":
4090
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4091
- case "ThrottlingException":
4092
- case "com.amazonaws.location#ThrottlingException":
4093
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4094
- case "ValidationException":
4095
- case "com.amazonaws.location#ValidationException":
4096
- throw await de_ValidationExceptionRes(parsedOutput, context);
4097
- default:
4098
- const parsedBody = parsedOutput.body;
4099
- return throwDefaultError({
4100
- output,
4101
- parsedBody,
4102
- errorCode,
4103
- });
4104
- }
4105
- };
4106
- const throwDefaultError = (0, smithy_client_1.withBaseException)(LocationServiceException_1.LocationServiceException);
4107
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
4108
- const contents = (0, smithy_client_1.map)({});
4109
- const data = parsedOutput.body;
4110
- const doc = (0, smithy_client_1.take)(data, {
4111
- Message: [, smithy_client_1.expectString, `message`],
4112
- });
4113
- Object.assign(contents, doc);
4114
- const exception = new models_0_1.AccessDeniedException({
4115
- $metadata: deserializeMetadata(parsedOutput),
4116
- ...contents,
4117
- });
4118
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4119
- };
4120
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
4121
- const contents = (0, smithy_client_1.map)({});
4122
- const data = parsedOutput.body;
4123
- const doc = (0, smithy_client_1.take)(data, {
4124
- Message: [, smithy_client_1.expectString, `message`],
4125
- });
4126
- Object.assign(contents, doc);
4127
- const exception = new models_0_1.ConflictException({
4128
- $metadata: deserializeMetadata(parsedOutput),
4129
- ...contents,
4130
- });
4131
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4132
- };
4133
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
4134
- const contents = (0, smithy_client_1.map)({});
4135
- const data = parsedOutput.body;
4136
- const doc = (0, smithy_client_1.take)(data, {
4137
- Message: [, smithy_client_1.expectString, `message`],
4138
- });
4139
- Object.assign(contents, doc);
4140
- const exception = new models_0_1.InternalServerException({
4141
- $metadata: deserializeMetadata(parsedOutput),
4142
- ...contents,
4143
- });
4144
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4145
- };
4146
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
4147
- const contents = (0, smithy_client_1.map)({});
4148
- const data = parsedOutput.body;
4149
- const doc = (0, smithy_client_1.take)(data, {
4150
- Message: [, smithy_client_1.expectString, `message`],
4151
- });
4152
- Object.assign(contents, doc);
4153
- const exception = new models_0_1.ResourceNotFoundException({
4154
- $metadata: deserializeMetadata(parsedOutput),
4155
- ...contents,
4156
- });
4157
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4158
- };
4159
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4160
- const contents = (0, smithy_client_1.map)({});
4161
- const data = parsedOutput.body;
4162
- const doc = (0, smithy_client_1.take)(data, {
4163
- Message: [, smithy_client_1.expectString, `message`],
4164
- });
4165
- Object.assign(contents, doc);
4166
- const exception = new models_0_1.ServiceQuotaExceededException({
4167
- $metadata: deserializeMetadata(parsedOutput),
4168
- ...contents,
4169
- });
4170
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4171
- };
4172
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4173
- const contents = (0, smithy_client_1.map)({});
4174
- const data = parsedOutput.body;
4175
- const doc = (0, smithy_client_1.take)(data, {
4176
- Message: [, smithy_client_1.expectString, `message`],
4177
- });
4178
- Object.assign(contents, doc);
4179
- const exception = new models_0_1.ThrottlingException({
4180
- $metadata: deserializeMetadata(parsedOutput),
4181
- ...contents,
4182
- });
4183
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4184
- };
4185
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
4186
- const contents = (0, smithy_client_1.map)({});
4187
- const data = parsedOutput.body;
4188
- const doc = (0, smithy_client_1.take)(data, {
4189
- FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`],
4190
- Message: [, smithy_client_1.expectString, `message`],
4191
- Reason: [, smithy_client_1.expectString, `reason`],
4192
- });
4193
- Object.assign(contents, doc);
4194
- const exception = new models_0_1.ValidationException({
4195
- $metadata: deserializeMetadata(parsedOutput),
4196
- ...contents,
4197
- });
4198
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4199
- };
4200
- const se_BatchPutGeofenceRequestEntry = (input, context) => {
4201
- return (0, smithy_client_1.take)(input, {
4202
- GeofenceId: [],
4203
- GeofenceProperties: smithy_client_1._json,
4204
- Geometry: (_) => se_GeofenceGeometry(_, context),
4205
- });
4206
- };
4207
- const se_BatchPutGeofenceRequestEntryList = (input, context) => {
4208
- return input
4209
- .filter((e) => e != null)
4210
- .map((entry) => {
4211
- return se_BatchPutGeofenceRequestEntry(entry, context);
4212
- });
4213
- };
4214
- const se_BoundingBox = (input, context) => {
4215
- return input
4216
- .filter((e) => e != null)
4217
- .map((entry) => {
4218
- return (0, smithy_client_1.serializeFloat)(entry);
4219
- });
4220
- };
4221
- const se_CalculateRouteTruckModeOptions = (input, context) => {
4222
- return (0, smithy_client_1.take)(input, {
4223
- AvoidFerries: [],
4224
- AvoidTolls: [],
4225
- Dimensions: (_) => se_TruckDimensions(_, context),
4226
- Weight: (_) => se_TruckWeight(_, context),
4227
- });
4228
- };
4229
- const se_Circle = (input, context) => {
4230
- return (0, smithy_client_1.take)(input, {
4231
- Center: (_) => se_Position(_, context),
4232
- Radius: smithy_client_1.serializeFloat,
4233
- });
4234
- };
4235
- const se_DevicePositionUpdate = (input, context) => {
4236
- return (0, smithy_client_1.take)(input, {
4237
- Accuracy: (_) => se_PositionalAccuracy(_, context),
4238
- DeviceId: [],
4239
- Position: (_) => se_Position(_, context),
4240
- PositionProperties: smithy_client_1._json,
4241
- SampleTime: (_) => _.toISOString().split(".")[0] + "Z",
4242
- });
4243
- };
4244
- const se_DevicePositionUpdateList = (input, context) => {
4245
- return input
4246
- .filter((e) => e != null)
4247
- .map((entry) => {
4248
- return se_DevicePositionUpdate(entry, context);
4249
- });
4250
- };
4251
- const se_GeofenceGeometry = (input, context) => {
4252
- return (0, smithy_client_1.take)(input, {
4253
- Circle: (_) => se_Circle(_, context),
4254
- Polygon: (_) => se_LinearRings(_, context),
4255
- });
4256
- };
4257
- const se_LinearRing = (input, context) => {
4258
- return input
4259
- .filter((e) => e != null)
4260
- .map((entry) => {
4261
- return se_Position(entry, context);
4262
- });
4263
- };
4264
- const se_LinearRings = (input, context) => {
4265
- return input
4266
- .filter((e) => e != null)
4267
- .map((entry) => {
4268
- return se_LinearRing(entry, context);
4269
- });
4270
- };
4271
- const se_Position = (input, context) => {
4272
- return input
4273
- .filter((e) => e != null)
4274
- .map((entry) => {
4275
- return (0, smithy_client_1.serializeFloat)(entry);
4276
- });
4277
- };
4278
- const se_PositionalAccuracy = (input, context) => {
4279
- return (0, smithy_client_1.take)(input, {
4280
- Horizontal: smithy_client_1.serializeFloat,
4281
- });
4282
- };
4283
- const se_PositionList = (input, context) => {
4284
- return input
4285
- .filter((e) => e != null)
4286
- .map((entry) => {
4287
- return se_Position(entry, context);
4288
- });
4289
- };
4290
- const se_TrackingFilterGeometry = (input, context) => {
4291
- return (0, smithy_client_1.take)(input, {
4292
- Polygon: (_) => se_LinearRings(_, context),
4293
- });
4294
- };
4295
- const se_TruckDimensions = (input, context) => {
4296
- return (0, smithy_client_1.take)(input, {
4297
- Height: smithy_client_1.serializeFloat,
4298
- Length: smithy_client_1.serializeFloat,
4299
- Unit: [],
4300
- Width: smithy_client_1.serializeFloat,
4301
- });
4302
- };
4303
- const se_TruckWeight = (input, context) => {
4304
- return (0, smithy_client_1.take)(input, {
4305
- Total: smithy_client_1.serializeFloat,
4306
- Unit: [],
4307
- });
4308
- };
4309
- const se_WaypointPositionList = (input, context) => {
4310
- return input
4311
- .filter((e) => e != null)
4312
- .map((entry) => {
4313
- return se_Position(entry, context);
4314
- });
4315
- };
4316
- const de_BatchEvaluateGeofencesError = (output, context) => {
4317
- return (0, smithy_client_1.take)(output, {
4318
- DeviceId: smithy_client_1.expectString,
4319
- Error: smithy_client_1._json,
4320
- SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4321
- });
4322
- };
4323
- const de_BatchEvaluateGeofencesErrorList = (output, context) => {
4324
- const retVal = (output || [])
4325
- .filter((e) => e != null)
4326
- .map((entry) => {
4327
- return de_BatchEvaluateGeofencesError(entry, context);
4328
- });
4329
- return retVal;
4330
- };
4331
- const de_BatchPutGeofenceSuccess = (output, context) => {
4332
- return (0, smithy_client_1.take)(output, {
4333
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4334
- GeofenceId: smithy_client_1.expectString,
4335
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4336
- });
4337
- };
4338
- const de_BatchPutGeofenceSuccessList = (output, context) => {
4339
- const retVal = (output || [])
4340
- .filter((e) => e != null)
4341
- .map((entry) => {
4342
- return de_BatchPutGeofenceSuccess(entry, context);
4343
- });
4344
- return retVal;
4345
- };
4346
- const de_BatchUpdateDevicePositionError = (output, context) => {
4347
- return (0, smithy_client_1.take)(output, {
4348
- DeviceId: smithy_client_1.expectString,
4349
- Error: smithy_client_1._json,
4350
- SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4351
- });
4352
- };
4353
- const de_BatchUpdateDevicePositionErrorList = (output, context) => {
4354
- const retVal = (output || [])
4355
- .filter((e) => e != null)
4356
- .map((entry) => {
4357
- return de_BatchUpdateDevicePositionError(entry, context);
4358
- });
4359
- return retVal;
4360
- };
4361
- const de_BoundingBox = (output, context) => {
4362
- const retVal = (output || [])
4363
- .filter((e) => e != null)
4364
- .map((entry) => {
4365
- return (0, smithy_client_1.limitedParseDouble)(entry);
4366
- });
4367
- return retVal;
4368
- };
4369
- const de_CalculateRouteSummary = (output, context) => {
4370
- return (0, smithy_client_1.take)(output, {
4371
- DataSource: smithy_client_1.expectString,
4372
- Distance: smithy_client_1.limitedParseDouble,
4373
- DistanceUnit: smithy_client_1.expectString,
4374
- DurationSeconds: smithy_client_1.limitedParseDouble,
4375
- RouteBBox: (_) => de_BoundingBox(_, context),
4376
- });
4377
- };
4378
- const de_Circle = (output, context) => {
4379
- return (0, smithy_client_1.take)(output, {
4380
- Center: (_) => de_Position(_, context),
4381
- Radius: smithy_client_1.limitedParseDouble,
4382
- });
4383
- };
4384
- const de_DevicePosition = (output, context) => {
4385
- return (0, smithy_client_1.take)(output, {
4386
- Accuracy: (_) => de_PositionalAccuracy(_, context),
4387
- DeviceId: smithy_client_1.expectString,
4388
- Position: (_) => de_Position(_, context),
4389
- PositionProperties: smithy_client_1._json,
4390
- ReceivedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4391
- SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4392
- });
4393
- };
4394
- const de_DevicePositionList = (output, context) => {
4395
- const retVal = (output || [])
4396
- .filter((e) => e != null)
4397
- .map((entry) => {
4398
- return de_DevicePosition(entry, context);
4399
- });
4400
- return retVal;
4401
- };
4402
- const de_GeofenceGeometry = (output, context) => {
4403
- return (0, smithy_client_1.take)(output, {
4404
- Circle: (_) => de_Circle(_, context),
4405
- Polygon: (_) => de_LinearRings(_, context),
4406
- });
4407
- };
4408
- const de_Leg = (output, context) => {
4409
- return (0, smithy_client_1.take)(output, {
4410
- Distance: smithy_client_1.limitedParseDouble,
4411
- DurationSeconds: smithy_client_1.limitedParseDouble,
4412
- EndPosition: (_) => de_Position(_, context),
4413
- Geometry: (_) => de_LegGeometry(_, context),
4414
- StartPosition: (_) => de_Position(_, context),
4415
- Steps: (_) => de_StepList(_, context),
4416
- });
4417
- };
4418
- const de_LegGeometry = (output, context) => {
4419
- return (0, smithy_client_1.take)(output, {
4420
- LineString: (_) => de_LineString(_, context),
4421
- });
4422
- };
4423
- const de_LegList = (output, context) => {
4424
- const retVal = (output || [])
4425
- .filter((e) => e != null)
4426
- .map((entry) => {
4427
- return de_Leg(entry, context);
4428
- });
4429
- return retVal;
4430
- };
4431
- const de_LinearRing = (output, context) => {
4432
- const retVal = (output || [])
4433
- .filter((e) => e != null)
4434
- .map((entry) => {
4435
- return de_Position(entry, context);
4436
- });
4437
- return retVal;
4438
- };
4439
- const de_LinearRings = (output, context) => {
4440
- const retVal = (output || [])
4441
- .filter((e) => e != null)
4442
- .map((entry) => {
4443
- return de_LinearRing(entry, context);
4444
- });
4445
- return retVal;
4446
- };
4447
- const de_LineString = (output, context) => {
4448
- const retVal = (output || [])
4449
- .filter((e) => e != null)
4450
- .map((entry) => {
4451
- return de_Position(entry, context);
4452
- });
4453
- return retVal;
4454
- };
4455
- const de_ListDevicePositionsResponseEntry = (output, context) => {
4456
- return (0, smithy_client_1.take)(output, {
4457
- Accuracy: (_) => de_PositionalAccuracy(_, context),
4458
- DeviceId: smithy_client_1.expectString,
4459
- Position: (_) => de_Position(_, context),
4460
- PositionProperties: smithy_client_1._json,
4461
- SampleTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4462
- });
4463
- };
4464
- const de_ListDevicePositionsResponseEntryList = (output, context) => {
4465
- const retVal = (output || [])
4466
- .filter((e) => e != null)
4467
- .map((entry) => {
4468
- return de_ListDevicePositionsResponseEntry(entry, context);
4469
- });
4470
- return retVal;
4471
- };
4472
- const de_ListGeofenceCollectionsResponseEntry = (output, context) => {
4473
- return (0, smithy_client_1.take)(output, {
4474
- CollectionName: smithy_client_1.expectString,
4475
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4476
- Description: smithy_client_1.expectString,
4477
- PricingPlan: smithy_client_1.expectString,
4478
- PricingPlanDataSource: smithy_client_1.expectString,
4479
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4480
- });
4481
- };
4482
- const de_ListGeofenceCollectionsResponseEntryList = (output, context) => {
4483
- const retVal = (output || [])
4484
- .filter((e) => e != null)
4485
- .map((entry) => {
4486
- return de_ListGeofenceCollectionsResponseEntry(entry, context);
4487
- });
4488
- return retVal;
4489
- };
4490
- const de_ListGeofenceResponseEntry = (output, context) => {
4491
- return (0, smithy_client_1.take)(output, {
4492
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4493
- GeofenceId: smithy_client_1.expectString,
4494
- GeofenceProperties: smithy_client_1._json,
4495
- Geometry: (_) => de_GeofenceGeometry(_, context),
4496
- Status: smithy_client_1.expectString,
4497
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4498
- });
4499
- };
4500
- const de_ListGeofenceResponseEntryList = (output, context) => {
4501
- const retVal = (output || [])
4502
- .filter((e) => e != null)
4503
- .map((entry) => {
4504
- return de_ListGeofenceResponseEntry(entry, context);
4505
- });
4506
- return retVal;
4507
- };
4508
- const de_ListKeysResponseEntry = (output, context) => {
4509
- return (0, smithy_client_1.take)(output, {
4510
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4511
- Description: smithy_client_1.expectString,
4512
- ExpireTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4513
- KeyName: smithy_client_1.expectString,
4514
- Restrictions: smithy_client_1._json,
4515
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4516
- });
4517
- };
4518
- const de_ListKeysResponseEntryList = (output, context) => {
4519
- const retVal = (output || [])
4520
- .filter((e) => e != null)
4521
- .map((entry) => {
4522
- return de_ListKeysResponseEntry(entry, context);
4523
- });
4524
- return retVal;
4525
- };
4526
- const de_ListMapsResponseEntry = (output, context) => {
4527
- return (0, smithy_client_1.take)(output, {
4528
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4529
- DataSource: smithy_client_1.expectString,
4530
- Description: smithy_client_1.expectString,
4531
- MapName: smithy_client_1.expectString,
4532
- PricingPlan: smithy_client_1.expectString,
4533
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4534
- });
4535
- };
4536
- const de_ListMapsResponseEntryList = (output, context) => {
4537
- const retVal = (output || [])
4538
- .filter((e) => e != null)
4539
- .map((entry) => {
4540
- return de_ListMapsResponseEntry(entry, context);
4541
- });
4542
- return retVal;
4543
- };
4544
- const de_ListPlaceIndexesResponseEntry = (output, context) => {
4545
- return (0, smithy_client_1.take)(output, {
4546
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4547
- DataSource: smithy_client_1.expectString,
4548
- Description: smithy_client_1.expectString,
4549
- IndexName: smithy_client_1.expectString,
4550
- PricingPlan: smithy_client_1.expectString,
4551
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4552
- });
4553
- };
4554
- const de_ListPlaceIndexesResponseEntryList = (output, context) => {
4555
- const retVal = (output || [])
4556
- .filter((e) => e != null)
4557
- .map((entry) => {
4558
- return de_ListPlaceIndexesResponseEntry(entry, context);
4559
- });
4560
- return retVal;
4561
- };
4562
- const de_ListRouteCalculatorsResponseEntry = (output, context) => {
4563
- return (0, smithy_client_1.take)(output, {
4564
- CalculatorName: smithy_client_1.expectString,
4565
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4566
- DataSource: smithy_client_1.expectString,
4567
- Description: smithy_client_1.expectString,
4568
- PricingPlan: smithy_client_1.expectString,
4569
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4570
- });
4571
- };
4572
- const de_ListRouteCalculatorsResponseEntryList = (output, context) => {
4573
- const retVal = (output || [])
4574
- .filter((e) => e != null)
4575
- .map((entry) => {
4576
- return de_ListRouteCalculatorsResponseEntry(entry, context);
4577
- });
4578
- return retVal;
4579
- };
4580
- const de_ListTrackersResponseEntry = (output, context) => {
4581
- return (0, smithy_client_1.take)(output, {
4582
- CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4583
- Description: smithy_client_1.expectString,
4584
- PricingPlan: smithy_client_1.expectString,
4585
- PricingPlanDataSource: smithy_client_1.expectString,
4586
- TrackerName: smithy_client_1.expectString,
4587
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
4588
- });
4589
- };
4590
- const de_ListTrackersResponseEntryList = (output, context) => {
4591
- const retVal = (output || [])
4592
- .filter((e) => e != null)
4593
- .map((entry) => {
4594
- return de_ListTrackersResponseEntry(entry, context);
4595
- });
4596
- return retVal;
4597
- };
4598
- const de_Place = (output, context) => {
4599
- return (0, smithy_client_1.take)(output, {
4600
- AddressNumber: smithy_client_1.expectString,
4601
- Categories: smithy_client_1._json,
4602
- Country: smithy_client_1.expectString,
4603
- Geometry: (_) => de_PlaceGeometry(_, context),
4604
- Interpolated: smithy_client_1.expectBoolean,
4605
- Label: smithy_client_1.expectString,
4606
- Municipality: smithy_client_1.expectString,
4607
- Neighborhood: smithy_client_1.expectString,
4608
- PostalCode: smithy_client_1.expectString,
4609
- Region: smithy_client_1.expectString,
4610
- Street: smithy_client_1.expectString,
4611
- SubMunicipality: smithy_client_1.expectString,
4612
- SubRegion: smithy_client_1.expectString,
4613
- SupplementalCategories: smithy_client_1._json,
4614
- TimeZone: smithy_client_1._json,
4615
- UnitNumber: smithy_client_1.expectString,
4616
- UnitType: smithy_client_1.expectString,
4617
- });
4618
- };
4619
- const de_PlaceGeometry = (output, context) => {
4620
- return (0, smithy_client_1.take)(output, {
4621
- Point: (_) => de_Position(_, context),
4622
- });
4623
- };
4624
- const de_Position = (output, context) => {
4625
- const retVal = (output || [])
4626
- .filter((e) => e != null)
4627
- .map((entry) => {
4628
- return (0, smithy_client_1.limitedParseDouble)(entry);
4629
- });
4630
- return retVal;
4631
- };
4632
- const de_PositionalAccuracy = (output, context) => {
4633
- return (0, smithy_client_1.take)(output, {
4634
- Horizontal: smithy_client_1.limitedParseDouble,
4635
- });
4636
- };
4637
- const de_PositionList = (output, context) => {
4638
- const retVal = (output || [])
4639
- .filter((e) => e != null)
4640
- .map((entry) => {
4641
- return de_Position(entry, context);
4642
- });
4643
- return retVal;
4644
- };
4645
- const de_RouteMatrix = (output, context) => {
4646
- const retVal = (output || [])
4647
- .filter((e) => e != null)
4648
- .map((entry) => {
4649
- return de_RouteMatrixRow(entry, context);
4650
- });
4651
- return retVal;
4652
- };
4653
- const de_RouteMatrixEntry = (output, context) => {
4654
- return (0, smithy_client_1.take)(output, {
4655
- Distance: smithy_client_1.limitedParseDouble,
4656
- DurationSeconds: smithy_client_1.limitedParseDouble,
4657
- Error: smithy_client_1._json,
4658
- });
4659
- };
4660
- const de_RouteMatrixRow = (output, context) => {
4661
- const retVal = (output || [])
4662
- .filter((e) => e != null)
4663
- .map((entry) => {
4664
- return de_RouteMatrixEntry(entry, context);
4665
- });
4666
- return retVal;
4667
- };
4668
- const de_SearchForPositionResult = (output, context) => {
4669
- return (0, smithy_client_1.take)(output, {
4670
- Distance: smithy_client_1.limitedParseDouble,
4671
- Place: (_) => de_Place(_, context),
4672
- PlaceId: smithy_client_1.expectString,
4673
- });
4674
- };
4675
- const de_SearchForPositionResultList = (output, context) => {
4676
- const retVal = (output || [])
4677
- .filter((e) => e != null)
4678
- .map((entry) => {
4679
- return de_SearchForPositionResult(entry, context);
4680
- });
4681
- return retVal;
4682
- };
4683
- const de_SearchForTextResult = (output, context) => {
4684
- return (0, smithy_client_1.take)(output, {
4685
- Distance: smithy_client_1.limitedParseDouble,
4686
- Place: (_) => de_Place(_, context),
4687
- PlaceId: smithy_client_1.expectString,
4688
- Relevance: smithy_client_1.limitedParseDouble,
4689
- });
4690
- };
4691
- const de_SearchForTextResultList = (output, context) => {
4692
- const retVal = (output || [])
4693
- .filter((e) => e != null)
4694
- .map((entry) => {
4695
- return de_SearchForTextResult(entry, context);
4696
- });
4697
- return retVal;
4698
- };
4699
- const de_SearchPlaceIndexForPositionSummary = (output, context) => {
4700
- return (0, smithy_client_1.take)(output, {
4701
- DataSource: smithy_client_1.expectString,
4702
- Language: smithy_client_1.expectString,
4703
- MaxResults: smithy_client_1.expectInt32,
4704
- Position: (_) => de_Position(_, context),
4705
- });
4706
- };
4707
- const de_SearchPlaceIndexForSuggestionsSummary = (output, context) => {
4708
- return (0, smithy_client_1.take)(output, {
4709
- BiasPosition: (_) => de_Position(_, context),
4710
- DataSource: smithy_client_1.expectString,
4711
- FilterBBox: (_) => de_BoundingBox(_, context),
4712
- FilterCategories: smithy_client_1._json,
4713
- FilterCountries: smithy_client_1._json,
4714
- Language: smithy_client_1.expectString,
4715
- MaxResults: smithy_client_1.expectInt32,
4716
- Text: smithy_client_1.expectString,
4717
- });
4718
- };
4719
- const de_SearchPlaceIndexForTextSummary = (output, context) => {
4720
- return (0, smithy_client_1.take)(output, {
4721
- BiasPosition: (_) => de_Position(_, context),
4722
- DataSource: smithy_client_1.expectString,
4723
- FilterBBox: (_) => de_BoundingBox(_, context),
4724
- FilterCategories: smithy_client_1._json,
4725
- FilterCountries: smithy_client_1._json,
4726
- Language: smithy_client_1.expectString,
4727
- MaxResults: smithy_client_1.expectInt32,
4728
- ResultBBox: (_) => de_BoundingBox(_, context),
4729
- Text: smithy_client_1.expectString,
4730
- });
4731
- };
4732
- const de_Step = (output, context) => {
4733
- return (0, smithy_client_1.take)(output, {
4734
- Distance: smithy_client_1.limitedParseDouble,
4735
- DurationSeconds: smithy_client_1.limitedParseDouble,
4736
- EndPosition: (_) => de_Position(_, context),
4737
- GeometryOffset: smithy_client_1.expectInt32,
4738
- StartPosition: (_) => de_Position(_, context),
4739
- });
4740
- };
4741
- const de_StepList = (output, context) => {
4742
- const retVal = (output || [])
4743
- .filter((e) => e != null)
4744
- .map((entry) => {
4745
- return de_Step(entry, context);
4746
- });
4747
- return retVal;
4748
- };
4749
- const de_ValidationExceptionField = (output, context) => {
4750
- return (0, smithy_client_1.take)(output, {
4751
- Message: [, smithy_client_1.expectString, `message`],
4752
- Name: [, smithy_client_1.expectString, `name`],
4753
- });
4754
- };
4755
- const de_ValidationExceptionFieldList = (output, context) => {
4756
- const retVal = (output || [])
4757
- .filter((e) => e != null)
4758
- .map((entry) => {
4759
- return de_ValidationExceptionField(entry, context);
4760
- });
4761
- return retVal;
4762
- };
4763
- const deserializeMetadata = (output) => ({
4764
- httpStatusCode: output.statusCode,
4765
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4766
- extendedRequestId: output.headers["x-amz-id-2"],
4767
- cfId: output.headers["x-amz-cf-id"],
4768
- });
4769
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
4770
- const isSerializableHeaderValue = (value) => value !== undefined &&
4771
- value !== null &&
4772
- value !== "" &&
4773
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
4774
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
4775
- const _CC = "CacheControl";
4776
- const _CT = "ContentType";
4777
- const _FD = "ForceDelete";
4778
- const _K = "Key";
4779
- const _L = "Language";
4780
- const _TK = "TagKeys";
4781
- const _cc = "cache-control";
4782
- const _ct = "content-type";
4783
- const _fD = "forceDelete";
4784
- const _k = "key";
4785
- const _l = "language";
4786
- const _tK = "tagKeys";
4787
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4788
- if (encoded.length) {
4789
- return JSON.parse(encoded);
4790
- }
4791
- return {};
4792
- });
4793
- const parseErrorBody = async (errorBody, context) => {
4794
- const value = await parseBody(errorBody, context);
4795
- value.message = value.message ?? value.Message;
4796
- return value;
4797
- };
4798
- const loadRestJsonErrorCode = (output, data) => {
4799
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4800
- const sanitizeErrorCode = (rawValue) => {
4801
- let cleanValue = rawValue;
4802
- if (typeof cleanValue === "number") {
4803
- cleanValue = cleanValue.toString();
4804
- }
4805
- if (cleanValue.indexOf(",") >= 0) {
4806
- cleanValue = cleanValue.split(",")[0];
4807
- }
4808
- if (cleanValue.indexOf(":") >= 0) {
4809
- cleanValue = cleanValue.split(":")[0];
4810
- }
4811
- if (cleanValue.indexOf("#") >= 0) {
4812
- cleanValue = cleanValue.split("#")[1];
4813
- }
4814
- return cleanValue;
4815
- };
4816
- const headerKey = findKey(output.headers, "x-amzn-errortype");
4817
- if (headerKey !== undefined) {
4818
- return sanitizeErrorCode(output.headers[headerKey]);
4819
- }
4820
- if (data.code !== undefined) {
4821
- return sanitizeErrorCode(data.code);
4822
- }
4823
- if (data["__type"] !== undefined) {
4824
- return sanitizeErrorCode(data["__type"]);
4825
- }
4826
- };
1
+ module.exports = require("../index.js");