@azure/arm-healthcareapis 1.1.0 → 2.0.0-alpha.20220201.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -83
  4. package/dist/index.js +2292 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/checkNameAvailability.d.ts +2 -0
  9. package/dist-esm/samples-dev/checkNameAvailability.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/checkNameAvailability.js +33 -0
  11. package/dist-esm/samples-dev/checkNameAvailability.js.map +1 -0
  12. package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.d.ts +2 -0
  13. package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.js +62 -0
  15. package/dist-esm/samples-dev/createOrUpdateAServiceWithAllParameters.js.map +1 -0
  16. package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.d.ts +2 -0
  17. package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.js +39 -0
  19. package/dist-esm/samples-dev/createOrUpdateAServiceWithMinimumParameters.js.map +1 -0
  20. package/dist-esm/samples-dev/deleteService.d.ts +2 -0
  21. package/dist-esm/samples-dev/deleteService.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/deleteService.js +31 -0
  23. package/dist-esm/samples-dev/deleteService.js.map +1 -0
  24. package/dist-esm/samples-dev/getMetadata.d.ts +2 -0
  25. package/dist-esm/samples-dev/getMetadata.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/getMetadata.js +31 -0
  27. package/dist-esm/samples-dev/getMetadata.js.map +1 -0
  28. package/dist-esm/samples-dev/getOperationResult.d.ts +2 -0
  29. package/dist-esm/samples-dev/getOperationResult.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/getOperationResult.js +31 -0
  31. package/dist-esm/samples-dev/getOperationResult.js.map +1 -0
  32. package/dist-esm/samples-dev/listAllServicesInResourceGroup.d.ts +2 -0
  33. package/dist-esm/samples-dev/listAllServicesInResourceGroup.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/listAllServicesInResourceGroup.js +44 -0
  35. package/dist-esm/samples-dev/listAllServicesInResourceGroup.js.map +1 -0
  36. package/dist-esm/samples-dev/listAllServicesInSubscription.d.ts +2 -0
  37. package/dist-esm/samples-dev/listAllServicesInSubscription.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/listAllServicesInSubscription.js +43 -0
  39. package/dist-esm/samples-dev/listAllServicesInSubscription.js.map +1 -0
  40. package/dist-esm/samples-dev/listOperations.d.ts +2 -0
  41. package/dist-esm/samples-dev/listOperations.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/listOperations.js +43 -0
  43. package/dist-esm/samples-dev/listOperations.js.map +1 -0
  44. package/dist-esm/samples-dev/patchService.d.ts +2 -0
  45. package/dist-esm/samples-dev/patchService.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/patchService.js +34 -0
  47. package/dist-esm/samples-dev/patchService.js.map +1 -0
  48. package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.d.ts +2 -0
  49. package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.js +38 -0
  51. package/dist-esm/samples-dev/privateEndpointConnectionCreateOrUpdate.js.map +1 -0
  52. package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.d.ts +2 -0
  53. package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.js +32 -0
  55. package/dist-esm/samples-dev/privateEndpointConnectionGetConnection.js.map +1 -0
  56. package/dist-esm/samples-dev/privateEndpointConnectionList.d.ts +2 -0
  57. package/dist-esm/samples-dev/privateEndpointConnectionList.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/privateEndpointConnectionList.js +45 -0
  59. package/dist-esm/samples-dev/privateEndpointConnectionList.js.map +1 -0
  60. package/dist-esm/samples-dev/privateEndpointConnectionsDelete.d.ts +2 -0
  61. package/dist-esm/samples-dev/privateEndpointConnectionsDelete.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/privateEndpointConnectionsDelete.js +32 -0
  63. package/dist-esm/samples-dev/privateEndpointConnectionsDelete.js.map +1 -0
  64. package/dist-esm/samples-dev/privateLinkResourcesGet.d.ts +2 -0
  65. package/dist-esm/samples-dev/privateLinkResourcesGet.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/privateLinkResourcesGet.js +32 -0
  67. package/dist-esm/samples-dev/privateLinkResourcesGet.js.map +1 -0
  68. package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.d.ts +2 -0
  69. package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.js +31 -0
  71. package/dist-esm/samples-dev/privateLinkResourcesListGroupIds.js.map +1 -0
  72. package/dist-esm/src/healthcareApisManagementClient.d.ts +22 -0
  73. package/dist-esm/src/healthcareApisManagementClient.d.ts.map +1 -0
  74. package/dist-esm/src/healthcareApisManagementClient.js +55 -0
  75. package/dist-esm/src/healthcareApisManagementClient.js.map +1 -0
  76. package/dist-esm/src/index.d.ts +5 -0
  77. package/dist-esm/src/index.d.ts.map +1 -0
  78. package/dist-esm/src/index.js +12 -0
  79. package/dist-esm/src/index.js.map +1 -0
  80. package/dist-esm/src/lroImpl.d.ts +16 -0
  81. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  82. package/dist-esm/src/lroImpl.js +29 -0
  83. package/dist-esm/src/lroImpl.js.map +1 -0
  84. package/dist-esm/src/models/index.d.ts +609 -0
  85. package/dist-esm/src/models/index.d.ts.map +1 -0
  86. package/dist-esm/src/models/index.js +65 -0
  87. package/dist-esm/src/models/index.js.map +1 -0
  88. package/dist-esm/src/models/mappers.d.ts +32 -0
  89. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  90. package/{esm → dist-esm/src}/models/mappers.js +335 -321
  91. package/dist-esm/src/models/mappers.js.map +1 -0
  92. package/dist-esm/src/models/parameters.d.ts +18 -0
  93. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  94. package/dist-esm/src/models/parameters.js +159 -0
  95. package/dist-esm/src/models/parameters.js.map +1 -0
  96. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  97. package/dist-esm/src/operations/index.d.ts.map +1 -0
  98. package/{esm → dist-esm/src}/operations/index.js +3 -5
  99. package/dist-esm/src/operations/index.js.map +1 -0
  100. package/dist-esm/src/operations/operationResults.d.ts +20 -0
  101. package/dist-esm/src/operations/operationResults.d.ts.map +1 -0
  102. package/dist-esm/src/operations/operationResults.js +56 -0
  103. package/dist-esm/src/operations/operationResults.js.map +1 -0
  104. package/dist-esm/src/operations/operations.d.ts +32 -0
  105. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  106. package/dist-esm/src/operations/operations.js +120 -0
  107. package/dist-esm/src/operations/operations.js.map +1 -0
  108. package/dist-esm/src/operations/privateEndpointConnections.d.ts +78 -0
  109. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  110. package/dist-esm/src/operations/privateEndpointConnections.js +314 -0
  111. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  112. package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
  113. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  114. package/dist-esm/src/operations/privateLinkResources.js +85 -0
  115. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  116. package/dist-esm/src/operations/services.d.ts +114 -0
  117. package/dist-esm/src/operations/services.d.ts.map +1 -0
  118. package/dist-esm/src/operations/services.js +527 -0
  119. package/dist-esm/src/operations/services.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  121. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  123. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/operationResults.d.ts +12 -0
  125. package/dist-esm/src/operationsInterfaces/operationResults.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/operationResults.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/operationResults.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  129. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +61 -0
  133. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +20 -0
  137. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/services.d.ts +78 -0
  141. package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/services.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
  144. package/dist-esm/test/sampleTest.d.ts +2 -0
  145. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  146. package/dist-esm/test/sampleTest.js +40 -0
  147. package/dist-esm/test/sampleTest.js.map +1 -0
  148. package/package.json +81 -22
  149. package/review/arm-healthcareapis.api.md +535 -0
  150. package/rollup.config.js +181 -30
  151. package/src/healthcareApisManagementClient.ts +82 -43
  152. package/src/index.ts +12 -0
  153. package/src/lroImpl.ts +34 -0
  154. package/src/models/index.ts +450 -739
  155. package/src/models/mappers.ts +336 -319
  156. package/src/models/parameters.ts +111 -48
  157. package/src/operations/index.ts +3 -5
  158. package/src/operations/operationResults.ts +39 -54
  159. package/src/operations/operations.ts +87 -73
  160. package/src/operations/privateEndpointConnections.ts +321 -161
  161. package/src/operations/privateLinkResources.ts +64 -97
  162. package/src/operations/services.ts +538 -362
  163. package/src/operationsInterfaces/index.ts +13 -0
  164. package/src/operationsInterfaces/operationResults.ts +27 -0
  165. package/src/operationsInterfaces/operations.ts +22 -0
  166. package/src/operationsInterfaces/privateEndpointConnections.ts +115 -0
  167. package/src/operationsInterfaces/privateLinkResources.ts +42 -0
  168. package/src/operationsInterfaces/services.ts +152 -0
  169. package/tsconfig.json +5 -4
  170. package/types/arm-healthcareapis.d.ts +885 -0
  171. package/types/tsdoc-metadata.json +11 -0
  172. package/dist/arm-healthcareapis.js +0 -2100
  173. package/dist/arm-healthcareapis.js.map +0 -1
  174. package/dist/arm-healthcareapis.min.js +0 -1
  175. package/dist/arm-healthcareapis.min.js.map +0 -1
  176. package/esm/healthcareApisManagementClient.d.ts +0 -28
  177. package/esm/healthcareApisManagementClient.d.ts.map +0 -1
  178. package/esm/healthcareApisManagementClient.js +0 -42
  179. package/esm/healthcareApisManagementClient.js.map +0 -1
  180. package/esm/healthcareApisManagementClientContext.d.ts +0 -22
  181. package/esm/healthcareApisManagementClientContext.d.ts.map +0 -1
  182. package/esm/healthcareApisManagementClientContext.js +0 -61
  183. package/esm/healthcareApisManagementClientContext.js.map +0 -1
  184. package/esm/models/index.d.ts +0 -907
  185. package/esm/models/index.d.ts.map +0 -1
  186. package/esm/models/index.js +0 -8
  187. package/esm/models/index.js.map +0 -1
  188. package/esm/models/mappers.d.ts +0 -33
  189. package/esm/models/mappers.d.ts.map +0 -1
  190. package/esm/models/mappers.js.map +0 -1
  191. package/esm/models/operationResultsMappers.d.ts +0 -2
  192. package/esm/models/operationResultsMappers.d.ts.map +0 -1
  193. package/esm/models/operationResultsMappers.js +0 -9
  194. package/esm/models/operationResultsMappers.js.map +0 -1
  195. package/esm/models/operationsMappers.d.ts +0 -2
  196. package/esm/models/operationsMappers.d.ts.map +0 -1
  197. package/esm/models/operationsMappers.js +0 -9
  198. package/esm/models/operationsMappers.js.map +0 -1
  199. package/esm/models/parameters.d.ts +0 -12
  200. package/esm/models/parameters.d.ts.map +0 -1
  201. package/esm/models/parameters.js +0 -120
  202. package/esm/models/parameters.js.map +0 -1
  203. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  204. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  205. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  206. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  207. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  208. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  209. package/esm/models/privateLinkResourcesMappers.js +0 -9
  210. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  211. package/esm/models/servicesMappers.d.ts +0 -2
  212. package/esm/models/servicesMappers.d.ts.map +0 -1
  213. package/esm/models/servicesMappers.js +0 -9
  214. package/esm/models/servicesMappers.js.map +0 -1
  215. package/esm/operations/index.d.ts.map +0 -1
  216. package/esm/operations/index.js.map +0 -1
  217. package/esm/operations/operationResults.d.ts +0 -34
  218. package/esm/operations/operationResults.d.ts.map +0 -1
  219. package/esm/operations/operationResults.js +0 -61
  220. package/esm/operations/operationResults.js.map +0 -1
  221. package/esm/operations/operations.d.ts +0 -46
  222. package/esm/operations/operations.d.ts.map +0 -1
  223. package/esm/operations/operations.js +0 -77
  224. package/esm/operations/operations.js.map +0 -1
  225. package/esm/operations/privateEndpointConnections.d.ts +0 -104
  226. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  227. package/esm/operations/privateEndpointConnections.js +0 -209
  228. package/esm/operations/privateEndpointConnections.js.map +0 -1
  229. package/esm/operations/privateLinkResources.d.ts +0 -58
  230. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  231. package/esm/operations/privateLinkResources.js +0 -91
  232. package/esm/operations/privateLinkResources.js.map +0 -1
  233. package/esm/operations/services.d.ts +0 -177
  234. package/esm/operations/services.d.ts.map +0 -1
  235. package/esm/operations/services.js +0 -362
  236. package/esm/operations/services.js.map +0 -1
  237. package/src/healthcareApisManagementClientContext.ts +0 -68
  238. package/src/models/operationResultsMappers.ts +0 -13
  239. package/src/models/operationsMappers.ts +0 -15
  240. package/src/models/privateEndpointConnectionsMappers.ts +0 -31
  241. package/src/models/privateLinkResourcesMappers.ts +0 -31
  242. package/src/models/servicesMappers.ts +0 -34
@@ -1,316 +1,507 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/servicesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Services } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
15
13
  import * as Parameters from "../models/parameters";
16
- import { HealthcareApisManagementClientContext } from "../healthcareApisManagementClientContext";
14
+ import { HealthcareApisManagementClient } from "../healthcareApisManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ ServicesDescription,
19
+ ServicesListNextOptionalParams,
20
+ ServicesListOptionalParams,
21
+ ServicesListByResourceGroupNextOptionalParams,
22
+ ServicesListByResourceGroupOptionalParams,
23
+ ServicesGetOptionalParams,
24
+ ServicesGetResponse,
25
+ ServicesCreateOrUpdateOptionalParams,
26
+ ServicesCreateOrUpdateResponse,
27
+ ServicesPatchDescription,
28
+ ServicesUpdateOptionalParams,
29
+ ServicesUpdateResponse,
30
+ ServicesDeleteOptionalParams,
31
+ ServicesListResponse,
32
+ ServicesListByResourceGroupResponse,
33
+ CheckNameAvailabilityParameters,
34
+ ServicesCheckNameAvailabilityOptionalParams,
35
+ ServicesCheckNameAvailabilityResponse,
36
+ ServicesListNextResponse,
37
+ ServicesListByResourceGroupNextResponse
38
+ } from "../models";
17
39
 
18
- /** Class representing a Services. */
19
- export class Services {
20
- private readonly client: HealthcareApisManagementClientContext;
40
+ /// <reference lib="esnext.asynciterable" />
41
+ /** Class containing Services operations. */
42
+ export class ServicesImpl implements Services {
43
+ private readonly client: HealthcareApisManagementClient;
21
44
 
22
45
  /**
23
- * Create a Services.
24
- * @param {HealthcareApisManagementClientContext} client Reference to the service client.
46
+ * Initialize a new instance of the class Services class.
47
+ * @param client Reference to the service client
25
48
  */
26
- constructor(client: HealthcareApisManagementClientContext) {
49
+ constructor(client: HealthcareApisManagementClient) {
27
50
  this.client = client;
28
51
  }
29
52
 
30
53
  /**
31
- * Get the metadata of a service instance.
32
- * @param resourceGroupName The name of the resource group that contains the service instance.
33
- * @param resourceName The name of the service instance.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.ServicesGetResponse>
36
- */
37
- get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesGetResponse>;
38
- /**
39
- * @param resourceGroupName The name of the resource group that contains the service instance.
40
- * @param resourceName The name of the service instance.
41
- * @param callback The callback
54
+ * Get all the service instances in a subscription.
55
+ * @param options The options parameters.
42
56
  */
43
- get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback<Models.ServicesDescription>): void;
57
+ public list(
58
+ options?: ServicesListOptionalParams
59
+ ): PagedAsyncIterableIterator<ServicesDescription> {
60
+ const iter = this.listPagingAll(options);
61
+ return {
62
+ next() {
63
+ return iter.next();
64
+ },
65
+ [Symbol.asyncIterator]() {
66
+ return this;
67
+ },
68
+ byPage: () => {
69
+ return this.listPagingPage(options);
70
+ }
71
+ };
72
+ }
73
+
74
+ private async *listPagingPage(
75
+ options?: ServicesListOptionalParams
76
+ ): AsyncIterableIterator<ServicesDescription[]> {
77
+ let result = await this._list(options);
78
+ yield result.value || [];
79
+ let continuationToken = result.nextLink;
80
+ while (continuationToken) {
81
+ result = await this._listNext(continuationToken, options);
82
+ continuationToken = result.nextLink;
83
+ yield result.value || [];
84
+ }
85
+ }
86
+
87
+ private async *listPagingAll(
88
+ options?: ServicesListOptionalParams
89
+ ): AsyncIterableIterator<ServicesDescription> {
90
+ for await (const page of this.listPagingPage(options)) {
91
+ yield* page;
92
+ }
93
+ }
94
+
44
95
  /**
96
+ * Get all the service instances in a resource group.
45
97
  * @param resourceGroupName The name of the resource group that contains the service instance.
46
- * @param resourceName The name of the service instance.
47
- * @param options The optional parameters
48
- * @param callback The callback
98
+ * @param options The options parameters.
49
99
  */
50
- get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesDescription>): void;
51
- get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesDescription>, callback?: msRest.ServiceCallback<Models.ServicesDescription>): Promise<Models.ServicesGetResponse> {
52
- return this.client.sendOperationRequest(
53
- {
100
+ public listByResourceGroup(
101
+ resourceGroupName: string,
102
+ options?: ServicesListByResourceGroupOptionalParams
103
+ ): PagedAsyncIterableIterator<ServicesDescription> {
104
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
105
+ return {
106
+ next() {
107
+ return iter.next();
108
+ },
109
+ [Symbol.asyncIterator]() {
110
+ return this;
111
+ },
112
+ byPage: () => {
113
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
114
+ }
115
+ };
116
+ }
117
+
118
+ private async *listByResourceGroupPagingPage(
119
+ resourceGroupName: string,
120
+ options?: ServicesListByResourceGroupOptionalParams
121
+ ): AsyncIterableIterator<ServicesDescription[]> {
122
+ let result = await this._listByResourceGroup(resourceGroupName, options);
123
+ yield result.value || [];
124
+ let continuationToken = result.nextLink;
125
+ while (continuationToken) {
126
+ result = await this._listByResourceGroupNext(
54
127
  resourceGroupName,
55
- resourceName,
128
+ continuationToken,
56
129
  options
57
- },
58
- getOperationSpec,
59
- callback) as Promise<Models.ServicesGetResponse>;
130
+ );
131
+ continuationToken = result.nextLink;
132
+ yield result.value || [];
133
+ }
60
134
  }
61
135
 
62
- /**
63
- * Create or update the metadata of a service instance.
64
- * @param resourceGroupName The name of the resource group that contains the service instance.
65
- * @param resourceName The name of the service instance.
66
- * @param serviceDescription The service instance metadata.
67
- * @param [options] The optional parameters
68
- * @returns Promise<Models.ServicesCreateOrUpdateResponse>
69
- */
70
- createOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: Models.ServicesDescription, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCreateOrUpdateResponse> {
71
- return this.beginCreateOrUpdate(resourceGroupName,resourceName,serviceDescription,options)
72
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesCreateOrUpdateResponse>;
136
+ private async *listByResourceGroupPagingAll(
137
+ resourceGroupName: string,
138
+ options?: ServicesListByResourceGroupOptionalParams
139
+ ): AsyncIterableIterator<ServicesDescription> {
140
+ for await (const page of this.listByResourceGroupPagingPage(
141
+ resourceGroupName,
142
+ options
143
+ )) {
144
+ yield* page;
145
+ }
73
146
  }
74
147
 
75
148
  /**
76
- * Update the metadata of a service instance.
149
+ * Get the metadata of a service instance.
77
150
  * @param resourceGroupName The name of the resource group that contains the service instance.
78
151
  * @param resourceName The name of the service instance.
79
- * @param servicePatchDescription The service instance metadata and security metadata.
80
- * @param [options] The optional parameters
81
- * @returns Promise<Models.ServicesUpdateResponse>
152
+ * @param options The options parameters.
82
153
  */
83
- update(resourceGroupName: string, resourceName: string, servicePatchDescription: Models.ServicesPatchDescription, options?: msRest.RequestOptionsBase): Promise<Models.ServicesUpdateResponse> {
84
- return this.beginUpdate(resourceGroupName,resourceName,servicePatchDescription,options)
85
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesUpdateResponse>;
154
+ get(
155
+ resourceGroupName: string,
156
+ resourceName: string,
157
+ options?: ServicesGetOptionalParams
158
+ ): Promise<ServicesGetResponse> {
159
+ return this.client.sendOperationRequest(
160
+ { resourceGroupName, resourceName, options },
161
+ getOperationSpec
162
+ );
86
163
  }
87
164
 
88
165
  /**
89
- * Delete a service instance.
166
+ * Create or update the metadata of a service instance.
90
167
  * @param resourceGroupName The name of the resource group that contains the service instance.
91
168
  * @param resourceName The name of the service instance.
92
- * @param [options] The optional parameters
93
- * @returns Promise<msRest.RestResponse>
169
+ * @param serviceDescription The service instance metadata.
170
+ * @param options The options parameters.
94
171
  */
95
- deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
96
- return this.beginDeleteMethod(resourceGroupName,resourceName,options)
97
- .then(lroPoller => lroPoller.pollUntilFinished());
98
- }
172
+ async beginCreateOrUpdate(
173
+ resourceGroupName: string,
174
+ resourceName: string,
175
+ serviceDescription: ServicesDescription,
176
+ options?: ServicesCreateOrUpdateOptionalParams
177
+ ): Promise<
178
+ PollerLike<
179
+ PollOperationState<ServicesCreateOrUpdateResponse>,
180
+ ServicesCreateOrUpdateResponse
181
+ >
182
+ > {
183
+ const directSendOperation = async (
184
+ args: coreClient.OperationArguments,
185
+ spec: coreClient.OperationSpec
186
+ ): Promise<ServicesCreateOrUpdateResponse> => {
187
+ return this.client.sendOperationRequest(args, spec);
188
+ };
189
+ const sendOperation = async (
190
+ args: coreClient.OperationArguments,
191
+ spec: coreClient.OperationSpec
192
+ ) => {
193
+ let currentRawResponse:
194
+ | coreClient.FullOperationResponse
195
+ | undefined = undefined;
196
+ const providedCallback = args.options?.onResponse;
197
+ const callback: coreClient.RawResponseCallback = (
198
+ rawResponse: coreClient.FullOperationResponse,
199
+ flatResponse: unknown
200
+ ) => {
201
+ currentRawResponse = rawResponse;
202
+ providedCallback?.(rawResponse, flatResponse);
203
+ };
204
+ const updatedArgs = {
205
+ ...args,
206
+ options: {
207
+ ...args.options,
208
+ onResponse: callback
209
+ }
210
+ };
211
+ const flatResponse = await directSendOperation(updatedArgs, spec);
212
+ return {
213
+ flatResponse,
214
+ rawResponse: {
215
+ statusCode: currentRawResponse!.status,
216
+ body: currentRawResponse!.parsedBody,
217
+ headers: currentRawResponse!.headers.toJSON()
218
+ }
219
+ };
220
+ };
99
221
 
100
- /**
101
- * Get all the service instances in a subscription.
102
- * @param [options] The optional parameters
103
- * @returns Promise<Models.ServicesListResponse>
104
- */
105
- list(options?: msRest.RequestOptionsBase): Promise<Models.ServicesListResponse>;
106
- /**
107
- * @param callback The callback
108
- */
109
- list(callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
110
- /**
111
- * @param options The optional parameters
112
- * @param callback The callback
113
- */
114
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
115
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesDescriptionListResult>, callback?: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): Promise<Models.ServicesListResponse> {
116
- return this.client.sendOperationRequest(
117
- {
118
- options
119
- },
120
- listOperationSpec,
121
- callback) as Promise<Models.ServicesListResponse>;
222
+ const lro = new LroImpl(
223
+ sendOperation,
224
+ { resourceGroupName, resourceName, serviceDescription, options },
225
+ createOrUpdateOperationSpec
226
+ );
227
+ return new LroEngine(lro, {
228
+ resumeFrom: options?.resumeFrom,
229
+ intervalInMs: options?.updateIntervalInMs
230
+ });
122
231
  }
123
232
 
124
233
  /**
125
- * Get all the service instances in a resource group.
126
- * @param resourceGroupName The name of the resource group that contains the service instance.
127
- * @param [options] The optional parameters
128
- * @returns Promise<Models.ServicesListByResourceGroupResponse>
129
- */
130
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupResponse>;
131
- /**
132
- * @param resourceGroupName The name of the resource group that contains the service instance.
133
- * @param callback The callback
134
- */
135
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
136
- /**
234
+ * Create or update the metadata of a service instance.
137
235
  * @param resourceGroupName The name of the resource group that contains the service instance.
138
- * @param options The optional parameters
139
- * @param callback The callback
236
+ * @param resourceName The name of the service instance.
237
+ * @param serviceDescription The service instance metadata.
238
+ * @param options The options parameters.
140
239
  */
141
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
142
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesDescriptionListResult>, callback?: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): Promise<Models.ServicesListByResourceGroupResponse> {
143
- return this.client.sendOperationRequest(
144
- {
145
- resourceGroupName,
146
- options
147
- },
148
- listByResourceGroupOperationSpec,
149
- callback) as Promise<Models.ServicesListByResourceGroupResponse>;
240
+ async beginCreateOrUpdateAndWait(
241
+ resourceGroupName: string,
242
+ resourceName: string,
243
+ serviceDescription: ServicesDescription,
244
+ options?: ServicesCreateOrUpdateOptionalParams
245
+ ): Promise<ServicesCreateOrUpdateResponse> {
246
+ const poller = await this.beginCreateOrUpdate(
247
+ resourceGroupName,
248
+ resourceName,
249
+ serviceDescription,
250
+ options
251
+ );
252
+ return poller.pollUntilDone();
150
253
  }
151
254
 
152
255
  /**
153
- * Check if a service instance name is available.
154
- * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters
155
- * structure to the name of the service instance to check.
156
- * @param [options] The optional parameters
157
- * @returns Promise<Models.ServicesCheckNameAvailabilityResponse>
158
- */
159
- checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckNameAvailabilityResponse>;
160
- /**
161
- * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters
162
- * structure to the name of the service instance to check.
163
- * @param callback The callback
164
- */
165
- checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback<Models.ServicesNameAvailabilityInfo>): void;
166
- /**
167
- * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters
168
- * structure to the name of the service instance to check.
169
- * @param options The optional parameters
170
- * @param callback The callback
256
+ * Update the metadata of a service instance.
257
+ * @param resourceGroupName The name of the resource group that contains the service instance.
258
+ * @param resourceName The name of the service instance.
259
+ * @param servicePatchDescription The service instance metadata and security metadata.
260
+ * @param options The options parameters.
171
261
  */
172
- checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesNameAvailabilityInfo>): void;
173
- checkNameAvailability(checkNameAvailabilityInputs: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesNameAvailabilityInfo>, callback?: msRest.ServiceCallback<Models.ServicesNameAvailabilityInfo>): Promise<Models.ServicesCheckNameAvailabilityResponse> {
174
- return this.client.sendOperationRequest(
175
- {
176
- checkNameAvailabilityInputs,
177
- options
178
- },
179
- checkNameAvailabilityOperationSpec,
180
- callback) as Promise<Models.ServicesCheckNameAvailabilityResponse>;
262
+ async beginUpdate(
263
+ resourceGroupName: string,
264
+ resourceName: string,
265
+ servicePatchDescription: ServicesPatchDescription,
266
+ options?: ServicesUpdateOptionalParams
267
+ ): Promise<
268
+ PollerLike<
269
+ PollOperationState<ServicesUpdateResponse>,
270
+ ServicesUpdateResponse
271
+ >
272
+ > {
273
+ const directSendOperation = async (
274
+ args: coreClient.OperationArguments,
275
+ spec: coreClient.OperationSpec
276
+ ): Promise<ServicesUpdateResponse> => {
277
+ return this.client.sendOperationRequest(args, spec);
278
+ };
279
+ const sendOperation = async (
280
+ args: coreClient.OperationArguments,
281
+ spec: coreClient.OperationSpec
282
+ ) => {
283
+ let currentRawResponse:
284
+ | coreClient.FullOperationResponse
285
+ | undefined = undefined;
286
+ const providedCallback = args.options?.onResponse;
287
+ const callback: coreClient.RawResponseCallback = (
288
+ rawResponse: coreClient.FullOperationResponse,
289
+ flatResponse: unknown
290
+ ) => {
291
+ currentRawResponse = rawResponse;
292
+ providedCallback?.(rawResponse, flatResponse);
293
+ };
294
+ const updatedArgs = {
295
+ ...args,
296
+ options: {
297
+ ...args.options,
298
+ onResponse: callback
299
+ }
300
+ };
301
+ const flatResponse = await directSendOperation(updatedArgs, spec);
302
+ return {
303
+ flatResponse,
304
+ rawResponse: {
305
+ statusCode: currentRawResponse!.status,
306
+ body: currentRawResponse!.parsedBody,
307
+ headers: currentRawResponse!.headers.toJSON()
308
+ }
309
+ };
310
+ };
311
+
312
+ const lro = new LroImpl(
313
+ sendOperation,
314
+ { resourceGroupName, resourceName, servicePatchDescription, options },
315
+ updateOperationSpec
316
+ );
317
+ return new LroEngine(lro, {
318
+ resumeFrom: options?.resumeFrom,
319
+ intervalInMs: options?.updateIntervalInMs
320
+ });
181
321
  }
182
322
 
183
323
  /**
184
- * Create or update the metadata of a service instance.
324
+ * Update the metadata of a service instance.
185
325
  * @param resourceGroupName The name of the resource group that contains the service instance.
186
326
  * @param resourceName The name of the service instance.
187
- * @param serviceDescription The service instance metadata.
188
- * @param [options] The optional parameters
189
- * @returns Promise<msRestAzure.LROPoller>
327
+ * @param servicePatchDescription The service instance metadata and security metadata.
328
+ * @param options The options parameters.
190
329
  */
191
- beginCreateOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: Models.ServicesDescription, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
192
- return this.client.sendLRORequest(
193
- {
194
- resourceGroupName,
195
- resourceName,
196
- serviceDescription,
197
- options
198
- },
199
- beginCreateOrUpdateOperationSpec,
200
- options);
330
+ async beginUpdateAndWait(
331
+ resourceGroupName: string,
332
+ resourceName: string,
333
+ servicePatchDescription: ServicesPatchDescription,
334
+ options?: ServicesUpdateOptionalParams
335
+ ): Promise<ServicesUpdateResponse> {
336
+ const poller = await this.beginUpdate(
337
+ resourceGroupName,
338
+ resourceName,
339
+ servicePatchDescription,
340
+ options
341
+ );
342
+ return poller.pollUntilDone();
201
343
  }
202
344
 
203
345
  /**
204
- * Update the metadata of a service instance.
346
+ * Delete a service instance.
205
347
  * @param resourceGroupName The name of the resource group that contains the service instance.
206
348
  * @param resourceName The name of the service instance.
207
- * @param servicePatchDescription The service instance metadata and security metadata.
208
- * @param [options] The optional parameters
209
- * @returns Promise<msRestAzure.LROPoller>
349
+ * @param options The options parameters.
210
350
  */
211
- beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: Models.ServicesPatchDescription, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
212
- return this.client.sendLRORequest(
213
- {
214
- resourceGroupName,
215
- resourceName,
216
- servicePatchDescription,
217
- options
218
- },
219
- beginUpdateOperationSpec,
220
- options);
351
+ async beginDelete(
352
+ resourceGroupName: string,
353
+ resourceName: string,
354
+ options?: ServicesDeleteOptionalParams
355
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
356
+ const directSendOperation = async (
357
+ args: coreClient.OperationArguments,
358
+ spec: coreClient.OperationSpec
359
+ ): Promise<void> => {
360
+ return this.client.sendOperationRequest(args, spec);
361
+ };
362
+ const sendOperation = async (
363
+ args: coreClient.OperationArguments,
364
+ spec: coreClient.OperationSpec
365
+ ) => {
366
+ let currentRawResponse:
367
+ | coreClient.FullOperationResponse
368
+ | undefined = undefined;
369
+ const providedCallback = args.options?.onResponse;
370
+ const callback: coreClient.RawResponseCallback = (
371
+ rawResponse: coreClient.FullOperationResponse,
372
+ flatResponse: unknown
373
+ ) => {
374
+ currentRawResponse = rawResponse;
375
+ providedCallback?.(rawResponse, flatResponse);
376
+ };
377
+ const updatedArgs = {
378
+ ...args,
379
+ options: {
380
+ ...args.options,
381
+ onResponse: callback
382
+ }
383
+ };
384
+ const flatResponse = await directSendOperation(updatedArgs, spec);
385
+ return {
386
+ flatResponse,
387
+ rawResponse: {
388
+ statusCode: currentRawResponse!.status,
389
+ body: currentRawResponse!.parsedBody,
390
+ headers: currentRawResponse!.headers.toJSON()
391
+ }
392
+ };
393
+ };
394
+
395
+ const lro = new LroImpl(
396
+ sendOperation,
397
+ { resourceGroupName, resourceName, options },
398
+ deleteOperationSpec
399
+ );
400
+ return new LroEngine(lro, {
401
+ resumeFrom: options?.resumeFrom,
402
+ intervalInMs: options?.updateIntervalInMs
403
+ });
221
404
  }
222
405
 
223
406
  /**
224
407
  * Delete a service instance.
225
408
  * @param resourceGroupName The name of the resource group that contains the service instance.
226
409
  * @param resourceName The name of the service instance.
227
- * @param [options] The optional parameters
228
- * @returns Promise<msRestAzure.LROPoller>
410
+ * @param options The options parameters.
229
411
  */
230
- beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
231
- return this.client.sendLRORequest(
232
- {
233
- resourceGroupName,
234
- resourceName,
235
- options
236
- },
237
- beginDeleteMethodOperationSpec,
238
- options);
412
+ async beginDeleteAndWait(
413
+ resourceGroupName: string,
414
+ resourceName: string,
415
+ options?: ServicesDeleteOptionalParams
416
+ ): Promise<void> {
417
+ const poller = await this.beginDelete(
418
+ resourceGroupName,
419
+ resourceName,
420
+ options
421
+ );
422
+ return poller.pollUntilDone();
239
423
  }
240
424
 
241
425
  /**
242
426
  * Get all the service instances in a subscription.
243
- * @param nextPageLink The NextLink from the previous successful call to List operation.
244
- * @param [options] The optional parameters
245
- * @returns Promise<Models.ServicesListNextResponse>
246
- */
247
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListNextResponse>;
248
- /**
249
- * @param nextPageLink The NextLink from the previous successful call to List operation.
250
- * @param callback The callback
427
+ * @param options The options parameters.
251
428
  */
252
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
429
+ private _list(
430
+ options?: ServicesListOptionalParams
431
+ ): Promise<ServicesListResponse> {
432
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
433
+ }
434
+
253
435
  /**
254
- * @param nextPageLink The NextLink from the previous successful call to List operation.
255
- * @param options The optional parameters
256
- * @param callback The callback
436
+ * Get all the service instances in a resource group.
437
+ * @param resourceGroupName The name of the resource group that contains the service instance.
438
+ * @param options The options parameters.
257
439
  */
258
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
259
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesDescriptionListResult>, callback?: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): Promise<Models.ServicesListNextResponse> {
440
+ private _listByResourceGroup(
441
+ resourceGroupName: string,
442
+ options?: ServicesListByResourceGroupOptionalParams
443
+ ): Promise<ServicesListByResourceGroupResponse> {
260
444
  return this.client.sendOperationRequest(
261
- {
262
- nextPageLink,
263
- options
264
- },
265
- listNextOperationSpec,
266
- callback) as Promise<Models.ServicesListNextResponse>;
445
+ { resourceGroupName, options },
446
+ listByResourceGroupOperationSpec
447
+ );
267
448
  }
268
449
 
269
450
  /**
270
- * Get all the service instances in a resource group.
271
- * @param nextPageLink The NextLink from the previous successful call to List operation.
272
- * @param [options] The optional parameters
273
- * @returns Promise<Models.ServicesListByResourceGroupNextResponse>
451
+ * Check if a service instance name is available.
452
+ * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters
453
+ * structure to the name of the service instance to check.
454
+ * @param options The options parameters.
274
455
  */
275
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupNextResponse>;
456
+ checkNameAvailability(
457
+ checkNameAvailabilityInputs: CheckNameAvailabilityParameters,
458
+ options?: ServicesCheckNameAvailabilityOptionalParams
459
+ ): Promise<ServicesCheckNameAvailabilityResponse> {
460
+ return this.client.sendOperationRequest(
461
+ { checkNameAvailabilityInputs, options },
462
+ checkNameAvailabilityOperationSpec
463
+ );
464
+ }
465
+
276
466
  /**
277
- * @param nextPageLink The NextLink from the previous successful call to List operation.
278
- * @param callback The callback
467
+ * ListNext
468
+ * @param nextLink The nextLink from the previous successful call to the List method.
469
+ * @param options The options parameters.
279
470
  */
280
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
471
+ private _listNext(
472
+ nextLink: string,
473
+ options?: ServicesListNextOptionalParams
474
+ ): Promise<ServicesListNextResponse> {
475
+ return this.client.sendOperationRequest(
476
+ { nextLink, options },
477
+ listNextOperationSpec
478
+ );
479
+ }
480
+
281
481
  /**
282
- * @param nextPageLink The NextLink from the previous successful call to List operation.
283
- * @param options The optional parameters
284
- * @param callback The callback
482
+ * ListByResourceGroupNext
483
+ * @param resourceGroupName The name of the resource group that contains the service instance.
484
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
485
+ * @param options The options parameters.
285
486
  */
286
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): void;
287
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServicesDescriptionListResult>, callback?: msRest.ServiceCallback<Models.ServicesDescriptionListResult>): Promise<Models.ServicesListByResourceGroupNextResponse> {
487
+ private _listByResourceGroupNext(
488
+ resourceGroupName: string,
489
+ nextLink: string,
490
+ options?: ServicesListByResourceGroupNextOptionalParams
491
+ ): Promise<ServicesListByResourceGroupNextResponse> {
288
492
  return this.client.sendOperationRequest(
289
- {
290
- nextPageLink,
291
- options
292
- },
293
- listByResourceGroupNextOperationSpec,
294
- callback) as Promise<Models.ServicesListByResourceGroupNextResponse>;
493
+ { resourceGroupName, nextLink, options },
494
+ listByResourceGroupNextOperationSpec
495
+ );
295
496
  }
296
497
  }
297
-
298
498
  // Operation Specifications
299
- const serializer = new msRest.Serializer(Mappers);
300
- const getOperationSpec: msRest.OperationSpec = {
499
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
500
+
501
+ const getOperationSpec: coreClient.OperationSpec = {
502
+ path:
503
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
301
504
  httpMethod: "GET",
302
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
303
- urlParameters: [
304
- Parameters.subscriptionId,
305
- Parameters.resourceGroupName,
306
- Parameters.resourceName
307
- ],
308
- queryParameters: [
309
- Parameters.apiVersion
310
- ],
311
- headerParameters: [
312
- Parameters.acceptLanguage
313
- ],
314
505
  responses: {
315
506
  200: {
316
507
  bodyMapper: Mappers.ServicesDescription
@@ -319,187 +510,165 @@ const getOperationSpec: msRest.OperationSpec = {
319
510
  bodyMapper: Mappers.ErrorDetails
320
511
  }
321
512
  },
322
- serializer
323
- };
324
-
325
- const listOperationSpec: msRest.OperationSpec = {
326
- httpMethod: "GET",
327
- path: "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services",
513
+ queryParameters: [Parameters.apiVersion],
328
514
  urlParameters: [
329
- Parameters.subscriptionId
330
- ],
331
- queryParameters: [
332
- Parameters.apiVersion
333
- ],
334
- headerParameters: [
335
- Parameters.acceptLanguage
515
+ Parameters.$host,
516
+ Parameters.subscriptionId,
517
+ Parameters.resourceGroupName,
518
+ Parameters.resourceName
336
519
  ],
520
+ headerParameters: [Parameters.accept],
521
+ serializer
522
+ };
523
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
524
+ path:
525
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
526
+ httpMethod: "PUT",
337
527
  responses: {
338
528
  200: {
339
- bodyMapper: Mappers.ServicesDescriptionListResult
529
+ bodyMapper: Mappers.ServicesDescription
530
+ },
531
+ 201: {
532
+ bodyMapper: Mappers.ServicesDescription
533
+ },
534
+ 202: {
535
+ bodyMapper: Mappers.ServicesDescription
536
+ },
537
+ 204: {
538
+ bodyMapper: Mappers.ServicesDescription
340
539
  },
341
540
  default: {
342
541
  bodyMapper: Mappers.ErrorDetails
343
542
  }
344
543
  },
345
- serializer
346
- };
347
-
348
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
349
- httpMethod: "GET",
350
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services",
544
+ requestBody: Parameters.serviceDescription,
545
+ queryParameters: [Parameters.apiVersion],
351
546
  urlParameters: [
547
+ Parameters.$host,
352
548
  Parameters.subscriptionId,
353
- Parameters.resourceGroupName
354
- ],
355
- queryParameters: [
356
- Parameters.apiVersion
357
- ],
358
- headerParameters: [
359
- Parameters.acceptLanguage
549
+ Parameters.resourceGroupName,
550
+ Parameters.resourceName
360
551
  ],
552
+ headerParameters: [Parameters.accept, Parameters.contentType],
553
+ mediaType: "json",
554
+ serializer
555
+ };
556
+ const updateOperationSpec: coreClient.OperationSpec = {
557
+ path:
558
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
559
+ httpMethod: "PATCH",
361
560
  responses: {
362
561
  200: {
363
- bodyMapper: Mappers.ServicesDescriptionListResult
562
+ bodyMapper: Mappers.ServicesDescription
563
+ },
564
+ 201: {
565
+ bodyMapper: Mappers.ServicesDescription
566
+ },
567
+ 202: {
568
+ bodyMapper: Mappers.ServicesDescription
569
+ },
570
+ 204: {
571
+ bodyMapper: Mappers.ServicesDescription
364
572
  },
365
573
  default: {
366
574
  bodyMapper: Mappers.ErrorDetails
367
575
  }
368
576
  },
369
- serializer
370
- };
371
-
372
- const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
373
- httpMethod: "POST",
374
- path: "subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability",
577
+ requestBody: Parameters.servicePatchDescription,
578
+ queryParameters: [Parameters.apiVersion],
375
579
  urlParameters: [
376
- Parameters.subscriptionId
377
- ],
378
- queryParameters: [
379
- Parameters.apiVersion
380
- ],
381
- headerParameters: [
382
- Parameters.acceptLanguage
580
+ Parameters.$host,
581
+ Parameters.subscriptionId,
582
+ Parameters.resourceGroupName,
583
+ Parameters.resourceName
383
584
  ],
384
- requestBody: {
385
- parameterPath: "checkNameAvailabilityInputs",
386
- mapper: {
387
- ...Mappers.CheckNameAvailabilityParameters,
388
- required: true
389
- }
390
- },
585
+ headerParameters: [Parameters.accept, Parameters.contentType],
586
+ mediaType: "json",
587
+ serializer
588
+ };
589
+ const deleteOperationSpec: coreClient.OperationSpec = {
590
+ path:
591
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
592
+ httpMethod: "DELETE",
391
593
  responses: {
392
- 200: {
393
- bodyMapper: Mappers.ServicesNameAvailabilityInfo
394
- },
594
+ 200: {},
595
+ 201: {},
596
+ 202: {},
597
+ 204: {},
395
598
  default: {
396
599
  bodyMapper: Mappers.ErrorDetails
397
600
  }
398
601
  },
399
- serializer
400
- };
401
-
402
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
403
- httpMethod: "PUT",
404
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
602
+ queryParameters: [Parameters.apiVersion],
405
603
  urlParameters: [
604
+ Parameters.$host,
406
605
  Parameters.subscriptionId,
407
606
  Parameters.resourceGroupName,
408
607
  Parameters.resourceName
409
608
  ],
410
- queryParameters: [
411
- Parameters.apiVersion
412
- ],
413
- headerParameters: [
414
- Parameters.acceptLanguage
415
- ],
416
- requestBody: {
417
- parameterPath: "serviceDescription",
418
- mapper: {
419
- ...Mappers.ServicesDescription,
420
- required: true
421
- }
422
- },
609
+ headerParameters: [Parameters.accept],
610
+ serializer
611
+ };
612
+ const listOperationSpec: coreClient.OperationSpec = {
613
+ path:
614
+ "/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services",
615
+ httpMethod: "GET",
423
616
  responses: {
424
617
  200: {
425
- bodyMapper: Mappers.ServicesDescription
426
- },
427
- 201: {
428
- bodyMapper: Mappers.ServicesDescription
618
+ bodyMapper: Mappers.ServicesDescriptionListResult
429
619
  },
430
620
  default: {
431
621
  bodyMapper: Mappers.ErrorDetails
432
622
  }
433
623
  },
624
+ queryParameters: [Parameters.apiVersion],
625
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
626
+ headerParameters: [Parameters.accept],
434
627
  serializer
435
628
  };
436
-
437
- const beginUpdateOperationSpec: msRest.OperationSpec = {
438
- httpMethod: "PATCH",
439
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
440
- urlParameters: [
441
- Parameters.subscriptionId,
442
- Parameters.resourceGroupName,
443
- Parameters.resourceName
444
- ],
445
- queryParameters: [
446
- Parameters.apiVersion
447
- ],
448
- headerParameters: [
449
- Parameters.acceptLanguage
450
- ],
451
- requestBody: {
452
- parameterPath: "servicePatchDescription",
453
- mapper: {
454
- ...Mappers.ServicesPatchDescription,
455
- required: true
456
- }
457
- },
629
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
630
+ path:
631
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services",
632
+ httpMethod: "GET",
458
633
  responses: {
459
634
  200: {
460
- bodyMapper: Mappers.ServicesDescription
635
+ bodyMapper: Mappers.ServicesDescriptionListResult
461
636
  },
462
637
  default: {
463
638
  bodyMapper: Mappers.ErrorDetails
464
639
  }
465
640
  },
466
- serializer
467
- };
468
-
469
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
470
- httpMethod: "DELETE",
471
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}",
641
+ queryParameters: [Parameters.apiVersion],
472
642
  urlParameters: [
643
+ Parameters.$host,
473
644
  Parameters.subscriptionId,
474
- Parameters.resourceGroupName,
475
- Parameters.resourceName
476
- ],
477
- queryParameters: [
478
- Parameters.apiVersion
479
- ],
480
- headerParameters: [
481
- Parameters.acceptLanguage
645
+ Parameters.resourceGroupName
482
646
  ],
647
+ headerParameters: [Parameters.accept],
648
+ serializer
649
+ };
650
+ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
651
+ path:
652
+ "/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability",
653
+ httpMethod: "POST",
483
654
  responses: {
484
- 202: {},
485
- 204: {},
655
+ 200: {
656
+ bodyMapper: Mappers.ServicesNameAvailabilityInfo
657
+ },
486
658
  default: {
487
659
  bodyMapper: Mappers.ErrorDetails
488
660
  }
489
661
  },
662
+ requestBody: Parameters.checkNameAvailabilityInputs,
663
+ queryParameters: [Parameters.apiVersion],
664
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
665
+ headerParameters: [Parameters.accept, Parameters.contentType],
666
+ mediaType: "json",
490
667
  serializer
491
668
  };
492
-
493
- const listNextOperationSpec: msRest.OperationSpec = {
494
- httpMethod: "GET",
495
- baseUrl: "https://management.azure.com",
669
+ const listNextOperationSpec: coreClient.OperationSpec = {
496
670
  path: "{nextLink}",
497
- urlParameters: [
498
- Parameters.nextPageLink
499
- ],
500
- headerParameters: [
501
- Parameters.acceptLanguage
502
- ],
671
+ httpMethod: "GET",
503
672
  responses: {
504
673
  200: {
505
674
  bodyMapper: Mappers.ServicesDescriptionListResult
@@ -508,19 +677,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
508
677
  bodyMapper: Mappers.ErrorDetails
509
678
  }
510
679
  },
680
+ queryParameters: [Parameters.apiVersion],
681
+ urlParameters: [
682
+ Parameters.$host,
683
+ Parameters.subscriptionId,
684
+ Parameters.nextLink
685
+ ],
686
+ headerParameters: [Parameters.accept],
511
687
  serializer
512
688
  };
513
-
514
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
515
- httpMethod: "GET",
516
- baseUrl: "https://management.azure.com",
689
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
517
690
  path: "{nextLink}",
518
- urlParameters: [
519
- Parameters.nextPageLink
520
- ],
521
- headerParameters: [
522
- Parameters.acceptLanguage
523
- ],
691
+ httpMethod: "GET",
524
692
  responses: {
525
693
  200: {
526
694
  bodyMapper: Mappers.ServicesDescriptionListResult
@@ -529,5 +697,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
529
697
  bodyMapper: Mappers.ErrorDetails
530
698
  }
531
699
  },
700
+ queryParameters: [Parameters.apiVersion],
701
+ urlParameters: [
702
+ Parameters.$host,
703
+ Parameters.subscriptionId,
704
+ Parameters.resourceGroupName,
705
+ Parameters.nextLink
706
+ ],
707
+ headerParameters: [Parameters.accept],
532
708
  serializer
533
709
  };