@azure/arm-advisor 3.2.0-alpha.20241218.1 → 3.2.0-alpha.20241219.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-esm/src → dist/commonjs}/advisorManagementClient.d.ts +2 -2
- package/dist/commonjs/advisorManagementClient.d.ts.map +1 -0
- package/dist/commonjs/advisorManagementClient.js +103 -0
- package/dist/commonjs/advisorManagementClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/{dist-esm/src → dist/commonjs}/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +77 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.js +652 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.js +172 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/configurations.d.ts +3 -3
- package/dist/commonjs/operations/configurations.d.ts.map +1 -0
- package/dist/commonjs/operations/configurations.js +271 -0
- package/dist/commonjs/operations/configurations.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +6 -0
- package/{dist-esm/src → dist/commonjs}/operations/index.d.ts.map +1 -1
- package/dist/commonjs/operations/index.js +16 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/operations.d.ts +3 -3
- package/dist/commonjs/operations/operations.d.ts.map +1 -0
- package/dist/commonjs/operations/operations.js +137 -0
- package/dist/commonjs/operations/operations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/recommendationMetadata.d.ts +3 -3
- package/dist/commonjs/operations/recommendationMetadata.d.ts.map +1 -0
- package/dist/commonjs/operations/recommendationMetadata.js +165 -0
- package/dist/commonjs/operations/recommendationMetadata.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/recommendations.d.ts +3 -3
- package/dist/commonjs/operations/recommendations.d.ts.map +1 -0
- package/dist/commonjs/operations/recommendations.js +215 -0
- package/dist/commonjs/operations/recommendations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operations/suppressions.d.ts +3 -3
- package/dist/commonjs/operations/suppressions.d.ts.map +1 -0
- package/dist/commonjs/operations/suppressions.js +247 -0
- package/dist/commonjs/operations/suppressions.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/configurations.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/configurations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/configurations.js +10 -0
- package/dist/commonjs/operationsInterfaces/configurations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +6 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/index.js +16 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/operations.d.ts +1 -1
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.js +10 -0
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/recommendationMetadata.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.js +10 -0
- package/dist/commonjs/operationsInterfaces/recommendationMetadata.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/recommendations.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/recommendations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/recommendations.js +10 -0
- package/dist/commonjs/operationsInterfaces/recommendations.js.map +1 -0
- package/{dist-esm/src → dist/commonjs}/operationsInterfaces/suppressions.d.ts +1 -1
- package/dist/commonjs/operationsInterfaces/suppressions.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/suppressions.js +10 -0
- package/dist/commonjs/operationsInterfaces/suppressions.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/{dist-esm/src → dist/commonjs}/pagingHelper.d.ts.map +1 -1
- package/dist/commonjs/pagingHelper.js +36 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/esm/advisorManagementClient.d.ts +25 -0
- package/dist/esm/advisorManagementClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/advisorManagementClient.js +22 -26
- package/dist/esm/advisorManagementClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/index.js +4 -4
- package/dist/esm/index.js.map +1 -0
- package/{types/arm-advisor.d.ts → dist/esm/models/index.d.ts} +466 -700
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +21 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/models/mappers.js +225 -225
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +19 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/models/parameters.js +48 -48
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/configurations.d.ts +62 -0
- package/dist/esm/operations/configurations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/configurations.js +29 -41
- package/dist/esm/operations/configurations.js.map +1 -0
- package/dist/esm/operations/index.d.ts +6 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/operationsInterfaces → dist/esm/operations}/index.js +5 -5
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operations.d.ts +32 -0
- package/dist/esm/operations/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/operations.js +12 -12
- package/dist/esm/operations/operations.js.map +1 -0
- package/dist/esm/operations/recommendationMetadata.d.ts +38 -0
- package/dist/esm/operations/recommendationMetadata.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/recommendationMetadata.js +17 -17
- package/dist/esm/operations/recommendationMetadata.js.map +1 -0
- package/dist/esm/operations/recommendations.d.ts +57 -0
- package/dist/esm/operations/recommendations.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/recommendations.js +27 -44
- package/dist/esm/operations/recommendations.js.map +1 -0
- package/dist/esm/operations/suppressions.d.ts +65 -0
- package/dist/esm/operations/suppressions.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/operations/suppressions.js +30 -38
- package/dist/esm/operations/suppressions.js.map +1 -0
- package/dist/esm/operationsInterfaces/configurations.d.ts +33 -0
- package/dist/esm/operationsInterfaces/configurations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/configurations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +6 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/{dist-esm/src/operations → dist/esm/operationsInterfaces}/index.js +5 -5
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/operations.js.map +1 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.d.ts +17 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/recommendationMetadata.js.map +1 -0
- package/dist/esm/operationsInterfaces/recommendations.d.ts +35 -0
- package/dist/esm/operationsInterfaces/recommendations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/recommendations.js.map +1 -0
- package/dist/esm/operationsInterfaces/suppressions.d.ts +43 -0
- package/dist/esm/operationsInterfaces/suppressions.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/suppressions.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/package.json +51 -35
- package/dist/index.js +0 -2102
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js +0 -58
- package/dist-esm/samples-dev/configurationsCreateInResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js +0 -57
- package/dist-esm/samples-dev/configurationsCreateInSubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js +0 -53
- package/dist-esm/samples-dev/configurationsListByResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js +0 -52
- package/dist-esm/samples-dev/configurationsListBySubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationMetadataGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js +0 -36
- package/dist-esm/samples-dev/recommendationMetadataGetSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationMetadataListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationMetadataListSample.js +0 -51
- package/dist-esm/samples-dev/recommendationMetadataListSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGenerateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGenerateSample.js +0 -36
- package/dist-esm/samples-dev/recommendationsGenerateSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js +0 -37
- package/dist-esm/samples-dev/recommendationsGetGenerateStatusSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsGetSample.js +0 -37
- package/dist-esm/samples-dev/recommendationsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/recommendationsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/recommendationsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/recommendationsListSample.js +0 -54
- package/dist-esm/samples-dev/recommendationsListSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsCreateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsCreateSample.js +0 -39
- package/dist-esm/samples-dev/suppressionsCreateSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsDeleteSample.js +0 -38
- package/dist-esm/samples-dev/suppressionsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsGetSample.js +0 -38
- package/dist-esm/samples-dev/suppressionsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/suppressionsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/suppressionsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/suppressionsListSample.js +0 -52
- package/dist-esm/samples-dev/suppressionsListSample.js.map +0 -1
- package/dist-esm/src/advisorManagementClient.d.ts.map +0 -1
- package/dist-esm/src/advisorManagementClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -5
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/configurations.d.ts.map +0 -1
- package/dist-esm/src/operations/configurations.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -6
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/operations.d.ts.map +0 -1
- package/dist-esm/src/operations/operations.js.map +0 -1
- package/dist-esm/src/operations/recommendationMetadata.d.ts.map +0 -1
- package/dist-esm/src/operations/recommendationMetadata.js.map +0 -1
- package/dist-esm/src/operations/recommendations.d.ts.map +0 -1
- package/dist-esm/src/operations/recommendations.js.map +0 -1
- package/dist-esm/src/operations/suppressions.d.ts.map +0 -1
- package/dist-esm/src/operations/suppressions.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/configurations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -6
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendationMetadata.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/recommendations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/suppressions.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/suppressions.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/advisor_operations_test.spec.d.ts +0 -4
- package/dist-esm/test/advisor_operations_test.spec.d.ts.map +0 -1
- package/dist-esm/test/advisor_operations_test.spec.js +0 -77
- package/dist-esm/test/advisor_operations_test.spec.js.map +0 -1
- package/src/advisorManagementClient.ts +0 -174
- package/src/index.ts +0 -13
- package/src/models/index.ts +0 -538
- package/src/models/mappers.ts +0 -700
- package/src/models/parameters.ts +0 -194
- package/src/operations/configurations.ts +0 -336
- package/src/operations/index.ts +0 -13
- package/src/operations/operations.ts +0 -149
- package/src/operations/recommendationMetadata.ts +0 -186
- package/src/operations/recommendations.ts +0 -271
- package/src/operations/suppressions.ts +0 -304
- package/src/operationsInterfaces/configurations.ts +0 -65
- package/src/operationsInterfaces/index.ts +0 -13
- package/src/operationsInterfaces/operations.ts +0 -22
- package/src/operationsInterfaces/recommendationMetadata.ts +0 -36
- package/src/operationsInterfaces/recommendations.ts +0 -63
- package/src/operationsInterfaces/suppressions.ts +0 -78
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/commonjs}/models/index.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/commonjs}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/commonjs}/pagingHelper.d.ts +0 -0
- /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
- /package/{dist-esm/src → dist/esm}/models/index.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/configurations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/operations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/recommendationMetadata.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/recommendations.js +0 -0
- /package/{dist-esm/src → dist/esm}/operationsInterfaces/suppressions.js +0 -0
- /package/{dist-esm/src → dist/esm}/pagingHelper.js +0 -0
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
-
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
-
import { RecommendationMetadata } from "../operationsInterfaces";
|
|
12
|
-
import * as coreClient from "@azure/core-client";
|
|
13
|
-
import * as Mappers from "../models/mappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { AdvisorManagementClient } from "../advisorManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
MetadataEntity,
|
|
18
|
-
RecommendationMetadataListNextOptionalParams,
|
|
19
|
-
RecommendationMetadataListOptionalParams,
|
|
20
|
-
RecommendationMetadataListResponse,
|
|
21
|
-
RecommendationMetadataGetOptionalParams,
|
|
22
|
-
RecommendationMetadataGetResponse,
|
|
23
|
-
RecommendationMetadataListNextResponse
|
|
24
|
-
} from "../models";
|
|
25
|
-
|
|
26
|
-
/// <reference lib="esnext.asynciterable" />
|
|
27
|
-
/** Class containing RecommendationMetadata operations. */
|
|
28
|
-
export class RecommendationMetadataImpl implements RecommendationMetadata {
|
|
29
|
-
private readonly client: AdvisorManagementClient;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Initialize a new instance of the class RecommendationMetadata class.
|
|
33
|
-
* @param client Reference to the service client
|
|
34
|
-
*/
|
|
35
|
-
constructor(client: AdvisorManagementClient) {
|
|
36
|
-
this.client = client;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Gets the list of metadata entities.
|
|
41
|
-
* @param options The options parameters.
|
|
42
|
-
*/
|
|
43
|
-
public list(
|
|
44
|
-
options?: RecommendationMetadataListOptionalParams
|
|
45
|
-
): PagedAsyncIterableIterator<MetadataEntity> {
|
|
46
|
-
const iter = this.listPagingAll(options);
|
|
47
|
-
return {
|
|
48
|
-
next() {
|
|
49
|
-
return iter.next();
|
|
50
|
-
},
|
|
51
|
-
[Symbol.asyncIterator]() {
|
|
52
|
-
return this;
|
|
53
|
-
},
|
|
54
|
-
byPage: (settings?: PageSettings) => {
|
|
55
|
-
if (settings?.maxPageSize) {
|
|
56
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
57
|
-
}
|
|
58
|
-
return this.listPagingPage(options, settings);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private async *listPagingPage(
|
|
64
|
-
options?: RecommendationMetadataListOptionalParams,
|
|
65
|
-
settings?: PageSettings
|
|
66
|
-
): AsyncIterableIterator<MetadataEntity[]> {
|
|
67
|
-
let result: RecommendationMetadataListResponse;
|
|
68
|
-
let continuationToken = settings?.continuationToken;
|
|
69
|
-
if (!continuationToken) {
|
|
70
|
-
result = await this._list(options);
|
|
71
|
-
let page = result.value || [];
|
|
72
|
-
continuationToken = result.nextLink;
|
|
73
|
-
setContinuationToken(page, continuationToken);
|
|
74
|
-
yield page;
|
|
75
|
-
}
|
|
76
|
-
while (continuationToken) {
|
|
77
|
-
result = await this._listNext(continuationToken, options);
|
|
78
|
-
continuationToken = result.nextLink;
|
|
79
|
-
let page = result.value || [];
|
|
80
|
-
setContinuationToken(page, continuationToken);
|
|
81
|
-
yield page;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private async *listPagingAll(
|
|
86
|
-
options?: RecommendationMetadataListOptionalParams
|
|
87
|
-
): AsyncIterableIterator<MetadataEntity> {
|
|
88
|
-
for await (const page of this.listPagingPage(options)) {
|
|
89
|
-
yield* page;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Gets the metadata entity.
|
|
95
|
-
* @param name Name of metadata entity.
|
|
96
|
-
* @param options The options parameters.
|
|
97
|
-
*/
|
|
98
|
-
get(
|
|
99
|
-
name: string,
|
|
100
|
-
options?: RecommendationMetadataGetOptionalParams
|
|
101
|
-
): Promise<RecommendationMetadataGetResponse> {
|
|
102
|
-
return this.client.sendOperationRequest(
|
|
103
|
-
{ name, options },
|
|
104
|
-
getOperationSpec
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Gets the list of metadata entities.
|
|
110
|
-
* @param options The options parameters.
|
|
111
|
-
*/
|
|
112
|
-
private _list(
|
|
113
|
-
options?: RecommendationMetadataListOptionalParams
|
|
114
|
-
): Promise<RecommendationMetadataListResponse> {
|
|
115
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* ListNext
|
|
120
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
121
|
-
* @param options The options parameters.
|
|
122
|
-
*/
|
|
123
|
-
private _listNext(
|
|
124
|
-
nextLink: string,
|
|
125
|
-
options?: RecommendationMetadataListNextOptionalParams
|
|
126
|
-
): Promise<RecommendationMetadataListNextResponse> {
|
|
127
|
-
return this.client.sendOperationRequest(
|
|
128
|
-
{ nextLink, options },
|
|
129
|
-
listNextOperationSpec
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Operation Specifications
|
|
134
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
135
|
-
|
|
136
|
-
const getOperationSpec: coreClient.OperationSpec = {
|
|
137
|
-
path: "/providers/Microsoft.Advisor/metadata/{name}",
|
|
138
|
-
httpMethod: "GET",
|
|
139
|
-
responses: {
|
|
140
|
-
200: {
|
|
141
|
-
bodyMapper: Mappers.MetadataEntity
|
|
142
|
-
},
|
|
143
|
-
404: {
|
|
144
|
-
bodyMapper: Mappers.ARMErrorResponseBody,
|
|
145
|
-
isError: true
|
|
146
|
-
},
|
|
147
|
-
default: {
|
|
148
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
queryParameters: [Parameters.apiVersion],
|
|
152
|
-
urlParameters: [Parameters.$host, Parameters.name],
|
|
153
|
-
headerParameters: [Parameters.accept],
|
|
154
|
-
serializer
|
|
155
|
-
};
|
|
156
|
-
const listOperationSpec: coreClient.OperationSpec = {
|
|
157
|
-
path: "/providers/Microsoft.Advisor/metadata",
|
|
158
|
-
httpMethod: "GET",
|
|
159
|
-
responses: {
|
|
160
|
-
200: {
|
|
161
|
-
bodyMapper: Mappers.MetadataEntityListResult
|
|
162
|
-
},
|
|
163
|
-
default: {
|
|
164
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
queryParameters: [Parameters.apiVersion],
|
|
168
|
-
urlParameters: [Parameters.$host],
|
|
169
|
-
headerParameters: [Parameters.accept],
|
|
170
|
-
serializer
|
|
171
|
-
};
|
|
172
|
-
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
173
|
-
path: "{nextLink}",
|
|
174
|
-
httpMethod: "GET",
|
|
175
|
-
responses: {
|
|
176
|
-
200: {
|
|
177
|
-
bodyMapper: Mappers.MetadataEntityListResult
|
|
178
|
-
},
|
|
179
|
-
default: {
|
|
180
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
184
|
-
headerParameters: [Parameters.accept],
|
|
185
|
-
serializer
|
|
186
|
-
};
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
-
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
-
import { Recommendations } from "../operationsInterfaces";
|
|
12
|
-
import * as coreClient from "@azure/core-client";
|
|
13
|
-
import * as Mappers from "../models/mappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { AdvisorManagementClient } from "../advisorManagementClient";
|
|
16
|
-
import {
|
|
17
|
-
ResourceRecommendationBase,
|
|
18
|
-
RecommendationsListNextOptionalParams,
|
|
19
|
-
RecommendationsListOptionalParams,
|
|
20
|
-
RecommendationsListResponse,
|
|
21
|
-
RecommendationsGenerateOptionalParams,
|
|
22
|
-
RecommendationsGenerateResponse,
|
|
23
|
-
RecommendationsGetGenerateStatusOptionalParams,
|
|
24
|
-
RecommendationsGetOptionalParams,
|
|
25
|
-
RecommendationsGetResponse,
|
|
26
|
-
RecommendationsListNextResponse
|
|
27
|
-
} from "../models";
|
|
28
|
-
|
|
29
|
-
/// <reference lib="esnext.asynciterable" />
|
|
30
|
-
/** Class containing Recommendations operations. */
|
|
31
|
-
export class RecommendationsImpl implements Recommendations {
|
|
32
|
-
private readonly client: AdvisorManagementClient;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Initialize a new instance of the class Recommendations class.
|
|
36
|
-
* @param client Reference to the service client
|
|
37
|
-
*/
|
|
38
|
-
constructor(client: AdvisorManagementClient) {
|
|
39
|
-
this.client = client;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by
|
|
44
|
-
* invoking generateRecommendations.
|
|
45
|
-
* @param options The options parameters.
|
|
46
|
-
*/
|
|
47
|
-
public list(
|
|
48
|
-
options?: RecommendationsListOptionalParams
|
|
49
|
-
): PagedAsyncIterableIterator<ResourceRecommendationBase> {
|
|
50
|
-
const iter = this.listPagingAll(options);
|
|
51
|
-
return {
|
|
52
|
-
next() {
|
|
53
|
-
return iter.next();
|
|
54
|
-
},
|
|
55
|
-
[Symbol.asyncIterator]() {
|
|
56
|
-
return this;
|
|
57
|
-
},
|
|
58
|
-
byPage: (settings?: PageSettings) => {
|
|
59
|
-
if (settings?.maxPageSize) {
|
|
60
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
-
}
|
|
62
|
-
return this.listPagingPage(options, settings);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
private async *listPagingPage(
|
|
68
|
-
options?: RecommendationsListOptionalParams,
|
|
69
|
-
settings?: PageSettings
|
|
70
|
-
): AsyncIterableIterator<ResourceRecommendationBase[]> {
|
|
71
|
-
let result: RecommendationsListResponse;
|
|
72
|
-
let continuationToken = settings?.continuationToken;
|
|
73
|
-
if (!continuationToken) {
|
|
74
|
-
result = await this._list(options);
|
|
75
|
-
let page = result.value || [];
|
|
76
|
-
continuationToken = result.nextLink;
|
|
77
|
-
setContinuationToken(page, continuationToken);
|
|
78
|
-
yield page;
|
|
79
|
-
}
|
|
80
|
-
while (continuationToken) {
|
|
81
|
-
result = await this._listNext(continuationToken, options);
|
|
82
|
-
continuationToken = result.nextLink;
|
|
83
|
-
let page = result.value || [];
|
|
84
|
-
setContinuationToken(page, continuationToken);
|
|
85
|
-
yield page;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private async *listPagingAll(
|
|
90
|
-
options?: RecommendationsListOptionalParams
|
|
91
|
-
): AsyncIterableIterator<ResourceRecommendationBase> {
|
|
92
|
-
for await (const page of this.listPagingPage(options)) {
|
|
93
|
-
yield* page;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Initiates the recommendation generation or computation process for a subscription. This operation is
|
|
99
|
-
* asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
|
100
|
-
* @param options The options parameters.
|
|
101
|
-
*/
|
|
102
|
-
generate(
|
|
103
|
-
options?: RecommendationsGenerateOptionalParams
|
|
104
|
-
): Promise<RecommendationsGenerateResponse> {
|
|
105
|
-
return this.client.sendOperationRequest({ options }, generateOperationSpec);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Retrieves the status of the recommendation computation or generation process. Invoke this API after
|
|
110
|
-
* calling the generation recommendation. The URI of this API is returned in the Location field of the
|
|
111
|
-
* response header.
|
|
112
|
-
* @param operationId The operation ID, which can be found from the Location field in the generate
|
|
113
|
-
* recommendation response header.
|
|
114
|
-
* @param options The options parameters.
|
|
115
|
-
*/
|
|
116
|
-
getGenerateStatus(
|
|
117
|
-
operationId: string,
|
|
118
|
-
options?: RecommendationsGetGenerateStatusOptionalParams
|
|
119
|
-
): Promise<void> {
|
|
120
|
-
return this.client.sendOperationRequest(
|
|
121
|
-
{ operationId, options },
|
|
122
|
-
getGenerateStatusOperationSpec
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by
|
|
128
|
-
* invoking generateRecommendations.
|
|
129
|
-
* @param options The options parameters.
|
|
130
|
-
*/
|
|
131
|
-
private _list(
|
|
132
|
-
options?: RecommendationsListOptionalParams
|
|
133
|
-
): Promise<RecommendationsListResponse> {
|
|
134
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Obtains details of a cached recommendation.
|
|
139
|
-
* @param resourceUri The fully qualified Azure Resource Manager identifier of the resource to which
|
|
140
|
-
* the recommendation applies.
|
|
141
|
-
* @param recommendationId The recommendation ID.
|
|
142
|
-
* @param options The options parameters.
|
|
143
|
-
*/
|
|
144
|
-
get(
|
|
145
|
-
resourceUri: string,
|
|
146
|
-
recommendationId: string,
|
|
147
|
-
options?: RecommendationsGetOptionalParams
|
|
148
|
-
): Promise<RecommendationsGetResponse> {
|
|
149
|
-
return this.client.sendOperationRequest(
|
|
150
|
-
{ resourceUri, recommendationId, options },
|
|
151
|
-
getOperationSpec
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* ListNext
|
|
157
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
158
|
-
* @param options The options parameters.
|
|
159
|
-
*/
|
|
160
|
-
private _listNext(
|
|
161
|
-
nextLink: string,
|
|
162
|
-
options?: RecommendationsListNextOptionalParams
|
|
163
|
-
): Promise<RecommendationsListNextResponse> {
|
|
164
|
-
return this.client.sendOperationRequest(
|
|
165
|
-
{ nextLink, options },
|
|
166
|
-
listNextOperationSpec
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
// Operation Specifications
|
|
171
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
172
|
-
|
|
173
|
-
const generateOperationSpec: coreClient.OperationSpec = {
|
|
174
|
-
path:
|
|
175
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations",
|
|
176
|
-
httpMethod: "POST",
|
|
177
|
-
responses: {
|
|
178
|
-
202: {
|
|
179
|
-
headersMapper: Mappers.RecommendationsGenerateHeaders
|
|
180
|
-
},
|
|
181
|
-
default: {
|
|
182
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
queryParameters: [Parameters.apiVersion],
|
|
186
|
-
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
187
|
-
headerParameters: [Parameters.accept],
|
|
188
|
-
serializer
|
|
189
|
-
};
|
|
190
|
-
const getGenerateStatusOperationSpec: coreClient.OperationSpec = {
|
|
191
|
-
path:
|
|
192
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/generateRecommendations/{operationId}",
|
|
193
|
-
httpMethod: "GET",
|
|
194
|
-
responses: {
|
|
195
|
-
202: {},
|
|
196
|
-
204: {},
|
|
197
|
-
default: {
|
|
198
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
queryParameters: [Parameters.apiVersion],
|
|
202
|
-
urlParameters: [
|
|
203
|
-
Parameters.$host,
|
|
204
|
-
Parameters.subscriptionId,
|
|
205
|
-
Parameters.operationId
|
|
206
|
-
],
|
|
207
|
-
headerParameters: [Parameters.accept],
|
|
208
|
-
serializer
|
|
209
|
-
};
|
|
210
|
-
const listOperationSpec: coreClient.OperationSpec = {
|
|
211
|
-
path:
|
|
212
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/recommendations",
|
|
213
|
-
httpMethod: "GET",
|
|
214
|
-
responses: {
|
|
215
|
-
200: {
|
|
216
|
-
bodyMapper: Mappers.ResourceRecommendationBaseListResult
|
|
217
|
-
},
|
|
218
|
-
default: {
|
|
219
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
queryParameters: [
|
|
223
|
-
Parameters.apiVersion,
|
|
224
|
-
Parameters.filter,
|
|
225
|
-
Parameters.top,
|
|
226
|
-
Parameters.skipToken
|
|
227
|
-
],
|
|
228
|
-
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
229
|
-
headerParameters: [Parameters.accept],
|
|
230
|
-
serializer
|
|
231
|
-
};
|
|
232
|
-
const getOperationSpec: coreClient.OperationSpec = {
|
|
233
|
-
path:
|
|
234
|
-
"/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}",
|
|
235
|
-
httpMethod: "GET",
|
|
236
|
-
responses: {
|
|
237
|
-
200: {
|
|
238
|
-
bodyMapper: Mappers.ResourceRecommendationBase
|
|
239
|
-
},
|
|
240
|
-
default: {
|
|
241
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
queryParameters: [Parameters.apiVersion],
|
|
245
|
-
urlParameters: [
|
|
246
|
-
Parameters.$host,
|
|
247
|
-
Parameters.resourceUri,
|
|
248
|
-
Parameters.recommendationId
|
|
249
|
-
],
|
|
250
|
-
headerParameters: [Parameters.accept],
|
|
251
|
-
serializer
|
|
252
|
-
};
|
|
253
|
-
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
254
|
-
path: "{nextLink}",
|
|
255
|
-
httpMethod: "GET",
|
|
256
|
-
responses: {
|
|
257
|
-
200: {
|
|
258
|
-
bodyMapper: Mappers.ResourceRecommendationBaseListResult
|
|
259
|
-
},
|
|
260
|
-
default: {
|
|
261
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
urlParameters: [
|
|
265
|
-
Parameters.$host,
|
|
266
|
-
Parameters.nextLink,
|
|
267
|
-
Parameters.subscriptionId
|
|
268
|
-
],
|
|
269
|
-
headerParameters: [Parameters.accept],
|
|
270
|
-
serializer
|
|
271
|
-
};
|