@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
@@ -1,728 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
-
9
- import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
- import { setContinuationToken } from "../pagingHelper";
11
- import { Organizations } from "../operationsInterfaces";
12
- import * as coreClient from "@azure/core-client";
13
- import * as Mappers from "../models/mappers";
14
- import * as Parameters from "../models/parameters";
15
- import { AstroManagementClient } from "../astroManagementClient";
16
- import {
17
- SimplePollerLike,
18
- OperationState,
19
- createHttpPoller,
20
- } from "@azure/core-lro";
21
- import { createLroSpec } from "../lroImpl";
22
- import {
23
- OrganizationResource,
24
- OrganizationsListBySubscriptionNextOptionalParams,
25
- OrganizationsListBySubscriptionOptionalParams,
26
- OrganizationsListBySubscriptionResponse,
27
- OrganizationsListByResourceGroupNextOptionalParams,
28
- OrganizationsListByResourceGroupOptionalParams,
29
- OrganizationsListByResourceGroupResponse,
30
- OrganizationsGetOptionalParams,
31
- OrganizationsGetResponse,
32
- OrganizationsCreateOrUpdateOptionalParams,
33
- OrganizationsCreateOrUpdateResponse,
34
- OrganizationResourceUpdate,
35
- OrganizationsUpdateOptionalParams,
36
- OrganizationsUpdateResponse,
37
- OrganizationsDeleteOptionalParams,
38
- OrganizationsDeleteResponse,
39
- OrganizationsListBySubscriptionNextResponse,
40
- OrganizationsListByResourceGroupNextResponse,
41
- } from "../models";
42
-
43
- /// <reference lib="esnext.asynciterable" />
44
- /** Class containing Organizations operations. */
45
- export class OrganizationsImpl implements Organizations {
46
- private readonly client: AstroManagementClient;
47
-
48
- /**
49
- * Initialize a new instance of the class Organizations class.
50
- * @param client Reference to the service client
51
- */
52
- constructor(client: AstroManagementClient) {
53
- this.client = client;
54
- }
55
-
56
- /**
57
- * List OrganizationResource resources by subscription ID
58
- * @param options The options parameters.
59
- */
60
- public listBySubscription(
61
- options?: OrganizationsListBySubscriptionOptionalParams,
62
- ): PagedAsyncIterableIterator<OrganizationResource> {
63
- const iter = this.listBySubscriptionPagingAll(options);
64
- return {
65
- next() {
66
- return iter.next();
67
- },
68
- [Symbol.asyncIterator]() {
69
- return this;
70
- },
71
- byPage: (settings?: PageSettings) => {
72
- if (settings?.maxPageSize) {
73
- throw new Error("maxPageSize is not supported by this operation.");
74
- }
75
- return this.listBySubscriptionPagingPage(options, settings);
76
- },
77
- };
78
- }
79
-
80
- private async *listBySubscriptionPagingPage(
81
- options?: OrganizationsListBySubscriptionOptionalParams,
82
- settings?: PageSettings,
83
- ): AsyncIterableIterator<OrganizationResource[]> {
84
- let result: OrganizationsListBySubscriptionResponse;
85
- let continuationToken = settings?.continuationToken;
86
- if (!continuationToken) {
87
- result = await this._listBySubscription(options);
88
- let page = result.value || [];
89
- continuationToken = result.nextLink;
90
- setContinuationToken(page, continuationToken);
91
- yield page;
92
- }
93
- while (continuationToken) {
94
- result = await this._listBySubscriptionNext(continuationToken, options);
95
- continuationToken = result.nextLink;
96
- let page = result.value || [];
97
- setContinuationToken(page, continuationToken);
98
- yield page;
99
- }
100
- }
101
-
102
- private async *listBySubscriptionPagingAll(
103
- options?: OrganizationsListBySubscriptionOptionalParams,
104
- ): AsyncIterableIterator<OrganizationResource> {
105
- for await (const page of this.listBySubscriptionPagingPage(options)) {
106
- yield* page;
107
- }
108
- }
109
-
110
- /**
111
- * List OrganizationResource resources by resource group
112
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
113
- * @param options The options parameters.
114
- */
115
- public listByResourceGroup(
116
- resourceGroupName: string,
117
- options?: OrganizationsListByResourceGroupOptionalParams,
118
- ): PagedAsyncIterableIterator<OrganizationResource> {
119
- const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
120
- return {
121
- next() {
122
- return iter.next();
123
- },
124
- [Symbol.asyncIterator]() {
125
- return this;
126
- },
127
- byPage: (settings?: PageSettings) => {
128
- if (settings?.maxPageSize) {
129
- throw new Error("maxPageSize is not supported by this operation.");
130
- }
131
- return this.listByResourceGroupPagingPage(
132
- resourceGroupName,
133
- options,
134
- settings,
135
- );
136
- },
137
- };
138
- }
139
-
140
- private async *listByResourceGroupPagingPage(
141
- resourceGroupName: string,
142
- options?: OrganizationsListByResourceGroupOptionalParams,
143
- settings?: PageSettings,
144
- ): AsyncIterableIterator<OrganizationResource[]> {
145
- let result: OrganizationsListByResourceGroupResponse;
146
- let continuationToken = settings?.continuationToken;
147
- if (!continuationToken) {
148
- result = await this._listByResourceGroup(resourceGroupName, options);
149
- let page = result.value || [];
150
- continuationToken = result.nextLink;
151
- setContinuationToken(page, continuationToken);
152
- yield page;
153
- }
154
- while (continuationToken) {
155
- result = await this._listByResourceGroupNext(
156
- resourceGroupName,
157
- continuationToken,
158
- options,
159
- );
160
- continuationToken = result.nextLink;
161
- let page = result.value || [];
162
- setContinuationToken(page, continuationToken);
163
- yield page;
164
- }
165
- }
166
-
167
- private async *listByResourceGroupPagingAll(
168
- resourceGroupName: string,
169
- options?: OrganizationsListByResourceGroupOptionalParams,
170
- ): AsyncIterableIterator<OrganizationResource> {
171
- for await (const page of this.listByResourceGroupPagingPage(
172
- resourceGroupName,
173
- options,
174
- )) {
175
- yield* page;
176
- }
177
- }
178
-
179
- /**
180
- * List OrganizationResource resources by subscription ID
181
- * @param options The options parameters.
182
- */
183
- private _listBySubscription(
184
- options?: OrganizationsListBySubscriptionOptionalParams,
185
- ): Promise<OrganizationsListBySubscriptionResponse> {
186
- return this.client.sendOperationRequest(
187
- { options },
188
- listBySubscriptionOperationSpec,
189
- );
190
- }
191
-
192
- /**
193
- * List OrganizationResource resources by resource group
194
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
195
- * @param options The options parameters.
196
- */
197
- private _listByResourceGroup(
198
- resourceGroupName: string,
199
- options?: OrganizationsListByResourceGroupOptionalParams,
200
- ): Promise<OrganizationsListByResourceGroupResponse> {
201
- return this.client.sendOperationRequest(
202
- { resourceGroupName, options },
203
- listByResourceGroupOperationSpec,
204
- );
205
- }
206
-
207
- /**
208
- * Get a OrganizationResource
209
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
210
- * @param organizationName Name of the Organizations resource
211
- * @param options The options parameters.
212
- */
213
- get(
214
- resourceGroupName: string,
215
- organizationName: string,
216
- options?: OrganizationsGetOptionalParams,
217
- ): Promise<OrganizationsGetResponse> {
218
- return this.client.sendOperationRequest(
219
- { resourceGroupName, organizationName, options },
220
- getOperationSpec,
221
- );
222
- }
223
-
224
- /**
225
- * Create a OrganizationResource
226
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
227
- * @param organizationName Name of the Organizations resource
228
- * @param resource Resource create parameters.
229
- * @param options The options parameters.
230
- */
231
- async beginCreateOrUpdate(
232
- resourceGroupName: string,
233
- organizationName: string,
234
- resource: OrganizationResource,
235
- options?: OrganizationsCreateOrUpdateOptionalParams,
236
- ): Promise<
237
- SimplePollerLike<
238
- OperationState<OrganizationsCreateOrUpdateResponse>,
239
- OrganizationsCreateOrUpdateResponse
240
- >
241
- > {
242
- const directSendOperation = async (
243
- args: coreClient.OperationArguments,
244
- spec: coreClient.OperationSpec,
245
- ): Promise<OrganizationsCreateOrUpdateResponse> => {
246
- return this.client.sendOperationRequest(args, spec);
247
- };
248
- const sendOperationFn = async (
249
- args: coreClient.OperationArguments,
250
- spec: coreClient.OperationSpec,
251
- ) => {
252
- let currentRawResponse: coreClient.FullOperationResponse | undefined =
253
- undefined;
254
- const providedCallback = args.options?.onResponse;
255
- const callback: coreClient.RawResponseCallback = (
256
- rawResponse: coreClient.FullOperationResponse,
257
- flatResponse: unknown,
258
- ) => {
259
- currentRawResponse = rawResponse;
260
- providedCallback?.(rawResponse, flatResponse);
261
- };
262
- const updatedArgs = {
263
- ...args,
264
- options: {
265
- ...args.options,
266
- onResponse: callback,
267
- },
268
- };
269
- const flatResponse = await directSendOperation(updatedArgs, spec);
270
- return {
271
- flatResponse,
272
- rawResponse: {
273
- statusCode: currentRawResponse!.status,
274
- body: currentRawResponse!.parsedBody,
275
- headers: currentRawResponse!.headers.toJSON(),
276
- },
277
- };
278
- };
279
-
280
- const lro = createLroSpec({
281
- sendOperationFn,
282
- args: { resourceGroupName, organizationName, resource, options },
283
- spec: createOrUpdateOperationSpec,
284
- });
285
- const poller = await createHttpPoller<
286
- OrganizationsCreateOrUpdateResponse,
287
- OperationState<OrganizationsCreateOrUpdateResponse>
288
- >(lro, {
289
- restoreFrom: options?.resumeFrom,
290
- intervalInMs: options?.updateIntervalInMs,
291
- resourceLocationConfig: "azure-async-operation",
292
- });
293
- await poller.poll();
294
- return poller;
295
- }
296
-
297
- /**
298
- * Create a OrganizationResource
299
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
300
- * @param organizationName Name of the Organizations resource
301
- * @param resource Resource create parameters.
302
- * @param options The options parameters.
303
- */
304
- async beginCreateOrUpdateAndWait(
305
- resourceGroupName: string,
306
- organizationName: string,
307
- resource: OrganizationResource,
308
- options?: OrganizationsCreateOrUpdateOptionalParams,
309
- ): Promise<OrganizationsCreateOrUpdateResponse> {
310
- const poller = await this.beginCreateOrUpdate(
311
- resourceGroupName,
312
- organizationName,
313
- resource,
314
- options,
315
- );
316
- return poller.pollUntilDone();
317
- }
318
-
319
- /**
320
- * Update a OrganizationResource
321
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
322
- * @param organizationName Name of the Organizations resource
323
- * @param properties The resource properties to be updated.
324
- * @param options The options parameters.
325
- */
326
- async beginUpdate(
327
- resourceGroupName: string,
328
- organizationName: string,
329
- properties: OrganizationResourceUpdate,
330
- options?: OrganizationsUpdateOptionalParams,
331
- ): Promise<
332
- SimplePollerLike<
333
- OperationState<OrganizationsUpdateResponse>,
334
- OrganizationsUpdateResponse
335
- >
336
- > {
337
- const directSendOperation = async (
338
- args: coreClient.OperationArguments,
339
- spec: coreClient.OperationSpec,
340
- ): Promise<OrganizationsUpdateResponse> => {
341
- return this.client.sendOperationRequest(args, spec);
342
- };
343
- const sendOperationFn = async (
344
- args: coreClient.OperationArguments,
345
- spec: coreClient.OperationSpec,
346
- ) => {
347
- let currentRawResponse: coreClient.FullOperationResponse | undefined =
348
- undefined;
349
- const providedCallback = args.options?.onResponse;
350
- const callback: coreClient.RawResponseCallback = (
351
- rawResponse: coreClient.FullOperationResponse,
352
- flatResponse: unknown,
353
- ) => {
354
- currentRawResponse = rawResponse;
355
- providedCallback?.(rawResponse, flatResponse);
356
- };
357
- const updatedArgs = {
358
- ...args,
359
- options: {
360
- ...args.options,
361
- onResponse: callback,
362
- },
363
- };
364
- const flatResponse = await directSendOperation(updatedArgs, spec);
365
- return {
366
- flatResponse,
367
- rawResponse: {
368
- statusCode: currentRawResponse!.status,
369
- body: currentRawResponse!.parsedBody,
370
- headers: currentRawResponse!.headers.toJSON(),
371
- },
372
- };
373
- };
374
-
375
- const lro = createLroSpec({
376
- sendOperationFn,
377
- args: { resourceGroupName, organizationName, properties, options },
378
- spec: updateOperationSpec,
379
- });
380
- const poller = await createHttpPoller<
381
- OrganizationsUpdateResponse,
382
- OperationState<OrganizationsUpdateResponse>
383
- >(lro, {
384
- restoreFrom: options?.resumeFrom,
385
- intervalInMs: options?.updateIntervalInMs,
386
- resourceLocationConfig: "location",
387
- });
388
- await poller.poll();
389
- return poller;
390
- }
391
-
392
- /**
393
- * Update a OrganizationResource
394
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
395
- * @param organizationName Name of the Organizations resource
396
- * @param properties The resource properties to be updated.
397
- * @param options The options parameters.
398
- */
399
- async beginUpdateAndWait(
400
- resourceGroupName: string,
401
- organizationName: string,
402
- properties: OrganizationResourceUpdate,
403
- options?: OrganizationsUpdateOptionalParams,
404
- ): Promise<OrganizationsUpdateResponse> {
405
- const poller = await this.beginUpdate(
406
- resourceGroupName,
407
- organizationName,
408
- properties,
409
- options,
410
- );
411
- return poller.pollUntilDone();
412
- }
413
-
414
- /**
415
- * Delete a OrganizationResource
416
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
417
- * @param organizationName Name of the Organizations resource
418
- * @param options The options parameters.
419
- */
420
- async beginDelete(
421
- resourceGroupName: string,
422
- organizationName: string,
423
- options?: OrganizationsDeleteOptionalParams,
424
- ): Promise<
425
- SimplePollerLike<
426
- OperationState<OrganizationsDeleteResponse>,
427
- OrganizationsDeleteResponse
428
- >
429
- > {
430
- const directSendOperation = async (
431
- args: coreClient.OperationArguments,
432
- spec: coreClient.OperationSpec,
433
- ): Promise<OrganizationsDeleteResponse> => {
434
- return this.client.sendOperationRequest(args, spec);
435
- };
436
- const sendOperationFn = async (
437
- args: coreClient.OperationArguments,
438
- spec: coreClient.OperationSpec,
439
- ) => {
440
- let currentRawResponse: coreClient.FullOperationResponse | undefined =
441
- undefined;
442
- const providedCallback = args.options?.onResponse;
443
- const callback: coreClient.RawResponseCallback = (
444
- rawResponse: coreClient.FullOperationResponse,
445
- flatResponse: unknown,
446
- ) => {
447
- currentRawResponse = rawResponse;
448
- providedCallback?.(rawResponse, flatResponse);
449
- };
450
- const updatedArgs = {
451
- ...args,
452
- options: {
453
- ...args.options,
454
- onResponse: callback,
455
- },
456
- };
457
- const flatResponse = await directSendOperation(updatedArgs, spec);
458
- return {
459
- flatResponse,
460
- rawResponse: {
461
- statusCode: currentRawResponse!.status,
462
- body: currentRawResponse!.parsedBody,
463
- headers: currentRawResponse!.headers.toJSON(),
464
- },
465
- };
466
- };
467
-
468
- const lro = createLroSpec({
469
- sendOperationFn,
470
- args: { resourceGroupName, organizationName, options },
471
- spec: deleteOperationSpec,
472
- });
473
- const poller = await createHttpPoller<
474
- OrganizationsDeleteResponse,
475
- OperationState<OrganizationsDeleteResponse>
476
- >(lro, {
477
- restoreFrom: options?.resumeFrom,
478
- intervalInMs: options?.updateIntervalInMs,
479
- resourceLocationConfig: "location",
480
- });
481
- await poller.poll();
482
- return poller;
483
- }
484
-
485
- /**
486
- * Delete a OrganizationResource
487
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
488
- * @param organizationName Name of the Organizations resource
489
- * @param options The options parameters.
490
- */
491
- async beginDeleteAndWait(
492
- resourceGroupName: string,
493
- organizationName: string,
494
- options?: OrganizationsDeleteOptionalParams,
495
- ): Promise<OrganizationsDeleteResponse> {
496
- const poller = await this.beginDelete(
497
- resourceGroupName,
498
- organizationName,
499
- options,
500
- );
501
- return poller.pollUntilDone();
502
- }
503
-
504
- /**
505
- * ListBySubscriptionNext
506
- * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
507
- * @param options The options parameters.
508
- */
509
- private _listBySubscriptionNext(
510
- nextLink: string,
511
- options?: OrganizationsListBySubscriptionNextOptionalParams,
512
- ): Promise<OrganizationsListBySubscriptionNextResponse> {
513
- return this.client.sendOperationRequest(
514
- { nextLink, options },
515
- listBySubscriptionNextOperationSpec,
516
- );
517
- }
518
-
519
- /**
520
- * ListByResourceGroupNext
521
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
522
- * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
523
- * @param options The options parameters.
524
- */
525
- private _listByResourceGroupNext(
526
- resourceGroupName: string,
527
- nextLink: string,
528
- options?: OrganizationsListByResourceGroupNextOptionalParams,
529
- ): Promise<OrganizationsListByResourceGroupNextResponse> {
530
- return this.client.sendOperationRequest(
531
- { resourceGroupName, nextLink, options },
532
- listByResourceGroupNextOperationSpec,
533
- );
534
- }
535
- }
536
- // Operation Specifications
537
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
538
-
539
- const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
540
- path: "/subscriptions/{subscriptionId}/providers/Astronomer.Astro/organizations",
541
- httpMethod: "GET",
542
- responses: {
543
- 200: {
544
- bodyMapper: Mappers.OrganizationResourceListResult,
545
- },
546
- default: {
547
- bodyMapper: Mappers.ErrorResponse,
548
- },
549
- },
550
- queryParameters: [Parameters.apiVersion],
551
- urlParameters: [Parameters.$host, Parameters.subscriptionId],
552
- headerParameters: [Parameters.accept],
553
- serializer,
554
- };
555
- const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
556
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations",
557
- httpMethod: "GET",
558
- responses: {
559
- 200: {
560
- bodyMapper: Mappers.OrganizationResourceListResult,
561
- },
562
- default: {
563
- bodyMapper: Mappers.ErrorResponse,
564
- },
565
- },
566
- queryParameters: [Parameters.apiVersion],
567
- urlParameters: [
568
- Parameters.$host,
569
- Parameters.subscriptionId,
570
- Parameters.resourceGroupName,
571
- ],
572
- headerParameters: [Parameters.accept],
573
- serializer,
574
- };
575
- const getOperationSpec: coreClient.OperationSpec = {
576
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}",
577
- httpMethod: "GET",
578
- responses: {
579
- 200: {
580
- bodyMapper: Mappers.OrganizationResource,
581
- },
582
- default: {
583
- bodyMapper: Mappers.ErrorResponse,
584
- },
585
- },
586
- queryParameters: [Parameters.apiVersion],
587
- urlParameters: [
588
- Parameters.$host,
589
- Parameters.subscriptionId,
590
- Parameters.resourceGroupName,
591
- Parameters.organizationName,
592
- ],
593
- headerParameters: [Parameters.accept],
594
- serializer,
595
- };
596
- const createOrUpdateOperationSpec: coreClient.OperationSpec = {
597
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}",
598
- httpMethod: "PUT",
599
- responses: {
600
- 200: {
601
- bodyMapper: Mappers.OrganizationResource,
602
- },
603
- 201: {
604
- bodyMapper: Mappers.OrganizationResource,
605
- },
606
- 202: {
607
- bodyMapper: Mappers.OrganizationResource,
608
- },
609
- 204: {
610
- bodyMapper: Mappers.OrganizationResource,
611
- },
612
- default: {
613
- bodyMapper: Mappers.ErrorResponse,
614
- },
615
- },
616
- requestBody: Parameters.resource,
617
- queryParameters: [Parameters.apiVersion],
618
- urlParameters: [
619
- Parameters.$host,
620
- Parameters.subscriptionId,
621
- Parameters.resourceGroupName,
622
- Parameters.organizationName,
623
- ],
624
- headerParameters: [Parameters.accept, Parameters.contentType],
625
- mediaType: "json",
626
- serializer,
627
- };
628
- const updateOperationSpec: coreClient.OperationSpec = {
629
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}",
630
- httpMethod: "PATCH",
631
- responses: {
632
- 200: {
633
- bodyMapper: Mappers.OrganizationResource,
634
- },
635
- 201: {
636
- bodyMapper: Mappers.OrganizationResource,
637
- },
638
- 202: {
639
- bodyMapper: Mappers.OrganizationResource,
640
- },
641
- 204: {
642
- bodyMapper: Mappers.OrganizationResource,
643
- },
644
- default: {
645
- bodyMapper: Mappers.ErrorResponse,
646
- },
647
- },
648
- requestBody: Parameters.properties,
649
- queryParameters: [Parameters.apiVersion],
650
- urlParameters: [
651
- Parameters.$host,
652
- Parameters.subscriptionId,
653
- Parameters.resourceGroupName,
654
- Parameters.organizationName,
655
- ],
656
- headerParameters: [Parameters.accept, Parameters.contentType],
657
- mediaType: "json",
658
- serializer,
659
- };
660
- const deleteOperationSpec: coreClient.OperationSpec = {
661
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}",
662
- httpMethod: "DELETE",
663
- responses: {
664
- 200: {
665
- headersMapper: Mappers.OrganizationsDeleteHeaders,
666
- },
667
- 201: {
668
- headersMapper: Mappers.OrganizationsDeleteHeaders,
669
- },
670
- 202: {
671
- headersMapper: Mappers.OrganizationsDeleteHeaders,
672
- },
673
- 204: {
674
- headersMapper: Mappers.OrganizationsDeleteHeaders,
675
- },
676
- default: {
677
- bodyMapper: Mappers.ErrorResponse,
678
- },
679
- },
680
- queryParameters: [Parameters.apiVersion],
681
- urlParameters: [
682
- Parameters.$host,
683
- Parameters.subscriptionId,
684
- Parameters.resourceGroupName,
685
- Parameters.organizationName,
686
- ],
687
- headerParameters: [Parameters.accept],
688
- serializer,
689
- };
690
- const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
691
- path: "{nextLink}",
692
- httpMethod: "GET",
693
- responses: {
694
- 200: {
695
- bodyMapper: Mappers.OrganizationResourceListResult,
696
- },
697
- default: {
698
- bodyMapper: Mappers.ErrorResponse,
699
- },
700
- },
701
- urlParameters: [
702
- Parameters.$host,
703
- Parameters.nextLink,
704
- Parameters.subscriptionId,
705
- ],
706
- headerParameters: [Parameters.accept],
707
- serializer,
708
- };
709
- const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
710
- path: "{nextLink}",
711
- httpMethod: "GET",
712
- responses: {
713
- 200: {
714
- bodyMapper: Mappers.OrganizationResourceListResult,
715
- },
716
- default: {
717
- bodyMapper: Mappers.ErrorResponse,
718
- },
719
- },
720
- urlParameters: [
721
- Parameters.$host,
722
- Parameters.nextLink,
723
- Parameters.subscriptionId,
724
- Parameters.resourceGroupName,
725
- ],
726
- headerParameters: [Parameters.accept],
727
- serializer,
728
- };