@aws-sdk/client-geo-places 3.683.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 (107) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +297 -0
  3. package/dist-cjs/GeoPlaces.js +25 -0
  4. package/dist-cjs/GeoPlacesClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/AutocompleteCommand.js +27 -0
  8. package/dist-cjs/commands/GeocodeCommand.js +27 -0
  9. package/dist-cjs/commands/GetPlaceCommand.js +27 -0
  10. package/dist-cjs/commands/ReverseGeocodeCommand.js +27 -0
  11. package/dist-cjs/commands/SearchNearbyCommand.js +27 -0
  12. package/dist-cjs/commands/SearchTextCommand.js +27 -0
  13. package/dist-cjs/commands/SuggestCommand.js +27 -0
  14. package/dist-cjs/commands/index.js +10 -0
  15. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  16. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  17. package/dist-cjs/endpoint/ruleset.js +7 -0
  18. package/dist-cjs/extensionConfiguration.js +2 -0
  19. package/dist-cjs/index.js +10 -0
  20. package/dist-cjs/models/GeoPlacesServiceException.js +12 -0
  21. package/dist-cjs/models/index.js +4 -0
  22. package/dist-cjs/models/models_0.js +379 -0
  23. package/dist-cjs/protocols/Aws_restJson1.js +690 -0
  24. package/dist-cjs/runtimeConfig.browser.js +39 -0
  25. package/dist-cjs/runtimeConfig.js +50 -0
  26. package/dist-cjs/runtimeConfig.native.js +15 -0
  27. package/dist-cjs/runtimeConfig.shared.js +34 -0
  28. package/dist-cjs/runtimeExtensions.js +25 -0
  29. package/dist-es/GeoPlaces.js +21 -0
  30. package/dist-es/GeoPlacesClient.js +46 -0
  31. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  32. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  33. package/dist-es/commands/AutocompleteCommand.js +23 -0
  34. package/dist-es/commands/GeocodeCommand.js +23 -0
  35. package/dist-es/commands/GetPlaceCommand.js +23 -0
  36. package/dist-es/commands/ReverseGeocodeCommand.js +23 -0
  37. package/dist-es/commands/SearchNearbyCommand.js +23 -0
  38. package/dist-es/commands/SearchTextCommand.js +23 -0
  39. package/dist-es/commands/SuggestCommand.js +23 -0
  40. package/dist-es/commands/index.js +7 -0
  41. package/dist-es/endpoint/EndpointParameters.js +14 -0
  42. package/dist-es/endpoint/endpointResolver.js +14 -0
  43. package/dist-es/endpoint/ruleset.js +4 -0
  44. package/dist-es/extensionConfiguration.js +1 -0
  45. package/dist-es/index.js +5 -0
  46. package/dist-es/models/GeoPlacesServiceException.js +8 -0
  47. package/dist-es/models/index.js +1 -0
  48. package/dist-es/models/models_0.js +345 -0
  49. package/dist-es/protocols/Aws_restJson1.js +673 -0
  50. package/dist-es/runtimeConfig.browser.js +34 -0
  51. package/dist-es/runtimeConfig.js +45 -0
  52. package/dist-es/runtimeConfig.native.js +11 -0
  53. package/dist-es/runtimeConfig.shared.js +30 -0
  54. package/dist-es/runtimeExtensions.js +21 -0
  55. package/dist-types/GeoPlaces.d.ts +97 -0
  56. package/dist-types/GeoPlacesClient.d.ts +212 -0
  57. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  58. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  59. package/dist-types/commands/AutocompleteCommand.d.ts +204 -0
  60. package/dist-types/commands/GeocodeCommand.d.ts +231 -0
  61. package/dist-types/commands/GetPlaceCommand.d.ts +312 -0
  62. package/dist-types/commands/ReverseGeocodeCommand.d.ts +196 -0
  63. package/dist-types/commands/SearchNearbyCommand.d.ts +335 -0
  64. package/dist-types/commands/SearchTextCommand.d.ts +326 -0
  65. package/dist-types/commands/SuggestCommand.d.ts +289 -0
  66. package/dist-types/commands/index.d.ts +7 -0
  67. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  68. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  69. package/dist-types/endpoint/ruleset.d.ts +2 -0
  70. package/dist-types/extensionConfiguration.d.ts +9 -0
  71. package/dist-types/index.d.ts +49 -0
  72. package/dist-types/models/GeoPlacesServiceException.d.ts +14 -0
  73. package/dist-types/models/index.d.ts +1 -0
  74. package/dist-types/models/models_0.d.ts +2871 -0
  75. package/dist-types/protocols/Aws_restJson1.d.ts +65 -0
  76. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  77. package/dist-types/runtimeConfig.d.ts +48 -0
  78. package/dist-types/runtimeConfig.native.d.ts +47 -0
  79. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  80. package/dist-types/runtimeExtensions.d.ts +17 -0
  81. package/dist-types/ts3.4/GeoPlaces.d.ts +126 -0
  82. package/dist-types/ts3.4/GeoPlacesClient.d.ts +160 -0
  83. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  84. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  85. package/dist-types/ts3.4/commands/AutocompleteCommand.d.ts +47 -0
  86. package/dist-types/ts3.4/commands/GeocodeCommand.d.ts +45 -0
  87. package/dist-types/ts3.4/commands/GetPlaceCommand.d.ts +47 -0
  88. package/dist-types/ts3.4/commands/ReverseGeocodeCommand.d.ts +50 -0
  89. package/dist-types/ts3.4/commands/SearchNearbyCommand.d.ts +47 -0
  90. package/dist-types/ts3.4/commands/SearchTextCommand.d.ts +47 -0
  91. package/dist-types/ts3.4/commands/SuggestCommand.d.ts +43 -0
  92. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  93. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  94. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  95. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  96. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  97. package/dist-types/ts3.4/index.d.ts +8 -0
  98. package/dist-types/ts3.4/models/GeoPlacesServiceException.d.ts +9 -0
  99. package/dist-types/ts3.4/models/index.d.ts +1 -0
  100. package/dist-types/ts3.4/models/models_0.d.ts +786 -0
  101. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +89 -0
  102. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  103. package/dist-types/ts3.4/runtimeConfig.d.ts +94 -0
  104. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  105. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  106. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  107. package/package.json +101 -0
@@ -0,0 +1,690 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_SuggestCommand = exports.de_SearchTextCommand = exports.de_SearchNearbyCommand = exports.de_ReverseGeocodeCommand = exports.de_GetPlaceCommand = exports.de_GeocodeCommand = exports.de_AutocompleteCommand = exports.se_SuggestCommand = exports.se_SearchTextCommand = exports.se_SearchNearbyCommand = exports.se_ReverseGeocodeCommand = exports.se_GetPlaceCommand = exports.se_GeocodeCommand = exports.se_AutocompleteCommand = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const core_2 = require("@smithy/core");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const GeoPlacesServiceException_1 = require("../models/GeoPlacesServiceException");
8
+ const models_0_1 = require("../models/models_0");
9
+ const se_AutocompleteCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = {
12
+ "content-type": "application/json",
13
+ };
14
+ b.bp("/autocomplete");
15
+ const query = (0, smithy_client_1.map)({
16
+ [_k]: [, input[_K]],
17
+ });
18
+ let body;
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
21
+ BiasPosition: (_) => se_Position(_, context),
22
+ Filter: (_) => se_AutocompleteFilter(_, context),
23
+ IntendedUse: [],
24
+ Language: [],
25
+ MaxResults: [],
26
+ PoliticalView: [],
27
+ PostalCodeMode: [],
28
+ QueryText: [],
29
+ }));
30
+ b.m("POST").h(headers).q(query).b(body);
31
+ return b.build();
32
+ };
33
+ exports.se_AutocompleteCommand = se_AutocompleteCommand;
34
+ const se_GeocodeCommand = async (input, context) => {
35
+ const b = (0, core_2.requestBuilder)(input, context);
36
+ const headers = {
37
+ "content-type": "application/json",
38
+ };
39
+ b.bp("/geocode");
40
+ const query = (0, smithy_client_1.map)({
41
+ [_k]: [, input[_K]],
42
+ });
43
+ let body;
44
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
45
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
46
+ BiasPosition: (_) => se_Position(_, context),
47
+ Filter: (_) => (0, smithy_client_1._json)(_),
48
+ IntendedUse: [],
49
+ Language: [],
50
+ MaxResults: [],
51
+ PoliticalView: [],
52
+ QueryComponents: (_) => (0, smithy_client_1._json)(_),
53
+ QueryText: [],
54
+ }));
55
+ b.m("POST").h(headers).q(query).b(body);
56
+ return b.build();
57
+ };
58
+ exports.se_GeocodeCommand = se_GeocodeCommand;
59
+ const se_GetPlaceCommand = async (input, context) => {
60
+ const b = (0, core_2.requestBuilder)(input, context);
61
+ const headers = {};
62
+ b.bp("/place/{PlaceId}");
63
+ b.p("PlaceId", () => input.PlaceId, "{PlaceId}", false);
64
+ const query = (0, smithy_client_1.map)({
65
+ [_af]: [() => input.AdditionalFeatures !== void 0, () => input[_AF] || []],
66
+ [_l]: [, input[_L]],
67
+ [_pv]: [, input[_PV]],
68
+ [_iu]: [, input[_IU]],
69
+ [_k]: [, input[_K]],
70
+ });
71
+ let body;
72
+ b.m("GET").h(headers).q(query).b(body);
73
+ return b.build();
74
+ };
75
+ exports.se_GetPlaceCommand = se_GetPlaceCommand;
76
+ const se_ReverseGeocodeCommand = async (input, context) => {
77
+ const b = (0, core_2.requestBuilder)(input, context);
78
+ const headers = {
79
+ "content-type": "application/json",
80
+ };
81
+ b.bp("/reverse-geocode");
82
+ const query = (0, smithy_client_1.map)({
83
+ [_k]: [, input[_K]],
84
+ });
85
+ let body;
86
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
87
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
88
+ Filter: (_) => (0, smithy_client_1._json)(_),
89
+ IntendedUse: [],
90
+ Language: [],
91
+ MaxResults: [],
92
+ PoliticalView: [],
93
+ QueryPosition: (_) => se_Position(_, context),
94
+ QueryRadius: [],
95
+ }));
96
+ b.m("POST").h(headers).q(query).b(body);
97
+ return b.build();
98
+ };
99
+ exports.se_ReverseGeocodeCommand = se_ReverseGeocodeCommand;
100
+ const se_SearchNearbyCommand = async (input, context) => {
101
+ const b = (0, core_2.requestBuilder)(input, context);
102
+ const headers = {
103
+ "content-type": "application/json",
104
+ };
105
+ b.bp("/search-nearby");
106
+ const query = (0, smithy_client_1.map)({
107
+ [_k]: [, input[_K]],
108
+ });
109
+ let body;
110
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
111
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
112
+ Filter: (_) => se_SearchNearbyFilter(_, context),
113
+ IntendedUse: [],
114
+ Language: [],
115
+ MaxResults: [],
116
+ NextToken: [],
117
+ PoliticalView: [],
118
+ QueryPosition: (_) => se_Position(_, context),
119
+ QueryRadius: [],
120
+ }));
121
+ b.m("POST").h(headers).q(query).b(body);
122
+ return b.build();
123
+ };
124
+ exports.se_SearchNearbyCommand = se_SearchNearbyCommand;
125
+ const se_SearchTextCommand = async (input, context) => {
126
+ const b = (0, core_2.requestBuilder)(input, context);
127
+ const headers = {
128
+ "content-type": "application/json",
129
+ };
130
+ b.bp("/search-text");
131
+ const query = (0, smithy_client_1.map)({
132
+ [_k]: [, input[_K]],
133
+ });
134
+ let body;
135
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
136
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
137
+ BiasPosition: (_) => se_Position(_, context),
138
+ Filter: (_) => se_SearchTextFilter(_, context),
139
+ IntendedUse: [],
140
+ Language: [],
141
+ MaxResults: [],
142
+ NextToken: [],
143
+ PoliticalView: [],
144
+ QueryId: [],
145
+ QueryText: [],
146
+ }));
147
+ b.m("POST").h(headers).q(query).b(body);
148
+ return b.build();
149
+ };
150
+ exports.se_SearchTextCommand = se_SearchTextCommand;
151
+ const se_SuggestCommand = async (input, context) => {
152
+ const b = (0, core_2.requestBuilder)(input, context);
153
+ const headers = {
154
+ "content-type": "application/json",
155
+ };
156
+ b.bp("/suggest");
157
+ const query = (0, smithy_client_1.map)({
158
+ [_k]: [, input[_K]],
159
+ });
160
+ let body;
161
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
162
+ AdditionalFeatures: (_) => (0, smithy_client_1._json)(_),
163
+ BiasPosition: (_) => se_Position(_, context),
164
+ Filter: (_) => se_SuggestFilter(_, context),
165
+ IntendedUse: [],
166
+ Language: [],
167
+ MaxQueryRefinements: [],
168
+ MaxResults: [],
169
+ PoliticalView: [],
170
+ QueryText: [],
171
+ }));
172
+ b.m("POST").h(headers).q(query).b(body);
173
+ return b.build();
174
+ };
175
+ exports.se_SuggestCommand = se_SuggestCommand;
176
+ const de_AutocompleteCommand = async (output, context) => {
177
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
178
+ return de_CommandError(output, context);
179
+ }
180
+ const contents = (0, smithy_client_1.map)({
181
+ $metadata: deserializeMetadata(output),
182
+ [_PB]: [, output.headers[_xagpb]],
183
+ });
184
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
185
+ const doc = (0, smithy_client_1.take)(data, {
186
+ ResultItems: smithy_client_1._json,
187
+ });
188
+ Object.assign(contents, doc);
189
+ return contents;
190
+ };
191
+ exports.de_AutocompleteCommand = de_AutocompleteCommand;
192
+ const de_GeocodeCommand = async (output, context) => {
193
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
194
+ return de_CommandError(output, context);
195
+ }
196
+ const contents = (0, smithy_client_1.map)({
197
+ $metadata: deserializeMetadata(output),
198
+ [_PB]: [, output.headers[_xagpb]],
199
+ });
200
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
201
+ const doc = (0, smithy_client_1.take)(data, {
202
+ ResultItems: (_) => de_GeocodeResultItemList(_, context),
203
+ });
204
+ Object.assign(contents, doc);
205
+ return contents;
206
+ };
207
+ exports.de_GeocodeCommand = de_GeocodeCommand;
208
+ const de_GetPlaceCommand = async (output, context) => {
209
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
210
+ return de_CommandError(output, context);
211
+ }
212
+ const contents = (0, smithy_client_1.map)({
213
+ $metadata: deserializeMetadata(output),
214
+ [_PB]: [, output.headers[_xagpb]],
215
+ });
216
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
217
+ const doc = (0, smithy_client_1.take)(data, {
218
+ AccessPoints: (_) => de_AccessPointList(_, context),
219
+ AccessRestrictions: smithy_client_1._json,
220
+ Address: smithy_client_1._json,
221
+ AddressNumberCorrected: smithy_client_1.expectBoolean,
222
+ BusinessChains: smithy_client_1._json,
223
+ Categories: smithy_client_1._json,
224
+ Contacts: smithy_client_1._json,
225
+ FoodTypes: smithy_client_1._json,
226
+ MapView: (_) => de_BoundingBox(_, context),
227
+ OpeningHours: smithy_client_1._json,
228
+ Phonemes: smithy_client_1._json,
229
+ PlaceId: smithy_client_1.expectString,
230
+ PlaceType: smithy_client_1.expectString,
231
+ PoliticalView: smithy_client_1.expectString,
232
+ Position: (_) => de_Position(_, context),
233
+ PostalCodeDetails: smithy_client_1._json,
234
+ TimeZone: smithy_client_1._json,
235
+ Title: smithy_client_1.expectString,
236
+ });
237
+ Object.assign(contents, doc);
238
+ return contents;
239
+ };
240
+ exports.de_GetPlaceCommand = de_GetPlaceCommand;
241
+ const de_ReverseGeocodeCommand = async (output, context) => {
242
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
243
+ return de_CommandError(output, context);
244
+ }
245
+ const contents = (0, smithy_client_1.map)({
246
+ $metadata: deserializeMetadata(output),
247
+ [_PB]: [, output.headers[_xagpb]],
248
+ });
249
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
250
+ const doc = (0, smithy_client_1.take)(data, {
251
+ ResultItems: (_) => de_ReverseGeocodeResultItemList(_, context),
252
+ });
253
+ Object.assign(contents, doc);
254
+ return contents;
255
+ };
256
+ exports.de_ReverseGeocodeCommand = de_ReverseGeocodeCommand;
257
+ const de_SearchNearbyCommand = async (output, context) => {
258
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
259
+ return de_CommandError(output, context);
260
+ }
261
+ const contents = (0, smithy_client_1.map)({
262
+ $metadata: deserializeMetadata(output),
263
+ [_PB]: [, output.headers[_xagpb]],
264
+ });
265
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
266
+ const doc = (0, smithy_client_1.take)(data, {
267
+ NextToken: smithy_client_1.expectString,
268
+ ResultItems: (_) => de_SearchNearbyResultItemList(_, context),
269
+ });
270
+ Object.assign(contents, doc);
271
+ return contents;
272
+ };
273
+ exports.de_SearchNearbyCommand = de_SearchNearbyCommand;
274
+ const de_SearchTextCommand = async (output, context) => {
275
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
276
+ return de_CommandError(output, context);
277
+ }
278
+ const contents = (0, smithy_client_1.map)({
279
+ $metadata: deserializeMetadata(output),
280
+ [_PB]: [, output.headers[_xagpb]],
281
+ });
282
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
283
+ const doc = (0, smithy_client_1.take)(data, {
284
+ NextToken: smithy_client_1.expectString,
285
+ ResultItems: (_) => de_SearchTextResultItemList(_, context),
286
+ });
287
+ Object.assign(contents, doc);
288
+ return contents;
289
+ };
290
+ exports.de_SearchTextCommand = de_SearchTextCommand;
291
+ const de_SuggestCommand = async (output, context) => {
292
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
293
+ return de_CommandError(output, context);
294
+ }
295
+ const contents = (0, smithy_client_1.map)({
296
+ $metadata: deserializeMetadata(output),
297
+ [_PB]: [, output.headers[_xagpb]],
298
+ });
299
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
300
+ const doc = (0, smithy_client_1.take)(data, {
301
+ QueryRefinements: smithy_client_1._json,
302
+ ResultItems: (_) => de_SuggestResultItemList(_, context),
303
+ });
304
+ Object.assign(contents, doc);
305
+ return contents;
306
+ };
307
+ exports.de_SuggestCommand = de_SuggestCommand;
308
+ const de_CommandError = async (output, context) => {
309
+ const parsedOutput = {
310
+ ...output,
311
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
312
+ };
313
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
314
+ switch (errorCode) {
315
+ case "AccessDeniedException":
316
+ case "com.amazonaws.geoplaces#AccessDeniedException":
317
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
318
+ case "InternalServerException":
319
+ case "com.amazonaws.geoplaces#InternalServerException":
320
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
321
+ case "ThrottlingException":
322
+ case "com.amazonaws.geoplaces#ThrottlingException":
323
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
324
+ case "ValidationException":
325
+ case "com.amazonaws.geoplaces#ValidationException":
326
+ throw await de_ValidationExceptionRes(parsedOutput, context);
327
+ default:
328
+ const parsedBody = parsedOutput.body;
329
+ return throwDefaultError({
330
+ output,
331
+ parsedBody,
332
+ errorCode,
333
+ });
334
+ }
335
+ };
336
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(GeoPlacesServiceException_1.GeoPlacesServiceException);
337
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
338
+ const contents = (0, smithy_client_1.map)({});
339
+ const data = parsedOutput.body;
340
+ const doc = (0, smithy_client_1.take)(data, {
341
+ Message: [, smithy_client_1.expectString, `message`],
342
+ });
343
+ Object.assign(contents, doc);
344
+ const exception = new models_0_1.AccessDeniedException({
345
+ $metadata: deserializeMetadata(parsedOutput),
346
+ ...contents,
347
+ });
348
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
349
+ };
350
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
351
+ const contents = (0, smithy_client_1.map)({});
352
+ const data = parsedOutput.body;
353
+ const doc = (0, smithy_client_1.take)(data, {
354
+ Message: [, smithy_client_1.expectString, `message`],
355
+ });
356
+ Object.assign(contents, doc);
357
+ const exception = new models_0_1.InternalServerException({
358
+ $metadata: deserializeMetadata(parsedOutput),
359
+ ...contents,
360
+ });
361
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
362
+ };
363
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
364
+ const contents = (0, smithy_client_1.map)({});
365
+ const data = parsedOutput.body;
366
+ const doc = (0, smithy_client_1.take)(data, {
367
+ Message: [, smithy_client_1.expectString, `message`],
368
+ });
369
+ Object.assign(contents, doc);
370
+ const exception = new models_0_1.ThrottlingException({
371
+ $metadata: deserializeMetadata(parsedOutput),
372
+ ...contents,
373
+ });
374
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
375
+ };
376
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
377
+ const contents = (0, smithy_client_1.map)({});
378
+ const data = parsedOutput.body;
379
+ const doc = (0, smithy_client_1.take)(data, {
380
+ FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`],
381
+ Message: [, smithy_client_1.expectString, `message`],
382
+ Reason: [, smithy_client_1.expectString, `reason`],
383
+ });
384
+ Object.assign(contents, doc);
385
+ const exception = new models_0_1.ValidationException({
386
+ $metadata: deserializeMetadata(parsedOutput),
387
+ ...contents,
388
+ });
389
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
390
+ };
391
+ const se_AutocompleteFilter = (input, context) => {
392
+ return (0, smithy_client_1.take)(input, {
393
+ BoundingBox: (_) => se_BoundingBox(_, context),
394
+ Circle: (_) => se_FilterCircle(_, context),
395
+ IncludeCountries: smithy_client_1._json,
396
+ IncludePlaceTypes: smithy_client_1._json,
397
+ });
398
+ };
399
+ const se_BoundingBox = (input, context) => {
400
+ return input
401
+ .filter((e) => e != null)
402
+ .map((entry) => {
403
+ return (0, smithy_client_1.serializeFloat)(entry);
404
+ });
405
+ };
406
+ const se_FilterCircle = (input, context) => {
407
+ return (0, smithy_client_1.take)(input, {
408
+ Center: (_) => se_Position(_, context),
409
+ Radius: [],
410
+ });
411
+ };
412
+ const se_Position = (input, context) => {
413
+ return input
414
+ .filter((e) => e != null)
415
+ .map((entry) => {
416
+ return (0, smithy_client_1.serializeFloat)(entry);
417
+ });
418
+ };
419
+ const se_SearchNearbyFilter = (input, context) => {
420
+ return (0, smithy_client_1.take)(input, {
421
+ BoundingBox: (_) => se_BoundingBox(_, context),
422
+ ExcludeBusinessChains: smithy_client_1._json,
423
+ ExcludeCategories: smithy_client_1._json,
424
+ ExcludeFoodTypes: smithy_client_1._json,
425
+ IncludeBusinessChains: smithy_client_1._json,
426
+ IncludeCategories: smithy_client_1._json,
427
+ IncludeCountries: smithy_client_1._json,
428
+ IncludeFoodTypes: smithy_client_1._json,
429
+ });
430
+ };
431
+ const se_SearchTextFilter = (input, context) => {
432
+ return (0, smithy_client_1.take)(input, {
433
+ BoundingBox: (_) => se_BoundingBox(_, context),
434
+ Circle: (_) => se_FilterCircle(_, context),
435
+ IncludeCountries: smithy_client_1._json,
436
+ });
437
+ };
438
+ const se_SuggestFilter = (input, context) => {
439
+ return (0, smithy_client_1.take)(input, {
440
+ BoundingBox: (_) => se_BoundingBox(_, context),
441
+ Circle: (_) => se_FilterCircle(_, context),
442
+ IncludeCountries: smithy_client_1._json,
443
+ });
444
+ };
445
+ const de_AccessPoint = (output, context) => {
446
+ return (0, smithy_client_1.take)(output, {
447
+ Position: (_) => de_Position(_, context),
448
+ });
449
+ };
450
+ const de_AccessPointList = (output, context) => {
451
+ const retVal = (output || [])
452
+ .filter((e) => e != null)
453
+ .map((entry) => {
454
+ return de_AccessPoint(entry, context);
455
+ });
456
+ return retVal;
457
+ };
458
+ const de_AddressComponentMatchScores = (output, context) => {
459
+ return (0, smithy_client_1.take)(output, {
460
+ AddressNumber: smithy_client_1.limitedParseDouble,
461
+ Block: smithy_client_1.limitedParseDouble,
462
+ Building: smithy_client_1.limitedParseDouble,
463
+ Country: smithy_client_1.limitedParseDouble,
464
+ District: smithy_client_1.limitedParseDouble,
465
+ Intersection: (_) => de_MatchScoreList(_, context),
466
+ Locality: smithy_client_1.limitedParseDouble,
467
+ PostalCode: smithy_client_1.limitedParseDouble,
468
+ Region: smithy_client_1.limitedParseDouble,
469
+ SubBlock: smithy_client_1.limitedParseDouble,
470
+ SubDistrict: smithy_client_1.limitedParseDouble,
471
+ SubRegion: smithy_client_1.limitedParseDouble,
472
+ });
473
+ };
474
+ const de_BoundingBox = (output, context) => {
475
+ const retVal = (output || [])
476
+ .filter((e) => e != null)
477
+ .map((entry) => {
478
+ return (0, smithy_client_1.limitedParseDouble)(entry);
479
+ });
480
+ return retVal;
481
+ };
482
+ const de_ComponentMatchScores = (output, context) => {
483
+ return (0, smithy_client_1.take)(output, {
484
+ Address: (_) => de_AddressComponentMatchScores(_, context),
485
+ Title: smithy_client_1.limitedParseDouble,
486
+ });
487
+ };
488
+ const de_GeocodeResultItem = (output, context) => {
489
+ return (0, smithy_client_1.take)(output, {
490
+ AccessPoints: (_) => de_AccessPointList(_, context),
491
+ Address: smithy_client_1._json,
492
+ AddressNumberCorrected: smithy_client_1.expectBoolean,
493
+ Categories: smithy_client_1._json,
494
+ Distance: smithy_client_1.expectLong,
495
+ FoodTypes: smithy_client_1._json,
496
+ MapView: (_) => de_BoundingBox(_, context),
497
+ MatchScores: (_) => de_MatchScoreDetails(_, context),
498
+ PlaceId: smithy_client_1.expectString,
499
+ PlaceType: smithy_client_1.expectString,
500
+ PoliticalView: smithy_client_1.expectString,
501
+ Position: (_) => de_Position(_, context),
502
+ PostalCodeDetails: smithy_client_1._json,
503
+ TimeZone: smithy_client_1._json,
504
+ Title: smithy_client_1.expectString,
505
+ });
506
+ };
507
+ const de_GeocodeResultItemList = (output, context) => {
508
+ const retVal = (output || [])
509
+ .filter((e) => e != null)
510
+ .map((entry) => {
511
+ return de_GeocodeResultItem(entry, context);
512
+ });
513
+ return retVal;
514
+ };
515
+ const de_MatchScoreDetails = (output, context) => {
516
+ return (0, smithy_client_1.take)(output, {
517
+ Components: (_) => de_ComponentMatchScores(_, context),
518
+ Overall: smithy_client_1.limitedParseDouble,
519
+ });
520
+ };
521
+ const de_MatchScoreList = (output, context) => {
522
+ const retVal = (output || [])
523
+ .filter((e) => e != null)
524
+ .map((entry) => {
525
+ return (0, smithy_client_1.limitedParseDouble)(entry);
526
+ });
527
+ return retVal;
528
+ };
529
+ const de_Position = (output, context) => {
530
+ const retVal = (output || [])
531
+ .filter((e) => e != null)
532
+ .map((entry) => {
533
+ return (0, smithy_client_1.limitedParseDouble)(entry);
534
+ });
535
+ return retVal;
536
+ };
537
+ const de_ReverseGeocodeResultItem = (output, context) => {
538
+ return (0, smithy_client_1.take)(output, {
539
+ AccessPoints: (_) => de_AccessPointList(_, context),
540
+ Address: smithy_client_1._json,
541
+ AddressNumberCorrected: smithy_client_1.expectBoolean,
542
+ Categories: smithy_client_1._json,
543
+ Distance: smithy_client_1.expectLong,
544
+ FoodTypes: smithy_client_1._json,
545
+ MapView: (_) => de_BoundingBox(_, context),
546
+ PlaceId: smithy_client_1.expectString,
547
+ PlaceType: smithy_client_1.expectString,
548
+ PoliticalView: smithy_client_1.expectString,
549
+ Position: (_) => de_Position(_, context),
550
+ PostalCodeDetails: smithy_client_1._json,
551
+ TimeZone: smithy_client_1._json,
552
+ Title: smithy_client_1.expectString,
553
+ });
554
+ };
555
+ const de_ReverseGeocodeResultItemList = (output, context) => {
556
+ const retVal = (output || [])
557
+ .filter((e) => e != null)
558
+ .map((entry) => {
559
+ return de_ReverseGeocodeResultItem(entry, context);
560
+ });
561
+ return retVal;
562
+ };
563
+ const de_SearchNearbyResultItem = (output, context) => {
564
+ return (0, smithy_client_1.take)(output, {
565
+ AccessPoints: (_) => de_AccessPointList(_, context),
566
+ AccessRestrictions: smithy_client_1._json,
567
+ Address: smithy_client_1._json,
568
+ AddressNumberCorrected: smithy_client_1.expectBoolean,
569
+ BusinessChains: smithy_client_1._json,
570
+ Categories: smithy_client_1._json,
571
+ Contacts: smithy_client_1._json,
572
+ Distance: smithy_client_1.expectLong,
573
+ FoodTypes: smithy_client_1._json,
574
+ MapView: (_) => de_BoundingBox(_, context),
575
+ OpeningHours: smithy_client_1._json,
576
+ Phonemes: smithy_client_1._json,
577
+ PlaceId: smithy_client_1.expectString,
578
+ PlaceType: smithy_client_1.expectString,
579
+ PoliticalView: smithy_client_1.expectString,
580
+ Position: (_) => de_Position(_, context),
581
+ TimeZone: smithy_client_1._json,
582
+ Title: smithy_client_1.expectString,
583
+ });
584
+ };
585
+ const de_SearchNearbyResultItemList = (output, context) => {
586
+ const retVal = (output || [])
587
+ .filter((e) => e != null)
588
+ .map((entry) => {
589
+ return de_SearchNearbyResultItem(entry, context);
590
+ });
591
+ return retVal;
592
+ };
593
+ const de_SearchTextResultItem = (output, context) => {
594
+ return (0, smithy_client_1.take)(output, {
595
+ AccessPoints: (_) => de_AccessPointList(_, context),
596
+ AccessRestrictions: smithy_client_1._json,
597
+ Address: smithy_client_1._json,
598
+ AddressNumberCorrected: smithy_client_1.expectBoolean,
599
+ BusinessChains: smithy_client_1._json,
600
+ Categories: smithy_client_1._json,
601
+ Contacts: smithy_client_1._json,
602
+ Distance: smithy_client_1.expectLong,
603
+ FoodTypes: smithy_client_1._json,
604
+ MapView: (_) => de_BoundingBox(_, context),
605
+ OpeningHours: smithy_client_1._json,
606
+ Phonemes: smithy_client_1._json,
607
+ PlaceId: smithy_client_1.expectString,
608
+ PlaceType: smithy_client_1.expectString,
609
+ PoliticalView: smithy_client_1.expectString,
610
+ Position: (_) => de_Position(_, context),
611
+ TimeZone: smithy_client_1._json,
612
+ Title: smithy_client_1.expectString,
613
+ });
614
+ };
615
+ const de_SearchTextResultItemList = (output, context) => {
616
+ const retVal = (output || [])
617
+ .filter((e) => e != null)
618
+ .map((entry) => {
619
+ return de_SearchTextResultItem(entry, context);
620
+ });
621
+ return retVal;
622
+ };
623
+ const de_SuggestPlaceResult = (output, context) => {
624
+ return (0, smithy_client_1.take)(output, {
625
+ AccessPoints: (_) => de_AccessPointList(_, context),
626
+ AccessRestrictions: smithy_client_1._json,
627
+ Address: smithy_client_1._json,
628
+ BusinessChains: smithy_client_1._json,
629
+ Categories: smithy_client_1._json,
630
+ Distance: smithy_client_1.expectLong,
631
+ FoodTypes: smithy_client_1._json,
632
+ MapView: (_) => de_BoundingBox(_, context),
633
+ Phonemes: smithy_client_1._json,
634
+ PlaceId: smithy_client_1.expectString,
635
+ PlaceType: smithy_client_1.expectString,
636
+ PoliticalView: smithy_client_1.expectString,
637
+ Position: (_) => de_Position(_, context),
638
+ TimeZone: smithy_client_1._json,
639
+ });
640
+ };
641
+ const de_SuggestResultItem = (output, context) => {
642
+ return (0, smithy_client_1.take)(output, {
643
+ Highlights: smithy_client_1._json,
644
+ Place: (_) => de_SuggestPlaceResult(_, context),
645
+ Query: smithy_client_1._json,
646
+ SuggestResultItemType: smithy_client_1.expectString,
647
+ Title: smithy_client_1.expectString,
648
+ });
649
+ };
650
+ const de_SuggestResultItemList = (output, context) => {
651
+ const retVal = (output || [])
652
+ .filter((e) => e != null)
653
+ .map((entry) => {
654
+ return de_SuggestResultItem(entry, context);
655
+ });
656
+ return retVal;
657
+ };
658
+ const de_ValidationExceptionField = (output, context) => {
659
+ return (0, smithy_client_1.take)(output, {
660
+ Message: [, smithy_client_1.expectString, `message`],
661
+ Name: [, smithy_client_1.expectString, `name`],
662
+ });
663
+ };
664
+ const de_ValidationExceptionFieldList = (output, context) => {
665
+ const retVal = (output || [])
666
+ .filter((e) => e != null)
667
+ .map((entry) => {
668
+ return de_ValidationExceptionField(entry, context);
669
+ });
670
+ return retVal;
671
+ };
672
+ const deserializeMetadata = (output) => ({
673
+ httpStatusCode: output.statusCode,
674
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
675
+ extendedRequestId: output.headers["x-amz-id-2"],
676
+ cfId: output.headers["x-amz-cf-id"],
677
+ });
678
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
679
+ const _AF = "AdditionalFeatures";
680
+ const _IU = "IntendedUse";
681
+ const _K = "Key";
682
+ const _L = "Language";
683
+ const _PB = "PricingBucket";
684
+ const _PV = "PoliticalView";
685
+ const _af = "additional-features";
686
+ const _iu = "intended-use";
687
+ const _k = "key";
688
+ const _l = "language";
689
+ const _pv = "political-view";
690
+ const _xagpb = "x-amz-geo-pricing-bucket";