@azure/arm-datamigration 3.0.0-alpha.20250718.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.
- package/dist/browser/dataMigrationManagementClient.js +24 -5
- package/dist/browser/dataMigrationManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +1468 -675
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/browser/operations/files.js +23 -40
- package/dist/browser/operations/files.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/projects.js +23 -40
- package/dist/browser/operations/projects.js.map +1 -1
- package/dist/browser/operations/resourceSkus.js +23 -40
- package/dist/browser/operations/resourceSkus.js.map +1 -1
- package/dist/browser/operations/serviceTasks.js +23 -40
- package/dist/browser/operations/serviceTasks.js.map +1 -1
- package/dist/browser/operations/services.js +122 -148
- package/dist/browser/operations/services.js.map +1 -1
- package/dist/browser/operations/sqlMigrationServices.js +100 -136
- package/dist/browser/operations/sqlMigrationServices.js.map +1 -1
- package/dist/browser/operations/tasks.js +23 -40
- package/dist/browser/operations/tasks.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/dataMigrationManagementClient.js +24 -5
- package/dist/commonjs/dataMigrationManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +1468 -675
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/commonjs/operations/files.js +23 -39
- package/dist/commonjs/operations/files.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/projects.js +23 -39
- package/dist/commonjs/operations/projects.js.map +1 -1
- package/dist/commonjs/operations/resourceSkus.js +23 -39
- package/dist/commonjs/operations/resourceSkus.js.map +1 -1
- package/dist/commonjs/operations/serviceTasks.js +23 -39
- package/dist/commonjs/operations/serviceTasks.js.map +1 -1
- package/dist/commonjs/operations/services.js +122 -147
- package/dist/commonjs/operations/services.js.map +1 -1
- package/dist/commonjs/operations/sqlMigrationServices.js +100 -135
- package/dist/commonjs/operations/sqlMigrationServices.js.map +1 -1
- package/dist/commonjs/operations/tasks.js +23 -39
- package/dist/commonjs/operations/tasks.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/esm/dataMigrationManagementClient.js +24 -5
- package/dist/esm/dataMigrationManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +1468 -675
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/esm/operations/files.js +23 -40
- package/dist/esm/operations/files.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/projects.js +23 -40
- package/dist/esm/operations/projects.js.map +1 -1
- package/dist/esm/operations/resourceSkus.js +23 -40
- package/dist/esm/operations/resourceSkus.js.map +1 -1
- package/dist/esm/operations/serviceTasks.js +23 -40
- package/dist/esm/operations/serviceTasks.js.map +1 -1
- package/dist/esm/operations/services.js +122 -148
- package/dist/esm/operations/services.js.map +1 -1
- package/dist/esm/operations/sqlMigrationServices.js +100 -136
- package/dist/esm/operations/sqlMigrationServices.js.map +1 -1
- package/dist/esm/operations/tasks.js +23 -40
- package/dist/esm/operations/tasks.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/dataMigrationManagementClient.js +24 -5
- package/dist/react-native/dataMigrationManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +1468 -675
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/react-native/operations/files.js +23 -40
- package/dist/react-native/operations/files.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/projects.js +23 -40
- package/dist/react-native/operations/projects.js.map +1 -1
- package/dist/react-native/operations/resourceSkus.js +23 -40
- package/dist/react-native/operations/resourceSkus.js.map +1 -1
- package/dist/react-native/operations/serviceTasks.js +23 -40
- package/dist/react-native/operations/serviceTasks.js.map +1 -1
- package/dist/react-native/operations/services.js +122 -148
- package/dist/react-native/operations/services.js.map +1 -1
- package/dist/react-native/operations/sqlMigrationServices.js +100 -136
- package/dist/react-native/operations/sqlMigrationServices.js.map +1 -1
- package/dist/react-native/operations/tasks.js +23 -40
- package/dist/react-native/operations/tasks.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
@@ -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 ServiceTasks operations. */
|
15
14
|
export class ServiceTasksImpl {
|
15
|
+
client;
|
16
16
|
/**
|
17
17
|
* Initialize a new instance of the class ServiceTasks class.
|
18
18
|
* @param client Reference to the service client
|
@@ -38,52 +38,35 @@ export class ServiceTasksImpl {
|
|
38
38
|
return this;
|
39
39
|
},
|
40
40
|
byPage: (settings) => {
|
41
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
43
43
|
}
|
44
44
|
return this.listPagingPage(groupName, serviceName, options, settings);
|
45
45
|
}
|
46
46
|
};
|
47
47
|
}
|
48
|
-
listPagingPage(groupName, serviceName, options, settings) {
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
}
|
66
|
-
});
|
48
|
+
async *listPagingPage(groupName, serviceName, options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._list(groupName, serviceName, options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
setContinuationToken(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listNext(groupName, serviceName, continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
setContinuationToken(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
67
65
|
}
|
68
|
-
listPagingAll(groupName, serviceName, options) {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(groupName, serviceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
73
|
-
_c = _f.value;
|
74
|
-
_d = false;
|
75
|
-
const page = _c;
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
77
|
-
}
|
78
|
-
}
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
80
|
-
finally {
|
81
|
-
try {
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
83
|
-
}
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
85
|
-
}
|
86
|
-
});
|
66
|
+
async *listPagingAll(groupName, serviceName, options) {
|
67
|
+
for await (const page of this.listPagingPage(groupName, serviceName, options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
87
70
|
}
|
88
71
|
/**
|
89
72
|
* The services resource is the top-level resource that represents the Database Migration Service. This
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"serviceTasks.js","sourceRoot":"","sources":["../../../src/operations/serviceTasks.ts"],"names":[],"mappings":"AA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Aa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,SAAS;QACpB,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 { ServiceTasks } 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 ServiceTasksListNextOptionalParams,\n ServiceTasksListOptionalParams,\n ServiceTasksListResponse,\n ServiceTasksCreateOrUpdateOptionalParams,\n ServiceTasksCreateOrUpdateResponse,\n ServiceTasksGetOptionalParams,\n ServiceTasksGetResponse,\n ServiceTasksDeleteOptionalParams,\n ServiceTasksUpdateOptionalParams,\n ServiceTasksUpdateResponse,\n ServiceTasksCancelOptionalParams,\n ServiceTasksCancelResponse,\n ServiceTasksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServiceTasks operations. */\nexport class ServiceTasksImpl implements ServiceTasks {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class ServiceTasks 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 service level tasks owned by a service resource. Some tasks may have a\n * status of Unknown, 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 options The options parameters.\n */\n public list(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams\n ): PagedAsyncIterableIterator<ProjectTask> {\n const iter = this.listPagingAll(groupName, serviceName, 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(groupName, serviceName, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProjectTask[]> {\n let result: ServiceTasksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(groupName, serviceName, 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 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 options?: ServiceTasksListOptionalParams\n ): AsyncIterableIterator<ProjectTask> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\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 service level tasks owned by a service resource. Some tasks may have a\n * status of Unknown, 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 options The options parameters.\n */\n private _list(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams\n ): Promise<ServiceTasksListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, options },\n listOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The PUT method creates a new service task or updates an existing one, although since\n * service tasks have no mutable 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 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 taskName: string,\n parameters: ProjectTask,\n options?: ServiceTasksCreateOrUpdateOptionalParams\n ): Promise<ServiceTasksCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The GET method retrieves information about a service task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n get(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksGetOptionalParams\n ): Promise<ServiceTasksGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n getOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The DELETE method deletes a service 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 taskName Name of the Task\n * @param options The options parameters.\n */\n delete(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The PATCH method updates an existing service task, but since service tasks have no mutable\n * custom properties, there is little reason to do so.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\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 taskName: string,\n parameters: ProjectTask,\n options?: ServiceTasksUpdateOptionalParams\n ): Promise<ServiceTasksUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, parameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. This method cancels a service 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 taskName Name of the Task\n * @param options The options parameters.\n */\n cancel(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksCancelOptionalParams\n ): Promise<ServiceTasksCancelResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n cancelOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\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 nextLink: string,\n options?: ServiceTasksListNextOptionalParams\n ): Promise<ServiceTasksListNextResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, 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}/serviceTasks\",\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 ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.taskName\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.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 ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
1
|
+
{"version":3,"file":"serviceTasks.js","sourceRoot":"","sources":["../../../src/operations/serviceTasks.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;AAmBtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IACV,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,OAAwC;QA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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,SAAS;QACpB,UAAU,CAAC,WAAW;QACtB,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,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;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 { ServiceTasks } 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 ServiceTasksListNextOptionalParams,\n ServiceTasksListOptionalParams,\n ServiceTasksListResponse,\n ServiceTasksCreateOrUpdateOptionalParams,\n ServiceTasksCreateOrUpdateResponse,\n ServiceTasksGetOptionalParams,\n ServiceTasksGetResponse,\n ServiceTasksDeleteOptionalParams,\n ServiceTasksUpdateOptionalParams,\n ServiceTasksUpdateResponse,\n ServiceTasksCancelOptionalParams,\n ServiceTasksCancelResponse,\n ServiceTasksListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServiceTasks operations. */\nexport class ServiceTasksImpl implements ServiceTasks {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class ServiceTasks 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 service level tasks owned by a service resource. Some tasks may have a\n * status of Unknown, 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 options The options parameters.\n */\n public list(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams\n ): PagedAsyncIterableIterator<ProjectTask> {\n const iter = this.listPagingAll(groupName, serviceName, 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(groupName, serviceName, options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProjectTask[]> {\n let result: ServiceTasksListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(groupName, serviceName, 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 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 options?: ServiceTasksListOptionalParams\n ): AsyncIterableIterator<ProjectTask> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\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 service level tasks owned by a service resource. Some tasks may have a\n * status of Unknown, 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 options The options parameters.\n */\n private _list(\n groupName: string,\n serviceName: string,\n options?: ServiceTasksListOptionalParams\n ): Promise<ServiceTasksListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, options },\n listOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The PUT method creates a new service task or updates an existing one, although since\n * service tasks have no mutable 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 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 taskName: string,\n parameters: ProjectTask,\n options?: ServiceTasksCreateOrUpdateOptionalParams\n ): Promise<ServiceTasksCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The GET method retrieves information about a service task.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param taskName Name of the Task\n * @param options The options parameters.\n */\n get(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksGetOptionalParams\n ): Promise<ServiceTasksGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n getOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The DELETE method deletes a service 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 taskName Name of the Task\n * @param options The options parameters.\n */\n delete(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. The PATCH method updates an existing service task, but since service tasks have no mutable\n * custom properties, there is little reason to do so.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\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 taskName: string,\n parameters: ProjectTask,\n options?: ServiceTasksUpdateOptionalParams\n ): Promise<ServiceTasksUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, parameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS\n * instance. This method cancels a service 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 taskName Name of the Task\n * @param options The options parameters.\n */\n cancel(\n groupName: string,\n serviceName: string,\n taskName: string,\n options?: ServiceTasksCancelOptionalParams\n ): Promise<ServiceTasksCancelResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, taskName, options },\n cancelOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\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 nextLink: string,\n options?: ServiceTasksListNextOptionalParams\n ): Promise<ServiceTasksListNextResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, 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}/serviceTasks\",\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 ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.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}/serviceTasks/{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.taskName\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.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 ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
@@ -5,7 +5,6 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
10
9
|
import * as coreClient from "@azure/core-client";
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
@@ -15,6 +14,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
16
15
|
/** Class containing Services operations. */
|
17
16
|
export class ServicesImpl {
|
17
|
+
client;
|
18
18
|
/**
|
19
19
|
* Initialize a new instance of the class Services class.
|
20
20
|
* @param client Reference to the service client
|
@@ -39,52 +39,35 @@ export class ServicesImpl {
|
|
39
39
|
return this;
|
40
40
|
},
|
41
41
|
byPage: (settings) => {
|
42
|
-
if (settings
|
42
|
+
if (settings?.maxPageSize) {
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
44
44
|
}
|
45
45
|
return this.listSkusPagingPage(groupName, serviceName, options, settings);
|
46
46
|
}
|
47
47
|
};
|
48
48
|
}
|
49
|
-
listSkusPagingPage(groupName, serviceName, options, settings) {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
});
|
49
|
+
async *listSkusPagingPage(groupName, serviceName, options, settings) {
|
50
|
+
let result;
|
51
|
+
let continuationToken = settings?.continuationToken;
|
52
|
+
if (!continuationToken) {
|
53
|
+
result = await this._listSkus(groupName, serviceName, 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._listSkusNext(groupName, serviceName, continuationToken, options);
|
61
|
+
continuationToken = result.nextLink;
|
62
|
+
let page = result.value || [];
|
63
|
+
setContinuationToken(page, continuationToken);
|
64
|
+
yield page;
|
65
|
+
}
|
68
66
|
}
|
69
|
-
listSkusPagingAll(groupName, serviceName, options) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
for (var _d = true, _e = __asyncValues(this.listSkusPagingPage(groupName, serviceName, 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 *listSkusPagingAll(groupName, serviceName, options) {
|
68
|
+
for await (const page of this.listSkusPagingPage(groupName, serviceName, 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
|
@@ -102,52 +85,35 @@ export class ServicesImpl {
|
|
102
85
|
return this;
|
103
86
|
},
|
104
87
|
byPage: (settings) => {
|
105
|
-
if (settings
|
88
|
+
if (settings?.maxPageSize) {
|
106
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
107
90
|
}
|
108
91
|
return this.listByResourceGroupPagingPage(groupName, options, settings);
|
109
92
|
}
|
110
93
|
};
|
111
94
|
}
|
112
|
-
listByResourceGroupPagingPage(groupName, options, settings) {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
}
|
130
|
-
});
|
95
|
+
async *listByResourceGroupPagingPage(groupName, options, settings) {
|
96
|
+
let result;
|
97
|
+
let continuationToken = settings?.continuationToken;
|
98
|
+
if (!continuationToken) {
|
99
|
+
result = await this._listByResourceGroup(groupName, options);
|
100
|
+
let page = result.value || [];
|
101
|
+
continuationToken = result.nextLink;
|
102
|
+
setContinuationToken(page, continuationToken);
|
103
|
+
yield page;
|
104
|
+
}
|
105
|
+
while (continuationToken) {
|
106
|
+
result = await this._listByResourceGroupNext(groupName, continuationToken, options);
|
107
|
+
continuationToken = result.nextLink;
|
108
|
+
let page = result.value || [];
|
109
|
+
setContinuationToken(page, continuationToken);
|
110
|
+
yield page;
|
111
|
+
}
|
131
112
|
}
|
132
|
-
listByResourceGroupPagingAll(groupName, options) {
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(groupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
137
|
-
_c = _f.value;
|
138
|
-
_d = false;
|
139
|
-
const page = _c;
|
140
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
141
|
-
}
|
142
|
-
}
|
143
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
144
|
-
finally {
|
145
|
-
try {
|
146
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
147
|
-
}
|
148
|
-
finally { if (e_2) throw e_2.error; }
|
149
|
-
}
|
150
|
-
});
|
113
|
+
async *listByResourceGroupPagingAll(groupName, options) {
|
114
|
+
for await (const page of this.listByResourceGroupPagingPage(groupName, options)) {
|
115
|
+
yield* page;
|
116
|
+
}
|
151
117
|
}
|
152
118
|
/**
|
153
119
|
* The services resource is the top-level resource that represents the Database Migration Service. This
|
@@ -164,52 +130,35 @@ export class ServicesImpl {
|
|
164
130
|
return this;
|
165
131
|
},
|
166
132
|
byPage: (settings) => {
|
167
|
-
if (settings
|
133
|
+
if (settings?.maxPageSize) {
|
168
134
|
throw new Error("maxPageSize is not supported by this operation.");
|
169
135
|
}
|
170
136
|
return this.listPagingPage(options, settings);
|
171
137
|
}
|
172
138
|
};
|
173
139
|
}
|
174
|
-
listPagingPage(options, settings) {
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
}
|
192
|
-
});
|
140
|
+
async *listPagingPage(options, settings) {
|
141
|
+
let result;
|
142
|
+
let continuationToken = settings?.continuationToken;
|
143
|
+
if (!continuationToken) {
|
144
|
+
result = await this._list(options);
|
145
|
+
let page = result.value || [];
|
146
|
+
continuationToken = result.nextLink;
|
147
|
+
setContinuationToken(page, continuationToken);
|
148
|
+
yield page;
|
149
|
+
}
|
150
|
+
while (continuationToken) {
|
151
|
+
result = await this._listNext(continuationToken, options);
|
152
|
+
continuationToken = result.nextLink;
|
153
|
+
let page = result.value || [];
|
154
|
+
setContinuationToken(page, continuationToken);
|
155
|
+
yield page;
|
156
|
+
}
|
193
157
|
}
|
194
|
-
listPagingAll(options) {
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
199
|
-
_c = _f.value;
|
200
|
-
_d = false;
|
201
|
-
const page = _c;
|
202
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
203
|
-
}
|
204
|
-
}
|
205
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
206
|
-
finally {
|
207
|
-
try {
|
208
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
209
|
-
}
|
210
|
-
finally { if (e_3) throw e_3.error; }
|
211
|
-
}
|
212
|
-
});
|
158
|
+
async *listPagingAll(options) {
|
159
|
+
for await (const page of this.listPagingPage(options)) {
|
160
|
+
yield* page;
|
161
|
+
}
|
213
162
|
}
|
214
163
|
/**
|
215
164
|
* The services resource is the top-level resource that represents the Database Migration Service. The
|
@@ -230,14 +179,19 @@ export class ServicesImpl {
|
|
230
179
|
return this.client.sendOperationRequest(args, spec);
|
231
180
|
};
|
232
181
|
const sendOperation = async (args, spec) => {
|
233
|
-
var _a;
|
234
182
|
let currentRawResponse = undefined;
|
235
|
-
const providedCallback =
|
183
|
+
const providedCallback = args.options?.onResponse;
|
236
184
|
const callback = (rawResponse, flatResponse) => {
|
237
185
|
currentRawResponse = rawResponse;
|
238
|
-
providedCallback
|
186
|
+
providedCallback?.(rawResponse, flatResponse);
|
187
|
+
};
|
188
|
+
const updatedArgs = {
|
189
|
+
...args,
|
190
|
+
options: {
|
191
|
+
...args.options,
|
192
|
+
onResponse: callback
|
193
|
+
}
|
239
194
|
};
|
240
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
241
195
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
242
196
|
return {
|
243
197
|
flatResponse,
|
@@ -250,8 +204,8 @@ export class ServicesImpl {
|
|
250
204
|
};
|
251
205
|
const lro = new LroImpl(sendOperation, { groupName, serviceName, parameters, options }, createOrUpdateOperationSpec);
|
252
206
|
const poller = new LroEngine(lro, {
|
253
|
-
resumeFrom: options
|
254
|
-
intervalInMs: options
|
207
|
+
resumeFrom: options?.resumeFrom,
|
208
|
+
intervalInMs: options?.updateIntervalInMs
|
255
209
|
});
|
256
210
|
await poller.poll();
|
257
211
|
return poller;
|
@@ -296,14 +250,19 @@ export class ServicesImpl {
|
|
296
250
|
return this.client.sendOperationRequest(args, spec);
|
297
251
|
};
|
298
252
|
const sendOperation = async (args, spec) => {
|
299
|
-
var _a;
|
300
253
|
let currentRawResponse = undefined;
|
301
|
-
const providedCallback =
|
254
|
+
const providedCallback = args.options?.onResponse;
|
302
255
|
const callback = (rawResponse, flatResponse) => {
|
303
256
|
currentRawResponse = rawResponse;
|
304
|
-
providedCallback
|
257
|
+
providedCallback?.(rawResponse, flatResponse);
|
258
|
+
};
|
259
|
+
const updatedArgs = {
|
260
|
+
...args,
|
261
|
+
options: {
|
262
|
+
...args.options,
|
263
|
+
onResponse: callback
|
264
|
+
}
|
305
265
|
};
|
306
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
307
266
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
308
267
|
return {
|
309
268
|
flatResponse,
|
@@ -316,8 +275,8 @@ export class ServicesImpl {
|
|
316
275
|
};
|
317
276
|
const lro = new LroImpl(sendOperation, { groupName, serviceName, options }, deleteOperationSpec);
|
318
277
|
const poller = new LroEngine(lro, {
|
319
|
-
resumeFrom: options
|
320
|
-
intervalInMs: options
|
278
|
+
resumeFrom: options?.resumeFrom,
|
279
|
+
intervalInMs: options?.updateIntervalInMs
|
321
280
|
});
|
322
281
|
await poller.poll();
|
323
282
|
return poller;
|
@@ -348,14 +307,19 @@ export class ServicesImpl {
|
|
348
307
|
return this.client.sendOperationRequest(args, spec);
|
349
308
|
};
|
350
309
|
const sendOperation = async (args, spec) => {
|
351
|
-
var _a;
|
352
310
|
let currentRawResponse = undefined;
|
353
|
-
const providedCallback =
|
311
|
+
const providedCallback = args.options?.onResponse;
|
354
312
|
const callback = (rawResponse, flatResponse) => {
|
355
313
|
currentRawResponse = rawResponse;
|
356
|
-
providedCallback
|
314
|
+
providedCallback?.(rawResponse, flatResponse);
|
315
|
+
};
|
316
|
+
const updatedArgs = {
|
317
|
+
...args,
|
318
|
+
options: {
|
319
|
+
...args.options,
|
320
|
+
onResponse: callback
|
321
|
+
}
|
357
322
|
};
|
358
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
359
323
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
360
324
|
return {
|
361
325
|
flatResponse,
|
@@ -368,8 +332,8 @@ export class ServicesImpl {
|
|
368
332
|
};
|
369
333
|
const lro = new LroImpl(sendOperation, { groupName, serviceName, parameters, options }, updateOperationSpec);
|
370
334
|
const poller = new LroEngine(lro, {
|
371
|
-
resumeFrom: options
|
372
|
-
intervalInMs: options
|
335
|
+
resumeFrom: options?.resumeFrom,
|
336
|
+
intervalInMs: options?.updateIntervalInMs
|
373
337
|
});
|
374
338
|
await poller.poll();
|
375
339
|
return poller;
|
@@ -410,14 +374,19 @@ export class ServicesImpl {
|
|
410
374
|
return this.client.sendOperationRequest(args, spec);
|
411
375
|
};
|
412
376
|
const sendOperation = async (args, spec) => {
|
413
|
-
var _a;
|
414
377
|
let currentRawResponse = undefined;
|
415
|
-
const providedCallback =
|
378
|
+
const providedCallback = args.options?.onResponse;
|
416
379
|
const callback = (rawResponse, flatResponse) => {
|
417
380
|
currentRawResponse = rawResponse;
|
418
|
-
providedCallback
|
381
|
+
providedCallback?.(rawResponse, flatResponse);
|
382
|
+
};
|
383
|
+
const updatedArgs = {
|
384
|
+
...args,
|
385
|
+
options: {
|
386
|
+
...args.options,
|
387
|
+
onResponse: callback
|
388
|
+
}
|
419
389
|
};
|
420
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
421
390
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
422
391
|
return {
|
423
392
|
flatResponse,
|
@@ -430,8 +399,8 @@ export class ServicesImpl {
|
|
430
399
|
};
|
431
400
|
const lro = new LroImpl(sendOperation, { groupName, serviceName, options }, startOperationSpec);
|
432
401
|
const poller = new LroEngine(lro, {
|
433
|
-
resumeFrom: options
|
434
|
-
intervalInMs: options
|
402
|
+
resumeFrom: options?.resumeFrom,
|
403
|
+
intervalInMs: options?.updateIntervalInMs
|
435
404
|
});
|
436
405
|
await poller.poll();
|
437
406
|
return poller;
|
@@ -460,14 +429,19 @@ export class ServicesImpl {
|
|
460
429
|
return this.client.sendOperationRequest(args, spec);
|
461
430
|
};
|
462
431
|
const sendOperation = async (args, spec) => {
|
463
|
-
var _a;
|
464
432
|
let currentRawResponse = undefined;
|
465
|
-
const providedCallback =
|
433
|
+
const providedCallback = args.options?.onResponse;
|
466
434
|
const callback = (rawResponse, flatResponse) => {
|
467
435
|
currentRawResponse = rawResponse;
|
468
|
-
providedCallback
|
436
|
+
providedCallback?.(rawResponse, flatResponse);
|
437
|
+
};
|
438
|
+
const updatedArgs = {
|
439
|
+
...args,
|
440
|
+
options: {
|
441
|
+
...args.options,
|
442
|
+
onResponse: callback
|
443
|
+
}
|
469
444
|
};
|
470
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
471
445
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
472
446
|
return {
|
473
447
|
flatResponse,
|
@@ -480,8 +454,8 @@ export class ServicesImpl {
|
|
480
454
|
};
|
481
455
|
const lro = new LroImpl(sendOperation, { groupName, serviceName, options }, stopOperationSpec);
|
482
456
|
const poller = new LroEngine(lro, {
|
483
|
-
resumeFrom: options
|
484
|
-
intervalInMs: options
|
457
|
+
resumeFrom: options?.resumeFrom,
|
458
|
+
intervalInMs: options?.updateIntervalInMs
|
485
459
|
});
|
486
460
|
await poller.poll();
|
487
461
|
return poller;
|