@azure/arm-datamigration 3.0.0-alpha.20250723.2 → 3.0.0-alpha.20250730.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/dataMigrationManagementClient.js +28 -5
- package/dist/browser/dataMigrationManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +1601 -737
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/browser/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/browser/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/browser/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/browser/operations/files.js +23 -40
- package/dist/browser/operations/files.js.map +1 -1
- package/dist/browser/operations/migrationServices.js +100 -136
- package/dist/browser/operations/migrationServices.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/projects.js +23 -40
- package/dist/browser/operations/projects.js.map +1 -1
- package/dist/browser/operations/resourceSkus.js +23 -40
- package/dist/browser/operations/resourceSkus.js.map +1 -1
- package/dist/browser/operations/serviceTasks.js +23 -40
- package/dist/browser/operations/serviceTasks.js.map +1 -1
- package/dist/browser/operations/services.js +122 -148
- package/dist/browser/operations/services.js.map +1 -1
- package/dist/browser/operations/sqlMigrationServices.js +100 -136
- package/dist/browser/operations/sqlMigrationServices.js.map +1 -1
- package/dist/browser/operations/tasks.js +23 -40
- package/dist/browser/operations/tasks.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/dataMigrationManagementClient.js +28 -5
- package/dist/commonjs/dataMigrationManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +1601 -737
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -51
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -51
- package/dist/commonjs/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/commonjs/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/commonjs/operations/files.js +23 -39
- package/dist/commonjs/operations/files.js.map +1 -1
- package/dist/commonjs/operations/migrationServices.js +100 -135
- package/dist/commonjs/operations/migrationServices.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/projects.js +23 -39
- package/dist/commonjs/operations/projects.js.map +1 -1
- package/dist/commonjs/operations/resourceSkus.js +23 -39
- package/dist/commonjs/operations/resourceSkus.js.map +1 -1
- package/dist/commonjs/operations/serviceTasks.js +23 -39
- package/dist/commonjs/operations/serviceTasks.js.map +1 -1
- package/dist/commonjs/operations/services.js +122 -147
- package/dist/commonjs/operations/services.js.map +1 -1
- package/dist/commonjs/operations/sqlMigrationServices.js +100 -135
- package/dist/commonjs/operations/sqlMigrationServices.js.map +1 -1
- package/dist/commonjs/operations/tasks.js +23 -39
- package/dist/commonjs/operations/tasks.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/dataMigrationManagementClient.js +28 -5
- package/dist/esm/dataMigrationManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +1601 -737
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/esm/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/esm/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/esm/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/esm/operations/files.js +23 -40
- package/dist/esm/operations/files.js.map +1 -1
- package/dist/esm/operations/migrationServices.js +100 -136
- package/dist/esm/operations/migrationServices.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/projects.js +23 -40
- package/dist/esm/operations/projects.js.map +1 -1
- package/dist/esm/operations/resourceSkus.js +23 -40
- package/dist/esm/operations/resourceSkus.js.map +1 -1
- package/dist/esm/operations/serviceTasks.js +23 -40
- package/dist/esm/operations/serviceTasks.js.map +1 -1
- package/dist/esm/operations/services.js +122 -148
- package/dist/esm/operations/services.js.map +1 -1
- package/dist/esm/operations/sqlMigrationServices.js +100 -136
- package/dist/esm/operations/sqlMigrationServices.js.map +1 -1
- package/dist/esm/operations/tasks.js +23 -40
- package/dist/esm/operations/tasks.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/dataMigrationManagementClient.js +28 -5
- package/dist/react-native/dataMigrationManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +1601 -737
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js +45 -52
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbRUMongo.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js +45 -52
- package/dist/react-native/operations/databaseMigrationsMongoToCosmosDbvCoreMongo.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlDb.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlDb.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlMi.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlMi.js.map +1 -1
- package/dist/react-native/operations/databaseMigrationsSqlVm.js +34 -18
- package/dist/react-native/operations/databaseMigrationsSqlVm.js.map +1 -1
- package/dist/react-native/operations/files.js +23 -40
- package/dist/react-native/operations/files.js.map +1 -1
- package/dist/react-native/operations/migrationServices.js +100 -136
- package/dist/react-native/operations/migrationServices.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/projects.js +23 -40
- package/dist/react-native/operations/projects.js.map +1 -1
- package/dist/react-native/operations/resourceSkus.js +23 -40
- package/dist/react-native/operations/resourceSkus.js.map +1 -1
- package/dist/react-native/operations/serviceTasks.js +23 -40
- package/dist/react-native/operations/serviceTasks.js.map +1 -1
- package/dist/react-native/operations/services.js +122 -148
- package/dist/react-native/operations/services.js.map +1 -1
- package/dist/react-native/operations/sqlMigrationServices.js +100 -136
- package/dist/react-native/operations/sqlMigrationServices.js.map +1 -1
- package/dist/react-native/operations/tasks.js +23 -40
- package/dist/react-native/operations/tasks.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +1 -1
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Operations operations. */
|
18
18
|
class OperationsImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Operations class.
|
21
22
|
* @param client Reference to the service client
|
@@ -37,52 +38,35 @@ class OperationsImpl {
|
|
37
38
|
return this;
|
38
39
|
},
|
39
40
|
byPage: (settings) => {
|
40
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
42
43
|
}
|
43
44
|
return this.listPagingPage(options, settings);
|
44
45
|
},
|
45
46
|
};
|
46
47
|
}
|
47
|
-
listPagingPage(options, settings) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
});
|
48
|
+
async *listPagingPage(options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._list(options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listNext(continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
66
65
|
}
|
67
|
-
listPagingAll(options) {
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
72
|
-
_c = _f.value;
|
73
|
-
_d = false;
|
74
|
-
const page = _c;
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
76
|
-
}
|
77
|
-
}
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
79
|
-
finally {
|
80
|
-
try {
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
82
|
-
}
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
84
|
-
}
|
85
|
-
});
|
66
|
+
async *listPagingAll(options) {
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
86
70
|
}
|
87
71
|
/**
|
88
72
|
* Lists all of the available SQL Migration REST API operations.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uE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mB;SACxC;QACD,OAAO,EAAE,EAAE;KACZ;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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,mBAAmB;SACxC;QACD,OAAO,EAAE,EAAE;KACZ;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { Operations } 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 OperationsDefinition,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available SQL Migration REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<OperationsDefinition> {\n const iter = this.listPagingAll(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(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<OperationsDefinition[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<OperationsDefinition> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available SQL Migration REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.DataMigration/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {},\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {},\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Projects operations. */
|
18
18
|
class ProjectsImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Projects class.
|
21
22
|
* @param client Reference to the service client
|
@@ -40,52 +41,35 @@ class ProjectsImpl {
|
|
40
41
|
return this;
|
41
42
|
},
|
42
43
|
byPage: (settings) => {
|
43
|
-
if (settings
|
44
|
+
if (settings?.maxPageSize) {
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
45
46
|
}
|
46
47
|
return this.listPagingPage(groupName, serviceName, options, settings);
|
47
48
|
},
|
48
49
|
};
|
49
50
|
}
|
50
|
-
listPagingPage(groupName, serviceName, options, settings) {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}
|
68
|
-
});
|
51
|
+
async *listPagingPage(groupName, serviceName, options, settings) {
|
52
|
+
let result;
|
53
|
+
let continuationToken = settings?.continuationToken;
|
54
|
+
if (!continuationToken) {
|
55
|
+
result = await this._list(groupName, serviceName, options);
|
56
|
+
let page = result.value || [];
|
57
|
+
continuationToken = result.nextLink;
|
58
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
59
|
+
yield page;
|
60
|
+
}
|
61
|
+
while (continuationToken) {
|
62
|
+
result = await this._listNext(groupName, serviceName, continuationToken, options);
|
63
|
+
continuationToken = result.nextLink;
|
64
|
+
let page = result.value || [];
|
65
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
66
|
+
yield page;
|
67
|
+
}
|
69
68
|
}
|
70
|
-
listPagingAll(groupName, serviceName, options) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(groupName, serviceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
75
|
-
_c = _f.value;
|
76
|
-
_d = false;
|
77
|
-
const page = _c;
|
78
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
79
|
-
}
|
80
|
-
}
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
82
|
-
finally {
|
83
|
-
try {
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
85
|
-
}
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
87
|
-
}
|
88
|
-
});
|
69
|
+
async *listPagingAll(groupName, serviceName, options) {
|
70
|
+
for await (const page of this.listPagingPage(groupName, serviceName, options)) {
|
71
|
+
yield* page;
|
72
|
+
}
|
89
73
|
}
|
90
74
|
/**
|
91
75
|
* The project resource is a nested resource representing a stored migration project. This method
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../src/operations/projects.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,OAAoC;QAEpC,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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 { Projects } 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 Project,\n ProjectsListNextOptionalParams,\n ProjectsListOptionalParams,\n ProjectsListResponse,\n ProjectsCreateOrUpdateOptionalParams,\n ProjectsCreateOrUpdateResponse,\n ProjectsGetOptionalParams,\n ProjectsGetResponse,\n ProjectsDeleteOptionalParams,\n ProjectsUpdateOptionalParams,\n ProjectsUpdateResponse,\n ProjectsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Projects operations. */\nexport class ProjectsImpl implements Projects {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Projects class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. This method\n * returns a list of projects owned by a service resource.\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?: ProjectsListOptionalParams,\n ): PagedAsyncIterableIterator<Project> {\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?: ProjectsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Project[]> {\n let result: ProjectsListResponse;\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?: ProjectsListOptionalParams,\n ): AsyncIterableIterator<Project> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. This method\n * returns a list of projects owned by a service resource.\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?: ProjectsListOptionalParams,\n ): Promise<ProjectsListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The PUT method\n * creates a new project or updates 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 parameters Information about the project\n * @param options The options parameters.\n */\n createOrUpdate(\n groupName: string,\n serviceName: string,\n projectName: string,\n parameters: Project,\n options?: ProjectsCreateOrUpdateOptionalParams,\n ): Promise<ProjectsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The GET method\n * retrieves information about a project.\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 get(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: ProjectsGetOptionalParams,\n ): Promise<ProjectsGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n getOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The DELETE method\n * deletes a project.\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 delete(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: ProjectsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The PATCH method\n * updates an existing project.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param parameters Information about the project\n * @param options The options parameters.\n */\n update(\n groupName: string,\n serviceName: string,\n projectName: string,\n parameters: Project,\n options?: ProjectsUpdateOptionalParams,\n ): Promise<ProjectsUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, parameters, options },\n updateOperationSpec,\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?: ProjectsListNextOptionalParams,\n ): Promise<ProjectsListNextResponse> {\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: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectList,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\n },\n 201: {\n bodyMapper: Mappers.Project,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.parameters15,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.parameters15,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\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.ProjectList,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\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":"projects.js","sourceRoot":"","sources":["../../../src/operations/projects.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IACN,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,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soft 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 { Projects } 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 Project,\n ProjectsListNextOptionalParams,\n ProjectsListOptionalParams,\n ProjectsListResponse,\n ProjectsCreateOrUpdateOptionalParams,\n ProjectsCreateOrUpdateResponse,\n ProjectsGetOptionalParams,\n ProjectsGetResponse,\n ProjectsDeleteOptionalParams,\n ProjectsUpdateOptionalParams,\n ProjectsUpdateResponse,\n ProjectsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Projects operations. */\nexport class ProjectsImpl implements Projects {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class Projects class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. This method\n * returns a list of projects owned by a service resource.\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?: ProjectsListOptionalParams,\n ): PagedAsyncIterableIterator<Project> {\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?: ProjectsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Project[]> {\n let result: ProjectsListResponse;\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?: ProjectsListOptionalParams,\n ): AsyncIterableIterator<Project> {\n for await (const page of this.listPagingPage(\n groupName,\n serviceName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. This method\n * returns a list of projects owned by a service resource.\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?: ProjectsListOptionalParams,\n ): Promise<ProjectsListResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The PUT method\n * creates a new project or updates 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 parameters Information about the project\n * @param options The options parameters.\n */\n createOrUpdate(\n groupName: string,\n serviceName: string,\n projectName: string,\n parameters: Project,\n options?: ProjectsCreateOrUpdateOptionalParams,\n ): Promise<ProjectsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, parameters, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The GET method\n * retrieves information about a project.\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 get(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: ProjectsGetOptionalParams,\n ): Promise<ProjectsGetResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n getOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The DELETE method\n * deletes a project.\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 delete(\n groupName: string,\n serviceName: string,\n projectName: string,\n options?: ProjectsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * The project resource is a nested resource representing a stored migration project. The PATCH method\n * updates an existing project.\n * @param groupName Name of the resource group\n * @param serviceName Name of the service\n * @param projectName Name of the project\n * @param parameters Information about the project\n * @param options The options parameters.\n */\n update(\n groupName: string,\n serviceName: string,\n projectName: string,\n parameters: Project,\n options?: ProjectsUpdateOptionalParams,\n ): Promise<ProjectsUpdateResponse> {\n return this.client.sendOperationRequest(\n { groupName, serviceName, projectName, parameters, options },\n updateOperationSpec,\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?: ProjectsListNextOptionalParams,\n ): Promise<ProjectsListNextResponse> {\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: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProjectList,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\n },\n 201: {\n bodyMapper: Mappers.Project,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.parameters15,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\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 ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Project,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.parameters15,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.groupName,\n Parameters.serviceName,\n Parameters.projectName,\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.ProjectList,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\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"]}
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing ResourceSkus operations. */
|
18
18
|
class ResourceSkusImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class ResourceSkus class.
|
21
22
|
* @param client Reference to the service client
|
@@ -37,52 +38,35 @@ class ResourceSkusImpl {
|
|
37
38
|
return this;
|
38
39
|
},
|
39
40
|
byPage: (settings) => {
|
40
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
42
43
|
}
|
43
44
|
return this.listSkusPagingPage(options, settings);
|
44
45
|
},
|
45
46
|
};
|
46
47
|
}
|
47
|
-
listSkusPagingPage(options, settings) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
});
|
48
|
+
async *listSkusPagingPage(options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._listSkus(options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listSkusNext(continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
66
65
|
}
|
67
|
-
listSkusPagingAll(options) {
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listSkusPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
72
|
-
_c = _f.value;
|
73
|
-
_d = false;
|
74
|
-
const page = _c;
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
76
|
-
}
|
77
|
-
}
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
79
|
-
finally {
|
80
|
-
try {
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
82
|
-
}
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
84
|
-
}
|
85
|
-
});
|
66
|
+
async *listSkusPagingAll(options) {
|
67
|
+
for await (const page of this.listSkusPagingPage(options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
86
70
|
}
|
87
71
|
/**
|
88
72
|
* The skus action returns the list of SKUs that DMS (classic) supports.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"resourceSkus.js","sourceRoot":"","sources":["../../../src/operations/resourceSkus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAa,gBAAgB;
|
1
|
+
{"version":3,"file":"resourceSkus.js","sourceRoot":"","sources":["../../../src/operations/resourceSkus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAa,gBAAgB;IACV,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,QAAQ,CACb,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,kBAAkB,CAC/B,OAA4C,EAC5C,QAAuB;QAEvB,IAAI,MAAoC,CAAC;QACzC,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAA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;IAC9E,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,yBAAyB,GAA6B;IAC1D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,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","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 { ResourceSkus } 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 ResourceSku,\n ResourceSkusListSkusNextOptionalParams,\n ResourceSkusListSkusOptionalParams,\n ResourceSkusListSkusResponse,\n ResourceSkusListSkusNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ResourceSkus operations. */\nexport class ResourceSkusImpl implements ResourceSkus {\n private readonly client: DataMigrationManagementClient;\n\n /**\n * Initialize a new instance of the class ResourceSkus class.\n * @param client Reference to the service client\n */\n constructor(client: DataMigrationManagementClient) {\n this.client = client;\n }\n\n /**\n * The skus action returns the list of SKUs that DMS (classic) supports.\n * @param options The options parameters.\n */\n public listSkus(\n options?: ResourceSkusListSkusOptionalParams,\n ): PagedAsyncIterableIterator<ResourceSku> {\n const iter = this.listSkusPagingAll(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.listSkusPagingPage(options, settings);\n },\n };\n }\n\n private async *listSkusPagingPage(\n options?: ResourceSkusListSkusOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ResourceSku[]> {\n let result: ResourceSkusListSkusResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listSkus(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._listSkusNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listSkusPagingAll(\n options?: ResourceSkusListSkusOptionalParams,\n ): AsyncIterableIterator<ResourceSku> {\n for await (const page of this.listSkusPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * The skus action returns the list of SKUs that DMS (classic) supports.\n * @param options The options parameters.\n */\n private _listSkus(\n options?: ResourceSkusListSkusOptionalParams,\n ): Promise<ResourceSkusListSkusResponse> {\n return this.client.sendOperationRequest({ options }, listSkusOperationSpec);\n }\n\n /**\n * ListSkusNext\n * @param nextLink The nextLink from the previous successful call to the ListSkus method.\n * @param options The options parameters.\n */\n private _listSkusNext(\n nextLink: string,\n options?: ResourceSkusListSkusNextOptionalParams,\n ): Promise<ResourceSkusListSkusNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listSkusNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listSkusOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ResourceSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listSkusNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ResourceSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing ServiceTasks operations. */
|
18
18
|
class ServiceTasksImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class ServiceTasks class.
|
21
22
|
* @param client Reference to the service client
|
@@ -42,52 +43,35 @@ class ServiceTasksImpl {
|
|
42
43
|
return this;
|
43
44
|
},
|
44
45
|
byPage: (settings) => {
|
45
|
-
if (settings
|
46
|
+
if (settings?.maxPageSize) {
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
47
48
|
}
|
48
49
|
return this.listPagingPage(groupName, serviceName, options, settings);
|
49
50
|
},
|
50
51
|
};
|
51
52
|
}
|
52
|
-
listPagingPage(groupName, serviceName, options, settings) {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
});
|
53
|
+
async *listPagingPage(groupName, serviceName, options, settings) {
|
54
|
+
let result;
|
55
|
+
let continuationToken = settings?.continuationToken;
|
56
|
+
if (!continuationToken) {
|
57
|
+
result = await this._list(groupName, serviceName, options);
|
58
|
+
let page = result.value || [];
|
59
|
+
continuationToken = result.nextLink;
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
61
|
+
yield page;
|
62
|
+
}
|
63
|
+
while (continuationToken) {
|
64
|
+
result = await this._listNext(groupName, serviceName, continuationToken, options);
|
65
|
+
continuationToken = result.nextLink;
|
66
|
+
let page = result.value || [];
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
68
|
+
yield page;
|
69
|
+
}
|
71
70
|
}
|
72
|
-
listPagingAll(groupName, serviceName, options) {
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(groupName, serviceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
77
|
-
_c = _f.value;
|
78
|
-
_d = false;
|
79
|
-
const page = _c;
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
81
|
-
}
|
82
|
-
}
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
84
|
-
finally {
|
85
|
-
try {
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
87
|
-
}
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
89
|
-
}
|
90
|
-
});
|
71
|
+
async *listPagingAll(groupName, serviceName, options) {
|
72
|
+
for await (const page of this.listPagingPage(groupName, serviceName, options)) {
|
73
|
+
yield* page;
|
74
|
+
}
|
91
75
|
}
|
92
76
|
/**
|
93
77
|
* The services resource is the top-level resource that represents the Azure Database Migration Service
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"serviceTasks.js","sourceRoot":"","sources":["../../../src/operations/serviceTasks.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAmBtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAa,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,OAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QACjE,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,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACxE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,SAAiB,EACjB,WAAmB,EACnB,OAAwC,EACxC,QAAuB;;YAEvB,IAAI,MAAgC,CAAC;YACrC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAA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AC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,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 Azure Database Migration Service\n * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks\n * may have a status of Unknown, which indicates that an error occurred while querying the status of\n * 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 Azure Database Migration Service\n * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks\n * may have a status of Unknown, which indicates that an error occurred while querying the status of\n * 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 * (classic) instance. The PUT method creates a new service task or updates an existing one, although\n * since service tasks have no mutable custom properties, there is little reason to update an existing\n * 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 * (classic) 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 * (classic) 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 * (classic) instance. The PATCH method updates an existing service task, but since service tasks have\n * no mutable 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 * (classic) 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: \"/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: \"/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.parameters13,\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: \"/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.apiVersion, Parameters.expand],\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: \"/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: \"/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.parameters13,\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: \"/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 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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAmBtD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAa,gBAAgB;IACV,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,SAAiB,EACjB,WAAmB,EACnB,OAA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AU,EAAE,OAAO,CAAC,WAAW;SAChC;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,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,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 Azure Database Migration Service\n * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks\n * may have a status of Unknown, which indicates that an error occurred while querying the status of\n * 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 Azure Database Migration Service\n * (classic). This method returns a list of service level tasks owned by a service resource. Some tasks\n * may have a status of Unknown, which indicates that an error occurred while querying the status of\n * 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 * (classic) instance. The PUT method creates a new service task or updates an existing one, although\n * since service tasks have no mutable custom properties, there is little reason to update an existing\n * 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 * (classic) 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 * (classic) 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 * (classic) instance. The PATCH method updates an existing service task, but since service tasks have\n * no mutable 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 * (classic) 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: \"/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: \"/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.parameters13,\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: \"/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.apiVersion, Parameters.expand],\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: \"/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: \"/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.parameters13,\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: \"/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 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"]}
|