@azure/arm-healthbot 2.1.1-alpha.20250205.1 → 2.1.1-alpha.20250206.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 (283) hide show
  1. package/README.md +21 -14
  2. package/{dist-esm/src → dist/browser}/healthbotClient.d.ts +2 -2
  3. package/dist/browser/healthbotClient.d.ts.map +1 -0
  4. package/{dist-esm/src → dist/browser}/healthbotClient.js +15 -18
  5. package/dist/browser/healthbotClient.js.map +1 -0
  6. package/dist/browser/index.d.ts +5 -0
  7. package/{dist-esm/src → dist/browser}/index.d.ts.map +1 -1
  8. package/{dist-esm/src → dist/browser}/index.js +4 -4
  9. package/dist/browser/index.js.map +1 -0
  10. package/dist/browser/lroImpl.js +25 -0
  11. package/dist/browser/lroImpl.js.map +1 -0
  12. package/dist/browser/models/index.js.map +1 -0
  13. package/dist/browser/models/mappers.js.map +1 -0
  14. package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
  15. package/dist/browser/models/parameters.js.map +1 -0
  16. package/{dist-esm/src → dist/browser}/operations/bots.d.ts +3 -3
  17. package/dist/browser/operations/bots.d.ts.map +1 -0
  18. package/{dist-esm/src → dist/browser}/operations/bots.js +70 -78
  19. package/dist/browser/operations/bots.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/operationsInterfaces → 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 +3 -3
  27. package/dist/browser/operations/operations.js.map +1 -0
  28. package/{dist-esm/src → dist/browser}/operationsInterfaces/bots.d.ts +1 -1
  29. package/dist/browser/operationsInterfaces/bots.d.ts.map +1 -0
  30. package/dist/browser/operationsInterfaces/bots.js.map +1 -0
  31. package/dist/browser/operationsInterfaces/index.d.ts +3 -0
  32. package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
  33. package/{dist-esm/src/operations → dist/browser/operationsInterfaces}/index.js +2 -2
  34. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  35. package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts +1 -1
  36. package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts.map +1 -1
  37. package/dist/browser/operationsInterfaces/operations.js.map +1 -0
  38. package/dist/browser/package.json +3 -0
  39. package/dist/browser/pagingHelper.js.map +1 -0
  40. package/dist/commonjs/healthbotClient.d.ts +21 -0
  41. package/dist/commonjs/healthbotClient.d.ts.map +1 -0
  42. package/dist/commonjs/healthbotClient.js +103 -0
  43. package/dist/commonjs/healthbotClient.js.map +1 -0
  44. package/dist/commonjs/index.d.ts +5 -0
  45. package/dist/commonjs/index.d.ts.map +1 -0
  46. package/dist/commonjs/index.js +19 -0
  47. package/dist/commonjs/index.js.map +1 -0
  48. package/dist/commonjs/lroImpl.d.ts +16 -0
  49. package/dist/commonjs/lroImpl.d.ts.map +1 -0
  50. package/dist/commonjs/lroImpl.js +29 -0
  51. package/dist/commonjs/lroImpl.js.map +1 -0
  52. package/{types/arm-healthbot.d.ts → dist/commonjs/models/index.d.ts} +313 -454
  53. package/dist/commonjs/models/index.d.ts.map +1 -0
  54. package/dist/commonjs/models/index.js +23 -0
  55. package/dist/commonjs/models/index.js.map +1 -0
  56. package/dist/commonjs/models/mappers.d.ts +19 -0
  57. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  58. package/dist/commonjs/models/mappers.js +506 -0
  59. package/dist/commonjs/models/mappers.js.map +1 -0
  60. package/dist/commonjs/models/parameters.d.ts +12 -0
  61. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  62. package/dist/commonjs/models/parameters.js +115 -0
  63. package/dist/commonjs/models/parameters.js.map +1 -0
  64. package/dist/commonjs/operations/bots.d.ts +99 -0
  65. package/dist/commonjs/operations/bots.d.ts.map +1 -0
  66. package/dist/commonjs/operations/bots.js +481 -0
  67. package/dist/commonjs/operations/bots.js.map +1 -0
  68. package/dist/commonjs/operations/index.d.ts +3 -0
  69. package/dist/commonjs/operations/index.d.ts.map +1 -0
  70. package/dist/commonjs/operations/index.js +13 -0
  71. package/dist/commonjs/operations/index.js.map +1 -0
  72. package/dist/commonjs/operations/operations.d.ts +32 -0
  73. package/dist/commonjs/operations/operations.d.ts.map +1 -0
  74. package/dist/commonjs/operations/operations.js +138 -0
  75. package/dist/commonjs/operations/operations.js.map +1 -0
  76. package/dist/commonjs/operationsInterfaces/bots.d.ts +63 -0
  77. package/dist/commonjs/operationsInterfaces/bots.d.ts.map +1 -0
  78. package/dist/commonjs/operationsInterfaces/bots.js +10 -0
  79. package/dist/commonjs/operationsInterfaces/bots.js.map +1 -0
  80. package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
  81. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  82. package/dist/commonjs/operationsInterfaces/index.js +13 -0
  83. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  84. package/dist/commonjs/operationsInterfaces/operations.d.ts +11 -0
  85. package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -0
  86. package/dist/commonjs/operationsInterfaces/operations.js +10 -0
  87. package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
  88. package/dist/commonjs/package.json +3 -0
  89. package/dist/commonjs/pagingHelper.d.ts +13 -0
  90. package/dist/commonjs/pagingHelper.d.ts.map +1 -0
  91. package/dist/commonjs/pagingHelper.js +36 -0
  92. package/dist/commonjs/pagingHelper.js.map +1 -0
  93. package/dist/esm/healthbotClient.d.ts +21 -0
  94. package/dist/esm/healthbotClient.d.ts.map +1 -0
  95. package/dist/esm/healthbotClient.js +98 -0
  96. package/dist/esm/healthbotClient.js.map +1 -0
  97. package/dist/esm/index.d.ts +5 -0
  98. package/dist/esm/index.d.ts.map +1 -0
  99. package/{src/index.ts → dist/esm/index.js} +5 -5
  100. package/dist/esm/index.js.map +1 -0
  101. package/dist/esm/lroImpl.d.ts +16 -0
  102. package/dist/esm/lroImpl.d.ts.map +1 -0
  103. package/dist/esm/lroImpl.js +25 -0
  104. package/dist/esm/lroImpl.js.map +1 -0
  105. package/dist/esm/models/index.d.ts +313 -0
  106. package/dist/esm/models/index.d.ts.map +1 -0
  107. package/dist/esm/models/index.js +20 -0
  108. package/dist/esm/models/index.js.map +1 -0
  109. package/dist/esm/models/mappers.d.ts +19 -0
  110. package/dist/esm/models/mappers.d.ts.map +1 -0
  111. package/dist/esm/models/mappers.js +503 -0
  112. package/dist/esm/models/mappers.js.map +1 -0
  113. package/dist/esm/models/parameters.d.ts +12 -0
  114. package/dist/esm/models/parameters.d.ts.map +1 -0
  115. package/dist/esm/models/parameters.js +112 -0
  116. package/dist/esm/models/parameters.js.map +1 -0
  117. package/dist/esm/operations/bots.d.ts +99 -0
  118. package/dist/esm/operations/bots.d.ts.map +1 -0
  119. package/dist/esm/operations/bots.js +477 -0
  120. package/dist/esm/operations/bots.js.map +1 -0
  121. package/dist/esm/operations/index.d.ts +3 -0
  122. package/dist/esm/operations/index.d.ts.map +1 -0
  123. package/dist/esm/operations/index.js +10 -0
  124. package/dist/esm/operations/index.js.map +1 -0
  125. package/dist/esm/operations/operations.d.ts +32 -0
  126. package/dist/esm/operations/operations.d.ts.map +1 -0
  127. package/dist/esm/operations/operations.js +134 -0
  128. package/dist/esm/operations/operations.js.map +1 -0
  129. package/dist/esm/operationsInterfaces/bots.d.ts +63 -0
  130. package/dist/esm/operationsInterfaces/bots.d.ts.map +1 -0
  131. package/{src/operations/index.ts → dist/esm/operationsInterfaces/bots.js} +2 -3
  132. package/dist/esm/operationsInterfaces/bots.js.map +1 -0
  133. package/dist/esm/operationsInterfaces/index.d.ts +3 -0
  134. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  135. package/dist/esm/operationsInterfaces/index.js +10 -0
  136. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  137. package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
  138. package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
  139. package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/operations.js} +2 -3
  140. package/dist/esm/operationsInterfaces/operations.js.map +1 -0
  141. package/dist/esm/package.json +3 -0
  142. package/dist/esm/pagingHelper.d.ts +13 -0
  143. package/dist/esm/pagingHelper.d.ts.map +1 -0
  144. package/dist/esm/pagingHelper.js +32 -0
  145. package/dist/esm/pagingHelper.js.map +1 -0
  146. package/dist/react-native/healthbotClient.d.ts +21 -0
  147. package/dist/react-native/healthbotClient.d.ts.map +1 -0
  148. package/dist/react-native/healthbotClient.js +98 -0
  149. package/dist/react-native/healthbotClient.js.map +1 -0
  150. package/dist/react-native/index.d.ts +5 -0
  151. package/dist/react-native/index.d.ts.map +1 -0
  152. package/dist/react-native/index.js +13 -0
  153. package/dist/react-native/index.js.map +1 -0
  154. package/dist/react-native/lroImpl.d.ts +16 -0
  155. package/dist/react-native/lroImpl.d.ts.map +1 -0
  156. package/dist/react-native/lroImpl.js +25 -0
  157. package/dist/react-native/lroImpl.js.map +1 -0
  158. package/dist/react-native/models/index.d.ts +313 -0
  159. package/dist/react-native/models/index.d.ts.map +1 -0
  160. package/dist/react-native/models/index.js +20 -0
  161. package/dist/react-native/models/index.js.map +1 -0
  162. package/dist/react-native/models/mappers.d.ts +19 -0
  163. package/dist/react-native/models/mappers.d.ts.map +1 -0
  164. package/dist/react-native/models/mappers.js +503 -0
  165. package/dist/react-native/models/mappers.js.map +1 -0
  166. package/dist/react-native/models/parameters.d.ts +12 -0
  167. package/dist/react-native/models/parameters.d.ts.map +1 -0
  168. package/dist/react-native/models/parameters.js +112 -0
  169. package/dist/react-native/models/parameters.js.map +1 -0
  170. package/dist/react-native/operations/bots.d.ts +99 -0
  171. package/dist/react-native/operations/bots.d.ts.map +1 -0
  172. package/dist/react-native/operations/bots.js +477 -0
  173. package/dist/react-native/operations/bots.js.map +1 -0
  174. package/dist/react-native/operations/index.d.ts +3 -0
  175. package/dist/react-native/operations/index.d.ts.map +1 -0
  176. package/dist/react-native/operations/index.js +10 -0
  177. package/dist/react-native/operations/index.js.map +1 -0
  178. package/dist/react-native/operations/operations.d.ts +32 -0
  179. package/dist/react-native/operations/operations.d.ts.map +1 -0
  180. package/dist/react-native/operations/operations.js +134 -0
  181. package/dist/react-native/operations/operations.js.map +1 -0
  182. package/dist/react-native/operationsInterfaces/bots.d.ts +63 -0
  183. package/dist/react-native/operationsInterfaces/bots.d.ts.map +1 -0
  184. package/dist/react-native/operationsInterfaces/bots.js +9 -0
  185. package/dist/react-native/operationsInterfaces/bots.js.map +1 -0
  186. package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
  187. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  188. package/dist/react-native/operationsInterfaces/index.js +10 -0
  189. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  190. package/dist/react-native/operationsInterfaces/operations.d.ts +11 -0
  191. package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -0
  192. package/dist/react-native/operationsInterfaces/operations.js +9 -0
  193. package/dist/react-native/operationsInterfaces/operations.js.map +1 -0
  194. package/dist/react-native/package.json +3 -0
  195. package/dist/react-native/pagingHelper.d.ts +13 -0
  196. package/dist/react-native/pagingHelper.d.ts.map +1 -0
  197. package/dist/react-native/pagingHelper.js +32 -0
  198. package/dist/react-native/pagingHelper.js.map +1 -0
  199. package/package.json +70 -41
  200. package/dist/index.js +0 -1451
  201. package/dist/index.js.map +0 -1
  202. package/dist/index.min.js +0 -1
  203. package/dist/index.min.js.map +0 -1
  204. package/dist-esm/samples-dev/botsCreateSample.d.ts +0 -2
  205. package/dist-esm/samples-dev/botsCreateSample.d.ts.map +0 -1
  206. package/dist-esm/samples-dev/botsCreateSample.js +0 -33
  207. package/dist-esm/samples-dev/botsCreateSample.js.map +0 -1
  208. package/dist-esm/samples-dev/botsDeleteSample.d.ts +0 -2
  209. package/dist-esm/samples-dev/botsDeleteSample.d.ts.map +0 -1
  210. package/dist-esm/samples-dev/botsDeleteSample.js +0 -29
  211. package/dist-esm/samples-dev/botsDeleteSample.js.map +0 -1
  212. package/dist-esm/samples-dev/botsGetSample.d.ts +0 -2
  213. package/dist-esm/samples-dev/botsGetSample.d.ts.map +0 -1
  214. package/dist-esm/samples-dev/botsGetSample.js +0 -29
  215. package/dist-esm/samples-dev/botsGetSample.js.map +0 -1
  216. package/dist-esm/samples-dev/botsListByResourceGroupSample.d.ts +0 -2
  217. package/dist-esm/samples-dev/botsListByResourceGroupSample.d.ts.map +0 -1
  218. package/dist-esm/samples-dev/botsListByResourceGroupSample.js +0 -44
  219. package/dist-esm/samples-dev/botsListByResourceGroupSample.js.map +0 -1
  220. package/dist-esm/samples-dev/botsListSample.d.ts +0 -2
  221. package/dist-esm/samples-dev/botsListSample.d.ts.map +0 -1
  222. package/dist-esm/samples-dev/botsListSample.js +0 -43
  223. package/dist-esm/samples-dev/botsListSample.js.map +0 -1
  224. package/dist-esm/samples-dev/botsUpdateSample.d.ts +0 -2
  225. package/dist-esm/samples-dev/botsUpdateSample.d.ts.map +0 -1
  226. package/dist-esm/samples-dev/botsUpdateSample.js +0 -23
  227. package/dist-esm/samples-dev/botsUpdateSample.js.map +0 -1
  228. package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
  229. package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
  230. package/dist-esm/samples-dev/operationsListSample.js +0 -43
  231. package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
  232. package/dist-esm/src/healthbotClient.d.ts.map +0 -1
  233. package/dist-esm/src/healthbotClient.js.map +0 -1
  234. package/dist-esm/src/index.d.ts +0 -5
  235. package/dist-esm/src/index.js.map +0 -1
  236. package/dist-esm/src/lroImpl.js +0 -29
  237. package/dist-esm/src/lroImpl.js.map +0 -1
  238. package/dist-esm/src/models/index.js.map +0 -1
  239. package/dist-esm/src/models/mappers.js.map +0 -1
  240. package/dist-esm/src/models/parameters.js.map +0 -1
  241. package/dist-esm/src/operations/bots.d.ts.map +0 -1
  242. package/dist-esm/src/operations/bots.js.map +0 -1
  243. package/dist-esm/src/operations/index.d.ts +0 -3
  244. package/dist-esm/src/operations/index.js.map +0 -1
  245. package/dist-esm/src/operations/operations.d.ts.map +0 -1
  246. package/dist-esm/src/operations/operations.js.map +0 -1
  247. package/dist-esm/src/operationsInterfaces/bots.d.ts.map +0 -1
  248. package/dist-esm/src/operationsInterfaces/bots.js.map +0 -1
  249. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
  250. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  251. package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
  252. package/dist-esm/src/pagingHelper.js.map +0 -1
  253. package/dist-esm/test/sampleTest.d.ts +0 -2
  254. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  255. package/dist-esm/test/sampleTest.js +0 -42
  256. package/dist-esm/test/sampleTest.js.map +0 -1
  257. package/src/healthbotClient.ts +0 -142
  258. package/src/lroImpl.ts +0 -34
  259. package/src/models/index.ts +0 -355
  260. package/src/models/mappers.ts +0 -530
  261. package/src/models/parameters.ts +0 -130
  262. package/src/operations/bots.ts +0 -619
  263. package/src/operations/operations.ts +0 -150
  264. package/src/operationsInterfaces/bots.ts +0 -116
  265. package/src/operationsInterfaces/operations.ts +0 -22
  266. package/src/pagingHelper.ts +0 -39
  267. package/tsconfig.json +0 -33
  268. /package/{dist-esm/src → dist/browser}/lroImpl.d.ts +0 -0
  269. /package/{dist-esm/src → dist/browser}/lroImpl.d.ts.map +0 -0
  270. /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
  271. /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
  272. /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
  273. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
  274. /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
  275. /package/{dist-esm/src → dist/browser}/models/mappers.js +0 -0
  276. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
  277. /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
  278. /package/{dist-esm/src → dist/browser}/operationsInterfaces/bots.js +0 -0
  279. /package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.js +0 -0
  280. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
  281. /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
  282. /package/{dist-esm/src → dist/browser}/pagingHelper.js +0 -0
  283. /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
@@ -1,619 +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 { Bots } 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 { HealthbotClient } from "../healthbotClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
18
- import {
19
- HealthBot,
20
- BotsListByResourceGroupNextOptionalParams,
21
- BotsListByResourceGroupOptionalParams,
22
- BotsListByResourceGroupResponse,
23
- BotsListNextOptionalParams,
24
- BotsListOptionalParams,
25
- BotsListResponse,
26
- BotsCreateOptionalParams,
27
- BotsCreateResponse,
28
- BotsGetOptionalParams,
29
- BotsGetResponse,
30
- HealthBotUpdateParameters,
31
- BotsUpdateOptionalParams,
32
- BotsUpdateResponse,
33
- BotsDeleteOptionalParams,
34
- BotsListByResourceGroupNextResponse,
35
- BotsListNextResponse
36
- } from "../models";
37
-
38
- /// <reference lib="esnext.asynciterable" />
39
- /** Class containing Bots operations. */
40
- export class BotsImpl implements Bots {
41
- private readonly client: HealthbotClient;
42
-
43
- /**
44
- * Initialize a new instance of the class Bots class.
45
- * @param client Reference to the service client
46
- */
47
- constructor(client: HealthbotClient) {
48
- this.client = client;
49
- }
50
-
51
- /**
52
- * Returns all the resources of a particular type belonging to a resource group
53
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
54
- * @param options The options parameters.
55
- */
56
- public listByResourceGroup(
57
- resourceGroupName: string,
58
- options?: BotsListByResourceGroupOptionalParams
59
- ): PagedAsyncIterableIterator<HealthBot> {
60
- const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
61
- return {
62
- next() {
63
- return iter.next();
64
- },
65
- [Symbol.asyncIterator]() {
66
- return this;
67
- },
68
- byPage: (settings?: PageSettings) => {
69
- if (settings?.maxPageSize) {
70
- throw new Error("maxPageSize is not supported by this operation.");
71
- }
72
- return this.listByResourceGroupPagingPage(
73
- resourceGroupName,
74
- options,
75
- settings
76
- );
77
- }
78
- };
79
- }
80
-
81
- private async *listByResourceGroupPagingPage(
82
- resourceGroupName: string,
83
- options?: BotsListByResourceGroupOptionalParams,
84
- settings?: PageSettings
85
- ): AsyncIterableIterator<HealthBot[]> {
86
- let result: BotsListByResourceGroupResponse;
87
- let continuationToken = settings?.continuationToken;
88
- if (!continuationToken) {
89
- result = await this._listByResourceGroup(resourceGroupName, options);
90
- let page = result.value || [];
91
- continuationToken = result.nextLink;
92
- setContinuationToken(page, continuationToken);
93
- yield page;
94
- }
95
- while (continuationToken) {
96
- result = await this._listByResourceGroupNext(
97
- resourceGroupName,
98
- continuationToken,
99
- options
100
- );
101
- continuationToken = result.nextLink;
102
- let page = result.value || [];
103
- setContinuationToken(page, continuationToken);
104
- yield page;
105
- }
106
- }
107
-
108
- private async *listByResourceGroupPagingAll(
109
- resourceGroupName: string,
110
- options?: BotsListByResourceGroupOptionalParams
111
- ): AsyncIterableIterator<HealthBot> {
112
- for await (const page of this.listByResourceGroupPagingPage(
113
- resourceGroupName,
114
- options
115
- )) {
116
- yield* page;
117
- }
118
- }
119
-
120
- /**
121
- * Returns all the resources of a particular type belonging to a subscription.
122
- * @param options The options parameters.
123
- */
124
- public list(
125
- options?: BotsListOptionalParams
126
- ): PagedAsyncIterableIterator<HealthBot> {
127
- const iter = this.listPagingAll(options);
128
- return {
129
- next() {
130
- return iter.next();
131
- },
132
- [Symbol.asyncIterator]() {
133
- return this;
134
- },
135
- byPage: (settings?: PageSettings) => {
136
- if (settings?.maxPageSize) {
137
- throw new Error("maxPageSize is not supported by this operation.");
138
- }
139
- return this.listPagingPage(options, settings);
140
- }
141
- };
142
- }
143
-
144
- private async *listPagingPage(
145
- options?: BotsListOptionalParams,
146
- settings?: PageSettings
147
- ): AsyncIterableIterator<HealthBot[]> {
148
- let result: BotsListResponse;
149
- let continuationToken = settings?.continuationToken;
150
- if (!continuationToken) {
151
- result = await this._list(options);
152
- let page = result.value || [];
153
- continuationToken = result.nextLink;
154
- setContinuationToken(page, continuationToken);
155
- yield page;
156
- }
157
- while (continuationToken) {
158
- result = await this._listNext(continuationToken, options);
159
- continuationToken = result.nextLink;
160
- let page = result.value || [];
161
- setContinuationToken(page, continuationToken);
162
- yield page;
163
- }
164
- }
165
-
166
- private async *listPagingAll(
167
- options?: BotsListOptionalParams
168
- ): AsyncIterableIterator<HealthBot> {
169
- for await (const page of this.listPagingPage(options)) {
170
- yield* page;
171
- }
172
- }
173
-
174
- /**
175
- * Create a new Azure Health Bot.
176
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
177
- * @param botName The name of the Bot resource.
178
- * @param parameters The parameters to provide for the created Azure Health Bot.
179
- * @param options The options parameters.
180
- */
181
- async beginCreate(
182
- resourceGroupName: string,
183
- botName: string,
184
- parameters: HealthBot,
185
- options?: BotsCreateOptionalParams
186
- ): Promise<
187
- PollerLike<PollOperationState<BotsCreateResponse>, BotsCreateResponse>
188
- > {
189
- const directSendOperation = async (
190
- args: coreClient.OperationArguments,
191
- spec: coreClient.OperationSpec
192
- ): Promise<BotsCreateResponse> => {
193
- return this.client.sendOperationRequest(args, spec);
194
- };
195
- const sendOperation = async (
196
- args: coreClient.OperationArguments,
197
- spec: coreClient.OperationSpec
198
- ) => {
199
- let currentRawResponse:
200
- | coreClient.FullOperationResponse
201
- | undefined = undefined;
202
- const providedCallback = args.options?.onResponse;
203
- const callback: coreClient.RawResponseCallback = (
204
- rawResponse: coreClient.FullOperationResponse,
205
- flatResponse: unknown
206
- ) => {
207
- currentRawResponse = rawResponse;
208
- providedCallback?.(rawResponse, flatResponse);
209
- };
210
- const updatedArgs = {
211
- ...args,
212
- options: {
213
- ...args.options,
214
- onResponse: callback
215
- }
216
- };
217
- const flatResponse = await directSendOperation(updatedArgs, spec);
218
- return {
219
- flatResponse,
220
- rawResponse: {
221
- statusCode: currentRawResponse!.status,
222
- body: currentRawResponse!.parsedBody,
223
- headers: currentRawResponse!.headers.toJSON()
224
- }
225
- };
226
- };
227
-
228
- const lro = new LroImpl(
229
- sendOperation,
230
- { resourceGroupName, botName, parameters, options },
231
- createOperationSpec
232
- );
233
- const poller = new LroEngine(lro, {
234
- resumeFrom: options?.resumeFrom,
235
- intervalInMs: options?.updateIntervalInMs,
236
- lroResourceLocationConfig: "azure-async-operation"
237
- });
238
- await poller.poll();
239
- return poller;
240
- }
241
-
242
- /**
243
- * Create a new Azure Health Bot.
244
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
245
- * @param botName The name of the Bot resource.
246
- * @param parameters The parameters to provide for the created Azure Health Bot.
247
- * @param options The options parameters.
248
- */
249
- async beginCreateAndWait(
250
- resourceGroupName: string,
251
- botName: string,
252
- parameters: HealthBot,
253
- options?: BotsCreateOptionalParams
254
- ): Promise<BotsCreateResponse> {
255
- const poller = await this.beginCreate(
256
- resourceGroupName,
257
- botName,
258
- parameters,
259
- options
260
- );
261
- return poller.pollUntilDone();
262
- }
263
-
264
- /**
265
- * Get a HealthBot.
266
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
267
- * @param botName The name of the Bot resource.
268
- * @param options The options parameters.
269
- */
270
- get(
271
- resourceGroupName: string,
272
- botName: string,
273
- options?: BotsGetOptionalParams
274
- ): Promise<BotsGetResponse> {
275
- return this.client.sendOperationRequest(
276
- { resourceGroupName, botName, options },
277
- getOperationSpec
278
- );
279
- }
280
-
281
- /**
282
- * Patch a HealthBot.
283
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
284
- * @param botName The name of the Bot resource.
285
- * @param parameters The parameters to provide for the required Azure Health Bot.
286
- * @param options The options parameters.
287
- */
288
- update(
289
- resourceGroupName: string,
290
- botName: string,
291
- parameters: HealthBotUpdateParameters,
292
- options?: BotsUpdateOptionalParams
293
- ): Promise<BotsUpdateResponse> {
294
- return this.client.sendOperationRequest(
295
- { resourceGroupName, botName, parameters, options },
296
- updateOperationSpec
297
- );
298
- }
299
-
300
- /**
301
- * Delete a HealthBot.
302
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
303
- * @param botName The name of the Bot resource.
304
- * @param options The options parameters.
305
- */
306
- async beginDelete(
307
- resourceGroupName: string,
308
- botName: string,
309
- options?: BotsDeleteOptionalParams
310
- ): Promise<PollerLike<PollOperationState<void>, void>> {
311
- const directSendOperation = async (
312
- args: coreClient.OperationArguments,
313
- spec: coreClient.OperationSpec
314
- ): Promise<void> => {
315
- return this.client.sendOperationRequest(args, spec);
316
- };
317
- const sendOperation = async (
318
- args: coreClient.OperationArguments,
319
- spec: coreClient.OperationSpec
320
- ) => {
321
- let currentRawResponse:
322
- | coreClient.FullOperationResponse
323
- | undefined = undefined;
324
- const providedCallback = args.options?.onResponse;
325
- const callback: coreClient.RawResponseCallback = (
326
- rawResponse: coreClient.FullOperationResponse,
327
- flatResponse: unknown
328
- ) => {
329
- currentRawResponse = rawResponse;
330
- providedCallback?.(rawResponse, flatResponse);
331
- };
332
- const updatedArgs = {
333
- ...args,
334
- options: {
335
- ...args.options,
336
- onResponse: callback
337
- }
338
- };
339
- const flatResponse = await directSendOperation(updatedArgs, spec);
340
- return {
341
- flatResponse,
342
- rawResponse: {
343
- statusCode: currentRawResponse!.status,
344
- body: currentRawResponse!.parsedBody,
345
- headers: currentRawResponse!.headers.toJSON()
346
- }
347
- };
348
- };
349
-
350
- const lro = new LroImpl(
351
- sendOperation,
352
- { resourceGroupName, botName, options },
353
- deleteOperationSpec
354
- );
355
- const poller = new LroEngine(lro, {
356
- resumeFrom: options?.resumeFrom,
357
- intervalInMs: options?.updateIntervalInMs
358
- });
359
- await poller.poll();
360
- return poller;
361
- }
362
-
363
- /**
364
- * Delete a HealthBot.
365
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
366
- * @param botName The name of the Bot resource.
367
- * @param options The options parameters.
368
- */
369
- async beginDeleteAndWait(
370
- resourceGroupName: string,
371
- botName: string,
372
- options?: BotsDeleteOptionalParams
373
- ): Promise<void> {
374
- const poller = await this.beginDelete(resourceGroupName, botName, options);
375
- return poller.pollUntilDone();
376
- }
377
-
378
- /**
379
- * Returns all the resources of a particular type belonging to a resource group
380
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
381
- * @param options The options parameters.
382
- */
383
- private _listByResourceGroup(
384
- resourceGroupName: string,
385
- options?: BotsListByResourceGroupOptionalParams
386
- ): Promise<BotsListByResourceGroupResponse> {
387
- return this.client.sendOperationRequest(
388
- { resourceGroupName, options },
389
- listByResourceGroupOperationSpec
390
- );
391
- }
392
-
393
- /**
394
- * Returns all the resources of a particular type belonging to a subscription.
395
- * @param options The options parameters.
396
- */
397
- private _list(options?: BotsListOptionalParams): Promise<BotsListResponse> {
398
- return this.client.sendOperationRequest({ options }, listOperationSpec);
399
- }
400
-
401
- /**
402
- * ListByResourceGroupNext
403
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
404
- * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
405
- * @param options The options parameters.
406
- */
407
- private _listByResourceGroupNext(
408
- resourceGroupName: string,
409
- nextLink: string,
410
- options?: BotsListByResourceGroupNextOptionalParams
411
- ): Promise<BotsListByResourceGroupNextResponse> {
412
- return this.client.sendOperationRequest(
413
- { resourceGroupName, nextLink, options },
414
- listByResourceGroupNextOperationSpec
415
- );
416
- }
417
-
418
- /**
419
- * ListNext
420
- * @param nextLink The nextLink from the previous successful call to the List method.
421
- * @param options The options parameters.
422
- */
423
- private _listNext(
424
- nextLink: string,
425
- options?: BotsListNextOptionalParams
426
- ): Promise<BotsListNextResponse> {
427
- return this.client.sendOperationRequest(
428
- { nextLink, options },
429
- listNextOperationSpec
430
- );
431
- }
432
- }
433
- // Operation Specifications
434
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
435
-
436
- const createOperationSpec: coreClient.OperationSpec = {
437
- path:
438
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}",
439
- httpMethod: "PUT",
440
- responses: {
441
- 200: {
442
- bodyMapper: Mappers.HealthBot
443
- },
444
- 201: {
445
- bodyMapper: Mappers.HealthBot
446
- },
447
- 202: {
448
- bodyMapper: Mappers.HealthBot
449
- },
450
- 204: {
451
- bodyMapper: Mappers.HealthBot
452
- },
453
- default: {
454
- bodyMapper: Mappers.ErrorModel
455
- }
456
- },
457
- requestBody: Parameters.parameters,
458
- queryParameters: [Parameters.apiVersion],
459
- urlParameters: [
460
- Parameters.$host,
461
- Parameters.subscriptionId,
462
- Parameters.resourceGroupName,
463
- Parameters.botName
464
- ],
465
- headerParameters: [Parameters.contentType, Parameters.accept],
466
- mediaType: "json",
467
- serializer
468
- };
469
- const getOperationSpec: coreClient.OperationSpec = {
470
- path:
471
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}",
472
- httpMethod: "GET",
473
- responses: {
474
- 200: {
475
- bodyMapper: Mappers.HealthBot
476
- },
477
- default: {
478
- bodyMapper: Mappers.ErrorModel
479
- }
480
- },
481
- queryParameters: [Parameters.apiVersion],
482
- urlParameters: [
483
- Parameters.$host,
484
- Parameters.subscriptionId,
485
- Parameters.resourceGroupName,
486
- Parameters.botName
487
- ],
488
- headerParameters: [Parameters.accept],
489
- serializer
490
- };
491
- const updateOperationSpec: coreClient.OperationSpec = {
492
- path:
493
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}",
494
- httpMethod: "PATCH",
495
- responses: {
496
- 200: {
497
- bodyMapper: Mappers.HealthBot
498
- },
499
- 201: {
500
- bodyMapper: Mappers.HealthBot
501
- },
502
- default: {
503
- bodyMapper: Mappers.ErrorModel
504
- }
505
- },
506
- requestBody: Parameters.parameters1,
507
- queryParameters: [Parameters.apiVersion],
508
- urlParameters: [
509
- Parameters.$host,
510
- Parameters.subscriptionId,
511
- Parameters.resourceGroupName,
512
- Parameters.botName
513
- ],
514
- headerParameters: [Parameters.contentType, Parameters.accept],
515
- mediaType: "json",
516
- serializer
517
- };
518
- const deleteOperationSpec: coreClient.OperationSpec = {
519
- path:
520
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}",
521
- httpMethod: "DELETE",
522
- responses: {
523
- 200: {},
524
- 201: {},
525
- 202: {},
526
- 204: {},
527
- default: {
528
- bodyMapper: Mappers.ErrorModel
529
- }
530
- },
531
- queryParameters: [Parameters.apiVersion],
532
- urlParameters: [
533
- Parameters.$host,
534
- Parameters.subscriptionId,
535
- Parameters.resourceGroupName,
536
- Parameters.botName
537
- ],
538
- headerParameters: [Parameters.accept],
539
- serializer
540
- };
541
- const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
542
- path:
543
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots",
544
- httpMethod: "GET",
545
- responses: {
546
- 200: {
547
- bodyMapper: Mappers.BotResponseList
548
- },
549
- default: {
550
- bodyMapper: Mappers.ErrorModel
551
- }
552
- },
553
- queryParameters: [Parameters.apiVersion],
554
- urlParameters: [
555
- Parameters.$host,
556
- Parameters.subscriptionId,
557
- Parameters.resourceGroupName
558
- ],
559
- headerParameters: [Parameters.accept],
560
- serializer
561
- };
562
- const listOperationSpec: coreClient.OperationSpec = {
563
- path:
564
- "/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots",
565
- httpMethod: "GET",
566
- responses: {
567
- 200: {
568
- bodyMapper: Mappers.BotResponseList
569
- },
570
- default: {
571
- bodyMapper: Mappers.ErrorModel
572
- }
573
- },
574
- queryParameters: [Parameters.apiVersion],
575
- urlParameters: [Parameters.$host, Parameters.subscriptionId],
576
- headerParameters: [Parameters.accept],
577
- serializer
578
- };
579
- const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
580
- path: "{nextLink}",
581
- httpMethod: "GET",
582
- responses: {
583
- 200: {
584
- bodyMapper: Mappers.BotResponseList
585
- },
586
- default: {
587
- bodyMapper: Mappers.ErrorModel
588
- }
589
- },
590
- queryParameters: [Parameters.apiVersion],
591
- urlParameters: [
592
- Parameters.$host,
593
- Parameters.subscriptionId,
594
- Parameters.resourceGroupName,
595
- Parameters.nextLink
596
- ],
597
- headerParameters: [Parameters.accept],
598
- serializer
599
- };
600
- const listNextOperationSpec: coreClient.OperationSpec = {
601
- path: "{nextLink}",
602
- httpMethod: "GET",
603
- responses: {
604
- 200: {
605
- bodyMapper: Mappers.BotResponseList
606
- },
607
- default: {
608
- bodyMapper: Mappers.ErrorModel
609
- }
610
- },
611
- queryParameters: [Parameters.apiVersion],
612
- urlParameters: [
613
- Parameters.$host,
614
- Parameters.subscriptionId,
615
- Parameters.nextLink
616
- ],
617
- headerParameters: [Parameters.accept],
618
- serializer
619
- };