@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
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing Tasks operations. */
15
14
  export class TasksImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Tasks class.
18
18
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class TasksImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listPagingPage(groupName, serviceName, projectName, options, settings);
46
46
  }
47
47
  };
48
48
  }
49
- listPagingPage(groupName, serviceName, projectName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._list(groupName, serviceName, projectName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- setContinuationToken(page, continuationToken);
58
- yield yield __await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield __await(this._listNext(groupName, serviceName, projectName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listPagingPage(groupName, serviceName, projectName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._list(groupName, serviceName, projectName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ setContinuationToken(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listNext(groupName, serviceName, projectName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listPagingAll(groupName, serviceName, projectName, options) {
70
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listPagingPage(groupName, serviceName, projectName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
67
+ async *listPagingAll(groupName, serviceName, projectName, options) {
68
+ for await (const page of this.listPagingPage(groupName, serviceName, projectName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * The services resource is the top-level resource that represents the Database Migration Service. This
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/operations/tasks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAsBtD,4CAA4C;AAC5C,yCAAyC;AACzC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,WAAmB,EACnB,OAAiC;QAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAC7B,SAAS,EACT,WAAW,EACX,WAAW,EACX,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,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,C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,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC7D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;KACvB;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 { Tasks } 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 ProjectTask,\n TasksListNextOptionalParams,\n TasksListOptionalParams,\n TasksListResponse,\n TasksCreateOrUpdateOptionalParams,\n TasksCreateOrUpdateResponse,\n TasksGetOptionalParams,\n TasksGetResponse,\n TasksDeleteOptionalParams,\n TasksUpdateOptionalParams,\n TasksUpdateResponse,\n TasksCancelOptionalParams,\n TasksCancelResponse,\n CommandPropertiesUnion,\n TasksCommandOptionalParams,\n TasksCommandResponse,\n TasksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Tasks operations. */\nexport class TasksImpl implements Tasks {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Tasks class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * The services resource is the top-level resource that represents the Database Migration Service. This\n * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown,\n * which indicates that an error occurred while querying the status of that task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param options The options parameters.\n */\n public list(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): PagedAsyncIterableIterator<ProjectTask> {\n const iter = this.listPagingAll(\n groupName,\n serviceName,\n projectName,\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.listPagingPage(\n groupName,\n serviceName,\n projectName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProjectTask[]> {\n let result: TasksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(groupName, serviceName, projectName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n groupName,\n serviceName,\n projectName,\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 *listPagingAll(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): AsyncIterableIterator<ProjectTask> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\n projectName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * The services resource is the top-level resource that represents the Database Migration Service. This\n * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown,\n * which indicates that an error occurred while querying the status of that task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param options The options parameters.\n */\n private _list(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): Promise<TasksListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n listOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The PUT method creates a new task or updates an existing one, although since tasks have no mutable\n * custom properties, there is little reason to update an existing one.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Information about the task\n * @param options The options parameters.\n */\n createOrUpdate(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: ProjectTask,\n options?: TasksCreateOrUpdateOptionalParams\n ): Promise<TasksCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The GET method retrieves information about a task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n get(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksGetOptionalParams\n ): Promise<TasksGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n getOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The DELETE method deletes a task, canceling it first if it's running.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n delete(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The PATCH method updates an existing task, but since tasks have no mutable custom properties, there\n * is little reason to do so.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Information about the task\n * @param options The options parameters.\n */\n update(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: ProjectTask,\n options?: TasksUpdateOptionalParams\n ): Promise<TasksUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * This method cancels a task if it's currently queued or running.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n cancel(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksCancelOptionalParams\n ): Promise<TasksCancelResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n cancelOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * This method executes a command on a running task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Command to execute\n * @param options The options parameters.\n */\n command(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: CommandPropertiesUnion,\n options?: TasksCommandOptionalParams\n ): Promise<TasksCommandResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n commandOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n groupName: string,\n serviceName: string,\n projectName: string,\n nextLink: string,\n options?: TasksListNextOptionalParams\n ): Promise<TasksListNextResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TaskList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.taskType],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n 201: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.expand, Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.deleteRunningTasks],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst commandOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommandProperties\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TaskList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.taskType],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/operations/tasks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU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,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EACF,qKAAqK;IACvK,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,WAAW,EAAE,UAAU,CAAC,YAAY;IACpC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC7D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;KACvB;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 { Tasks } 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 ProjectTask,\n TasksListNextOptionalParams,\n TasksListOptionalParams,\n TasksListResponse,\n TasksCreateOrUpdateOptionalParams,\n TasksCreateOrUpdateResponse,\n TasksGetOptionalParams,\n TasksGetResponse,\n TasksDeleteOptionalParams,\n TasksUpdateOptionalParams,\n TasksUpdateResponse,\n TasksCancelOptionalParams,\n TasksCancelResponse,\n CommandPropertiesUnion,\n TasksCommandOptionalParams,\n TasksCommandResponse,\n TasksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Tasks operations. */\nexport class TasksImpl implements Tasks {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Tasks class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * The services resource is the top-level resource that represents the Database Migration Service. This\n * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown,\n * which indicates that an error occurred while querying the status of that task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param options The options parameters.\n */\n public list(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): PagedAsyncIterableIterator<ProjectTask> {\n const iter = this.listPagingAll(\n groupName,\n serviceName,\n projectName,\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.listPagingPage(\n groupName,\n serviceName,\n projectName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProjectTask[]> {\n let result: TasksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(groupName, serviceName, projectName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n groupName,\n serviceName,\n projectName,\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 *listPagingAll(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): AsyncIterableIterator<ProjectTask> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\n projectName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * The services resource is the top-level resource that represents the Database Migration Service. This\n * method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown,\n * which indicates that an error occurred while querying the status of that task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param options The options parameters.\n */\n private _list(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: TasksListOptionalParams\n ): Promise<TasksListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n listOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The PUT method creates a new task or updates an existing one, although since tasks have no mutable\n * custom properties, there is little reason to update an existing one.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Information about the task\n * @param options The options parameters.\n */\n createOrUpdate(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: ProjectTask,\n options?: TasksCreateOrUpdateOptionalParams\n ): Promise<TasksCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The GET method retrieves information about a task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n get(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksGetOptionalParams\n ): Promise<TasksGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n getOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The DELETE method deletes a task, canceling it first if it's running.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n delete(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * The PATCH method updates an existing task, but since tasks have no mutable custom properties, there\n * is little reason to do so.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Information about the task\n * @param options The options parameters.\n */\n update(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: ProjectTask,\n options?: TasksUpdateOptionalParams\n ): Promise<TasksUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * This method cancels a task if it's currently queued or running.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n cancel(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n options?: TasksCancelOptionalParams\n ): Promise<TasksCancelResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, options },\n cancelOperationSpec\n );\n }\n\n /**\n * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance.\n * This method executes a command on a running task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param taskName Name of the Task\n * @param parameters Command to execute\n * @param options The options parameters.\n */\n command(\n groupName: string,\n serviceName: string,\n projectName: string,\n taskName: string,\n parameters: CommandPropertiesUnion,\n options?: TasksCommandOptionalParams\n ): Promise<TasksCommandResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, taskName, parameters, options },\n commandOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n groupName: string,\n serviceName: string,\n projectName: string,\n nextLink: string,\n options?: TasksListNextOptionalParams\n ): Promise<TasksListNextResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TaskList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.taskType],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n 201: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.expand, Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.deleteRunningTasks],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectTask\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst commandOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommandProperties\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n Parameters.taskName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TaskList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.taskType],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing Usages operations. */
15
14
  export class UsagesImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Usages class.
18
18
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class UsagesImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listPagingPage(location, options, settings);
43
43
  }
44
44
  };
45
45
  }
46
- listPagingPage(location, options, settings) {
47
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._list(location, options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listNext(location, continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listPagingPage(location, options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._list(location, options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listNext(location, continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listPagingAll(location, options) {
67
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listPagingPage(location, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listPagingAll(location, options) {
65
+ for await (const page of this.listPagingPage(location, options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * This method returns region-specific quotas and resource usage information for the Database Migration
@@ -1 +1 @@
1
- {"version":3,"file":"usages.js","sourceRoot":"","sources":["../../../src/operations/usages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;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AAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,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 { Usages } 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 Quota,\n UsagesListNextOptionalParams,\n UsagesListOptionalParams,\n UsagesListResponse,\n UsagesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Usages operations. */\nexport class UsagesImpl implements Usages {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Usages class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * This method returns region-specific quotas and resource usage information for the Database Migration\n * Service.\n * @param location The Azure region of the operation\n * @param options The options parameters.\n */\n public list(\n location: string,\n options?: UsagesListOptionalParams\n ): PagedAsyncIterableIterator<Quota> {\n const iter = this.listPagingAll(location, options);\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.listPagingPage(location, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n location: string,\n options?: UsagesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Quota[]> {\n let result: UsagesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(location, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n location: string,\n options?: UsagesListOptionalParams\n ): AsyncIterableIterator<Quota> {\n for await (const page of this.listPagingPage(location, options)) {\n yield* page;\n }\n }\n\n /**\n * This method returns region-specific quotas and resource usage information for the Database Migration\n * Service.\n * @param location The Azure region of the operation\n * @param options The options parameters.\n */\n private _list(\n location: string,\n options?: UsagesListOptionalParams\n ): Promise<UsagesListResponse> {\n return this.client.sendOperationRequest(\n { location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param location The Azure region of the operation\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n location: string,\n nextLink: string,\n options?: UsagesListNextOptionalParams\n ): Promise<UsagesListNextResponse> {\n return this.client.sendOperationRequest(\n { location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"usages.js","sourceRoot":"","sources":["../../../src/operations/usages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAM,OAAO,UAAU;IACJ,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAC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MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,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 { Usages } 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 Quota,\n UsagesListNextOptionalParams,\n UsagesListOptionalParams,\n UsagesListResponse,\n UsagesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Usages operations. */\nexport class UsagesImpl implements Usages {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Usages class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * This method returns region-specific quotas and resource usage information for the Database Migration\n * Service.\n * @param location The Azure region of the operation\n * @param options The options parameters.\n */\n public list(\n location: string,\n options?: UsagesListOptionalParams\n ): PagedAsyncIterableIterator<Quota> {\n const iter = this.listPagingAll(location, options);\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.listPagingPage(location, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n location: string,\n options?: UsagesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Quota[]> {\n let result: UsagesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(location, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n location: string,\n options?: UsagesListOptionalParams\n ): AsyncIterableIterator<Quota> {\n for await (const page of this.listPagingPage(location, options)) {\n yield* page;\n }\n }\n\n /**\n * This method returns region-specific quotas and resource usage information for the Database Migration\n * Service.\n * @param location The Azure region of the operation\n * @param options The options parameters.\n */\n private _list(\n location: string,\n options?: UsagesListOptionalParams\n ): Promise<UsagesListResponse> {\n return this.client.sendOperationRequest(\n { location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param location The Azure region of the operation\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n location: string,\n nextLink: string,\n options?: UsagesListNextOptionalParams\n ): Promise<UsagesListNextResponse> {\n return this.client.sendOperationRequest(\n { location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaList\n },\n default: {\n bodyMapper: Mappers.ApiError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage().
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { DatabaseMigrationsSqlMiImpl, DatabaseMigrationsSqlVmImpl, OperationsImpl, SqlMigrationServicesImpl, ResourceSkusImpl, ServicesImpl, TasksImpl, ServiceTasksImpl, ProjectsImpl, UsagesImpl, FilesImpl } from "./operations/index.js";
11
11
  export class DataMigrationManagementClient extends coreClient.ServiceClient {
12
+ $host;
13
+ subscriptionId;
14
+ apiVersion;
12
15
  /**
13
16
  * Initializes a new instance of the DataMigrationManagementClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -16,7 +19,6 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient {
16
19
  * @param options The parameter options
17
20
  */
18
21
  constructor(credentials, subscriptionId, options) {
19
- var _a, _b, _c;
20
22
  if (credentials === undefined) {
21
23
  throw new Error("'credentials' cannot be null");
22
24
  }
@@ -35,12 +37,17 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient {
35
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
39
  : `${packageDetails}`;
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
40
+ const optionsWithDefaults = {
41
+ ...defaults,
42
+ ...options,
43
+ userAgentOptions: {
39
44
  userAgentPrefix
40
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
45
+ },
46
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
47
+ };
41
48
  super(optionsWithDefaults);
42
49
  let bearerTokenAuthenticationPolicyFound = false;
43
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
50
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
44
51
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
45
52
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
46
53
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -54,7 +61,8 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient {
54
61
  });
55
62
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
56
63
  credential: credentials,
57
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
64
+ scopes: optionsWithDefaults.credentialScopes ??
65
+ `${optionsWithDefaults.endpoint}/.default`,
58
66
  challengeCallbacks: {
59
67
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
60
68
  }
@@ -103,5 +111,16 @@ export class DataMigrationManagementClient extends coreClient.ServiceClient {
103
111
  };
104
112
  this.pipeline.addPolicy(apiVersionPolicy);
105
113
  }
114
+ databaseMigrationsSqlMi;
115
+ databaseMigrationsSqlVm;
116
+ operations;
117
+ sqlMigrationServices;
118
+ resourceSkus;
119
+ services;
120
+ tasks;
121
+ serviceTasks;
122
+ projects;
123
+ usages;
124
+ files;
106
125
  }
107
126
  //# sourceMappingURL=dataMigrationManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataMigrationManagementClient.js","sourceRoot":"","sources":["../../src/dataMigrationManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,SAAS,EACV,MAAM,uBAAuB,CAAC;AAgB/B,MAAM,OAAO,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IAKzE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAqD;;QAErD,IAAI,WA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ACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAaF","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n DatabaseMigrationsSqlMiImpl,\n DatabaseMigrationsSqlVmImpl,\n OperationsImpl,\n SqlMigrationServicesImpl,\n ResourceSkusImpl,\n ServicesImpl,\n TasksImpl,\n ServiceTasksImpl,\n ProjectsImpl,\n UsagesImpl,\n FilesImpl\n} from \"./operations/index.js\";\nimport {\n DatabaseMigrationsSqlMi,\n DatabaseMigrationsSqlVm,\n Operations,\n SqlMigrationServices,\n ResourceSkus,\n Services,\n Tasks,\n ServiceTasks,\n Projects,\n Usages,\n Files\n} from \"./operationsInterfaces/index.js\";\nimport { DataMigrationManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class DataMigrationManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the DataMigrationManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID that identifies an Azure subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DataMigrationManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: DataMigrationManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-datamigration/3.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2021-10-30-preview\";\n this.databaseMigrationsSqlMi = new DatabaseMigrationsSqlMiImpl(this);\n this.databaseMigrationsSqlVm = new DatabaseMigrationsSqlVmImpl(this);\n this.operations = new OperationsImpl(this);\n this.sqlMigrationServices = new SqlMigrationServicesImpl(this);\n this.resourceSkus = new ResourceSkusImpl(this);\n this.services = new ServicesImpl(this);\n this.tasks = new TasksImpl(this);\n this.serviceTasks = new ServiceTasksImpl(this);\n this.projects = new ProjectsImpl(this);\n this.usages = new UsagesImpl(this);\n this.files = new FilesImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n databaseMigrationsSqlMi: DatabaseMigrationsSqlMi;\n databaseMigrationsSqlVm: DatabaseMigrationsSqlVm;\n operations: Operations;\n sqlMigrationServices: SqlMigrationServices;\n resourceSkus: ResourceSkus;\n services: Services;\n tasks: Tasks;\n serviceTasks: ServiceTasks;\n projects: Projects;\n usages: Usages;\n files: Files;\n}\n"]}
1
+ {"version":3,"file":"dataMigrationManagementClient.js","sourceRoot":"","sources":["../../src/dataMigrationManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,SAAS,EACV,MAAM,uBAAuB,CAAC;AAgB/B,MAAM,OAAO,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IACzE,KAAK,CAAS;IACd,cAAc,CAAS;I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AAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,uBAAuB,CAA0B;IACjD,uBAAuB,CAA0B;IACjD,UAAU,CAAa;IACvB,oBAAoB,CAAuB;IAC3C,YAAY,CAAe;IAC3B,QAAQ,CAAW;IACnB,KAAK,CAAQ;IACb,YAAY,CAAe;IAC3B,QAAQ,CAAW;IACnB,MAAM,CAAS;IACf,KAAK,CAAQ;CACd","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n DatabaseMigrationsSqlMiImpl,\n DatabaseMigrationsSqlVmImpl,\n OperationsImpl,\n SqlMigrationServicesImpl,\n ResourceSkusImpl,\n ServicesImpl,\n TasksImpl,\n ServiceTasksImpl,\n ProjectsImpl,\n UsagesImpl,\n FilesImpl\n} from \"./operations/index.js\";\nimport {\n DatabaseMigrationsSqlMi,\n DatabaseMigrationsSqlVm,\n Operations,\n SqlMigrationServices,\n ResourceSkus,\n Services,\n Tasks,\n ServiceTasks,\n Projects,\n Usages,\n Files\n} from \"./operationsInterfaces/index.js\";\nimport { DataMigrationManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class DataMigrationManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the DataMigrationManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID that identifies an Azure subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DataMigrationManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: DataMigrationManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-datamigration/3.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2021-10-30-preview\";\n this.databaseMigrationsSqlMi = new DatabaseMigrationsSqlMiImpl(this);\n this.databaseMigrationsSqlVm = new DatabaseMigrationsSqlVmImpl(this);\n this.operations = new OperationsImpl(this);\n this.sqlMigrationServices = new SqlMigrationServicesImpl(this);\n this.resourceSkus = new ResourceSkusImpl(this);\n this.services = new ServicesImpl(this);\n this.tasks = new TasksImpl(this);\n this.serviceTasks = new ServiceTasksImpl(this);\n this.projects = new ProjectsImpl(this);\n this.usages = new UsagesImpl(this);\n this.files = new FilesImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n databaseMigrationsSqlMi: DatabaseMigrationsSqlMi;\n databaseMigrationsSqlVm: DatabaseMigrationsSqlVm;\n operations: Operations;\n sqlMigrationServices: SqlMigrationServices;\n resourceSkus: ResourceSkus;\n services: Services;\n tasks: Tasks;\n serviceTasks: ServiceTasks;\n projects: Projects;\n usages: Usages;\n files: Files;\n}\n"]}
@@ -5,8 +5,12 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __rest } from "tslib";
9
8
  export class LroImpl {
9
+ sendOperationFn;
10
+ args;
11
+ spec;
12
+ requestPath;
13
+ requestMethod;
10
14
  constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
11
15
  this.sendOperationFn = sendOperationFn;
12
16
  this.args = args;
@@ -18,8 +22,12 @@ export class LroImpl {
18
22
  return this.sendOperationFn(this.args, this.spec);
19
23
  }
20
24
  async sendPollRequest(path) {
21
- const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
22
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
25
+ const { requestBody, ...restSpec } = this.spec;
26
+ return this.sendOperationFn(this.args, {
27
+ ...restSpec,
28
+ path,
29
+ httpMethod: "GET"
30
+ });
23
31
  }
24
32
  }
25
33
  //# sourceMappingURL=lroImpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,MAAM,OAAO,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,cAA1B,eAA4B,CAAY,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;IACL,CAAC;CACF","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 { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","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 { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}