@azure-rest/maps-route 1.0.0-beta.3 → 1.0.0-beta.5

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 (258) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +81 -67
  3. package/dist/browser/generated/clientDefinitions.d.ts +617 -0
  4. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  5. package/dist/browser/generated/clientDefinitions.js +4 -0
  6. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  7. package/dist/browser/generated/index.d.ts +12 -0
  8. package/dist/browser/generated/index.d.ts.map +1 -0
  9. package/dist/browser/generated/index.js +14 -0
  10. package/dist/browser/generated/index.js.map +1 -0
  11. package/dist/browser/generated/isUnexpected.d.ts +7 -0
  12. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  13. package/dist/browser/generated/isUnexpected.js +79 -0
  14. package/dist/browser/generated/isUnexpected.js.map +1 -0
  15. package/dist/browser/generated/logger.d.ts +2 -0
  16. package/dist/browser/generated/logger.d.ts.map +1 -0
  17. package/dist/browser/generated/logger.js +5 -0
  18. package/dist/browser/generated/logger.js.map +1 -0
  19. package/dist/browser/generated/mapsRouteClient.d.ts +15 -0
  20. package/dist/browser/generated/mapsRouteClient.d.ts.map +1 -0
  21. package/dist/browser/generated/mapsRouteClient.js +42 -0
  22. package/dist/browser/generated/mapsRouteClient.js.map +1 -0
  23. package/dist/browser/generated/models.d.ts +130 -0
  24. package/dist/browser/generated/models.d.ts.map +1 -0
  25. package/dist/browser/generated/models.js +4 -0
  26. package/dist/browser/generated/models.js.map +1 -0
  27. package/dist/browser/generated/outputModels.d.ts +286 -0
  28. package/dist/browser/generated/outputModels.d.ts.map +1 -0
  29. package/dist/browser/generated/outputModels.js +4 -0
  30. package/dist/browser/generated/outputModels.js.map +1 -0
  31. package/dist/browser/generated/parameters.d.ts +937 -0
  32. package/dist/browser/generated/parameters.d.ts.map +1 -0
  33. package/dist/browser/generated/parameters.js +4 -0
  34. package/dist/browser/generated/parameters.js.map +1 -0
  35. package/dist/browser/generated/pollingHelper.d.ts +76 -0
  36. package/dist/browser/generated/pollingHelper.d.ts.map +1 -0
  37. package/dist/browser/generated/pollingHelper.js +105 -0
  38. package/dist/browser/generated/pollingHelper.js.map +1 -0
  39. package/dist/browser/generated/responses.d.ts +1409 -0
  40. package/dist/browser/generated/responses.d.ts.map +1 -0
  41. package/dist/browser/generated/responses.js +4 -0
  42. package/dist/browser/generated/responses.js.map +1 -0
  43. package/dist/browser/generated/serializeHelper.d.ts +2 -0
  44. package/dist/browser/generated/serializeHelper.d.ts.map +1 -0
  45. package/dist/browser/generated/serializeHelper.js +13 -0
  46. package/dist/browser/generated/serializeHelper.js.map +1 -0
  47. package/dist/browser/helpers.d.ts +18 -0
  48. package/dist/browser/helpers.d.ts.map +1 -0
  49. package/{dist-esm/src → dist/browser}/helpers.js +1 -1
  50. package/dist/browser/helpers.js.map +1 -0
  51. package/dist/browser/index.d.ts +5 -0
  52. package/dist/browser/index.d.ts.map +1 -0
  53. package/dist/browser/index.js +7 -0
  54. package/dist/browser/index.js.map +1 -0
  55. package/dist/browser/mapsRoute.d.ts +53 -0
  56. package/dist/browser/mapsRoute.d.ts.map +1 -0
  57. package/{dist-esm/src → dist/browser}/mapsRoute.js +5 -5
  58. package/dist/browser/mapsRoute.js.map +1 -0
  59. package/dist/browser/package.json +3 -0
  60. package/dist/commonjs/generated/clientDefinitions.d.ts +617 -0
  61. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  62. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  63. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  64. package/dist/commonjs/generated/index.d.ts +12 -0
  65. package/dist/commonjs/generated/index.d.ts.map +1 -0
  66. package/dist/commonjs/generated/index.js +17 -0
  67. package/dist/commonjs/generated/index.js.map +1 -0
  68. package/dist/commonjs/generated/isUnexpected.d.ts +7 -0
  69. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  70. package/dist/commonjs/generated/isUnexpected.js +82 -0
  71. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  72. package/dist/commonjs/generated/logger.d.ts +2 -0
  73. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  74. package/dist/commonjs/generated/logger.js +8 -0
  75. package/dist/commonjs/generated/logger.js.map +1 -0
  76. package/dist/commonjs/generated/mapsRouteClient.d.ts +15 -0
  77. package/dist/commonjs/generated/mapsRouteClient.d.ts.map +1 -0
  78. package/dist/commonjs/generated/mapsRouteClient.js +45 -0
  79. package/dist/commonjs/generated/mapsRouteClient.js.map +1 -0
  80. package/dist/commonjs/generated/models.d.ts +130 -0
  81. package/dist/commonjs/generated/models.d.ts.map +1 -0
  82. package/dist/commonjs/generated/models.js +5 -0
  83. package/dist/commonjs/generated/models.js.map +1 -0
  84. package/dist/commonjs/generated/outputModels.d.ts +286 -0
  85. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  86. package/dist/commonjs/generated/outputModels.js +5 -0
  87. package/dist/commonjs/generated/outputModels.js.map +1 -0
  88. package/dist/commonjs/generated/parameters.d.ts +937 -0
  89. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  90. package/dist/commonjs/generated/parameters.js +5 -0
  91. package/dist/commonjs/generated/parameters.js.map +1 -0
  92. package/dist/commonjs/generated/pollingHelper.d.ts +76 -0
  93. package/dist/commonjs/generated/pollingHelper.d.ts.map +1 -0
  94. package/dist/commonjs/generated/pollingHelper.js +108 -0
  95. package/dist/commonjs/generated/pollingHelper.js.map +1 -0
  96. package/dist/commonjs/generated/responses.d.ts +1409 -0
  97. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  98. package/dist/commonjs/generated/responses.js +5 -0
  99. package/dist/commonjs/generated/responses.js.map +1 -0
  100. package/dist/commonjs/generated/serializeHelper.d.ts +2 -0
  101. package/dist/commonjs/generated/serializeHelper.d.ts.map +1 -0
  102. package/dist/commonjs/generated/serializeHelper.js +16 -0
  103. package/dist/commonjs/generated/serializeHelper.js.map +1 -0
  104. package/dist/commonjs/helpers.d.ts +18 -0
  105. package/dist/commonjs/helpers.d.ts.map +1 -0
  106. package/dist/commonjs/helpers.js +47 -0
  107. package/dist/commonjs/helpers.js.map +1 -0
  108. package/dist/commonjs/index.d.ts +5 -0
  109. package/dist/commonjs/index.d.ts.map +1 -0
  110. package/dist/commonjs/index.js +10 -0
  111. package/dist/commonjs/index.js.map +1 -0
  112. package/dist/commonjs/mapsRoute.d.ts +53 -0
  113. package/dist/commonjs/mapsRoute.d.ts.map +1 -0
  114. package/dist/commonjs/mapsRoute.js +44 -0
  115. package/dist/commonjs/mapsRoute.js.map +1 -0
  116. package/dist/commonjs/package.json +3 -0
  117. package/dist/commonjs/tsdoc-metadata.json +11 -0
  118. package/dist/esm/generated/clientDefinitions.d.ts +617 -0
  119. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  120. package/dist/esm/generated/clientDefinitions.js +4 -0
  121. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  122. package/dist/esm/generated/index.d.ts +12 -0
  123. package/dist/esm/generated/index.d.ts.map +1 -0
  124. package/dist/esm/generated/index.js +14 -0
  125. package/dist/esm/generated/index.js.map +1 -0
  126. package/dist/esm/generated/isUnexpected.d.ts +7 -0
  127. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  128. package/dist/esm/generated/isUnexpected.js +79 -0
  129. package/dist/esm/generated/isUnexpected.js.map +1 -0
  130. package/dist/esm/generated/logger.d.ts +2 -0
  131. package/dist/esm/generated/logger.d.ts.map +1 -0
  132. package/dist/esm/generated/logger.js +5 -0
  133. package/dist/esm/generated/logger.js.map +1 -0
  134. package/dist/esm/generated/mapsRouteClient.d.ts +15 -0
  135. package/dist/esm/generated/mapsRouteClient.d.ts.map +1 -0
  136. package/dist/esm/generated/mapsRouteClient.js +42 -0
  137. package/dist/esm/generated/mapsRouteClient.js.map +1 -0
  138. package/dist/esm/generated/models.d.ts +130 -0
  139. package/dist/esm/generated/models.d.ts.map +1 -0
  140. package/dist/esm/generated/models.js +4 -0
  141. package/dist/esm/generated/models.js.map +1 -0
  142. package/dist/esm/generated/outputModels.d.ts +286 -0
  143. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  144. package/dist/esm/generated/outputModels.js +4 -0
  145. package/dist/esm/generated/outputModels.js.map +1 -0
  146. package/dist/esm/generated/parameters.d.ts +937 -0
  147. package/dist/esm/generated/parameters.d.ts.map +1 -0
  148. package/dist/esm/generated/parameters.js +4 -0
  149. package/dist/esm/generated/parameters.js.map +1 -0
  150. package/dist/esm/generated/pollingHelper.d.ts +76 -0
  151. package/dist/esm/generated/pollingHelper.d.ts.map +1 -0
  152. package/dist/esm/generated/pollingHelper.js +105 -0
  153. package/dist/esm/generated/pollingHelper.js.map +1 -0
  154. package/dist/esm/generated/responses.d.ts +1409 -0
  155. package/dist/esm/generated/responses.d.ts.map +1 -0
  156. package/dist/esm/generated/responses.js +4 -0
  157. package/dist/esm/generated/responses.js.map +1 -0
  158. package/dist/esm/generated/serializeHelper.d.ts +2 -0
  159. package/dist/esm/generated/serializeHelper.d.ts.map +1 -0
  160. package/dist/esm/generated/serializeHelper.js +13 -0
  161. package/dist/esm/generated/serializeHelper.js.map +1 -0
  162. package/dist/esm/helpers.d.ts +18 -0
  163. package/dist/esm/helpers.d.ts.map +1 -0
  164. package/dist/esm/helpers.js +43 -0
  165. package/dist/esm/helpers.js.map +1 -0
  166. package/dist/esm/index.d.ts +5 -0
  167. package/dist/esm/index.d.ts.map +1 -0
  168. package/dist/esm/index.js +7 -0
  169. package/dist/esm/index.js.map +1 -0
  170. package/dist/esm/mapsRoute.d.ts +53 -0
  171. package/dist/esm/mapsRoute.d.ts.map +1 -0
  172. package/dist/esm/mapsRoute.js +40 -0
  173. package/dist/esm/mapsRoute.js.map +1 -0
  174. package/dist/esm/package.json +3 -0
  175. package/dist/react-native/generated/clientDefinitions.d.ts +617 -0
  176. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  177. package/dist/react-native/generated/clientDefinitions.js +4 -0
  178. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  179. package/dist/react-native/generated/index.d.ts +12 -0
  180. package/dist/react-native/generated/index.d.ts.map +1 -0
  181. package/dist/react-native/generated/index.js +14 -0
  182. package/dist/react-native/generated/index.js.map +1 -0
  183. package/dist/react-native/generated/isUnexpected.d.ts +7 -0
  184. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  185. package/dist/react-native/generated/isUnexpected.js +79 -0
  186. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  187. package/dist/react-native/generated/logger.d.ts +2 -0
  188. package/dist/react-native/generated/logger.d.ts.map +1 -0
  189. package/dist/react-native/generated/logger.js +5 -0
  190. package/dist/react-native/generated/logger.js.map +1 -0
  191. package/dist/react-native/generated/mapsRouteClient.d.ts +15 -0
  192. package/dist/react-native/generated/mapsRouteClient.d.ts.map +1 -0
  193. package/dist/react-native/generated/mapsRouteClient.js +42 -0
  194. package/dist/react-native/generated/mapsRouteClient.js.map +1 -0
  195. package/dist/react-native/generated/models.d.ts +130 -0
  196. package/dist/react-native/generated/models.d.ts.map +1 -0
  197. package/dist/react-native/generated/models.js +4 -0
  198. package/dist/react-native/generated/models.js.map +1 -0
  199. package/dist/react-native/generated/outputModels.d.ts +286 -0
  200. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  201. package/dist/react-native/generated/outputModels.js +4 -0
  202. package/dist/react-native/generated/outputModels.js.map +1 -0
  203. package/dist/react-native/generated/parameters.d.ts +937 -0
  204. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  205. package/dist/react-native/generated/parameters.js +4 -0
  206. package/dist/react-native/generated/parameters.js.map +1 -0
  207. package/dist/react-native/generated/pollingHelper.d.ts +76 -0
  208. package/dist/react-native/generated/pollingHelper.d.ts.map +1 -0
  209. package/dist/react-native/generated/pollingHelper.js +105 -0
  210. package/dist/react-native/generated/pollingHelper.js.map +1 -0
  211. package/dist/react-native/generated/responses.d.ts +1409 -0
  212. package/dist/react-native/generated/responses.d.ts.map +1 -0
  213. package/dist/react-native/generated/responses.js +4 -0
  214. package/dist/react-native/generated/responses.js.map +1 -0
  215. package/dist/react-native/generated/serializeHelper.d.ts +2 -0
  216. package/dist/react-native/generated/serializeHelper.d.ts.map +1 -0
  217. package/dist/react-native/generated/serializeHelper.js +13 -0
  218. package/dist/react-native/generated/serializeHelper.js.map +1 -0
  219. package/dist/react-native/helpers.d.ts +18 -0
  220. package/dist/react-native/helpers.d.ts.map +1 -0
  221. package/dist/react-native/helpers.js +43 -0
  222. package/dist/react-native/helpers.js.map +1 -0
  223. package/dist/react-native/index.d.ts +5 -0
  224. package/dist/react-native/index.d.ts.map +1 -0
  225. package/dist/react-native/index.js +7 -0
  226. package/dist/react-native/index.js.map +1 -0
  227. package/dist/react-native/mapsRoute.d.ts +53 -0
  228. package/dist/react-native/mapsRoute.d.ts.map +1 -0
  229. package/dist/react-native/mapsRoute.js +40 -0
  230. package/dist/react-native/mapsRoute.js.map +1 -0
  231. package/dist/react-native/package.json +3 -0
  232. package/package.json +80 -63
  233. package/dist/index.js +0 -257
  234. package/dist/index.js.map +0 -1
  235. package/dist-esm/src/generated/clientDefinitions.js +0 -4
  236. package/dist-esm/src/generated/clientDefinitions.js.map +0 -1
  237. package/dist-esm/src/generated/index.js +0 -13
  238. package/dist-esm/src/generated/index.js.map +0 -1
  239. package/dist-esm/src/generated/isUnexpected.js +0 -76
  240. package/dist-esm/src/generated/isUnexpected.js.map +0 -1
  241. package/dist-esm/src/generated/mapsRouteClient.js +0 -30
  242. package/dist-esm/src/generated/mapsRouteClient.js.map +0 -1
  243. package/dist-esm/src/generated/models.js +0 -4
  244. package/dist-esm/src/generated/models.js.map +0 -1
  245. package/dist-esm/src/generated/outputModels.js +0 -4
  246. package/dist-esm/src/generated/outputModels.js.map +0 -1
  247. package/dist-esm/src/generated/parameters.js +0 -4
  248. package/dist-esm/src/generated/parameters.js.map +0 -1
  249. package/dist-esm/src/generated/pollingHelper.js +0 -55
  250. package/dist-esm/src/generated/pollingHelper.js.map +0 -1
  251. package/dist-esm/src/generated/responses.js +0 -4
  252. package/dist-esm/src/generated/responses.js.map +0 -1
  253. package/dist-esm/src/helpers.js.map +0 -1
  254. package/dist-esm/src/index.js +0 -7
  255. package/dist-esm/src/index.js.map +0 -1
  256. package/dist-esm/src/mapsRoute.js.map +0 -1
  257. package/review/maps-route.api.md +0 -911
  258. package/types/maps-route-rest.d.ts +0 -3431
@@ -1,76 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- const responseMap = {
4
- "POST /route/matrix/{format}": ["200", "202"],
5
- "GET /route/matrix/{format}": ["200", "202"],
6
- "POST /route/matrix/sync/{format}": ["200"],
7
- "GET /route/directions/{format}": ["200"],
8
- "POST /route/directions/{format}": ["200"],
9
- "GET /route/range/{format}": ["200"],
10
- "POST /route/directions/batch/{format}": ["200", "202"],
11
- "GET /route/directions/batch/{format}": ["200", "202"],
12
- "POST /route/directions/batch/sync/{format}": ["200"]
13
- };
14
- export function isUnexpected(response) {
15
- const lroOriginal = response.headers["x-ms-original-url"];
16
- const url = new URL(lroOriginal ?? response.request.url);
17
- const method = response.request.method;
18
- let pathDetails = responseMap[`${method} ${url.pathname}`];
19
- if (!pathDetails) {
20
- pathDetails = geParametrizedPathSuccess(method, url.pathname);
21
- }
22
- return !pathDetails.includes(response.status);
23
- }
24
- function geParametrizedPathSuccess(method, path) {
25
- const pathParts = path.split("/");
26
- // Iterate the responseMap to find a match
27
- for (const [key, value] of Object.entries(responseMap)) {
28
- // Extracting the path from the map key which is in format
29
- // GET /path/foo
30
- if (!key.startsWith(method)) {
31
- continue;
32
- }
33
- const candidatePath = getPathFromMapKey(key);
34
- // Get each part of the url path
35
- const candidateParts = candidatePath.split("/");
36
- // If the candidate and actual paths don't match in size
37
- // we move on to the next candidate path
38
- if (candidateParts.length === pathParts.length &&
39
- hasParametrizedPath(key)) {
40
- // track if we have found a match to return the values found.
41
- let found = true;
42
- for (let i = 0; i < candidateParts.length; i++) {
43
- if (candidateParts[i]?.startsWith("{") &&
44
- candidateParts[i]?.endsWith("}")) {
45
- // If the current part of the candidate is a "template" part
46
- // it is a match with the actual path part on hand
47
- // skip as the parameterized part can match anything
48
- continue;
49
- }
50
- // If the candidate part is not a template and
51
- // the parts don't match mark the candidate as not found
52
- // to move on with the next candidate path.
53
- if (candidateParts[i] !== pathParts[i]) {
54
- found = false;
55
- break;
56
- }
57
- }
58
- // We finished evaluating the current candidate parts
59
- // if all parts matched we return the success values form
60
- // the path mapping.
61
- if (found) {
62
- return value;
63
- }
64
- }
65
- }
66
- // No match was found, return an empty array.
67
- return [];
68
- }
69
- function hasParametrizedPath(path) {
70
- return path.includes("/{");
71
- }
72
- function getPathFromMapKey(mapKey) {
73
- const pathStart = mapKey.indexOf("/");
74
- return mapKey.slice(pathStart);
75
- }
76
- //# sourceMappingURL=isUnexpected.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiBlC,MAAM,WAAW,GAA6B;IAC5C,6BAA6B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC7C,4BAA4B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC5C,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,gCAAgC,EAAE,CAAC,KAAK,CAAC;IACzC,iCAAiC,EAAE,CAAC,KAAK,CAAC;IAC1C,2BAA2B,EAAE,CAAC,KAAK,CAAC;IACpC,uCAAuC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACvD,sCAAsC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACtD,4CAA4C,EAAE,CAAC,KAAK,CAAC;CACtD,CAAC;AA2BF,MAAM,UAAU,YAAY,CAC1B,QAYuD;IASvD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE;QAChB,WAAW,GAAG,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC/D;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAc,EAAE,IAAY;IAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,0CAA0C;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACtD,0DAA0D;QAC1D,gBAAgB;QAChB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC3B,SAAS;SACV;QACD,MAAM,aAAa,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC7C,gCAAgC;QAChC,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEhD,wDAAwD;QACxD,wCAAwC;QACxC,IACE,cAAc,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;YAC1C,mBAAmB,CAAC,GAAG,CAAC,EACxB;YACA,6DAA6D;YAC7D,IAAI,KAAK,GAAG,IAAI,CAAC;YACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,IACE,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC;oBAClC,cAAc,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,EAChC;oBACA,4DAA4D;oBAC5D,kDAAkD;oBAClD,oDAAoD;oBACpD,SAAS;iBACV;gBAED,8CAA8C;gBAC9C,wDAAwD;gBACxD,2CAA2C;gBAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE;oBACtC,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;iBACP;aACF;YAED,qDAAqD;YACrD,yDAAyD;YACzD,oBAAoB;YACpB,IAAI,KAAK,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;SACF;KACF;IAED,6CAA6C;IAC7C,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n RouteRequestRouteMatrixSync200Response,\n RouteRequestRouteMatrixSync408Response,\n RouteRequestRouteMatrixSyncDefaultResponse,\n RouteGetRouteDirections200Response,\n RouteGetRouteDirectionsDefaultResponse,\n RouteGetRouteDirectionsWithAdditionalParameters200Response,\n RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse,\n RouteGetRouteRange200Response,\n RouteGetRouteRangeDefaultResponse,\n RouteRequestRouteDirectionsBatchSync200Response,\n RouteRequestRouteDirectionsBatchSync408Response,\n RouteRequestRouteDirectionsBatchSyncDefaultResponse\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /route/matrix/{format}\": [\"200\", \"202\"],\n \"GET /route/matrix/{format}\": [\"200\", \"202\"],\n \"POST /route/matrix/sync/{format}\": [\"200\"],\n \"GET /route/directions/{format}\": [\"200\"],\n \"POST /route/directions/{format}\": [\"200\"],\n \"GET /route/range/{format}\": [\"200\"],\n \"POST /route/directions/batch/{format}\": [\"200\", \"202\"],\n \"GET /route/directions/batch/{format}\": [\"200\", \"202\"],\n \"POST /route/directions/batch/sync/{format}\": [\"200\"]\n};\n\nexport function isUnexpected(\n response:\n | RouteRequestRouteMatrixSync200Response\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n): response is RouteRequestRouteMatrixSync408Response;\nexport function isUnexpected(\n response:\n | RouteGetRouteDirections200Response\n | RouteGetRouteDirectionsDefaultResponse\n): response is RouteGetRouteDirectionsDefaultResponse;\nexport function isUnexpected(\n response:\n | RouteGetRouteDirectionsWithAdditionalParameters200Response\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n): response is RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse;\nexport function isUnexpected(\n response: RouteGetRouteRange200Response | RouteGetRouteRangeDefaultResponse\n): response is RouteGetRouteRangeDefaultResponse;\nexport function isUnexpected(\n response:\n | RouteRequestRouteDirectionsBatchSync200Response\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse\n): response is RouteRequestRouteDirectionsBatchSync408Response;\nexport function isUnexpected(\n response:\n | RouteRequestRouteMatrixSync200Response\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n | RouteGetRouteDirections200Response\n | RouteGetRouteDirectionsDefaultResponse\n | RouteGetRouteDirectionsWithAdditionalParameters200Response\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n | RouteGetRouteRange200Response\n | RouteGetRouteRangeDefaultResponse\n | RouteRequestRouteDirectionsBatchSync200Response\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse\n): response is\n | RouteRequestRouteMatrixSync408Response\n | RouteRequestRouteMatrixSyncDefaultResponse\n | RouteGetRouteDirectionsDefaultResponse\n | RouteGetRouteDirectionsWithAdditionalParametersDefaultResponse\n | RouteGetRouteRangeDefaultResponse\n | RouteRequestRouteDirectionsBatchSync408Response\n | RouteRequestRouteDirectionsBatchSyncDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = geParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (\n candidateParts.length === pathParts.length &&\n hasParametrizedPath(key)\n ) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.endsWith(\"}\")\n ) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -1,30 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getClient } from "@azure-rest/core-client";
4
- /**
5
- * Initialize a new instance of the class MapsRouteClient class.
6
- * @param credentials type: KeyCredential
7
- */
8
- export default function createClient(credentials, options = {}) {
9
- const baseUrl = options.baseUrl ?? `https://atlas.microsoft.com`;
10
- options.apiVersion = options.apiVersion ?? "1.0";
11
- options = {
12
- ...options,
13
- credentials: {
14
- apiKeyHeaderName: "subscription-key"
15
- }
16
- };
17
- const userAgentInfo = `azsdk-js-maps-route-rest/1.0.0-beta.1`;
18
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
19
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
20
- : `${userAgentInfo}`;
21
- options = {
22
- ...options,
23
- userAgentOptions: {
24
- userAgentPrefix
25
- }
26
- };
27
- const client = getClient(baseUrl, credentials, options);
28
- return client;
29
- }
30
- //# sourceMappingURL=mapsRouteClient.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapsRouteClient.js","sourceRoot":"","sources":["../../../src/generated/mapsRouteClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAA0B,EAC1B,UAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,6BAA6B,CAAC;IACjE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC;IACjD,OAAO,GAAG;QACR,GAAG,OAAO;QACV,WAAW,EAAE;YACX,gBAAgB,EAAE,kBAAkB;SACrC;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,uCAAuC,CAAC;IAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,GAAG;QACR,GAAG,OAAO;QACV,gBAAgB,EAAE;YAChB,eAAe;SAChB;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAoB,CAAC;IAE3E,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { MapsRouteClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of the class MapsRouteClient class.\n * @param credentials type: KeyCredential\n */\nexport default function createClient(\n credentials: KeyCredential,\n options: ClientOptions = {}\n): MapsRouteClient {\n const baseUrl = options.baseUrl ?? `https://atlas.microsoft.com`;\n options.apiVersion = options.apiVersion ?? \"1.0\";\n options = {\n ...options,\n credentials: {\n apiKeyHeaderName: \"subscription-key\"\n }\n };\n\n const userAgentInfo = `azsdk-js-maps-route-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix\n }\n };\n\n const client = getClient(baseUrl, credentials, options) as MapsRouteClient;\n\n return client;\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** An object with a matrix of coordinates. */\nexport interface RouteMatrixQuery {\n /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\n origins: GeoJsonMultiPoint;\n /** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\n destinations: GeoJsonMultiPoint;\n}\n\n/** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\nexport interface GeoJsonMultiPoint\n extends GeoJsonGeometryParent,\n GeoJsonMultiPointData {\n type: \"MultiPoint\";\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport interface GeoJsonGeometryParent extends GeoJsonObjectParent {\n type:\n | \"GeoJsonGeometry\"\n | \"MultiPoint\"\n | \"MultiPolygon\"\n | \"Point\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"GeometryCollection\";\n}\n\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport interface GeoJsonObjectParent {\n type:\n | \"GeoJsonObject\"\n | \"GeoJsonGeometry\"\n | \"MultiPoint\"\n | \"MultiPolygon\"\n | \"Point\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"GeometryCollection\"\n | \"Feature\"\n | \"FeatureCollection\";\n}\n\n/** Data contained by a `GeoJson MultiPoint`. */\nexport interface GeoJsonMultiPointData {\n /** Coordinates for the `GeoJson MultiPoint` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** Post body parameters for Route directions. */\nexport interface RouteDirectionParameters {\n /**\n * A GeoJSON Geometry collection representing sequence of coordinates used as input for route reconstruction and for calculating zero or more alternative routes to this reference route.\n * - The provided sequence of supporting points is used as input for route reconstruction.\n * - The alternative routes are calculated between the origin and destination points specified in the base path parameter locations.\n * - If both _minDeviationDistance_ and _minDeviationTime_ are set to zero, then these origin and destination points are\n * expected to be at (or very near) the beginning and end of the reference route, respectively.\n * - Intermediate locations (_waypoints_) are not supported when using <_supportingPoints_>.\n * - The reference route may contain traffic incidents of type _ROAD_CLOSURE_, which are\n * ignored for the calculation of the reference route's travel time and traffic delay.\n */\n supportingPoints?: Record<string, unknown>;\n /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which all toll roads with vignettes are to be avoided, e.g. \"AUS,CHE\". Toll roads with vignettes in countries not in the list are unaffected. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */\n avoidVignette?: Array<string>;\n /** This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which toll roads with vignettes are allowed, e.g. \"AUS,CHE\". Specifying **allowVignette** with some countries X is equivalent to specifying **avoidVignette** with all countries but X. Specifying **allowVignette** with an empty list is the same as avoiding all toll roads with vignettes. Note: It is an error to specify both **avoidVignette** and **allowVignette**. */\n allowVignette?: Array<string>;\n /** A GeoJSON MultiPolygon representing list of areas to avoid. Only rectangle polygons are supported. The maximum size of a rectangle is about 160x160 km. Maximum number of avoided areas is **10**. It cannot cross the 180th meridian. It must be between -80 and +80 degrees of latitude. */\n avoidAreas?: GeoJsonMultiPolygon;\n}\n\n/** A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details. */\nexport interface GeoJsonMultiPolygon\n extends GeoJsonGeometryParent,\n GeoJsonMultiPolygonData {\n type: \"MultiPolygon\";\n}\n\nexport interface GeoJsonMultiPolygonData {\n /** Contains a list of valid `GeoJSON Polygon` objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n coordinates: Array<Array<Array<Array<number>>>>;\n}\n\n/** This type represents the request body for the Batch service. */\nexport interface BatchRequest {\n /** The list of queries to process. */\n batchItems?: Array<BatchRequestItem>;\n}\n\n/** Batch request object */\nexport interface BatchRequestItem {\n /** This parameter contains a query string used to perform an unstructured geocoding operation. The query string will be passed verbatim to the search API for processing. */\n query?: string;\n}\n\n/** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */\nexport interface GeoJsonPoint extends GeoJsonGeometryParent, GeoJsonPointData {\n type: \"Point\";\n}\n\n/** Data contained by a `GeoJson Point`. */\nexport interface GeoJsonPointData {\n /** A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details. */\n coordinates: Array<number>;\n}\n\n/** A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details. */\nexport interface GeoJsonLineString\n extends GeoJsonGeometryParent,\n GeoJsonLineStringData {\n type: \"LineString\";\n}\n\nexport interface GeoJsonLineStringData {\n /** Coordinates for the `GeoJson LineString` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details. */\nexport interface GeoJsonMultiLineString\n extends GeoJsonGeometryParent,\n GeoJsonMultiLineStringData {\n type: \"MultiLineString\";\n}\n\nexport interface GeoJsonMultiLineStringData {\n /** Coordinates for the `GeoJson MultiLineString` geometry. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details. */\nexport interface GeoJsonPolygon\n extends GeoJsonGeometryParent,\n GeoJsonPolygonData {\n type: \"Polygon\";\n}\n\nexport interface GeoJsonPolygonData {\n /** Coordinates for the `GeoJson Polygon` geometry type. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details. */\nexport interface GeoJsonGeometryCollection\n extends GeoJsonGeometryParent,\n GeoJsonGeometryCollectionData {\n type: \"GeometryCollection\";\n}\n\nexport interface GeoJsonGeometryCollectionData {\n /** Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n geometries: Array<GeoJsonGeometry>;\n}\n\n/** A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details. */\nexport interface GeoJsonFeature\n extends GeoJsonObjectParent,\n GeoJsonFeatureData {\n type: \"Feature\";\n}\n\nexport interface GeoJsonFeatureData {\n /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\n geometry: GeoJsonGeometry;\n /** Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value */\n properties?: Record<string, unknown>;\n /** Identifier for the feature. */\n id?: string;\n /** The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value. */\n featureType?: string;\n}\n\n/** A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. */\nexport interface GeoJsonFeatureCollection\n extends GeoJsonObjectParent,\n GeoJsonFeatureCollectionData {\n type: \"FeatureCollection\";\n}\n\nexport interface GeoJsonFeatureCollectionData {\n /** Contains a list of valid `GeoJSON Feature` objects. */\n features: Array<GeoJsonFeature>;\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport type GeoJsonGeometry =\n | GeoJsonGeometryParent\n | GeoJsonMultiPoint\n | GeoJsonMultiPolygon\n | GeoJsonPoint\n | GeoJsonLineString\n | GeoJsonMultiLineString\n | GeoJsonPolygon\n | GeoJsonGeometryCollection;\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport type GeoJsonObject =\n | GeoJsonGeometry\n | GeoJsonMultiPoint\n | GeoJsonMultiPolygon\n | GeoJsonPoint\n | GeoJsonLineString\n | GeoJsonMultiLineString\n | GeoJsonPolygon\n | GeoJsonGeometryCollection\n | GeoJsonFeature\n | GeoJsonFeatureCollection;\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=outputModels.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** This object is returned from a successful Route Matrix call. For ex, if 2 origins and 3 destinations are provided, there are going to 2 arrays with 3 elements in each. Each element's content depends on the options provided in the query. */\nexport interface RouteMatrixResultOutput {\n /** Format Version property */\n formatVersion?: string;\n /** Results as a 2 dimensional array of route summaries. */\n matrix: Array<Array<RouteMatrixOutput>>;\n /** Summary object */\n summary: RouteMatrixSummaryOutput;\n}\n\n/** Matrix result object */\nexport interface RouteMatrixOutput {\n /** StatusCode property for the current cell in the input matrix. */\n statusCode: number;\n /** Response object of the current cell in the input matrix. */\n response?: RouteMatrixResultResponseOutput;\n}\n\n/** Response object of the current cell in the input matrix. */\nexport interface RouteMatrixResultResponseOutput {\n /** Summary object */\n routeSummary?: RouteSummaryOutput;\n}\n\n/** Summary object */\nexport interface RouteSummaryOutput {\n /** Length In Meters property */\n lengthInMeters: number;\n /** Estimated travel time in seconds property that includes the delay due to real-time traffic. Note that even when traffic=false travelTimeInSeconds still includes the delay due to traffic. If DepartAt is in the future, travel time is calculated using time-dependent historic traffic data. */\n travelTimeInSeconds: number;\n /** Estimated delay in seconds caused by the real-time incident(s) according to traffic information. For routes planned with departure time in the future, delays is always 0. To return additional travel times using different types of traffic information, parameter computeTravelTimeFor=all needs to be added. */\n trafficDelayInSeconds: number;\n /** The estimated departure time for the route or leg. */\n departureTime: string;\n /** The estimated arrival time for the route or leg. */\n arrivalTime: string;\n}\n\n/** Summary object */\nexport interface RouteMatrixSummaryOutput {\n /** Number of successful routes in the response. */\n successfulRoutes: number;\n /** Total number of routes requested. Number of cells in the input matrix. */\n totalRoutes: number;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */\nexport interface ErrorResponseOutput {\n /** The error object. */\n error?: ErrorDetailOutput;\n}\n\n/** The error detail. */\nexport interface ErrorDetailOutput {\n /** The error code. */\n code?: string;\n /** The error message. */\n message?: string;\n}\n\n/** This object is returned from a successful Route Directions call */\nexport interface RouteDirectionsOutput {\n /** Format Version property */\n formatVersion?: string;\n /** Routes array */\n routes: Array<RouteOutput>;\n /**\n * Optimized sequence of waypoints. It shows the index from the user provided waypoint sequence for the original and optimized list. For instance, a response:\n *\n * ```\n * <optimizedWaypoints>\n * <waypoint providedIndex=\"0\" optimizedIndex=\"1\"/>\n * <waypoint providedIndex=\"1\" optimizedIndex=\"2\"/>\n * <waypoint providedIndex=\"2\" optimizedIndex=\"0\"/>\n * </optimizedWaypoints>\n * ```\n *\n * means that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0 the original is \"first, second, third\" while the optimized is \"second, third, first\".\n */\n optimizedWaypoints?: Array<RouteOptimizedWaypointOutput>;\n /** Reports the effective settings used in the current call. */\n report?: RouteReportOutput;\n}\n\nexport interface RouteOutput {\n /** Summary object */\n summary: RouteSummaryOutput;\n /** Legs array */\n legs: Array<RouteLegOutput>;\n /** Sections array */\n sections?: Array<RouteSectionOutput>;\n /** Contains guidance related elements. This field is present only when guidance was requested and is available. */\n guidance?: RouteGuidanceOutput;\n}\n\n/** A description of a part of a route, comprised of a list of points. Each additional waypoint provided in the request will result in an additional leg in the returned route. */\nexport interface RouteLegOutput {\n /** Summary object */\n summary: RouteSummaryOutput;\n /** Points array */\n points: Array<LatLongPairOutput>;\n}\n\n/** A location represented as a latitude and longitude. */\nexport interface LatLongPairOutput {\n /** Latitude property */\n latitude: number;\n /** Longitude property */\n longitude: number;\n}\n\n/** Route sections contain additional information about parts of a route. Each section contains at least the elements `startPointIndex`, `endPointIndex`, and `sectionType`. */\nexport interface RouteSectionOutput {\n /** Index of the first point (offset 0) in the route this section applies to. */\n startPointIndex: number;\n /** Index of the last point (offset 0) in the route this section applies to. */\n endPointIndex: number;\n /** Section types of the reported route response */\n sectionType:\n | \"CAR_TRAIN\"\n | \"COUNTRY\"\n | \"FERRY\"\n | \"MOTORWAY\"\n | \"PEDESTRIAN\"\n | \"TOLL_ROAD\"\n | \"TOLL_VIGNETTE\"\n | \"TRAFFIC\"\n | \"TRAVEL_MODE\"\n | \"TUNNEL\"\n | \"CARPOOL\"\n | \"URBAN\";\n /** Travel mode for the calculated route. The value will be set to `other` if the requested mode of transport is not possible in this section */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\"\n | \"other\";\n /** Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See \"tec\" for detailed information. */\n simpleCategory?: \"JAM\" | \"ROAD_WORK\" | \"ROAD_CLOSURE\" | \"OTHER\";\n /** Effective speed of the incident in km/h, averaged over its entire length. */\n effectiveSpeedInKmh?: number;\n /** Delay in seconds caused by the incident. */\n delayInSeconds?: number;\n /** The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the [Get Traffic Incident Detail API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentdetail). */\n magnitudeOfDelay?: \"0\" | \"1\" | \"2\" | \"3\" | \"4\";\n /** Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can contain effectCode and causes elements. */\n tec?: RouteSectionTecOutput;\n}\n\n/** Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can contain effectCode and causes elements. */\nexport interface RouteSectionTecOutput {\n /** The effect on the traffic flow. Contains a value in the tec001:EffectCode table, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can be used to color-code traffic events according to severity. */\n effectCode?: number;\n /** Causes array */\n causes?: Array<RouteSectionTecCauseOutput>;\n}\n\n/** The cause of the traffic event. Can contain mainCauseCode and subCauseCode elements. Can be used to define iconography and descriptions. */\nexport interface RouteSectionTecCauseOutput {\n /** The main cause of the traffic event. Contains a value in the tec002:CauseCode table, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. */\n mainCauseCode?: number;\n /** The subcause of the traffic event. Contains a value in the sub cause table defined by the mainCauseCode, as defined in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. */\n subCauseCode?: number;\n}\n\n/** Contains guidance related elements. This field is present only when guidance was requested and is available. */\nexport interface RouteGuidanceOutput {\n /** A list of instructions describing maneuvers. */\n instructions: Array<RouteInstructionOutput>;\n /** Groups a sequence of instruction elements which are related to each other. */\n instructionGroups: Array<RouteInstructionGroupOutput>;\n}\n\n/** A set of attributes describing a maneuver, e.g. 'Turn right', 'Keep left', 'Take the ferry', 'Take the motorway', 'Arrive'. */\nexport interface RouteInstructionOutput {\n /** Distance from the start of the route to the point of the instruction. */\n routeOffsetInMeters?: number;\n /** Estimated travel time up to the point corresponding to routeOffsetInMeters. */\n travelTimeInSeconds?: number;\n /** A location represented as a latitude and longitude. */\n point?: LatLongPairOutput;\n /** The index of the point in the list of polyline \"points\" corresponding to the point of the instruction. */\n pointIndex?: number;\n /** Type of the instruction, e.g., turn or change of road form. */\n instructionType?:\n | \"TURN\"\n | \"ROAD_CHANGE\"\n | \"LOCATION_DEPARTURE\"\n | \"LOCATION_ARRIVAL\"\n | \"DIRECTION_INFO\"\n | \"LOCATION_WAYPOINT\";\n /** The road number(s) of the next significant road segment(s) after the maneuver, or of the road(s) to be followed. Example: [\"E34\", \"N205\"] */\n roadNumbers?: Array<string>;\n /** The number(s) of a highway exit taken by the current maneuver. If an exit has multiple exit numbers, they will be separated by \",\" and possibly aggregated by \"-\", e.g., \"10, 13-15\". */\n exitNumber?: string;\n /** Street name of the next significant road segment after the maneuver, or of the street that should be followed. */\n street?: string;\n /** The text on a signpost which is most relevant to the maneuver, or to the direction that should be followed. */\n signpostText?: string;\n /** 3-character [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-3 country code. E.g. USA. */\n countryCode?: string;\n /** A subdivision (e.g., state) of the country, represented by the second part of an [ISO 3166-2](https://www.iso.org/standard/63546.html) code. This is only available for some countries like the US, Canada, and Mexico. */\n stateCode?: string;\n /** The type of the junction where the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout. */\n junctionType?: \"REGULAR\" | \"ROUNDABOUT\" | \"BIFURCATION\";\n /**\n * Indicates the direction of an instruction. If junctionType indicates a turn instruction:\n *\n * * 180 = U-turn\n * * [-179, -1] = Left turn\n * * 0 = Straight on (a '0 degree' turn)\n * * [1, 179] = Right turn\n *\n * If junctionType indicates a bifurcation instruction:\n *\n * * <0 - keep left\n * * \\>0 - keep right\n */\n turnAngleInDecimalDegrees?: number;\n /** This indicates which exit to take at a roundabout. */\n roundaboutExitNumber?: string;\n /** It is possible to optionally combine the instruction with the next one. This can be used to build messages like \"Turn left and then turn right\". */\n possibleCombineWithNext?: boolean;\n /** Indicates left-hand vs. right-hand side driving at the point of the maneuver. */\n drivingSide?: \"LEFT\" | \"RIGHT\";\n /** A code identifying the maneuver. */\n maneuver?:\n | \"ARRIVE\"\n | \"ARRIVE_LEFT\"\n | \"ARRIVE_RIGHT\"\n | \"DEPART\"\n | \"STRAIGHT\"\n | \"KEEP_RIGHT\"\n | \"BEAR_RIGHT\"\n | \"TURN_RIGHT\"\n | \"SHARP_RIGHT\"\n | \"KEEP_LEFT\"\n | \"BEAR_LEFT\"\n | \"TURN_LEFT\"\n | \"SHARP_LEFT\"\n | \"MAKE_UTURN\"\n | \"ENTER_MOTORWAY\"\n | \"ENTER_FREEWAY\"\n | \"ENTER_HIGHWAY\"\n | \"TAKE_EXIT\"\n | \"MOTORWAY_EXIT_LEFT\"\n | \"MOTORWAY_EXIT_RIGHT\"\n | \"TAKE_FERRY\"\n | \"ROUNDABOUT_CROSS\"\n | \"ROUNDABOUT_RIGHT\"\n | \"ROUNDABOUT_LEFT\"\n | \"ROUNDABOUT_BACK\"\n | \"TRY_MAKE_UTURN\"\n | \"FOLLOW\"\n | \"SWITCH_PARALLEL_ROAD\"\n | \"SWITCH_MAIN_ROAD\"\n | \"ENTRANCE_RAMP\"\n | \"WAYPOINT_LEFT\"\n | \"WAYPOINT_RIGHT\"\n | \"WAYPOINT_REACHED\";\n /** A human-readable message for the maneuver. */\n message?: string;\n /**\n * A human-readable message for the maneuver combined with the message from the next instruction. Sometimes it is possible to combine two successive instructions into a single instruction making it easier to follow. When this is the case the possibleCombineWithNext flag will be true. For example:\n *\n * ```\n * 10. Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam\n * 11. Follow Einsteinweg/A10/E22 towards Ring Amsterdam\n * ```\n *\n * The possibleCombineWithNext flag on instruction 10 is true. This indicates to the clients of coded guidance that it can be combined with instruction 11. The instructions will be combined automatically for clients requesting human-readable guidance. The combinedMessage field contains the combined message:\n *\n * ```\n * Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam\n * then follow Einsteinweg/A10/E22 towards Ring Amsterdam.\n * ```\n */\n combinedMessage?: string;\n}\n\n/** Groups a sequence of instruction elements which are related to each other. The sequence range is constrained with firstInstructionIndex and lastInstructionIndex. When human-readable text messages are requested for guidance (instructionType=text or tagged), then the instructionGroup has a summary message returned when available. */\nexport interface RouteInstructionGroupOutput {\n /** Index of the first instruction in the instructions and belonging to this group. */\n firstInstructionIndex?: number;\n /** Index of the last instruction in the instructions and belonging to this group. */\n lastInstructionIndex?: number;\n /** Length of the group. */\n groupLengthInMeters?: number;\n /** Summary message when human-readable text messages are requested for guidance (instructionType=text or tagged). */\n groupMessage?: string;\n}\n\n/** Optimized way point object. */\nexport interface RouteOptimizedWaypointOutput {\n /** Way point index provided by the user. */\n providedIndex: number;\n /** Optimized way point index from the system. */\n optimizedIndex: number;\n}\n\n/** Reports the effective settings used in the current call. */\nexport interface RouteReportOutput {\n /** Effective parameters or data used when calling this Route API. */\n effectiveSettings: Array<EffectiveSettingOutput>;\n}\n\n/** Effective parameter or data used when calling this Route API. */\nexport interface EffectiveSettingOutput {\n /** Name of the parameter used. */\n key: string;\n /** Value of the parameter used. */\n value: string;\n}\n\n/** This object is returned from a successful Route Reachable Range call */\nexport interface RouteRangeResultOutput {\n /** Format Version property */\n formatVersion?: string;\n /** Reachable Range */\n reachableRange: RouteRangeOutput;\n /** Reports the effective settings used in the current call. */\n report?: RouteReportOutput;\n}\n\n/** Reachable Range */\nexport interface RouteRangeOutput {\n /** Center point of the reachable range */\n center: LatLongPairOutput;\n /** Polygon boundary of the reachable range represented as a list of points. */\n boundary: Array<LatLongPairOutput>;\n}\n\n/** This object is returned from a successful Route Directions Batch service call. */\nexport interface RouteDirectionsBatchResultOutput extends BatchResultOutput {\n /** Array containing the batch results. */\n batchItems: Array<RouteDirectionsBatchItemOutput>;\n}\n\n/** An item returned from Route Directions Batch service call. */\nexport interface RouteDirectionsBatchItemOutput extends BatchResultItemOutput {\n /** The result of the query. RouteDirections if the query completed successfully, ErrorResponse otherwise. */\n response: RouteDirectionsBatchItemResponseOutput;\n}\n\n/** The result of the query. RouteDirections if the query completed successfully, ErrorResponse otherwise. */\nexport interface RouteDirectionsBatchItemResponseOutput\n extends RouteDirectionsOutput,\n ErrorResponseOutput {}\n\n/** An item returned from Batch API. Extend with 'response' property. */\nexport interface BatchResultItemOutput {\n /** HTTP request status code. */\n statusCode: number;\n}\n\n/** This object is returned from a successful Batch service call. Extend with 'batchItems' property. */\nexport interface BatchResultOutput {\n /** Summary of the results for the batch request */\n summary: BatchResultSummaryOutput;\n}\n\n/** Summary of the results for the batch request */\nexport interface BatchResultSummaryOutput {\n /** Number of successful requests in the batch */\n successfulRequests: number;\n /** Total number of requests in the batch */\n totalRequests: number;\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=parameters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/generated/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n RouteMatrixQuery,\n RouteDirectionParameters,\n BatchRequest\n} from \"./models\";\n\nexport interface RouteRequestRouteMatrixBodyParam {\n /** The matrix of origin and destination coordinates to compute the route distance, travel time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35 origins and 20 destinations or 25 origins and 25 destinations for async API. */\n body: RouteMatrixQuery;\n}\n\nexport interface RouteRequestRouteMatrixQueryParamProperties {\n /** Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. */\n waitForResults?: boolean;\n /** Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. */\n computeTravelTimeFor?: \"none\" | \"all\";\n /** Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car */\n sectionType?:\n | \"carTrain\"\n | \"country\"\n | \"ferry\"\n | \"motorway\"\n | \"pedestrian\"\n | \"tollRoad\"\n | \"tollVignette\"\n | \"traffic\"\n | \"travelMode\"\n | \"tunnel\"\n | \"carpool\"\n | \"urban\";\n /** The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. */\n arriveAt?: Date | string;\n /** The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). */\n departAt?: Date | string;\n /** Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. */\n vehicleAxleWeight?: number;\n /** Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. */\n vehicleLength?: number;\n /** Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. */\n vehicleHeight?: number;\n /** Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. */\n vehicleWidth?: number;\n /**\n * Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n *\n * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n *\n * * A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.\n */\n vehicleMaxSpeed?: number;\n /** Weight of the vehicle in kilograms. */\n vehicleWeight?: number;\n /** Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n windingness?: \"low\" | \"normal\" | \"high\";\n /** Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n hilliness?: \"low\" | \"normal\" | \"high\";\n /** The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\";\n /** Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. */\n avoid?: Array<\n | \"tollRoads\"\n | \"motorways\"\n | \"ferries\"\n | \"unpavedRoads\"\n | \"carpools\"\n | \"alreadyUsedRoads\"\n | \"borderCrossings\"\n >;\n /**\n * Possible values:\n * * true - Do consider all available traffic information during routing\n * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored\n * during routing, the effect of historic traffic on effective road speeds is still incorporated.\n */\n traffic?: boolean;\n /** The type of route requested. */\n routeType?: \"fastest\" | \"shortest\" | \"eco\" | \"thrilling\";\n /** Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. */\n vehicleLoadType?:\n | \"USHazmatClass1\"\n | \"USHazmatClass2\"\n | \"USHazmatClass3\"\n | \"USHazmatClass4\"\n | \"USHazmatClass5\"\n | \"USHazmatClass6\"\n | \"USHazmatClass7\"\n | \"USHazmatClass8\"\n | \"USHazmatClass9\"\n | \"otherHazmatExplosive\"\n | \"otherHazmatGeneral\"\n | \"otherHazmatHarmfulToWater\";\n}\n\nexport interface RouteRequestRouteMatrixQueryParam {\n queryParameters?: RouteRequestRouteMatrixQueryParamProperties;\n}\n\nexport interface RouteRequestRouteMatrixMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type RouteRequestRouteMatrixParameters = RouteRequestRouteMatrixQueryParam &\n RouteRequestRouteMatrixMediaTypesParam &\n RouteRequestRouteMatrixBodyParam &\n RequestParameters;\nexport type RouteGetRouteMatrixParameters = RequestParameters;\n\nexport interface RouteRequestRouteMatrixSyncBodyParam {\n /** The matrix of origin and destination coordinates to compute the route distance, travel time and other summary for each cell of the matrix based on the input parameters. The minimum and the maximum cell count supported are 1 and **700** for async and **100** for sync respectively. For example, it can be 35 origins and 20 destinations or 25 origins and 25 destinations for async API. */\n body: RouteMatrixQuery;\n}\n\nexport interface RouteRequestRouteMatrixSyncQueryParamProperties {\n /** Boolean to indicate whether to execute the request synchronously. If set to true, user will get a 200 response if the request is finished under 120 seconds. Otherwise, user will get a 202 response right away. Please refer to the API description for more details on 202 response. **Supported only for async request**. */\n waitForResults?: boolean;\n /** Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. */\n computeTravelTimeFor?: \"none\" | \"all\";\n /** Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car */\n sectionType?:\n | \"carTrain\"\n | \"country\"\n | \"ferry\"\n | \"motorway\"\n | \"pedestrian\"\n | \"tollRoad\"\n | \"tollVignette\"\n | \"traffic\"\n | \"travelMode\"\n | \"tunnel\"\n | \"carpool\"\n | \"urban\";\n /** The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. */\n arriveAt?: Date | string;\n /** The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). */\n departAt?: Date | string;\n /** Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. */\n vehicleAxleWeight?: number;\n /** Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. */\n vehicleLength?: number;\n /** Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. */\n vehicleHeight?: number;\n /** Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. */\n vehicleWidth?: number;\n /**\n * Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n *\n * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n *\n * * A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.\n */\n vehicleMaxSpeed?: number;\n /** Weight of the vehicle in kilograms. */\n vehicleWeight?: number;\n /** Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n windingness?: \"low\" | \"normal\" | \"high\";\n /** Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n hilliness?: \"low\" | \"normal\" | \"high\";\n /** The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\";\n /** Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. */\n avoid?: Array<\n | \"tollRoads\"\n | \"motorways\"\n | \"ferries\"\n | \"unpavedRoads\"\n | \"carpools\"\n | \"alreadyUsedRoads\"\n | \"borderCrossings\"\n >;\n /**\n * Possible values:\n * * true - Do consider all available traffic information during routing\n * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored\n * during routing, the effect of historic traffic on effective road speeds is still incorporated.\n */\n traffic?: boolean;\n /** The type of route requested. */\n routeType?: \"fastest\" | \"shortest\" | \"eco\" | \"thrilling\";\n /** Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. */\n vehicleLoadType?:\n | \"USHazmatClass1\"\n | \"USHazmatClass2\"\n | \"USHazmatClass3\"\n | \"USHazmatClass4\"\n | \"USHazmatClass5\"\n | \"USHazmatClass6\"\n | \"USHazmatClass7\"\n | \"USHazmatClass8\"\n | \"USHazmatClass9\"\n | \"otherHazmatExplosive\"\n | \"otherHazmatGeneral\"\n | \"otherHazmatHarmfulToWater\";\n}\n\nexport interface RouteRequestRouteMatrixSyncQueryParam {\n queryParameters?: RouteRequestRouteMatrixSyncQueryParamProperties;\n}\n\nexport interface RouteRequestRouteMatrixSyncMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type RouteRequestRouteMatrixSyncParameters = RouteRequestRouteMatrixSyncQueryParam &\n RouteRequestRouteMatrixSyncMediaTypesParam &\n RouteRequestRouteMatrixSyncBodyParam &\n RequestParameters;\n\nexport interface RouteGetRouteDirectionsQueryParamProperties {\n /** The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. */\n query: string;\n /** Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 */\n maxAlternatives?: number;\n /** Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. */\n alternativeType?: \"anyRoute\" | \"betterRoute\";\n /** All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt */\n minDeviationDistance?: number;\n /** The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. */\n arriveAt?: Date | string;\n /** The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). */\n departAt?: Date | string;\n /**\n * All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n * - The origin point of the _calculateRoute_ Request must be on\n * (or very near) the input reference route.\n * - If this is not the case, an error is returned.\n * - However, the origin point does not need to be at the beginning\n * of the input reference route (it can be thought of as the current\n * vehicle position on the reference route).\n * - The reference route, returned as the first route in the _calculateRoute_\n * Response, will start at the origin point specified in the _calculateRoute_\n * Request. The initial part of the input reference route up until the origin\n * point will be excluded from the Response.\n * - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n * how far alternative routes will be guaranteed to follow the reference\n * route from the origin point onwards.\n * - The route must use _departAt_.\n * - The _vehicleHeading_ is ignored.\n */\n minDeviationTime?: number;\n /** If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none */\n instructionsType?: \"coded\" | \"text\" | \"tagged\";\n /**\n * The language parameter determines the language of the guidance messages. Proper nouns (the names of streets, plazas, etc.) are returned in the specified language, or if that is not available, they are returned in an available language that is close to it. Allowed values are (a subset of) the IETF language tags. The currently supported languages are listed in the [Supported languages section](https://docs.microsoft.com/azure/azure-maps/supported-languages).\n *\n * Default value: en-GB\n */\n language?: string;\n /** Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. */\n computeBestOrder?: boolean;\n /** Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. */\n routeRepresentation?: \"polyline\" | \"summaryOnly\" | \"none\";\n /** Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. */\n computeTravelTimeFor?: \"none\" | \"all\";\n /** The directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359 */\n vehicleHeading?: number;\n /** Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. */\n report?: \"effectiveSettings\";\n /** Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car */\n sectionType?:\n | \"carTrain\"\n | \"country\"\n | \"ferry\"\n | \"motorway\"\n | \"pedestrian\"\n | \"tollRoad\"\n | \"tollVignette\"\n | \"traffic\"\n | \"travelMode\"\n | \"tunnel\"\n | \"carpool\"\n | \"urban\";\n /** Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. */\n vehicleAxleWeight?: number;\n /** Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. */\n vehicleWidth?: number;\n /** Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. */\n vehicleHeight?: number;\n /** Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. */\n vehicleLength?: number;\n /**\n * Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n *\n * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n *\n * * A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.\n */\n vehicleMaxSpeed?: number;\n /**\n * Weight of the vehicle in kilograms.\n *\n * * It is mandatory if any of the *Efficiency parameters are set.\n *\n * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.\n *\n * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.\n *\n * * In all other cases, this parameter is ignored.\n *\n * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900\n */\n vehicleWeight?: number;\n /** Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. */\n vehicleCommercial?: boolean;\n /** Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n windingness?: \"low\" | \"normal\" | \"high\";\n /** Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n hilliness?: \"low\" | \"normal\" | \"high\";\n /** The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\";\n /** Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. */\n avoid?: Array<\n | \"tollRoads\"\n | \"motorways\"\n | \"ferries\"\n | \"unpavedRoads\"\n | \"carpools\"\n | \"alreadyUsedRoads\"\n | \"borderCrossings\"\n >;\n /**\n * Possible values:\n * * true - Do consider all available traffic information during routing\n * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored\n * during routing, the effect of historic traffic on effective road speeds is still incorporated.\n */\n traffic?: boolean;\n /** The type of route requested. */\n routeType?: \"fastest\" | \"shortest\" | \"eco\" | \"thrilling\";\n /** Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. */\n vehicleLoadType?:\n | \"USHazmatClass1\"\n | \"USHazmatClass2\"\n | \"USHazmatClass3\"\n | \"USHazmatClass4\"\n | \"USHazmatClass5\"\n | \"USHazmatClass6\"\n | \"USHazmatClass7\"\n | \"USHazmatClass8\"\n | \"USHazmatClass9\"\n | \"otherHazmatExplosive\"\n | \"otherHazmatGeneral\"\n | \"otherHazmatHarmfulToWater\";\n /** Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. */\n vehicleEngineType?: \"combustion\" | \"electric\";\n /**\n *\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,6.3:130,11.5\n *\n * **Note** : This parameter is required for **The Combustion Consumption Model**.\n */\n constantSpeedConsumptionInLitersPerHundredkm?: string;\n /**\n * Specifies the current supply of fuel in liters.\n *\n * Sensible Values : 55\n */\n currentFuelInLiters?: number;\n /**\n * Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 0.2\n */\n auxiliaryPowerInLitersPerHour?: number;\n /**\n * Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.\n *\n * This parameter is required if any ***Efficiency** parameter is set.\n *\n * Sensible Values : 34.2\n */\n fuelEnergyDensityInMJoulesPerLiter?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **decelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66\n */\n accelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **accelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91\n */\n decelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **downhillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**downhillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74\n */\n uphillEfficiency?: number;\n /**\n * Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **uphillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**uphillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73\n */\n downhillEfficiency?: number;\n /**\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,8.2:130,21.3\n *\n * This parameter is required for **Electric consumption model**.\n */\n constantSpeedConsumptionInkWhPerHundredkm?: string;\n /**\n * Specifies the current electric energy supply in kilowatt hours (kWh).\n *\n * This parameter co-exists with **maxChargeInkWh** parameter.\n *\n * The range of values allowed are 0.0 to **maxChargeInkWh**.\n *\n * Sensible Values : 43\n */\n currentChargeInkWh?: number;\n /**\n * Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.\n *\n * This parameter co-exists with **currentChargeInkWh** parameter.\n *\n * Minimum value has to be greater than or equal to **currentChargeInkWh**.\n *\n * Sensible Values : 85\n */\n maxChargeInkWh?: number;\n /**\n * Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 1.7\n */\n auxiliaryPowerInkW?: number;\n}\n\nexport interface RouteGetRouteDirectionsQueryParam {\n queryParameters: RouteGetRouteDirectionsQueryParamProperties;\n}\n\nexport type RouteGetRouteDirectionsParameters = RouteGetRouteDirectionsQueryParam &\n RequestParameters;\n\nexport interface RouteGetRouteDirectionsWithAdditionalParametersBodyParam {\n /**\n * Used for reconstructing a route and for calculating zero or more alternative routes to this reference route. The provided sequence of coordinates is used as input for route reconstruction. The alternative routes are calculated between the origin and destination points specified in the base path parameter locations. If both minDeviationDistance and minDeviationTime are set to zero, then these origin and destination points are expected to be at (or very near) the beginning and end of the reference route, respectively. Intermediate locations (waypoints) are not supported when using supportingPoints.\n *\n * Setting at least one of minDeviationDistance or minDeviationTime to a value greater than zero has the following consequences:\n *\n * * The origin point of the calculateRoute request must be on (or very near) the input reference route. If this is not the case, an error is returned. However, the origin point does not need to be at the beginning of the input reference route (it can be thought of as the current vehicle position on the reference route).\n * * The reference route, returned as the first route in the calculateRoute response, will start at the origin point specified in the calculateRoute request. The initial part of the input reference route up until the origin point will be excluded from the response.\n * * The values of minDeviationDistance and minDeviationTime determine how far alternative routes will be guaranteed to follow the reference route from the origin point onwards.\n * * The route must use departAt.\n * * The vehicleHeading is ignored.\n */\n body: RouteDirectionParameters;\n}\n\nexport interface RouteGetRouteDirectionsWithAdditionalParametersQueryParamProperties {\n /** The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints. */\n query: string;\n /** Number of desired alternative routes to be calculated. Default: 0, minimum: 0 and maximum: 5 */\n maxAlternatives?: number;\n /** Controls the optimality, with respect to the given planning criteria, of the calculated alternatives compared to the reference route. */\n alternativeType?: \"anyRoute\" | \"betterRoute\";\n /** All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of meters. Can only be used when reconstructing a route. The minDeviationDistance parameter cannot be used in conjunction with arriveAt */\n minDeviationDistance?: number;\n /**\n * All alternative routes returned will follow the reference route (see section POST Requests) from the origin point of the calculateRoute request for at least this number of seconds. Can only be used when reconstructing a route. The minDeviationTime parameter cannot be used in conjunction with arriveAt. Default value is 0. Setting )minDeviationTime_ to a value greater than zero has the following consequences:\n * - The origin point of the _calculateRoute_ Request must be on\n * (or very near) the input reference route.\n * - If this is not the case, an error is returned.\n * - However, the origin point does not need to be at the beginning\n * of the input reference route (it can be thought of as the current\n * vehicle position on the reference route).\n * - The reference route, returned as the first route in the _calculateRoute_\n * Response, will start at the origin point specified in the _calculateRoute_\n * Request. The initial part of the input reference route up until the origin\n * point will be excluded from the Response.\n * - The values of _minDeviationDistance_ and _minDeviationTime_ determine\n * how far alternative routes will be guaranteed to follow the reference\n * route from the origin point onwards.\n * - The route must use _departAt_.\n * - The _vehicleHeading_ is ignored.\n */\n minDeviationTime?: number;\n /** If specified, guidance instructions will be returned. Note that the instructionsType parameter cannot be used in conjunction with routeRepresentation=none */\n instructionsType?: \"coded\" | \"text\" | \"tagged\";\n /** The language parameter determines the language of the guidance messages. It does not affect proper nouns (the names of streets, plazas, etc.) It has no effect when instructionsType=coded. Allowed values are (a subset of) the IETF language tags described */\n language?: string;\n /** Re-order the route waypoints using a fast heuristic algorithm to reduce the route length. Yields best results when used in conjunction with routeType _shortest_. Notice that origin and destination are excluded from the optimized waypoint indices. To include origin and destination in the response, please increase all the indices by 1 to account for the origin, and then add the destination as the final index. Possible values are true or false. True computes a better order if possible, but is not allowed to be used in conjunction with maxAlternatives value greater than 0 or in conjunction with circle waypoints. False will use the locations in the given order and not allowed to be used in conjunction with routeRepresentation _none_. */\n computeBestOrder?: boolean;\n /** Specifies the representation of the set of routes provided as response. This parameter value can only be used in conjunction with computeBestOrder=true. */\n routeRepresentation?: \"polyline\" | \"summaryOnly\" | \"none\";\n /** Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time. */\n computeTravelTimeFor?: \"none\" | \"all\";\n /** The directional heading of the vehicle in degrees starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359 */\n vehicleHeading?: number;\n /** Specifies which data should be reported for diagnosis purposes. The only possible value is _effectiveSettings_. Reports the effective parameters or data used when calling the API. In the case of defaulted parameters the default will be reflected where the parameter was not specified by the caller. */\n report?: \"effectiveSettings\";\n /** Specifies which of the section types is reported in the route response. <br><br>For example if sectionType = pedestrian the sections which are suited for pedestrians only are returned. Multiple types can be used. The default sectionType refers to the travelMode input. By default travelMode is set to car */\n sectionType?:\n | \"carTrain\"\n | \"country\"\n | \"ferry\"\n | \"motorway\"\n | \"pedestrian\"\n | \"tollRoad\"\n | \"tollVignette\"\n | \"traffic\"\n | \"travelMode\"\n | \"tunnel\"\n | \"carpool\"\n | \"urban\";\n /** The date and time of arrival at the destination point. It must be specified as a dateTime. When a time zone offset is not specified it will be assumed to be that of the destination point. The arriveAt value must be in the future. The arriveAt parameter cannot be used in conjunction with departAt, minDeviationDistance or minDeviationTime. */\n arriveAt?: Date | string;\n /** The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). */\n departAt?: Date | string;\n /** Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. */\n vehicleAxleWeight?: number;\n /** Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. */\n vehicleLength?: number;\n /** Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. */\n vehicleHeight?: number;\n /** Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. */\n vehicleWidth?: number;\n /**\n * Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n *\n * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n *\n * * A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.\n */\n vehicleMaxSpeed?: number;\n /**\n * Weight of the vehicle in kilograms.\n *\n * * It is mandatory if any of the *Efficiency parameters are set.\n *\n * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.\n *\n * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.\n *\n * * In all other cases, this parameter is ignored.\n *\n * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900\n */\n vehicleWeight?: number;\n /** Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. */\n vehicleCommercial?: boolean;\n /** Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n windingness?: \"low\" | \"normal\" | \"high\";\n /** Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n hilliness?: \"low\" | \"normal\" | \"high\";\n /** The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\";\n /** Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. */\n avoid?: Array<\n | \"tollRoads\"\n | \"motorways\"\n | \"ferries\"\n | \"unpavedRoads\"\n | \"carpools\"\n | \"alreadyUsedRoads\"\n | \"borderCrossings\"\n >;\n /**\n * Possible values:\n * * true - Do consider all available traffic information during routing\n * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored\n * during routing, the effect of historic traffic on effective road speeds is still incorporated.\n */\n traffic?: boolean;\n /** The type of route requested. */\n routeType?: \"fastest\" | \"shortest\" | \"eco\" | \"thrilling\";\n /** Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. */\n vehicleLoadType?:\n | \"USHazmatClass1\"\n | \"USHazmatClass2\"\n | \"USHazmatClass3\"\n | \"USHazmatClass4\"\n | \"USHazmatClass5\"\n | \"USHazmatClass6\"\n | \"USHazmatClass7\"\n | \"USHazmatClass8\"\n | \"USHazmatClass9\"\n | \"otherHazmatExplosive\"\n | \"otherHazmatGeneral\"\n | \"otherHazmatHarmfulToWater\";\n /** Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. */\n vehicleEngineType?: \"combustion\" | \"electric\";\n /**\n *\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,6.3:130,11.5\n *\n * **Note** : This parameter is required for **The Combustion Consumption Model**.\n */\n constantSpeedConsumptionInLitersPerHundredkm?: string;\n /**\n * Specifies the current supply of fuel in liters.\n *\n * Sensible Values : 55\n */\n currentFuelInLiters?: number;\n /**\n * Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 0.2\n */\n auxiliaryPowerInLitersPerHour?: number;\n /**\n * Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.\n *\n * This parameter is required if any ***Efficiency** parameter is set.\n *\n * Sensible Values : 34.2\n */\n fuelEnergyDensityInMJoulesPerLiter?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **decelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66\n */\n accelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **accelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91\n */\n decelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **downhillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**downhillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74\n */\n uphillEfficiency?: number;\n /**\n * Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **uphillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**uphillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73\n */\n downhillEfficiency?: number;\n /**\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,8.2:130,21.3\n *\n * This parameter is required for **Electric consumption model**.\n */\n constantSpeedConsumptionInkWhPerHundredkm?: string;\n /**\n * Specifies the current electric energy supply in kilowatt hours (kWh).\n *\n * This parameter co-exists with **maxChargeInkWh** parameter.\n *\n * The range of values allowed are 0.0 to **maxChargeInkWh**.\n *\n * Sensible Values : 43\n */\n currentChargeInkWh?: number;\n /**\n * Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.\n *\n * This parameter co-exists with **currentChargeInkWh** parameter.\n *\n * Minimum value has to be greater than or equal to **currentChargeInkWh**.\n *\n * Sensible Values : 85\n */\n maxChargeInkWh?: number;\n /**\n * Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 1.7\n */\n auxiliaryPowerInkW?: number;\n}\n\nexport interface RouteGetRouteDirectionsWithAdditionalParametersQueryParam {\n queryParameters: RouteGetRouteDirectionsWithAdditionalParametersQueryParamProperties;\n}\n\nexport interface RouteGetRouteDirectionsWithAdditionalParametersMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type RouteGetRouteDirectionsWithAdditionalParametersParameters = RouteGetRouteDirectionsWithAdditionalParametersQueryParam &\n RouteGetRouteDirectionsWithAdditionalParametersMediaTypesParam &\n RouteGetRouteDirectionsWithAdditionalParametersBodyParam &\n RequestParameters;\n\nexport interface RouteGetRouteRangeQueryParamProperties {\n /** The Coordinate from which the range calculation should start. */\n query: Array<number>;\n /** Fuel budget in liters that determines maximal range which can be travelled using the specified Combustion Consumption Model.<br> When fuelBudgetInLiters is used, it is mandatory to specify a detailed Combustion Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. */\n fuelBudgetInLiters?: number;\n /** Electric energy budget in kilowatt hours (kWh) that determines maximal range which can be travelled using the specified Electric Consumption Model.<br> When energyBudgetInkWh is used, it is mandatory to specify a detailed Electric Consumption Model.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. */\n energyBudgetInkWh?: number;\n /** Time budget in seconds that determines maximal range which can be travelled using driving time. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. */\n timeBudgetInSec?: number;\n /** Distance budget in meters that determines maximal range which can be travelled using driving distance. The Consumption Model will only affect the range when routeType is eco.<br> Exactly one budget (fuelBudgetInLiters, energyBudgetInkWh, timeBudgetInSec, or distanceBudgetInMeters) must be used. */\n distanceBudgetInMeters?: number;\n /** The date and time of departure from the origin point. Departure times apart from now must be specified as a dateTime. When a time zone offset is not specified, it will be assumed to be that of the origin point. The departAt value must be in the future in the date-time format (1996-12-19T16:39:57-08:00). */\n departAt?: Date | string;\n /** The type of route requested. */\n routeType?: \"fastest\" | \"shortest\" | \"eco\" | \"thrilling\";\n /**\n * Possible values:\n * * true - Do consider all available traffic information during routing\n * * false - Ignore current traffic data during routing. Note that although the current traffic data is ignored\n * during routing, the effect of historic traffic on effective road speeds is still incorporated.\n */\n traffic?: boolean;\n /** Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times in one request, for example, '&avoid=motorways&avoid=tollRoads&avoid=ferries'. In calculateReachableRange requests, the value alreadyUsedRoads must not be used. */\n avoid?: Array<\n | \"tollRoads\"\n | \"motorways\"\n | \"ferries\"\n | \"unpavedRoads\"\n | \"carpools\"\n | \"alreadyUsedRoads\"\n | \"borderCrossings\"\n >;\n /** The mode of travel for the requested route. If not defined, default is 'car'. Note that the requested travelMode may not be available for the entire route. Where the requested travelMode is not available for a particular section, the travelMode element of the response for that section will be \"other\". Note that travel modes bus, motorcycle, taxi and van are BETA functionality. Full restriction data is not available in all areas. In **calculateReachableRange** requests, the values bicycle and pedestrian must not be used. */\n travelMode?:\n | \"car\"\n | \"truck\"\n | \"taxi\"\n | \"bus\"\n | \"van\"\n | \"motorcycle\"\n | \"bicycle\"\n | \"pedestrian\";\n /** Degree of hilliness for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n hilliness?: \"low\" | \"normal\" | \"high\";\n /** Level of turns for thrilling route. This parameter can only be used in conjunction with `routeType`=thrilling. */\n windingness?: \"low\" | \"normal\" | \"high\";\n /** Weight per axle of the vehicle in kg. A value of 0 means that weight restrictions per axle are not considered. */\n vehicleAxleWeight?: number;\n /** Width of the vehicle in meters. A value of 0 means that width restrictions are not considered. */\n vehicleWidth?: number;\n /** Height of the vehicle in meters. A value of 0 means that height restrictions are not considered. */\n vehicleHeight?: number;\n /** Length of the vehicle in meters. A value of 0 means that length restrictions are not considered. */\n vehicleLength?: number;\n /**\n * Maximum speed of the vehicle in km/hour. The max speed in the vehicle profile is used to check whether a vehicle is allowed on motorways.\n *\n * * A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.\n *\n * * A non-zero value may be overridden during route planning. For example, the current traffic flow is 60 km/hour. If the vehicle maximum speed is set to 50 km/hour, the routing engine will consider 60 km/hour as this is the current situation. If the maximum speed of the vehicle is provided as 80 km/hour but the current traffic flow is 60 km/hour, then routing engine will again use 60 km/hour.\n */\n vehicleMaxSpeed?: number;\n /**\n * Weight of the vehicle in kilograms.\n *\n * * It is mandatory if any of the *Efficiency parameters are set.\n *\n * * It must be strictly positive when used in the context of the Consumption Model. Weight restrictions are considered.\n *\n * * If no detailed **Consumption Model** is specified and the value of **vehicleWeight** is non-zero, then weight restrictions are considered.\n *\n * * In all other cases, this parameter is ignored.\n *\n * Sensible Values : for **Combustion Model** : 1600, for **Electric Model** : 1900\n */\n vehicleWeight?: number;\n /** Whether the vehicle is used for commercial purposes. Commercial vehicles may not be allowed to drive on some roads. */\n vehicleCommercial?: boolean;\n /** Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are US Hazmat classes 1 through 9, plus generic classifications for use in other countries. Values beginning with USHazmat are for US routing while otherHazmat should be used for all other countries. vehicleLoadType can be specified multiple times. This parameter is currently only considered for travelMode=truck. */\n vehicleLoadType?:\n | \"USHazmatClass1\"\n | \"USHazmatClass2\"\n | \"USHazmatClass3\"\n | \"USHazmatClass4\"\n | \"USHazmatClass5\"\n | \"USHazmatClass6\"\n | \"USHazmatClass7\"\n | \"USHazmatClass8\"\n | \"USHazmatClass9\"\n | \"otherHazmatExplosive\"\n | \"otherHazmatGeneral\"\n | \"otherHazmatHarmfulToWater\";\n /** Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of **vehicleEngineType**. */\n vehicleEngineType?: \"combustion\" | \"electric\";\n /**\n *\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of colon-delimited speed & consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in l/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,6.3:130,11.5\n *\n * **Note** : This parameter is required for **The Combustion Consumption Model**.\n */\n constantSpeedConsumptionInLitersPerHundredkm?: string;\n /**\n * Specifies the current supply of fuel in liters.\n *\n * Sensible Values : 55\n */\n currentFuelInLiters?: number;\n /**\n * Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 0.2\n */\n auxiliaryPowerInLitersPerHour?: number;\n /**\n * Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the ***Efficiency** parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.\n *\n * This parameter is required if any ***Efficiency** parameter is set.\n *\n * Sensible Values : 34.2\n */\n fuelEnergyDensityInMJoulesPerLiter?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates _(i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **decelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**decelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.33, for **Electric Model** : 0.66\n */\n accelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates _(i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **accelerationEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**accelerationEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.83, for **Electric Model** : 0.91\n */\n decelerationEfficiency?: number;\n /**\n * Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation _(i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed_ is obtained by converting consumed fuel to chemical energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **downhillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**downhillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.27, for **Electric Model** : 0.74\n */\n uphillEfficiency?: number;\n /**\n * Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation _(i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved_ is obtained by converting saved (not consumed) fuel to energy using **fuelEnergyDensityInMJoulesPerLiter**.\n *\n * Must be paired with **uphillEfficiency**.\n *\n * The range of values allowed are 0.0 to 1/**uphillEfficiency**.\n *\n * Sensible Values : for **Combustion Model** : 0.51, for **Electric Model** : 0.73\n */\n downhillEfficiency?: number;\n /**\n * Specifies the speed-dependent component of consumption.\n *\n * Provided as an unordered list of speed/consumption-rate pairs. The list defines points on a consumption curve. Consumption rates for speeds not in the list are found as follows:\n *\n * * by linear interpolation, if the given speed lies in between two speeds in the list\n *\n * * by linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list\n *\n * The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed. If it only contains a single point, then the consumption rate of that point is used without further processing.\n *\n * Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed. This ensures that extrapolation does not lead to negative consumption rates.\n *\n * Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.\n *\n * The valid range for the consumption values(expressed in kWh/100km) is between 0.01 and 100000.0.\n *\n * Sensible Values : 50,8.2:130,21.3\n *\n * This parameter is required for **Electric consumption model**.\n */\n constantSpeedConsumptionInkWhPerHundredkm?: string;\n /**\n * Specifies the current electric energy supply in kilowatt hours (kWh).\n *\n * This parameter co-exists with **maxChargeInkWh** parameter.\n *\n * The range of values allowed are 0.0 to **maxChargeInkWh**.\n *\n * Sensible Values : 43\n */\n currentChargeInkWh?: number;\n /**\n * Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.\n *\n * This parameter co-exists with **currentChargeInkWh** parameter.\n *\n * Minimum value has to be greater than or equal to **currentChargeInkWh**.\n *\n * Sensible Values : 85\n */\n maxChargeInkWh?: number;\n /**\n * Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).\n *\n * It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.\n *\n * Sensible Values : 1.7\n */\n auxiliaryPowerInkW?: number;\n}\n\nexport interface RouteGetRouteRangeQueryParam {\n queryParameters: RouteGetRouteRangeQueryParamProperties;\n}\n\nexport type RouteGetRouteRangeParameters = RouteGetRouteRangeQueryParam &\n RequestParameters;\n\nexport interface RouteRequestRouteDirectionsBatchBodyParam {\n /** The list of route directions queries/requests to process. The list can contain a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query. */\n body: BatchRequest;\n}\n\nexport interface RouteRequestRouteDirectionsBatchMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type RouteRequestRouteDirectionsBatchParameters = RouteRequestRouteDirectionsBatchMediaTypesParam &\n RouteRequestRouteDirectionsBatchBodyParam &\n RequestParameters;\nexport type RouteGetRouteDirectionsBatchParameters = RequestParameters;\n\nexport interface RouteRequestRouteDirectionsBatchSyncBodyParam {\n /** The list of route directions queries/requests to process. The list can contain a max of 700 queries for async and 100 queries for sync version and must contain at least 1 query. */\n body: BatchRequest;\n}\n\nexport interface RouteRequestRouteDirectionsBatchSyncMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type RouteRequestRouteDirectionsBatchSyncParameters = RouteRequestRouteDirectionsBatchSyncMediaTypesParam &\n RouteRequestRouteDirectionsBatchSyncBodyParam &\n RequestParameters;\n"]}
@@ -1,55 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { LroEngine } from "@azure/core-lro";
4
- /**
5
- * Helper function that builds a Poller object to help polling a long running operation.
6
- * @param client - Client to use for sending the request to get additional pages.
7
- * @param initialResponse - The initial response.
8
- * @param options - Options to set a resume state or custom polling interval.
9
- * @returns - A poller object to poll for operation state updates and eventually get the final response.
10
- */
11
- export function getLongRunningPoller(client, initialResponse, options = {}) {
12
- const poller = {
13
- requestMethod: initialResponse.request.method,
14
- requestPath: initialResponse.request.url,
15
- sendInitialRequest: async () => {
16
- // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
17
- // we are not triggering the initial request here, just extracting the information from the
18
- // response we were provided.
19
- return getLroResponse(initialResponse);
20
- },
21
- sendPollRequest: async (path) => {
22
- // This is the callback that is going to be called to poll the service
23
- // to get the latest status. We use the client provided and the polling path
24
- // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
25
- // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
26
- const response = await client
27
- .pathUnchecked(path ?? initialResponse.request.url)
28
- .get();
29
- const lroResponse = getLroResponse(response);
30
- lroResponse.rawResponse.headers["x-ms-original-url"] =
31
- initialResponse.request.url;
32
- return lroResponse;
33
- }
34
- };
35
- return new LroEngine(poller, options);
36
- }
37
- /**
38
- * Converts a Rest Client response to a response that the LRO engine knows about
39
- * @param response - a rest client http response
40
- * @returns - An LRO response that the LRO engine can work with
41
- */
42
- function getLroResponse(response) {
43
- if (Number.isNaN(response.status)) {
44
- throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
45
- }
46
- return {
47
- flatResponse: response,
48
- rawResponse: {
49
- ...response,
50
- statusCode: Number.parseInt(response.status),
51
- body: response.body
52
- }
53
- };
54
- }
55
- //# sourceMappingURL=pollingHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../../src/generated/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,eAAwB,EACxB,UAAkE,EAAE;IAEpE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM;iBAC1B,aAAa,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;iBAClD,GAAG,EAAE,CAAC;YACT,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBAClD,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YAC9B,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,IAAI,SAAS,CACjB,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CACzE,CAAC;KACH;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE;YACX,GAAG,QAAQ;YACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n LongRunningOperation,\n LroEngine,\n LroEngineOptions,\n LroResponse,\n PollerLike,\n PollOperationState\n} from \"@azure/core-lro\";\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: LroEngineOptions<TResult, PollOperationState<TResult>> = {}\n): PollerLike<PollOperationState<TResult>, TResult> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] =\n initialResponse.request.url;\n return lroResponse;\n }\n };\n\n return new LroEngine(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO engine knows about\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO engine can work with\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult\n): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(\n `Status code of the response is not a number. Value: ${response.status}`\n );\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body\n }\n };\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=responses.js.map