@azure/arm-migrationassessment 1.0.0-alpha.20250620.1 → 1.0.0-alpha.20250722.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/azureMigrateAssessmentService.js +38 -5
- package/dist/browser/azureMigrateAssessmentService.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 +1209 -588
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/assessedMachinesOperations.js +23 -40
- package/dist/browser/operations/assessedMachinesOperations.js.map +1 -1
- package/dist/browser/operations/assessedSqlDatabaseV2Operations.js +23 -40
- package/dist/browser/operations/assessedSqlDatabaseV2Operations.js.map +1 -1
- package/dist/browser/operations/assessedSqlInstanceV2Operations.js +23 -40
- package/dist/browser/operations/assessedSqlInstanceV2Operations.js.map +1 -1
- package/dist/browser/operations/assessedSqlMachinesOperations.js +23 -40
- package/dist/browser/operations/assessedSqlMachinesOperations.js.map +1 -1
- package/dist/browser/operations/assessedSqlRecommendedEntityOperations.js +23 -40
- package/dist/browser/operations/assessedSqlRecommendedEntityOperations.js.map +1 -1
- package/dist/browser/operations/assessmentOptionsOperations.js +23 -40
- package/dist/browser/operations/assessmentOptionsOperations.js.map +1 -1
- package/dist/browser/operations/assessmentProjectSummaryOperations.js +23 -40
- package/dist/browser/operations/assessmentProjectSummaryOperations.js.map +1 -1
- package/dist/browser/operations/assessmentProjectsOperations.js +67 -91
- package/dist/browser/operations/assessmentProjectsOperations.js.map +1 -1
- package/dist/browser/operations/assessmentsOperations.js +45 -52
- package/dist/browser/operations/assessmentsOperations.js.map +1 -1
- package/dist/browser/operations/avsAssessedMachinesOperations.js +23 -40
- package/dist/browser/operations/avsAssessedMachinesOperations.js.map +1 -1
- package/dist/browser/operations/avsAssessmentOptionsOperations.js +23 -40
- package/dist/browser/operations/avsAssessmentOptionsOperations.js.map +1 -1
- package/dist/browser/operations/avsAssessmentsOperations.js +45 -52
- package/dist/browser/operations/avsAssessmentsOperations.js.map +1 -1
- package/dist/browser/operations/groupsOperations.js +45 -52
- package/dist/browser/operations/groupsOperations.js.map +1 -1
- package/dist/browser/operations/hypervCollectorsOperations.js +34 -46
- package/dist/browser/operations/hypervCollectorsOperations.js.map +1 -1
- package/dist/browser/operations/importCollectorsOperations.js +34 -46
- package/dist/browser/operations/importCollectorsOperations.js.map +1 -1
- package/dist/browser/operations/machinesOperations.js +23 -40
- package/dist/browser/operations/machinesOperations.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/privateEndpointConnectionOperations.js +34 -46
- package/dist/browser/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/browser/operations/privateLinkResourceOperations.js +23 -40
- package/dist/browser/operations/privateLinkResourceOperations.js.map +1 -1
- package/dist/browser/operations/serverCollectorsOperations.js +34 -46
- package/dist/browser/operations/serverCollectorsOperations.js.map +1 -1
- package/dist/browser/operations/sqlAssessmentOptionsOperations.js +23 -40
- package/dist/browser/operations/sqlAssessmentOptionsOperations.js.map +1 -1
- package/dist/browser/operations/sqlAssessmentV2Operations.js +45 -52
- package/dist/browser/operations/sqlAssessmentV2Operations.js.map +1 -1
- package/dist/browser/operations/sqlAssessmentV2SummaryOperations.js +23 -40
- package/dist/browser/operations/sqlAssessmentV2SummaryOperations.js.map +1 -1
- package/dist/browser/operations/sqlCollectorOperations.js +34 -46
- package/dist/browser/operations/sqlCollectorOperations.js.map +1 -1
- package/dist/browser/operations/vmwareCollectorsOperations.js +34 -46
- package/dist/browser/operations/vmwareCollectorsOperations.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/azureMigrateAssessmentService.js +38 -5
- package/dist/commonjs/azureMigrateAssessmentService.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 +1209 -588
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/assessedMachinesOperations.js +23 -39
- package/dist/commonjs/operations/assessedMachinesOperations.js.map +1 -1
- package/dist/commonjs/operations/assessedSqlDatabaseV2Operations.js +23 -39
- package/dist/commonjs/operations/assessedSqlDatabaseV2Operations.js.map +1 -1
- package/dist/commonjs/operations/assessedSqlInstanceV2Operations.js +23 -39
- package/dist/commonjs/operations/assessedSqlInstanceV2Operations.js.map +1 -1
- package/dist/commonjs/operations/assessedSqlMachinesOperations.js +23 -39
- package/dist/commonjs/operations/assessedSqlMachinesOperations.js.map +1 -1
- package/dist/commonjs/operations/assessedSqlRecommendedEntityOperations.js +23 -39
- package/dist/commonjs/operations/assessedSqlRecommendedEntityOperations.js.map +1 -1
- package/dist/commonjs/operations/assessmentOptionsOperations.js +23 -39
- package/dist/commonjs/operations/assessmentOptionsOperations.js.map +1 -1
- package/dist/commonjs/operations/assessmentProjectSummaryOperations.js +23 -39
- package/dist/commonjs/operations/assessmentProjectSummaryOperations.js.map +1 -1
- package/dist/commonjs/operations/assessmentProjectsOperations.js +67 -90
- package/dist/commonjs/operations/assessmentProjectsOperations.js.map +1 -1
- package/dist/commonjs/operations/assessmentsOperations.js +45 -51
- package/dist/commonjs/operations/assessmentsOperations.js.map +1 -1
- package/dist/commonjs/operations/avsAssessedMachinesOperations.js +23 -39
- package/dist/commonjs/operations/avsAssessedMachinesOperations.js.map +1 -1
- package/dist/commonjs/operations/avsAssessmentOptionsOperations.js +23 -39
- package/dist/commonjs/operations/avsAssessmentOptionsOperations.js.map +1 -1
- package/dist/commonjs/operations/avsAssessmentsOperations.js +45 -51
- package/dist/commonjs/operations/avsAssessmentsOperations.js.map +1 -1
- package/dist/commonjs/operations/groupsOperations.js +45 -51
- package/dist/commonjs/operations/groupsOperations.js.map +1 -1
- package/dist/commonjs/operations/hypervCollectorsOperations.js +34 -45
- package/dist/commonjs/operations/hypervCollectorsOperations.js.map +1 -1
- package/dist/commonjs/operations/importCollectorsOperations.js +34 -45
- package/dist/commonjs/operations/importCollectorsOperations.js.map +1 -1
- package/dist/commonjs/operations/machinesOperations.js +23 -39
- package/dist/commonjs/operations/machinesOperations.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/privateEndpointConnectionOperations.js +34 -45
- package/dist/commonjs/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResourceOperations.js +23 -39
- package/dist/commonjs/operations/privateLinkResourceOperations.js.map +1 -1
- package/dist/commonjs/operations/serverCollectorsOperations.js +34 -45
- package/dist/commonjs/operations/serverCollectorsOperations.js.map +1 -1
- package/dist/commonjs/operations/sqlAssessmentOptionsOperations.js +23 -39
- package/dist/commonjs/operations/sqlAssessmentOptionsOperations.js.map +1 -1
- package/dist/commonjs/operations/sqlAssessmentV2Operations.js +45 -51
- package/dist/commonjs/operations/sqlAssessmentV2Operations.js.map +1 -1
- package/dist/commonjs/operations/sqlAssessmentV2SummaryOperations.js +23 -39
- package/dist/commonjs/operations/sqlAssessmentV2SummaryOperations.js.map +1 -1
- package/dist/commonjs/operations/sqlCollectorOperations.js +34 -45
- package/dist/commonjs/operations/sqlCollectorOperations.js.map +1 -1
- package/dist/commonjs/operations/vmwareCollectorsOperations.js +34 -45
- package/dist/commonjs/operations/vmwareCollectorsOperations.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 +11 -11
- package/dist/esm/azureMigrateAssessmentService.js +38 -5
- package/dist/esm/azureMigrateAssessmentService.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 +1209 -588
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/assessedMachinesOperations.js +23 -40
- package/dist/esm/operations/assessedMachinesOperations.js.map +1 -1
- package/dist/esm/operations/assessedSqlDatabaseV2Operations.js +23 -40
- package/dist/esm/operations/assessedSqlDatabaseV2Operations.js.map +1 -1
- package/dist/esm/operations/assessedSqlInstanceV2Operations.js +23 -40
- package/dist/esm/operations/assessedSqlInstanceV2Operations.js.map +1 -1
- package/dist/esm/operations/assessedSqlMachinesOperations.js +23 -40
- package/dist/esm/operations/assessedSqlMachinesOperations.js.map +1 -1
- package/dist/esm/operations/assessedSqlRecommendedEntityOperations.js +23 -40
- package/dist/esm/operations/assessedSqlRecommendedEntityOperations.js.map +1 -1
- package/dist/esm/operations/assessmentOptionsOperations.js +23 -40
- package/dist/esm/operations/assessmentOptionsOperations.js.map +1 -1
- package/dist/esm/operations/assessmentProjectSummaryOperations.js +23 -40
- package/dist/esm/operations/assessmentProjectSummaryOperations.js.map +1 -1
- package/dist/esm/operations/assessmentProjectsOperations.js +67 -91
- package/dist/esm/operations/assessmentProjectsOperations.js.map +1 -1
- package/dist/esm/operations/assessmentsOperations.js +45 -52
- package/dist/esm/operations/assessmentsOperations.js.map +1 -1
- package/dist/esm/operations/avsAssessedMachinesOperations.js +23 -40
- package/dist/esm/operations/avsAssessedMachinesOperations.js.map +1 -1
- package/dist/esm/operations/avsAssessmentOptionsOperations.js +23 -40
- package/dist/esm/operations/avsAssessmentOptionsOperations.js.map +1 -1
- package/dist/esm/operations/avsAssessmentsOperations.js +45 -52
- package/dist/esm/operations/avsAssessmentsOperations.js.map +1 -1
- package/dist/esm/operations/groupsOperations.js +45 -52
- package/dist/esm/operations/groupsOperations.js.map +1 -1
- package/dist/esm/operations/hypervCollectorsOperations.js +34 -46
- package/dist/esm/operations/hypervCollectorsOperations.js.map +1 -1
- package/dist/esm/operations/importCollectorsOperations.js +34 -46
- package/dist/esm/operations/importCollectorsOperations.js.map +1 -1
- package/dist/esm/operations/machinesOperations.js +23 -40
- package/dist/esm/operations/machinesOperations.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/privateEndpointConnectionOperations.js +34 -46
- package/dist/esm/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/esm/operations/privateLinkResourceOperations.js +23 -40
- package/dist/esm/operations/privateLinkResourceOperations.js.map +1 -1
- package/dist/esm/operations/serverCollectorsOperations.js +34 -46
- package/dist/esm/operations/serverCollectorsOperations.js.map +1 -1
- package/dist/esm/operations/sqlAssessmentOptionsOperations.js +23 -40
- package/dist/esm/operations/sqlAssessmentOptionsOperations.js.map +1 -1
- package/dist/esm/operations/sqlAssessmentV2Operations.js +45 -52
- package/dist/esm/operations/sqlAssessmentV2Operations.js.map +1 -1
- package/dist/esm/operations/sqlAssessmentV2SummaryOperations.js +23 -40
- package/dist/esm/operations/sqlAssessmentV2SummaryOperations.js.map +1 -1
- package/dist/esm/operations/sqlCollectorOperations.js +34 -46
- package/dist/esm/operations/sqlCollectorOperations.js.map +1 -1
- package/dist/esm/operations/vmwareCollectorsOperations.js +34 -46
- package/dist/esm/operations/vmwareCollectorsOperations.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/azureMigrateAssessmentService.js +38 -5
- package/dist/react-native/azureMigrateAssessmentService.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 +1209 -588
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/assessedMachinesOperations.js +23 -40
- package/dist/react-native/operations/assessedMachinesOperations.js.map +1 -1
- package/dist/react-native/operations/assessedSqlDatabaseV2Operations.js +23 -40
- package/dist/react-native/operations/assessedSqlDatabaseV2Operations.js.map +1 -1
- package/dist/react-native/operations/assessedSqlInstanceV2Operations.js +23 -40
- package/dist/react-native/operations/assessedSqlInstanceV2Operations.js.map +1 -1
- package/dist/react-native/operations/assessedSqlMachinesOperations.js +23 -40
- package/dist/react-native/operations/assessedSqlMachinesOperations.js.map +1 -1
- package/dist/react-native/operations/assessedSqlRecommendedEntityOperations.js +23 -40
- package/dist/react-native/operations/assessedSqlRecommendedEntityOperations.js.map +1 -1
- package/dist/react-native/operations/assessmentOptionsOperations.js +23 -40
- package/dist/react-native/operations/assessmentOptionsOperations.js.map +1 -1
- package/dist/react-native/operations/assessmentProjectSummaryOperations.js +23 -40
- package/dist/react-native/operations/assessmentProjectSummaryOperations.js.map +1 -1
- package/dist/react-native/operations/assessmentProjectsOperations.js +67 -91
- package/dist/react-native/operations/assessmentProjectsOperations.js.map +1 -1
- package/dist/react-native/operations/assessmentsOperations.js +45 -52
- package/dist/react-native/operations/assessmentsOperations.js.map +1 -1
- package/dist/react-native/operations/avsAssessedMachinesOperations.js +23 -40
- package/dist/react-native/operations/avsAssessedMachinesOperations.js.map +1 -1
- package/dist/react-native/operations/avsAssessmentOptionsOperations.js +23 -40
- package/dist/react-native/operations/avsAssessmentOptionsOperations.js.map +1 -1
- package/dist/react-native/operations/avsAssessmentsOperations.js +45 -52
- package/dist/react-native/operations/avsAssessmentsOperations.js.map +1 -1
- package/dist/react-native/operations/groupsOperations.js +45 -52
- package/dist/react-native/operations/groupsOperations.js.map +1 -1
- package/dist/react-native/operations/hypervCollectorsOperations.js +34 -46
- package/dist/react-native/operations/hypervCollectorsOperations.js.map +1 -1
- package/dist/react-native/operations/importCollectorsOperations.js +34 -46
- package/dist/react-native/operations/importCollectorsOperations.js.map +1 -1
- package/dist/react-native/operations/machinesOperations.js +23 -40
- package/dist/react-native/operations/machinesOperations.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/privateEndpointConnectionOperations.js +34 -46
- package/dist/react-native/operations/privateEndpointConnectionOperations.js.map +1 -1
- package/dist/react-native/operations/privateLinkResourceOperations.js +23 -40
- package/dist/react-native/operations/privateLinkResourceOperations.js.map +1 -1
- package/dist/react-native/operations/serverCollectorsOperations.js +34 -46
- package/dist/react-native/operations/serverCollectorsOperations.js.map +1 -1
- package/dist/react-native/operations/sqlAssessmentOptionsOperations.js +23 -40
- package/dist/react-native/operations/sqlAssessmentOptionsOperations.js.map +1 -1
- package/dist/react-native/operations/sqlAssessmentV2Operations.js +45 -52
- package/dist/react-native/operations/sqlAssessmentV2Operations.js.map +1 -1
- package/dist/react-native/operations/sqlAssessmentV2SummaryOperations.js +23 -40
- package/dist/react-native/operations/sqlAssessmentV2SummaryOperations.js.map +1 -1
- package/dist/react-native/operations/sqlCollectorOperations.js +34 -46
- package/dist/react-native/operations/sqlCollectorOperations.js.map +1 -1
- package/dist/react-native/operations/vmwareCollectorsOperations.js +34 -46
- package/dist/react-native/operations/vmwareCollectorsOperations.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
- /package/review/{arm-migrationassessment.api.md → arm-migrationassessment-node.api.md} +0 -0
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing SqlCollectorOperations operations. */
|
|
20
20
|
class SqlCollectorOperationsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class SqlCollectorOperations class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -41,52 +42,35 @@ class SqlCollectorOperationsImpl {
|
|
|
41
42
|
return this;
|
|
42
43
|
},
|
|
43
44
|
byPage: (settings) => {
|
|
44
|
-
if (settings
|
|
45
|
+
if (settings?.maxPageSize) {
|
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
46
47
|
}
|
|
47
48
|
return this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings);
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
});
|
|
52
|
+
async *listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings) {
|
|
53
|
+
let result;
|
|
54
|
+
let continuationToken = settings?.continuationToken;
|
|
55
|
+
if (!continuationToken) {
|
|
56
|
+
result = await this._listByAssessmentProject(resourceGroupName, projectName, options);
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
62
|
+
while (continuationToken) {
|
|
63
|
+
result = await this._listByAssessmentProjectNext(resourceGroupName, projectName, continuationToken, options);
|
|
64
|
+
continuationToken = result.nextLink;
|
|
65
|
+
let page = result.value || [];
|
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
67
|
+
yield page;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
listByAssessmentProjectPagingAll(resourceGroupName, projectName, options) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
76
|
-
_c = _f.value;
|
|
77
|
-
_d = false;
|
|
78
|
-
const page = _c;
|
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
});
|
|
70
|
+
async *listByAssessmentProjectPagingAll(resourceGroupName, projectName, options) {
|
|
71
|
+
for await (const page of this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options)) {
|
|
72
|
+
yield* page;
|
|
73
|
+
}
|
|
90
74
|
}
|
|
91
75
|
/**
|
|
92
76
|
* List SqlCollector resources by AssessmentProject
|
|
@@ -120,14 +104,19 @@ class SqlCollectorOperationsImpl {
|
|
|
120
104
|
return this.client.sendOperationRequest(args, spec);
|
|
121
105
|
};
|
|
122
106
|
const sendOperationFn = async (args, spec) => {
|
|
123
|
-
var _a;
|
|
124
107
|
let currentRawResponse = undefined;
|
|
125
|
-
const providedCallback =
|
|
108
|
+
const providedCallback = args.options?.onResponse;
|
|
126
109
|
const callback = (rawResponse, flatResponse) => {
|
|
127
110
|
currentRawResponse = rawResponse;
|
|
128
|
-
providedCallback
|
|
111
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
112
|
+
};
|
|
113
|
+
const updatedArgs = {
|
|
114
|
+
...args,
|
|
115
|
+
options: {
|
|
116
|
+
...args.options,
|
|
117
|
+
onResponse: callback,
|
|
118
|
+
},
|
|
129
119
|
};
|
|
130
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
131
120
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
132
121
|
return {
|
|
133
122
|
flatResponse,
|
|
@@ -150,8 +139,8 @@ class SqlCollectorOperationsImpl {
|
|
|
150
139
|
spec: createOperationSpec,
|
|
151
140
|
});
|
|
152
141
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
153
|
-
restoreFrom: options
|
|
154
|
-
intervalInMs: options
|
|
142
|
+
restoreFrom: options?.resumeFrom,
|
|
143
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
155
144
|
resourceLocationConfig: "azure-async-operation",
|
|
156
145
|
});
|
|
157
146
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlCollectorOperations.js","sourceRoot":"","sources":["../../../src/operations/sqlCollectorOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,uBAAuB,CAC5B,iBAAyB,EACzB,WAAmB,EACnB,OAAqE;QAErE,MAAM,IAAI,GAAG,IAAI,CAAC,gCAAgC,CAChD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,iCAAiC,CAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,iCAAiC,CAC9C,iBAAyB,EACzB,WAAmB,EACnB,OAAqE,EACrE,QAAuB;;YAEvB,IAAI,MAA6D,CAAC;YAClE,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QA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CAAwC,GAA6B;IACzE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,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 { SqlCollectorOperations } 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 { AzureMigrateAssessmentService } from \"../azureMigrateAssessmentService.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SqlCollector,\n SqlCollectorOperationsListByAssessmentProjectNextOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectResponse,\n SqlCollectorOperationsGetOptionalParams,\n SqlCollectorOperationsGetResponse,\n SqlCollectorOperationsCreateOptionalParams,\n SqlCollectorOperationsCreateResponse,\n SqlCollectorOperationsDeleteOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SqlCollectorOperations operations. */\nexport class SqlCollectorOperationsImpl implements SqlCollectorOperations {\n private readonly client: AzureMigrateAssessmentService;\n\n /**\n * Initialize a new instance of the class SqlCollectorOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AzureMigrateAssessmentService) {\n this.client = client;\n }\n\n /**\n * List SqlCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n public listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): PagedAsyncIterableIterator<SqlCollector> {\n const iter = this.listByAssessmentProjectPagingAll(\n resourceGroupName,\n projectName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByAssessmentProjectPagingPage(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SqlCollector[]> {\n let result: SqlCollectorOperationsListByAssessmentProjectResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByAssessmentProject(\n resourceGroupName,\n projectName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByAssessmentProjectNext(\n resourceGroupName,\n projectName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByAssessmentProjectPagingAll(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): AsyncIterableIterator<SqlCollector> {\n for await (const page of this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List SqlCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n private _listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): Promise<SqlCollectorOperationsListByAssessmentProjectResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, options },\n listByAssessmentProjectOperationSpec,\n );\n }\n\n /**\n * Get a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n options?: SqlCollectorOperationsGetOptionalParams,\n ): Promise<SqlCollectorOperationsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, collectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n resource: SqlCollector,\n options?: SqlCollectorOperationsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SqlCollectorOperationsCreateResponse>,\n SqlCollectorOperationsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SqlCollectorOperationsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n projectName,\n collectorName,\n resource,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SqlCollectorOperationsCreateResponse,\n OperationState<SqlCollectorOperationsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n resource: SqlCollector,\n options?: SqlCollectorOperationsCreateOptionalParams,\n ): Promise<SqlCollectorOperationsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n projectName,\n collectorName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n options?: SqlCollectorOperationsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, collectorName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByAssessmentProjectNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param nextLink The nextLink from the previous successful call to the ListByAssessmentProject\n * method.\n * @param options The options parameters.\n */\n private _listByAssessmentProjectNext(\n resourceGroupName: string,\n projectName: string,\n nextLink: string,\n options?: SqlCollectorOperationsListByAssessmentProjectNextOptionalParams,\n ): Promise<SqlCollectorOperationsListByAssessmentProjectNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, nextLink, options },\n listByAssessmentProjectNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByAssessmentProjectOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollector,\n },\n 201: {\n bodyMapper: Mappers.SqlCollector,\n },\n 202: {\n bodyMapper: Mappers.SqlCollector,\n },\n 204: {\n bodyMapper: Mappers.SqlCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByAssessmentProjectNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"sqlCollectorOperations.js","sourceRoot":"","sources":["../../../src/operations/sqlCollectorOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEA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ACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,+JAA+J;IACrK,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,wCAAwC,GAA6B;IACzE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,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 { SqlCollectorOperations } 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 { AzureMigrateAssessmentService } from \"../azureMigrateAssessmentService.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SqlCollector,\n SqlCollectorOperationsListByAssessmentProjectNextOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectResponse,\n SqlCollectorOperationsGetOptionalParams,\n SqlCollectorOperationsGetResponse,\n SqlCollectorOperationsCreateOptionalParams,\n SqlCollectorOperationsCreateResponse,\n SqlCollectorOperationsDeleteOptionalParams,\n SqlCollectorOperationsListByAssessmentProjectNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SqlCollectorOperations operations. */\nexport class SqlCollectorOperationsImpl implements SqlCollectorOperations {\n private readonly client: AzureMigrateAssessmentService;\n\n /**\n * Initialize a new instance of the class SqlCollectorOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AzureMigrateAssessmentService) {\n this.client = client;\n }\n\n /**\n * List SqlCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n public listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): PagedAsyncIterableIterator<SqlCollector> {\n const iter = this.listByAssessmentProjectPagingAll(\n resourceGroupName,\n projectName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByAssessmentProjectPagingPage(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SqlCollector[]> {\n let result: SqlCollectorOperationsListByAssessmentProjectResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByAssessmentProject(\n resourceGroupName,\n projectName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByAssessmentProjectNext(\n resourceGroupName,\n projectName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByAssessmentProjectPagingAll(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): AsyncIterableIterator<SqlCollector> {\n for await (const page of this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List SqlCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n private _listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: SqlCollectorOperationsListByAssessmentProjectOptionalParams,\n ): Promise<SqlCollectorOperationsListByAssessmentProjectResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, options },\n listByAssessmentProjectOperationSpec,\n );\n }\n\n /**\n * Get a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n options?: SqlCollectorOperationsGetOptionalParams,\n ): Promise<SqlCollectorOperationsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, collectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n resource: SqlCollector,\n options?: SqlCollectorOperationsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SqlCollectorOperationsCreateResponse>,\n SqlCollectorOperationsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SqlCollectorOperationsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n projectName,\n collectorName,\n resource,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SqlCollectorOperationsCreateResponse,\n OperationState<SqlCollectorOperationsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n resource: SqlCollector,\n options?: SqlCollectorOperationsCreateOptionalParams,\n ): Promise<SqlCollectorOperationsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n projectName,\n collectorName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a SqlCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param collectorName Sql collector ARM name.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n projectName: string,\n collectorName: string,\n options?: SqlCollectorOperationsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, collectorName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByAssessmentProjectNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param nextLink The nextLink from the previous successful call to the ListByAssessmentProject\n * method.\n * @param options The options parameters.\n */\n private _listByAssessmentProjectNext(\n resourceGroupName: string,\n projectName: string,\n nextLink: string,\n options?: SqlCollectorOperationsListByAssessmentProjectNextOptionalParams,\n ): Promise<SqlCollectorOperationsListByAssessmentProjectNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, nextLink, options },\n listByAssessmentProjectNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByAssessmentProjectOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollector,\n },\n 201: {\n bodyMapper: Mappers.SqlCollector,\n },\n 202: {\n bodyMapper: Mappers.SqlCollector,\n },\n 204: {\n bodyMapper: Mappers.SqlCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/sqlcollectors/{collectorName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.collectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByAssessmentProjectNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SqlCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing VmwareCollectorsOperations operations. */
|
|
20
20
|
class VmwareCollectorsOperationsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class VmwareCollectorsOperations class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -41,52 +42,35 @@ class VmwareCollectorsOperationsImpl {
|
|
|
41
42
|
return this;
|
|
42
43
|
},
|
|
43
44
|
byPage: (settings) => {
|
|
44
|
-
if (settings
|
|
45
|
+
if (settings?.maxPageSize) {
|
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
46
47
|
}
|
|
47
48
|
return this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings);
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
});
|
|
52
|
+
async *listByAssessmentProjectPagingPage(resourceGroupName, projectName, options, settings) {
|
|
53
|
+
let result;
|
|
54
|
+
let continuationToken = settings?.continuationToken;
|
|
55
|
+
if (!continuationToken) {
|
|
56
|
+
result = await this._listByAssessmentProject(resourceGroupName, projectName, options);
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
62
|
+
while (continuationToken) {
|
|
63
|
+
result = await this._listByAssessmentProjectNext(resourceGroupName, projectName, continuationToken, options);
|
|
64
|
+
continuationToken = result.nextLink;
|
|
65
|
+
let page = result.value || [];
|
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
67
|
+
yield page;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
listByAssessmentProjectPagingAll(resourceGroupName, projectName, options) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
76
|
-
_c = _f.value;
|
|
77
|
-
_d = false;
|
|
78
|
-
const page = _c;
|
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
});
|
|
70
|
+
async *listByAssessmentProjectPagingAll(resourceGroupName, projectName, options) {
|
|
71
|
+
for await (const page of this.listByAssessmentProjectPagingPage(resourceGroupName, projectName, options)) {
|
|
72
|
+
yield* page;
|
|
73
|
+
}
|
|
90
74
|
}
|
|
91
75
|
/**
|
|
92
76
|
* List VmwareCollector resources by AssessmentProject
|
|
@@ -120,14 +104,19 @@ class VmwareCollectorsOperationsImpl {
|
|
|
120
104
|
return this.client.sendOperationRequest(args, spec);
|
|
121
105
|
};
|
|
122
106
|
const sendOperationFn = async (args, spec) => {
|
|
123
|
-
var _a;
|
|
124
107
|
let currentRawResponse = undefined;
|
|
125
|
-
const providedCallback =
|
|
108
|
+
const providedCallback = args.options?.onResponse;
|
|
126
109
|
const callback = (rawResponse, flatResponse) => {
|
|
127
110
|
currentRawResponse = rawResponse;
|
|
128
|
-
providedCallback
|
|
111
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
112
|
+
};
|
|
113
|
+
const updatedArgs = {
|
|
114
|
+
...args,
|
|
115
|
+
options: {
|
|
116
|
+
...args.options,
|
|
117
|
+
onResponse: callback,
|
|
118
|
+
},
|
|
129
119
|
};
|
|
130
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
131
120
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
132
121
|
return {
|
|
133
122
|
flatResponse,
|
|
@@ -150,8 +139,8 @@ class VmwareCollectorsOperationsImpl {
|
|
|
150
139
|
spec: createOperationSpec,
|
|
151
140
|
});
|
|
152
141
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
153
|
-
restoreFrom: options
|
|
154
|
-
intervalInMs: options
|
|
142
|
+
restoreFrom: options?.resumeFrom,
|
|
143
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
155
144
|
resourceLocationConfig: "azure-async-operation",
|
|
156
145
|
});
|
|
157
146
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vmwareCollectorsOperations.js","sourceRoot":"","sources":["../../../src/operations/vmwareCollectorsOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAKzC;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,uBAAuB,CAC5B,iBAAyB,EACzB,WAAmB,EACnB,OAAyE;QAEzE,MAAM,IAAI,GAAG,IAAI,CAAC,gCAAgC,CAChD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,iCAAiC,CAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,iCAAiC,CAC9C,iBAAyB,EACzB,WAAmB,EACnB,OAAyE,EACzE,QAAuB;;YAEvB,IAAI,MAAiE,CAAC;YACtE,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,u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AU;CACX,CAAC;AACF,MAAM,wCAAwC,GAA6B;IACzE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,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 { VmwareCollectorsOperations } 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 { AzureMigrateAssessmentService } from \"../azureMigrateAssessmentService.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n VmwareCollector,\n VmwareCollectorsOperationsListByAssessmentProjectNextOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectResponse,\n VmwareCollectorsOperationsGetOptionalParams,\n VmwareCollectorsOperationsGetResponse,\n VmwareCollectorsOperationsCreateOptionalParams,\n VmwareCollectorsOperationsCreateResponse,\n VmwareCollectorsOperationsDeleteOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing VmwareCollectorsOperations operations. */\nexport class VmwareCollectorsOperationsImpl\n implements VmwareCollectorsOperations\n{\n private readonly client: AzureMigrateAssessmentService;\n\n /**\n * Initialize a new instance of the class VmwareCollectorsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AzureMigrateAssessmentService) {\n this.client = client;\n }\n\n /**\n * List VmwareCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n public listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): PagedAsyncIterableIterator<VmwareCollector> {\n const iter = this.listByAssessmentProjectPagingAll(\n resourceGroupName,\n projectName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByAssessmentProjectPagingPage(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<VmwareCollector[]> {\n let result: VmwareCollectorsOperationsListByAssessmentProjectResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByAssessmentProject(\n resourceGroupName,\n projectName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByAssessmentProjectNext(\n resourceGroupName,\n projectName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByAssessmentProjectPagingAll(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): AsyncIterableIterator<VmwareCollector> {\n for await (const page of this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List VmwareCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n private _listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): Promise<VmwareCollectorsOperationsListByAssessmentProjectResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, options },\n listByAssessmentProjectOperationSpec,\n );\n }\n\n /**\n * Get a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n options?: VmwareCollectorsOperationsGetOptionalParams,\n ): Promise<VmwareCollectorsOperationsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, vmWareCollectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n resource: VmwareCollector,\n options?: VmwareCollectorsOperationsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<VmwareCollectorsOperationsCreateResponse>,\n VmwareCollectorsOperationsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<VmwareCollectorsOperationsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n projectName,\n vmWareCollectorName,\n resource,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n VmwareCollectorsOperationsCreateResponse,\n OperationState<VmwareCollectorsOperationsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n resource: VmwareCollector,\n options?: VmwareCollectorsOperationsCreateOptionalParams,\n ): Promise<VmwareCollectorsOperationsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n projectName,\n vmWareCollectorName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n options?: VmwareCollectorsOperationsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, vmWareCollectorName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByAssessmentProjectNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param nextLink The nextLink from the previous successful call to the ListByAssessmentProject\n * method.\n * @param options The options parameters.\n */\n private _listByAssessmentProjectNext(\n resourceGroupName: string,\n projectName: string,\n nextLink: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectNextOptionalParams,\n ): Promise<VmwareCollectorsOperationsListByAssessmentProjectNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, nextLink, options },\n listByAssessmentProjectNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByAssessmentProjectOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 201: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 202: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 204: {\n bodyMapper: Mappers.VmwareCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByAssessmentProjectNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"vmwareCollectorsOperations.js","sourceRoot":"","sources":["../../../src/operations/vmwareCollectorsOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAGxB,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,uBAAuB,CAC5B,iBAAyB,EACzB,WAAmB,EACnB,OAAyE;QAEzE,MAAM,IAAI,GAAG,IAAI,CAAC,gCAAgC,CAChD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,iCAAiC,CAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,iCAAiC,CAC9C,iBAAyB,EACzB,WAAmB,EACnB,OAAyE,EACzE,QAAuB;QAEvB,IAAI,MAAiE,CAAC;QACtE,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAA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E;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,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 { VmwareCollectorsOperations } 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 { AzureMigrateAssessmentService } from \"../azureMigrateAssessmentService.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n VmwareCollector,\n VmwareCollectorsOperationsListByAssessmentProjectNextOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectResponse,\n VmwareCollectorsOperationsGetOptionalParams,\n VmwareCollectorsOperationsGetResponse,\n VmwareCollectorsOperationsCreateOptionalParams,\n VmwareCollectorsOperationsCreateResponse,\n VmwareCollectorsOperationsDeleteOptionalParams,\n VmwareCollectorsOperationsListByAssessmentProjectNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing VmwareCollectorsOperations operations. */\nexport class VmwareCollectorsOperationsImpl\n implements VmwareCollectorsOperations\n{\n private readonly client: AzureMigrateAssessmentService;\n\n /**\n * Initialize a new instance of the class VmwareCollectorsOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AzureMigrateAssessmentService) {\n this.client = client;\n }\n\n /**\n * List VmwareCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n public listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): PagedAsyncIterableIterator<VmwareCollector> {\n const iter = this.listByAssessmentProjectPagingAll(\n resourceGroupName,\n projectName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByAssessmentProjectPagingPage(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<VmwareCollector[]> {\n let result: VmwareCollectorsOperationsListByAssessmentProjectResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByAssessmentProject(\n resourceGroupName,\n projectName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByAssessmentProjectNext(\n resourceGroupName,\n projectName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByAssessmentProjectPagingAll(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): AsyncIterableIterator<VmwareCollector> {\n for await (const page of this.listByAssessmentProjectPagingPage(\n resourceGroupName,\n projectName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List VmwareCollector resources by AssessmentProject\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param options The options parameters.\n */\n private _listByAssessmentProject(\n resourceGroupName: string,\n projectName: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectOptionalParams,\n ): Promise<VmwareCollectorsOperationsListByAssessmentProjectResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, options },\n listByAssessmentProjectOperationSpec,\n );\n }\n\n /**\n * Get a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n options?: VmwareCollectorsOperationsGetOptionalParams,\n ): Promise<VmwareCollectorsOperationsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, vmWareCollectorName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n resource: VmwareCollector,\n options?: VmwareCollectorsOperationsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<VmwareCollectorsOperationsCreateResponse>,\n VmwareCollectorsOperationsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<VmwareCollectorsOperationsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n projectName,\n vmWareCollectorName,\n resource,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n VmwareCollectorsOperationsCreateResponse,\n OperationState<VmwareCollectorsOperationsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n resource: VmwareCollector,\n options?: VmwareCollectorsOperationsCreateOptionalParams,\n ): Promise<VmwareCollectorsOperationsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n projectName,\n vmWareCollectorName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a VmwareCollector\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param vmWareCollectorName VMware collector ARM name\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n projectName: string,\n vmWareCollectorName: string,\n options?: VmwareCollectorsOperationsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, vmWareCollectorName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListByAssessmentProjectNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param projectName Assessment Project Name\n * @param nextLink The nextLink from the previous successful call to the ListByAssessmentProject\n * method.\n * @param options The options parameters.\n */\n private _listByAssessmentProjectNext(\n resourceGroupName: string,\n projectName: string,\n nextLink: string,\n options?: VmwareCollectorsOperationsListByAssessmentProjectNextOptionalParams,\n ): Promise<VmwareCollectorsOperationsListByAssessmentProjectNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, projectName, nextLink, options },\n listByAssessmentProjectNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByAssessmentProjectOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 201: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 202: {\n bodyMapper: Mappers.VmwareCollector,\n },\n 204: {\n bodyMapper: Mappers.VmwareCollector,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/assessmentProjects/{projectName}/vmwarecollectors/{vmWareCollectorName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n Parameters.vmWareCollectorName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByAssessmentProjectNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.VmwareCollectorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.projectName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,18 +18,16 @@ const pageMap = new WeakMap();
|
|
|
18
18
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
19
19
|
*/
|
|
20
20
|
function getContinuationToken(page) {
|
|
21
|
-
var _a;
|
|
22
21
|
if (typeof page !== "object" || page === null) {
|
|
23
22
|
return undefined;
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return pageMap.get(page)?.continuationToken;
|
|
26
25
|
}
|
|
27
26
|
function setContinuationToken(page, continuationToken) {
|
|
28
|
-
var _a;
|
|
29
27
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
32
|
-
const pageInfo =
|
|
30
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
33
31
|
pageInfo.continuationToken = continuationToken;
|
|
34
32
|
pageMap.set(page, pageInfo);
|
|
35
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.8"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { OperationsImpl, AssessmentProjectsOperationsImpl, AssessmentOptionsOperationsImpl, AvsAssessmentOptionsOperationsImpl, GroupsOperationsImpl, AssessmentsOperationsImpl, AssessedMachinesOperationsImpl, AvsAssessmentsOperationsImpl, AvsAssessedMachinesOperationsImpl, SqlAssessmentV2OperationsImpl, AssessedSqlDatabaseV2OperationsImpl, AssessedSqlInstanceV2OperationsImpl, AssessedSqlMachinesOperationsImpl, AssessedSqlRecommendedEntityOperationsImpl, SqlAssessmentV2SummaryOperationsImpl, HypervCollectorsOperationsImpl, ImportCollectorsOperationsImpl, MachinesOperationsImpl, PrivateEndpointConnectionOperationsImpl, PrivateLinkResourceOperationsImpl, AssessmentProjectSummaryOperationsImpl, ServerCollectorsOperationsImpl, SqlAssessmentOptionsOperationsImpl, SqlCollectorOperationsImpl, VmwareCollectorsOperationsImpl, } from "./operations/index.js";
|
|
11
11
|
export class AzureMigrateAssessmentService extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the AzureMigrateAssessmentService class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -16,7 +19,6 @@ export class AzureMigrateAssessmentService extends coreClient.ServiceClient {
|
|
|
16
19
|
* @param options The parameter options
|
|
17
20
|
*/
|
|
18
21
|
constructor(credentials, subscriptionId, options) {
|
|
19
|
-
var _a, _b, _c;
|
|
20
22
|
if (credentials === undefined) {
|
|
21
23
|
throw new Error("'credentials' cannot be null");
|
|
22
24
|
}
|
|
@@ -35,12 +37,17 @@ export class AzureMigrateAssessmentService extends coreClient.ServiceClient {
|
|
|
35
37
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
38
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
39
|
: `${packageDetails}`;
|
|
38
|
-
const optionsWithDefaults =
|
|
40
|
+
const optionsWithDefaults = {
|
|
41
|
+
...defaults,
|
|
42
|
+
...options,
|
|
43
|
+
userAgentOptions: {
|
|
39
44
|
userAgentPrefix,
|
|
40
|
-
},
|
|
45
|
+
},
|
|
46
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
47
|
+
};
|
|
41
48
|
super(optionsWithDefaults);
|
|
42
49
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
-
if (
|
|
50
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
51
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
52
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
53
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -54,7 +61,8 @@ export class AzureMigrateAssessmentService extends coreClient.ServiceClient {
|
|
|
54
61
|
});
|
|
55
62
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
63
|
credential: credentials,
|
|
57
|
-
scopes:
|
|
64
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
65
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
58
66
|
challengeCallbacks: {
|
|
59
67
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
60
68
|
},
|
|
@@ -125,5 +133,30 @@ export class AzureMigrateAssessmentService extends coreClient.ServiceClient {
|
|
|
125
133
|
};
|
|
126
134
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
127
135
|
}
|
|
136
|
+
operations;
|
|
137
|
+
assessmentProjectsOperations;
|
|
138
|
+
assessmentOptionsOperations;
|
|
139
|
+
avsAssessmentOptionsOperations;
|
|
140
|
+
groupsOperations;
|
|
141
|
+
assessmentsOperations;
|
|
142
|
+
assessedMachinesOperations;
|
|
143
|
+
avsAssessmentsOperations;
|
|
144
|
+
avsAssessedMachinesOperations;
|
|
145
|
+
sqlAssessmentV2Operations;
|
|
146
|
+
assessedSqlDatabaseV2Operations;
|
|
147
|
+
assessedSqlInstanceV2Operations;
|
|
148
|
+
assessedSqlMachinesOperations;
|
|
149
|
+
assessedSqlRecommendedEntityOperations;
|
|
150
|
+
sqlAssessmentV2SummaryOperations;
|
|
151
|
+
hypervCollectorsOperations;
|
|
152
|
+
importCollectorsOperations;
|
|
153
|
+
machinesOperations;
|
|
154
|
+
privateEndpointConnectionOperations;
|
|
155
|
+
privateLinkResourceOperations;
|
|
156
|
+
assessmentProjectSummaryOperations;
|
|
157
|
+
serverCollectorsOperations;
|
|
158
|
+
sqlAssessmentOptionsOperations;
|
|
159
|
+
sqlCollectorOperations;
|
|
160
|
+
vmwareCollectorsOperations;
|
|
128
161
|
}
|
|
129
162
|
//# sourceMappingURL=azureMigrateAssessmentService.js.map
|