@azure/arm-advisor 3.2.0-alpha.20241216.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/README.md +4 -4
- 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
package/src/models/parameters.ts
DELETED
|
@@ -1,194 +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 {
|
|
10
|
-
OperationParameter,
|
|
11
|
-
OperationURLParameter,
|
|
12
|
-
OperationQueryParameter
|
|
13
|
-
} from "@azure/core-client";
|
|
14
|
-
import {
|
|
15
|
-
ConfigData as ConfigDataMapper,
|
|
16
|
-
SuppressionContract as SuppressionContractMapper
|
|
17
|
-
} from "../models/mappers";
|
|
18
|
-
|
|
19
|
-
export const accept: OperationParameter = {
|
|
20
|
-
parameterPath: "accept",
|
|
21
|
-
mapper: {
|
|
22
|
-
defaultValue: "application/json",
|
|
23
|
-
isConstant: true,
|
|
24
|
-
serializedName: "Accept",
|
|
25
|
-
type: {
|
|
26
|
-
name: "String"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const $host: OperationURLParameter = {
|
|
32
|
-
parameterPath: "$host",
|
|
33
|
-
mapper: {
|
|
34
|
-
serializedName: "$host",
|
|
35
|
-
required: true,
|
|
36
|
-
type: {
|
|
37
|
-
name: "String"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
skipEncoding: true
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const name: OperationURLParameter = {
|
|
44
|
-
parameterPath: "name",
|
|
45
|
-
mapper: {
|
|
46
|
-
serializedName: "name",
|
|
47
|
-
required: true,
|
|
48
|
-
type: {
|
|
49
|
-
name: "String"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const apiVersion: OperationQueryParameter = {
|
|
55
|
-
parameterPath: "apiVersion",
|
|
56
|
-
mapper: {
|
|
57
|
-
defaultValue: "2020-01-01",
|
|
58
|
-
isConstant: true,
|
|
59
|
-
serializedName: "api-version",
|
|
60
|
-
type: {
|
|
61
|
-
name: "String"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const nextLink: OperationURLParameter = {
|
|
67
|
-
parameterPath: "nextLink",
|
|
68
|
-
mapper: {
|
|
69
|
-
serializedName: "nextLink",
|
|
70
|
-
required: true,
|
|
71
|
-
type: {
|
|
72
|
-
name: "String"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
skipEncoding: true
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export const subscriptionId: OperationURLParameter = {
|
|
79
|
-
parameterPath: "subscriptionId",
|
|
80
|
-
mapper: {
|
|
81
|
-
serializedName: "subscriptionId",
|
|
82
|
-
required: true,
|
|
83
|
-
type: {
|
|
84
|
-
name: "String"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const contentType: OperationParameter = {
|
|
90
|
-
parameterPath: ["options", "contentType"],
|
|
91
|
-
mapper: {
|
|
92
|
-
defaultValue: "application/json",
|
|
93
|
-
isConstant: true,
|
|
94
|
-
serializedName: "Content-Type",
|
|
95
|
-
type: {
|
|
96
|
-
name: "String"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const configContract: OperationParameter = {
|
|
102
|
-
parameterPath: "configContract",
|
|
103
|
-
mapper: ConfigDataMapper
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export const configurationName: OperationURLParameter = {
|
|
107
|
-
parameterPath: "configurationName",
|
|
108
|
-
mapper: {
|
|
109
|
-
serializedName: "configurationName",
|
|
110
|
-
required: true,
|
|
111
|
-
type: {
|
|
112
|
-
name: "String"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const resourceGroup: OperationURLParameter = {
|
|
118
|
-
parameterPath: "resourceGroup",
|
|
119
|
-
mapper: {
|
|
120
|
-
serializedName: "resourceGroup",
|
|
121
|
-
required: true,
|
|
122
|
-
type: {
|
|
123
|
-
name: "String"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export const operationId: OperationURLParameter = {
|
|
129
|
-
parameterPath: "operationId",
|
|
130
|
-
mapper: {
|
|
131
|
-
serializedName: "operationId",
|
|
132
|
-
required: true,
|
|
133
|
-
type: {
|
|
134
|
-
name: "Uuid"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export const filter: OperationQueryParameter = {
|
|
140
|
-
parameterPath: ["options", "filter"],
|
|
141
|
-
mapper: {
|
|
142
|
-
serializedName: "$filter",
|
|
143
|
-
type: {
|
|
144
|
-
name: "String"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const top: OperationQueryParameter = {
|
|
150
|
-
parameterPath: ["options", "top"],
|
|
151
|
-
mapper: {
|
|
152
|
-
serializedName: "$top",
|
|
153
|
-
type: {
|
|
154
|
-
name: "Number"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export const skipToken: OperationQueryParameter = {
|
|
160
|
-
parameterPath: ["options", "skipToken"],
|
|
161
|
-
mapper: {
|
|
162
|
-
serializedName: "$skipToken",
|
|
163
|
-
type: {
|
|
164
|
-
name: "String"
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export const resourceUri: OperationURLParameter = {
|
|
170
|
-
parameterPath: "resourceUri",
|
|
171
|
-
mapper: {
|
|
172
|
-
serializedName: "resourceUri",
|
|
173
|
-
required: true,
|
|
174
|
-
type: {
|
|
175
|
-
name: "String"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
export const recommendationId: OperationURLParameter = {
|
|
181
|
-
parameterPath: "recommendationId",
|
|
182
|
-
mapper: {
|
|
183
|
-
serializedName: "recommendationId",
|
|
184
|
-
required: true,
|
|
185
|
-
type: {
|
|
186
|
-
name: "String"
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
export const suppressionContract: OperationParameter = {
|
|
192
|
-
parameterPath: "suppressionContract",
|
|
193
|
-
mapper: SuppressionContractMapper
|
|
194
|
-
};
|
|
@@ -1,336 +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 { Configurations } 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
|
-
ConfigData,
|
|
18
|
-
ConfigurationsListBySubscriptionNextOptionalParams,
|
|
19
|
-
ConfigurationsListBySubscriptionOptionalParams,
|
|
20
|
-
ConfigurationsListBySubscriptionResponse,
|
|
21
|
-
ConfigurationsListByResourceGroupOptionalParams,
|
|
22
|
-
ConfigurationsListByResourceGroupResponse,
|
|
23
|
-
ConfigurationName,
|
|
24
|
-
ConfigurationsCreateInSubscriptionOptionalParams,
|
|
25
|
-
ConfigurationsCreateInSubscriptionResponse,
|
|
26
|
-
ConfigurationsCreateInResourceGroupOptionalParams,
|
|
27
|
-
ConfigurationsCreateInResourceGroupResponse,
|
|
28
|
-
ConfigurationsListBySubscriptionNextResponse
|
|
29
|
-
} from "../models";
|
|
30
|
-
|
|
31
|
-
/// <reference lib="esnext.asynciterable" />
|
|
32
|
-
/** Class containing Configurations operations. */
|
|
33
|
-
export class ConfigurationsImpl implements Configurations {
|
|
34
|
-
private readonly client: AdvisorManagementClient;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Initialize a new instance of the class Configurations class.
|
|
38
|
-
* @param client Reference to the service client
|
|
39
|
-
*/
|
|
40
|
-
constructor(client: AdvisorManagementClient) {
|
|
41
|
-
this.client = client;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
|
|
46
|
-
* @param options The options parameters.
|
|
47
|
-
*/
|
|
48
|
-
public listBySubscription(
|
|
49
|
-
options?: ConfigurationsListBySubscriptionOptionalParams
|
|
50
|
-
): PagedAsyncIterableIterator<ConfigData> {
|
|
51
|
-
const iter = this.listBySubscriptionPagingAll(options);
|
|
52
|
-
return {
|
|
53
|
-
next() {
|
|
54
|
-
return iter.next();
|
|
55
|
-
},
|
|
56
|
-
[Symbol.asyncIterator]() {
|
|
57
|
-
return this;
|
|
58
|
-
},
|
|
59
|
-
byPage: (settings?: PageSettings) => {
|
|
60
|
-
if (settings?.maxPageSize) {
|
|
61
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
62
|
-
}
|
|
63
|
-
return this.listBySubscriptionPagingPage(options, settings);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private async *listBySubscriptionPagingPage(
|
|
69
|
-
options?: ConfigurationsListBySubscriptionOptionalParams,
|
|
70
|
-
settings?: PageSettings
|
|
71
|
-
): AsyncIterableIterator<ConfigData[]> {
|
|
72
|
-
let result: ConfigurationsListBySubscriptionResponse;
|
|
73
|
-
let continuationToken = settings?.continuationToken;
|
|
74
|
-
if (!continuationToken) {
|
|
75
|
-
result = await this._listBySubscription(options);
|
|
76
|
-
let page = result.value || [];
|
|
77
|
-
continuationToken = result.nextLink;
|
|
78
|
-
setContinuationToken(page, continuationToken);
|
|
79
|
-
yield page;
|
|
80
|
-
}
|
|
81
|
-
while (continuationToken) {
|
|
82
|
-
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
83
|
-
continuationToken = result.nextLink;
|
|
84
|
-
let page = result.value || [];
|
|
85
|
-
setContinuationToken(page, continuationToken);
|
|
86
|
-
yield page;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private async *listBySubscriptionPagingAll(
|
|
91
|
-
options?: ConfigurationsListBySubscriptionOptionalParams
|
|
92
|
-
): AsyncIterableIterator<ConfigData> {
|
|
93
|
-
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
94
|
-
yield* page;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Retrieve Azure Advisor configurations.
|
|
100
|
-
* @param resourceGroup The name of the Azure resource group.
|
|
101
|
-
* @param options The options parameters.
|
|
102
|
-
*/
|
|
103
|
-
public listByResourceGroup(
|
|
104
|
-
resourceGroup: string,
|
|
105
|
-
options?: ConfigurationsListByResourceGroupOptionalParams
|
|
106
|
-
): PagedAsyncIterableIterator<ConfigData> {
|
|
107
|
-
const iter = this.listByResourceGroupPagingAll(resourceGroup, options);
|
|
108
|
-
return {
|
|
109
|
-
next() {
|
|
110
|
-
return iter.next();
|
|
111
|
-
},
|
|
112
|
-
[Symbol.asyncIterator]() {
|
|
113
|
-
return this;
|
|
114
|
-
},
|
|
115
|
-
byPage: (settings?: PageSettings) => {
|
|
116
|
-
if (settings?.maxPageSize) {
|
|
117
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
118
|
-
}
|
|
119
|
-
return this.listByResourceGroupPagingPage(
|
|
120
|
-
resourceGroup,
|
|
121
|
-
options,
|
|
122
|
-
settings
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
private async *listByResourceGroupPagingPage(
|
|
129
|
-
resourceGroup: string,
|
|
130
|
-
options?: ConfigurationsListByResourceGroupOptionalParams,
|
|
131
|
-
_settings?: PageSettings
|
|
132
|
-
): AsyncIterableIterator<ConfigData[]> {
|
|
133
|
-
let result: ConfigurationsListByResourceGroupResponse;
|
|
134
|
-
result = await this._listByResourceGroup(resourceGroup, options);
|
|
135
|
-
yield result.value || [];
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
private async *listByResourceGroupPagingAll(
|
|
139
|
-
resourceGroup: string,
|
|
140
|
-
options?: ConfigurationsListByResourceGroupOptionalParams
|
|
141
|
-
): AsyncIterableIterator<ConfigData> {
|
|
142
|
-
for await (const page of this.listByResourceGroupPagingPage(
|
|
143
|
-
resourceGroup,
|
|
144
|
-
options
|
|
145
|
-
)) {
|
|
146
|
-
yield* page;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
|
|
152
|
-
* @param options The options parameters.
|
|
153
|
-
*/
|
|
154
|
-
private _listBySubscription(
|
|
155
|
-
options?: ConfigurationsListBySubscriptionOptionalParams
|
|
156
|
-
): Promise<ConfigurationsListBySubscriptionResponse> {
|
|
157
|
-
return this.client.sendOperationRequest(
|
|
158
|
-
{ options },
|
|
159
|
-
listBySubscriptionOperationSpec
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Create/Overwrite Azure Advisor configuration and also delete all configurations of contained
|
|
165
|
-
* resource groups.
|
|
166
|
-
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
167
|
-
* @param configContract The Azure Advisor configuration data structure.
|
|
168
|
-
* @param options The options parameters.
|
|
169
|
-
*/
|
|
170
|
-
createInSubscription(
|
|
171
|
-
configurationName: ConfigurationName,
|
|
172
|
-
configContract: ConfigData,
|
|
173
|
-
options?: ConfigurationsCreateInSubscriptionOptionalParams
|
|
174
|
-
): Promise<ConfigurationsCreateInSubscriptionResponse> {
|
|
175
|
-
return this.client.sendOperationRequest(
|
|
176
|
-
{ configurationName, configContract, options },
|
|
177
|
-
createInSubscriptionOperationSpec
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Retrieve Azure Advisor configurations.
|
|
183
|
-
* @param resourceGroup The name of the Azure resource group.
|
|
184
|
-
* @param options The options parameters.
|
|
185
|
-
*/
|
|
186
|
-
private _listByResourceGroup(
|
|
187
|
-
resourceGroup: string,
|
|
188
|
-
options?: ConfigurationsListByResourceGroupOptionalParams
|
|
189
|
-
): Promise<ConfigurationsListByResourceGroupResponse> {
|
|
190
|
-
return this.client.sendOperationRequest(
|
|
191
|
-
{ resourceGroup, options },
|
|
192
|
-
listByResourceGroupOperationSpec
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Create/Overwrite Azure Advisor configuration.
|
|
198
|
-
* @param configurationName Advisor configuration name. Value must be 'default'
|
|
199
|
-
* @param resourceGroup The name of the Azure resource group.
|
|
200
|
-
* @param configContract The Azure Advisor configuration data structure.
|
|
201
|
-
* @param options The options parameters.
|
|
202
|
-
*/
|
|
203
|
-
createInResourceGroup(
|
|
204
|
-
configurationName: ConfigurationName,
|
|
205
|
-
resourceGroup: string,
|
|
206
|
-
configContract: ConfigData,
|
|
207
|
-
options?: ConfigurationsCreateInResourceGroupOptionalParams
|
|
208
|
-
): Promise<ConfigurationsCreateInResourceGroupResponse> {
|
|
209
|
-
return this.client.sendOperationRequest(
|
|
210
|
-
{ configurationName, resourceGroup, configContract, options },
|
|
211
|
-
createInResourceGroupOperationSpec
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* ListBySubscriptionNext
|
|
217
|
-
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
218
|
-
* @param options The options parameters.
|
|
219
|
-
*/
|
|
220
|
-
private _listBySubscriptionNext(
|
|
221
|
-
nextLink: string,
|
|
222
|
-
options?: ConfigurationsListBySubscriptionNextOptionalParams
|
|
223
|
-
): Promise<ConfigurationsListBySubscriptionNextResponse> {
|
|
224
|
-
return this.client.sendOperationRequest(
|
|
225
|
-
{ nextLink, options },
|
|
226
|
-
listBySubscriptionNextOperationSpec
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
// Operation Specifications
|
|
231
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
232
|
-
|
|
233
|
-
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
234
|
-
path:
|
|
235
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations",
|
|
236
|
-
httpMethod: "GET",
|
|
237
|
-
responses: {
|
|
238
|
-
200: {
|
|
239
|
-
bodyMapper: Mappers.ConfigurationListResult
|
|
240
|
-
},
|
|
241
|
-
default: {
|
|
242
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
queryParameters: [Parameters.apiVersion],
|
|
246
|
-
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
247
|
-
headerParameters: [Parameters.accept],
|
|
248
|
-
serializer
|
|
249
|
-
};
|
|
250
|
-
const createInSubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
251
|
-
path:
|
|
252
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}",
|
|
253
|
-
httpMethod: "PUT",
|
|
254
|
-
responses: {
|
|
255
|
-
200: {
|
|
256
|
-
bodyMapper: Mappers.ConfigData
|
|
257
|
-
},
|
|
258
|
-
default: {
|
|
259
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
requestBody: Parameters.configContract,
|
|
263
|
-
queryParameters: [Parameters.apiVersion],
|
|
264
|
-
urlParameters: [
|
|
265
|
-
Parameters.$host,
|
|
266
|
-
Parameters.subscriptionId,
|
|
267
|
-
Parameters.configurationName
|
|
268
|
-
],
|
|
269
|
-
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
270
|
-
mediaType: "json",
|
|
271
|
-
serializer
|
|
272
|
-
};
|
|
273
|
-
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
274
|
-
path:
|
|
275
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations",
|
|
276
|
-
httpMethod: "GET",
|
|
277
|
-
responses: {
|
|
278
|
-
200: {
|
|
279
|
-
bodyMapper: Mappers.ConfigurationListResult
|
|
280
|
-
},
|
|
281
|
-
default: {
|
|
282
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
queryParameters: [Parameters.apiVersion],
|
|
286
|
-
urlParameters: [
|
|
287
|
-
Parameters.$host,
|
|
288
|
-
Parameters.subscriptionId,
|
|
289
|
-
Parameters.resourceGroup
|
|
290
|
-
],
|
|
291
|
-
headerParameters: [Parameters.accept],
|
|
292
|
-
serializer
|
|
293
|
-
};
|
|
294
|
-
const createInResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
295
|
-
path:
|
|
296
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}",
|
|
297
|
-
httpMethod: "PUT",
|
|
298
|
-
responses: {
|
|
299
|
-
200: {
|
|
300
|
-
bodyMapper: Mappers.ConfigData
|
|
301
|
-
},
|
|
302
|
-
default: {
|
|
303
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
requestBody: Parameters.configContract,
|
|
307
|
-
queryParameters: [Parameters.apiVersion],
|
|
308
|
-
urlParameters: [
|
|
309
|
-
Parameters.$host,
|
|
310
|
-
Parameters.subscriptionId,
|
|
311
|
-
Parameters.configurationName,
|
|
312
|
-
Parameters.resourceGroup
|
|
313
|
-
],
|
|
314
|
-
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
315
|
-
mediaType: "json",
|
|
316
|
-
serializer
|
|
317
|
-
};
|
|
318
|
-
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
319
|
-
path: "{nextLink}",
|
|
320
|
-
httpMethod: "GET",
|
|
321
|
-
responses: {
|
|
322
|
-
200: {
|
|
323
|
-
bodyMapper: Mappers.ConfigurationListResult
|
|
324
|
-
},
|
|
325
|
-
default: {
|
|
326
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
urlParameters: [
|
|
330
|
-
Parameters.$host,
|
|
331
|
-
Parameters.nextLink,
|
|
332
|
-
Parameters.subscriptionId
|
|
333
|
-
],
|
|
334
|
-
headerParameters: [Parameters.accept],
|
|
335
|
-
serializer
|
|
336
|
-
};
|
package/src/operations/index.ts
DELETED
|
@@ -1,13 +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
|
-
export * from "./recommendationMetadata";
|
|
10
|
-
export * from "./configurations";
|
|
11
|
-
export * from "./recommendations";
|
|
12
|
-
export * from "./operations";
|
|
13
|
-
export * from "./suppressions";
|
|
@@ -1,149 +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 { Operations } 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
|
-
OperationEntity,
|
|
18
|
-
OperationsListNextOptionalParams,
|
|
19
|
-
OperationsListOptionalParams,
|
|
20
|
-
OperationsListResponse,
|
|
21
|
-
OperationsListNextResponse
|
|
22
|
-
} from "../models";
|
|
23
|
-
|
|
24
|
-
/// <reference lib="esnext.asynciterable" />
|
|
25
|
-
/** Class containing Operations operations. */
|
|
26
|
-
export class OperationsImpl implements Operations {
|
|
27
|
-
private readonly client: AdvisorManagementClient;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Initialize a new instance of the class Operations class.
|
|
31
|
-
* @param client Reference to the service client
|
|
32
|
-
*/
|
|
33
|
-
constructor(client: AdvisorManagementClient) {
|
|
34
|
-
this.client = client;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Lists all the available Advisor REST API operations.
|
|
39
|
-
* @param options The options parameters.
|
|
40
|
-
*/
|
|
41
|
-
public list(
|
|
42
|
-
options?: OperationsListOptionalParams
|
|
43
|
-
): PagedAsyncIterableIterator<OperationEntity> {
|
|
44
|
-
const iter = this.listPagingAll(options);
|
|
45
|
-
return {
|
|
46
|
-
next() {
|
|
47
|
-
return iter.next();
|
|
48
|
-
},
|
|
49
|
-
[Symbol.asyncIterator]() {
|
|
50
|
-
return this;
|
|
51
|
-
},
|
|
52
|
-
byPage: (settings?: PageSettings) => {
|
|
53
|
-
if (settings?.maxPageSize) {
|
|
54
|
-
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
-
}
|
|
56
|
-
return this.listPagingPage(options, settings);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private async *listPagingPage(
|
|
62
|
-
options?: OperationsListOptionalParams,
|
|
63
|
-
settings?: PageSettings
|
|
64
|
-
): AsyncIterableIterator<OperationEntity[]> {
|
|
65
|
-
let result: OperationsListResponse;
|
|
66
|
-
let continuationToken = settings?.continuationToken;
|
|
67
|
-
if (!continuationToken) {
|
|
68
|
-
result = await this._list(options);
|
|
69
|
-
let page = result.value || [];
|
|
70
|
-
continuationToken = result.nextLink;
|
|
71
|
-
setContinuationToken(page, continuationToken);
|
|
72
|
-
yield page;
|
|
73
|
-
}
|
|
74
|
-
while (continuationToken) {
|
|
75
|
-
result = await this._listNext(continuationToken, options);
|
|
76
|
-
continuationToken = result.nextLink;
|
|
77
|
-
let page = result.value || [];
|
|
78
|
-
setContinuationToken(page, continuationToken);
|
|
79
|
-
yield page;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
private async *listPagingAll(
|
|
84
|
-
options?: OperationsListOptionalParams
|
|
85
|
-
): AsyncIterableIterator<OperationEntity> {
|
|
86
|
-
for await (const page of this.listPagingPage(options)) {
|
|
87
|
-
yield* page;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Lists all the available Advisor REST API operations.
|
|
93
|
-
* @param options The options parameters.
|
|
94
|
-
*/
|
|
95
|
-
private _list(
|
|
96
|
-
options?: OperationsListOptionalParams
|
|
97
|
-
): Promise<OperationsListResponse> {
|
|
98
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* ListNext
|
|
103
|
-
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
104
|
-
* @param options The options parameters.
|
|
105
|
-
*/
|
|
106
|
-
private _listNext(
|
|
107
|
-
nextLink: string,
|
|
108
|
-
options?: OperationsListNextOptionalParams
|
|
109
|
-
): Promise<OperationsListNextResponse> {
|
|
110
|
-
return this.client.sendOperationRequest(
|
|
111
|
-
{ nextLink, options },
|
|
112
|
-
listNextOperationSpec
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
// Operation Specifications
|
|
117
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
118
|
-
|
|
119
|
-
const listOperationSpec: coreClient.OperationSpec = {
|
|
120
|
-
path: "/providers/Microsoft.Advisor/operations",
|
|
121
|
-
httpMethod: "GET",
|
|
122
|
-
responses: {
|
|
123
|
-
200: {
|
|
124
|
-
bodyMapper: Mappers.OperationEntityListResult
|
|
125
|
-
},
|
|
126
|
-
default: {
|
|
127
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
queryParameters: [Parameters.apiVersion],
|
|
131
|
-
urlParameters: [Parameters.$host],
|
|
132
|
-
headerParameters: [Parameters.accept],
|
|
133
|
-
serializer
|
|
134
|
-
};
|
|
135
|
-
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
136
|
-
path: "{nextLink}",
|
|
137
|
-
httpMethod: "GET",
|
|
138
|
-
responses: {
|
|
139
|
-
200: {
|
|
140
|
-
bodyMapper: Mappers.OperationEntityListResult
|
|
141
|
-
},
|
|
142
|
-
default: {
|
|
143
|
-
bodyMapper: Mappers.ArmErrorResponse
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
147
|
-
headerParameters: [Parameters.accept],
|
|
148
|
-
serializer
|
|
149
|
-
};
|