@azure/arm-datamigration 3.0.0-alpha.20250723.2 → 3.0.0-alpha.20250730.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.
- package/dist/browser/dataMigrationManagementClient.js +28 -5
- package/dist/browser/dataMigrationManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +1601 -737
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/browser/operations/files.js +23 -40
- package/dist/browser/operations/files.js.map +1 -1
- package/dist/browser/operations/migrationServices.js +100 -136
- package/dist/browser/operations/migrationServices.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/projects.js +23 -40
- package/dist/browser/operations/projects.js.map +1 -1
- package/dist/browser/operations/resourceSkus.js +23 -40
- package/dist/browser/operations/resourceSkus.js.map +1 -1
- package/dist/browser/operations/serviceTasks.js +23 -40
- package/dist/browser/operations/serviceTasks.js.map +1 -1
- package/dist/browser/operations/services.js +122 -148
- package/dist/browser/operations/services.js.map +1 -1
- package/dist/browser/operations/sqlMigrationServices.js +100 -136
- package/dist/browser/operations/sqlMigrationServices.js.map +1 -1
- package/dist/browser/operations/tasks.js +23 -40
- package/dist/browser/operations/tasks.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/dataMigrationManagementClient.js +28 -5
- package/dist/commonjs/dataMigrationManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +1601 -737
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -51
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -51
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/commonjs/operations/files.js +23 -39
- package/dist/commonjs/operations/files.js.map +1 -1
- package/dist/commonjs/operations/migrationServices.js +100 -135
- package/dist/commonjs/operations/migrationServices.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/projects.js +23 -39
- package/dist/commonjs/operations/projects.js.map +1 -1
- package/dist/commonjs/operations/resourceSkus.js +23 -39
- package/dist/commonjs/operations/resourceSkus.js.map +1 -1
- package/dist/commonjs/operations/serviceTasks.js +23 -39
- package/dist/commonjs/operations/serviceTasks.js.map +1 -1
- package/dist/commonjs/operations/services.js +122 -147
- package/dist/commonjs/operations/services.js.map +1 -1
- package/dist/commonjs/operations/sqlMigrationServices.js +100 -135
- package/dist/commonjs/operations/sqlMigrationServices.js.map +1 -1
- package/dist/commonjs/operations/tasks.js +23 -39
- package/dist/commonjs/operations/tasks.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/dataMigrationManagementClient.js +28 -5
- package/dist/esm/dataMigrationManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +1601 -737
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/esm/operations/files.js +23 -40
- package/dist/esm/operations/files.js.map +1 -1
- package/dist/esm/operations/migrationServices.js +100 -136
- package/dist/esm/operations/migrationServices.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/projects.js +23 -40
- package/dist/esm/operations/projects.js.map +1 -1
- package/dist/esm/operations/resourceSkus.js +23 -40
- package/dist/esm/operations/resourceSkus.js.map +1 -1
- package/dist/esm/operations/serviceTasks.js +23 -40
- package/dist/esm/operations/serviceTasks.js.map +1 -1
- package/dist/esm/operations/services.js +122 -148
- package/dist/esm/operations/services.js.map +1 -1
- package/dist/esm/operations/sqlMigrationServices.js +100 -136
- package/dist/esm/operations/sqlMigrationServices.js.map +1 -1
- package/dist/esm/operations/tasks.js +23 -40
- package/dist/esm/operations/tasks.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/dataMigrationManagementClient.js +28 -5
- package/dist/react-native/dataMigrationManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +1601 -737
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/react-native/operations/files.js +23 -40
- package/dist/react-native/operations/files.js.map +1 -1
- package/dist/react-native/operations/migrationServices.js +100 -136
- package/dist/react-native/operations/migrationServices.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/projects.js +23 -40
- package/dist/react-native/operations/projects.js.map +1 -1
- package/dist/react-native/operations/resourceSkus.js +23 -40
- package/dist/react-native/operations/resourceSkus.js.map +1 -1
- package/dist/react-native/operations/serviceTasks.js +23 -40
- package/dist/react-native/operations/serviceTasks.js.map +1 -1
- package/dist/react-native/operations/services.js +122 -148
- package/dist/react-native/operations/services.js.map +1 -1
- package/dist/react-native/operations/sqlMigrationServices.js +100 -136
- package/dist/react-native/operations/sqlMigrationServices.js.map +1 -1
- package/dist/react-native/operations/tasks.js +23 -40
- package/dist/react-native/operations/tasks.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +1 -1
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
19
19
|
/** Class containing Services operations. */
|
20
20
|
class ServicesImpl {
|
21
|
+
client;
|
21
22
|
/**
|
22
23
|
* Initialize a new instance of the class Services class.
|
23
24
|
* @param client Reference to the service client
|
@@ -42,52 +43,35 @@ class ServicesImpl {
|
|
42
43
|
return this;
|
43
44
|
},
|
44
45
|
byPage: (settings) => {
|
45
|
-
if (settings
|
46
|
+
if (settings?.maxPageSize) {
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
47
48
|
}
|
48
49
|
return this.listSkusPagingPage(groupName, serviceName, options, settings);
|
49
50
|
},
|
50
51
|
};
|
51
52
|
}
|
52
|
-
listSkusPagingPage(groupName, serviceName, options, settings) {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
});
|
53
|
+
async *listSkusPagingPage(groupName, serviceName, options, settings) {
|
54
|
+
let result;
|
55
|
+
let continuationToken = settings?.continuationToken;
|
56
|
+
if (!continuationToken) {
|
57
|
+
result = await this._listSkus(groupName, serviceName, options);
|
58
|
+
let page = result.value || [];
|
59
|
+
continuationToken = result.nextLink;
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
61
|
+
yield page;
|
62
|
+
}
|
63
|
+
while (continuationToken) {
|
64
|
+
result = await this._listSkusNext(groupName, serviceName, continuationToken, options);
|
65
|
+
continuationToken = result.nextLink;
|
66
|
+
let page = result.value || [];
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
68
|
+
yield page;
|
69
|
+
}
|
71
70
|
}
|
72
|
-
listSkusPagingAll(groupName, serviceName, options) {
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listSkusPagingPage(groupName, serviceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
77
|
-
_c = _f.value;
|
78
|
-
_d = false;
|
79
|
-
const page = _c;
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
81
|
-
}
|
82
|
-
}
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
84
|
-
finally {
|
85
|
-
try {
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
87
|
-
}
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
89
|
-
}
|
90
|
-
});
|
71
|
+
async *listSkusPagingAll(groupName, serviceName, options) {
|
72
|
+
for await (const page of this.listSkusPagingPage(groupName, serviceName, options)) {
|
73
|
+
yield* page;
|
74
|
+
}
|
91
75
|
}
|
92
76
|
/**
|
93
77
|
* The Services resource is the top-level resource that represents the Azure Database Migration Service
|
@@ -105,52 +89,35 @@ class ServicesImpl {
|
|
105
89
|
return this;
|
106
90
|
},
|
107
91
|
byPage: (settings) => {
|
108
|
-
if (settings
|
92
|
+
if (settings?.maxPageSize) {
|
109
93
|
throw new Error("maxPageSize is not supported by this operation.");
|
110
94
|
}
|
111
95
|
return this.listByResourceGroupPagingPage(groupName, options, settings);
|
112
96
|
},
|
113
97
|
};
|
114
98
|
}
|
115
|
-
listByResourceGroupPagingPage(groupName, options, settings) {
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
}
|
133
|
-
});
|
99
|
+
async *listByResourceGroupPagingPage(groupName, options, settings) {
|
100
|
+
let result;
|
101
|
+
let continuationToken = settings?.continuationToken;
|
102
|
+
if (!continuationToken) {
|
103
|
+
result = await this._listByResourceGroup(groupName, options);
|
104
|
+
let page = result.value || [];
|
105
|
+
continuationToken = result.nextLink;
|
106
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
107
|
+
yield page;
|
108
|
+
}
|
109
|
+
while (continuationToken) {
|
110
|
+
result = await this._listByResourceGroupNext(groupName, continuationToken, options);
|
111
|
+
continuationToken = result.nextLink;
|
112
|
+
let page = result.value || [];
|
113
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
114
|
+
yield page;
|
115
|
+
}
|
134
116
|
}
|
135
|
-
listByResourceGroupPagingAll(groupName, options) {
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(groupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
140
|
-
_c = _f.value;
|
141
|
-
_d = false;
|
142
|
-
const page = _c;
|
143
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
144
|
-
}
|
145
|
-
}
|
146
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
147
|
-
finally {
|
148
|
-
try {
|
149
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
150
|
-
}
|
151
|
-
finally { if (e_2) throw e_2.error; }
|
152
|
-
}
|
153
|
-
});
|
117
|
+
async *listByResourceGroupPagingAll(groupName, options) {
|
118
|
+
for await (const page of this.listByResourceGroupPagingPage(groupName, options)) {
|
119
|
+
yield* page;
|
120
|
+
}
|
154
121
|
}
|
155
122
|
/**
|
156
123
|
* The services resource is the top-level resource that represents the Azure Database Migration Service
|
@@ -167,52 +134,35 @@ class ServicesImpl {
|
|
167
134
|
return this;
|
168
135
|
},
|
169
136
|
byPage: (settings) => {
|
170
|
-
if (settings
|
137
|
+
if (settings?.maxPageSize) {
|
171
138
|
throw new Error("maxPageSize is not supported by this operation.");
|
172
139
|
}
|
173
140
|
return this.listPagingPage(options, settings);
|
174
141
|
},
|
175
142
|
};
|
176
143
|
}
|
177
|
-
listPagingPage(options, settings) {
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
}
|
195
|
-
});
|
144
|
+
async *listPagingPage(options, settings) {
|
145
|
+
let result;
|
146
|
+
let continuationToken = settings?.continuationToken;
|
147
|
+
if (!continuationToken) {
|
148
|
+
result = await this._list(options);
|
149
|
+
let page = result.value || [];
|
150
|
+
continuationToken = result.nextLink;
|
151
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
152
|
+
yield page;
|
153
|
+
}
|
154
|
+
while (continuationToken) {
|
155
|
+
result = await this._listNext(continuationToken, options);
|
156
|
+
continuationToken = result.nextLink;
|
157
|
+
let page = result.value || [];
|
158
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
159
|
+
yield page;
|
160
|
+
}
|
196
161
|
}
|
197
|
-
listPagingAll(options) {
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
202
|
-
_c = _f.value;
|
203
|
-
_d = false;
|
204
|
-
const page = _c;
|
205
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
206
|
-
}
|
207
|
-
}
|
208
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
209
|
-
finally {
|
210
|
-
try {
|
211
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
212
|
-
}
|
213
|
-
finally { if (e_3) throw e_3.error; }
|
214
|
-
}
|
215
|
-
});
|
162
|
+
async *listPagingAll(options) {
|
163
|
+
for await (const page of this.listPagingPage(options)) {
|
164
|
+
yield* page;
|
165
|
+
}
|
216
166
|
}
|
217
167
|
/**
|
218
168
|
* The services resource is the top-level resource that represents the Azure Database Migration Service
|
@@ -233,14 +183,19 @@ class ServicesImpl {
|
|
233
183
|
return this.client.sendOperationRequest(args, spec);
|
234
184
|
};
|
235
185
|
const sendOperationFn = async (args, spec) => {
|
236
|
-
var _a;
|
237
186
|
let currentRawResponse = undefined;
|
238
|
-
const providedCallback =
|
187
|
+
const providedCallback = args.options?.onResponse;
|
239
188
|
const callback = (rawResponse, flatResponse) => {
|
240
189
|
currentRawResponse = rawResponse;
|
241
|
-
providedCallback
|
190
|
+
providedCallback?.(rawResponse, flatResponse);
|
191
|
+
};
|
192
|
+
const updatedArgs = {
|
193
|
+
...args,
|
194
|
+
options: {
|
195
|
+
...args.options,
|
196
|
+
onResponse: callback,
|
197
|
+
},
|
242
198
|
};
|
243
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
244
199
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
245
200
|
return {
|
246
201
|
flatResponse,
|
@@ -257,8 +212,8 @@ class ServicesImpl {
|
|
257
212
|
spec: createOrUpdateOperationSpec,
|
258
213
|
});
|
259
214
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
260
|
-
restoreFrom: options
|
261
|
-
intervalInMs: options
|
215
|
+
restoreFrom: options?.resumeFrom,
|
216
|
+
intervalInMs: options?.updateIntervalInMs,
|
262
217
|
});
|
263
218
|
await poller.poll();
|
264
219
|
return poller;
|
@@ -303,14 +258,19 @@ class ServicesImpl {
|
|
303
258
|
return this.client.sendOperationRequest(args, spec);
|
304
259
|
};
|
305
260
|
const sendOperationFn = async (args, spec) => {
|
306
|
-
var _a;
|
307
261
|
let currentRawResponse = undefined;
|
308
|
-
const providedCallback =
|
262
|
+
const providedCallback = args.options?.onResponse;
|
309
263
|
const callback = (rawResponse, flatResponse) => {
|
310
264
|
currentRawResponse = rawResponse;
|
311
|
-
providedCallback
|
265
|
+
providedCallback?.(rawResponse, flatResponse);
|
266
|
+
};
|
267
|
+
const updatedArgs = {
|
268
|
+
...args,
|
269
|
+
options: {
|
270
|
+
...args.options,
|
271
|
+
onResponse: callback,
|
272
|
+
},
|
312
273
|
};
|
313
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
314
274
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
315
275
|
return {
|
316
276
|
flatResponse,
|
@@ -327,8 +287,8 @@ class ServicesImpl {
|
|
327
287
|
spec: deleteOperationSpec,
|
328
288
|
});
|
329
289
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
330
|
-
restoreFrom: options
|
331
|
-
intervalInMs: options
|
290
|
+
restoreFrom: options?.resumeFrom,
|
291
|
+
intervalInMs: options?.updateIntervalInMs,
|
332
292
|
});
|
333
293
|
await poller.poll();
|
334
294
|
return poller;
|
@@ -359,14 +319,19 @@ class ServicesImpl {
|
|
359
319
|
return this.client.sendOperationRequest(args, spec);
|
360
320
|
};
|
361
321
|
const sendOperationFn = async (args, spec) => {
|
362
|
-
var _a;
|
363
322
|
let currentRawResponse = undefined;
|
364
|
-
const providedCallback =
|
323
|
+
const providedCallback = args.options?.onResponse;
|
365
324
|
const callback = (rawResponse, flatResponse) => {
|
366
325
|
currentRawResponse = rawResponse;
|
367
|
-
providedCallback
|
326
|
+
providedCallback?.(rawResponse, flatResponse);
|
327
|
+
};
|
328
|
+
const updatedArgs = {
|
329
|
+
...args,
|
330
|
+
options: {
|
331
|
+
...args.options,
|
332
|
+
onResponse: callback,
|
333
|
+
},
|
368
334
|
};
|
369
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
370
335
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
371
336
|
return {
|
372
337
|
flatResponse,
|
@@ -383,8 +348,8 @@ class ServicesImpl {
|
|
383
348
|
spec: updateOperationSpec,
|
384
349
|
});
|
385
350
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
386
|
-
restoreFrom: options
|
387
|
-
intervalInMs: options
|
351
|
+
restoreFrom: options?.resumeFrom,
|
352
|
+
intervalInMs: options?.updateIntervalInMs,
|
388
353
|
});
|
389
354
|
await poller.poll();
|
390
355
|
return poller;
|
@@ -426,14 +391,19 @@ class ServicesImpl {
|
|
426
391
|
return this.client.sendOperationRequest(args, spec);
|
427
392
|
};
|
428
393
|
const sendOperationFn = async (args, spec) => {
|
429
|
-
var _a;
|
430
394
|
let currentRawResponse = undefined;
|
431
|
-
const providedCallback =
|
395
|
+
const providedCallback = args.options?.onResponse;
|
432
396
|
const callback = (rawResponse, flatResponse) => {
|
433
397
|
currentRawResponse = rawResponse;
|
434
|
-
providedCallback
|
398
|
+
providedCallback?.(rawResponse, flatResponse);
|
399
|
+
};
|
400
|
+
const updatedArgs = {
|
401
|
+
...args,
|
402
|
+
options: {
|
403
|
+
...args.options,
|
404
|
+
onResponse: callback,
|
405
|
+
},
|
435
406
|
};
|
436
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
437
407
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
438
408
|
return {
|
439
409
|
flatResponse,
|
@@ -450,8 +420,8 @@ class ServicesImpl {
|
|
450
420
|
spec: startOperationSpec,
|
451
421
|
});
|
452
422
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
453
|
-
restoreFrom: options
|
454
|
-
intervalInMs: options
|
423
|
+
restoreFrom: options?.resumeFrom,
|
424
|
+
intervalInMs: options?.updateIntervalInMs,
|
455
425
|
});
|
456
426
|
await poller.poll();
|
457
427
|
return poller;
|
@@ -480,14 +450,19 @@ class ServicesImpl {
|
|
480
450
|
return this.client.sendOperationRequest(args, spec);
|
481
451
|
};
|
482
452
|
const sendOperationFn = async (args, spec) => {
|
483
|
-
var _a;
|
484
453
|
let currentRawResponse = undefined;
|
485
|
-
const providedCallback =
|
454
|
+
const providedCallback = args.options?.onResponse;
|
486
455
|
const callback = (rawResponse, flatResponse) => {
|
487
456
|
currentRawResponse = rawResponse;
|
488
|
-
providedCallback
|
457
|
+
providedCallback?.(rawResponse, flatResponse);
|
458
|
+
};
|
459
|
+
const updatedArgs = {
|
460
|
+
...args,
|
461
|
+
options: {
|
462
|
+
...args.options,
|
463
|
+
onResponse: callback,
|
464
|
+
},
|
489
465
|
};
|
490
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
491
466
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
492
467
|
return {
|
493
468
|
flatResponse,
|
@@ -504,8 +479,8 @@ class ServicesImpl {
|
|
504
479
|
spec: stopOperationSpec,
|
505
480
|
});
|
506
481
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
507
|
-
restoreFrom: options
|
508
|
-
intervalInMs: options
|
482
|
+
restoreFrom: options?.resumeFrom,
|
483
|
+
intervalInMs: options?.updateIntervalInMs,
|
509
484
|
});
|
510
485
|
await poller.poll();
|
511
486
|
return poller;
|