@azure/arm-datamigration 3.0.0-alpha.20250620.1 → 3.0.0-alpha.20250721.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 (123) hide show
  1. package/dist/browser/dataMigrationManagementClient.js +24 -5
  2. package/dist/browser/dataMigrationManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +11 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +1468 -675
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/databaseMigrationsSqlMi.js +34 -18
  8. package/dist/browser/operations/databaseMigrationsSqlMi.js.map +1 -1
  9. package/dist/browser/operations/databaseMigrationsSqlVm.js +34 -18
  10. package/dist/browser/operations/databaseMigrationsSqlVm.js.map +1 -1
  11. package/dist/browser/operations/files.js +23 -40
  12. package/dist/browser/operations/files.js.map +1 -1
  13. package/dist/browser/operations/operations.js +23 -40
  14. package/dist/browser/operations/operations.js.map +1 -1
  15. package/dist/browser/operations/projects.js +23 -40
  16. package/dist/browser/operations/projects.js.map +1 -1
  17. package/dist/browser/operations/resourceSkus.js +23 -40
  18. package/dist/browser/operations/resourceSkus.js.map +1 -1
  19. package/dist/browser/operations/serviceTasks.js +23 -40
  20. package/dist/browser/operations/serviceTasks.js.map +1 -1
  21. package/dist/browser/operations/services.js +122 -148
  22. package/dist/browser/operations/services.js.map +1 -1
  23. package/dist/browser/operations/sqlMigrationServices.js +100 -136
  24. package/dist/browser/operations/sqlMigrationServices.js.map +1 -1
  25. package/dist/browser/operations/tasks.js +23 -40
  26. package/dist/browser/operations/tasks.js.map +1 -1
  27. package/dist/browser/operations/usages.js +23 -40
  28. package/dist/browser/operations/usages.js.map +1 -1
  29. package/dist/browser/pagingHelper.js +2 -4
  30. package/dist/browser/pagingHelper.js.map +1 -1
  31. package/dist/commonjs/dataMigrationManagementClient.js +24 -5
  32. package/dist/commonjs/dataMigrationManagementClient.js.map +1 -1
  33. package/dist/commonjs/lroImpl.js +11 -3
  34. package/dist/commonjs/lroImpl.js.map +1 -1
  35. package/dist/commonjs/models/mappers.js +1468 -675
  36. package/dist/commonjs/models/mappers.js.map +1 -1
  37. package/dist/commonjs/operations/databaseMigrationsSqlMi.js +34 -18
  38. package/dist/commonjs/operations/databaseMigrationsSqlMi.js.map +1 -1
  39. package/dist/commonjs/operations/databaseMigrationsSqlVm.js +34 -18
  40. package/dist/commonjs/operations/databaseMigrationsSqlVm.js.map +1 -1
  41. package/dist/commonjs/operations/files.js +23 -39
  42. package/dist/commonjs/operations/files.js.map +1 -1
  43. package/dist/commonjs/operations/operations.js +23 -39
  44. package/dist/commonjs/operations/operations.js.map +1 -1
  45. package/dist/commonjs/operations/projects.js +23 -39
  46. package/dist/commonjs/operations/projects.js.map +1 -1
  47. package/dist/commonjs/operations/resourceSkus.js +23 -39
  48. package/dist/commonjs/operations/resourceSkus.js.map +1 -1
  49. package/dist/commonjs/operations/serviceTasks.js +23 -39
  50. package/dist/commonjs/operations/serviceTasks.js.map +1 -1
  51. package/dist/commonjs/operations/services.js +122 -147
  52. package/dist/commonjs/operations/services.js.map +1 -1
  53. package/dist/commonjs/operations/sqlMigrationServices.js +100 -135
  54. package/dist/commonjs/operations/sqlMigrationServices.js.map +1 -1
  55. package/dist/commonjs/operations/tasks.js +23 -39
  56. package/dist/commonjs/operations/tasks.js.map +1 -1
  57. package/dist/commonjs/operations/usages.js +23 -39
  58. package/dist/commonjs/operations/usages.js.map +1 -1
  59. package/dist/commonjs/pagingHelper.js +2 -4
  60. package/dist/commonjs/pagingHelper.js.map +1 -1
  61. package/dist/commonjs/tsdoc-metadata.json +11 -11
  62. package/dist/esm/dataMigrationManagementClient.js +24 -5
  63. package/dist/esm/dataMigrationManagementClient.js.map +1 -1
  64. package/dist/esm/lroImpl.js +11 -3
  65. package/dist/esm/lroImpl.js.map +1 -1
  66. package/dist/esm/models/mappers.js +1468 -675
  67. package/dist/esm/models/mappers.js.map +1 -1
  68. package/dist/esm/operations/databaseMigrationsSqlMi.js +34 -18
  69. package/dist/esm/operations/databaseMigrationsSqlMi.js.map +1 -1
  70. package/dist/esm/operations/databaseMigrationsSqlVm.js +34 -18
  71. package/dist/esm/operations/databaseMigrationsSqlVm.js.map +1 -1
  72. package/dist/esm/operations/files.js +23 -40
  73. package/dist/esm/operations/files.js.map +1 -1
  74. package/dist/esm/operations/operations.js +23 -40
  75. package/dist/esm/operations/operations.js.map +1 -1
  76. package/dist/esm/operations/projects.js +23 -40
  77. package/dist/esm/operations/projects.js.map +1 -1
  78. package/dist/esm/operations/resourceSkus.js +23 -40
  79. package/dist/esm/operations/resourceSkus.js.map +1 -1
  80. package/dist/esm/operations/serviceTasks.js +23 -40
  81. package/dist/esm/operations/serviceTasks.js.map +1 -1
  82. package/dist/esm/operations/services.js +122 -148
  83. package/dist/esm/operations/services.js.map +1 -1
  84. package/dist/esm/operations/sqlMigrationServices.js +100 -136
  85. package/dist/esm/operations/sqlMigrationServices.js.map +1 -1
  86. package/dist/esm/operations/tasks.js +23 -40
  87. package/dist/esm/operations/tasks.js.map +1 -1
  88. package/dist/esm/operations/usages.js +23 -40
  89. package/dist/esm/operations/usages.js.map +1 -1
  90. package/dist/esm/pagingHelper.js +2 -4
  91. package/dist/esm/pagingHelper.js.map +1 -1
  92. package/dist/react-native/dataMigrationManagementClient.js +24 -5
  93. package/dist/react-native/dataMigrationManagementClient.js.map +1 -1
  94. package/dist/react-native/lroImpl.js +11 -3
  95. package/dist/react-native/lroImpl.js.map +1 -1
  96. package/dist/react-native/models/mappers.js +1468 -675
  97. package/dist/react-native/models/mappers.js.map +1 -1
  98. package/dist/react-native/operations/databaseMigrationsSqlMi.js +34 -18
  99. package/dist/react-native/operations/databaseMigrationsSqlMi.js.map +1 -1
  100. package/dist/react-native/operations/databaseMigrationsSqlVm.js +34 -18
  101. package/dist/react-native/operations/databaseMigrationsSqlVm.js.map +1 -1
  102. package/dist/react-native/operations/files.js +23 -40
  103. package/dist/react-native/operations/files.js.map +1 -1
  104. package/dist/react-native/operations/operations.js +23 -40
  105. package/dist/react-native/operations/operations.js.map +1 -1
  106. package/dist/react-native/operations/projects.js +23 -40
  107. package/dist/react-native/operations/projects.js.map +1 -1
  108. package/dist/react-native/operations/resourceSkus.js +23 -40
  109. package/dist/react-native/operations/resourceSkus.js.map +1 -1
  110. package/dist/react-native/operations/serviceTasks.js +23 -40
  111. package/dist/react-native/operations/serviceTasks.js.map +1 -1
  112. package/dist/react-native/operations/services.js +122 -148
  113. package/dist/react-native/operations/services.js.map +1 -1
  114. package/dist/react-native/operations/sqlMigrationServices.js +100 -136
  115. package/dist/react-native/operations/sqlMigrationServices.js.map +1 -1
  116. package/dist/react-native/operations/tasks.js +23 -40
  117. package/dist/react-native/operations/tasks.js.map +1 -1
  118. package/dist/react-native/operations/usages.js +23 -40
  119. package/dist/react-native/operations/usages.js.map +1 -1
  120. package/dist/react-native/pagingHelper.js +2 -4
  121. package/dist/react-native/pagingHelper.js.map +1 -1
  122. package/package.json +2 -2
  123. /package/review/{arm-datamigration.api.md → arm-datamigration-node.api.md} +0 -0
@@ -16,6 +16,7 @@ const core_lro_1 = require("@azure/core-lro");
16
16
  const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /** Class containing DatabaseMigrationsSqlMi operations. */
18
18
  class DatabaseMigrationsSqlMiImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class DatabaseMigrationsSqlMi class.
21
22
  * @param client Reference to the service client
@@ -48,14 +49,19 @@ class DatabaseMigrationsSqlMiImpl {
48
49
  return this.client.sendOperationRequest(args, spec);
49
50
  };
50
51
  const sendOperation = async (args, spec) => {
51
- var _a;
52
52
  let currentRawResponse = undefined;
53
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
53
+ const providedCallback = args.options?.onResponse;
54
54
  const callback = (rawResponse, flatResponse) => {
55
55
  currentRawResponse = rawResponse;
56
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
56
+ providedCallback?.(rawResponse, flatResponse);
57
+ };
58
+ const updatedArgs = {
59
+ ...args,
60
+ options: {
61
+ ...args.options,
62
+ onResponse: callback
63
+ }
57
64
  };
58
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
59
65
  const flatResponse = await directSendOperation(updatedArgs, spec);
60
66
  return {
61
67
  flatResponse,
@@ -74,8 +80,8 @@ class DatabaseMigrationsSqlMiImpl {
74
80
  options
75
81
  }, createOrUpdateOperationSpec);
76
82
  const poller = new core_lro_1.LroEngine(lro, {
77
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
78
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
83
+ resumeFrom: options?.resumeFrom,
84
+ intervalInMs: options?.updateIntervalInMs
79
85
  });
80
86
  await poller.poll();
81
87
  return poller;
@@ -107,14 +113,19 @@ class DatabaseMigrationsSqlMiImpl {
107
113
  return this.client.sendOperationRequest(args, spec);
108
114
  };
109
115
  const sendOperation = async (args, spec) => {
110
- var _a;
111
116
  let currentRawResponse = undefined;
112
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
117
+ const providedCallback = args.options?.onResponse;
113
118
  const callback = (rawResponse, flatResponse) => {
114
119
  currentRawResponse = rawResponse;
115
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
120
+ providedCallback?.(rawResponse, flatResponse);
121
+ };
122
+ const updatedArgs = {
123
+ ...args,
124
+ options: {
125
+ ...args.options,
126
+ onResponse: callback
127
+ }
116
128
  };
117
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
118
129
  const flatResponse = await directSendOperation(updatedArgs, spec);
119
130
  return {
120
131
  flatResponse,
@@ -133,8 +144,8 @@ class DatabaseMigrationsSqlMiImpl {
133
144
  options
134
145
  }, cancelOperationSpec);
135
146
  const poller = new core_lro_1.LroEngine(lro, {
136
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
137
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
147
+ resumeFrom: options?.resumeFrom,
148
+ intervalInMs: options?.updateIntervalInMs
138
149
  });
139
150
  await poller.poll();
140
151
  return poller;
@@ -166,14 +177,19 @@ class DatabaseMigrationsSqlMiImpl {
166
177
  return this.client.sendOperationRequest(args, spec);
167
178
  };
168
179
  const sendOperation = async (args, spec) => {
169
- var _a;
170
180
  let currentRawResponse = undefined;
171
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
181
+ const providedCallback = args.options?.onResponse;
172
182
  const callback = (rawResponse, flatResponse) => {
173
183
  currentRawResponse = rawResponse;
174
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
184
+ providedCallback?.(rawResponse, flatResponse);
185
+ };
186
+ const updatedArgs = {
187
+ ...args,
188
+ options: {
189
+ ...args.options,
190
+ onResponse: callback
191
+ }
175
192
  };
176
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
177
193
  const flatResponse = await directSendOperation(updatedArgs, spec);
178
194
  return {
179
195
  flatResponse,
@@ -192,8 +208,8 @@ class DatabaseMigrationsSqlMiImpl {
192
208
  options
193
209
  }, cutoverOperationSpec);
194
210
  const poller = new core_lro_1.LroEngine(lro, {
195
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
196
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
211
+ resumeFrom: options?.resumeFrom,
212
+ intervalInMs: options?.updateIntervalInMs
197
213
  });
198
214
  await poller.poll();
199
215
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"databaseMigrationsSqlMi.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsSqlMi.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAi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UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,mBAAmB;QAC9B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,+MAA+M;IACjN,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9D,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,mBAAmB;QAC9B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,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 { DatabaseMigrationsSqlMi } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationsSqlMiGetOptionalParams,\n DatabaseMigrationsSqlMiGetResponse,\n DatabaseMigrationSqlMi,\n DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams,\n DatabaseMigrationsSqlMiCreateOrUpdateResponse,\n MigrationOperationInput,\n DatabaseMigrationsSqlMiCancelOptionalParams,\n DatabaseMigrationsSqlMiCutoverOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing DatabaseMigrationsSqlMi operations. */\nexport class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsSqlMi class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n options?: DatabaseMigrationsSqlMiGetOptionalParams\n ): Promise<DatabaseMigrationsSqlMiGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, managedInstanceName, targetDbName, 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlMi,\n options?: DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<DatabaseMigrationsSqlMiCreateOrUpdateResponse>,\n DatabaseMigrationsSqlMiCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<DatabaseMigrationsSqlMiCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlMi,\n options?: DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams\n ): Promise<DatabaseMigrationsSqlMiCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Stop migrations in progress for the database\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cancel will be initiated.\n * @param options The options parameters.\n */\n async beginCancel(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCancelOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n cancelOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Stop migrations in progress for the database\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cancel will be initiated.\n * @param options The options parameters.\n */\n async beginCancelAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCancelOptionalParams\n ): Promise<void> {\n const poller = await this.beginCancel(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Initiate cutover for online migration in progress for the database.\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cutover will be initiated.\n * @param options The options parameters.\n */\n async beginCutover(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCutoverOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n cutoverOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Initiate cutover for online migration in progress for the database.\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cutover will be initiated.\n * @param options The options parameters.\n */\n async beginCutoverAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCutoverOptionalParams\n ): Promise<void> {\n const poller = await this.beginCutover(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n default: {}\n },\n queryParameters: [\n Parameters.migrationOperationId,\n Parameters.expand,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n default: {}\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cutoverOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"databaseMigrationsSqlMi.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsSqlMi.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAA4E;AAC5E,8CAAwC;AAYxC,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,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,+MAA+M;IACjN,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9D,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,mBAAmB;QAC9B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,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 { DatabaseMigrationsSqlMi } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationsSqlMiGetOptionalParams,\n DatabaseMigrationsSqlMiGetResponse,\n DatabaseMigrationSqlMi,\n DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams,\n DatabaseMigrationsSqlMiCreateOrUpdateResponse,\n MigrationOperationInput,\n DatabaseMigrationsSqlMiCancelOptionalParams,\n DatabaseMigrationsSqlMiCutoverOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing DatabaseMigrationsSqlMi operations. */\nexport class DatabaseMigrationsSqlMiImpl implements DatabaseMigrationsSqlMi {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsSqlMi class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n options?: DatabaseMigrationsSqlMiGetOptionalParams\n ): Promise<DatabaseMigrationsSqlMiGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, managedInstanceName, targetDbName, 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlMi,\n options?: DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<DatabaseMigrationsSqlMiCreateOrUpdateResponse>,\n DatabaseMigrationsSqlMiCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<DatabaseMigrationsSqlMiCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: 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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlMi,\n options?: DatabaseMigrationsSqlMiCreateOrUpdateOptionalParams\n ): Promise<DatabaseMigrationsSqlMiCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Stop migrations in progress for the database\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cancel will be initiated.\n * @param options The options parameters.\n */\n async beginCancel(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCancelOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n cancelOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Stop migrations in progress for the database\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cancel will be initiated.\n * @param options The options parameters.\n */\n async beginCancelAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCancelOptionalParams\n ): Promise<void> {\n const poller = await this.beginCancel(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Initiate cutover for online migration in progress for the database.\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cutover will be initiated.\n * @param options The options parameters.\n */\n async beginCutover(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCutoverOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n },\n cutoverOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Initiate cutover for online migration in progress for the database.\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 managedInstanceName\n * @param targetDbName The name of the target database.\n * @param parameters Required migration operation ID for which cutover will be initiated.\n * @param options The options parameters.\n */\n async beginCutoverAndWait(\n resourceGroupName: string,\n managedInstanceName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlMiCutoverOptionalParams\n ): Promise<void> {\n const poller = await this.beginCutover(\n resourceGroupName,\n managedInstanceName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n default: {}\n },\n queryParameters: [\n Parameters.migrationOperationId,\n Parameters.expand,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationSqlMi\n },\n default: {}\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cutoverOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.managedInstanceName,\n Parameters.targetDbName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const core_lro_1 = require("@azure/core-lro");
16
16
  const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /** Class containing DatabaseMigrationsSqlVm operations. */
18
18
  class DatabaseMigrationsSqlVmImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class DatabaseMigrationsSqlVm class.
21
22
  * @param client Reference to the service client
@@ -48,14 +49,19 @@ class DatabaseMigrationsSqlVmImpl {
48
49
  return this.client.sendOperationRequest(args, spec);
49
50
  };
50
51
  const sendOperation = async (args, spec) => {
51
- var _a;
52
52
  let currentRawResponse = undefined;
53
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
53
+ const providedCallback = args.options?.onResponse;
54
54
  const callback = (rawResponse, flatResponse) => {
55
55
  currentRawResponse = rawResponse;
56
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
56
+ providedCallback?.(rawResponse, flatResponse);
57
+ };
58
+ const updatedArgs = {
59
+ ...args,
60
+ options: {
61
+ ...args.options,
62
+ onResponse: callback
63
+ }
57
64
  };
58
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
59
65
  const flatResponse = await directSendOperation(updatedArgs, spec);
60
66
  return {
61
67
  flatResponse,
@@ -74,8 +80,8 @@ class DatabaseMigrationsSqlVmImpl {
74
80
  options
75
81
  }, createOrUpdateOperationSpec);
76
82
  const poller = new core_lro_1.LroEngine(lro, {
77
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
78
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
83
+ resumeFrom: options?.resumeFrom,
84
+ intervalInMs: options?.updateIntervalInMs
79
85
  });
80
86
  await poller.poll();
81
87
  return poller;
@@ -107,14 +113,19 @@ class DatabaseMigrationsSqlVmImpl {
107
113
  return this.client.sendOperationRequest(args, spec);
108
114
  };
109
115
  const sendOperation = async (args, spec) => {
110
- var _a;
111
116
  let currentRawResponse = undefined;
112
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
117
+ const providedCallback = args.options?.onResponse;
113
118
  const callback = (rawResponse, flatResponse) => {
114
119
  currentRawResponse = rawResponse;
115
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
120
+ providedCallback?.(rawResponse, flatResponse);
121
+ };
122
+ const updatedArgs = {
123
+ ...args,
124
+ options: {
125
+ ...args.options,
126
+ onResponse: callback
127
+ }
116
128
  };
117
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
118
129
  const flatResponse = await directSendOperation(updatedArgs, spec);
119
130
  return {
120
131
  flatResponse,
@@ -133,8 +144,8 @@ class DatabaseMigrationsSqlVmImpl {
133
144
  options
134
145
  }, cancelOperationSpec);
135
146
  const poller = new core_lro_1.LroEngine(lro, {
136
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
137
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
147
+ resumeFrom: options?.resumeFrom,
148
+ intervalInMs: options?.updateIntervalInMs
138
149
  });
139
150
  await poller.poll();
140
151
  return poller;
@@ -166,14 +177,19 @@ class DatabaseMigrationsSqlVmImpl {
166
177
  return this.client.sendOperationRequest(args, spec);
167
178
  };
168
179
  const sendOperation = async (args, spec) => {
169
- var _a;
170
180
  let currentRawResponse = undefined;
171
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
181
+ const providedCallback = args.options?.onResponse;
172
182
  const callback = (rawResponse, flatResponse) => {
173
183
  currentRawResponse = rawResponse;
174
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
184
+ providedCallback?.(rawResponse, flatResponse);
185
+ };
186
+ const updatedArgs = {
187
+ ...args,
188
+ options: {
189
+ ...args.options,
190
+ onResponse: callback
191
+ }
175
192
  };
176
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
177
193
  const flatResponse = await directSendOperation(updatedArgs, spec);
178
194
  return {
179
195
  flatResponse,
@@ -192,8 +208,8 @@ class DatabaseMigrationsSqlVmImpl {
192
208
  options
193
209
  }, cutoverOperationSpec);
194
210
  const poller = new core_lro_1.LroEngine(lro, {
195
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
196
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
211
+ resumeFrom: options?.resumeFrom,
212
+ intervalInMs: options?.updateIntervalInMs
197
213
  });
198
214
  await poller.poll();
199
215
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"databaseMigrationsSqlVm.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsSqlVm.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAA4E;AAC5E,8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,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,iOAAiO;IACnO,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9D,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,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 { DatabaseMigrationsSqlVm } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationsSqlVmGetOptionalParams,\n DatabaseMigrationsSqlVmGetResponse,\n DatabaseMigrationSqlVm,\n DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams,\n DatabaseMigrationsSqlVmCreateOrUpdateResponse,\n MigrationOperationInput,\n DatabaseMigrationsSqlVmCancelOptionalParams,\n DatabaseMigrationsSqlVmCutoverOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing DatabaseMigrationsSqlVm operations. */\nexport class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsSqlVm class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n options?: DatabaseMigrationsSqlVmGetOptionalParams\n ): Promise<DatabaseMigrationsSqlVmGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, sqlVirtualMachineName, targetDbName, 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlVm,\n options?: DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<DatabaseMigrationsSqlVmCreateOrUpdateResponse>,\n DatabaseMigrationsSqlVmCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<DatabaseMigrationsSqlVmCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlVm,\n options?: DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams\n ): Promise<DatabaseMigrationsSqlVmCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Stop ongoing migration for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCancel(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCancelOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n cancelOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Stop ongoing migration for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCancelAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCancelOptionalParams\n ): Promise<void> {\n const poller = await this.beginCancel(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Cutover online migration operation for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCutover(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCutoverOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n cutoverOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Cutover online migration operation for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCutoverAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCutoverOptionalParams\n ): Promise<void> {\n const poller = await this.beginCutover(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n default: {}\n },\n queryParameters: [\n Parameters.migrationOperationId,\n Parameters.expand,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n default: {}\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cutoverOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"databaseMigrationsSqlVm.js","sourceRoot":"","sources":["../../../src/operations/databaseMigrationsSqlVm.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAA4E;AAC5E,8CAAwC;AAYxC,2DAA2D;AAC3D,M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AM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,iOAAiO;IACnO,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9D,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,qBAAqB;KACjC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IAC1C,SAAS,EAAE,MAAM;IACjB,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 { DatabaseMigrationsSqlVm } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n DatabaseMigrationsSqlVmGetOptionalParams,\n DatabaseMigrationsSqlVmGetResponse,\n DatabaseMigrationSqlVm,\n DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams,\n DatabaseMigrationsSqlVmCreateOrUpdateResponse,\n MigrationOperationInput,\n DatabaseMigrationsSqlVmCancelOptionalParams,\n DatabaseMigrationsSqlVmCutoverOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing DatabaseMigrationsSqlVm operations. */\nexport class DatabaseMigrationsSqlVmImpl implements DatabaseMigrationsSqlVm {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class DatabaseMigrationsSqlVm class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieve the 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n options?: DatabaseMigrationsSqlVmGetOptionalParams\n ): Promise<DatabaseMigrationsSqlVmGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, sqlVirtualMachineName, targetDbName, 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlVm,\n options?: DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<DatabaseMigrationsSqlVmCreateOrUpdateResponse>,\n DatabaseMigrationsSqlVmCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<DatabaseMigrationsSqlVmCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: 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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Details of SqlMigrationService resource.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: DatabaseMigrationSqlVm,\n options?: DatabaseMigrationsSqlVmCreateOrUpdateOptionalParams\n ): Promise<DatabaseMigrationsSqlVmCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Stop ongoing migration for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCancel(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCancelOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n cancelOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Stop ongoing migration for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCancelAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCancelOptionalParams\n ): Promise<void> {\n const poller = await this.beginCancel(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Cutover online migration operation for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCutover(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCutoverOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = 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 = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n },\n cutoverOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Cutover online migration operation for the database.\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 sqlVirtualMachineName\n * @param targetDbName The name of the target database.\n * @param parameters Migration Operation Input\n * @param options The options parameters.\n */\n async beginCutoverAndWait(\n resourceGroupName: string,\n sqlVirtualMachineName: string,\n targetDbName: string,\n parameters: MigrationOperationInput,\n options?: DatabaseMigrationsSqlVmCutoverOptionalParams\n ): Promise<void> {\n const poller = await this.beginCutover(\n resourceGroupName,\n sqlVirtualMachineName,\n targetDbName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n default: {}\n },\n queryParameters: [\n Parameters.migrationOperationId,\n Parameters.expand,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 201: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 202: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n 204: {\n bodyMapper: Mappers.DatabaseMigrationSqlVm\n },\n default: {}\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cutoverOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover\",\n httpMethod: \"POST\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.targetDbName,\n Parameters.subscriptionId,\n Parameters.sqlVirtualMachineName\n ],\n headerParameters: [Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing Files operations. */
18
18
  class FilesImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Files class.
21
22
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class FilesImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(groupName, serviceName, projectName, options, settings);
48
49
  }
49
50
  };
50
51
  }
51
- listPagingPage(groupName, serviceName, projectName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._list(groupName, serviceName, projectName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listNext(groupName, serviceName, projectName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listPagingPage(groupName, serviceName, projectName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._list(groupName, serviceName, projectName, options);
57
+ let page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listNext(groupName, serviceName, projectName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ let page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listPagingAll(groupName, serviceName, projectName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(groupName, serviceName, projectName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listPagingAll(groupName, serviceName, projectName, options) {
71
+ for await (const page of this.listPagingPage(groupName, serviceName, projectName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * The project resource is a nested resource representing a stored migration project. This method