@azure/arm-templatespecs 2.1.1-alpha.20250211.1 → 2.1.1-alpha.20250213.1

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 (281) hide show
  1. package/README.md +21 -12
  2. package/dist/browser/index.d.ts +5 -0
  3. package/{dist-esm/src → dist/browser}/index.d.ts.map +1 -1
  4. package/{dist-esm/src → dist/browser}/index.js +4 -4
  5. package/dist/browser/index.js.map +1 -0
  6. package/dist/browser/models/index.js.map +1 -0
  7. package/dist/browser/models/mappers.js.map +1 -0
  8. package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
  9. package/dist/browser/models/parameters.js.map +1 -0
  10. package/dist/browser/operations/index.d.ts +3 -0
  11. package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
  12. package/{dist-esm/src → dist/browser}/operations/index.js +2 -2
  13. package/dist/browser/operations/index.js.map +1 -0
  14. package/{dist-esm/src → dist/browser}/operations/templateSpecVersions.d.ts +3 -3
  15. package/dist/browser/operations/templateSpecVersions.d.ts.map +1 -0
  16. package/{dist-esm/src → dist/browser}/operations/templateSpecVersions.js +3 -3
  17. package/dist/browser/operations/templateSpecVersions.js.map +1 -0
  18. package/{dist-esm/src → dist/browser}/operations/templateSpecs.d.ts +3 -3
  19. package/dist/browser/operations/templateSpecs.d.ts.map +1 -0
  20. package/{dist-esm/src → dist/browser}/operations/templateSpecs.js +3 -3
  21. package/dist/browser/operations/templateSpecs.js.map +1 -0
  22. package/dist/browser/operationsInterfaces/index.d.ts +3 -0
  23. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
  24. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +2 -2
  25. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  26. package/{dist-esm/src → dist/browser}/operationsInterfaces/templateSpecVersions.d.ts +1 -1
  27. package/dist/browser/operationsInterfaces/templateSpecVersions.d.ts.map +1 -0
  28. package/dist/browser/operationsInterfaces/templateSpecVersions.js.map +1 -0
  29. package/{dist-esm/src → dist/browser}/operationsInterfaces/templateSpecs.d.ts +1 -1
  30. package/dist/browser/operationsInterfaces/templateSpecs.d.ts.map +1 -0
  31. package/dist/browser/operationsInterfaces/templateSpecs.js.map +1 -0
  32. package/dist/browser/package.json +3 -0
  33. package/dist/browser/pagingHelper.js.map +1 -0
  34. package/{dist-esm/src → dist/browser}/templateSpecsClient.d.ts +2 -2
  35. package/dist/browser/templateSpecsClient.d.ts.map +1 -0
  36. package/{dist-esm/src → dist/browser}/templateSpecsClient.js +15 -18
  37. package/dist/browser/templateSpecsClient.js.map +1 -0
  38. package/dist/commonjs/index.d.ts +5 -0
  39. package/dist/commonjs/index.d.ts.map +1 -0
  40. package/dist/commonjs/index.js +19 -0
  41. package/dist/commonjs/index.js.map +1 -0
  42. package/{types/arm-templatespecs.d.ts → dist/commonjs/models/index.d.ts} +310 -472
  43. package/dist/commonjs/models/index.d.ts.map +1 -0
  44. package/dist/commonjs/models/index.js +29 -0
  45. package/dist/commonjs/models/index.js.map +1 -0
  46. package/dist/commonjs/models/mappers.d.ts +15 -0
  47. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  48. package/dist/commonjs/models/mappers.js +422 -0
  49. package/dist/commonjs/models/mappers.js.map +1 -0
  50. package/dist/commonjs/models/parameters.d.ts +16 -0
  51. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  52. package/dist/commonjs/models/parameters.js +147 -0
  53. package/dist/commonjs/models/parameters.js.map +1 -0
  54. package/dist/commonjs/operations/index.d.ts +3 -0
  55. package/dist/commonjs/operations/index.d.ts.map +1 -0
  56. package/dist/commonjs/operations/index.js +13 -0
  57. package/dist/commonjs/operations/index.js.map +1 -0
  58. package/dist/commonjs/operations/templateSpecVersions.d.ts +72 -0
  59. package/dist/commonjs/operations/templateSpecVersions.d.ts.map +1 -0
  60. package/dist/commonjs/operations/templateSpecVersions.js +297 -0
  61. package/dist/commonjs/operations/templateSpecVersions.js.map +1 -0
  62. package/dist/commonjs/operations/templateSpecs.d.ts +82 -0
  63. package/dist/commonjs/operations/templateSpecs.d.ts.map +1 -0
  64. package/dist/commonjs/operations/templateSpecs.js +389 -0
  65. package/dist/commonjs/operations/templateSpecs.js.map +1 -0
  66. package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
  67. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  68. package/dist/commonjs/operationsInterfaces/index.js +13 -0
  69. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  70. package/dist/commonjs/operationsInterfaces/templateSpecVersions.d.ts +47 -0
  71. package/dist/commonjs/operationsInterfaces/templateSpecVersions.d.ts.map +1 -0
  72. package/dist/commonjs/operationsInterfaces/templateSpecVersions.js +10 -0
  73. package/dist/commonjs/operationsInterfaces/templateSpecVersions.js.map +1 -0
  74. package/dist/commonjs/operationsInterfaces/templateSpecs.d.ts +46 -0
  75. package/dist/commonjs/operationsInterfaces/templateSpecs.d.ts.map +1 -0
  76. package/dist/commonjs/operationsInterfaces/templateSpecs.js +10 -0
  77. package/dist/commonjs/operationsInterfaces/templateSpecs.js.map +1 -0
  78. package/dist/commonjs/package.json +3 -0
  79. package/dist/commonjs/pagingHelper.d.ts +13 -0
  80. package/dist/commonjs/pagingHelper.d.ts.map +1 -0
  81. package/dist/commonjs/pagingHelper.js +36 -0
  82. package/dist/commonjs/pagingHelper.js.map +1 -0
  83. package/dist/commonjs/templateSpecsClient.d.ts +21 -0
  84. package/dist/commonjs/templateSpecsClient.d.ts.map +1 -0
  85. package/dist/commonjs/templateSpecsClient.js +103 -0
  86. package/dist/commonjs/templateSpecsClient.js.map +1 -0
  87. package/dist/esm/index.d.ts +5 -0
  88. package/dist/esm/index.d.ts.map +1 -0
  89. package/{src/index.ts → dist/esm/index.js} +5 -5
  90. package/dist/esm/index.js.map +1 -0
  91. package/dist/esm/models/index.d.ts +310 -0
  92. package/dist/esm/models/index.d.ts.map +1 -0
  93. package/dist/esm/models/index.js +26 -0
  94. package/dist/esm/models/index.js.map +1 -0
  95. package/dist/esm/models/mappers.d.ts +15 -0
  96. package/dist/esm/models/mappers.d.ts.map +1 -0
  97. package/dist/esm/models/mappers.js +419 -0
  98. package/dist/esm/models/mappers.js.map +1 -0
  99. package/dist/esm/models/parameters.d.ts +16 -0
  100. package/dist/esm/models/parameters.d.ts.map +1 -0
  101. package/dist/esm/models/parameters.js +144 -0
  102. package/dist/esm/models/parameters.js.map +1 -0
  103. package/dist/esm/operations/index.d.ts +3 -0
  104. package/dist/esm/operations/index.d.ts.map +1 -0
  105. package/dist/esm/operations/index.js +10 -0
  106. package/dist/esm/operations/index.js.map +1 -0
  107. package/dist/esm/operations/templateSpecVersions.d.ts +72 -0
  108. package/dist/esm/operations/templateSpecVersions.d.ts.map +1 -0
  109. package/dist/esm/operations/templateSpecVersions.js +293 -0
  110. package/dist/esm/operations/templateSpecVersions.js.map +1 -0
  111. package/dist/esm/operations/templateSpecs.d.ts +82 -0
  112. package/dist/esm/operations/templateSpecs.d.ts.map +1 -0
  113. package/dist/esm/operations/templateSpecs.js +385 -0
  114. package/dist/esm/operations/templateSpecs.js.map +1 -0
  115. package/dist/esm/operationsInterfaces/index.d.ts +3 -0
  116. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  117. package/dist/esm/operationsInterfaces/index.js +10 -0
  118. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  119. package/dist/esm/operationsInterfaces/templateSpecVersions.d.ts +47 -0
  120. package/dist/esm/operationsInterfaces/templateSpecVersions.d.ts.map +1 -0
  121. package/{src/operations/index.ts → dist/esm/operationsInterfaces/templateSpecVersions.js} +2 -3
  122. package/dist/esm/operationsInterfaces/templateSpecVersions.js.map +1 -0
  123. package/dist/esm/operationsInterfaces/templateSpecs.d.ts +46 -0
  124. package/dist/esm/operationsInterfaces/templateSpecs.d.ts.map +1 -0
  125. package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/templateSpecs.js} +2 -3
  126. package/dist/esm/operationsInterfaces/templateSpecs.js.map +1 -0
  127. package/dist/esm/package.json +3 -0
  128. package/dist/esm/pagingHelper.d.ts +13 -0
  129. package/dist/esm/pagingHelper.d.ts.map +1 -0
  130. package/dist/esm/pagingHelper.js +32 -0
  131. package/dist/esm/pagingHelper.js.map +1 -0
  132. package/dist/esm/templateSpecsClient.d.ts +21 -0
  133. package/dist/esm/templateSpecsClient.d.ts.map +1 -0
  134. package/dist/esm/templateSpecsClient.js +98 -0
  135. package/dist/esm/templateSpecsClient.js.map +1 -0
  136. package/dist/react-native/index.d.ts +5 -0
  137. package/dist/react-native/index.d.ts.map +1 -0
  138. package/dist/react-native/index.js +13 -0
  139. package/dist/react-native/index.js.map +1 -0
  140. package/dist/react-native/models/index.d.ts +310 -0
  141. package/dist/react-native/models/index.d.ts.map +1 -0
  142. package/dist/react-native/models/index.js +26 -0
  143. package/dist/react-native/models/index.js.map +1 -0
  144. package/dist/react-native/models/mappers.d.ts +15 -0
  145. package/dist/react-native/models/mappers.d.ts.map +1 -0
  146. package/dist/react-native/models/mappers.js +419 -0
  147. package/dist/react-native/models/mappers.js.map +1 -0
  148. package/dist/react-native/models/parameters.d.ts +16 -0
  149. package/dist/react-native/models/parameters.d.ts.map +1 -0
  150. package/dist/react-native/models/parameters.js +144 -0
  151. package/dist/react-native/models/parameters.js.map +1 -0
  152. package/dist/react-native/operations/index.d.ts +3 -0
  153. package/dist/react-native/operations/index.d.ts.map +1 -0
  154. package/dist/react-native/operations/index.js +10 -0
  155. package/dist/react-native/operations/index.js.map +1 -0
  156. package/dist/react-native/operations/templateSpecVersions.d.ts +72 -0
  157. package/dist/react-native/operations/templateSpecVersions.d.ts.map +1 -0
  158. package/dist/react-native/operations/templateSpecVersions.js +293 -0
  159. package/dist/react-native/operations/templateSpecVersions.js.map +1 -0
  160. package/dist/react-native/operations/templateSpecs.d.ts +82 -0
  161. package/dist/react-native/operations/templateSpecs.d.ts.map +1 -0
  162. package/dist/react-native/operations/templateSpecs.js +385 -0
  163. package/dist/react-native/operations/templateSpecs.js.map +1 -0
  164. package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
  165. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  166. package/dist/react-native/operationsInterfaces/index.js +10 -0
  167. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  168. package/dist/react-native/operationsInterfaces/templateSpecVersions.d.ts +47 -0
  169. package/dist/react-native/operationsInterfaces/templateSpecVersions.d.ts.map +1 -0
  170. package/dist/react-native/operationsInterfaces/templateSpecVersions.js +9 -0
  171. package/dist/react-native/operationsInterfaces/templateSpecVersions.js.map +1 -0
  172. package/dist/react-native/operationsInterfaces/templateSpecs.d.ts +46 -0
  173. package/dist/react-native/operationsInterfaces/templateSpecs.d.ts.map +1 -0
  174. package/dist/react-native/operationsInterfaces/templateSpecs.js +9 -0
  175. package/dist/react-native/operationsInterfaces/templateSpecs.js.map +1 -0
  176. package/dist/react-native/package.json +3 -0
  177. package/dist/react-native/pagingHelper.d.ts +13 -0
  178. package/dist/react-native/pagingHelper.d.ts.map +1 -0
  179. package/dist/react-native/pagingHelper.js +32 -0
  180. package/dist/react-native/pagingHelper.js.map +1 -0
  181. package/dist/react-native/templateSpecsClient.d.ts +21 -0
  182. package/dist/react-native/templateSpecsClient.d.ts.map +1 -0
  183. package/dist/react-native/templateSpecsClient.js +98 -0
  184. package/dist/react-native/templateSpecsClient.js.map +1 -0
  185. package/package.json +66 -35
  186. package/dist/index.js +0 -1433
  187. package/dist/index.js.map +0 -1
  188. package/dist/index.min.js +0 -1
  189. package/dist/index.min.js.map +0 -1
  190. package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.d.ts +0 -2
  191. package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.d.ts.map +0 -1
  192. package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.js +0 -33
  193. package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.js.map +0 -1
  194. package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.d.ts +0 -2
  195. package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.d.ts.map +0 -1
  196. package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.js +0 -30
  197. package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.js.map +0 -1
  198. package/dist-esm/samples-dev/templateSpecVersionsGetSample.d.ts +0 -2
  199. package/dist-esm/samples-dev/templateSpecVersionsGetSample.d.ts.map +0 -1
  200. package/dist-esm/samples-dev/templateSpecVersionsGetSample.js +0 -30
  201. package/dist-esm/samples-dev/templateSpecVersionsGetSample.js.map +0 -1
  202. package/dist-esm/samples-dev/templateSpecVersionsListSample.d.ts +0 -2
  203. package/dist-esm/samples-dev/templateSpecVersionsListSample.d.ts.map +0 -1
  204. package/dist-esm/samples-dev/templateSpecVersionsListSample.js +0 -45
  205. package/dist-esm/samples-dev/templateSpecVersionsListSample.js.map +0 -1
  206. package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.d.ts +0 -2
  207. package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.d.ts.map +0 -1
  208. package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.js +0 -29
  209. package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.js.map +0 -1
  210. package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.d.ts +0 -2
  211. package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.d.ts.map +0 -1
  212. package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.js +0 -26
  213. package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.js.map +0 -1
  214. package/dist-esm/samples-dev/templateSpecsDeleteSample.d.ts +0 -2
  215. package/dist-esm/samples-dev/templateSpecsDeleteSample.d.ts.map +0 -1
  216. package/dist-esm/samples-dev/templateSpecsDeleteSample.js +0 -29
  217. package/dist-esm/samples-dev/templateSpecsDeleteSample.js.map +0 -1
  218. package/dist-esm/samples-dev/templateSpecsGetSample.d.ts +0 -2
  219. package/dist-esm/samples-dev/templateSpecsGetSample.d.ts.map +0 -1
  220. package/dist-esm/samples-dev/templateSpecsGetSample.js +0 -29
  221. package/dist-esm/samples-dev/templateSpecsGetSample.js.map +0 -1
  222. package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.d.ts +0 -2
  223. package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.d.ts.map +0 -1
  224. package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.js +0 -44
  225. package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.js.map +0 -1
  226. package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.d.ts +0 -2
  227. package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.d.ts.map +0 -1
  228. package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.js +0 -43
  229. package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.js.map +0 -1
  230. package/dist-esm/samples-dev/templateSpecsUpdateSample.d.ts +0 -2
  231. package/dist-esm/samples-dev/templateSpecsUpdateSample.d.ts.map +0 -1
  232. package/dist-esm/samples-dev/templateSpecsUpdateSample.js +0 -24
  233. package/dist-esm/samples-dev/templateSpecsUpdateSample.js.map +0 -1
  234. package/dist-esm/src/index.d.ts +0 -5
  235. package/dist-esm/src/index.js.map +0 -1
  236. package/dist-esm/src/models/index.js.map +0 -1
  237. package/dist-esm/src/models/mappers.js.map +0 -1
  238. package/dist-esm/src/models/parameters.js.map +0 -1
  239. package/dist-esm/src/operations/index.d.ts +0 -3
  240. package/dist-esm/src/operations/index.js.map +0 -1
  241. package/dist-esm/src/operations/templateSpecVersions.d.ts.map +0 -1
  242. package/dist-esm/src/operations/templateSpecVersions.js.map +0 -1
  243. package/dist-esm/src/operations/templateSpecs.d.ts.map +0 -1
  244. package/dist-esm/src/operations/templateSpecs.js.map +0 -1
  245. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
  246. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  247. package/dist-esm/src/operationsInterfaces/templateSpecVersions.d.ts.map +0 -1
  248. package/dist-esm/src/operationsInterfaces/templateSpecVersions.js.map +0 -1
  249. package/dist-esm/src/operationsInterfaces/templateSpecs.d.ts.map +0 -1
  250. package/dist-esm/src/operationsInterfaces/templateSpecs.js.map +0 -1
  251. package/dist-esm/src/pagingHelper.js.map +0 -1
  252. package/dist-esm/src/templateSpecsClient.d.ts.map +0 -1
  253. package/dist-esm/src/templateSpecsClient.js.map +0 -1
  254. package/dist-esm/test/sampleTest.d.ts +0 -2
  255. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  256. package/dist-esm/test/sampleTest.js +0 -42
  257. package/dist-esm/test/sampleTest.js.map +0 -1
  258. package/src/models/index.ts +0 -359
  259. package/src/models/mappers.ts +0 -456
  260. package/src/models/parameters.ts +0 -168
  261. package/src/operations/templateSpecVersions.ts +0 -389
  262. package/src/operations/templateSpecs.ts +0 -476
  263. package/src/operationsInterfaces/templateSpecVersions.ts +0 -91
  264. package/src/operationsInterfaces/templateSpecs.ts +0 -88
  265. package/src/pagingHelper.ts +0 -39
  266. package/src/templateSpecsClient.ts +0 -142
  267. package/tsconfig.json +0 -33
  268. /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
  269. /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
  270. /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
  271. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
  272. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
  273. /package/{dist-esm/src → dist/browser}/models/mappers.js +0 -0
  274. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
  275. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
  276. /package/{dist-esm/src → dist/browser}/operationsInterfaces/templateSpecVersions.js +0 -0
  277. /package/{dist-esm/src → dist/browser}/operationsInterfaces/templateSpecs.js +0 -0
  278. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
  279. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
  280. /package/{dist-esm/src → dist/browser}/pagingHelper.js +0 -0
  281. /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
package/dist/index.js DELETED
@@ -1,1433 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib = require('tslib');
6
- var coreClient = require('@azure/core-client');
7
- var coreRestPipeline = require('@azure/core-rest-pipeline');
8
-
9
- function _interopNamespaceDefault(e) {
10
- var n = Object.create(null);
11
- if (e) {
12
- Object.keys(e).forEach(function (k) {
13
- if (k !== 'default') {
14
- var d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: function () { return e[k]; }
18
- });
19
- }
20
- });
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
24
- }
25
-
26
- var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
27
- var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespaceDefault(coreRestPipeline);
28
-
29
- /*
30
- * Copyright (c) Microsoft Corporation.
31
- * Licensed under the MIT License.
32
- *
33
- * Code generated by Microsoft (R) AutoRest Code Generator.
34
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
35
- */
36
- const pageMap = new WeakMap();
37
- /**
38
- * Given a result page from a pageable operation, returns a
39
- * continuation token that can be used to begin paging from
40
- * that point later.
41
- * @param page A result object from calling .byPage() on a paged operation.
42
- * @returns The continuation token that can be passed into byPage().
43
- */
44
- function getContinuationToken(page) {
45
- var _a;
46
- if (typeof page !== "object" || page === null) {
47
- return undefined;
48
- }
49
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
50
- }
51
- function setContinuationToken(page, continuationToken) {
52
- var _a;
53
- if (typeof page !== "object" || page === null || !continuationToken) {
54
- return;
55
- }
56
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
57
- pageInfo.continuationToken = continuationToken;
58
- pageMap.set(page, pageInfo);
59
- }
60
-
61
- /*
62
- * Copyright (c) Microsoft Corporation.
63
- * Licensed under the MIT License.
64
- *
65
- * Code generated by Microsoft (R) AutoRest Code Generator.
66
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
67
- */
68
- /** Known values of {@link CreatedByType} that the service accepts. */
69
- exports.KnownCreatedByType = void 0;
70
- (function (KnownCreatedByType) {
71
- /** User */
72
- KnownCreatedByType["User"] = "User";
73
- /** Application */
74
- KnownCreatedByType["Application"] = "Application";
75
- /** ManagedIdentity */
76
- KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
77
- /** Key */
78
- KnownCreatedByType["Key"] = "Key";
79
- })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
80
- /** Known values of {@link TemplateSpecExpandKind} that the service accepts. */
81
- exports.KnownTemplateSpecExpandKind = void 0;
82
- (function (KnownTemplateSpecExpandKind) {
83
- /** Includes version information with the Template Spec. */
84
- KnownTemplateSpecExpandKind["Versions"] = "versions";
85
- })(exports.KnownTemplateSpecExpandKind || (exports.KnownTemplateSpecExpandKind = {}));
86
-
87
- /*
88
- * Copyright (c) Microsoft Corporation.
89
- * Licensed under the MIT License.
90
- *
91
- * Code generated by Microsoft (R) AutoRest Code Generator.
92
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
93
- */
94
- const TemplateSpecVersionInfo = {
95
- type: {
96
- name: "Composite",
97
- className: "TemplateSpecVersionInfo",
98
- modelProperties: {
99
- description: {
100
- serializedName: "description",
101
- readOnly: true,
102
- type: {
103
- name: "String"
104
- }
105
- },
106
- timeCreated: {
107
- serializedName: "timeCreated",
108
- readOnly: true,
109
- type: {
110
- name: "DateTime"
111
- }
112
- },
113
- timeModified: {
114
- serializedName: "timeModified",
115
- readOnly: true,
116
- type: {
117
- name: "DateTime"
118
- }
119
- }
120
- }
121
- }
122
- };
123
- const AzureResourceBase = {
124
- type: {
125
- name: "Composite",
126
- className: "AzureResourceBase",
127
- modelProperties: {
128
- id: {
129
- serializedName: "id",
130
- readOnly: true,
131
- type: {
132
- name: "String"
133
- }
134
- },
135
- name: {
136
- serializedName: "name",
137
- readOnly: true,
138
- type: {
139
- name: "String"
140
- }
141
- },
142
- type: {
143
- serializedName: "type",
144
- readOnly: true,
145
- type: {
146
- name: "String"
147
- }
148
- },
149
- systemData: {
150
- serializedName: "systemData",
151
- type: {
152
- name: "Composite",
153
- className: "SystemData"
154
- }
155
- }
156
- }
157
- }
158
- };
159
- const SystemData = {
160
- type: {
161
- name: "Composite",
162
- className: "SystemData",
163
- modelProperties: {
164
- createdBy: {
165
- serializedName: "createdBy",
166
- type: {
167
- name: "String"
168
- }
169
- },
170
- createdByType: {
171
- serializedName: "createdByType",
172
- type: {
173
- name: "String"
174
- }
175
- },
176
- createdAt: {
177
- serializedName: "createdAt",
178
- type: {
179
- name: "DateTime"
180
- }
181
- },
182
- lastModifiedBy: {
183
- serializedName: "lastModifiedBy",
184
- type: {
185
- name: "String"
186
- }
187
- },
188
- lastModifiedByType: {
189
- serializedName: "lastModifiedByType",
190
- type: {
191
- name: "String"
192
- }
193
- },
194
- lastModifiedAt: {
195
- serializedName: "lastModifiedAt",
196
- type: {
197
- name: "DateTime"
198
- }
199
- }
200
- }
201
- }
202
- };
203
- const TemplateSpecsError = {
204
- type: {
205
- name: "Composite",
206
- className: "TemplateSpecsError",
207
- modelProperties: {
208
- error: {
209
- serializedName: "error",
210
- type: {
211
- name: "Composite",
212
- className: "ErrorResponse"
213
- }
214
- }
215
- }
216
- }
217
- };
218
- const ErrorResponse = {
219
- type: {
220
- name: "Composite",
221
- className: "ErrorResponse",
222
- modelProperties: {
223
- code: {
224
- serializedName: "code",
225
- readOnly: true,
226
- type: {
227
- name: "String"
228
- }
229
- },
230
- message: {
231
- serializedName: "message",
232
- readOnly: true,
233
- type: {
234
- name: "String"
235
- }
236
- },
237
- target: {
238
- serializedName: "target",
239
- readOnly: true,
240
- type: {
241
- name: "String"
242
- }
243
- },
244
- details: {
245
- serializedName: "details",
246
- readOnly: true,
247
- type: {
248
- name: "Sequence",
249
- element: {
250
- type: {
251
- name: "Composite",
252
- className: "ErrorResponse"
253
- }
254
- }
255
- }
256
- },
257
- additionalInfo: {
258
- serializedName: "additionalInfo",
259
- readOnly: true,
260
- type: {
261
- name: "Sequence",
262
- element: {
263
- type: {
264
- name: "Composite",
265
- className: "ErrorAdditionalInfo"
266
- }
267
- }
268
- }
269
- }
270
- }
271
- }
272
- };
273
- const ErrorAdditionalInfo = {
274
- type: {
275
- name: "Composite",
276
- className: "ErrorAdditionalInfo",
277
- modelProperties: {
278
- type: {
279
- serializedName: "type",
280
- readOnly: true,
281
- type: {
282
- name: "String"
283
- }
284
- },
285
- info: {
286
- serializedName: "info",
287
- readOnly: true,
288
- type: {
289
- name: "Dictionary",
290
- value: { type: { name: "any" } }
291
- }
292
- }
293
- }
294
- }
295
- };
296
- const TemplateSpecsListResult = {
297
- type: {
298
- name: "Composite",
299
- className: "TemplateSpecsListResult",
300
- modelProperties: {
301
- value: {
302
- serializedName: "value",
303
- type: {
304
- name: "Sequence",
305
- element: {
306
- type: {
307
- name: "Composite",
308
- className: "TemplateSpec"
309
- }
310
- }
311
- }
312
- },
313
- nextLink: {
314
- serializedName: "nextLink",
315
- readOnly: true,
316
- type: {
317
- name: "String"
318
- }
319
- }
320
- }
321
- }
322
- };
323
- const LinkedTemplateArtifact = {
324
- type: {
325
- name: "Composite",
326
- className: "LinkedTemplateArtifact",
327
- modelProperties: {
328
- path: {
329
- serializedName: "path",
330
- required: true,
331
- type: {
332
- name: "String"
333
- }
334
- },
335
- template: {
336
- serializedName: "template",
337
- required: true,
338
- type: {
339
- name: "Dictionary",
340
- value: { type: { name: "any" } }
341
- }
342
- }
343
- }
344
- }
345
- };
346
- const TemplateSpecVersionsListResult = {
347
- type: {
348
- name: "Composite",
349
- className: "TemplateSpecVersionsListResult",
350
- modelProperties: {
351
- value: {
352
- serializedName: "value",
353
- type: {
354
- name: "Sequence",
355
- element: {
356
- type: {
357
- name: "Composite",
358
- className: "TemplateSpecVersion"
359
- }
360
- }
361
- }
362
- },
363
- nextLink: {
364
- serializedName: "nextLink",
365
- readOnly: true,
366
- type: {
367
- name: "String"
368
- }
369
- }
370
- }
371
- }
372
- };
373
- const TemplateSpec = {
374
- type: {
375
- name: "Composite",
376
- className: "TemplateSpec",
377
- modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { location: {
378
- serializedName: "location",
379
- required: true,
380
- type: {
381
- name: "String"
382
- }
383
- }, tags: {
384
- serializedName: "tags",
385
- type: {
386
- name: "Dictionary",
387
- value: { type: { name: "String" } }
388
- }
389
- }, description: {
390
- constraints: {
391
- MaxLength: 4096
392
- },
393
- serializedName: "properties.description",
394
- type: {
395
- name: "String"
396
- }
397
- }, displayName: {
398
- constraints: {
399
- MaxLength: 64
400
- },
401
- serializedName: "properties.displayName",
402
- type: {
403
- name: "String"
404
- }
405
- }, metadata: {
406
- serializedName: "properties.metadata",
407
- type: {
408
- name: "Dictionary",
409
- value: { type: { name: "any" } }
410
- }
411
- }, versions: {
412
- serializedName: "properties.versions",
413
- readOnly: true,
414
- type: {
415
- name: "Dictionary",
416
- value: {
417
- type: { name: "Composite", className: "TemplateSpecVersionInfo" }
418
- }
419
- }
420
- } })
421
- }
422
- };
423
- const TemplateSpecUpdateModel = {
424
- type: {
425
- name: "Composite",
426
- className: "TemplateSpecUpdateModel",
427
- modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { tags: {
428
- serializedName: "tags",
429
- type: {
430
- name: "Dictionary",
431
- value: { type: { name: "String" } }
432
- }
433
- } })
434
- }
435
- };
436
- const TemplateSpecVersion = {
437
- type: {
438
- name: "Composite",
439
- className: "TemplateSpecVersion",
440
- modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { location: {
441
- serializedName: "location",
442
- required: true,
443
- type: {
444
- name: "String"
445
- }
446
- }, tags: {
447
- serializedName: "tags",
448
- type: {
449
- name: "Dictionary",
450
- value: { type: { name: "String" } }
451
- }
452
- }, description: {
453
- constraints: {
454
- MaxLength: 4096
455
- },
456
- serializedName: "properties.description",
457
- type: {
458
- name: "String"
459
- }
460
- }, linkedTemplates: {
461
- serializedName: "properties.linkedTemplates",
462
- type: {
463
- name: "Sequence",
464
- element: {
465
- type: {
466
- name: "Composite",
467
- className: "LinkedTemplateArtifact"
468
- }
469
- }
470
- }
471
- }, metadata: {
472
- serializedName: "properties.metadata",
473
- type: {
474
- name: "Dictionary",
475
- value: { type: { name: "any" } }
476
- }
477
- }, mainTemplate: {
478
- serializedName: "properties.mainTemplate",
479
- type: {
480
- name: "Dictionary",
481
- value: { type: { name: "any" } }
482
- }
483
- }, uiFormDefinition: {
484
- serializedName: "properties.uiFormDefinition",
485
- type: {
486
- name: "Dictionary",
487
- value: { type: { name: "any" } }
488
- }
489
- } })
490
- }
491
- };
492
- const TemplateSpecVersionUpdateModel = {
493
- type: {
494
- name: "Composite",
495
- className: "TemplateSpecVersionUpdateModel",
496
- modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { tags: {
497
- serializedName: "tags",
498
- type: {
499
- name: "Dictionary",
500
- value: { type: { name: "String" } }
501
- }
502
- } })
503
- }
504
- };
505
-
506
- var Mappers = /*#__PURE__*/Object.freeze({
507
- __proto__: null,
508
- AzureResourceBase: AzureResourceBase,
509
- ErrorAdditionalInfo: ErrorAdditionalInfo,
510
- ErrorResponse: ErrorResponse,
511
- LinkedTemplateArtifact: LinkedTemplateArtifact,
512
- SystemData: SystemData,
513
- TemplateSpec: TemplateSpec,
514
- TemplateSpecUpdateModel: TemplateSpecUpdateModel,
515
- TemplateSpecVersion: TemplateSpecVersion,
516
- TemplateSpecVersionInfo: TemplateSpecVersionInfo,
517
- TemplateSpecVersionUpdateModel: TemplateSpecVersionUpdateModel,
518
- TemplateSpecVersionsListResult: TemplateSpecVersionsListResult,
519
- TemplateSpecsError: TemplateSpecsError,
520
- TemplateSpecsListResult: TemplateSpecsListResult
521
- });
522
-
523
- /*
524
- * Copyright (c) Microsoft Corporation.
525
- * Licensed under the MIT License.
526
- *
527
- * Code generated by Microsoft (R) AutoRest Code Generator.
528
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
529
- */
530
- const contentType = {
531
- parameterPath: ["options", "contentType"],
532
- mapper: {
533
- defaultValue: "application/json",
534
- isConstant: true,
535
- serializedName: "Content-Type",
536
- type: {
537
- name: "String"
538
- }
539
- }
540
- };
541
- const templateSpec = {
542
- parameterPath: "templateSpec",
543
- mapper: TemplateSpec
544
- };
545
- const accept = {
546
- parameterPath: "accept",
547
- mapper: {
548
- defaultValue: "application/json",
549
- isConstant: true,
550
- serializedName: "Accept",
551
- type: {
552
- name: "String"
553
- }
554
- }
555
- };
556
- const $host = {
557
- parameterPath: "$host",
558
- mapper: {
559
- serializedName: "$host",
560
- required: true,
561
- type: {
562
- name: "String"
563
- }
564
- },
565
- skipEncoding: true
566
- };
567
- const subscriptionId = {
568
- parameterPath: "subscriptionId",
569
- mapper: {
570
- serializedName: "subscriptionId",
571
- required: true,
572
- type: {
573
- name: "String"
574
- }
575
- }
576
- };
577
- const resourceGroupName = {
578
- parameterPath: "resourceGroupName",
579
- mapper: {
580
- constraints: {
581
- Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
582
- MaxLength: 90,
583
- MinLength: 1
584
- },
585
- serializedName: "resourceGroupName",
586
- required: true,
587
- type: {
588
- name: "String"
589
- }
590
- }
591
- };
592
- const templateSpecName = {
593
- parameterPath: "templateSpecName",
594
- mapper: {
595
- constraints: {
596
- Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
597
- MaxLength: 90,
598
- MinLength: 1
599
- },
600
- serializedName: "templateSpecName",
601
- required: true,
602
- type: {
603
- name: "String"
604
- }
605
- }
606
- };
607
- const apiVersion = {
608
- parameterPath: "apiVersion",
609
- mapper: {
610
- defaultValue: "2021-05-01",
611
- isConstant: true,
612
- serializedName: "api-version",
613
- type: {
614
- name: "String"
615
- }
616
- }
617
- };
618
- const templateSpec1 = {
619
- parameterPath: ["options", "templateSpec"],
620
- mapper: TemplateSpecUpdateModel
621
- };
622
- const expand = {
623
- parameterPath: ["options", "expand"],
624
- mapper: {
625
- serializedName: "$expand",
626
- type: {
627
- name: "String"
628
- }
629
- }
630
- };
631
- const nextLink = {
632
- parameterPath: "nextLink",
633
- mapper: {
634
- serializedName: "nextLink",
635
- required: true,
636
- type: {
637
- name: "String"
638
- }
639
- },
640
- skipEncoding: true
641
- };
642
- const templateSpecVersionModel = {
643
- parameterPath: "templateSpecVersionModel",
644
- mapper: TemplateSpecVersion
645
- };
646
- const templateSpecVersion = {
647
- parameterPath: "templateSpecVersion",
648
- mapper: {
649
- constraints: {
650
- Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
651
- MaxLength: 90,
652
- MinLength: 1
653
- },
654
- serializedName: "templateSpecVersion",
655
- required: true,
656
- type: {
657
- name: "String"
658
- }
659
- }
660
- };
661
- const templateSpecVersionUpdateModel = {
662
- parameterPath: ["options", "templateSpecVersionUpdateModel"],
663
- mapper: TemplateSpecVersionUpdateModel
664
- };
665
-
666
- /*
667
- * Copyright (c) Microsoft Corporation.
668
- * Licensed under the MIT License.
669
- *
670
- * Code generated by Microsoft (R) AutoRest Code Generator.
671
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
672
- */
673
- /// <reference lib="esnext.asynciterable" />
674
- /** Class containing TemplateSpecs operations. */
675
- class TemplateSpecsImpl {
676
- /**
677
- * Initialize a new instance of the class TemplateSpecs class.
678
- * @param client Reference to the service client
679
- */
680
- constructor(client) {
681
- this.client = client;
682
- }
683
- /**
684
- * Lists all the Template Specs within the specified subscriptions.
685
- * @param options The options parameters.
686
- */
687
- listBySubscription(options) {
688
- const iter = this.listBySubscriptionPagingAll(options);
689
- return {
690
- next() {
691
- return iter.next();
692
- },
693
- [Symbol.asyncIterator]() {
694
- return this;
695
- },
696
- byPage: (settings) => {
697
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
698
- throw new Error("maxPageSize is not supported by this operation.");
699
- }
700
- return this.listBySubscriptionPagingPage(options, settings);
701
- }
702
- };
703
- }
704
- listBySubscriptionPagingPage(options, settings) {
705
- return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
706
- let result;
707
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
708
- if (!continuationToken) {
709
- result = yield tslib.__await(this._listBySubscription(options));
710
- let page = result.value || [];
711
- continuationToken = result.nextLink;
712
- setContinuationToken(page, continuationToken);
713
- yield yield tslib.__await(page);
714
- }
715
- while (continuationToken) {
716
- result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
717
- continuationToken = result.nextLink;
718
- let page = result.value || [];
719
- setContinuationToken(page, continuationToken);
720
- yield yield tslib.__await(page);
721
- }
722
- });
723
- }
724
- listBySubscriptionPagingAll(options) {
725
- return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
726
- var _a, e_1, _b, _c;
727
- try {
728
- for (var _d = true, _e = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
729
- _c = _f.value;
730
- _d = false;
731
- const page = _c;
732
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
733
- }
734
- }
735
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
736
- finally {
737
- try {
738
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
739
- }
740
- finally { if (e_1) throw e_1.error; }
741
- }
742
- });
743
- }
744
- /**
745
- * Lists all the Template Specs within the specified resource group.
746
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
747
- * @param options The options parameters.
748
- */
749
- listByResourceGroup(resourceGroupName, options) {
750
- const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
751
- return {
752
- next() {
753
- return iter.next();
754
- },
755
- [Symbol.asyncIterator]() {
756
- return this;
757
- },
758
- byPage: (settings) => {
759
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
760
- throw new Error("maxPageSize is not supported by this operation.");
761
- }
762
- return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
763
- }
764
- };
765
- }
766
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
767
- return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
768
- let result;
769
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
770
- if (!continuationToken) {
771
- result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
772
- let page = result.value || [];
773
- continuationToken = result.nextLink;
774
- setContinuationToken(page, continuationToken);
775
- yield yield tslib.__await(page);
776
- }
777
- while (continuationToken) {
778
- result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
779
- continuationToken = result.nextLink;
780
- let page = result.value || [];
781
- setContinuationToken(page, continuationToken);
782
- yield yield tslib.__await(page);
783
- }
784
- });
785
- }
786
- listByResourceGroupPagingAll(resourceGroupName, options) {
787
- return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
788
- var _a, e_2, _b, _c;
789
- try {
790
- for (var _d = true, _e = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
791
- _c = _f.value;
792
- _d = false;
793
- const page = _c;
794
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
795
- }
796
- }
797
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
798
- finally {
799
- try {
800
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
801
- }
802
- finally { if (e_2) throw e_2.error; }
803
- }
804
- });
805
- }
806
- /**
807
- * Creates or updates a Template Spec.
808
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
809
- * @param templateSpecName Name of the Template Spec.
810
- * @param templateSpec Template Spec supplied to the operation.
811
- * @param options The options parameters.
812
- */
813
- createOrUpdate(resourceGroupName, templateSpecName, templateSpec, options) {
814
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpec, options }, createOrUpdateOperationSpec$1);
815
- }
816
- /**
817
- * Updates Template Spec tags with specified values.
818
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
819
- * @param templateSpecName Name of the Template Spec.
820
- * @param options The options parameters.
821
- */
822
- update(resourceGroupName, templateSpecName, options) {
823
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, updateOperationSpec$1);
824
- }
825
- /**
826
- * Gets a Template Spec with a given name.
827
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
828
- * @param templateSpecName Name of the Template Spec.
829
- * @param options The options parameters.
830
- */
831
- get(resourceGroupName, templateSpecName, options) {
832
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, getOperationSpec$1);
833
- }
834
- /**
835
- * Deletes a Template Spec by name. When operation completes, status code 200 returned without content.
836
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
837
- * @param templateSpecName Name of the Template Spec.
838
- * @param options The options parameters.
839
- */
840
- delete(resourceGroupName, templateSpecName, options) {
841
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, deleteOperationSpec$1);
842
- }
843
- /**
844
- * Lists all the Template Specs within the specified subscriptions.
845
- * @param options The options parameters.
846
- */
847
- _listBySubscription(options) {
848
- return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
849
- }
850
- /**
851
- * Lists all the Template Specs within the specified resource group.
852
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
853
- * @param options The options parameters.
854
- */
855
- _listByResourceGroup(resourceGroupName, options) {
856
- return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
857
- }
858
- /**
859
- * ListBySubscriptionNext
860
- * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
861
- * @param options The options parameters.
862
- */
863
- _listBySubscriptionNext(nextLink, options) {
864
- return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
865
- }
866
- /**
867
- * ListByResourceGroupNext
868
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
869
- * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
870
- * @param options The options parameters.
871
- */
872
- _listByResourceGroupNext(resourceGroupName, nextLink, options) {
873
- return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
874
- }
875
- }
876
- // Operation Specifications
877
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
878
- const createOrUpdateOperationSpec$1 = {
879
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
880
- httpMethod: "PUT",
881
- responses: {
882
- 200: {
883
- bodyMapper: TemplateSpec
884
- },
885
- 201: {
886
- bodyMapper: TemplateSpec
887
- },
888
- default: {
889
- bodyMapper: TemplateSpecsError
890
- }
891
- },
892
- requestBody: templateSpec,
893
- queryParameters: [apiVersion],
894
- urlParameters: [
895
- $host,
896
- subscriptionId,
897
- resourceGroupName,
898
- templateSpecName
899
- ],
900
- headerParameters: [contentType, accept],
901
- mediaType: "json",
902
- serializer: serializer$1
903
- };
904
- const updateOperationSpec$1 = {
905
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
906
- httpMethod: "PATCH",
907
- responses: {
908
- 200: {
909
- bodyMapper: TemplateSpec
910
- },
911
- default: {
912
- bodyMapper: TemplateSpecsError
913
- }
914
- },
915
- requestBody: templateSpec1,
916
- queryParameters: [apiVersion],
917
- urlParameters: [
918
- $host,
919
- subscriptionId,
920
- resourceGroupName,
921
- templateSpecName
922
- ],
923
- headerParameters: [contentType, accept],
924
- mediaType: "json",
925
- serializer: serializer$1
926
- };
927
- const getOperationSpec$1 = {
928
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
929
- httpMethod: "GET",
930
- responses: {
931
- 200: {
932
- bodyMapper: TemplateSpec
933
- },
934
- default: {
935
- bodyMapper: TemplateSpecsError
936
- }
937
- },
938
- queryParameters: [apiVersion, expand],
939
- urlParameters: [
940
- $host,
941
- subscriptionId,
942
- resourceGroupName,
943
- templateSpecName
944
- ],
945
- headerParameters: [accept],
946
- serializer: serializer$1
947
- };
948
- const deleteOperationSpec$1 = {
949
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
950
- httpMethod: "DELETE",
951
- responses: {
952
- 200: {},
953
- 204: {},
954
- default: {
955
- bodyMapper: TemplateSpecsError
956
- }
957
- },
958
- queryParameters: [apiVersion],
959
- urlParameters: [
960
- $host,
961
- subscriptionId,
962
- resourceGroupName,
963
- templateSpecName
964
- ],
965
- headerParameters: [accept],
966
- serializer: serializer$1
967
- };
968
- const listBySubscriptionOperationSpec = {
969
- path: "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/templateSpecs/",
970
- httpMethod: "GET",
971
- responses: {
972
- 200: {
973
- bodyMapper: TemplateSpecsListResult
974
- },
975
- default: {
976
- bodyMapper: TemplateSpecsError
977
- }
978
- },
979
- queryParameters: [apiVersion, expand],
980
- urlParameters: [$host, subscriptionId],
981
- headerParameters: [accept],
982
- serializer: serializer$1
983
- };
984
- const listByResourceGroupOperationSpec = {
985
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/",
986
- httpMethod: "GET",
987
- responses: {
988
- 200: {
989
- bodyMapper: TemplateSpecsListResult
990
- },
991
- default: {
992
- bodyMapper: TemplateSpecsError
993
- }
994
- },
995
- queryParameters: [apiVersion, expand],
996
- urlParameters: [
997
- $host,
998
- subscriptionId,
999
- resourceGroupName
1000
- ],
1001
- headerParameters: [accept],
1002
- serializer: serializer$1
1003
- };
1004
- const listBySubscriptionNextOperationSpec = {
1005
- path: "{nextLink}",
1006
- httpMethod: "GET",
1007
- responses: {
1008
- 200: {
1009
- bodyMapper: TemplateSpecsListResult
1010
- },
1011
- default: {
1012
- bodyMapper: TemplateSpecsError
1013
- }
1014
- },
1015
- queryParameters: [apiVersion, expand],
1016
- urlParameters: [
1017
- $host,
1018
- subscriptionId,
1019
- nextLink
1020
- ],
1021
- headerParameters: [accept],
1022
- serializer: serializer$1
1023
- };
1024
- const listByResourceGroupNextOperationSpec = {
1025
- path: "{nextLink}",
1026
- httpMethod: "GET",
1027
- responses: {
1028
- 200: {
1029
- bodyMapper: TemplateSpecsListResult
1030
- },
1031
- default: {
1032
- bodyMapper: TemplateSpecsError
1033
- }
1034
- },
1035
- queryParameters: [apiVersion, expand],
1036
- urlParameters: [
1037
- $host,
1038
- subscriptionId,
1039
- resourceGroupName,
1040
- nextLink
1041
- ],
1042
- headerParameters: [accept],
1043
- serializer: serializer$1
1044
- };
1045
-
1046
- /*
1047
- * Copyright (c) Microsoft Corporation.
1048
- * Licensed under the MIT License.
1049
- *
1050
- * Code generated by Microsoft (R) AutoRest Code Generator.
1051
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1052
- */
1053
- /// <reference lib="esnext.asynciterable" />
1054
- /** Class containing TemplateSpecVersions operations. */
1055
- class TemplateSpecVersionsImpl {
1056
- /**
1057
- * Initialize a new instance of the class TemplateSpecVersions class.
1058
- * @param client Reference to the service client
1059
- */
1060
- constructor(client) {
1061
- this.client = client;
1062
- }
1063
- /**
1064
- * Lists all the Template Spec versions in the specified Template Spec.
1065
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1066
- * @param templateSpecName Name of the Template Spec.
1067
- * @param options The options parameters.
1068
- */
1069
- list(resourceGroupName, templateSpecName, options) {
1070
- const iter = this.listPagingAll(resourceGroupName, templateSpecName, options);
1071
- return {
1072
- next() {
1073
- return iter.next();
1074
- },
1075
- [Symbol.asyncIterator]() {
1076
- return this;
1077
- },
1078
- byPage: (settings) => {
1079
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1080
- throw new Error("maxPageSize is not supported by this operation.");
1081
- }
1082
- return this.listPagingPage(resourceGroupName, templateSpecName, options, settings);
1083
- }
1084
- };
1085
- }
1086
- listPagingPage(resourceGroupName, templateSpecName, options, settings) {
1087
- return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1088
- let result;
1089
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1090
- if (!continuationToken) {
1091
- result = yield tslib.__await(this._list(resourceGroupName, templateSpecName, options));
1092
- let page = result.value || [];
1093
- continuationToken = result.nextLink;
1094
- setContinuationToken(page, continuationToken);
1095
- yield yield tslib.__await(page);
1096
- }
1097
- while (continuationToken) {
1098
- result = yield tslib.__await(this._listNext(resourceGroupName, templateSpecName, continuationToken, options));
1099
- continuationToken = result.nextLink;
1100
- let page = result.value || [];
1101
- setContinuationToken(page, continuationToken);
1102
- yield yield tslib.__await(page);
1103
- }
1104
- });
1105
- }
1106
- listPagingAll(resourceGroupName, templateSpecName, options) {
1107
- return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1108
- var _a, e_1, _b, _c;
1109
- try {
1110
- for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(resourceGroupName, templateSpecName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1111
- _c = _f.value;
1112
- _d = false;
1113
- const page = _c;
1114
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1115
- }
1116
- }
1117
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1118
- finally {
1119
- try {
1120
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1121
- }
1122
- finally { if (e_1) throw e_1.error; }
1123
- }
1124
- });
1125
- }
1126
- /**
1127
- * Creates or updates a Template Spec version.
1128
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1129
- * @param templateSpecName Name of the Template Spec.
1130
- * @param templateSpecVersion The version of the Template Spec.
1131
- * @param templateSpecVersionModel Template Spec Version supplied to the operation.
1132
- * @param options The options parameters.
1133
- */
1134
- createOrUpdate(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel, options) {
1135
- return this.client.sendOperationRequest({
1136
- resourceGroupName,
1137
- templateSpecName,
1138
- templateSpecVersion,
1139
- templateSpecVersionModel,
1140
- options
1141
- }, createOrUpdateOperationSpec);
1142
- }
1143
- /**
1144
- * Updates Template Spec Version tags with specified values.
1145
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1146
- * @param templateSpecName Name of the Template Spec.
1147
- * @param templateSpecVersion The version of the Template Spec.
1148
- * @param options The options parameters.
1149
- */
1150
- update(resourceGroupName, templateSpecName, templateSpecVersion, options) {
1151
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, updateOperationSpec);
1152
- }
1153
- /**
1154
- * Gets a Template Spec version from a specific Template Spec.
1155
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1156
- * @param templateSpecName Name of the Template Spec.
1157
- * @param templateSpecVersion The version of the Template Spec.
1158
- * @param options The options parameters.
1159
- */
1160
- get(resourceGroupName, templateSpecName, templateSpecVersion, options) {
1161
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, getOperationSpec);
1162
- }
1163
- /**
1164
- * Deletes a specific version from a Template Spec. When operation completes, status code 200 returned
1165
- * without content.
1166
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1167
- * @param templateSpecName Name of the Template Spec.
1168
- * @param templateSpecVersion The version of the Template Spec.
1169
- * @param options The options parameters.
1170
- */
1171
- delete(resourceGroupName, templateSpecName, templateSpecVersion, options) {
1172
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, deleteOperationSpec);
1173
- }
1174
- /**
1175
- * Lists all the Template Spec versions in the specified Template Spec.
1176
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1177
- * @param templateSpecName Name of the Template Spec.
1178
- * @param options The options parameters.
1179
- */
1180
- _list(resourceGroupName, templateSpecName, options) {
1181
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, listOperationSpec);
1182
- }
1183
- /**
1184
- * ListNext
1185
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1186
- * @param templateSpecName Name of the Template Spec.
1187
- * @param nextLink The nextLink from the previous successful call to the List method.
1188
- * @param options The options parameters.
1189
- */
1190
- _listNext(resourceGroupName, templateSpecName, nextLink, options) {
1191
- return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, nextLink, options }, listNextOperationSpec);
1192
- }
1193
- }
1194
- // Operation Specifications
1195
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1196
- const createOrUpdateOperationSpec = {
1197
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
1198
- httpMethod: "PUT",
1199
- responses: {
1200
- 200: {
1201
- bodyMapper: TemplateSpecVersion
1202
- },
1203
- 201: {
1204
- bodyMapper: TemplateSpecVersion
1205
- },
1206
- default: {
1207
- bodyMapper: TemplateSpecsError
1208
- }
1209
- },
1210
- requestBody: templateSpecVersionModel,
1211
- queryParameters: [apiVersion],
1212
- urlParameters: [
1213
- $host,
1214
- subscriptionId,
1215
- resourceGroupName,
1216
- templateSpecName,
1217
- templateSpecVersion
1218
- ],
1219
- headerParameters: [contentType, accept],
1220
- mediaType: "json",
1221
- serializer
1222
- };
1223
- const updateOperationSpec = {
1224
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
1225
- httpMethod: "PATCH",
1226
- responses: {
1227
- 200: {
1228
- bodyMapper: TemplateSpecVersion
1229
- },
1230
- default: {
1231
- bodyMapper: TemplateSpecsError
1232
- }
1233
- },
1234
- requestBody: templateSpecVersionUpdateModel,
1235
- queryParameters: [apiVersion],
1236
- urlParameters: [
1237
- $host,
1238
- subscriptionId,
1239
- resourceGroupName,
1240
- templateSpecName,
1241
- templateSpecVersion
1242
- ],
1243
- headerParameters: [contentType, accept],
1244
- mediaType: "json",
1245
- serializer
1246
- };
1247
- const getOperationSpec = {
1248
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
1249
- httpMethod: "GET",
1250
- responses: {
1251
- 200: {
1252
- bodyMapper: TemplateSpecVersion
1253
- },
1254
- default: {
1255
- bodyMapper: TemplateSpecsError
1256
- }
1257
- },
1258
- queryParameters: [apiVersion],
1259
- urlParameters: [
1260
- $host,
1261
- subscriptionId,
1262
- resourceGroupName,
1263
- templateSpecName,
1264
- templateSpecVersion
1265
- ],
1266
- headerParameters: [accept],
1267
- serializer
1268
- };
1269
- const deleteOperationSpec = {
1270
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
1271
- httpMethod: "DELETE",
1272
- responses: {
1273
- 200: {},
1274
- 204: {},
1275
- default: {
1276
- bodyMapper: TemplateSpecsError
1277
- }
1278
- },
1279
- queryParameters: [apiVersion],
1280
- urlParameters: [
1281
- $host,
1282
- subscriptionId,
1283
- resourceGroupName,
1284
- templateSpecName,
1285
- templateSpecVersion
1286
- ],
1287
- headerParameters: [accept],
1288
- serializer
1289
- };
1290
- const listOperationSpec = {
1291
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions",
1292
- httpMethod: "GET",
1293
- responses: {
1294
- 200: {
1295
- bodyMapper: TemplateSpecVersionsListResult
1296
- },
1297
- default: {
1298
- bodyMapper: TemplateSpecsError
1299
- }
1300
- },
1301
- queryParameters: [apiVersion],
1302
- urlParameters: [
1303
- $host,
1304
- subscriptionId,
1305
- resourceGroupName,
1306
- templateSpecName
1307
- ],
1308
- headerParameters: [accept],
1309
- serializer
1310
- };
1311
- const listNextOperationSpec = {
1312
- path: "{nextLink}",
1313
- httpMethod: "GET",
1314
- responses: {
1315
- 200: {
1316
- bodyMapper: TemplateSpecVersionsListResult
1317
- },
1318
- default: {
1319
- bodyMapper: TemplateSpecsError
1320
- }
1321
- },
1322
- queryParameters: [apiVersion],
1323
- urlParameters: [
1324
- $host,
1325
- subscriptionId,
1326
- resourceGroupName,
1327
- templateSpecName,
1328
- nextLink
1329
- ],
1330
- headerParameters: [accept],
1331
- serializer
1332
- };
1333
-
1334
- /*
1335
- * Copyright (c) Microsoft Corporation.
1336
- * Licensed under the MIT License.
1337
- *
1338
- * Code generated by Microsoft (R) AutoRest Code Generator.
1339
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1340
- */
1341
- class TemplateSpecsClient extends coreClient__namespace.ServiceClient {
1342
- /**
1343
- * Initializes a new instance of the TemplateSpecsClient class.
1344
- * @param credentials Subscription credentials which uniquely identify client subscription.
1345
- * @param subscriptionId Subscription Id which forms part of the URI for every service call.
1346
- * @param options The parameter options
1347
- */
1348
- constructor(credentials, subscriptionId, options) {
1349
- var _a, _b, _c;
1350
- if (credentials === undefined) {
1351
- throw new Error("'credentials' cannot be null");
1352
- }
1353
- if (subscriptionId === undefined) {
1354
- throw new Error("'subscriptionId' cannot be null");
1355
- }
1356
- // Initializing default values for options
1357
- if (!options) {
1358
- options = {};
1359
- }
1360
- const defaults = {
1361
- requestContentType: "application/json; charset=utf-8",
1362
- credential: credentials
1363
- };
1364
- const packageDetails = `azsdk-js-arm-templatespecs/2.1.1`;
1365
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1366
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1367
- : `${packageDetails}`;
1368
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1369
- userAgentPrefix
1370
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1371
- super(optionsWithDefaults);
1372
- let bearerTokenAuthenticationPolicyFound = false;
1373
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
1374
- const pipelinePolicies = options.pipeline.getOrderedPolicies();
1375
- bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
1376
- coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
1377
- }
1378
- if (!options ||
1379
- !options.pipeline ||
1380
- options.pipeline.getOrderedPolicies().length == 0 ||
1381
- !bearerTokenAuthenticationPolicyFound) {
1382
- this.pipeline.removePolicy({
1383
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
1384
- });
1385
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
1386
- credential: credentials,
1387
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
1388
- challengeCallbacks: {
1389
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
1390
- }
1391
- }));
1392
- }
1393
- // Parameter assignments
1394
- this.subscriptionId = subscriptionId;
1395
- // Assigning values to Constant parameters
1396
- this.$host = options.$host || "https://management.azure.com";
1397
- this.apiVersion = options.apiVersion || "2021-05-01";
1398
- this.templateSpecs = new TemplateSpecsImpl(this);
1399
- this.templateSpecVersions = new TemplateSpecVersionsImpl(this);
1400
- this.addCustomApiVersionPolicy(options.apiVersion);
1401
- }
1402
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
1403
- addCustomApiVersionPolicy(apiVersion) {
1404
- if (!apiVersion) {
1405
- return;
1406
- }
1407
- const apiVersionPolicy = {
1408
- name: "CustomApiVersionPolicy",
1409
- sendRequest(request, next) {
1410
- return tslib.__awaiter(this, void 0, void 0, function* () {
1411
- const param = request.url.split("?");
1412
- if (param.length > 1) {
1413
- const newParams = param[1].split("&").map((item) => {
1414
- if (item.indexOf("api-version") > -1) {
1415
- return "api-version=" + apiVersion;
1416
- }
1417
- else {
1418
- return item;
1419
- }
1420
- });
1421
- request.url = param[0] + "?" + newParams.join("&");
1422
- }
1423
- return next(request);
1424
- });
1425
- }
1426
- };
1427
- this.pipeline.addPolicy(apiVersionPolicy);
1428
- }
1429
- }
1430
-
1431
- exports.TemplateSpecsClient = TemplateSpecsClient;
1432
- exports.getContinuationToken = getContinuationToken;
1433
- //# sourceMappingURL=index.js.map