@azure/arm-datamigration 3.0.0-alpha.20250723.2 → 3.0.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/browser/dataMigrationManagementClient.js +28 -5
  2. package/dist/browser/dataMigrationManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +1601 -737
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
  8. package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
  9. package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
  10. package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
  11. package/dist/browser/operations/databaseMigrationsSqlDb.js +34 -18
  12. package/dist/browser/operations/databaseMigrationsSqlDb.js.map +1 -1
  13. package/dist/browser/operations/databaseMigrationsSqlMi.js +34 -18
  14. package/dist/browser/operations/databaseMigrationsSqlMi.js.map +1 -1
  15. package/dist/browser/operations/databaseMigrationsSqlVm.js +34 -18
  16. package/dist/browser/operations/databaseMigrationsSqlVm.js.map +1 -1
  17. package/dist/browser/operations/files.js +23 -40
  18. package/dist/browser/operations/files.js.map +1 -1
  19. package/dist/browser/operations/migrationServices.js +100 -136
  20. package/dist/browser/operations/migrationServices.js.map +1 -1
  21. package/dist/browser/operations/operations.js +23 -40
  22. package/dist/browser/operations/operations.js.map +1 -1
  23. package/dist/browser/operations/projects.js +23 -40
  24. package/dist/browser/operations/projects.js.map +1 -1
  25. package/dist/browser/operations/resourceSkus.js +23 -40
  26. package/dist/browser/operations/resourceSkus.js.map +1 -1
  27. package/dist/browser/operations/serviceTasks.js +23 -40
  28. package/dist/browser/operations/serviceTasks.js.map +1 -1
  29. package/dist/browser/operations/services.js +122 -148
  30. package/dist/browser/operations/services.js.map +1 -1
  31. package/dist/browser/operations/sqlMigrationServices.js +100 -136
  32. package/dist/browser/operations/sqlMigrationServices.js.map +1 -1
  33. package/dist/browser/operations/tasks.js +23 -40
  34. package/dist/browser/operations/tasks.js.map +1 -1
  35. package/dist/browser/operations/usages.js +23 -40
  36. package/dist/browser/operations/usages.js.map +1 -1
  37. package/dist/browser/pagingHelper.js +2 -4
  38. package/dist/browser/pagingHelper.js.map +1 -1
  39. package/dist/commonjs/dataMigrationManagementClient.js +28 -5
  40. package/dist/commonjs/dataMigrationManagementClient.js.map +1 -1
  41. package/dist/commonjs/lroImpl.js +7 -3
  42. package/dist/commonjs/lroImpl.js.map +1 -1
  43. package/dist/commonjs/models/mappers.js +1601 -737
  44. package/dist/commonjs/models/mappers.js.map +1 -1
  45. package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -51
  46. package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
  47. package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -51
  48. package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
  49. package/dist/commonjs/operations/databaseMigrationsSqlDb.js +34 -18
  50. package/dist/commonjs/operations/databaseMigrationsSqlDb.js.map +1 -1
  51. package/dist/commonjs/operations/databaseMigrationsSqlMi.js +34 -18
  52. package/dist/commonjs/operations/databaseMigrationsSqlMi.js.map +1 -1
  53. package/dist/commonjs/operations/databaseMigrationsSqlVm.js +34 -18
  54. package/dist/commonjs/operations/databaseMigrationsSqlVm.js.map +1 -1
  55. package/dist/commonjs/operations/files.js +23 -39
  56. package/dist/commonjs/operations/files.js.map +1 -1
  57. package/dist/commonjs/operations/migrationServices.js +100 -135
  58. package/dist/commonjs/operations/migrationServices.js.map +1 -1
  59. package/dist/commonjs/operations/operations.js +23 -39
  60. package/dist/commonjs/operations/operations.js.map +1 -1
  61. package/dist/commonjs/operations/projects.js +23 -39
  62. package/dist/commonjs/operations/projects.js.map +1 -1
  63. package/dist/commonjs/operations/resourceSkus.js +23 -39
  64. package/dist/commonjs/operations/resourceSkus.js.map +1 -1
  65. package/dist/commonjs/operations/serviceTasks.js +23 -39
  66. package/dist/commonjs/operations/serviceTasks.js.map +1 -1
  67. package/dist/commonjs/operations/services.js +122 -147
  68. package/dist/commonjs/operations/services.js.map +1 -1
  69. package/dist/commonjs/operations/sqlMigrationServices.js +100 -135
  70. package/dist/commonjs/operations/sqlMigrationServices.js.map +1 -1
  71. package/dist/commonjs/operations/tasks.js +23 -39
  72. package/dist/commonjs/operations/tasks.js.map +1 -1
  73. package/dist/commonjs/operations/usages.js +23 -39
  74. package/dist/commonjs/operations/usages.js.map +1 -1
  75. package/dist/commonjs/pagingHelper.js +2 -4
  76. package/dist/commonjs/pagingHelper.js.map +1 -1
  77. package/dist/commonjs/tsdoc-metadata.json +1 -1
  78. package/dist/esm/dataMigrationManagementClient.js +28 -5
  79. package/dist/esm/dataMigrationManagementClient.js.map +1 -1
  80. package/dist/esm/lroImpl.js +7 -3
  81. package/dist/esm/lroImpl.js.map +1 -1
  82. package/dist/esm/models/mappers.js +1601 -737
  83. package/dist/esm/models/mappers.js.map +1 -1
  84. package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
  85. package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
  86. package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
  87. package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
  88. package/dist/esm/operations/databaseMigrationsSqlDb.js +34 -18
  89. package/dist/esm/operations/databaseMigrationsSqlDb.js.map +1 -1
  90. package/dist/esm/operations/databaseMigrationsSqlMi.js +34 -18
  91. package/dist/esm/operations/databaseMigrationsSqlMi.js.map +1 -1
  92. package/dist/esm/operations/databaseMigrationsSqlVm.js +34 -18
  93. package/dist/esm/operations/databaseMigrationsSqlVm.js.map +1 -1
  94. package/dist/esm/operations/files.js +23 -40
  95. package/dist/esm/operations/files.js.map +1 -1
  96. package/dist/esm/operations/migrationServices.js +100 -136
  97. package/dist/esm/operations/migrationServices.js.map +1 -1
  98. package/dist/esm/operations/operations.js +23 -40
  99. package/dist/esm/operations/operations.js.map +1 -1
  100. package/dist/esm/operations/projects.js +23 -40
  101. package/dist/esm/operations/projects.js.map +1 -1
  102. package/dist/esm/operations/resourceSkus.js +23 -40
  103. package/dist/esm/operations/resourceSkus.js.map +1 -1
  104. package/dist/esm/operations/serviceTasks.js +23 -40
  105. package/dist/esm/operations/serviceTasks.js.map +1 -1
  106. package/dist/esm/operations/services.js +122 -148
  107. package/dist/esm/operations/services.js.map +1 -1
  108. package/dist/esm/operations/sqlMigrationServices.js +100 -136
  109. package/dist/esm/operations/sqlMigrationServices.js.map +1 -1
  110. package/dist/esm/operations/tasks.js +23 -40
  111. package/dist/esm/operations/tasks.js.map +1 -1
  112. package/dist/esm/operations/usages.js +23 -40
  113. package/dist/esm/operations/usages.js.map +1 -1
  114. package/dist/esm/pagingHelper.js +2 -4
  115. package/dist/esm/pagingHelper.js.map +1 -1
  116. package/dist/react-native/dataMigrationManagementClient.js +28 -5
  117. package/dist/react-native/dataMigrationManagementClient.js.map +1 -1
  118. package/dist/react-native/lroImpl.js +7 -3
  119. package/dist/react-native/lroImpl.js.map +1 -1
  120. package/dist/react-native/models/mappers.js +1601 -737
  121. package/dist/react-native/models/mappers.js.map +1 -1
  122. package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
  123. package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
  124. package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
  125. package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
  126. package/dist/react-native/operations/databaseMigrationsSqlDb.js +34 -18
  127. package/dist/react-native/operations/databaseMigrationsSqlDb.js.map +1 -1
  128. package/dist/react-native/operations/databaseMigrationsSqlMi.js +34 -18
  129. package/dist/react-native/operations/databaseMigrationsSqlMi.js.map +1 -1
  130. package/dist/react-native/operations/databaseMigrationsSqlVm.js +34 -18
  131. package/dist/react-native/operations/databaseMigrationsSqlVm.js.map +1 -1
  132. package/dist/react-native/operations/files.js +23 -40
  133. package/dist/react-native/operations/files.js.map +1 -1
  134. package/dist/react-native/operations/migrationServices.js +100 -136
  135. package/dist/react-native/operations/migrationServices.js.map +1 -1
  136. package/dist/react-native/operations/operations.js +23 -40
  137. package/dist/react-native/operations/operations.js.map +1 -1
  138. package/dist/react-native/operations/projects.js +23 -40
  139. package/dist/react-native/operations/projects.js.map +1 -1
  140. package/dist/react-native/operations/resourceSkus.js +23 -40
  141. package/dist/react-native/operations/resourceSkus.js.map +1 -1
  142. package/dist/react-native/operations/serviceTasks.js +23 -40
  143. package/dist/react-native/operations/serviceTasks.js.map +1 -1
  144. package/dist/react-native/operations/services.js +122 -148
  145. package/dist/react-native/operations/services.js.map +1 -1
  146. package/dist/react-native/operations/sqlMigrationServices.js +100 -136
  147. package/dist/react-native/operations/sqlMigrationServices.js.map +1 -1
  148. package/dist/react-native/operations/tasks.js +23 -40
  149. package/dist/react-native/operations/tasks.js.map +1 -1
  150. package/dist/react-native/operations/usages.js +23 -40
  151. package/dist/react-native/operations/usages.js.map +1 -1
  152. package/dist/react-native/pagingHelper.js +2 -4
  153. package/dist/react-native/pagingHelper.js.map +1 -1
  154. package/package.json +1 -1
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing DatabaseMigrationsMongoToCosmosDbRUMongo operations. */
20
20
  class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbRUMongo class.
23
24
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.getForScopePagingPage(resourceGroupName, targetResourceName, options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* getForScopePagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._getForScope(resourceGroupName, targetResourceName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._getForScope(resourceGroupName, targetResourceName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- getForScopePagingAll(resourceGroupName, targetResourceName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* getForScopePagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.getForScopePagingPage(resourceGroupName, targetResourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *getForScopePagingAll(resourceGroupName, targetResourceName, options) {
72
+ for await (const page of this.getForScopePagingPage(resourceGroupName, targetResourceName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Get Database Migration resource.
@@ -114,14 +98,19 @@ class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
114
98
  return this.client.sendOperationRequest(args, spec);
115
99
  };
116
100
  const sendOperationFn = async (args, spec) => {
117
- var _a;
118
101
  let currentRawResponse = undefined;
119
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
102
+ const providedCallback = args.options?.onResponse;
120
103
  const callback = (rawResponse, flatResponse) => {
121
104
  currentRawResponse = rawResponse;
122
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
105
+ providedCallback?.(rawResponse, flatResponse);
106
+ };
107
+ const updatedArgs = {
108
+ ...args,
109
+ options: {
110
+ ...args.options,
111
+ onResponse: callback,
112
+ },
123
113
  };
124
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
125
114
  const flatResponse = await directSendOperation(updatedArgs, spec);
126
115
  return {
127
116
  flatResponse,
@@ -144,8 +133,8 @@ class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
144
133
  spec: createOperationSpec,
145
134
  });
146
135
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
147
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
148
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
136
+ restoreFrom: options?.resumeFrom,
137
+ intervalInMs: options?.updateIntervalInMs,
149
138
  });
150
139
  await poller.poll();
151
140
  return poller;
@@ -176,14 +165,19 @@ class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
176
165
  return this.client.sendOperationRequest(args, spec);
177
166
  };
178
167
  const sendOperationFn = async (args, spec) => {
179
- var _a;
180
168
  let currentRawResponse = undefined;
181
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
169
+ const providedCallback = args.options?.onResponse;
182
170
  const callback = (rawResponse, flatResponse) => {
183
171
  currentRawResponse = rawResponse;
184
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
172
+ providedCallback?.(rawResponse, flatResponse);
173
+ };
174
+ const updatedArgs = {
175
+ ...args,
176
+ options: {
177
+ ...args.options,
178
+ onResponse: callback,
179
+ },
185
180
  };
186
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
187
181
  const flatResponse = await directSendOperation(updatedArgs, spec);
188
182
  return {
189
183
  flatResponse,
@@ -200,8 +194,8 @@ class DatabaseMigrationsMongoToCosmosDbRUMongoImpl {
200
194
  spec: deleteOperationSpec,
201
195
  });
202
196
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
203
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
204
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
197
+ restoreFrom: options?.resumeFrom,
198
+ intervalInMs: options?.updateIntervalInMs,
205
199
  });
206
200
  await poller.poll();
207
201
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"databaseMigr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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"]}
1
+ {"version":3,"file":"databaseMigrationsMongoToCosmosDbRUMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbRUMongo.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,4EAA4E;AAC5E,MAAa,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,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW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AC5B,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"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing DatabaseMigrationsMongoToCosmosDbvCoreMongo operations. */
20
20
  class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class DatabaseMigrationsMongoToCosmosDbvCoreMongo class.
23
24
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.getForScopePagingPage(resourceGroupName, targetResourceName, options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* getForScopePagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._getForScope(resourceGroupName, targetResourceName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *getForScopePagingPage(resourceGroupName, targetResourceName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._getForScope(resourceGroupName, targetResourceName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._getForScopeNext(resourceGroupName, targetResourceName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- getForScopePagingAll(resourceGroupName, targetResourceName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* getForScopePagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.getForScopePagingPage(resourceGroupName, targetResourceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *getForScopePagingAll(resourceGroupName, targetResourceName, options) {
72
+ for await (const page of this.getForScopePagingPage(resourceGroupName, targetResourceName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Get Database Migration resource.
@@ -114,14 +98,19 @@ class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
114
98
  return this.client.sendOperationRequest(args, spec);
115
99
  };
116
100
  const sendOperationFn = async (args, spec) => {
117
- var _a;
118
101
  let currentRawResponse = undefined;
119
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
102
+ const providedCallback = args.options?.onResponse;
120
103
  const callback = (rawResponse, flatResponse) => {
121
104
  currentRawResponse = rawResponse;
122
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
105
+ providedCallback?.(rawResponse, flatResponse);
106
+ };
107
+ const updatedArgs = {
108
+ ...args,
109
+ options: {
110
+ ...args.options,
111
+ onResponse: callback,
112
+ },
123
113
  };
124
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
125
114
  const flatResponse = await directSendOperation(updatedArgs, spec);
126
115
  return {
127
116
  flatResponse,
@@ -144,8 +133,8 @@ class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
144
133
  spec: createOperationSpec,
145
134
  });
146
135
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
147
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
148
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
136
+ restoreFrom: options?.resumeFrom,
137
+ intervalInMs: options?.updateIntervalInMs,
149
138
  });
150
139
  await poller.poll();
151
140
  return poller;
@@ -176,14 +165,19 @@ class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
176
165
  return this.client.sendOperationRequest(args, spec);
177
166
  };
178
167
  const sendOperationFn = async (args, spec) => {
179
- var _a;
180
168
  let currentRawResponse = undefined;
181
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
169
+ const providedCallback = args.options?.onResponse;
182
170
  const callback = (rawResponse, flatResponse) => {
183
171
  currentRawResponse = rawResponse;
184
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
172
+ providedCallback?.(rawResponse, flatResponse);
173
+ };
174
+ const updatedArgs = {
175
+ ...args,
176
+ options: {
177
+ ...args.options,
178
+ onResponse: callback,
179
+ },
185
180
  };
186
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
187
181
  const flatResponse = await directSendOperation(updatedArgs, spec);
188
182
  return {
189
183
  flatResponse,
@@ -200,8 +194,8 @@ class DatabaseMigrationsMongoToCosmosDbvCoreMongoImpl {
200
194
  spec: deleteOperationSpec,
201
195
  });
202
196
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
203
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
204
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
197
+ restoreFrom: options?.resumeFrom,
198
+ intervalInMs: options?.updateIntervalInMs,
205
199
  });
206
200
  await poller.poll();
207
201
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"databaseMigrationsMongoToCosmosDbvCoreMongo.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,+EAA+E;AAC/E,MAAa,+CAA+C;IAK1D;;;OAGG;IACH,YAAY,MAAqC;QAC/C,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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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,+EAA+E;AAC/E,MAAa,+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;QAE9E,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,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,qBAAqB,CAC/B,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF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,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"]}