@azure/arm-healthcareapis 1.0.0 → 2.0.0-alpha.20220131.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 +72 -77
  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 +82 -22
  149. package/review/arm-healthcareapis.api.md +535 -0
  150. package/rollup.config.js +181 -30
  151. package/src/healthcareApisManagementClient.ts +82 -37
  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 -2090
  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 -22
  177. package/esm/healthcareApisManagementClient.d.ts.map +0 -1
  178. package/esm/healthcareApisManagementClient.js +0 -37
  179. package/esm/healthcareApisManagementClient.js.map +0 -1
  180. package/esm/healthcareApisManagementClientContext.d.ts +0 -16
  181. package/esm/healthcareApisManagementClientContext.d.ts.map +0 -1
  182. package/esm/healthcareApisManagementClientContext.js +0 -56
  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 -62
  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,29 +1,42 @@
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/privateEndpointConnectionsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateEndpointConnections } 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
+ PrivateEndpointConnectionDescription,
19
+ PrivateEndpointConnectionsListByServiceOptionalParams,
20
+ PrivateEndpointConnectionsListByServiceResponse,
21
+ PrivateEndpointConnectionsGetOptionalParams,
22
+ PrivateEndpointConnectionsGetResponse,
23
+ PrivateEndpointConnection,
24
+ PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
25
+ PrivateEndpointConnectionsCreateOrUpdateResponse,
26
+ PrivateEndpointConnectionsDeleteOptionalParams
27
+ } from "../models";
17
28
 
18
- /** Class representing a PrivateEndpointConnections. */
19
- export class PrivateEndpointConnections {
20
- private readonly client: HealthcareApisManagementClientContext;
29
+ /// <reference lib="esnext.asynciterable" />
30
+ /** Class containing PrivateEndpointConnections operations. */
31
+ export class PrivateEndpointConnectionsImpl
32
+ implements PrivateEndpointConnections {
33
+ private readonly client: HealthcareApisManagementClient;
21
34
 
22
35
  /**
23
- * Create a PrivateEndpointConnections.
24
- * @param {HealthcareApisManagementClientContext} client Reference to the service client.
36
+ * Initialize a new instance of the class PrivateEndpointConnections class.
37
+ * @param client Reference to the service client
25
38
  */
26
- constructor(client: HealthcareApisManagementClientContext) {
39
+ constructor(client: HealthcareApisManagementClient) {
27
40
  this.client = client;
28
41
  }
29
42
 
@@ -31,255 +44,402 @@ export class PrivateEndpointConnections {
31
44
  * Lists all private endpoint connections for a service.
32
45
  * @param resourceGroupName The name of the resource group that contains the service instance.
33
46
  * @param resourceName The name of the service instance.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.PrivateEndpointConnectionsListByServiceResponse>
47
+ * @param options The options parameters.
36
48
  */
37
- listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListByServiceResponse>;
49
+ public listByService(
50
+ resourceGroupName: string,
51
+ resourceName: string,
52
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
53
+ ): PagedAsyncIterableIterator<PrivateEndpointConnectionDescription> {
54
+ const iter = this.listByServicePagingAll(
55
+ resourceGroupName,
56
+ resourceName,
57
+ options
58
+ );
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: () => {
67
+ return this.listByServicePagingPage(
68
+ resourceGroupName,
69
+ resourceName,
70
+ options
71
+ );
72
+ }
73
+ };
74
+ }
75
+
76
+ private async *listByServicePagingPage(
77
+ resourceGroupName: string,
78
+ resourceName: string,
79
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
80
+ ): AsyncIterableIterator<PrivateEndpointConnectionDescription[]> {
81
+ let result = await this._listByService(
82
+ resourceGroupName,
83
+ resourceName,
84
+ options
85
+ );
86
+ yield result.value || [];
87
+ }
88
+
89
+ private async *listByServicePagingAll(
90
+ resourceGroupName: string,
91
+ resourceName: string,
92
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
93
+ ): AsyncIterableIterator<PrivateEndpointConnectionDescription> {
94
+ for await (const page of this.listByServicePagingPage(
95
+ resourceGroupName,
96
+ resourceName,
97
+ options
98
+ )) {
99
+ yield* page;
100
+ }
101
+ }
102
+
38
103
  /**
104
+ * Lists all private endpoint connections for a service.
39
105
  * @param resourceGroupName The name of the resource group that contains the service instance.
40
106
  * @param resourceName The name of the service instance.
41
- * @param callback The callback
107
+ * @param options The options parameters.
42
108
  */
43
- listByService(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
109
+ private _listByService(
110
+ resourceGroupName: string,
111
+ resourceName: string,
112
+ options?: PrivateEndpointConnectionsListByServiceOptionalParams
113
+ ): Promise<PrivateEndpointConnectionsListByServiceResponse> {
114
+ return this.client.sendOperationRequest(
115
+ { resourceGroupName, resourceName, options },
116
+ listByServiceOperationSpec
117
+ );
118
+ }
119
+
44
120
  /**
121
+ * Gets the specified private endpoint connection associated with the service.
45
122
  * @param resourceGroupName The name of the resource group that contains the service instance.
46
123
  * @param resourceName The name of the service instance.
47
- * @param options The optional parameters
48
- * @param callback The callback
124
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
125
+ * Azure resource
126
+ * @param options The options parameters.
49
127
  */
50
- listByService(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): void;
51
- listByService(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionListResult>): Promise<Models.PrivateEndpointConnectionsListByServiceResponse> {
128
+ get(
129
+ resourceGroupName: string,
130
+ resourceName: string,
131
+ privateEndpointConnectionName: string,
132
+ options?: PrivateEndpointConnectionsGetOptionalParams
133
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
52
134
  return this.client.sendOperationRequest(
53
135
  {
54
136
  resourceGroupName,
55
137
  resourceName,
138
+ privateEndpointConnectionName,
56
139
  options
57
140
  },
58
- listByServiceOperationSpec,
59
- callback) as Promise<Models.PrivateEndpointConnectionsListByServiceResponse>;
141
+ getOperationSpec
142
+ );
60
143
  }
61
144
 
62
145
  /**
63
- * Gets the specified private endpoint connection associated with the service.
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 privateEndpointConnectionName The name of the private endpoint connection associated with
67
- * the Azure resource
68
- * @param [options] The optional parameters
69
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
70
- */
71
- get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
72
- /**
73
- * @param resourceGroupName The name of the resource group that contains the service instance.
74
- * @param resourceName The name of the service instance.
75
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
76
- * the Azure resource
77
- * @param callback The callback
78
- */
79
- get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
80
- /**
146
+ * Update the state of the specified private endpoint connection associated with the service.
81
147
  * @param resourceGroupName The name of the resource group that contains the service instance.
82
148
  * @param resourceName The name of the service instance.
83
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
84
- * the Azure resource
85
- * @param options The optional parameters
86
- * @param callback The callback
149
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
150
+ * Azure resource
151
+ * @param properties The private endpoint connection properties.
152
+ * @param options The options parameters.
87
153
  */
88
- get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
89
- get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
90
- return this.client.sendOperationRequest(
154
+ async beginCreateOrUpdate(
155
+ resourceGroupName: string,
156
+ resourceName: string,
157
+ privateEndpointConnectionName: string,
158
+ properties: PrivateEndpointConnection,
159
+ options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
160
+ ): Promise<
161
+ PollerLike<
162
+ PollOperationState<PrivateEndpointConnectionsCreateOrUpdateResponse>,
163
+ PrivateEndpointConnectionsCreateOrUpdateResponse
164
+ >
165
+ > {
166
+ const directSendOperation = async (
167
+ args: coreClient.OperationArguments,
168
+ spec: coreClient.OperationSpec
169
+ ): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> => {
170
+ return this.client.sendOperationRequest(args, spec);
171
+ };
172
+ const sendOperation = async (
173
+ args: coreClient.OperationArguments,
174
+ spec: coreClient.OperationSpec
175
+ ) => {
176
+ let currentRawResponse:
177
+ | coreClient.FullOperationResponse
178
+ | undefined = undefined;
179
+ const providedCallback = args.options?.onResponse;
180
+ const callback: coreClient.RawResponseCallback = (
181
+ rawResponse: coreClient.FullOperationResponse,
182
+ flatResponse: unknown
183
+ ) => {
184
+ currentRawResponse = rawResponse;
185
+ providedCallback?.(rawResponse, flatResponse);
186
+ };
187
+ const updatedArgs = {
188
+ ...args,
189
+ options: {
190
+ ...args.options,
191
+ onResponse: callback
192
+ }
193
+ };
194
+ const flatResponse = await directSendOperation(updatedArgs, spec);
195
+ return {
196
+ flatResponse,
197
+ rawResponse: {
198
+ statusCode: currentRawResponse!.status,
199
+ body: currentRawResponse!.parsedBody,
200
+ headers: currentRawResponse!.headers.toJSON()
201
+ }
202
+ };
203
+ };
204
+
205
+ const lro = new LroImpl(
206
+ sendOperation,
91
207
  {
92
208
  resourceGroupName,
93
209
  resourceName,
94
210
  privateEndpointConnectionName,
211
+ properties,
95
212
  options
96
213
  },
97
- getOperationSpec,
98
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
214
+ createOrUpdateOperationSpec
215
+ );
216
+ return new LroEngine(lro, {
217
+ resumeFrom: options?.resumeFrom,
218
+ intervalInMs: options?.updateIntervalInMs
219
+ });
99
220
  }
100
221
 
101
222
  /**
102
223
  * Update the state of the specified private endpoint connection associated with the service.
103
224
  * @param resourceGroupName The name of the resource group that contains the service instance.
104
225
  * @param resourceName The name of the service instance.
105
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
106
- * the Azure resource
226
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
227
+ * Azure resource
107
228
  * @param properties The private endpoint connection properties.
108
- * @param [options] The optional parameters
109
- * @returns Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>
229
+ * @param options The options parameters.
110
230
  */
111
- createOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse> {
112
- return this.beginCreateOrUpdate(resourceGroupName,resourceName,privateEndpointConnectionName,properties,options)
113
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>;
231
+ async beginCreateOrUpdateAndWait(
232
+ resourceGroupName: string,
233
+ resourceName: string,
234
+ privateEndpointConnectionName: string,
235
+ properties: PrivateEndpointConnection,
236
+ options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
237
+ ): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> {
238
+ const poller = await this.beginCreateOrUpdate(
239
+ resourceGroupName,
240
+ resourceName,
241
+ privateEndpointConnectionName,
242
+ properties,
243
+ options
244
+ );
245
+ return poller.pollUntilDone();
114
246
  }
115
247
 
116
248
  /**
117
249
  * Deletes a private endpoint connection.
118
250
  * @param resourceGroupName The name of the resource group that contains the service instance.
119
251
  * @param resourceName The name of the service instance.
120
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
121
- * the Azure resource
122
- * @param [options] The optional parameters
123
- * @returns Promise<msRest.RestResponse>
252
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
253
+ * Azure resource
254
+ * @param options The options parameters.
124
255
  */
125
- deleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
126
- return this.beginDeleteMethod(resourceGroupName,resourceName,privateEndpointConnectionName,options)
127
- .then(lroPoller => lroPoller.pollUntilFinished());
128
- }
256
+ async beginDelete(
257
+ resourceGroupName: string,
258
+ resourceName: string,
259
+ privateEndpointConnectionName: string,
260
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
261
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
262
+ const directSendOperation = async (
263
+ args: coreClient.OperationArguments,
264
+ spec: coreClient.OperationSpec
265
+ ): Promise<void> => {
266
+ return this.client.sendOperationRequest(args, spec);
267
+ };
268
+ const sendOperation = async (
269
+ args: coreClient.OperationArguments,
270
+ spec: coreClient.OperationSpec
271
+ ) => {
272
+ let currentRawResponse:
273
+ | coreClient.FullOperationResponse
274
+ | undefined = undefined;
275
+ const providedCallback = args.options?.onResponse;
276
+ const callback: coreClient.RawResponseCallback = (
277
+ rawResponse: coreClient.FullOperationResponse,
278
+ flatResponse: unknown
279
+ ) => {
280
+ currentRawResponse = rawResponse;
281
+ providedCallback?.(rawResponse, flatResponse);
282
+ };
283
+ const updatedArgs = {
284
+ ...args,
285
+ options: {
286
+ ...args.options,
287
+ onResponse: callback
288
+ }
289
+ };
290
+ const flatResponse = await directSendOperation(updatedArgs, spec);
291
+ return {
292
+ flatResponse,
293
+ rawResponse: {
294
+ statusCode: currentRawResponse!.status,
295
+ body: currentRawResponse!.parsedBody,
296
+ headers: currentRawResponse!.headers.toJSON()
297
+ }
298
+ };
299
+ };
129
300
 
130
- /**
131
- * Update the state of the specified private endpoint connection associated with the service.
132
- * @param resourceGroupName The name of the resource group that contains the service instance.
133
- * @param resourceName The name of the service instance.
134
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
135
- * the Azure resource
136
- * @param properties The private endpoint connection properties.
137
- * @param [options] The optional parameters
138
- * @returns Promise<msRestAzure.LROPoller>
139
- */
140
- beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
141
- return this.client.sendLRORequest(
301
+ const lro = new LroImpl(
302
+ sendOperation,
142
303
  {
143
304
  resourceGroupName,
144
305
  resourceName,
145
306
  privateEndpointConnectionName,
146
- properties,
147
307
  options
148
308
  },
149
- beginCreateOrUpdateOperationSpec,
150
- options);
309
+ deleteOperationSpec
310
+ );
311
+ return new LroEngine(lro, {
312
+ resumeFrom: options?.resumeFrom,
313
+ intervalInMs: options?.updateIntervalInMs
314
+ });
151
315
  }
152
316
 
153
317
  /**
154
318
  * Deletes a private endpoint connection.
155
319
  * @param resourceGroupName The name of the resource group that contains the service instance.
156
320
  * @param resourceName The name of the service instance.
157
- * @param privateEndpointConnectionName The name of the private endpoint connection associated with
158
- * the Azure resource
159
- * @param [options] The optional parameters
160
- * @returns Promise<msRestAzure.LROPoller>
321
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
322
+ * Azure resource
323
+ * @param options The options parameters.
161
324
  */
162
- beginDeleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
163
- return this.client.sendLRORequest(
164
- {
165
- resourceGroupName,
166
- resourceName,
167
- privateEndpointConnectionName,
168
- options
169
- },
170
- beginDeleteMethodOperationSpec,
171
- options);
325
+ async beginDeleteAndWait(
326
+ resourceGroupName: string,
327
+ resourceName: string,
328
+ privateEndpointConnectionName: string,
329
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
330
+ ): Promise<void> {
331
+ const poller = await this.beginDelete(
332
+ resourceGroupName,
333
+ resourceName,
334
+ privateEndpointConnectionName,
335
+ options
336
+ );
337
+ return poller.pollUntilDone();
172
338
  }
173
339
  }
174
-
175
340
  // Operation Specifications
176
- const serializer = new msRest.Serializer(Mappers);
177
- const listByServiceOperationSpec: msRest.OperationSpec = {
341
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
342
+
343
+ const listByServiceOperationSpec: coreClient.OperationSpec = {
344
+ path:
345
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections",
178
346
  httpMethod: "GET",
179
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections",
180
- urlParameters: [
181
- Parameters.subscriptionId,
182
- Parameters.resourceGroupName,
183
- Parameters.resourceName
184
- ],
185
- queryParameters: [
186
- Parameters.apiVersion
187
- ],
188
- headerParameters: [
189
- Parameters.acceptLanguage
190
- ],
191
347
  responses: {
192
348
  200: {
193
- bodyMapper: Mappers.PrivateEndpointConnectionListResult
349
+ bodyMapper: Mappers.PrivateEndpointConnectionListResultDescription
194
350
  },
195
351
  default: {
196
352
  bodyMapper: Mappers.ErrorDetails
197
353
  }
198
354
  },
199
- serializer
200
- };
201
-
202
- const getOperationSpec: msRest.OperationSpec = {
203
- httpMethod: "GET",
204
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
355
+ queryParameters: [Parameters.apiVersion],
205
356
  urlParameters: [
357
+ Parameters.$host,
206
358
  Parameters.subscriptionId,
207
359
  Parameters.resourceGroupName,
208
- Parameters.resourceName,
209
- Parameters.privateEndpointConnectionName
210
- ],
211
- queryParameters: [
212
- Parameters.apiVersion
213
- ],
214
- headerParameters: [
215
- Parameters.acceptLanguage
360
+ Parameters.resourceName
216
361
  ],
362
+ headerParameters: [Parameters.accept],
363
+ serializer
364
+ };
365
+ const getOperationSpec: coreClient.OperationSpec = {
366
+ path:
367
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
368
+ httpMethod: "GET",
217
369
  responses: {
218
370
  200: {
219
- bodyMapper: Mappers.PrivateEndpointConnection
371
+ bodyMapper: Mappers.PrivateEndpointConnectionDescription
220
372
  },
221
373
  default: {
222
374
  bodyMapper: Mappers.ErrorDetails
223
375
  }
224
376
  },
225
- serializer
226
- };
227
-
228
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
229
- httpMethod: "PUT",
230
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
377
+ queryParameters: [Parameters.apiVersion],
231
378
  urlParameters: [
379
+ Parameters.$host,
232
380
  Parameters.subscriptionId,
233
381
  Parameters.resourceGroupName,
234
382
  Parameters.resourceName,
235
383
  Parameters.privateEndpointConnectionName
236
384
  ],
237
- queryParameters: [
238
- Parameters.apiVersion
239
- ],
240
- headerParameters: [
241
- Parameters.acceptLanguage
242
- ],
243
- requestBody: {
244
- parameterPath: "properties",
245
- mapper: {
246
- ...Mappers.PrivateEndpointConnection,
247
- required: true
248
- }
249
- },
385
+ headerParameters: [Parameters.accept],
386
+ serializer
387
+ };
388
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
389
+ path:
390
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
391
+ httpMethod: "PUT",
250
392
  responses: {
251
393
  200: {
252
- bodyMapper: Mappers.PrivateEndpointConnection
394
+ bodyMapper: Mappers.PrivateEndpointConnectionDescription
395
+ },
396
+ 201: {
397
+ bodyMapper: Mappers.PrivateEndpointConnectionDescription
398
+ },
399
+ 202: {
400
+ bodyMapper: Mappers.PrivateEndpointConnectionDescription
401
+ },
402
+ 204: {
403
+ bodyMapper: Mappers.PrivateEndpointConnectionDescription
253
404
  },
254
405
  default: {
255
406
  bodyMapper: Mappers.ErrorDetails
256
407
  }
257
408
  },
258
- serializer
259
- };
260
-
261
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
262
- httpMethod: "DELETE",
263
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
409
+ requestBody: Parameters.properties,
410
+ queryParameters: [Parameters.apiVersion],
264
411
  urlParameters: [
412
+ Parameters.$host,
265
413
  Parameters.subscriptionId,
266
414
  Parameters.resourceGroupName,
267
415
  Parameters.resourceName,
268
416
  Parameters.privateEndpointConnectionName
269
417
  ],
270
- queryParameters: [
271
- Parameters.apiVersion
272
- ],
273
- headerParameters: [
274
- Parameters.acceptLanguage
275
- ],
418
+ headerParameters: [Parameters.accept, Parameters.contentType],
419
+ mediaType: "json",
420
+ serializer
421
+ };
422
+ const deleteOperationSpec: coreClient.OperationSpec = {
423
+ path:
424
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
425
+ httpMethod: "DELETE",
276
426
  responses: {
277
427
  200: {},
428
+ 201: {},
278
429
  202: {},
279
430
  204: {},
280
431
  default: {
281
432
  bodyMapper: Mappers.ErrorDetails
282
433
  }
283
434
  },
435
+ queryParameters: [Parameters.apiVersion],
436
+ urlParameters: [
437
+ Parameters.$host,
438
+ Parameters.subscriptionId,
439
+ Parameters.resourceGroupName,
440
+ Parameters.resourceName,
441
+ Parameters.privateEndpointConnectionName
442
+ ],
443
+ headerParameters: [Parameters.accept],
284
444
  serializer
285
445
  };