@azure/arm-datamigration 3.0.0-alpha.20250723.2 → 3.0.0-alpha.20250804.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
@@ -5,7 +5,6 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
10
9
|
import * as coreClient from "@azure/core-client";
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
16
15
|
/** Class containing DatabaseMigrationsMongoToCosmosDbRUMongo operations. */
|
17
16
|
export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
17
|
+
client;
|
18
18
|
/**
|
19
19
|
* Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbRUMongo class.
|
20
20
|
* @param client Reference to the service client
|
@@ -39,52 +39,35 @@ export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
|
39
39
|
return this;
|
40
40
|
},
|
41
41
|
byPage: (settings) => {
|
42
|
-
if (settings
|
42
|
+
if (settings?.maxPageSize) {
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
44
44
|
}
|
45
45
|
return this.getForScopePagingPage(resourceGroupName, targetResourceName, options, settings);
|
46
46
|
},
|
47
47
|
};
|
48
48
|
}
|
49
|
-
getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
});
|
49
|
+
async *getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
|
50
|
+
let result;
|
51
|
+
let continuationToken = settings?.continuationToken;
|
52
|
+
if (!continuationToken) {
|
53
|
+
result = await this._getForScope(resourceGroupName, targetResourceName, options);
|
54
|
+
let page = result.value || [];
|
55
|
+
continuationToken = result.nextLink;
|
56
|
+
setContinuationToken(page, continuationToken);
|
57
|
+
yield page;
|
58
|
+
}
|
59
|
+
while (continuationToken) {
|
60
|
+
result = await this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options);
|
61
|
+
continuationToken = result.nextLink;
|
62
|
+
let page = result.value || [];
|
63
|
+
setContinuationToken(page, continuationToken);
|
64
|
+
yield page;
|
65
|
+
}
|
68
66
|
}
|
69
|
-
getForScopePagingAll(resourceGroupName, targetResourceName, options) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
for (var _d = true, _e = __asyncValues(this.getForScopePagingPage(resourceGroupName, targetResourceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
74
|
-
_c = _f.value;
|
75
|
-
_d = false;
|
76
|
-
const page = _c;
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
78
|
-
}
|
79
|
-
}
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
81
|
-
finally {
|
82
|
-
try {
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
84
|
-
}
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
86
|
-
}
|
87
|
-
});
|
67
|
+
async *getForScopePagingAll(resourceGroupName, targetResourceName, options) {
|
68
|
+
for await (const page of this.getForScopePagingPage(resourceGroupName, targetResourceName, options)) {
|
69
|
+
yield* page;
|
70
|
+
}
|
88
71
|
}
|
89
72
|
/**
|
90
73
|
* Get Database Migration resource.
|
@@ -111,14 +94,19 @@ export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
|
111
94
|
return this.client.sendOperationRequest(args, spec);
|
112
95
|
};
|
113
96
|
const sendOperationFn = async (args, spec) => {
|
114
|
-
var _a;
|
115
97
|
let currentRawResponse = undefined;
|
116
|
-
const providedCallback =
|
98
|
+
const providedCallback = args.options?.onResponse;
|
117
99
|
const callback = (rawResponse, flatResponse) => {
|
118
100
|
currentRawResponse = rawResponse;
|
119
|
-
providedCallback
|
101
|
+
providedCallback?.(rawResponse, flatResponse);
|
102
|
+
};
|
103
|
+
const updatedArgs = {
|
104
|
+
...args,
|
105
|
+
options: {
|
106
|
+
...args.options,
|
107
|
+
onResponse: callback,
|
108
|
+
},
|
120
109
|
};
|
121
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
122
110
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
123
111
|
return {
|
124
112
|
flatResponse,
|
@@ -141,8 +129,8 @@ export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
|
141
129
|
spec: createOperationSpec,
|
142
130
|
});
|
143
131
|
const poller = await createHttpPoller(lro, {
|
144
|
-
restoreFrom: options
|
145
|
-
intervalInMs: options
|
132
|
+
restoreFrom: options?.resumeFrom,
|
133
|
+
intervalInMs: options?.updateIntervalInMs,
|
146
134
|
});
|
147
135
|
await poller.poll();
|
148
136
|
return poller;
|
@@ -173,14 +161,19 @@ export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
|
173
161
|
return this.client.sendOperationRequest(args, spec);
|
174
162
|
};
|
175
163
|
const sendOperationFn = async (args, spec) => {
|
176
|
-
var _a;
|
177
164
|
let currentRawResponse = undefined;
|
178
|
-
const providedCallback =
|
165
|
+
const providedCallback = args.options?.onResponse;
|
179
166
|
const callback = (rawResponse, flatResponse) => {
|
180
167
|
currentRawResponse = rawResponse;
|
181
|
-
providedCallback
|
168
|
+
providedCallback?.(rawResponse, flatResponse);
|
169
|
+
};
|
170
|
+
const updatedArgs = {
|
171
|
+
...args,
|
172
|
+
options: {
|
173
|
+
...args.options,
|
174
|
+
onResponse: callback,
|
175
|
+
},
|
182
176
|
};
|
183
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
184
177
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
185
178
|
return {
|
186
179
|
flatResponse,
|
@@ -197,8 +190,8 @@ export class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
|
|
197
190
|
spec: deleteOperationSpec,
|
198
191
|
});
|
199
192
|
const poller = await createHttpPoller(lro, {
|
200
|
-
restoreFrom: options
|
201
|
-
intervalInMs: options
|
193
|
+
restoreFrom: options?.resumeFrom,
|
194
|
+
intervalInMs: options?.updateIntervalInMs,
|
202
195
|
});
|
203
196
|
await poller.poll();
|
204
197
|
return poller;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"databaseMigrationsMongoToCosmosDbRUMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbRUMongo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,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7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wCAAwC;SAC7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DatabaseMigrationsMongoToCosmosDbRUMongo } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { DataMigrationManagementClient } from \"../dataMigrationManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationCosmosDbMongo,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DatabaseMigrationsMongoToCosmosDbRUMongo operations. */\nexport class DatabaseMigrationsMongoToCosmosDbRUMongoImpl\n implements DatabaseMigrationsMongoToCosmosDbRUMongo\n{\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbRUMongo class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n public listForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): PagedAsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n const iter = this.getForScopePagingAll(\n resourceGroupName,\n targetResourceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *getForScopePagingPage(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo[]> {\n let result: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getForScope(\n resourceGroupName,\n targetResourceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getForScopeNext(\n resourceGroupName,\n targetResourceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getForScopePagingAll(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n for await (const page of this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, migrationName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse>,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse>,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, targetResourceName, migrationName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n targetResourceName,\n migrationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n private _getForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, options },\n getForScopeOperationSpec,\n );\n }\n\n /**\n * GetForScopeNext\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param nextLink The nextLink from the previous successful call to the GetForScope method.\n * @param options The options parameters.\n */\n private _getForScopeNext(\n resourceGroupName: string,\n targetResourceName: string,\n nextLink: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, nextLink, options },\n getForScopeNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 201: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 202: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 204: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.force],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
1
|
+
{"version":3,"file":"databaseMigrationsMongoToCosmosDbRUMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbRUMongo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAe9C,4CAA4C;AAC5C,4EAA4E;AAC5E,MAAM,OAAO,4CAA4C;IAGtC,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CACjB,iBAAyB,EACzB,kBAA0B,EAC1B,OAA2E;QAE3E,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CA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KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,8LAA8L;IACpM,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wCAAwC;SAC7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wCAAwC;SAC7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DatabaseMigrationsMongoToCosmosDbRUMongo } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { DataMigrationManagementClient } from \"../dataMigrationManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationCosmosDbMongo,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse,\n DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DatabaseMigrationsMongoToCosmosDbRUMongo operations. */\nexport class DatabaseMigrationsMongoToCosmosDbRUMongoImpl\n implements DatabaseMigrationsMongoToCosmosDbRUMongo\n{\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbRUMongo class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n public listForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): PagedAsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n const iter = this.getForScopePagingAll(\n resourceGroupName,\n targetResourceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *getForScopePagingPage(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo[]> {\n let result: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getForScope(\n resourceGroupName,\n targetResourceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getForScopeNext(\n resourceGroupName,\n targetResourceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getForScopePagingAll(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n for await (const page of this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, migrationName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse>,\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoCreateOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse>,\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, targetResourceName, migrationName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoDeleteOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n targetResourceName,\n migrationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n private _getForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, options },\n getForScopeOperationSpec,\n );\n }\n\n /**\n * GetForScopeNext\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param nextLink The nextLink from the previous successful call to the GetForScope method.\n * @param options The options parameters.\n */\n private _getForScopeNext(\n resourceGroupName: string,\n targetResourceName: string,\n nextLink: string,\n options?: DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbRUMongoGetForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, nextLink, options },\n getForScopeNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 201: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 202: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n 204: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbRUMongoDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.force],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -5,7 +5,6 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
10
9
|
import * as coreClient from "@azure/core-client";
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
16
15
|
/** Class containing DatabaseMigrationsMongoToCosmosDbvCoreMongo operations. */
|
17
16
|
export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
17
|
+
client;
|
18
18
|
/**
|
19
19
|
* Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbvCoreMongo class.
|
20
20
|
* @param client Reference to the service client
|
@@ -39,52 +39,35 @@ export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
|
39
39
|
return this;
|
40
40
|
},
|
41
41
|
byPage: (settings) => {
|
42
|
-
if (settings
|
42
|
+
if (settings?.maxPageSize) {
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
44
44
|
}
|
45
45
|
return this.getForScopePagingPage(resourceGroupName, targetResourceName, options, settings);
|
46
46
|
},
|
47
47
|
};
|
48
48
|
}
|
49
|
-
getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
});
|
49
|
+
async *getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
|
50
|
+
let result;
|
51
|
+
let continuationToken = settings?.continuationToken;
|
52
|
+
if (!continuationToken) {
|
53
|
+
result = await this._getForScope(resourceGroupName, targetResourceName, options);
|
54
|
+
let page = result.value || [];
|
55
|
+
continuationToken = result.nextLink;
|
56
|
+
setContinuationToken(page, continuationToken);
|
57
|
+
yield page;
|
58
|
+
}
|
59
|
+
while (continuationToken) {
|
60
|
+
result = await this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options);
|
61
|
+
continuationToken = result.nextLink;
|
62
|
+
let page = result.value || [];
|
63
|
+
setContinuationToken(page, continuationToken);
|
64
|
+
yield page;
|
65
|
+
}
|
68
66
|
}
|
69
|
-
getForScopePagingAll(resourceGroupName, targetResourceName, options) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
for (var _d = true, _e = __asyncValues(this.getForScopePagingPage(resourceGroupName, targetResourceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
74
|
-
_c = _f.value;
|
75
|
-
_d = false;
|
76
|
-
const page = _c;
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
78
|
-
}
|
79
|
-
}
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
81
|
-
finally {
|
82
|
-
try {
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
84
|
-
}
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
86
|
-
}
|
87
|
-
});
|
67
|
+
async *getForScopePagingAll(resourceGroupName, targetResourceName, options) {
|
68
|
+
for await (const page of this.getForScopePagingPage(resourceGroupName, targetResourceName, options)) {
|
69
|
+
yield* page;
|
70
|
+
}
|
88
71
|
}
|
89
72
|
/**
|
90
73
|
* Get Database Migration resource.
|
@@ -111,14 +94,19 @@ export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
|
111
94
|
return this.client.sendOperationRequest(args, spec);
|
112
95
|
};
|
113
96
|
const sendOperationFn = async (args, spec) => {
|
114
|
-
var _a;
|
115
97
|
let currentRawResponse = undefined;
|
116
|
-
const providedCallback =
|
98
|
+
const providedCallback = args.options?.onResponse;
|
117
99
|
const callback = (rawResponse, flatResponse) => {
|
118
100
|
currentRawResponse = rawResponse;
|
119
|
-
providedCallback
|
101
|
+
providedCallback?.(rawResponse, flatResponse);
|
102
|
+
};
|
103
|
+
const updatedArgs = {
|
104
|
+
...args,
|
105
|
+
options: {
|
106
|
+
...args.options,
|
107
|
+
onResponse: callback,
|
108
|
+
},
|
120
109
|
};
|
121
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
122
110
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
123
111
|
return {
|
124
112
|
flatResponse,
|
@@ -141,8 +129,8 @@ export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
|
141
129
|
spec: createOperationSpec,
|
142
130
|
});
|
143
131
|
const poller = await createHttpPoller(lro, {
|
144
|
-
restoreFrom: options
|
145
|
-
intervalInMs: options
|
132
|
+
restoreFrom: options?.resumeFrom,
|
133
|
+
intervalInMs: options?.updateIntervalInMs,
|
146
134
|
});
|
147
135
|
await poller.poll();
|
148
136
|
return poller;
|
@@ -173,14 +161,19 @@ export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
|
173
161
|
return this.client.sendOperationRequest(args, spec);
|
174
162
|
};
|
175
163
|
const sendOperationFn = async (args, spec) => {
|
176
|
-
var _a;
|
177
164
|
let currentRawResponse = undefined;
|
178
|
-
const providedCallback =
|
165
|
+
const providedCallback = args.options?.onResponse;
|
179
166
|
const callback = (rawResponse, flatResponse) => {
|
180
167
|
currentRawResponse = rawResponse;
|
181
|
-
providedCallback
|
168
|
+
providedCallback?.(rawResponse, flatResponse);
|
169
|
+
};
|
170
|
+
const updatedArgs = {
|
171
|
+
...args,
|
172
|
+
options: {
|
173
|
+
...args.options,
|
174
|
+
onResponse: callback,
|
175
|
+
},
|
182
176
|
};
|
183
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
184
177
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
185
178
|
return {
|
186
179
|
flatResponse,
|
@@ -197,8 +190,8 @@ export class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
|
|
197
190
|
spec: deleteOperationSpec,
|
198
191
|
});
|
199
192
|
const poller = await createHttpPoller(lro, {
|
200
|
-
restoreFrom: options
|
201
|
-
intervalInMs: options
|
193
|
+
restoreFrom: options?.resumeFrom,
|
194
|
+
intervalInMs: options?.updateIntervalInMs,
|
202
195
|
});
|
203
196
|
await poller.poll();
|
204
197
|
return poller;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"databaseMigrationsMongoToCosmosDbvCoreMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAA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AAI,EAAE,2LAA2L;IACjM,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wCAAwC;SAC7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wCAAwC;SAC7D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DatabaseMigrationsMongoToCosmosDbvCoreMongo } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { DataMigrationManagementClient } from \"../dataMigrationManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationCosmosDbMongo,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DatabaseMigrationsMongoToCosmosDbvCoreMongo operations. */\nexport class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl\n implements DatabaseMigrationsMongoToCosmosDbvCoreMongo\n{\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbvCoreMongo class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n public listForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): PagedAsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n const iter = this.getForScopePagingAll(\n resourceGroupName,\n targetResourceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *getForScopePagingPage(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo[]> {\n let result: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getForScope(\n resourceGroupName,\n targetResourceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getForScopeNext(\n resourceGroupName,\n targetResourceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getForScopePagingAll(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n for await (const page of this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, migrationName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse>,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse>,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, targetResourceName, migrationName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n targetResourceName,\n migrationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n private _getForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, options },\n getForScopeOperationSpec,\n );\n }\n\n /**\n * GetForScopeNext\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param nextLink The nextLink from the previous successful call to the GetForScope method.\n * @param options The options parameters.\n */\n private _getForScopeNext(\n resourceGroupName: string,\n targetResourceName: string,\n nextLink: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, nextLink, options },\n getForScopeNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 201: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 202: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 204: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.force],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
1
|
+
{"version":3,"file":"databaseMigrationsMongoToCosmosDbvCoreMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAe9C,4CAA4C;AAC5C,+EAA+E;AAC/E,MAAM,OAAO,+CAA+C;IAGzC,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CACjB,iBAAyB,EACzB,kBAA0B,EAC1B,OAA8E;QA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AAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { DatabaseMigrationsMongoToCosmosDbvCoreMongo } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { DataMigrationManagementClient } from \"../dataMigrationManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationCosmosDbMongo,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DatabaseMigrationsMongoToCosmosDbvCoreMongo operations. */\nexport class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl\n implements DatabaseMigrationsMongoToCosmosDbvCoreMongo\n{\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbvCoreMongo class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n public listForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): PagedAsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n const iter = this.getForScopePagingAll(\n resourceGroupName,\n targetResourceName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *getForScopePagingPage(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo[]> {\n let result: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getForScope(\n resourceGroupName,\n targetResourceName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getForScopeNext(\n resourceGroupName,\n targetResourceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getForScopePagingAll(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): AsyncIterableIterator<DatabaseMigrationCosmosDbMongo> {\n for await (const page of this.getForScopePagingPage(\n resourceGroupName,\n targetResourceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Get Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, migrationName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse>,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or Update Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param parameters Details of CosmosDB for Mongo API Migration resource.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n parameters: DatabaseMigrationCosmosDbMongo,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n targetResourceName,\n migrationName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse>,\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, targetResourceName, migrationName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse,\n OperationState<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete Database Migration resource.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param migrationName Name of the migration.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n targetResourceName: string,\n migrationName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n targetResourceName,\n migrationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get Database Migration resources for the scope.\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param options The options parameters.\n */\n private _getForScope(\n resourceGroupName: string,\n targetResourceName: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, options },\n getForScopeOperationSpec,\n );\n }\n\n /**\n * GetForScopeNext\n * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this\n * value from the Azure Resource Manager API or the portal.\n * @param targetResourceName The name of the target resource/account.\n * @param nextLink The nextLink from the previous successful call to the GetForScope method.\n * @param options The options parameters.\n */\n private _getForScopeNext(\n resourceGroupName: string,\n targetResourceName: string,\n nextLink: string,\n options?: DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextOptionalParams,\n ): Promise<DatabaseMigrationsMongoToCosmosDbvCoreMongoGetForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, targetResourceName, nextLink, options },\n getForScopeNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongo,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations/{migrationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 201: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 202: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n 204: {\n headersMapper:\n Mappers.DatabaseMigrationsMongoToCosmosDbvCoreMongoDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.force],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.migrationName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/mongoClusters/{targetResourceName}/providers/Microsoft.DataMigration/databaseMigrations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationCosmosDbMongoListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetResourceName,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|