@azure/arm-astro 1.0.0-beta.1 → 1.0.0-beta.2

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 (287) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/LICENSE +4 -4
  3. package/README.md +26 -19
  4. package/{dist-esm/src → dist/browser}/astroManagementClient.d.ts +2 -2
  5. package/dist/browser/astroManagementClient.d.ts.map +1 -0
  6. package/{dist-esm/src → dist/browser}/astroManagementClient.js +31 -24
  7. package/dist/browser/astroManagementClient.js.map +1 -0
  8. package/dist/browser/index.d.ts +5 -0
  9. package/dist/browser/index.d.ts.map +1 -0
  10. package/{dist-esm/src → dist/browser}/index.js +4 -4
  11. package/dist/browser/index.js.map +1 -0
  12. package/{dist-esm/src → dist/browser}/lroImpl.d.ts.map +1 -1
  13. package/dist/browser/lroImpl.js +18 -0
  14. package/dist/browser/lroImpl.js.map +1 -0
  15. package/dist/browser/models/index.js.map +1 -0
  16. package/{dist-esm/src → dist/browser}/models/mappers.js +14 -6
  17. package/dist/browser/models/mappers.js.map +1 -0
  18. package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
  19. package/dist/browser/models/parameters.js.map +1 -0
  20. package/dist/browser/operations/index.d.ts +3 -0
  21. package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
  22. package/{dist-esm/src → dist/browser}/operations/index.js +2 -2
  23. package/dist/browser/operations/index.js.map +1 -0
  24. package/{dist-esm/src → dist/browser}/operations/operations.d.ts +3 -3
  25. package/dist/browser/operations/operations.d.ts.map +1 -0
  26. package/{dist-esm/src → dist/browser}/operations/operations.js +26 -43
  27. package/dist/browser/operations/operations.js.map +1 -0
  28. package/{dist-esm/src → dist/browser}/operations/organizations.d.ts +3 -3
  29. package/dist/browser/operations/organizations.d.ts.map +1 -0
  30. package/{dist-esm/src → dist/browser}/operations/organizations.js +175 -206
  31. package/dist/browser/operations/organizations.js.map +1 -0
  32. package/dist/browser/operationsInterfaces/index.d.ts +3 -0
  33. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
  34. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +2 -2
  35. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  36. package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts +1 -1
  37. package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts.map +1 -1
  38. package/dist/browser/operationsInterfaces/operations.js.map +1 -0
  39. package/{dist-esm/src → dist/browser}/operationsInterfaces/organizations.d.ts +1 -1
  40. package/dist/browser/operationsInterfaces/organizations.d.ts.map +1 -0
  41. package/dist/browser/operationsInterfaces/organizations.js.map +1 -0
  42. package/dist/browser/package.json +3 -0
  43. package/{dist-esm/src → dist/browser}/pagingHelper.js +2 -4
  44. package/dist/browser/pagingHelper.js.map +1 -0
  45. package/dist/commonjs/astroManagementClient.d.ts +21 -0
  46. package/dist/commonjs/astroManagementClient.d.ts.map +1 -0
  47. package/dist/commonjs/astroManagementClient.js +113 -0
  48. package/dist/commonjs/astroManagementClient.js.map +1 -0
  49. package/dist/commonjs/index.d.ts +5 -0
  50. package/dist/commonjs/index.d.ts.map +1 -0
  51. package/dist/commonjs/index.js +19 -0
  52. package/dist/commonjs/index.js.map +1 -0
  53. package/dist/commonjs/lroImpl.d.ts +11 -0
  54. package/dist/commonjs/lroImpl.d.ts.map +1 -0
  55. package/dist/commonjs/lroImpl.js +21 -0
  56. package/dist/commonjs/lroImpl.js.map +1 -0
  57. package/{types/arm-astro.d.ts → dist/commonjs/models/index.d.ts} +565 -736
  58. package/dist/commonjs/models/index.d.ts.map +1 -0
  59. package/dist/commonjs/models/index.js +89 -0
  60. package/dist/commonjs/models/index.js.map +1 -0
  61. package/dist/commonjs/models/mappers.d.ts +28 -0
  62. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  63. package/dist/commonjs/models/mappers.js +868 -0
  64. package/dist/commonjs/models/mappers.js.map +1 -0
  65. package/dist/commonjs/models/parameters.d.ts +12 -0
  66. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  67. package/dist/commonjs/models/parameters.js +117 -0
  68. package/dist/commonjs/models/parameters.js.map +1 -0
  69. package/dist/commonjs/operations/index.d.ts +3 -0
  70. package/dist/commonjs/operations/index.d.ts.map +1 -0
  71. package/dist/commonjs/operations/index.js +13 -0
  72. package/dist/commonjs/operations/index.js.map +1 -0
  73. package/dist/commonjs/operations/operations.d.ts +32 -0
  74. package/dist/commonjs/operations/operations.d.ts.map +1 -0
  75. package/dist/commonjs/operations/operations.js +121 -0
  76. package/dist/commonjs/operations/operations.js.map +1 -0
  77. package/dist/commonjs/operations/organizations.d.ts +107 -0
  78. package/dist/commonjs/operations/organizations.d.ts.map +1 -0
  79. package/dist/commonjs/operations/organizations.js +528 -0
  80. package/dist/commonjs/operations/organizations.js.map +1 -0
  81. package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
  82. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  83. package/dist/commonjs/operationsInterfaces/index.js +13 -0
  84. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  85. package/dist/commonjs/operationsInterfaces/operations.d.ts +11 -0
  86. package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -0
  87. package/dist/commonjs/operationsInterfaces/operations.js +10 -0
  88. package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
  89. package/dist/commonjs/operationsInterfaces/organizations.d.ts +71 -0
  90. package/dist/commonjs/operationsInterfaces/organizations.d.ts.map +1 -0
  91. package/dist/commonjs/operationsInterfaces/organizations.js +10 -0
  92. package/dist/commonjs/operationsInterfaces/organizations.js.map +1 -0
  93. package/dist/commonjs/package.json +3 -0
  94. package/dist/commonjs/pagingHelper.d.ts +13 -0
  95. package/dist/commonjs/pagingHelper.d.ts.map +1 -0
  96. package/dist/commonjs/pagingHelper.js +34 -0
  97. package/dist/commonjs/pagingHelper.js.map +1 -0
  98. package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
  99. package/dist/esm/astroManagementClient.d.ts +21 -0
  100. package/dist/esm/astroManagementClient.d.ts.map +1 -0
  101. package/dist/esm/astroManagementClient.js +108 -0
  102. package/dist/esm/astroManagementClient.js.map +1 -0
  103. package/dist/esm/index.d.ts +5 -0
  104. package/dist/esm/index.d.ts.map +1 -0
  105. package/{src/index.ts → dist/esm/index.js} +5 -5
  106. package/dist/esm/index.js.map +1 -0
  107. package/dist/esm/lroImpl.d.ts +11 -0
  108. package/dist/esm/lroImpl.d.ts.map +1 -0
  109. package/dist/esm/lroImpl.js +18 -0
  110. package/dist/esm/lroImpl.js.map +1 -0
  111. package/dist/esm/models/index.d.ts +565 -0
  112. package/dist/esm/models/index.d.ts.map +1 -0
  113. package/dist/esm/models/index.js +86 -0
  114. package/dist/esm/models/index.js.map +1 -0
  115. package/dist/esm/models/mappers.d.ts +28 -0
  116. package/dist/esm/models/mappers.d.ts.map +1 -0
  117. package/dist/esm/models/mappers.js +865 -0
  118. package/dist/esm/models/mappers.js.map +1 -0
  119. package/dist/esm/models/parameters.d.ts +12 -0
  120. package/dist/esm/models/parameters.d.ts.map +1 -0
  121. package/dist/esm/models/parameters.js +114 -0
  122. package/dist/esm/models/parameters.js.map +1 -0
  123. package/dist/esm/operations/index.d.ts +3 -0
  124. package/dist/esm/operations/index.d.ts.map +1 -0
  125. package/dist/esm/operations/index.js +10 -0
  126. package/dist/esm/operations/index.js.map +1 -0
  127. package/dist/esm/operations/operations.d.ts +32 -0
  128. package/dist/esm/operations/operations.d.ts.map +1 -0
  129. package/dist/esm/operations/operations.js +116 -0
  130. package/dist/esm/operations/operations.js.map +1 -0
  131. package/dist/esm/operations/organizations.d.ts +107 -0
  132. package/dist/esm/operations/organizations.d.ts.map +1 -0
  133. package/dist/esm/operations/organizations.js +523 -0
  134. package/dist/esm/operations/organizations.js.map +1 -0
  135. package/dist/esm/operationsInterfaces/index.d.ts +3 -0
  136. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  137. package/dist/esm/operationsInterfaces/index.js +10 -0
  138. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  139. package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
  140. package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
  141. package/{src/operations/index.ts → dist/esm/operationsInterfaces/operations.js} +2 -3
  142. package/dist/esm/operationsInterfaces/operations.js.map +1 -0
  143. package/dist/esm/operationsInterfaces/organizations.d.ts +71 -0
  144. package/dist/esm/operationsInterfaces/organizations.d.ts.map +1 -0
  145. package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/organizations.js} +2 -3
  146. package/dist/esm/operationsInterfaces/organizations.js.map +1 -0
  147. package/dist/esm/package.json +3 -0
  148. package/dist/esm/pagingHelper.d.ts +13 -0
  149. package/dist/esm/pagingHelper.d.ts.map +1 -0
  150. package/dist/esm/pagingHelper.js +30 -0
  151. package/dist/esm/pagingHelper.js.map +1 -0
  152. package/dist/react-native/astroManagementClient.d.ts +21 -0
  153. package/dist/react-native/astroManagementClient.d.ts.map +1 -0
  154. package/dist/react-native/astroManagementClient.js +108 -0
  155. package/dist/react-native/astroManagementClient.js.map +1 -0
  156. package/dist/react-native/index.d.ts +5 -0
  157. package/dist/react-native/index.d.ts.map +1 -0
  158. package/dist/react-native/index.js +13 -0
  159. package/dist/react-native/index.js.map +1 -0
  160. package/dist/react-native/lroImpl.d.ts +11 -0
  161. package/dist/react-native/lroImpl.d.ts.map +1 -0
  162. package/dist/react-native/lroImpl.js +18 -0
  163. package/dist/react-native/lroImpl.js.map +1 -0
  164. package/dist/react-native/models/index.d.ts +565 -0
  165. package/dist/react-native/models/index.d.ts.map +1 -0
  166. package/dist/react-native/models/index.js +86 -0
  167. package/dist/react-native/models/index.js.map +1 -0
  168. package/dist/react-native/models/mappers.d.ts +28 -0
  169. package/dist/react-native/models/mappers.d.ts.map +1 -0
  170. package/dist/react-native/models/mappers.js +865 -0
  171. package/dist/react-native/models/mappers.js.map +1 -0
  172. package/dist/react-native/models/parameters.d.ts +12 -0
  173. package/dist/react-native/models/parameters.d.ts.map +1 -0
  174. package/dist/react-native/models/parameters.js +114 -0
  175. package/dist/react-native/models/parameters.js.map +1 -0
  176. package/dist/react-native/operations/index.d.ts +3 -0
  177. package/dist/react-native/operations/index.d.ts.map +1 -0
  178. package/dist/react-native/operations/index.js +10 -0
  179. package/dist/react-native/operations/index.js.map +1 -0
  180. package/dist/react-native/operations/operations.d.ts +32 -0
  181. package/dist/react-native/operations/operations.d.ts.map +1 -0
  182. package/dist/react-native/operations/operations.js +116 -0
  183. package/dist/react-native/operations/operations.js.map +1 -0
  184. package/dist/react-native/operations/organizations.d.ts +107 -0
  185. package/dist/react-native/operations/organizations.d.ts.map +1 -0
  186. package/dist/react-native/operations/organizations.js +523 -0
  187. package/dist/react-native/operations/organizations.js.map +1 -0
  188. package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
  189. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  190. package/dist/react-native/operationsInterfaces/index.js +10 -0
  191. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  192. package/dist/react-native/operationsInterfaces/operations.d.ts +11 -0
  193. package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -0
  194. package/dist/react-native/operationsInterfaces/operations.js +9 -0
  195. package/dist/react-native/operationsInterfaces/operations.js.map +1 -0
  196. package/dist/react-native/operationsInterfaces/organizations.d.ts +71 -0
  197. package/dist/react-native/operationsInterfaces/organizations.d.ts.map +1 -0
  198. package/dist/react-native/operationsInterfaces/organizations.js +9 -0
  199. package/dist/react-native/operationsInterfaces/organizations.js.map +1 -0
  200. package/dist/react-native/package.json +3 -0
  201. package/dist/react-native/pagingHelper.d.ts +13 -0
  202. package/dist/react-native/pagingHelper.d.ts.map +1 -0
  203. package/dist/react-native/pagingHelper.js +30 -0
  204. package/dist/react-native/pagingHelper.js.map +1 -0
  205. package/package.json +88 -74
  206. package/dist/index.js +0 -1942
  207. package/dist/index.js.map +0 -1
  208. package/dist/index.min.js +0 -1
  209. package/dist/index.min.js.map +0 -1
  210. package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
  211. package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
  212. package/dist-esm/samples-dev/operationsListSample.js +0 -53
  213. package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
  214. package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.d.ts +0 -2
  215. package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.d.ts.map +0 -1
  216. package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.js +0 -79
  217. package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.js.map +0 -1
  218. package/dist-esm/samples-dev/organizationsDeleteSample.d.ts +0 -2
  219. package/dist-esm/samples-dev/organizationsDeleteSample.d.ts.map +0 -1
  220. package/dist-esm/samples-dev/organizationsDeleteSample.js +0 -39
  221. package/dist-esm/samples-dev/organizationsDeleteSample.js.map +0 -1
  222. package/dist-esm/samples-dev/organizationsGetSample.d.ts +0 -2
  223. package/dist-esm/samples-dev/organizationsGetSample.d.ts.map +0 -1
  224. package/dist-esm/samples-dev/organizationsGetSample.js +0 -39
  225. package/dist-esm/samples-dev/organizationsGetSample.js.map +0 -1
  226. package/dist-esm/samples-dev/organizationsListByResourceGroupSample.d.ts +0 -2
  227. package/dist-esm/samples-dev/organizationsListByResourceGroupSample.d.ts.map +0 -1
  228. package/dist-esm/samples-dev/organizationsListByResourceGroupSample.js +0 -54
  229. package/dist-esm/samples-dev/organizationsListByResourceGroupSample.js.map +0 -1
  230. package/dist-esm/samples-dev/organizationsListBySubscriptionSample.d.ts +0 -2
  231. package/dist-esm/samples-dev/organizationsListBySubscriptionSample.d.ts.map +0 -1
  232. package/dist-esm/samples-dev/organizationsListBySubscriptionSample.js +0 -53
  233. package/dist-esm/samples-dev/organizationsListBySubscriptionSample.js.map +0 -1
  234. package/dist-esm/samples-dev/organizationsUpdateSample.d.ts +0 -2
  235. package/dist-esm/samples-dev/organizationsUpdateSample.d.ts.map +0 -1
  236. package/dist-esm/samples-dev/organizationsUpdateSample.js +0 -65
  237. package/dist-esm/samples-dev/organizationsUpdateSample.js.map +0 -1
  238. package/dist-esm/src/astroManagementClient.d.ts.map +0 -1
  239. package/dist-esm/src/astroManagementClient.js.map +0 -1
  240. package/dist-esm/src/index.d.ts +0 -6
  241. package/dist-esm/src/index.d.ts.map +0 -1
  242. package/dist-esm/src/index.js.map +0 -1
  243. package/dist-esm/src/lroImpl.js +0 -21
  244. package/dist-esm/src/lroImpl.js.map +0 -1
  245. package/dist-esm/src/models/index.js.map +0 -1
  246. package/dist-esm/src/models/mappers.js.map +0 -1
  247. package/dist-esm/src/models/parameters.js.map +0 -1
  248. package/dist-esm/src/operations/index.d.ts +0 -3
  249. package/dist-esm/src/operations/index.js.map +0 -1
  250. package/dist-esm/src/operations/operations.d.ts.map +0 -1
  251. package/dist-esm/src/operations/operations.js.map +0 -1
  252. package/dist-esm/src/operations/organizations.d.ts.map +0 -1
  253. package/dist-esm/src/operations/organizations.js.map +0 -1
  254. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
  255. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  256. package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
  257. package/dist-esm/src/operationsInterfaces/organizations.d.ts.map +0 -1
  258. package/dist-esm/src/operationsInterfaces/organizations.js.map +0 -1
  259. package/dist-esm/src/pagingHelper.js.map +0 -1
  260. package/dist-esm/test/astro_operations_test.spec.d.ts +0 -4
  261. package/dist-esm/test/astro_operations_test.spec.d.ts.map +0 -1
  262. package/dist-esm/test/astro_operations_test.spec.js +0 -73
  263. package/dist-esm/test/astro_operations_test.spec.js.map +0 -1
  264. package/src/astroManagementClient.ts +0 -143
  265. package/src/lroImpl.ts +0 -42
  266. package/src/models/index.ts +0 -637
  267. package/src/models/mappers.ts +0 -899
  268. package/src/models/parameters.ts +0 -132
  269. package/src/operations/operations.ts +0 -149
  270. package/src/operations/organizations.ts +0 -728
  271. package/src/operationsInterfaces/operations.ts +0 -22
  272. package/src/operationsInterfaces/organizations.ts +0 -145
  273. package/src/pagingHelper.ts +0 -39
  274. package/tsconfig.json +0 -33
  275. /package/{dist-esm/src → dist/browser}/lroImpl.d.ts +0 -0
  276. /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
  277. /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
  278. /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
  279. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
  280. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
  281. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
  282. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
  283. /package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.js +0 -0
  284. /package/{dist-esm/src → dist/browser}/operationsInterfaces/organizations.js +0 -0
  285. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
  286. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
  287. /package/review/{arm-astro.api.md → arm-astro-node.api.md} +0 -0
@@ -5,14 +5,14 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
- import { setContinuationToken } from "../pagingHelper";
8
+ import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
- import * as Mappers from "../models/mappers";
12
- import * as Parameters from "../models/parameters";
10
+ import * as Mappers from "../models/mappers.js";
11
+ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing Operations operations. */
15
14
  export class OperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Operations class.
18
18
  * @param client Reference to the service client
@@ -34,52 +34,35 @@ export class OperationsImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
38
38
  throw new Error("maxPageSize is not supported by this operation.");
39
39
  }
40
40
  return this.listPagingPage(options, settings);
41
41
  },
42
42
  };
43
43
  }
44
- listPagingPage(options, settings) {
45
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._list(options));
50
- let page = result.value || [];
51
- continuationToken = result.nextLink;
52
- setContinuationToken(page, continuationToken);
53
- yield yield __await(page);
54
- }
55
- while (continuationToken) {
56
- result = yield __await(this._listNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
61
- }
62
- });
44
+ async *listPagingPage(options, settings) {
45
+ let result;
46
+ let continuationToken = settings?.continuationToken;
47
+ if (!continuationToken) {
48
+ result = await this._list(options);
49
+ let page = result.value || [];
50
+ continuationToken = result.nextLink;
51
+ setContinuationToken(page, continuationToken);
52
+ yield page;
53
+ }
54
+ while (continuationToken) {
55
+ result = await this._listNext(continuationToken, options);
56
+ continuationToken = result.nextLink;
57
+ let page = result.value || [];
58
+ setContinuationToken(page, continuationToken);
59
+ yield page;
60
+ }
63
61
  }
64
- listPagingAll(options) {
65
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
68
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
69
- _c = _f.value;
70
- _d = false;
71
- const page = _c;
72
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
- }
74
- }
75
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
76
- finally {
77
- try {
78
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
79
- }
80
- finally { if (e_1) throw e_1.error; }
81
- }
82
- });
62
+ async *listPagingAll(options) {
63
+ for await (const page of this.listPagingPage(options)) {
64
+ yield* page;
65
+ }
83
66
  }
84
67
  /**
85
68
  * List the operations for the provider
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAsC,EACtC,QAAuB;QAEvB,IAAI,MAA8B,CAAC;QACnC,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAC9B,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;YACpC,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YAC9C,MAAM,IAAI,CAAC;QACb,CAAC;QACD,OAAO,iBAAiB,EAAE,CAAC;YACzB,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;YAC1D,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;YACpC,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAC9B,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YAC9C,MAAM,IAAI,CAAC;QACb,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,CAAC,aAAa,CAC1B,OAAsC;QAEtC,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACtD,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wCAAwC;IAC9C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AstroManagementClient } from \"../astroManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: AstroManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: AstroManagementClient) {\n this.client = client;\n }\n\n /**\n * List the operations for the provider\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List the operations for the provider\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Astronomer.Astro/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -1,8 +1,8 @@
1
1
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
- import { Organizations } from "../operationsInterfaces";
3
- import { AstroManagementClient } from "../astroManagementClient";
2
+ import { Organizations } from "../operationsInterfaces/index.js";
3
+ import { AstroManagementClient } from "../astroManagementClient.js";
4
4
  import { SimplePollerLike, OperationState } from "@azure/core-lro";
5
- import { OrganizationResource, OrganizationsListBySubscriptionOptionalParams, OrganizationsListByResourceGroupOptionalParams, OrganizationsGetOptionalParams, OrganizationsGetResponse, OrganizationsCreateOrUpdateOptionalParams, OrganizationsCreateOrUpdateResponse, OrganizationResourceUpdate, OrganizationsUpdateOptionalParams, OrganizationsUpdateResponse, OrganizationsDeleteOptionalParams, OrganizationsDeleteResponse } from "../models";
5
+ import { OrganizationResource, OrganizationsListBySubscriptionOptionalParams, OrganizationsListByResourceGroupOptionalParams, OrganizationsGetOptionalParams, OrganizationsGetResponse, OrganizationsCreateOrUpdateOptionalParams, OrganizationsCreateOrUpdateResponse, OrganizationResourceUpdate, OrganizationsUpdateOptionalParams, OrganizationsUpdateResponse, OrganizationsDeleteOptionalParams, OrganizationsDeleteResponse } from "../models/index.js";
6
6
  /** Class containing Organizations operations. */
7
7
  export declare class OrganizationsImpl implements Organizations {
8
8
  private readonly client;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/operations/organizations.ts"],"names":[],"mappings":"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"}
@@ -5,16 +5,16 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
9
- import { setContinuationToken } from "../pagingHelper";
8
+ import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
- import * as Mappers from "../models/mappers";
12
- import * as Parameters from "../models/parameters";
10
+ import * as Mappers from "../models/mappers.js";
11
+ import * as Parameters from "../models/parameters.js";
13
12
  import { createHttpPoller, } from "@azure/core-lro";
14
- import { createLroSpec } from "../lroImpl";
13
+ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing Organizations operations. */
17
16
  export class OrganizationsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Organizations class.
20
20
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class OrganizationsImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listBySubscriptionPagingPage(options, settings);
43
43
  },
44
44
  };
45
45
  }
46
- listBySubscriptionPagingPage(options, settings) {
47
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listBySubscription(options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listBySubscriptionPagingPage(options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listBySubscription(options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listBySubscriptionNext(continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listBySubscriptionPagingAll(options) {
67
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listBySubscriptionPagingAll(options) {
65
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * List OrganizationResource resources by resource group
@@ -98,52 +81,35 @@ export class OrganizationsImpl {
98
81
  return this;
99
82
  },
100
83
  byPage: (settings) => {
101
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
84
+ if (settings?.maxPageSize) {
102
85
  throw new Error("maxPageSize is not supported by this operation.");
103
86
  }
104
87
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
105
88
  },
106
89
  };
107
90
  }
108
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
109
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
110
- let result;
111
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
- if (!continuationToken) {
113
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
114
- let page = result.value || [];
115
- continuationToken = result.nextLink;
116
- setContinuationToken(page, continuationToken);
117
- yield yield __await(page);
118
- }
119
- while (continuationToken) {
120
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
121
- continuationToken = result.nextLink;
122
- let page = result.value || [];
123
- setContinuationToken(page, continuationToken);
124
- yield yield __await(page);
125
- }
126
- });
91
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
92
+ let result;
93
+ let continuationToken = settings?.continuationToken;
94
+ if (!continuationToken) {
95
+ result = await this._listByResourceGroup(resourceGroupName, options);
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
101
+ while (continuationToken) {
102
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
127
108
  }
128
- listByResourceGroupPagingAll(resourceGroupName, options) {
129
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
130
- var _a, e_2, _b, _c;
131
- try {
132
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
133
- _c = _f.value;
134
- _d = false;
135
- const page = _c;
136
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
137
- }
138
- }
139
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
140
- finally {
141
- try {
142
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
143
- }
144
- finally { if (e_2) throw e_2.error; }
145
- }
146
- });
109
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
110
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
111
+ yield* page;
112
+ }
147
113
  }
148
114
  /**
149
115
  * List OrganizationResource resources by subscription ID
@@ -176,43 +142,46 @@ export class OrganizationsImpl {
176
142
  * @param resource Resource create parameters.
177
143
  * @param options The options parameters.
178
144
  */
179
- beginCreateOrUpdate(resourceGroupName, organizationName, resource, options) {
180
- return __awaiter(this, void 0, void 0, function* () {
181
- const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
182
- return this.client.sendOperationRequest(args, spec);
183
- });
184
- const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
185
- var _a;
186
- let currentRawResponse = undefined;
187
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
188
- const callback = (rawResponse, flatResponse) => {
189
- currentRawResponse = rawResponse;
190
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
191
- };
192
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
193
- const flatResponse = yield directSendOperation(updatedArgs, spec);
194
- return {
195
- flatResponse,
196
- rawResponse: {
197
- statusCode: currentRawResponse.status,
198
- body: currentRawResponse.parsedBody,
199
- headers: currentRawResponse.headers.toJSON(),
200
- },
201
- };
202
- });
203
- const lro = createLroSpec({
204
- sendOperationFn,
205
- args: { resourceGroupName, organizationName, resource, options },
206
- spec: createOrUpdateOperationSpec,
207
- });
208
- const poller = yield createHttpPoller(lro, {
209
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
210
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
211
- resourceLocationConfig: "azure-async-operation",
212
- });
213
- yield poller.poll();
214
- return poller;
145
+ async beginCreateOrUpdate(resourceGroupName, organizationName, resource, options) {
146
+ const directSendOperation = async (args, spec) => {
147
+ return this.client.sendOperationRequest(args, spec);
148
+ };
149
+ const sendOperationFn = async (args, spec) => {
150
+ let currentRawResponse = undefined;
151
+ const providedCallback = args.options?.onResponse;
152
+ const callback = (rawResponse, flatResponse) => {
153
+ currentRawResponse = rawResponse;
154
+ providedCallback?.(rawResponse, flatResponse);
155
+ };
156
+ const updatedArgs = {
157
+ ...args,
158
+ options: {
159
+ ...args.options,
160
+ onResponse: callback,
161
+ },
162
+ };
163
+ const flatResponse = await directSendOperation(updatedArgs, spec);
164
+ return {
165
+ flatResponse,
166
+ rawResponse: {
167
+ statusCode: currentRawResponse.status,
168
+ body: currentRawResponse.parsedBody,
169
+ headers: currentRawResponse.headers.toJSON(),
170
+ },
171
+ };
172
+ };
173
+ const lro = createLroSpec({
174
+ sendOperationFn,
175
+ args: { resourceGroupName, organizationName, resource, options },
176
+ spec: createOrUpdateOperationSpec,
215
177
  });
178
+ const poller = await createHttpPoller(lro, {
179
+ restoreFrom: options?.resumeFrom,
180
+ intervalInMs: options?.updateIntervalInMs,
181
+ resourceLocationConfig: "azure-async-operation",
182
+ });
183
+ await poller.poll();
184
+ return poller;
216
185
  }
217
186
  /**
218
187
  * Create a OrganizationResource
@@ -221,11 +190,9 @@ export class OrganizationsImpl {
221
190
  * @param resource Resource create parameters.
222
191
  * @param options The options parameters.
223
192
  */
224
- beginCreateOrUpdateAndWait(resourceGroupName, organizationName, resource, options) {
225
- return __awaiter(this, void 0, void 0, function* () {
226
- const poller = yield this.beginCreateOrUpdate(resourceGroupName, organizationName, resource, options);
227
- return poller.pollUntilDone();
228
- });
193
+ async beginCreateOrUpdateAndWait(resourceGroupName, organizationName, resource, options) {
194
+ const poller = await this.beginCreateOrUpdate(resourceGroupName, organizationName, resource, options);
195
+ return poller.pollUntilDone();
229
196
  }
230
197
  /**
231
198
  * Update a OrganizationResource
@@ -234,43 +201,46 @@ export class OrganizationsImpl {
234
201
  * @param properties The resource properties to be updated.
235
202
  * @param options The options parameters.
236
203
  */
237
- beginUpdate(resourceGroupName, organizationName, properties, options) {
238
- return __awaiter(this, void 0, void 0, function* () {
239
- const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
240
- return this.client.sendOperationRequest(args, spec);
241
- });
242
- const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
243
- var _a;
244
- let currentRawResponse = undefined;
245
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
246
- const callback = (rawResponse, flatResponse) => {
247
- currentRawResponse = rawResponse;
248
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
249
- };
250
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
251
- const flatResponse = yield directSendOperation(updatedArgs, spec);
252
- return {
253
- flatResponse,
254
- rawResponse: {
255
- statusCode: currentRawResponse.status,
256
- body: currentRawResponse.parsedBody,
257
- headers: currentRawResponse.headers.toJSON(),
258
- },
259
- };
260
- });
261
- const lro = createLroSpec({
262
- sendOperationFn,
263
- args: { resourceGroupName, organizationName, properties, options },
264
- spec: updateOperationSpec,
265
- });
266
- const poller = yield createHttpPoller(lro, {
267
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
268
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
269
- resourceLocationConfig: "location",
270
- });
271
- yield poller.poll();
272
- return poller;
204
+ async beginUpdate(resourceGroupName, organizationName, properties, options) {
205
+ const directSendOperation = async (args, spec) => {
206
+ return this.client.sendOperationRequest(args, spec);
207
+ };
208
+ const sendOperationFn = async (args, spec) => {
209
+ let currentRawResponse = undefined;
210
+ const providedCallback = args.options?.onResponse;
211
+ const callback = (rawResponse, flatResponse) => {
212
+ currentRawResponse = rawResponse;
213
+ providedCallback?.(rawResponse, flatResponse);
214
+ };
215
+ const updatedArgs = {
216
+ ...args,
217
+ options: {
218
+ ...args.options,
219
+ onResponse: callback,
220
+ },
221
+ };
222
+ const flatResponse = await directSendOperation(updatedArgs, spec);
223
+ return {
224
+ flatResponse,
225
+ rawResponse: {
226
+ statusCode: currentRawResponse.status,
227
+ body: currentRawResponse.parsedBody,
228
+ headers: currentRawResponse.headers.toJSON(),
229
+ },
230
+ };
231
+ };
232
+ const lro = createLroSpec({
233
+ sendOperationFn,
234
+ args: { resourceGroupName, organizationName, properties, options },
235
+ spec: updateOperationSpec,
236
+ });
237
+ const poller = await createHttpPoller(lro, {
238
+ restoreFrom: options?.resumeFrom,
239
+ intervalInMs: options?.updateIntervalInMs,
240
+ resourceLocationConfig: "location",
273
241
  });
242
+ await poller.poll();
243
+ return poller;
274
244
  }
275
245
  /**
276
246
  * Update a OrganizationResource
@@ -279,11 +249,9 @@ export class OrganizationsImpl {
279
249
  * @param properties The resource properties to be updated.
280
250
  * @param options The options parameters.
281
251
  */
282
- beginUpdateAndWait(resourceGroupName, organizationName, properties, options) {
283
- return __awaiter(this, void 0, void 0, function* () {
284
- const poller = yield this.beginUpdate(resourceGroupName, organizationName, properties, options);
285
- return poller.pollUntilDone();
286
- });
252
+ async beginUpdateAndWait(resourceGroupName, organizationName, properties, options) {
253
+ const poller = await this.beginUpdate(resourceGroupName, organizationName, properties, options);
254
+ return poller.pollUntilDone();
287
255
  }
288
256
  /**
289
257
  * Delete a OrganizationResource
@@ -291,43 +259,46 @@ export class OrganizationsImpl {
291
259
  * @param organizationName Name of the Organizations resource
292
260
  * @param options The options parameters.
293
261
  */
294
- beginDelete(resourceGroupName, organizationName, options) {
295
- return __awaiter(this, void 0, void 0, function* () {
296
- const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
297
- return this.client.sendOperationRequest(args, spec);
298
- });
299
- const sendOperationFn = (args, spec) => __awaiter(this, void 0, void 0, function* () {
300
- var _a;
301
- let currentRawResponse = undefined;
302
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
303
- const callback = (rawResponse, flatResponse) => {
304
- currentRawResponse = rawResponse;
305
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
306
- };
307
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
308
- const flatResponse = yield directSendOperation(updatedArgs, spec);
309
- return {
310
- flatResponse,
311
- rawResponse: {
312
- statusCode: currentRawResponse.status,
313
- body: currentRawResponse.parsedBody,
314
- headers: currentRawResponse.headers.toJSON(),
315
- },
316
- };
317
- });
318
- const lro = createLroSpec({
319
- sendOperationFn,
320
- args: { resourceGroupName, organizationName, options },
321
- spec: deleteOperationSpec,
322
- });
323
- const poller = yield createHttpPoller(lro, {
324
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
325
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
326
- resourceLocationConfig: "location",
327
- });
328
- yield poller.poll();
329
- return poller;
262
+ async beginDelete(resourceGroupName, organizationName, options) {
263
+ const directSendOperation = async (args, spec) => {
264
+ return this.client.sendOperationRequest(args, spec);
265
+ };
266
+ const sendOperationFn = async (args, spec) => {
267
+ let currentRawResponse = undefined;
268
+ const providedCallback = args.options?.onResponse;
269
+ const callback = (rawResponse, flatResponse) => {
270
+ currentRawResponse = rawResponse;
271
+ providedCallback?.(rawResponse, flatResponse);
272
+ };
273
+ const updatedArgs = {
274
+ ...args,
275
+ options: {
276
+ ...args.options,
277
+ onResponse: callback,
278
+ },
279
+ };
280
+ const flatResponse = await directSendOperation(updatedArgs, spec);
281
+ return {
282
+ flatResponse,
283
+ rawResponse: {
284
+ statusCode: currentRawResponse.status,
285
+ body: currentRawResponse.parsedBody,
286
+ headers: currentRawResponse.headers.toJSON(),
287
+ },
288
+ };
289
+ };
290
+ const lro = createLroSpec({
291
+ sendOperationFn,
292
+ args: { resourceGroupName, organizationName, options },
293
+ spec: deleteOperationSpec,
330
294
  });
295
+ const poller = await createHttpPoller(lro, {
296
+ restoreFrom: options?.resumeFrom,
297
+ intervalInMs: options?.updateIntervalInMs,
298
+ resourceLocationConfig: "location",
299
+ });
300
+ await poller.poll();
301
+ return poller;
331
302
  }
332
303
  /**
333
304
  * Delete a OrganizationResource
@@ -335,11 +306,9 @@ export class OrganizationsImpl {
335
306
  * @param organizationName Name of the Organizations resource
336
307
  * @param options The options parameters.
337
308
  */
338
- beginDeleteAndWait(resourceGroupName, organizationName, options) {
339
- return __awaiter(this, void 0, void 0, function* () {
340
- const poller = yield this.beginDelete(resourceGroupName, organizationName, options);
341
- return poller.pollUntilDone();
342
- });
309
+ async beginDeleteAndWait(resourceGroupName, organizationName, options) {
310
+ const poller = await this.beginDelete(resourceGroupName, organizationName, options);
311
+ return poller.pollUntilDone();
343
312
  }
344
313
  /**
345
314
  * ListBySubscriptionNext