@azure/arm-commitmentplans 1.3.1 → 2.0.0-beta.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/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -80
- package/dist/index.js +1794 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.d.ts +22 -0
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.d.ts.map +1 -0
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.js +55 -0
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +522 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +27 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +24 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +352 -337
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +15 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +125 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/commitmentAssociations.d.ts +55 -0
- package/dist-esm/src/operations/commitmentAssociations.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentAssociations.js +203 -0
- package/dist-esm/src/operations/commitmentAssociations.js.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts +84 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.js +332 -0
- package/dist-esm/src/operations/commitmentPlans.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +4 -5
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +87 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/skus.d.ts +26 -0
- package/dist-esm/src/operations/skus.d.ts.map +1 -0
- package/dist-esm/src/operations/skus.js +87 -0
- package/dist-esm/src/operations/skus.js.map +1 -0
- package/dist-esm/src/operations/usageHistory.d.ts +38 -0
- package/dist-esm/src/operations/usageHistory.d.ts.map +1 -0
- package/dist-esm/src/operations/usageHistory.js +131 -0
- package/dist-esm/src/operations/usageHistory.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentAssociations.d.ts +30 -0
- package/dist-esm/src/operationsInterfaces/commitmentAssociations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentAssociations.js +9 -0
- package/dist-esm/src/operationsInterfaces/commitmentAssociations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +48 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.js +9 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/skus.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/skus.js +9 -0
- package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/usageHistory.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/usageHistory.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/usageHistory.js +9 -0
- package/dist-esm/src/operationsInterfaces/usageHistory.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +74 -33
- package/review/arm-commitmentplans.api.md +405 -0
- package/rollup.config.js +184 -27
- package/src/azureMLCommitmentPlansManagementClient.ts +82 -41
- package/src/index.ts +12 -0
- package/src/models/index.ts +388 -745
- package/src/models/mappers.ts +354 -336
- package/src/models/parameters.ts +87 -35
- package/src/operations/commitmentAssociations.ts +183 -174
- package/src/operations/commitmentPlans.ts +277 -340
- package/src/operations/index.ts +4 -5
- package/src/operations/operations.ts +95 -0
- package/src/operations/skus.ts +65 -48
- package/src/operations/usageHistory.ts +135 -89
- package/src/operationsInterfaces/commitmentAssociations.ts +62 -0
- package/src/operationsInterfaces/commitmentPlans.ts +92 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/skus.ts +22 -0
- package/src/operationsInterfaces/usageHistory.ts +26 -0
- package/tsconfig.json +6 -5
- package/types/arm-commitmentplans.d.ts +706 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-commitmentplans.js +0 -1659
- package/dist/arm-commitmentplans.js.map +0 -1
- package/dist/arm-commitmentplans.min.js +0 -1
- package/dist/arm-commitmentplans.min.js.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClient.d.ts +0 -27
- package/esm/azureMLCommitmentPlansManagementClient.d.ts.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClient.js +0 -41
- package/esm/azureMLCommitmentPlansManagementClient.js.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClientContext.d.ts +0 -22
- package/esm/azureMLCommitmentPlansManagementClientContext.d.ts.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClientContext.js +0 -61
- package/esm/azureMLCommitmentPlansManagementClientContext.js.map +0 -1
- package/esm/models/commitmentAssociationsMappers.d.ts +0 -2
- package/esm/models/commitmentAssociationsMappers.d.ts.map +0 -1
- package/esm/models/commitmentAssociationsMappers.js +0 -11
- package/esm/models/commitmentAssociationsMappers.js.map +0 -1
- package/esm/models/commitmentPlansMappers.d.ts +0 -2
- package/esm/models/commitmentPlansMappers.d.ts.map +0 -1
- package/esm/models/commitmentPlansMappers.js +0 -11
- package/esm/models/commitmentPlansMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -901
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -23
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -93
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/skusMappers.d.ts +0 -2
- package/esm/models/skusMappers.d.ts.map +0 -1
- package/esm/models/skusMappers.js +0 -11
- package/esm/models/skusMappers.js.map +0 -1
- package/esm/models/usageHistoryMappers.d.ts +0 -2
- package/esm/models/usageHistoryMappers.d.ts.map +0 -1
- package/esm/models/usageHistoryMappers.js +0 -11
- package/esm/models/usageHistoryMappers.js.map +0 -1
- package/esm/operations/commitmentAssociations.d.ts +0 -103
- package/esm/operations/commitmentAssociations.d.ts.map +0 -1
- package/esm/operations/commitmentAssociations.js +0 -157
- package/esm/operations/commitmentAssociations.js.map +0 -1
- package/esm/operations/commitmentPlans.d.ts +0 -175
- package/esm/operations/commitmentPlans.d.ts.map +0 -1
- package/esm/operations/commitmentPlans.js +0 -273
- package/esm/operations/commitmentPlans.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/skus.d.ts +0 -28
- package/esm/operations/skus.d.ts.map +0 -1
- package/esm/operations/skus.js +0 -54
- package/esm/operations/skus.js.map +0 -1
- package/esm/operations/usageHistory.d.ts +0 -52
- package/esm/operations/usageHistory.d.ts.map +0 -1
- package/esm/operations/usageHistory.js +0 -85
- package/esm/operations/usageHistory.js.map +0 -1
- package/src/azureMLCommitmentPlansManagementClientContext.ts +0 -68
- package/src/models/commitmentAssociationsMappers.ts +0 -24
- package/src/models/commitmentPlansMappers.ts +0 -24
- package/src/models/skusMappers.ts +0 -20
- package/src/models/usageHistoryMappers.ts +0 -16
package/src/models/parameters.ts
CHANGED
|
@@ -1,81 +1,104 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import
|
|
9
|
+
import {
|
|
10
|
+
OperationParameter,
|
|
11
|
+
OperationURLParameter,
|
|
12
|
+
OperationQueryParameter
|
|
13
|
+
} from "@azure/core-client";
|
|
14
|
+
import {
|
|
15
|
+
MoveCommitmentAssociationRequest as MoveCommitmentAssociationRequestMapper,
|
|
16
|
+
CommitmentPlan as CommitmentPlanMapper,
|
|
17
|
+
CommitmentPlanPatchPayload as CommitmentPlanPatchPayloadMapper
|
|
18
|
+
} from "../models/mappers";
|
|
12
19
|
|
|
13
|
-
export const
|
|
14
|
-
parameterPath: "
|
|
20
|
+
export const accept: OperationParameter = {
|
|
21
|
+
parameterPath: "accept",
|
|
15
22
|
mapper: {
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
defaultValue: "application/json",
|
|
24
|
+
isConstant: true,
|
|
25
|
+
serializedName: "Accept",
|
|
18
26
|
type: {
|
|
19
27
|
name: "String"
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
30
|
};
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
|
|
32
|
+
export const $host: OperationURLParameter = {
|
|
33
|
+
parameterPath: "$host",
|
|
25
34
|
mapper: {
|
|
35
|
+
serializedName: "$host",
|
|
26
36
|
required: true,
|
|
37
|
+
type: {
|
|
38
|
+
name: "String"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
skipEncoding: true
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const apiVersion: OperationQueryParameter = {
|
|
45
|
+
parameterPath: "apiVersion",
|
|
46
|
+
mapper: {
|
|
47
|
+
defaultValue: "2016-05-01-preview",
|
|
48
|
+
isConstant: true,
|
|
27
49
|
serializedName: "api-version",
|
|
28
50
|
type: {
|
|
29
51
|
name: "String"
|
|
30
52
|
}
|
|
31
53
|
}
|
|
32
54
|
};
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
|
|
56
|
+
export const subscriptionId: OperationURLParameter = {
|
|
57
|
+
parameterPath: "subscriptionId",
|
|
35
58
|
mapper: {
|
|
59
|
+
serializedName: "subscriptionId",
|
|
36
60
|
required: true,
|
|
37
|
-
serializedName: "commitmentAssociationName",
|
|
38
61
|
type: {
|
|
39
62
|
name: "String"
|
|
40
63
|
}
|
|
41
64
|
}
|
|
42
65
|
};
|
|
43
|
-
|
|
44
|
-
|
|
66
|
+
|
|
67
|
+
export const resourceGroupName: OperationURLParameter = {
|
|
68
|
+
parameterPath: "resourceGroupName",
|
|
45
69
|
mapper: {
|
|
70
|
+
serializedName: "resourceGroupName",
|
|
46
71
|
required: true,
|
|
47
|
-
serializedName: "commitmentPlanName",
|
|
48
72
|
type: {
|
|
49
73
|
name: "String"
|
|
50
74
|
}
|
|
51
75
|
}
|
|
52
76
|
};
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
|
|
78
|
+
export const commitmentPlanName: OperationURLParameter = {
|
|
79
|
+
parameterPath: "commitmentPlanName",
|
|
55
80
|
mapper: {
|
|
81
|
+
serializedName: "commitmentPlanName",
|
|
56
82
|
required: true,
|
|
57
|
-
serializedName: "nextLink",
|
|
58
83
|
type: {
|
|
59
84
|
name: "String"
|
|
60
85
|
}
|
|
61
|
-
}
|
|
62
|
-
skipEncoding: true
|
|
86
|
+
}
|
|
63
87
|
};
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
|
|
89
|
+
export const commitmentAssociationName: OperationURLParameter = {
|
|
90
|
+
parameterPath: "commitmentAssociationName",
|
|
66
91
|
mapper: {
|
|
92
|
+
serializedName: "commitmentAssociationName",
|
|
67
93
|
required: true,
|
|
68
|
-
serializedName: "resourceGroupName",
|
|
69
94
|
type: {
|
|
70
95
|
name: "String"
|
|
71
96
|
}
|
|
72
97
|
}
|
|
73
98
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"skipToken"
|
|
78
|
-
],
|
|
99
|
+
|
|
100
|
+
export const skipToken: OperationQueryParameter = {
|
|
101
|
+
parameterPath: ["options", "skipToken"],
|
|
79
102
|
mapper: {
|
|
80
103
|
serializedName: "$skipToken",
|
|
81
104
|
type: {
|
|
@@ -83,13 +106,42 @@ export const skipToken: msRest.OperationQueryParameter = {
|
|
|
83
106
|
}
|
|
84
107
|
}
|
|
85
108
|
};
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
|
|
110
|
+
export const contentType: OperationParameter = {
|
|
111
|
+
parameterPath: ["options", "contentType"],
|
|
88
112
|
mapper: {
|
|
89
|
-
|
|
90
|
-
|
|
113
|
+
defaultValue: "application/json",
|
|
114
|
+
isConstant: true,
|
|
115
|
+
serializedName: "Content-Type",
|
|
91
116
|
type: {
|
|
92
117
|
name: "String"
|
|
93
118
|
}
|
|
94
119
|
}
|
|
95
120
|
};
|
|
121
|
+
|
|
122
|
+
export const movePayload: OperationParameter = {
|
|
123
|
+
parameterPath: "movePayload",
|
|
124
|
+
mapper: MoveCommitmentAssociationRequestMapper
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const nextLink: OperationURLParameter = {
|
|
128
|
+
parameterPath: "nextLink",
|
|
129
|
+
mapper: {
|
|
130
|
+
serializedName: "nextLink",
|
|
131
|
+
required: true,
|
|
132
|
+
type: {
|
|
133
|
+
name: "String"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
skipEncoding: true
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const createOrUpdatePayload: OperationParameter = {
|
|
140
|
+
parameterPath: "createOrUpdatePayload",
|
|
141
|
+
mapper: CommitmentPlanMapper
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const patchPayload: OperationParameter = {
|
|
145
|
+
parameterPath: "patchPayload",
|
|
146
|
+
mapper: CommitmentPlanPatchPayloadMapper
|
|
147
|
+
};
|
|
@@ -1,56 +1,127 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import * as
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { CommitmentAssociations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { AzureMLCommitmentPlansManagementClient } from "../azureMLCommitmentPlansManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
CommitmentAssociation,
|
|
17
|
+
CommitmentAssociationsListNextOptionalParams,
|
|
18
|
+
CommitmentAssociationsListOptionalParams,
|
|
19
|
+
CommitmentAssociationsGetOptionalParams,
|
|
20
|
+
CommitmentAssociationsGetResponse,
|
|
21
|
+
CommitmentAssociationsListResponse,
|
|
22
|
+
MoveCommitmentAssociationRequest,
|
|
23
|
+
CommitmentAssociationsMoveOptionalParams,
|
|
24
|
+
CommitmentAssociationsMoveResponse,
|
|
25
|
+
CommitmentAssociationsListNextResponse
|
|
26
|
+
} from "../models";
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
/// <reference lib="esnext.asynciterable" />
|
|
29
|
+
/** Class containing CommitmentAssociations operations. */
|
|
30
|
+
export class CommitmentAssociationsImpl implements CommitmentAssociations {
|
|
31
|
+
private readonly client: AzureMLCommitmentPlansManagementClient;
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
34
|
+
* Initialize a new instance of the class CommitmentAssociations class.
|
|
35
|
+
* @param client Reference to the service client
|
|
24
36
|
*/
|
|
25
|
-
constructor(client:
|
|
37
|
+
constructor(client: AzureMLCommitmentPlansManagementClient) {
|
|
26
38
|
this.client = client;
|
|
27
39
|
}
|
|
28
40
|
|
|
29
41
|
/**
|
|
30
|
-
* Get a commitment
|
|
31
|
-
* @param resourceGroupName The resource group name.
|
|
32
|
-
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
33
|
-
* @param commitmentAssociationName The commitment association name.
|
|
34
|
-
* @param [options] The optional parameters
|
|
35
|
-
* @returns Promise<Models.CommitmentAssociationsGetResponse>
|
|
36
|
-
*/
|
|
37
|
-
get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentAssociationsGetResponse>;
|
|
38
|
-
/**
|
|
42
|
+
* Get all commitment associations for a parent commitment plan.
|
|
39
43
|
* @param resourceGroupName The resource group name.
|
|
40
44
|
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
41
|
-
* @param
|
|
42
|
-
* @param callback The callback
|
|
45
|
+
* @param options The options parameters.
|
|
43
46
|
*/
|
|
44
|
-
|
|
47
|
+
public list(
|
|
48
|
+
resourceGroupName: string,
|
|
49
|
+
commitmentPlanName: string,
|
|
50
|
+
options?: CommitmentAssociationsListOptionalParams
|
|
51
|
+
): PagedAsyncIterableIterator<CommitmentAssociation> {
|
|
52
|
+
const iter = this.listPagingAll(
|
|
53
|
+
resourceGroupName,
|
|
54
|
+
commitmentPlanName,
|
|
55
|
+
options
|
|
56
|
+
);
|
|
57
|
+
return {
|
|
58
|
+
next() {
|
|
59
|
+
return iter.next();
|
|
60
|
+
},
|
|
61
|
+
[Symbol.asyncIterator]() {
|
|
62
|
+
return this;
|
|
63
|
+
},
|
|
64
|
+
byPage: () => {
|
|
65
|
+
return this.listPagingPage(
|
|
66
|
+
resourceGroupName,
|
|
67
|
+
commitmentPlanName,
|
|
68
|
+
options
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private async *listPagingPage(
|
|
75
|
+
resourceGroupName: string,
|
|
76
|
+
commitmentPlanName: string,
|
|
77
|
+
options?: CommitmentAssociationsListOptionalParams
|
|
78
|
+
): AsyncIterableIterator<CommitmentAssociation[]> {
|
|
79
|
+
let result = await this._list(
|
|
80
|
+
resourceGroupName,
|
|
81
|
+
commitmentPlanName,
|
|
82
|
+
options
|
|
83
|
+
);
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
let continuationToken = result.nextLink;
|
|
86
|
+
while (continuationToken) {
|
|
87
|
+
result = await this._listNext(
|
|
88
|
+
resourceGroupName,
|
|
89
|
+
commitmentPlanName,
|
|
90
|
+
continuationToken,
|
|
91
|
+
options
|
|
92
|
+
);
|
|
93
|
+
continuationToken = result.nextLink;
|
|
94
|
+
yield result.value || [];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private async *listPagingAll(
|
|
99
|
+
resourceGroupName: string,
|
|
100
|
+
commitmentPlanName: string,
|
|
101
|
+
options?: CommitmentAssociationsListOptionalParams
|
|
102
|
+
): AsyncIterableIterator<CommitmentAssociation> {
|
|
103
|
+
for await (const page of this.listPagingPage(
|
|
104
|
+
resourceGroupName,
|
|
105
|
+
commitmentPlanName,
|
|
106
|
+
options
|
|
107
|
+
)) {
|
|
108
|
+
yield* page;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
45
112
|
/**
|
|
113
|
+
* Get a commitment association.
|
|
46
114
|
* @param resourceGroupName The resource group name.
|
|
47
115
|
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
48
116
|
* @param commitmentAssociationName The commitment association name.
|
|
49
|
-
* @param options The
|
|
50
|
-
* @param callback The callback
|
|
117
|
+
* @param options The options parameters.
|
|
51
118
|
*/
|
|
52
|
-
get(
|
|
53
|
-
|
|
119
|
+
get(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
commitmentPlanName: string,
|
|
122
|
+
commitmentAssociationName: string,
|
|
123
|
+
options?: CommitmentAssociationsGetOptionalParams
|
|
124
|
+
): Promise<CommitmentAssociationsGetResponse> {
|
|
54
125
|
return this.client.sendOperationRequest(
|
|
55
126
|
{
|
|
56
127
|
resourceGroupName,
|
|
@@ -58,40 +129,25 @@ export class CommitmentAssociations {
|
|
|
58
129
|
commitmentAssociationName,
|
|
59
130
|
options
|
|
60
131
|
},
|
|
61
|
-
getOperationSpec
|
|
62
|
-
|
|
132
|
+
getOperationSpec
|
|
133
|
+
);
|
|
63
134
|
}
|
|
64
135
|
|
|
65
136
|
/**
|
|
66
137
|
* Get all commitment associations for a parent commitment plan.
|
|
67
138
|
* @param resourceGroupName The resource group name.
|
|
68
139
|
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
69
|
-
* @param
|
|
70
|
-
* @returns Promise<Models.CommitmentAssociationsListResponse>
|
|
71
|
-
*/
|
|
72
|
-
list(resourceGroupName: string, commitmentPlanName: string, options?: Models.CommitmentAssociationsListOptionalParams): Promise<Models.CommitmentAssociationsListResponse>;
|
|
73
|
-
/**
|
|
74
|
-
* @param resourceGroupName The resource group name.
|
|
75
|
-
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
76
|
-
* @param callback The callback
|
|
140
|
+
* @param options The options parameters.
|
|
77
141
|
*/
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* @param callback The callback
|
|
84
|
-
*/
|
|
85
|
-
list(resourceGroupName: string, commitmentPlanName: string, options: Models.CommitmentAssociationsListOptionalParams, callback: msRest.ServiceCallback<Models.CommitmentAssociationListResult>): void;
|
|
86
|
-
list(resourceGroupName: string, commitmentPlanName: string, options?: Models.CommitmentAssociationsListOptionalParams | msRest.ServiceCallback<Models.CommitmentAssociationListResult>, callback?: msRest.ServiceCallback<Models.CommitmentAssociationListResult>): Promise<Models.CommitmentAssociationsListResponse> {
|
|
142
|
+
private _list(
|
|
143
|
+
resourceGroupName: string,
|
|
144
|
+
commitmentPlanName: string,
|
|
145
|
+
options?: CommitmentAssociationsListOptionalParams
|
|
146
|
+
): Promise<CommitmentAssociationsListResponse> {
|
|
87
147
|
return this.client.sendOperationRequest(
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
options
|
|
92
|
-
},
|
|
93
|
-
listOperationSpec,
|
|
94
|
-
callback) as Promise<Models.CommitmentAssociationsListResponse>;
|
|
148
|
+
{ resourceGroupName, commitmentPlanName, options },
|
|
149
|
+
listOperationSpec
|
|
150
|
+
);
|
|
95
151
|
}
|
|
96
152
|
|
|
97
153
|
/**
|
|
@@ -100,28 +156,15 @@ export class CommitmentAssociations {
|
|
|
100
156
|
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
101
157
|
* @param commitmentAssociationName The commitment association name.
|
|
102
158
|
* @param movePayload The move request payload.
|
|
103
|
-
* @param
|
|
104
|
-
* @returns Promise<Models.CommitmentAssociationsMoveResponse>
|
|
105
|
-
*/
|
|
106
|
-
move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentAssociationsMoveResponse>;
|
|
107
|
-
/**
|
|
108
|
-
* @param resourceGroupName The resource group name.
|
|
109
|
-
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
110
|
-
* @param commitmentAssociationName The commitment association name.
|
|
111
|
-
* @param movePayload The move request payload.
|
|
112
|
-
* @param callback The callback
|
|
113
|
-
*/
|
|
114
|
-
move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: Models.MoveCommitmentAssociationRequest, callback: msRest.ServiceCallback<Models.CommitmentAssociation>): void;
|
|
115
|
-
/**
|
|
116
|
-
* @param resourceGroupName The resource group name.
|
|
117
|
-
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
118
|
-
* @param commitmentAssociationName The commitment association name.
|
|
119
|
-
* @param movePayload The move request payload.
|
|
120
|
-
* @param options The optional parameters
|
|
121
|
-
* @param callback The callback
|
|
159
|
+
* @param options The options parameters.
|
|
122
160
|
*/
|
|
123
|
-
move(
|
|
124
|
-
|
|
161
|
+
move(
|
|
162
|
+
resourceGroupName: string,
|
|
163
|
+
commitmentPlanName: string,
|
|
164
|
+
commitmentAssociationName: string,
|
|
165
|
+
movePayload: MoveCommitmentAssociationRequest,
|
|
166
|
+
options?: CommitmentAssociationsMoveOptionalParams
|
|
167
|
+
): Promise<CommitmentAssociationsMoveResponse> {
|
|
125
168
|
return this.client.sendOperationRequest(
|
|
126
169
|
{
|
|
127
170
|
resourceGroupName,
|
|
@@ -130,143 +173,109 @@ export class CommitmentAssociations {
|
|
|
130
173
|
movePayload,
|
|
131
174
|
options
|
|
132
175
|
},
|
|
133
|
-
moveOperationSpec
|
|
134
|
-
|
|
176
|
+
moveOperationSpec
|
|
177
|
+
);
|
|
135
178
|
}
|
|
136
179
|
|
|
137
180
|
/**
|
|
138
|
-
*
|
|
139
|
-
* @param
|
|
140
|
-
* @param
|
|
141
|
-
* @
|
|
142
|
-
|
|
143
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentAssociationsListNextResponse>;
|
|
144
|
-
/**
|
|
145
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
146
|
-
* @param callback The callback
|
|
147
|
-
*/
|
|
148
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.CommitmentAssociationListResult>): void;
|
|
149
|
-
/**
|
|
150
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
151
|
-
* @param options The optional parameters
|
|
152
|
-
* @param callback The callback
|
|
181
|
+
* ListNext
|
|
182
|
+
* @param resourceGroupName The resource group name.
|
|
183
|
+
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
184
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
185
|
+
* @param options The options parameters.
|
|
153
186
|
*/
|
|
154
|
-
|
|
155
|
-
|
|
187
|
+
private _listNext(
|
|
188
|
+
resourceGroupName: string,
|
|
189
|
+
commitmentPlanName: string,
|
|
190
|
+
nextLink: string,
|
|
191
|
+
options?: CommitmentAssociationsListNextOptionalParams
|
|
192
|
+
): Promise<CommitmentAssociationsListNextResponse> {
|
|
156
193
|
return this.client.sendOperationRequest(
|
|
157
|
-
{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
listNextOperationSpec,
|
|
162
|
-
callback) as Promise<Models.CommitmentAssociationsListNextResponse>;
|
|
194
|
+
{ resourceGroupName, commitmentPlanName, nextLink, options },
|
|
195
|
+
listNextOperationSpec
|
|
196
|
+
);
|
|
163
197
|
}
|
|
164
198
|
}
|
|
165
|
-
|
|
166
199
|
// Operation Specifications
|
|
167
|
-
const serializer =
|
|
168
|
-
|
|
200
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
201
|
+
|
|
202
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
203
|
+
path:
|
|
204
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}",
|
|
169
205
|
httpMethod: "GET",
|
|
170
|
-
|
|
206
|
+
responses: {
|
|
207
|
+
200: {
|
|
208
|
+
bodyMapper: Mappers.CommitmentAssociation
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
queryParameters: [Parameters.apiVersion],
|
|
171
212
|
urlParameters: [
|
|
213
|
+
Parameters.$host,
|
|
172
214
|
Parameters.subscriptionId,
|
|
173
215
|
Parameters.resourceGroupName,
|
|
174
216
|
Parameters.commitmentPlanName,
|
|
175
217
|
Parameters.commitmentAssociationName
|
|
176
218
|
],
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
219
|
+
headerParameters: [Parameters.accept],
|
|
220
|
+
serializer
|
|
221
|
+
};
|
|
222
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
223
|
+
path:
|
|
224
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations",
|
|
225
|
+
httpMethod: "GET",
|
|
183
226
|
responses: {
|
|
184
227
|
200: {
|
|
185
|
-
bodyMapper: Mappers.
|
|
186
|
-
},
|
|
187
|
-
default: {
|
|
188
|
-
bodyMapper: Mappers.CloudError
|
|
228
|
+
bodyMapper: Mappers.CommitmentAssociationListResult
|
|
189
229
|
}
|
|
190
230
|
},
|
|
191
|
-
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const listOperationSpec: msRest.OperationSpec = {
|
|
195
|
-
httpMethod: "GET",
|
|
196
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations",
|
|
231
|
+
queryParameters: [Parameters.apiVersion, Parameters.skipToken],
|
|
197
232
|
urlParameters: [
|
|
233
|
+
Parameters.$host,
|
|
198
234
|
Parameters.subscriptionId,
|
|
199
235
|
Parameters.resourceGroupName,
|
|
200
236
|
Parameters.commitmentPlanName
|
|
201
237
|
],
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
238
|
+
headerParameters: [Parameters.accept],
|
|
239
|
+
serializer
|
|
240
|
+
};
|
|
241
|
+
const moveOperationSpec: coreClient.OperationSpec = {
|
|
242
|
+
path:
|
|
243
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}/move",
|
|
244
|
+
httpMethod: "POST",
|
|
209
245
|
responses: {
|
|
210
246
|
200: {
|
|
211
|
-
bodyMapper: Mappers.
|
|
212
|
-
},
|
|
213
|
-
default: {
|
|
214
|
-
bodyMapper: Mappers.CloudError
|
|
247
|
+
bodyMapper: Mappers.CommitmentAssociation
|
|
215
248
|
}
|
|
216
249
|
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const moveOperationSpec: msRest.OperationSpec = {
|
|
221
|
-
httpMethod: "POST",
|
|
222
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}/move",
|
|
250
|
+
requestBody: Parameters.movePayload,
|
|
251
|
+
queryParameters: [Parameters.apiVersion],
|
|
223
252
|
urlParameters: [
|
|
253
|
+
Parameters.$host,
|
|
224
254
|
Parameters.subscriptionId,
|
|
225
255
|
Parameters.resourceGroupName,
|
|
226
256
|
Parameters.commitmentPlanName,
|
|
227
257
|
Parameters.commitmentAssociationName
|
|
228
258
|
],
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
],
|
|
232
|
-
headerParameters: [
|
|
233
|
-
Parameters.acceptLanguage
|
|
234
|
-
],
|
|
235
|
-
requestBody: {
|
|
236
|
-
parameterPath: "movePayload",
|
|
237
|
-
mapper: {
|
|
238
|
-
...Mappers.MoveCommitmentAssociationRequest,
|
|
239
|
-
required: true
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
responses: {
|
|
243
|
-
200: {
|
|
244
|
-
bodyMapper: Mappers.CommitmentAssociation
|
|
245
|
-
},
|
|
246
|
-
default: {
|
|
247
|
-
bodyMapper: Mappers.CloudError
|
|
248
|
-
}
|
|
249
|
-
},
|
|
259
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
260
|
+
mediaType: "json",
|
|
250
261
|
serializer
|
|
251
262
|
};
|
|
252
|
-
|
|
253
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
254
|
-
httpMethod: "GET",
|
|
255
|
-
baseUrl: "https://management.azure.com",
|
|
263
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
256
264
|
path: "{nextLink}",
|
|
257
|
-
|
|
258
|
-
Parameters.nextPageLink
|
|
259
|
-
],
|
|
260
|
-
headerParameters: [
|
|
261
|
-
Parameters.acceptLanguage
|
|
262
|
-
],
|
|
265
|
+
httpMethod: "GET",
|
|
263
266
|
responses: {
|
|
264
267
|
200: {
|
|
265
268
|
bodyMapper: Mappers.CommitmentAssociationListResult
|
|
266
|
-
},
|
|
267
|
-
default: {
|
|
268
|
-
bodyMapper: Mappers.CloudError
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
+
queryParameters: [Parameters.apiVersion, Parameters.skipToken],
|
|
272
|
+
urlParameters: [
|
|
273
|
+
Parameters.$host,
|
|
274
|
+
Parameters.subscriptionId,
|
|
275
|
+
Parameters.resourceGroupName,
|
|
276
|
+
Parameters.commitmentPlanName,
|
|
277
|
+
Parameters.nextLink
|
|
278
|
+
],
|
|
279
|
+
headerParameters: [Parameters.accept],
|
|
271
280
|
serializer
|
|
272
281
|
};
|