@azure/arm-databricks 2.0.0 → 3.0.0-beta.1

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 (188) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +66 -82
  4. package/dist/index.js +3186 -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/azureDatabricksManagementClient.d.ts +20 -0
  9. package/dist-esm/src/azureDatabricksManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/azureDatabricksManagementClient.js +27 -0
  11. package/dist-esm/src/azureDatabricksManagementClient.js.map +1 -0
  12. package/dist-esm/src/azureDatabricksManagementClientContext.d.ts +16 -0
  13. package/dist-esm/src/azureDatabricksManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/azureDatabricksManagementClientContext.js +49 -0
  15. package/dist-esm/src/azureDatabricksManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +839 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +94 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +44 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +578 -549
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +17 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/models/parameters.js +77 -51
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/dist-esm/src/operations/index.js +14 -0
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +32 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +120 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts +22 -0
  45. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
  46. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js +65 -0
  47. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js.map +1 -0
  48. package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
  49. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  50. package/dist-esm/src/operations/privateEndpointConnections.js +347 -0
  51. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  52. package/dist-esm/src/operations/privateLinkResources.d.ts +46 -0
  53. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  54. package/dist-esm/src/operations/privateLinkResources.js +169 -0
  55. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  56. package/dist-esm/src/operations/vNetPeering.d.ts +81 -0
  57. package/dist-esm/src/operations/vNetPeering.d.ts.map +1 -0
  58. package/dist-esm/src/operations/vNetPeering.js +338 -0
  59. package/dist-esm/src/operations/vNetPeering.js.map +1 -0
  60. package/dist-esm/src/operations/workspaces.d.ts +107 -0
  61. package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
  62. package/dist-esm/src/operations/workspaces.js +500 -0
  63. package/dist-esm/src/operations/workspaces.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +14 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts +14 -0
  73. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
  74. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js} +2 -9
  75. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  77. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  78. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/privateEndpointConnections.js} +2 -2
  79. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  81. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts +56 -0
  85. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/vNetPeering.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/vNetPeering.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/workspaces.d.ts +71 -0
  89. package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
  92. package/dist-esm/test/databricks_examples.d.ts +2 -0
  93. package/dist-esm/test/databricks_examples.d.ts.map +1 -0
  94. package/dist-esm/test/databricks_examples.js +100 -0
  95. package/dist-esm/test/databricks_examples.js.map +1 -0
  96. package/package.json +65 -32
  97. package/review/arm-databricks.api.md +742 -0
  98. package/rollup.config.js +181 -30
  99. package/src/azureDatabricksManagementClient.ts +42 -39
  100. package/src/azureDatabricksManagementClientContext.ts +45 -40
  101. package/src/index.ts +13 -0
  102. package/src/lroImpl.ts +34 -0
  103. package/src/models/index.ts +712 -1127
  104. package/src/models/mappers.ts +585 -552
  105. package/src/models/parameters.ts +101 -52
  106. package/src/operations/index.ts +2 -2
  107. package/src/operations/operations.ts +82 -70
  108. package/src/operations/outboundNetworkDependenciesEndpoints.ts +85 -0
  109. package/src/operations/privateEndpointConnections.ts +326 -184
  110. package/src/operations/privateLinkResources.ts +141 -123
  111. package/src/operations/vNetPeering.ts +349 -199
  112. package/src/operations/workspaces.ts +503 -308
  113. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +3 -3
  114. package/src/operationsInterfaces/operations.ts +22 -0
  115. package/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +29 -0
  116. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  117. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  118. package/src/operationsInterfaces/vNetPeering.ts +109 -0
  119. package/src/operationsInterfaces/workspaces.ts +139 -0
  120. package/tsconfig.json +3 -3
  121. package/types/arm-databricks.d.ts +1198 -0
  122. package/types/tsdoc-metadata.json +11 -0
  123. package/dist/arm-databricks.js +0 -2791
  124. package/dist/arm-databricks.js.map +0 -1
  125. package/dist/arm-databricks.min.js +0 -1
  126. package/dist/arm-databricks.min.js.map +0 -1
  127. package/esm/azureDatabricksManagementClient.d.ts +0 -28
  128. package/esm/azureDatabricksManagementClient.d.ts.map +0 -1
  129. package/esm/azureDatabricksManagementClient.js +0 -41
  130. package/esm/azureDatabricksManagementClient.js.map +0 -1
  131. package/esm/azureDatabricksManagementClientContext.d.ts +0 -21
  132. package/esm/azureDatabricksManagementClientContext.d.ts.map +0 -1
  133. package/esm/azureDatabricksManagementClientContext.js +0 -59
  134. package/esm/azureDatabricksManagementClientContext.js.map +0 -1
  135. package/esm/models/index.d.ts +0 -1273
  136. package/esm/models/index.d.ts.map +0 -1
  137. package/esm/models/index.js.map +0 -1
  138. package/esm/models/mappers.d.ts +0 -43
  139. package/esm/models/mappers.d.ts.map +0 -1
  140. package/esm/models/mappers.js.map +0 -1
  141. package/esm/models/operationsMappers.d.ts +0 -2
  142. package/esm/models/operationsMappers.d.ts.map +0 -1
  143. package/esm/models/operationsMappers.js.map +0 -1
  144. package/esm/models/parameters.d.ts +0 -12
  145. package/esm/models/parameters.d.ts.map +0 -1
  146. package/esm/models/parameters.js.map +0 -1
  147. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  148. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  149. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  150. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  151. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  152. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  153. package/esm/models/privateLinkResourcesMappers.js +0 -9
  154. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  155. package/esm/models/vNetPeeringMappers.d.ts +0 -2
  156. package/esm/models/vNetPeeringMappers.d.ts.map +0 -1
  157. package/esm/models/vNetPeeringMappers.js +0 -9
  158. package/esm/models/vNetPeeringMappers.js.map +0 -1
  159. package/esm/models/workspacesMappers.d.ts +0 -2
  160. package/esm/models/workspacesMappers.d.ts.map +0 -1
  161. package/esm/models/workspacesMappers.js +0 -9
  162. package/esm/models/workspacesMappers.js.map +0 -1
  163. package/esm/operations/index.d.ts.map +0 -1
  164. package/esm/operations/index.js.map +0 -1
  165. package/esm/operations/operations.d.ts +0 -46
  166. package/esm/operations/operations.d.ts.map +0 -1
  167. package/esm/operations/operations.js +0 -79
  168. package/esm/operations/operations.js.map +0 -1
  169. package/esm/operations/privateEndpointConnections.d.ts +0 -122
  170. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  171. package/esm/operations/privateEndpointConnections.js +0 -240
  172. package/esm/operations/privateEndpointConnections.js.map +0 -1
  173. package/esm/operations/privateLinkResources.d.ts +0 -79
  174. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  175. package/esm/operations/privateLinkResources.js +0 -119
  176. package/esm/operations/privateLinkResources.js.map +0 -1
  177. package/esm/operations/vNetPeering.d.ts +0 -115
  178. package/esm/operations/vNetPeering.d.ts.map +0 -1
  179. package/esm/operations/vNetPeering.js +0 -237
  180. package/esm/operations/vNetPeering.js.map +0 -1
  181. package/esm/operations/workspaces.d.ts +0 -156
  182. package/esm/operations/workspaces.d.ts.map +0 -1
  183. package/esm/operations/workspaces.js +0 -337
  184. package/esm/operations/workspaces.js.map +0 -1
  185. package/src/models/privateEndpointConnectionsMappers.ts +0 -43
  186. package/src/models/privateLinkResourcesMappers.ts +0 -43
  187. package/src/models/vNetPeeringMappers.ts +0 -43
  188. package/src/models/workspacesMappers.ts +0 -44
@@ -3,24 +3,39 @@
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/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";
14
13
  import * as Parameters from "../models/parameters";
15
14
  import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateEndpointConnection,
19
+ PrivateEndpointConnectionsListNextOptionalParams,
20
+ PrivateEndpointConnectionsListOptionalParams,
21
+ PrivateEndpointConnectionsListResponse,
22
+ PrivateEndpointConnectionsGetOptionalParams,
23
+ PrivateEndpointConnectionsGetResponse,
24
+ PrivateEndpointConnectionsCreateOptionalParams,
25
+ PrivateEndpointConnectionsCreateResponse,
26
+ PrivateEndpointConnectionsDeleteOptionalParams,
27
+ PrivateEndpointConnectionsListNextResponse
28
+ } from "../models";
16
29
 
17
- /** Class representing a PrivateEndpointConnections. */
18
- export class PrivateEndpointConnections {
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing PrivateEndpointConnections operations. */
32
+ export class PrivateEndpointConnectionsImpl
33
+ implements PrivateEndpointConnections {
19
34
  private readonly client: AzureDatabricksManagementClientContext;
20
35
 
21
36
  /**
22
- * Create a PrivateEndpointConnections.
23
- * @param {AzureDatabricksManagementClientContext} client Reference to the service client.
37
+ * Initialize a new instance of the class PrivateEndpointConnections class.
38
+ * @param client Reference to the service client
24
39
  */
25
40
  constructor(client: AzureDatabricksManagementClientContext) {
26
41
  this.client = client;
@@ -28,193 +43,321 @@ export class PrivateEndpointConnections {
28
43
 
29
44
  /**
30
45
  * List private endpoint connections of the workspace
31
- * @summary List private endpoint connections
32
46
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
33
47
  * @param workspaceName The name of the workspace.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.PrivateEndpointConnectionsListResponse>
48
+ * @param options The options parameters.
36
49
  */
37
- list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListResponse>;
50
+ public list(
51
+ resourceGroupName: string,
52
+ workspaceName: string,
53
+ options?: PrivateEndpointConnectionsListOptionalParams
54
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
55
+ const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: () => {
64
+ return this.listPagingPage(resourceGroupName, workspaceName, options);
65
+ }
66
+ };
67
+ }
68
+
69
+ private async *listPagingPage(
70
+ resourceGroupName: string,
71
+ workspaceName: string,
72
+ options?: PrivateEndpointConnectionsListOptionalParams
73
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
74
+ let result = await this._list(resourceGroupName, workspaceName, options);
75
+ yield result.value || [];
76
+ let continuationToken = result.nextLink;
77
+ while (continuationToken) {
78
+ result = await this._listNext(
79
+ resourceGroupName,
80
+ workspaceName,
81
+ continuationToken,
82
+ options
83
+ );
84
+ continuationToken = result.nextLink;
85
+ yield result.value || [];
86
+ }
87
+ }
88
+
89
+ private async *listPagingAll(
90
+ resourceGroupName: string,
91
+ workspaceName: string,
92
+ options?: PrivateEndpointConnectionsListOptionalParams
93
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
94
+ for await (const page of this.listPagingPage(
95
+ resourceGroupName,
96
+ workspaceName,
97
+ options
98
+ )) {
99
+ yield* page;
100
+ }
101
+ }
102
+
38
103
  /**
104
+ * List private endpoint connections of the workspace
39
105
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
40
106
  * @param workspaceName The name of the workspace.
41
- * @param callback The callback
107
+ * @param options The options parameters.
42
108
  */
43
- list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): void;
109
+ private _list(
110
+ resourceGroupName: string,
111
+ workspaceName: string,
112
+ options?: PrivateEndpointConnectionsListOptionalParams
113
+ ): Promise<PrivateEndpointConnectionsListResponse> {
114
+ return this.client.sendOperationRequest(
115
+ { resourceGroupName, workspaceName, options },
116
+ listOperationSpec
117
+ );
118
+ }
119
+
44
120
  /**
121
+ * Get a private endpoint connection properties for a workspace
45
122
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
46
123
  * @param workspaceName The name of the workspace.
47
- * @param options The optional parameters
48
- * @param callback The callback
124
+ * @param privateEndpointConnectionName The name of the private endpoint connection
125
+ * @param options The options parameters.
49
126
  */
50
- list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): void;
51
- list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): Promise<Models.PrivateEndpointConnectionsListResponse> {
127
+ get(
128
+ resourceGroupName: string,
129
+ workspaceName: string,
130
+ privateEndpointConnectionName: string,
131
+ options?: PrivateEndpointConnectionsGetOptionalParams
132
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
52
133
  return this.client.sendOperationRequest(
53
134
  {
54
135
  resourceGroupName,
55
136
  workspaceName,
137
+ privateEndpointConnectionName,
56
138
  options
57
139
  },
58
- listOperationSpec,
59
- callback) as Promise<Models.PrivateEndpointConnectionsListResponse>;
140
+ getOperationSpec
141
+ );
60
142
  }
61
143
 
62
144
  /**
63
- * Get a private endpoint connection properties for a workspace
64
- * @summary Get private endpoint connection
65
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
66
- * @param workspaceName The name of the workspace.
67
- * @param privateEndpointConnectionName The name of the private endpoint connection
68
- * @param [options] The optional parameters
69
- * @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
70
- */
71
- get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
72
- /**
73
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
74
- * @param workspaceName The name of the workspace.
75
- * @param privateEndpointConnectionName The name of the private endpoint connection
76
- * @param callback The callback
77
- */
78
- get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
79
- /**
145
+ * Update the status of a private endpoint connection with the specified name
80
146
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
81
147
  * @param workspaceName The name of the workspace.
82
148
  * @param privateEndpointConnectionName The name of the private endpoint connection
83
- * @param options The optional parameters
84
- * @param callback The callback
149
+ * @param privateEndpointConnection The private endpoint connection with updated properties
150
+ * @param options The options parameters.
85
151
  */
86
- get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
87
- get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnection>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnection>): Promise<Models.PrivateEndpointConnectionsGetResponse> {
88
- return this.client.sendOperationRequest(
152
+ async beginCreate(
153
+ resourceGroupName: string,
154
+ workspaceName: string,
155
+ privateEndpointConnectionName: string,
156
+ privateEndpointConnection: PrivateEndpointConnection,
157
+ options?: PrivateEndpointConnectionsCreateOptionalParams
158
+ ): Promise<
159
+ PollerLike<
160
+ PollOperationState<PrivateEndpointConnectionsCreateResponse>,
161
+ PrivateEndpointConnectionsCreateResponse
162
+ >
163
+ > {
164
+ const directSendOperation = async (
165
+ args: coreClient.OperationArguments,
166
+ spec: coreClient.OperationSpec
167
+ ): Promise<PrivateEndpointConnectionsCreateResponse> => {
168
+ return this.client.sendOperationRequest(args, spec);
169
+ };
170
+ const sendOperation = async (
171
+ args: coreClient.OperationArguments,
172
+ spec: coreClient.OperationSpec
173
+ ) => {
174
+ let currentRawResponse:
175
+ | coreClient.FullOperationResponse
176
+ | undefined = undefined;
177
+ const providedCallback = args.options?.onResponse;
178
+ const callback: coreClient.RawResponseCallback = (
179
+ rawResponse: coreClient.FullOperationResponse,
180
+ flatResponse: unknown
181
+ ) => {
182
+ currentRawResponse = rawResponse;
183
+ providedCallback?.(rawResponse, flatResponse);
184
+ };
185
+ const updatedArgs = {
186
+ ...args,
187
+ options: {
188
+ ...args.options,
189
+ onResponse: callback
190
+ }
191
+ };
192
+ const flatResponse = await directSendOperation(updatedArgs, spec);
193
+ return {
194
+ flatResponse,
195
+ rawResponse: {
196
+ statusCode: currentRawResponse!.status,
197
+ body: currentRawResponse!.parsedBody,
198
+ headers: currentRawResponse!.headers.toJSON()
199
+ }
200
+ };
201
+ };
202
+
203
+ const lro = new LroImpl(
204
+ sendOperation,
89
205
  {
90
206
  resourceGroupName,
91
207
  workspaceName,
92
208
  privateEndpointConnectionName,
209
+ privateEndpointConnection,
93
210
  options
94
211
  },
95
- getOperationSpec,
96
- callback) as Promise<Models.PrivateEndpointConnectionsGetResponse>;
212
+ createOperationSpec
213
+ );
214
+ return new LroEngine(lro, {
215
+ resumeFrom: options?.resumeFrom,
216
+ intervalInMs: options?.updateIntervalInMs
217
+ });
97
218
  }
98
219
 
99
220
  /**
100
221
  * Update the status of a private endpoint connection with the specified name
101
- * @summary Update private endpoint connection status
102
222
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
103
223
  * @param workspaceName The name of the workspace.
104
224
  * @param privateEndpointConnectionName The name of the private endpoint connection
105
225
  * @param privateEndpointConnection The private endpoint connection with updated properties
106
- * @param [options] The optional parameters
107
- * @returns Promise<Models.PrivateEndpointConnectionsCreateResponse>
226
+ * @param options The options parameters.
108
227
  */
109
- create(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsCreateResponse> {
110
- return this.beginCreate(resourceGroupName,workspaceName,privateEndpointConnectionName,privateEndpointConnection,options)
111
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PrivateEndpointConnectionsCreateResponse>;
228
+ async beginCreateAndWait(
229
+ resourceGroupName: string,
230
+ workspaceName: string,
231
+ privateEndpointConnectionName: string,
232
+ privateEndpointConnection: PrivateEndpointConnection,
233
+ options?: PrivateEndpointConnectionsCreateOptionalParams
234
+ ): Promise<PrivateEndpointConnectionsCreateResponse> {
235
+ const poller = await this.beginCreate(
236
+ resourceGroupName,
237
+ workspaceName,
238
+ privateEndpointConnectionName,
239
+ privateEndpointConnection,
240
+ options
241
+ );
242
+ return poller.pollUntilDone();
112
243
  }
113
244
 
114
245
  /**
115
246
  * Remove private endpoint connection with the specified name
116
- * @summary Remove private endpoint connection
117
247
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
118
248
  * @param workspaceName The name of the workspace.
119
249
  * @param privateEndpointConnectionName The name of the private endpoint connection
120
- * @param [options] The optional parameters
121
- * @returns Promise<msRest.RestResponse>
250
+ * @param options The options parameters.
122
251
  */
123
- deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
124
- return this.beginDeleteMethod(resourceGroupName,workspaceName,privateEndpointConnectionName,options)
125
- .then(lroPoller => lroPoller.pollUntilFinished());
126
- }
252
+ async beginDelete(
253
+ resourceGroupName: string,
254
+ workspaceName: string,
255
+ privateEndpointConnectionName: string,
256
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
257
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
258
+ const directSendOperation = async (
259
+ args: coreClient.OperationArguments,
260
+ spec: coreClient.OperationSpec
261
+ ): Promise<void> => {
262
+ return this.client.sendOperationRequest(args, spec);
263
+ };
264
+ const sendOperation = async (
265
+ args: coreClient.OperationArguments,
266
+ spec: coreClient.OperationSpec
267
+ ) => {
268
+ let currentRawResponse:
269
+ | coreClient.FullOperationResponse
270
+ | undefined = undefined;
271
+ const providedCallback = args.options?.onResponse;
272
+ const callback: coreClient.RawResponseCallback = (
273
+ rawResponse: coreClient.FullOperationResponse,
274
+ flatResponse: unknown
275
+ ) => {
276
+ currentRawResponse = rawResponse;
277
+ providedCallback?.(rawResponse, flatResponse);
278
+ };
279
+ const updatedArgs = {
280
+ ...args,
281
+ options: {
282
+ ...args.options,
283
+ onResponse: callback
284
+ }
285
+ };
286
+ const flatResponse = await directSendOperation(updatedArgs, spec);
287
+ return {
288
+ flatResponse,
289
+ rawResponse: {
290
+ statusCode: currentRawResponse!.status,
291
+ body: currentRawResponse!.parsedBody,
292
+ headers: currentRawResponse!.headers.toJSON()
293
+ }
294
+ };
295
+ };
127
296
 
128
- /**
129
- * Update the status of a private endpoint connection with the specified name
130
- * @summary Update private endpoint connection status
131
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
132
- * @param workspaceName The name of the workspace.
133
- * @param privateEndpointConnectionName The name of the private endpoint connection
134
- * @param privateEndpointConnection The private endpoint connection with updated properties
135
- * @param [options] The optional parameters
136
- * @returns Promise<msRestAzure.LROPoller>
137
- */
138
- beginCreate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
139
- return this.client.sendLRORequest(
297
+ const lro = new LroImpl(
298
+ sendOperation,
140
299
  {
141
300
  resourceGroupName,
142
301
  workspaceName,
143
302
  privateEndpointConnectionName,
144
- privateEndpointConnection,
145
303
  options
146
304
  },
147
- beginCreateOperationSpec,
148
- options);
305
+ deleteOperationSpec
306
+ );
307
+ return new LroEngine(lro, {
308
+ resumeFrom: options?.resumeFrom,
309
+ intervalInMs: options?.updateIntervalInMs
310
+ });
149
311
  }
150
312
 
151
313
  /**
152
314
  * Remove private endpoint connection with the specified name
153
- * @summary Remove private endpoint connection
154
315
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
155
316
  * @param workspaceName The name of the workspace.
156
317
  * @param privateEndpointConnectionName The name of the private endpoint connection
157
- * @param [options] The optional parameters
158
- * @returns Promise<msRestAzure.LROPoller>
318
+ * @param options The options parameters.
159
319
  */
160
- beginDeleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
161
- return this.client.sendLRORequest(
162
- {
163
- resourceGroupName,
164
- workspaceName,
165
- privateEndpointConnectionName,
166
- options
167
- },
168
- beginDeleteMethodOperationSpec,
169
- options);
320
+ async beginDeleteAndWait(
321
+ resourceGroupName: string,
322
+ workspaceName: string,
323
+ privateEndpointConnectionName: string,
324
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
325
+ ): Promise<void> {
326
+ const poller = await this.beginDelete(
327
+ resourceGroupName,
328
+ workspaceName,
329
+ privateEndpointConnectionName,
330
+ options
331
+ );
332
+ return poller.pollUntilDone();
170
333
  }
171
334
 
172
335
  /**
173
- * List private endpoint connections of the workspace
174
- * @summary List private endpoint connections
175
- * @param nextPageLink The NextLink from the previous successful call to List operation.
176
- * @param [options] The optional parameters
177
- * @returns Promise<Models.PrivateEndpointConnectionsListNextResponse>
178
- */
179
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsListNextResponse>;
180
- /**
181
- * @param nextPageLink The NextLink from the previous successful call to List operation.
182
- * @param callback The callback
183
- */
184
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): 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
336
+ * ListNext
337
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
338
+ * @param workspaceName The name of the workspace.
339
+ * @param nextLink The nextLink from the previous successful call to the List method.
340
+ * @param options The options parameters.
189
341
  */
190
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): void;
191
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>, callback?: msRest.ServiceCallback<Models.PrivateEndpointConnectionsList>): Promise<Models.PrivateEndpointConnectionsListNextResponse> {
342
+ private _listNext(
343
+ resourceGroupName: string,
344
+ workspaceName: string,
345
+ nextLink: string,
346
+ options?: PrivateEndpointConnectionsListNextOptionalParams
347
+ ): Promise<PrivateEndpointConnectionsListNextResponse> {
192
348
  return this.client.sendOperationRequest(
193
- {
194
- nextPageLink,
195
- options
196
- },
197
- listNextOperationSpec,
198
- callback) as Promise<Models.PrivateEndpointConnectionsListNextResponse>;
349
+ { resourceGroupName, workspaceName, nextLink, options },
350
+ listNextOperationSpec
351
+ );
199
352
  }
200
353
  }
201
-
202
354
  // Operation Specifications
203
- const serializer = new msRest.Serializer(Mappers);
204
- const listOperationSpec: msRest.OperationSpec = {
355
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
356
+
357
+ const listOperationSpec: coreClient.OperationSpec = {
358
+ path:
359
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections",
205
360
  httpMethod: "GET",
206
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections",
207
- urlParameters: [
208
- Parameters.resourceGroupName,
209
- Parameters.workspaceName,
210
- Parameters.subscriptionId
211
- ],
212
- queryParameters: [
213
- Parameters.apiVersion0
214
- ],
215
- headerParameters: [
216
- Parameters.acceptLanguage
217
- ],
218
361
  responses: {
219
362
  200: {
220
363
  bodyMapper: Mappers.PrivateEndpointConnectionsList
@@ -223,24 +366,20 @@ const listOperationSpec: msRest.OperationSpec = {
223
366
  bodyMapper: Mappers.ErrorResponse
224
367
  }
225
368
  },
226
- serializer
227
- };
228
-
229
- const getOperationSpec: msRest.OperationSpec = {
230
- httpMethod: "GET",
231
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
369
+ queryParameters: [Parameters.apiVersion],
232
370
  urlParameters: [
371
+ Parameters.$host,
233
372
  Parameters.resourceGroupName,
234
373
  Parameters.workspaceName,
235
- Parameters.subscriptionId,
236
- Parameters.privateEndpointConnectionName
237
- ],
238
- queryParameters: [
239
- Parameters.apiVersion0
240
- ],
241
- headerParameters: [
242
- Parameters.acceptLanguage
374
+ Parameters.subscriptionId
243
375
  ],
376
+ headerParameters: [Parameters.accept],
377
+ serializer
378
+ };
379
+ const getOperationSpec: coreClient.OperationSpec = {
380
+ path:
381
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
382
+ httpMethod: "GET",
244
383
  responses: {
245
384
  200: {
246
385
  bodyMapper: Mappers.PrivateEndpointConnection
@@ -249,84 +388,78 @@ const getOperationSpec: msRest.OperationSpec = {
249
388
  bodyMapper: Mappers.ErrorResponse
250
389
  }
251
390
  },
252
- serializer
253
- };
254
-
255
- const beginCreateOperationSpec: msRest.OperationSpec = {
256
- httpMethod: "PUT",
257
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
391
+ queryParameters: [Parameters.apiVersion],
258
392
  urlParameters: [
393
+ Parameters.$host,
259
394
  Parameters.resourceGroupName,
260
395
  Parameters.workspaceName,
261
396
  Parameters.subscriptionId,
262
397
  Parameters.privateEndpointConnectionName
263
398
  ],
264
- queryParameters: [
265
- Parameters.apiVersion0
266
- ],
267
- headerParameters: [
268
- Parameters.acceptLanguage
269
- ],
270
- requestBody: {
271
- parameterPath: "privateEndpointConnection",
272
- mapper: {
273
- ...Mappers.PrivateEndpointConnection,
274
- required: true
275
- }
276
- },
399
+ headerParameters: [Parameters.accept],
400
+ serializer
401
+ };
402
+ const createOperationSpec: coreClient.OperationSpec = {
403
+ path:
404
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
405
+ httpMethod: "PUT",
277
406
  responses: {
278
407
  200: {
279
408
  bodyMapper: Mappers.PrivateEndpointConnection
280
409
  },
410
+ 201: {
411
+ bodyMapper: Mappers.PrivateEndpointConnection
412
+ },
281
413
  202: {
282
414
  bodyMapper: Mappers.PrivateEndpointConnection
283
415
  },
416
+ 204: {
417
+ bodyMapper: Mappers.PrivateEndpointConnection
418
+ },
284
419
  default: {
285
420
  bodyMapper: Mappers.ErrorResponse
286
421
  }
287
422
  },
288
- serializer
289
- };
290
-
291
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
292
- httpMethod: "DELETE",
293
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
423
+ requestBody: Parameters.privateEndpointConnection,
424
+ queryParameters: [Parameters.apiVersion],
294
425
  urlParameters: [
426
+ Parameters.$host,
295
427
  Parameters.resourceGroupName,
296
428
  Parameters.workspaceName,
297
429
  Parameters.subscriptionId,
298
430
  Parameters.privateEndpointConnectionName
299
431
  ],
300
- queryParameters: [
301
- Parameters.apiVersion0
302
- ],
303
- headerParameters: [
304
- Parameters.acceptLanguage
305
- ],
432
+ headerParameters: [Parameters.accept, Parameters.contentType],
433
+ mediaType: "json",
434
+ serializer
435
+ };
436
+ const deleteOperationSpec: coreClient.OperationSpec = {
437
+ path:
438
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
439
+ httpMethod: "DELETE",
306
440
  responses: {
307
441
  200: {},
442
+ 201: {},
308
443
  202: {},
309
444
  204: {},
310
445
  default: {
311
446
  bodyMapper: Mappers.ErrorResponse
312
447
  }
313
448
  },
449
+ queryParameters: [Parameters.apiVersion],
450
+ urlParameters: [
451
+ Parameters.$host,
452
+ Parameters.resourceGroupName,
453
+ Parameters.workspaceName,
454
+ Parameters.subscriptionId,
455
+ Parameters.privateEndpointConnectionName
456
+ ],
457
+ headerParameters: [Parameters.accept],
314
458
  serializer
315
459
  };
316
-
317
- const listNextOperationSpec: msRest.OperationSpec = {
318
- httpMethod: "GET",
319
- baseUrl: "https://management.azure.com",
460
+ const listNextOperationSpec: coreClient.OperationSpec = {
320
461
  path: "{nextLink}",
321
- urlParameters: [
322
- Parameters.nextPageLink
323
- ],
324
- queryParameters: [
325
- Parameters.apiVersion0
326
- ],
327
- headerParameters: [
328
- Parameters.acceptLanguage
329
- ],
462
+ httpMethod: "GET",
330
463
  responses: {
331
464
  200: {
332
465
  bodyMapper: Mappers.PrivateEndpointConnectionsList
@@ -335,5 +468,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
335
468
  bodyMapper: Mappers.ErrorResponse
336
469
  }
337
470
  },
471
+ queryParameters: [Parameters.apiVersion],
472
+ urlParameters: [
473
+ Parameters.$host,
474
+ Parameters.resourceGroupName,
475
+ Parameters.workspaceName,
476
+ Parameters.subscriptionId,
477
+ Parameters.nextLink
478
+ ],
479
+ headerParameters: [Parameters.accept],
338
480
  serializer
339
481
  };