@azure/arm-commitmentplans 0.1.0 → 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 +75 -73
- 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 +77 -34
- package/review/arm-commitmentplans.api.md +405 -0
- package/rollup.config.js +184 -27
- package/src/azureMLCommitmentPlansManagementClient.ts +95 -0
- package/src/index.ts +12 -0
- package/src/models/index.ts +579 -0
- package/{lib → src}/models/mappers.ts +354 -336
- package/src/models/parameters.ts +147 -0
- package/src/operations/commitmentAssociations.ts +281 -0
- package/src/operations/commitmentPlans.ts +420 -0
- package/{lib → src}/operations/index.ts +4 -5
- package/src/operations/operations.ts +95 -0
- package/src/operations/skus.ts +94 -0
- package/src/operations/usageHistory.ts +183 -0
- 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 -1649
- 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 -21
- package/esm/azureMLCommitmentPlansManagementClient.d.ts.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClient.js +0 -36
- package/esm/azureMLCommitmentPlansManagementClient.js.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClientContext.d.ts +0 -16
- package/esm/azureMLCommitmentPlansManagementClientContext.d.ts.map +0 -1
- package/esm/azureMLCommitmentPlansManagementClientContext.js +0 -56
- 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/lib/azureMLCommitmentPlansManagementClient.ts +0 -48
- package/lib/azureMLCommitmentPlansManagementClientContext.ts +0 -62
- package/lib/models/commitmentAssociationsMappers.ts +0 -24
- package/lib/models/commitmentPlansMappers.ts +0 -24
- package/lib/models/index.ts +0 -936
- package/lib/models/parameters.ts +0 -95
- package/lib/models/skusMappers.ts +0 -20
- package/lib/models/usageHistoryMappers.ts +0 -16
- package/lib/operations/commitmentAssociations.ts +0 -272
- package/lib/operations/commitmentPlans.ts +0 -483
- package/lib/operations/skus.ts +0 -77
- package/lib/operations/usageHistory.ts +0 -137
|
@@ -0,0 +1,147 @@
|
|
|
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
|
+
MoveCommitmentAssociationRequest as MoveCommitmentAssociationRequestMapper,
|
|
16
|
+
CommitmentPlan as CommitmentPlanMapper,
|
|
17
|
+
CommitmentPlanPatchPayload as CommitmentPlanPatchPayloadMapper
|
|
18
|
+
} from "../models/mappers";
|
|
19
|
+
|
|
20
|
+
export const accept: OperationParameter = {
|
|
21
|
+
parameterPath: "accept",
|
|
22
|
+
mapper: {
|
|
23
|
+
defaultValue: "application/json",
|
|
24
|
+
isConstant: true,
|
|
25
|
+
serializedName: "Accept",
|
|
26
|
+
type: {
|
|
27
|
+
name: "String"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const $host: OperationURLParameter = {
|
|
33
|
+
parameterPath: "$host",
|
|
34
|
+
mapper: {
|
|
35
|
+
serializedName: "$host",
|
|
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,
|
|
49
|
+
serializedName: "api-version",
|
|
50
|
+
type: {
|
|
51
|
+
name: "String"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const subscriptionId: OperationURLParameter = {
|
|
57
|
+
parameterPath: "subscriptionId",
|
|
58
|
+
mapper: {
|
|
59
|
+
serializedName: "subscriptionId",
|
|
60
|
+
required: true,
|
|
61
|
+
type: {
|
|
62
|
+
name: "String"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const resourceGroupName: OperationURLParameter = {
|
|
68
|
+
parameterPath: "resourceGroupName",
|
|
69
|
+
mapper: {
|
|
70
|
+
serializedName: "resourceGroupName",
|
|
71
|
+
required: true,
|
|
72
|
+
type: {
|
|
73
|
+
name: "String"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const commitmentPlanName: OperationURLParameter = {
|
|
79
|
+
parameterPath: "commitmentPlanName",
|
|
80
|
+
mapper: {
|
|
81
|
+
serializedName: "commitmentPlanName",
|
|
82
|
+
required: true,
|
|
83
|
+
type: {
|
|
84
|
+
name: "String"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const commitmentAssociationName: OperationURLParameter = {
|
|
90
|
+
parameterPath: "commitmentAssociationName",
|
|
91
|
+
mapper: {
|
|
92
|
+
serializedName: "commitmentAssociationName",
|
|
93
|
+
required: true,
|
|
94
|
+
type: {
|
|
95
|
+
name: "String"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const skipToken: OperationQueryParameter = {
|
|
101
|
+
parameterPath: ["options", "skipToken"],
|
|
102
|
+
mapper: {
|
|
103
|
+
serializedName: "$skipToken",
|
|
104
|
+
type: {
|
|
105
|
+
name: "String"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const contentType: OperationParameter = {
|
|
111
|
+
parameterPath: ["options", "contentType"],
|
|
112
|
+
mapper: {
|
|
113
|
+
defaultValue: "application/json",
|
|
114
|
+
isConstant: true,
|
|
115
|
+
serializedName: "Content-Type",
|
|
116
|
+
type: {
|
|
117
|
+
name: "String"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
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
|
+
};
|
|
@@ -0,0 +1,281 @@
|
|
|
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 } from "@azure/core-paging";
|
|
10
|
+
import { CommitmentAssociations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
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";
|
|
27
|
+
|
|
28
|
+
/// <reference lib="esnext.asynciterable" />
|
|
29
|
+
/** Class containing CommitmentAssociations operations. */
|
|
30
|
+
export class CommitmentAssociationsImpl implements CommitmentAssociations {
|
|
31
|
+
private readonly client: AzureMLCommitmentPlansManagementClient;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Initialize a new instance of the class CommitmentAssociations class.
|
|
35
|
+
* @param client Reference to the service client
|
|
36
|
+
*/
|
|
37
|
+
constructor(client: AzureMLCommitmentPlansManagementClient) {
|
|
38
|
+
this.client = client;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get all commitment associations for a parent commitment plan.
|
|
43
|
+
* @param resourceGroupName The resource group name.
|
|
44
|
+
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
45
|
+
* @param options The options parameters.
|
|
46
|
+
*/
|
|
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
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Get a commitment association.
|
|
114
|
+
* @param resourceGroupName The resource group name.
|
|
115
|
+
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
116
|
+
* @param commitmentAssociationName The commitment association name.
|
|
117
|
+
* @param options The options parameters.
|
|
118
|
+
*/
|
|
119
|
+
get(
|
|
120
|
+
resourceGroupName: string,
|
|
121
|
+
commitmentPlanName: string,
|
|
122
|
+
commitmentAssociationName: string,
|
|
123
|
+
options?: CommitmentAssociationsGetOptionalParams
|
|
124
|
+
): Promise<CommitmentAssociationsGetResponse> {
|
|
125
|
+
return this.client.sendOperationRequest(
|
|
126
|
+
{
|
|
127
|
+
resourceGroupName,
|
|
128
|
+
commitmentPlanName,
|
|
129
|
+
commitmentAssociationName,
|
|
130
|
+
options
|
|
131
|
+
},
|
|
132
|
+
getOperationSpec
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Get all commitment associations for a parent commitment plan.
|
|
138
|
+
* @param resourceGroupName The resource group name.
|
|
139
|
+
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
140
|
+
* @param options The options parameters.
|
|
141
|
+
*/
|
|
142
|
+
private _list(
|
|
143
|
+
resourceGroupName: string,
|
|
144
|
+
commitmentPlanName: string,
|
|
145
|
+
options?: CommitmentAssociationsListOptionalParams
|
|
146
|
+
): Promise<CommitmentAssociationsListResponse> {
|
|
147
|
+
return this.client.sendOperationRequest(
|
|
148
|
+
{ resourceGroupName, commitmentPlanName, options },
|
|
149
|
+
listOperationSpec
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Re-parent a commitment association from one commitment plan to another.
|
|
155
|
+
* @param resourceGroupName The resource group name.
|
|
156
|
+
* @param commitmentPlanName The Azure ML commitment plan name.
|
|
157
|
+
* @param commitmentAssociationName The commitment association name.
|
|
158
|
+
* @param movePayload The move request payload.
|
|
159
|
+
* @param options The options parameters.
|
|
160
|
+
*/
|
|
161
|
+
move(
|
|
162
|
+
resourceGroupName: string,
|
|
163
|
+
commitmentPlanName: string,
|
|
164
|
+
commitmentAssociationName: string,
|
|
165
|
+
movePayload: MoveCommitmentAssociationRequest,
|
|
166
|
+
options?: CommitmentAssociationsMoveOptionalParams
|
|
167
|
+
): Promise<CommitmentAssociationsMoveResponse> {
|
|
168
|
+
return this.client.sendOperationRequest(
|
|
169
|
+
{
|
|
170
|
+
resourceGroupName,
|
|
171
|
+
commitmentPlanName,
|
|
172
|
+
commitmentAssociationName,
|
|
173
|
+
movePayload,
|
|
174
|
+
options
|
|
175
|
+
},
|
|
176
|
+
moveOperationSpec
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
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.
|
|
186
|
+
*/
|
|
187
|
+
private _listNext(
|
|
188
|
+
resourceGroupName: string,
|
|
189
|
+
commitmentPlanName: string,
|
|
190
|
+
nextLink: string,
|
|
191
|
+
options?: CommitmentAssociationsListNextOptionalParams
|
|
192
|
+
): Promise<CommitmentAssociationsListNextResponse> {
|
|
193
|
+
return this.client.sendOperationRequest(
|
|
194
|
+
{ resourceGroupName, commitmentPlanName, nextLink, options },
|
|
195
|
+
listNextOperationSpec
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// Operation Specifications
|
|
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}",
|
|
205
|
+
httpMethod: "GET",
|
|
206
|
+
responses: {
|
|
207
|
+
200: {
|
|
208
|
+
bodyMapper: Mappers.CommitmentAssociation
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
queryParameters: [Parameters.apiVersion],
|
|
212
|
+
urlParameters: [
|
|
213
|
+
Parameters.$host,
|
|
214
|
+
Parameters.subscriptionId,
|
|
215
|
+
Parameters.resourceGroupName,
|
|
216
|
+
Parameters.commitmentPlanName,
|
|
217
|
+
Parameters.commitmentAssociationName
|
|
218
|
+
],
|
|
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",
|
|
226
|
+
responses: {
|
|
227
|
+
200: {
|
|
228
|
+
bodyMapper: Mappers.CommitmentAssociationListResult
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
queryParameters: [Parameters.apiVersion, Parameters.skipToken],
|
|
232
|
+
urlParameters: [
|
|
233
|
+
Parameters.$host,
|
|
234
|
+
Parameters.subscriptionId,
|
|
235
|
+
Parameters.resourceGroupName,
|
|
236
|
+
Parameters.commitmentPlanName
|
|
237
|
+
],
|
|
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",
|
|
245
|
+
responses: {
|
|
246
|
+
200: {
|
|
247
|
+
bodyMapper: Mappers.CommitmentAssociation
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
requestBody: Parameters.movePayload,
|
|
251
|
+
queryParameters: [Parameters.apiVersion],
|
|
252
|
+
urlParameters: [
|
|
253
|
+
Parameters.$host,
|
|
254
|
+
Parameters.subscriptionId,
|
|
255
|
+
Parameters.resourceGroupName,
|
|
256
|
+
Parameters.commitmentPlanName,
|
|
257
|
+
Parameters.commitmentAssociationName
|
|
258
|
+
],
|
|
259
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
260
|
+
mediaType: "json",
|
|
261
|
+
serializer
|
|
262
|
+
};
|
|
263
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
264
|
+
path: "{nextLink}",
|
|
265
|
+
httpMethod: "GET",
|
|
266
|
+
responses: {
|
|
267
|
+
200: {
|
|
268
|
+
bodyMapper: Mappers.CommitmentAssociationListResult
|
|
269
|
+
}
|
|
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],
|
|
280
|
+
serializer
|
|
281
|
+
};
|