@azure/arm-streamanalytics 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -84
  4. package/dist/index.js +6818 -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/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1940 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +132 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +155 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +1412 -2137
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +34 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +260 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/clusters.d.ts +137 -0
  29. package/dist-esm/src/operations/clusters.d.ts.map +1 -0
  30. package/dist-esm/src/operations/clusters.js +627 -0
  31. package/dist-esm/src/operations/clusters.js.map +1 -0
  32. package/dist-esm/src/operations/functions.d.ts +107 -0
  33. package/dist-esm/src/operations/functions.d.ts.map +1 -0
  34. package/dist-esm/src/operations/functions.js +416 -0
  35. package/dist-esm/src/operations/functions.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +4 -4
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +5 -6
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/inputs.d.ts +94 -0
  41. package/dist-esm/src/operations/inputs.d.ts.map +1 -0
  42. package/dist-esm/src/operations/inputs.js +377 -0
  43. package/dist-esm/src/operations/inputs.js.map +1 -0
  44. package/dist-esm/src/operations/operations.d.ts +32 -0
  45. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/operations.js +120 -0
  47. package/dist-esm/src/operations/operations.js.map +1 -0
  48. package/dist-esm/src/operations/outputs.d.ts +95 -0
  49. package/dist-esm/src/operations/outputs.d.ts.map +1 -0
  50. package/dist-esm/src/operations/outputs.js +378 -0
  51. package/dist-esm/src/operations/outputs.js.map +1 -0
  52. package/dist-esm/src/operations/privateEndpoints.d.ts +73 -0
  53. package/dist-esm/src/operations/privateEndpoints.d.ts.map +1 -0
  54. package/dist-esm/src/operations/privateEndpoints.js +295 -0
  55. package/dist-esm/src/operations/privateEndpoints.js.map +1 -0
  56. package/dist-esm/src/operations/streamingJobs.d.ts +151 -0
  57. package/dist-esm/src/operations/streamingJobs.d.ts.map +1 -0
  58. package/dist-esm/src/operations/streamingJobs.js +692 -0
  59. package/dist-esm/src/operations/streamingJobs.js.map +1 -0
  60. package/dist-esm/src/operations/subscriptions.d.ts +21 -0
  61. package/dist-esm/src/operations/subscriptions.d.ts.map +1 -0
  62. package/dist-esm/src/operations/subscriptions.js +53 -0
  63. package/dist-esm/src/operations/subscriptions.js.map +1 -0
  64. package/dist-esm/src/operations/transformations.d.ts +46 -0
  65. package/dist-esm/src/operations/transformations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/transformations.js +160 -0
  67. package/dist-esm/src/operations/transformations.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/clusters.d.ts +84 -0
  69. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/clusters.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/functions.d.ts +82 -0
  73. package/dist-esm/src/operationsInterfaces/functions.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/functions.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/functions.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  77. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  79. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/inputs.d.ts +69 -0
  81. package/dist-esm/src/operationsInterfaces/inputs.d.ts.map +1 -0
  82. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/inputs.js} +2 -1
  83. package/dist-esm/src/operationsInterfaces/inputs.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  85. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/outputs.d.ts +70 -0
  89. package/dist-esm/src/operationsInterfaces/outputs.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/outputs.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/outputs.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/privateEndpoints.d.ts +48 -0
  93. package/dist-esm/src/operationsInterfaces/privateEndpoints.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/privateEndpoints.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/privateEndpoints.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/streamingJobs.d.ts +115 -0
  97. package/dist-esm/src/operationsInterfaces/streamingJobs.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/streamingJobs.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/streamingJobs.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts +13 -0
  101. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/subscriptions.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/subscriptions.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/transformations.d.ts +38 -0
  105. package/dist-esm/src/operationsInterfaces/transformations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/transformations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/transformations.js.map +1 -0
  108. package/dist-esm/src/streamAnalyticsManagementClient.d.ts +26 -0
  109. package/dist-esm/src/streamAnalyticsManagementClient.d.ts.map +1 -0
  110. package/dist-esm/src/streamAnalyticsManagementClient.js +59 -0
  111. package/dist-esm/src/streamAnalyticsManagementClient.js.map +1 -0
  112. package/dist-esm/test/sampleTest.d.ts +2 -0
  113. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  114. package/dist-esm/test/sampleTest.js +40 -0
  115. package/dist-esm/test/sampleTest.js.map +1 -0
  116. package/package.json +65 -32
  117. package/review/arm-streamanalytics.api.md +1598 -0
  118. package/rollup.config.js +181 -30
  119. package/src/{models/operationsMappers.ts → index.ts} +4 -12
  120. package/src/lroImpl.ts +34 -0
  121. package/src/models/index.ts +1943 -4505
  122. package/src/models/mappers.ts +1393 -2127
  123. package/src/models/parameters.ts +180 -90
  124. package/src/operations/clusters.ts +640 -393
  125. package/src/operations/functions.ts +366 -375
  126. package/src/operations/index.ts +5 -6
  127. package/src/operations/inputs.ts +337 -326
  128. package/src/operations/operations.ts +85 -73
  129. package/src/operations/outputs.ts +337 -325
  130. package/src/operations/privateEndpoints.ts +276 -209
  131. package/src/operations/streamingJobs.ts +686 -398
  132. package/src/operations/subscriptions.ts +36 -376
  133. package/src/operations/transformations.ts +104 -162
  134. package/src/operationsInterfaces/clusters.ts +157 -0
  135. package/src/operationsInterfaces/functions.ts +148 -0
  136. package/src/operationsInterfaces/index.ts +17 -0
  137. package/src/operationsInterfaces/inputs.ts +128 -0
  138. package/src/operationsInterfaces/operations.ts +22 -0
  139. package/src/operationsInterfaces/outputs.ts +129 -0
  140. package/src/operationsInterfaces/privateEndpoints.ts +90 -0
  141. package/src/operationsInterfaces/streamingJobs.ts +199 -0
  142. package/src/operationsInterfaces/subscriptions.ts +27 -0
  143. package/src/operationsInterfaces/transformations.ts +71 -0
  144. package/src/streamAnalyticsManagementClient.ts +97 -49
  145. package/tsconfig.json +3 -3
  146. package/types/arm-streamanalytics.d.ts +2730 -0
  147. package/types/tsdoc-metadata.json +11 -0
  148. package/dist/arm-streamanalytics.js +0 -7772
  149. package/dist/arm-streamanalytics.js.map +0 -1
  150. package/dist/arm-streamanalytics.min.js +0 -1
  151. package/dist/arm-streamanalytics.min.js.map +0 -1
  152. package/esm/models/clustersMappers.d.ts +0 -2
  153. package/esm/models/clustersMappers.d.ts.map +0 -1
  154. package/esm/models/clustersMappers.js +0 -9
  155. package/esm/models/clustersMappers.js.map +0 -1
  156. package/esm/models/functionsMappers.d.ts +0 -2
  157. package/esm/models/functionsMappers.d.ts.map +0 -1
  158. package/esm/models/functionsMappers.js +0 -9
  159. package/esm/models/functionsMappers.js.map +0 -1
  160. package/esm/models/index.d.ts +0 -4514
  161. package/esm/models/index.d.ts.map +0 -1
  162. package/esm/models/index.js.map +0 -1
  163. package/esm/models/inputsMappers.d.ts +0 -2
  164. package/esm/models/inputsMappers.d.ts.map +0 -1
  165. package/esm/models/inputsMappers.js +0 -9
  166. package/esm/models/inputsMappers.js.map +0 -1
  167. package/esm/models/mappers.d.ts +0 -185
  168. package/esm/models/mappers.d.ts.map +0 -1
  169. package/esm/models/mappers.js.map +0 -1
  170. package/esm/models/operationsMappers.d.ts +0 -2
  171. package/esm/models/operationsMappers.d.ts.map +0 -1
  172. package/esm/models/operationsMappers.js +0 -9
  173. package/esm/models/operationsMappers.js.map +0 -1
  174. package/esm/models/outputsMappers.d.ts +0 -2
  175. package/esm/models/outputsMappers.d.ts.map +0 -1
  176. package/esm/models/outputsMappers.js +0 -9
  177. package/esm/models/outputsMappers.js.map +0 -1
  178. package/esm/models/parameters.d.ts +0 -20
  179. package/esm/models/parameters.d.ts.map +0 -1
  180. package/esm/models/parameters.js +0 -216
  181. package/esm/models/parameters.js.map +0 -1
  182. package/esm/models/privateEndpointsMappers.d.ts +0 -2
  183. package/esm/models/privateEndpointsMappers.d.ts.map +0 -1
  184. package/esm/models/privateEndpointsMappers.js +0 -9
  185. package/esm/models/privateEndpointsMappers.js.map +0 -1
  186. package/esm/models/streamingJobsMappers.d.ts +0 -2
  187. package/esm/models/streamingJobsMappers.d.ts.map +0 -1
  188. package/esm/models/streamingJobsMappers.js +0 -9
  189. package/esm/models/streamingJobsMappers.js.map +0 -1
  190. package/esm/models/subscriptionsMappers.d.ts +0 -2
  191. package/esm/models/subscriptionsMappers.d.ts.map +0 -1
  192. package/esm/models/subscriptionsMappers.js +0 -9
  193. package/esm/models/subscriptionsMappers.js.map +0 -1
  194. package/esm/models/transformationsMappers.d.ts +0 -2
  195. package/esm/models/transformationsMappers.d.ts.map +0 -1
  196. package/esm/models/transformationsMappers.js +0 -9
  197. package/esm/models/transformationsMappers.js.map +0 -1
  198. package/esm/operations/clusters.d.ts +0 -201
  199. package/esm/operations/clusters.d.ts.map +0 -1
  200. package/esm/operations/clusters.js +0 -406
  201. package/esm/operations/clusters.js.map +0 -1
  202. package/esm/operations/functions.d.ts +0 -215
  203. package/esm/operations/functions.d.ts.map +0 -1
  204. package/esm/operations/functions.js +0 -348
  205. package/esm/operations/functions.js.map +0 -1
  206. package/esm/operations/index.d.ts.map +0 -1
  207. package/esm/operations/index.js.map +0 -1
  208. package/esm/operations/inputs.d.ts +0 -189
  209. package/esm/operations/inputs.d.ts.map +0 -1
  210. package/esm/operations/inputs.js +0 -306
  211. package/esm/operations/inputs.js.map +0 -1
  212. package/esm/operations/operations.d.ts +0 -46
  213. package/esm/operations/operations.d.ts.map +0 -1
  214. package/esm/operations/operations.js +0 -79
  215. package/esm/operations/operations.js.map +0 -1
  216. package/esm/operations/outputs.d.ts +0 -189
  217. package/esm/operations/outputs.d.ts.map +0 -1
  218. package/esm/operations/outputs.js +0 -306
  219. package/esm/operations/outputs.js.map +0 -1
  220. package/esm/operations/privateEndpoints.d.ts +0 -125
  221. package/esm/operations/privateEndpoints.d.ts.map +0 -1
  222. package/esm/operations/privateEndpoints.js +0 -216
  223. package/esm/operations/privateEndpoints.js.map +0 -1
  224. package/esm/operations/streamingJobs.d.ts +0 -210
  225. package/esm/operations/streamingJobs.d.ts.map +0 -1
  226. package/esm/operations/streamingJobs.js +0 -440
  227. package/esm/operations/streamingJobs.js.map +0 -1
  228. package/esm/operations/subscriptions.d.ts +0 -138
  229. package/esm/operations/subscriptions.d.ts.map +0 -1
  230. package/esm/operations/subscriptions.js +0 -311
  231. package/esm/operations/subscriptions.js.map +0 -1
  232. package/esm/operations/transformations.d.ts +0 -106
  233. package/esm/operations/transformations.d.ts.map +0 -1
  234. package/esm/operations/transformations.js +0 -149
  235. package/esm/operations/transformations.js.map +0 -1
  236. package/esm/streamAnalyticsManagementClient.d.ts +0 -32
  237. package/esm/streamAnalyticsManagementClient.d.ts.map +0 -1
  238. package/esm/streamAnalyticsManagementClient.js +0 -45
  239. package/esm/streamAnalyticsManagementClient.js.map +0 -1
  240. package/esm/streamAnalyticsManagementClientContext.d.ts +0 -21
  241. package/esm/streamAnalyticsManagementClientContext.d.ts.map +0 -1
  242. package/esm/streamAnalyticsManagementClientContext.js +0 -59
  243. package/esm/streamAnalyticsManagementClientContext.js.map +0 -1
  244. package/src/models/clustersMappers.ts +0 -96
  245. package/src/models/functionsMappers.ts +0 -104
  246. package/src/models/inputsMappers.ts +0 -99
  247. package/src/models/outputsMappers.ts +0 -99
  248. package/src/models/privateEndpointsMappers.ts +0 -94
  249. package/src/models/streamingJobsMappers.ts +0 -98
  250. package/src/models/subscriptionsMappers.ts +0 -104
  251. package/src/models/transformationsMappers.ts +0 -96
  252. package/src/streamAnalyticsManagementClientContext.ts +0 -65
@@ -3,70 +3,140 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/privateEndpointsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateEndpoints } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { StreamAnalyticsManagementClientContext } from "../streamAnalyticsManagementClientContext";
14
+ import { StreamAnalyticsManagementClient } from "../streamAnalyticsManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateEndpoint,
19
+ PrivateEndpointsListByClusterNextOptionalParams,
20
+ PrivateEndpointsListByClusterOptionalParams,
21
+ PrivateEndpointsCreateOrUpdateOptionalParams,
22
+ PrivateEndpointsCreateOrUpdateResponse,
23
+ PrivateEndpointsGetOptionalParams,
24
+ PrivateEndpointsGetResponse,
25
+ PrivateEndpointsDeleteOptionalParams,
26
+ PrivateEndpointsListByClusterResponse,
27
+ PrivateEndpointsListByClusterNextResponse
28
+ } from "../models";
16
29
 
17
- /** Class representing a PrivateEndpoints. */
18
- export class PrivateEndpoints {
19
- private readonly client: StreamAnalyticsManagementClientContext;
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing PrivateEndpoints operations. */
32
+ export class PrivateEndpointsImpl implements PrivateEndpoints {
33
+ private readonly client: StreamAnalyticsManagementClient;
20
34
 
21
35
  /**
22
- * Create a PrivateEndpoints.
23
- * @param {StreamAnalyticsManagementClientContext} client Reference to the service client.
36
+ * Initialize a new instance of the class PrivateEndpoints class.
37
+ * @param client Reference to the service client
24
38
  */
25
- constructor(client: StreamAnalyticsManagementClientContext) {
39
+ constructor(client: StreamAnalyticsManagementClient) {
26
40
  this.client = client;
27
41
  }
28
42
 
29
43
  /**
30
- * Creates a Stream Analytics Private Endpoint or replaces an already existing Private Endpoint.
31
- * @param privateEndpoint The definition of the private endpoint that will be used to create a new
32
- * cluster or replace the existing one.
44
+ * Lists the private endpoints in the cluster.
33
45
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
34
46
  * @param clusterName The name of the cluster.
35
- * @param privateEndpointName The name of the private endpoint.
36
- * @param [options] The optional parameters
37
- * @returns Promise<Models.PrivateEndpointsCreateOrUpdateResponse>
47
+ * @param options The options parameters.
38
48
  */
39
- createOrUpdate(privateEndpoint: Models.PrivateEndpoint, resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: Models.PrivateEndpointsCreateOrUpdateOptionalParams): Promise<Models.PrivateEndpointsCreateOrUpdateResponse>;
49
+ public listByCluster(
50
+ resourceGroupName: string,
51
+ clusterName: string,
52
+ options?: PrivateEndpointsListByClusterOptionalParams
53
+ ): PagedAsyncIterableIterator<PrivateEndpoint> {
54
+ const iter = this.listByClusterPagingAll(
55
+ resourceGroupName,
56
+ clusterName,
57
+ options
58
+ );
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: () => {
67
+ return this.listByClusterPagingPage(
68
+ resourceGroupName,
69
+ clusterName,
70
+ options
71
+ );
72
+ }
73
+ };
74
+ }
75
+
76
+ private async *listByClusterPagingPage(
77
+ resourceGroupName: string,
78
+ clusterName: string,
79
+ options?: PrivateEndpointsListByClusterOptionalParams
80
+ ): AsyncIterableIterator<PrivateEndpoint[]> {
81
+ let result = await this._listByCluster(
82
+ resourceGroupName,
83
+ clusterName,
84
+ options
85
+ );
86
+ yield result.value || [];
87
+ let continuationToken = result.nextLink;
88
+ while (continuationToken) {
89
+ result = await this._listByClusterNext(
90
+ resourceGroupName,
91
+ clusterName,
92
+ continuationToken,
93
+ options
94
+ );
95
+ continuationToken = result.nextLink;
96
+ yield result.value || [];
97
+ }
98
+ }
99
+
100
+ private async *listByClusterPagingAll(
101
+ resourceGroupName: string,
102
+ clusterName: string,
103
+ options?: PrivateEndpointsListByClusterOptionalParams
104
+ ): AsyncIterableIterator<PrivateEndpoint> {
105
+ for await (const page of this.listByClusterPagingPage(
106
+ resourceGroupName,
107
+ clusterName,
108
+ options
109
+ )) {
110
+ yield* page;
111
+ }
112
+ }
113
+
40
114
  /**
41
- * @param privateEndpoint The definition of the private endpoint that will be used to create a new
42
- * cluster or replace the existing one.
115
+ * Creates a Stream Analytics Private Endpoint or replaces an already existing Private Endpoint.
43
116
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
44
117
  * @param clusterName The name of the cluster.
45
118
  * @param privateEndpointName The name of the private endpoint.
46
- * @param callback The callback
47
- */
48
- createOrUpdate(privateEndpoint: Models.PrivateEndpoint, resourceGroupName: string, clusterName: string, privateEndpointName: string, callback: msRest.ServiceCallback<Models.PrivateEndpoint>): void;
49
- /**
50
119
  * @param privateEndpoint The definition of the private endpoint that will be used to create a new
51
- * cluster or replace the existing one.
52
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
53
- * @param clusterName The name of the cluster.
54
- * @param privateEndpointName The name of the private endpoint.
55
- * @param options The optional parameters
56
- * @param callback The callback
120
+ * cluster or replace the existing one.
121
+ * @param options The options parameters.
57
122
  */
58
- createOrUpdate(privateEndpoint: Models.PrivateEndpoint, resourceGroupName: string, clusterName: string, privateEndpointName: string, options: Models.PrivateEndpointsCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback<Models.PrivateEndpoint>): void;
59
- createOrUpdate(privateEndpoint: Models.PrivateEndpoint, resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: Models.PrivateEndpointsCreateOrUpdateOptionalParams | msRest.ServiceCallback<Models.PrivateEndpoint>, callback?: msRest.ServiceCallback<Models.PrivateEndpoint>): Promise<Models.PrivateEndpointsCreateOrUpdateResponse> {
123
+ createOrUpdate(
124
+ resourceGroupName: string,
125
+ clusterName: string,
126
+ privateEndpointName: string,
127
+ privateEndpoint: PrivateEndpoint,
128
+ options?: PrivateEndpointsCreateOrUpdateOptionalParams
129
+ ): Promise<PrivateEndpointsCreateOrUpdateResponse> {
60
130
  return this.client.sendOperationRequest(
61
131
  {
62
- privateEndpoint,
63
132
  resourceGroupName,
64
133
  clusterName,
65
134
  privateEndpointName,
135
+ privateEndpoint,
66
136
  options
67
137
  },
68
- createOrUpdateOperationSpec,
69
- callback) as Promise<Models.PrivateEndpointsCreateOrUpdateResponse>;
138
+ createOrUpdateOperationSpec
139
+ );
70
140
  }
71
141
 
72
142
  /**
@@ -74,35 +144,81 @@ export class PrivateEndpoints {
74
144
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
75
145
  * @param clusterName The name of the cluster.
76
146
  * @param privateEndpointName The name of the private endpoint.
77
- * @param [options] The optional parameters
78
- * @returns Promise<Models.PrivateEndpointsGetResponse>
147
+ * @param options The options parameters.
79
148
  */
80
- get(resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointsGetResponse>;
81
- /**
82
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
83
- * @param clusterName The name of the cluster.
84
- * @param privateEndpointName The name of the private endpoint.
85
- * @param callback The callback
86
- */
87
- get(resourceGroupName: string, clusterName: string, privateEndpointName: string, callback: msRest.ServiceCallback<Models.PrivateEndpoint>): void;
149
+ get(
150
+ resourceGroupName: string,
151
+ clusterName: string,
152
+ privateEndpointName: string,
153
+ options?: PrivateEndpointsGetOptionalParams
154
+ ): Promise<PrivateEndpointsGetResponse> {
155
+ return this.client.sendOperationRequest(
156
+ { resourceGroupName, clusterName, privateEndpointName, options },
157
+ getOperationSpec
158
+ );
159
+ }
160
+
88
161
  /**
162
+ * Delete the specified private endpoint.
89
163
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
90
164
  * @param clusterName The name of the cluster.
91
165
  * @param privateEndpointName The name of the private endpoint.
92
- * @param options The optional parameters
93
- * @param callback The callback
166
+ * @param options The options parameters.
94
167
  */
95
- get(resourceGroupName: string, clusterName: string, privateEndpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpoint>): void;
96
- get(resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpoint>, callback?: msRest.ServiceCallback<Models.PrivateEndpoint>): Promise<Models.PrivateEndpointsGetResponse> {
97
- return this.client.sendOperationRequest(
98
- {
99
- resourceGroupName,
100
- clusterName,
101
- privateEndpointName,
102
- options
103
- },
104
- getOperationSpec,
105
- callback) as Promise<Models.PrivateEndpointsGetResponse>;
168
+ async beginDelete(
169
+ resourceGroupName: string,
170
+ clusterName: string,
171
+ privateEndpointName: string,
172
+ options?: PrivateEndpointsDeleteOptionalParams
173
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
174
+ const directSendOperation = async (
175
+ args: coreClient.OperationArguments,
176
+ spec: coreClient.OperationSpec
177
+ ): Promise<void> => {
178
+ return this.client.sendOperationRequest(args, spec);
179
+ };
180
+ const sendOperation = async (
181
+ args: coreClient.OperationArguments,
182
+ spec: coreClient.OperationSpec
183
+ ) => {
184
+ let currentRawResponse:
185
+ | coreClient.FullOperationResponse
186
+ | undefined = undefined;
187
+ const providedCallback = args.options?.onResponse;
188
+ const callback: coreClient.RawResponseCallback = (
189
+ rawResponse: coreClient.FullOperationResponse,
190
+ flatResponse: unknown
191
+ ) => {
192
+ currentRawResponse = rawResponse;
193
+ providedCallback?.(rawResponse, flatResponse);
194
+ };
195
+ const updatedArgs = {
196
+ ...args,
197
+ options: {
198
+ ...args.options,
199
+ onResponse: callback
200
+ }
201
+ };
202
+ const flatResponse = await directSendOperation(updatedArgs, spec);
203
+ return {
204
+ flatResponse,
205
+ rawResponse: {
206
+ statusCode: currentRawResponse!.status,
207
+ body: currentRawResponse!.parsedBody,
208
+ headers: currentRawResponse!.headers.toJSON()
209
+ }
210
+ };
211
+ };
212
+
213
+ const lro = new LroImpl(
214
+ sendOperation,
215
+ { resourceGroupName, clusterName, privateEndpointName, options },
216
+ deleteOperationSpec
217
+ );
218
+ return new LroEngine(lro, {
219
+ resumeFrom: options?.resumeFrom,
220
+ intervalInMs: options?.updateIntervalInMs
221
+ });
106
222
  }
107
223
 
108
224
  /**
@@ -110,121 +226,66 @@ export class PrivateEndpoints {
110
226
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
111
227
  * @param clusterName The name of the cluster.
112
228
  * @param privateEndpointName The name of the private endpoint.
113
- * @param [options] The optional parameters
114
- * @returns Promise<msRest.RestResponse>
229
+ * @param options The options parameters.
115
230
  */
116
- deleteMethod(resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
117
- return this.beginDeleteMethod(resourceGroupName,clusterName,privateEndpointName,options)
118
- .then(lroPoller => lroPoller.pollUntilFinished());
231
+ async beginDeleteAndWait(
232
+ resourceGroupName: string,
233
+ clusterName: string,
234
+ privateEndpointName: string,
235
+ options?: PrivateEndpointsDeleteOptionalParams
236
+ ): Promise<void> {
237
+ const poller = await this.beginDelete(
238
+ resourceGroupName,
239
+ clusterName,
240
+ privateEndpointName,
241
+ options
242
+ );
243
+ return poller.pollUntilDone();
119
244
  }
120
245
 
121
246
  /**
122
247
  * Lists the private endpoints in the cluster.
123
248
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
124
249
  * @param clusterName The name of the cluster.
125
- * @param [options] The optional parameters
126
- * @returns Promise<Models.PrivateEndpointsListByClusterResponse>
250
+ * @param options The options parameters.
127
251
  */
128
- listByCluster(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointsListByClusterResponse>;
129
- /**
130
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
131
- * @param clusterName The name of the cluster.
132
- * @param callback The callback
133
- */
134
- listByCluster(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointListResult>): void;
135
- /**
136
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
137
- * @param clusterName The name of the cluster.
138
- * @param options The optional parameters
139
- * @param callback The callback
140
- */
141
- listByCluster(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointListResult>): void;
142
- listByCluster(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointListResult>): Promise<Models.PrivateEndpointsListByClusterResponse> {
252
+ private _listByCluster(
253
+ resourceGroupName: string,
254
+ clusterName: string,
255
+ options?: PrivateEndpointsListByClusterOptionalParams
256
+ ): Promise<PrivateEndpointsListByClusterResponse> {
143
257
  return this.client.sendOperationRequest(
144
- {
145
- resourceGroupName,
146
- clusterName,
147
- options
148
- },
149
- listByClusterOperationSpec,
150
- callback) as Promise<Models.PrivateEndpointsListByClusterResponse>;
258
+ { resourceGroupName, clusterName, options },
259
+ listByClusterOperationSpec
260
+ );
151
261
  }
152
262
 
153
263
  /**
154
- * Delete the specified private endpoint.
264
+ * ListByClusterNext
155
265
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
156
266
  * @param clusterName The name of the cluster.
157
- * @param privateEndpointName The name of the private endpoint.
158
- * @param [options] The optional parameters
159
- * @returns Promise<msRestAzure.LROPoller>
267
+ * @param nextLink The nextLink from the previous successful call to the ListByCluster method.
268
+ * @param options The options parameters.
160
269
  */
161
- beginDeleteMethod(resourceGroupName: string, clusterName: string, privateEndpointName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
162
- return this.client.sendLRORequest(
163
- {
164
- resourceGroupName,
165
- clusterName,
166
- privateEndpointName,
167
- options
168
- },
169
- beginDeleteMethodOperationSpec,
170
- options);
171
- }
172
-
173
- /**
174
- * Lists the private endpoints in the cluster.
175
- * @param nextPageLink The NextLink from the previous successful call to List operation.
176
- * @param [options] The optional parameters
177
- * @returns Promise<Models.PrivateEndpointsListByClusterNextResponse>
178
- */
179
- listByClusterNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointsListByClusterNextResponse>;
180
- /**
181
- * @param nextPageLink The NextLink from the previous successful call to List operation.
182
- * @param callback The callback
183
- */
184
- listByClusterNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateEndpointListResult>): void;
185
- /**
186
- * @param nextPageLink The NextLink from the previous successful call to List operation.
187
- * @param options The optional parameters
188
- * @param callback The callback
189
- */
190
- listByClusterNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointListResult>): void;
191
- listByClusterNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointListResult>, callback?: msRest.ServiceCallback<Models.PrivateEndpointListResult>): Promise<Models.PrivateEndpointsListByClusterNextResponse> {
270
+ private _listByClusterNext(
271
+ resourceGroupName: string,
272
+ clusterName: string,
273
+ nextLink: string,
274
+ options?: PrivateEndpointsListByClusterNextOptionalParams
275
+ ): Promise<PrivateEndpointsListByClusterNextResponse> {
192
276
  return this.client.sendOperationRequest(
193
- {
194
- nextPageLink,
195
- options
196
- },
197
- listByClusterNextOperationSpec,
198
- callback) as Promise<Models.PrivateEndpointsListByClusterNextResponse>;
277
+ { resourceGroupName, clusterName, nextLink, options },
278
+ listByClusterNextOperationSpec
279
+ );
199
280
  }
200
281
  }
201
-
202
282
  // Operation Specifications
203
- const serializer = new msRest.Serializer(Mappers);
204
- const createOrUpdateOperationSpec: msRest.OperationSpec = {
283
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
284
+
285
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
286
+ path:
287
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
205
288
  httpMethod: "PUT",
206
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
207
- urlParameters: [
208
- Parameters.subscriptionId,
209
- Parameters.resourceGroupName,
210
- Parameters.clusterName,
211
- Parameters.privateEndpointName
212
- ],
213
- queryParameters: [
214
- Parameters.apiVersion1
215
- ],
216
- headerParameters: [
217
- Parameters.ifMatch,
218
- Parameters.ifNoneMatch,
219
- Parameters.acceptLanguage
220
- ],
221
- requestBody: {
222
- parameterPath: "privateEndpoint",
223
- mapper: {
224
- ...Mappers.PrivateEndpoint,
225
- required: true
226
- }
227
- },
228
289
  responses: {
229
290
  200: {
230
291
  bodyMapper: Mappers.PrivateEndpoint
@@ -236,24 +297,28 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
236
297
  bodyMapper: Mappers.ErrorModel
237
298
  }
238
299
  },
239
- serializer
240
- };
241
-
242
- const getOperationSpec: msRest.OperationSpec = {
243
- httpMethod: "GET",
244
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
300
+ requestBody: Parameters.privateEndpoint,
301
+ queryParameters: [Parameters.apiVersion],
245
302
  urlParameters: [
303
+ Parameters.$host,
246
304
  Parameters.subscriptionId,
247
305
  Parameters.resourceGroupName,
248
306
  Parameters.clusterName,
249
307
  Parameters.privateEndpointName
250
308
  ],
251
- queryParameters: [
252
- Parameters.apiVersion1
253
- ],
254
309
  headerParameters: [
255
- Parameters.acceptLanguage
310
+ Parameters.accept,
311
+ Parameters.contentType,
312
+ Parameters.ifMatch,
313
+ Parameters.ifNoneMatch
256
314
  ],
315
+ mediaType: "json",
316
+ serializer
317
+ };
318
+ const getOperationSpec: coreClient.OperationSpec = {
319
+ path:
320
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
321
+ httpMethod: "GET",
257
322
  responses: {
258
323
  200: {
259
324
  bodyMapper: Mappers.PrivateEndpoint
@@ -262,73 +327,66 @@ const getOperationSpec: msRest.OperationSpec = {
262
327
  bodyMapper: Mappers.ErrorModel
263
328
  }
264
329
  },
265
- serializer
266
- };
267
-
268
- const listByClusterOperationSpec: msRest.OperationSpec = {
269
- httpMethod: "GET",
270
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints",
330
+ queryParameters: [Parameters.apiVersion],
271
331
  urlParameters: [
332
+ Parameters.$host,
272
333
  Parameters.subscriptionId,
273
334
  Parameters.resourceGroupName,
274
- Parameters.clusterName
275
- ],
276
- queryParameters: [
277
- Parameters.apiVersion1
278
- ],
279
- headerParameters: [
280
- Parameters.acceptLanguage
335
+ Parameters.clusterName,
336
+ Parameters.privateEndpointName
281
337
  ],
338
+ headerParameters: [Parameters.accept],
339
+ serializer
340
+ };
341
+ const deleteOperationSpec: coreClient.OperationSpec = {
342
+ path:
343
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
344
+ httpMethod: "DELETE",
282
345
  responses: {
283
- 200: {
284
- bodyMapper: Mappers.PrivateEndpointListResult
285
- },
346
+ 200: {},
347
+ 201: {},
348
+ 202: {},
349
+ 204: {},
286
350
  default: {
287
351
  bodyMapper: Mappers.ErrorModel
288
352
  }
289
353
  },
290
- serializer
291
- };
292
-
293
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
294
- httpMethod: "DELETE",
295
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints/{privateEndpointName}",
354
+ queryParameters: [Parameters.apiVersion],
296
355
  urlParameters: [
356
+ Parameters.$host,
297
357
  Parameters.subscriptionId,
298
358
  Parameters.resourceGroupName,
299
359
  Parameters.clusterName,
300
360
  Parameters.privateEndpointName
301
361
  ],
302
- queryParameters: [
303
- Parameters.apiVersion1
304
- ],
305
- headerParameters: [
306
- Parameters.acceptLanguage
307
- ],
362
+ headerParameters: [Parameters.accept],
363
+ serializer
364
+ };
365
+ const listByClusterOperationSpec: coreClient.OperationSpec = {
366
+ path:
367
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/privateEndpoints",
368
+ httpMethod: "GET",
308
369
  responses: {
309
- 200: {},
310
- 202: {},
311
- 204: {},
370
+ 200: {
371
+ bodyMapper: Mappers.PrivateEndpointListResult
372
+ },
312
373
  default: {
313
374
  bodyMapper: Mappers.ErrorModel
314
375
  }
315
376
  },
377
+ queryParameters: [Parameters.apiVersion],
378
+ urlParameters: [
379
+ Parameters.$host,
380
+ Parameters.subscriptionId,
381
+ Parameters.resourceGroupName,
382
+ Parameters.clusterName
383
+ ],
384
+ headerParameters: [Parameters.accept],
316
385
  serializer
317
386
  };
318
-
319
- const listByClusterNextOperationSpec: msRest.OperationSpec = {
320
- httpMethod: "GET",
321
- baseUrl: "https://management.azure.com",
387
+ const listByClusterNextOperationSpec: coreClient.OperationSpec = {
322
388
  path: "{nextLink}",
323
- urlParameters: [
324
- Parameters.nextPageLink
325
- ],
326
- queryParameters: [
327
- Parameters.apiVersion1
328
- ],
329
- headerParameters: [
330
- Parameters.acceptLanguage
331
- ],
389
+ httpMethod: "GET",
332
390
  responses: {
333
391
  200: {
334
392
  bodyMapper: Mappers.PrivateEndpointListResult
@@ -337,5 +395,14 @@ const listByClusterNextOperationSpec: msRest.OperationSpec = {
337
395
  bodyMapper: Mappers.ErrorModel
338
396
  }
339
397
  },
398
+ queryParameters: [Parameters.apiVersion],
399
+ urlParameters: [
400
+ Parameters.$host,
401
+ Parameters.nextLink,
402
+ Parameters.subscriptionId,
403
+ Parameters.resourceGroupName,
404
+ Parameters.clusterName
405
+ ],
406
+ headerParameters: [Parameters.accept],
340
407
  serializer
341
408
  };