@azure/arm-datafactory 10.10.2-alpha.20230206.1 → 11.0.0-alpha.20230217.3

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 (103) hide show
  1. package/CHANGELOG.md +38 -7
  2. package/dist/index.js +837 -355
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/credentialOperationsCreateOrUpdateSample.d.ts +2 -0
  7. package/dist-esm/samples-dev/credentialOperationsCreateOrUpdateSample.d.ts.map +1 -0
  8. package/dist-esm/samples-dev/credentialOperationsCreateOrUpdateSample.js +46 -0
  9. package/dist-esm/samples-dev/credentialOperationsCreateOrUpdateSample.js.map +1 -0
  10. package/dist-esm/samples-dev/credentialOperationsDeleteSample.d.ts +2 -0
  11. package/dist-esm/samples-dev/credentialOperationsDeleteSample.d.ts.map +1 -0
  12. package/dist-esm/samples-dev/credentialOperationsDeleteSample.js +40 -0
  13. package/dist-esm/samples-dev/credentialOperationsDeleteSample.js.map +1 -0
  14. package/dist-esm/samples-dev/credentialOperationsGetSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/credentialOperationsGetSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/credentialOperationsGetSample.js +40 -0
  17. package/dist-esm/samples-dev/credentialOperationsGetSample.js.map +1 -0
  18. package/dist-esm/samples-dev/credentialOperationsListByFactorySample.d.ts +2 -0
  19. package/dist-esm/samples-dev/credentialOperationsListByFactorySample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/credentialOperationsListByFactorySample.js +53 -0
  21. package/dist-esm/samples-dev/credentialOperationsListByFactorySample.js.map +1 -0
  22. package/dist-esm/src/dataFactoryManagementClient.d.ts +2 -1
  23. package/dist-esm/src/dataFactoryManagementClient.d.ts.map +1 -1
  24. package/dist-esm/src/dataFactoryManagementClient.js +3 -2
  25. package/dist-esm/src/dataFactoryManagementClient.js.map +1 -1
  26. package/dist-esm/src/lroImpl.d.ts +6 -11
  27. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  28. package/dist-esm/src/lroImpl.js +12 -20
  29. package/dist-esm/src/lroImpl.js.map +1 -1
  30. package/dist-esm/src/models/index.d.ts +170 -33
  31. package/dist-esm/src/models/index.d.ts.map +1 -1
  32. package/dist-esm/src/models/index.js +30 -0
  33. package/dist-esm/src/models/index.js.map +1 -1
  34. package/dist-esm/src/models/mappers.d.ts +11 -6
  35. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  36. package/dist-esm/src/models/mappers.js +239 -86
  37. package/dist-esm/src/models/mappers.js.map +1 -1
  38. package/dist-esm/src/models/parameters.d.ts +2 -0
  39. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  40. package/dist-esm/src/models/parameters.js +20 -1
  41. package/dist-esm/src/models/parameters.js.map +1 -1
  42. package/dist-esm/src/operations/credentialOperations.d.ts +63 -0
  43. package/dist-esm/src/operations/credentialOperations.d.ts.map +1 -0
  44. package/dist-esm/src/operations/credentialOperations.js +251 -0
  45. package/dist-esm/src/operations/credentialOperations.js.map +1 -0
  46. package/dist-esm/src/operations/dataFlowDebugSession.d.ts +3 -3
  47. package/dist-esm/src/operations/dataFlowDebugSession.d.ts.map +1 -1
  48. package/dist-esm/src/operations/dataFlowDebugSession.js +18 -10
  49. package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -1
  50. package/dist-esm/src/operations/index.d.ts +1 -0
  51. package/dist-esm/src/operations/index.d.ts.map +1 -1
  52. package/dist-esm/src/operations/index.js +1 -0
  53. package/dist-esm/src/operations/index.js.map +1 -1
  54. package/dist-esm/src/operations/integrationRuntimeObjectMetadata.d.ts +2 -2
  55. package/dist-esm/src/operations/integrationRuntimeObjectMetadata.d.ts.map +1 -1
  56. package/dist-esm/src/operations/integrationRuntimeObjectMetadata.js +10 -6
  57. package/dist-esm/src/operations/integrationRuntimeObjectMetadata.js.map +1 -1
  58. package/dist-esm/src/operations/integrationRuntimes.d.ts +3 -3
  59. package/dist-esm/src/operations/integrationRuntimes.d.ts.map +1 -1
  60. package/dist-esm/src/operations/integrationRuntimes.js +18 -10
  61. package/dist-esm/src/operations/integrationRuntimes.js.map +1 -1
  62. package/dist-esm/src/operations/triggers.d.ts +5 -5
  63. package/dist-esm/src/operations/triggers.d.ts.map +1 -1
  64. package/dist-esm/src/operations/triggers.js +34 -18
  65. package/dist-esm/src/operations/triggers.js.map +1 -1
  66. package/dist-esm/src/operationsInterfaces/credentialOperations.d.ts +38 -0
  67. package/dist-esm/src/operationsInterfaces/credentialOperations.d.ts.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/credentialOperations.js +9 -0
  69. package/dist-esm/src/operationsInterfaces/credentialOperations.js.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.d.ts +3 -3
  71. package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.d.ts.map +1 -1
  72. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  73. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  74. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  75. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  76. package/dist-esm/src/operationsInterfaces/integrationRuntimeObjectMetadata.d.ts +2 -2
  77. package/dist-esm/src/operationsInterfaces/integrationRuntimeObjectMetadata.d.ts.map +1 -1
  78. package/dist-esm/src/operationsInterfaces/integrationRuntimes.d.ts +3 -3
  79. package/dist-esm/src/operationsInterfaces/integrationRuntimes.d.ts.map +1 -1
  80. package/dist-esm/src/operationsInterfaces/triggers.d.ts +5 -5
  81. package/dist-esm/src/operationsInterfaces/triggers.d.ts.map +1 -1
  82. package/dist-esm/test/datafactory_examples.spec.js +31 -0
  83. package/dist-esm/test/datafactory_examples.spec.js.map +1 -1
  84. package/package.json +7 -7
  85. package/review/arm-datafactory.api.md +129 -15
  86. package/src/dataFactoryManagementClient.ts +5 -1
  87. package/src/lroImpl.ts +31 -23
  88. package/src/models/index.ts +196 -39
  89. package/src/models/mappers.ts +262 -95
  90. package/src/models/parameters.ts +24 -0
  91. package/src/operations/credentialOperations.ts +341 -0
  92. package/src/operations/dataFlowDebugSession.ts +32 -22
  93. package/src/operations/index.ts +1 -0
  94. package/src/operations/integrationRuntimeObjectMetadata.ts +19 -12
  95. package/src/operations/integrationRuntimes.ts +28 -21
  96. package/src/operations/triggers.ts +50 -40
  97. package/src/operationsInterfaces/credentialOperations.ts +75 -0
  98. package/src/operationsInterfaces/dataFlowDebugSession.ts +5 -5
  99. package/src/operationsInterfaces/index.ts +1 -0
  100. package/src/operationsInterfaces/integrationRuntimeObjectMetadata.ts +3 -3
  101. package/src/operationsInterfaces/integrationRuntimes.ts +4 -4
  102. package/src/operationsInterfaces/triggers.ts +7 -7
  103. package/types/arm-datafactory.d.ts +210 -16
@@ -0,0 +1,341 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { CredentialOperations } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { DataFactoryManagementClient } from "../dataFactoryManagementClient";
16
+ import {
17
+ ManagedIdentityCredentialResource,
18
+ CredentialOperationsListByFactoryNextOptionalParams,
19
+ CredentialOperationsListByFactoryOptionalParams,
20
+ CredentialOperationsListByFactoryResponse,
21
+ CredentialOperationsCreateOrUpdateOptionalParams,
22
+ CredentialOperationsCreateOrUpdateResponse,
23
+ CredentialOperationsGetOptionalParams,
24
+ CredentialOperationsGetResponse,
25
+ CredentialOperationsDeleteOptionalParams,
26
+ CredentialOperationsListByFactoryNextResponse
27
+ } from "../models";
28
+
29
+ /// <reference lib="esnext.asynciterable" />
30
+ /** Class containing CredentialOperations operations. */
31
+ export class CredentialOperationsImpl implements CredentialOperations {
32
+ private readonly client: DataFactoryManagementClient;
33
+
34
+ /**
35
+ * Initialize a new instance of the class CredentialOperations class.
36
+ * @param client Reference to the service client
37
+ */
38
+ constructor(client: DataFactoryManagementClient) {
39
+ this.client = client;
40
+ }
41
+
42
+ /**
43
+ * List credentials.
44
+ * @param resourceGroupName The resource group name.
45
+ * @param factoryName The factory name.
46
+ * @param options The options parameters.
47
+ */
48
+ public listByFactory(
49
+ resourceGroupName: string,
50
+ factoryName: string,
51
+ options?: CredentialOperationsListByFactoryOptionalParams
52
+ ): PagedAsyncIterableIterator<ManagedIdentityCredentialResource> {
53
+ const iter = this.listByFactoryPagingAll(
54
+ resourceGroupName,
55
+ factoryName,
56
+ options
57
+ );
58
+ return {
59
+ next() {
60
+ return iter.next();
61
+ },
62
+ [Symbol.asyncIterator]() {
63
+ return this;
64
+ },
65
+ byPage: (settings?: PageSettings) => {
66
+ if (settings?.maxPageSize) {
67
+ throw new Error("maxPageSize is not supported by this operation.");
68
+ }
69
+ return this.listByFactoryPagingPage(
70
+ resourceGroupName,
71
+ factoryName,
72
+ options,
73
+ settings
74
+ );
75
+ }
76
+ };
77
+ }
78
+
79
+ private async *listByFactoryPagingPage(
80
+ resourceGroupName: string,
81
+ factoryName: string,
82
+ options?: CredentialOperationsListByFactoryOptionalParams,
83
+ settings?: PageSettings
84
+ ): AsyncIterableIterator<ManagedIdentityCredentialResource[]> {
85
+ let result: CredentialOperationsListByFactoryResponse;
86
+ let continuationToken = settings?.continuationToken;
87
+ if (!continuationToken) {
88
+ result = await this._listByFactory(
89
+ resourceGroupName,
90
+ factoryName,
91
+ options
92
+ );
93
+ let page = result.value || [];
94
+ continuationToken = result.nextLink;
95
+ setContinuationToken(page, continuationToken);
96
+ yield page;
97
+ }
98
+ while (continuationToken) {
99
+ result = await this._listByFactoryNext(
100
+ resourceGroupName,
101
+ factoryName,
102
+ continuationToken,
103
+ options
104
+ );
105
+ continuationToken = result.nextLink;
106
+ let page = result.value || [];
107
+ setContinuationToken(page, continuationToken);
108
+ yield page;
109
+ }
110
+ }
111
+
112
+ private async *listByFactoryPagingAll(
113
+ resourceGroupName: string,
114
+ factoryName: string,
115
+ options?: CredentialOperationsListByFactoryOptionalParams
116
+ ): AsyncIterableIterator<ManagedIdentityCredentialResource> {
117
+ for await (const page of this.listByFactoryPagingPage(
118
+ resourceGroupName,
119
+ factoryName,
120
+ options
121
+ )) {
122
+ yield* page;
123
+ }
124
+ }
125
+
126
+ /**
127
+ * List credentials.
128
+ * @param resourceGroupName The resource group name.
129
+ * @param factoryName The factory name.
130
+ * @param options The options parameters.
131
+ */
132
+ private _listByFactory(
133
+ resourceGroupName: string,
134
+ factoryName: string,
135
+ options?: CredentialOperationsListByFactoryOptionalParams
136
+ ): Promise<CredentialOperationsListByFactoryResponse> {
137
+ return this.client.sendOperationRequest(
138
+ { resourceGroupName, factoryName, options },
139
+ listByFactoryOperationSpec
140
+ );
141
+ }
142
+
143
+ /**
144
+ * Creates or updates a credential.
145
+ * @param resourceGroupName The resource group name.
146
+ * @param factoryName The factory name.
147
+ * @param credentialName Credential name
148
+ * @param credential Credential resource definition.
149
+ * @param options The options parameters.
150
+ */
151
+ createOrUpdate(
152
+ resourceGroupName: string,
153
+ factoryName: string,
154
+ credentialName: string,
155
+ credential: ManagedIdentityCredentialResource,
156
+ options?: CredentialOperationsCreateOrUpdateOptionalParams
157
+ ): Promise<CredentialOperationsCreateOrUpdateResponse> {
158
+ return this.client.sendOperationRequest(
159
+ { resourceGroupName, factoryName, credentialName, credential, options },
160
+ createOrUpdateOperationSpec
161
+ );
162
+ }
163
+
164
+ /**
165
+ * Gets a credential.
166
+ * @param resourceGroupName The resource group name.
167
+ * @param factoryName The factory name.
168
+ * @param credentialName Credential name
169
+ * @param options The options parameters.
170
+ */
171
+ get(
172
+ resourceGroupName: string,
173
+ factoryName: string,
174
+ credentialName: string,
175
+ options?: CredentialOperationsGetOptionalParams
176
+ ): Promise<CredentialOperationsGetResponse> {
177
+ return this.client.sendOperationRequest(
178
+ { resourceGroupName, factoryName, credentialName, options },
179
+ getOperationSpec
180
+ );
181
+ }
182
+
183
+ /**
184
+ * Deletes a credential.
185
+ * @param resourceGroupName The resource group name.
186
+ * @param factoryName The factory name.
187
+ * @param credentialName Credential name
188
+ * @param options The options parameters.
189
+ */
190
+ delete(
191
+ resourceGroupName: string,
192
+ factoryName: string,
193
+ credentialName: string,
194
+ options?: CredentialOperationsDeleteOptionalParams
195
+ ): Promise<void> {
196
+ return this.client.sendOperationRequest(
197
+ { resourceGroupName, factoryName, credentialName, options },
198
+ deleteOperationSpec
199
+ );
200
+ }
201
+
202
+ /**
203
+ * ListByFactoryNext
204
+ * @param resourceGroupName The resource group name.
205
+ * @param factoryName The factory name.
206
+ * @param nextLink The nextLink from the previous successful call to the ListByFactory method.
207
+ * @param options The options parameters.
208
+ */
209
+ private _listByFactoryNext(
210
+ resourceGroupName: string,
211
+ factoryName: string,
212
+ nextLink: string,
213
+ options?: CredentialOperationsListByFactoryNextOptionalParams
214
+ ): Promise<CredentialOperationsListByFactoryNextResponse> {
215
+ return this.client.sendOperationRequest(
216
+ { resourceGroupName, factoryName, nextLink, options },
217
+ listByFactoryNextOperationSpec
218
+ );
219
+ }
220
+ }
221
+ // Operation Specifications
222
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
223
+
224
+ const listByFactoryOperationSpec: coreClient.OperationSpec = {
225
+ path:
226
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials",
227
+ httpMethod: "GET",
228
+ responses: {
229
+ 200: {
230
+ bodyMapper: Mappers.CredentialListResponse
231
+ },
232
+ default: {
233
+ bodyMapper: Mappers.CloudError
234
+ }
235
+ },
236
+ queryParameters: [Parameters.apiVersion],
237
+ urlParameters: [
238
+ Parameters.$host,
239
+ Parameters.subscriptionId,
240
+ Parameters.resourceGroupName,
241
+ Parameters.factoryName
242
+ ],
243
+ headerParameters: [Parameters.accept],
244
+ serializer
245
+ };
246
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
247
+ path:
248
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}",
249
+ httpMethod: "PUT",
250
+ responses: {
251
+ 200: {
252
+ bodyMapper: Mappers.ManagedIdentityCredentialResource
253
+ },
254
+ default: {
255
+ bodyMapper: Mappers.CloudError
256
+ }
257
+ },
258
+ requestBody: Parameters.credential,
259
+ queryParameters: [Parameters.apiVersion],
260
+ urlParameters: [
261
+ Parameters.$host,
262
+ Parameters.subscriptionId,
263
+ Parameters.resourceGroupName,
264
+ Parameters.factoryName,
265
+ Parameters.credentialName
266
+ ],
267
+ headerParameters: [
268
+ Parameters.accept,
269
+ Parameters.contentType,
270
+ Parameters.ifMatch
271
+ ],
272
+ mediaType: "json",
273
+ serializer
274
+ };
275
+ const getOperationSpec: coreClient.OperationSpec = {
276
+ path:
277
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}",
278
+ httpMethod: "GET",
279
+ responses: {
280
+ 200: {
281
+ bodyMapper: Mappers.ManagedIdentityCredentialResource
282
+ },
283
+ 304: {},
284
+ default: {
285
+ bodyMapper: Mappers.CloudError
286
+ }
287
+ },
288
+ queryParameters: [Parameters.apiVersion],
289
+ urlParameters: [
290
+ Parameters.$host,
291
+ Parameters.subscriptionId,
292
+ Parameters.resourceGroupName,
293
+ Parameters.factoryName,
294
+ Parameters.credentialName
295
+ ],
296
+ headerParameters: [Parameters.accept, Parameters.ifNoneMatch],
297
+ serializer
298
+ };
299
+ const deleteOperationSpec: coreClient.OperationSpec = {
300
+ path:
301
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}",
302
+ httpMethod: "DELETE",
303
+ responses: {
304
+ 200: {},
305
+ 204: {},
306
+ default: {
307
+ bodyMapper: Mappers.CloudError
308
+ }
309
+ },
310
+ queryParameters: [Parameters.apiVersion],
311
+ urlParameters: [
312
+ Parameters.$host,
313
+ Parameters.subscriptionId,
314
+ Parameters.resourceGroupName,
315
+ Parameters.factoryName,
316
+ Parameters.credentialName
317
+ ],
318
+ headerParameters: [Parameters.accept],
319
+ serializer
320
+ };
321
+ const listByFactoryNextOperationSpec: coreClient.OperationSpec = {
322
+ path: "{nextLink}",
323
+ httpMethod: "GET",
324
+ responses: {
325
+ 200: {
326
+ bodyMapper: Mappers.CredentialListResponse
327
+ },
328
+ default: {
329
+ bodyMapper: Mappers.CloudError
330
+ }
331
+ },
332
+ urlParameters: [
333
+ Parameters.$host,
334
+ Parameters.nextLink,
335
+ Parameters.subscriptionId,
336
+ Parameters.resourceGroupName,
337
+ Parameters.factoryName
338
+ ],
339
+ headerParameters: [Parameters.accept],
340
+ serializer
341
+ };
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { DataFactoryManagementClient } from "../dataFactoryManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  DataFlowDebugSessionInfo,
20
24
  DataFlowDebugSessionQueryByFactoryNextOptionalParams,
@@ -144,8 +148,8 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
144
148
  request: CreateDataFlowDebugSessionRequest,
145
149
  options?: DataFlowDebugSessionCreateOptionalParams
146
150
  ): Promise<
147
- PollerLike<
148
- PollOperationState<DataFlowDebugSessionCreateResponse>,
151
+ SimplePollerLike<
152
+ OperationState<DataFlowDebugSessionCreateResponse>,
149
153
  DataFlowDebugSessionCreateResponse
150
154
  >
151
155
  > {
@@ -155,7 +159,7 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
155
159
  ): Promise<DataFlowDebugSessionCreateResponse> => {
156
160
  return this.client.sendOperationRequest(args, spec);
157
161
  };
158
- const sendOperation = async (
162
+ const sendOperationFn = async (
159
163
  args: coreClient.OperationArguments,
160
164
  spec: coreClient.OperationSpec
161
165
  ) => {
@@ -188,13 +192,16 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
188
192
  };
189
193
  };
190
194
 
191
- const lro = new LroImpl(
192
- sendOperation,
193
- { resourceGroupName, factoryName, request, options },
194
- createOperationSpec
195
- );
196
- const poller = new LroEngine(lro, {
197
- resumeFrom: options?.resumeFrom,
195
+ const lro = createLroSpec({
196
+ sendOperationFn,
197
+ args: { resourceGroupName, factoryName, request, options },
198
+ spec: createOperationSpec
199
+ });
200
+ const poller = await createHttpPoller<
201
+ DataFlowDebugSessionCreateResponse,
202
+ OperationState<DataFlowDebugSessionCreateResponse>
203
+ >(lro, {
204
+ restoreFrom: options?.resumeFrom,
198
205
  intervalInMs: options?.updateIntervalInMs
199
206
  });
200
207
  await poller.poll();
@@ -291,8 +298,8 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
291
298
  request: DataFlowDebugCommandRequest,
292
299
  options?: DataFlowDebugSessionExecuteCommandOptionalParams
293
300
  ): Promise<
294
- PollerLike<
295
- PollOperationState<DataFlowDebugSessionExecuteCommandResponse>,
301
+ SimplePollerLike<
302
+ OperationState<DataFlowDebugSessionExecuteCommandResponse>,
296
303
  DataFlowDebugSessionExecuteCommandResponse
297
304
  >
298
305
  > {
@@ -302,7 +309,7 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
302
309
  ): Promise<DataFlowDebugSessionExecuteCommandResponse> => {
303
310
  return this.client.sendOperationRequest(args, spec);
304
311
  };
305
- const sendOperation = async (
312
+ const sendOperationFn = async (
306
313
  args: coreClient.OperationArguments,
307
314
  spec: coreClient.OperationSpec
308
315
  ) => {
@@ -335,13 +342,16 @@ export class DataFlowDebugSessionImpl implements DataFlowDebugSession {
335
342
  };
336
343
  };
337
344
 
338
- const lro = new LroImpl(
339
- sendOperation,
340
- { resourceGroupName, factoryName, request, options },
341
- executeCommandOperationSpec
342
- );
343
- const poller = new LroEngine(lro, {
344
- resumeFrom: options?.resumeFrom,
345
+ const lro = createLroSpec({
346
+ sendOperationFn,
347
+ args: { resourceGroupName, factoryName, request, options },
348
+ spec: executeCommandOperationSpec
349
+ });
350
+ const poller = await createHttpPoller<
351
+ DataFlowDebugSessionExecuteCommandResponse,
352
+ OperationState<DataFlowDebugSessionExecuteCommandResponse>
353
+ >(lro, {
354
+ restoreFrom: options?.resumeFrom,
345
355
  intervalInMs: options?.updateIntervalInMs
346
356
  });
347
357
  await poller.poll();
@@ -23,6 +23,7 @@ export * from "./dataFlows";
23
23
  export * from "./dataFlowDebugSession";
24
24
  export * from "./managedVirtualNetworks";
25
25
  export * from "./managedPrivateEndpoints";
26
+ export * from "./credentialOperations";
26
27
  export * from "./privateEndPointConnections";
27
28
  export * from "./privateEndpointConnection";
28
29
  export * from "./privateLinkResources";
@@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
13
  import { DataFactoryManagementClient } from "../dataFactoryManagementClient";
14
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
- import { LroImpl } from "../lroImpl";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
16
20
  import {
17
21
  IntegrationRuntimeObjectMetadataRefreshOptionalParams,
18
22
  IntegrationRuntimeObjectMetadataRefreshResponse,
@@ -46,8 +50,8 @@ export class IntegrationRuntimeObjectMetadataImpl
46
50
  integrationRuntimeName: string,
47
51
  options?: IntegrationRuntimeObjectMetadataRefreshOptionalParams
48
52
  ): Promise<
49
- PollerLike<
50
- PollOperationState<IntegrationRuntimeObjectMetadataRefreshResponse>,
53
+ SimplePollerLike<
54
+ OperationState<IntegrationRuntimeObjectMetadataRefreshResponse>,
51
55
  IntegrationRuntimeObjectMetadataRefreshResponse
52
56
  >
53
57
  > {
@@ -57,7 +61,7 @@ export class IntegrationRuntimeObjectMetadataImpl
57
61
  ): Promise<IntegrationRuntimeObjectMetadataRefreshResponse> => {
58
62
  return this.client.sendOperationRequest(args, spec);
59
63
  };
60
- const sendOperation = async (
64
+ const sendOperationFn = async (
61
65
  args: coreClient.OperationArguments,
62
66
  spec: coreClient.OperationSpec
63
67
  ) => {
@@ -90,13 +94,16 @@ export class IntegrationRuntimeObjectMetadataImpl
90
94
  };
91
95
  };
92
96
 
93
- const lro = new LroImpl(
94
- sendOperation,
95
- { resourceGroupName, factoryName, integrationRuntimeName, options },
96
- refreshOperationSpec
97
- );
98
- const poller = new LroEngine(lro, {
99
- resumeFrom: options?.resumeFrom,
97
+ const lro = createLroSpec({
98
+ sendOperationFn,
99
+ args: { resourceGroupName, factoryName, integrationRuntimeName, options },
100
+ spec: refreshOperationSpec
101
+ });
102
+ const poller = await createHttpPoller<
103
+ IntegrationRuntimeObjectMetadataRefreshResponse,
104
+ OperationState<IntegrationRuntimeObjectMetadataRefreshResponse>
105
+ >(lro, {
106
+ restoreFrom: options?.resumeFrom,
100
107
  intervalInMs: options?.updateIntervalInMs
101
108
  });
102
109
  await poller.poll();
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { DataFactoryManagementClient } from "../dataFactoryManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  IntegrationRuntimeResource,
20
24
  IntegrationRuntimesListByFactoryNextOptionalParams,
@@ -380,8 +384,8 @@ export class IntegrationRuntimesImpl implements IntegrationRuntimes {
380
384
  integrationRuntimeName: string,
381
385
  options?: IntegrationRuntimesStartOptionalParams
382
386
  ): Promise<
383
- PollerLike<
384
- PollOperationState<IntegrationRuntimesStartResponse>,
387
+ SimplePollerLike<
388
+ OperationState<IntegrationRuntimesStartResponse>,
385
389
  IntegrationRuntimesStartResponse
386
390
  >
387
391
  > {
@@ -391,7 +395,7 @@ export class IntegrationRuntimesImpl implements IntegrationRuntimes {
391
395
  ): Promise<IntegrationRuntimesStartResponse> => {
392
396
  return this.client.sendOperationRequest(args, spec);
393
397
  };
394
- const sendOperation = async (
398
+ const sendOperationFn = async (
395
399
  args: coreClient.OperationArguments,
396
400
  spec: coreClient.OperationSpec
397
401
  ) => {
@@ -424,13 +428,16 @@ export class IntegrationRuntimesImpl implements IntegrationRuntimes {
424
428
  };
425
429
  };
426
430
 
427
- const lro = new LroImpl(
428
- sendOperation,
429
- { resourceGroupName, factoryName, integrationRuntimeName, options },
430
- startOperationSpec
431
- );
432
- const poller = new LroEngine(lro, {
433
- resumeFrom: options?.resumeFrom,
431
+ const lro = createLroSpec({
432
+ sendOperationFn,
433
+ args: { resourceGroupName, factoryName, integrationRuntimeName, options },
434
+ spec: startOperationSpec
435
+ });
436
+ const poller = await createHttpPoller<
437
+ IntegrationRuntimesStartResponse,
438
+ OperationState<IntegrationRuntimesStartResponse>
439
+ >(lro, {
440
+ restoreFrom: options?.resumeFrom,
434
441
  intervalInMs: options?.updateIntervalInMs
435
442
  });
436
443
  await poller.poll();
@@ -471,14 +478,14 @@ export class IntegrationRuntimesImpl implements IntegrationRuntimes {
471
478
  factoryName: string,
472
479
  integrationRuntimeName: string,
473
480
  options?: IntegrationRuntimesStopOptionalParams
474
- ): Promise<PollerLike<PollOperationState<void>, void>> {
481
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
475
482
  const directSendOperation = async (
476
483
  args: coreClient.OperationArguments,
477
484
  spec: coreClient.OperationSpec
478
485
  ): Promise<void> => {
479
486
  return this.client.sendOperationRequest(args, spec);
480
487
  };
481
- const sendOperation = async (
488
+ const sendOperationFn = async (
482
489
  args: coreClient.OperationArguments,
483
490
  spec: coreClient.OperationSpec
484
491
  ) => {
@@ -511,13 +518,13 @@ export class IntegrationRuntimesImpl implements IntegrationRuntimes {
511
518
  };
512
519
  };
513
520
 
514
- const lro = new LroImpl(
515
- sendOperation,
516
- { resourceGroupName, factoryName, integrationRuntimeName, options },
517
- stopOperationSpec
518
- );
519
- const poller = new LroEngine(lro, {
520
- resumeFrom: options?.resumeFrom,
521
+ const lro = createLroSpec({
522
+ sendOperationFn,
523
+ args: { resourceGroupName, factoryName, integrationRuntimeName, options },
524
+ spec: stopOperationSpec
525
+ });
526
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
527
+ restoreFrom: options?.resumeFrom,
521
528
  intervalInMs: options?.updateIntervalInMs
522
529
  });
523
530
  await poller.poll();