@azure/arm-cognitiveservices 6.1.0 → 7.0.0-alpha.20211202.3
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 +16 -0
- package/{LICENSE.txt → LICENSE} +1 -1
- package/README.md +70 -82
- package/dist/index.js +4800 -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/cognitiveServicesManagementClient.d.ts +42 -0
- package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -0
- package/dist-esm/src/cognitiveServicesManagementClient.js +133 -0
- package/dist-esm/src/cognitiveServicesManagementClient.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/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +1310 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +128 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +68 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +964 -1092
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +26 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +199 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/accounts.d.ts +138 -0
- package/dist-esm/src/operations/accounts.d.ts.map +1 -0
- package/dist-esm/src/operations/accounts.js +628 -0
- package/dist-esm/src/operations/accounts.js.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts +76 -0
- package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentPlans.js +293 -0
- package/dist-esm/src/operations/commitmentPlans.js.map +1 -0
- package/dist-esm/src/operations/commitmentTiers.d.ts +35 -0
- package/dist-esm/src/operations/commitmentTiers.d.ts.map +1 -0
- package/dist-esm/src/operations/commitmentTiers.js +132 -0
- package/dist-esm/src/operations/commitmentTiers.js.map +1 -0
- package/dist-esm/src/operations/deletedAccounts.d.ts +57 -0
- package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/deletedAccounts.js +232 -0
- package/dist-esm/src/operations/deletedAccounts.js.map +1 -0
- package/dist-esm/src/operations/deployments.d.ts +81 -0
- package/dist-esm/src/operations/deployments.d.ts.map +1 -0
- package/dist-esm/src/operations/deployments.js +331 -0
- package/dist-esm/src/operations/deployments.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +70 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +271 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +53 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/resourceSkus.d.ts +32 -0
- package/dist-esm/src/operations/resourceSkus.d.ts.map +1 -0
- package/dist-esm/src/operations/resourceSkus.js +124 -0
- package/dist-esm/src/operations/resourceSkus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/accounts.d.ts +102 -0
- package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/accounts.js} +2 -1
- package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +51 -0
- package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/commitmentPlans.js} +2 -9
- package/dist-esm/src/operationsInterfaces/commitmentPlans.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts.map +1 -0
- package/{src/models/commitmentTiersMappers.ts → dist-esm/src/operationsInterfaces/commitmentTiers.js} +2 -10
- package/dist-esm/src/operationsInterfaces/commitmentTiers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts +36 -0
- package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/deletedAccounts.js} +2 -2
- package/dist-esm/src/operationsInterfaces/deletedAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deployments.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/deployments.js +9 -0
- package/dist-esm/src/operationsInterfaces/deployments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +17 -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/privateEndpointConnections.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceSkus.js.map +1 -0
- package/dist-esm/test/cognitiveservices_examples.d.ts +4 -0
- package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -0
- package/dist-esm/test/cognitiveservices_examples.js +127 -0
- package/dist-esm/test/cognitiveservices_examples.js.map +1 -0
- package/package.json +65 -22
- package/review/arm-cognitiveservices.api.md +1150 -0
- package/rollup.config.js +181 -30
- package/src/cognitiveServicesManagementClient.ts +157 -153
- package/src/{models/resourceSkusMappers.ts → index.ts} +4 -9
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1063 -1831
- package/src/models/mappers.ts +1021 -1150
- package/src/models/parameters.ts +151 -54
- package/src/operations/accounts.ts +613 -497
- package/src/operations/commitmentPlans.ts +253 -203
- package/src/operations/commitmentTiers.ts +105 -80
- package/src/operations/deletedAccounts.ts +209 -161
- package/src/operations/deployments.ts +325 -193
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +85 -73
- package/src/operations/privateEndpointConnections.ts +257 -164
- package/src/operations/privateLinkResources.ts +37 -51
- package/src/operations/resourceSkus.ts +90 -76
- package/src/operationsInterfaces/accounts.ts +195 -0
- package/src/operationsInterfaces/commitmentPlans.ts +93 -0
- package/src/operationsInterfaces/commitmentTiers.ts +24 -0
- package/src/operationsInterfaces/deletedAccounts.ts +68 -0
- package/src/operationsInterfaces/deployments.ts +109 -0
- package/src/operationsInterfaces/index.ts +17 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +115 -0
- package/src/operationsInterfaces/privateLinkResources.ts +27 -0
- package/src/operationsInterfaces/resourceSkus.ts +22 -0
- package/tsconfig.json +3 -3
- package/types/arm-cognitiveservices.d.ts +1860 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-cognitiveservices.js +0 -4713
- package/dist/arm-cognitiveservices.js.map +0 -1
- package/dist/arm-cognitiveservices.min.js +0 -1
- package/dist/arm-cognitiveservices.min.js.map +0 -1
- package/esm/cognitiveServicesManagementClient.d.ts +0 -80
- package/esm/cognitiveServicesManagementClient.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClient.js +0 -128
- package/esm/cognitiveServicesManagementClient.js.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.d.ts +0 -22
- package/esm/cognitiveServicesManagementClientContext.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.js +0 -60
- package/esm/cognitiveServicesManagementClientContext.js.map +0 -1
- package/esm/models/accountsMappers.d.ts +0 -2
- package/esm/models/accountsMappers.d.ts.map +0 -1
- package/esm/models/accountsMappers.js +0 -9
- package/esm/models/accountsMappers.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 -9
- package/esm/models/commitmentPlansMappers.js.map +0 -1
- package/esm/models/commitmentTiersMappers.d.ts +0 -2
- package/esm/models/commitmentTiersMappers.d.ts.map +0 -1
- package/esm/models/commitmentTiersMappers.js +0 -9
- package/esm/models/commitmentTiersMappers.js.map +0 -1
- package/esm/models/deletedAccountsMappers.d.ts +0 -2
- package/esm/models/deletedAccountsMappers.d.ts.map +0 -1
- package/esm/models/deletedAccountsMappers.js +0 -9
- package/esm/models/deletedAccountsMappers.js.map +0 -1
- package/esm/models/deploymentsMappers.d.ts +0 -2
- package/esm/models/deploymentsMappers.d.ts.map +0 -1
- package/esm/models/deploymentsMappers.js +0 -9
- package/esm/models/deploymentsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -2102
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -71
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -13
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -137
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/resourceSkusMappers.d.ts +0 -2
- package/esm/models/resourceSkusMappers.d.ts.map +0 -1
- package/esm/models/resourceSkusMappers.js +0 -9
- package/esm/models/resourceSkusMappers.js.map +0 -1
- package/esm/operations/accounts.d.ts +0 -245
- package/esm/operations/accounts.d.ts.map +0 -1
- package/esm/operations/accounts.js +0 -476
- package/esm/operations/accounts.js.map +0 -1
- package/esm/operations/commitmentPlans.d.ts +0 -130
- package/esm/operations/commitmentPlans.d.ts.map +0 -1
- package/esm/operations/commitmentPlans.js +0 -216
- package/esm/operations/commitmentPlans.js.map +0 -1
- package/esm/operations/commitmentTiers.d.ts +0 -49
- package/esm/operations/commitmentTiers.d.ts.map +0 -1
- package/esm/operations/commitmentTiers.js +0 -84
- package/esm/operations/commitmentTiers.js.map +0 -1
- package/esm/operations/deletedAccounts.d.ts +0 -89
- package/esm/operations/deletedAccounts.d.ts.map +0 -1
- package/esm/operations/deletedAccounts.js +0 -168
- package/esm/operations/deletedAccounts.js.map +0 -1
- package/esm/operations/deployments.d.ts +0 -115
- package/esm/operations/deployments.d.ts.map +0 -1
- package/esm/operations/deployments.js +0 -236
- package/esm/operations/deployments.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -108
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -215
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -34
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -57
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/resourceSkus.d.ts +0 -46
- package/esm/operations/resourceSkus.d.ts.map +0 -1
- package/esm/operations/resourceSkus.js +0 -82
- package/esm/operations/resourceSkus.js.map +0 -1
- package/src/cognitiveServicesManagementClientContext.ts +0 -67
- package/src/models/accountsMappers.ts +0 -59
- package/src/models/commitmentPlansMappers.ts +0 -52
- package/src/models/deletedAccountsMappers.ts +0 -52
- package/src/models/deploymentsMappers.ts +0 -52
- package/src/models/privateEndpointConnectionsMappers.ts +0 -52
- package/src/models/privateLinkResourcesMappers.ts +0 -52
|
@@ -3,26 +3,40 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { CommitmentPlans } 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 { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
CommitmentPlan,
|
|
19
|
+
CommitmentPlansListNextOptionalParams,
|
|
20
|
+
CommitmentPlansListOptionalParams,
|
|
21
|
+
CommitmentPlansListResponse,
|
|
22
|
+
CommitmentPlansGetOptionalParams,
|
|
23
|
+
CommitmentPlansGetResponse,
|
|
24
|
+
CommitmentPlansCreateOrUpdateOptionalParams,
|
|
25
|
+
CommitmentPlansCreateOrUpdateResponse,
|
|
26
|
+
CommitmentPlansDeleteOptionalParams,
|
|
27
|
+
CommitmentPlansListNextResponse
|
|
28
|
+
} from "../models";
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing CommitmentPlans operations. */
|
|
32
|
+
export class CommitmentPlansImpl implements CommitmentPlans {
|
|
33
|
+
private readonly client: CognitiveServicesManagementClient;
|
|
20
34
|
|
|
21
35
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
36
|
+
* Initialize a new instance of the class CommitmentPlans class.
|
|
37
|
+
* @param client Reference to the service client
|
|
24
38
|
*/
|
|
25
|
-
constructor(client:
|
|
39
|
+
constructor(client: CognitiveServicesManagementClient) {
|
|
26
40
|
this.client = client;
|
|
27
41
|
}
|
|
28
42
|
|
|
@@ -30,71 +44,96 @@ export class CommitmentPlans {
|
|
|
30
44
|
* Gets the commitmentPlans associated with the Cognitive Services account.
|
|
31
45
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
32
46
|
* @param accountName The name of Cognitive Services account.
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Promise<Models.CommitmentPlansListResponse>
|
|
47
|
+
* @param options The options parameters.
|
|
35
48
|
*/
|
|
36
|
-
list(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
public list(
|
|
50
|
+
resourceGroupName: string,
|
|
51
|
+
accountName: string,
|
|
52
|
+
options?: CommitmentPlansListOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<CommitmentPlan> {
|
|
54
|
+
const iter = this.listPagingAll(resourceGroupName, accountName, options);
|
|
55
|
+
return {
|
|
56
|
+
next() {
|
|
57
|
+
return iter.next();
|
|
58
|
+
},
|
|
59
|
+
[Symbol.asyncIterator]() {
|
|
60
|
+
return this;
|
|
61
|
+
},
|
|
62
|
+
byPage: () => {
|
|
63
|
+
return this.listPagingPage(resourceGroupName, accountName, options);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private async *listPagingPage(
|
|
69
|
+
resourceGroupName: string,
|
|
70
|
+
accountName: string,
|
|
71
|
+
options?: CommitmentPlansListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<CommitmentPlan[]> {
|
|
73
|
+
let result = await this._list(resourceGroupName, accountName, options);
|
|
74
|
+
yield result.value || [];
|
|
75
|
+
let continuationToken = result.nextLink;
|
|
76
|
+
while (continuationToken) {
|
|
77
|
+
result = await this._listNext(
|
|
53
78
|
resourceGroupName,
|
|
54
79
|
accountName,
|
|
80
|
+
continuationToken,
|
|
55
81
|
options
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
82
|
+
);
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private async *listPagingAll(
|
|
89
|
+
resourceGroupName: string,
|
|
90
|
+
accountName: string,
|
|
91
|
+
options?: CommitmentPlansListOptionalParams
|
|
92
|
+
): AsyncIterableIterator<CommitmentPlan> {
|
|
93
|
+
for await (const page of this.listPagingPage(
|
|
94
|
+
resourceGroupName,
|
|
95
|
+
accountName,
|
|
96
|
+
options
|
|
97
|
+
)) {
|
|
98
|
+
yield* page;
|
|
99
|
+
}
|
|
59
100
|
}
|
|
60
101
|
|
|
61
102
|
/**
|
|
62
|
-
* Gets the
|
|
63
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
64
|
-
* @param accountName The name of Cognitive Services account.
|
|
65
|
-
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
66
|
-
* Account
|
|
67
|
-
* @param [options] The optional parameters
|
|
68
|
-
* @returns Promise<Models.CommitmentPlansGetResponse>
|
|
69
|
-
*/
|
|
70
|
-
get(resourceGroupName: string, accountName: string, commitmentPlanName: string, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentPlansGetResponse>;
|
|
71
|
-
/**
|
|
103
|
+
* Gets the commitmentPlans associated with the Cognitive Services account.
|
|
72
104
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
73
105
|
* @param accountName The name of Cognitive Services account.
|
|
74
|
-
* @param
|
|
75
|
-
* Account
|
|
76
|
-
* @param callback The callback
|
|
106
|
+
* @param options The options parameters.
|
|
77
107
|
*/
|
|
78
|
-
|
|
108
|
+
private _list(
|
|
109
|
+
resourceGroupName: string,
|
|
110
|
+
accountName: string,
|
|
111
|
+
options?: CommitmentPlansListOptionalParams
|
|
112
|
+
): Promise<CommitmentPlansListResponse> {
|
|
113
|
+
return this.client.sendOperationRequest(
|
|
114
|
+
{ resourceGroupName, accountName, options },
|
|
115
|
+
listOperationSpec
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
79
119
|
/**
|
|
120
|
+
* Gets the specified commitmentPlans associated with the Cognitive Services account.
|
|
80
121
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
81
122
|
* @param accountName The name of Cognitive Services account.
|
|
82
123
|
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
83
|
-
*
|
|
84
|
-
* @param options The
|
|
85
|
-
* @param callback The callback
|
|
124
|
+
* Account
|
|
125
|
+
* @param options The options parameters.
|
|
86
126
|
*/
|
|
87
|
-
get(
|
|
88
|
-
|
|
127
|
+
get(
|
|
128
|
+
resourceGroupName: string,
|
|
129
|
+
accountName: string,
|
|
130
|
+
commitmentPlanName: string,
|
|
131
|
+
options?: CommitmentPlansGetOptionalParams
|
|
132
|
+
): Promise<CommitmentPlansGetResponse> {
|
|
89
133
|
return this.client.sendOperationRequest(
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
commitmentPlanName,
|
|
94
|
-
options
|
|
95
|
-
},
|
|
96
|
-
getOperationSpec,
|
|
97
|
-
callback) as Promise<Models.CommitmentPlansGetResponse>;
|
|
134
|
+
{ resourceGroupName, accountName, commitmentPlanName, options },
|
|
135
|
+
getOperationSpec
|
|
136
|
+
);
|
|
98
137
|
}
|
|
99
138
|
|
|
100
139
|
/**
|
|
@@ -102,32 +141,17 @@ export class CommitmentPlans {
|
|
|
102
141
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
103
142
|
* @param accountName The name of Cognitive Services account.
|
|
104
143
|
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
105
|
-
*
|
|
106
|
-
* @param commitmentPlan The commitmentPlan properties.
|
|
107
|
-
* @param [options] The optional parameters
|
|
108
|
-
* @returns Promise<Models.CommitmentPlansCreateOrUpdateResponse>
|
|
109
|
-
*/
|
|
110
|
-
createOrUpdate(resourceGroupName: string, accountName: string, commitmentPlanName: string, commitmentPlan: Models.CommitmentPlan, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentPlansCreateOrUpdateResponse>;
|
|
111
|
-
/**
|
|
112
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
113
|
-
* @param accountName The name of Cognitive Services account.
|
|
114
|
-
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
115
|
-
* Account
|
|
144
|
+
* Account
|
|
116
145
|
* @param commitmentPlan The commitmentPlan properties.
|
|
117
|
-
* @param
|
|
146
|
+
* @param options The options parameters.
|
|
118
147
|
*/
|
|
119
|
-
createOrUpdate(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* @param options The optional parameters
|
|
127
|
-
* @param callback The callback
|
|
128
|
-
*/
|
|
129
|
-
createOrUpdate(resourceGroupName: string, accountName: string, commitmentPlanName: string, commitmentPlan: Models.CommitmentPlan, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CommitmentPlan>): void;
|
|
130
|
-
createOrUpdate(resourceGroupName: string, accountName: string, commitmentPlanName: string, commitmentPlan: Models.CommitmentPlan, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CommitmentPlan>, callback?: msRest.ServiceCallback<Models.CommitmentPlan>): Promise<Models.CommitmentPlansCreateOrUpdateResponse> {
|
|
148
|
+
createOrUpdate(
|
|
149
|
+
resourceGroupName: string,
|
|
150
|
+
accountName: string,
|
|
151
|
+
commitmentPlanName: string,
|
|
152
|
+
commitmentPlan: CommitmentPlan,
|
|
153
|
+
options?: CommitmentPlansCreateOrUpdateOptionalParams
|
|
154
|
+
): Promise<CommitmentPlansCreateOrUpdateResponse> {
|
|
131
155
|
return this.client.sendOperationRequest(
|
|
132
156
|
{
|
|
133
157
|
resourceGroupName,
|
|
@@ -136,8 +160,8 @@ export class CommitmentPlans {
|
|
|
136
160
|
commitmentPlan,
|
|
137
161
|
options
|
|
138
162
|
},
|
|
139
|
-
createOrUpdateOperationSpec
|
|
140
|
-
|
|
163
|
+
createOrUpdateOperationSpec
|
|
164
|
+
);
|
|
141
165
|
}
|
|
142
166
|
|
|
143
167
|
/**
|
|
@@ -145,13 +169,63 @@ export class CommitmentPlans {
|
|
|
145
169
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
146
170
|
* @param accountName The name of Cognitive Services account.
|
|
147
171
|
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
148
|
-
*
|
|
149
|
-
* @param
|
|
150
|
-
* @returns Promise<msRest.RestResponse>
|
|
172
|
+
* Account
|
|
173
|
+
* @param options The options parameters.
|
|
151
174
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
175
|
+
async beginDelete(
|
|
176
|
+
resourceGroupName: string,
|
|
177
|
+
accountName: string,
|
|
178
|
+
commitmentPlanName: string,
|
|
179
|
+
options?: CommitmentPlansDeleteOptionalParams
|
|
180
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
181
|
+
const directSendOperation = async (
|
|
182
|
+
args: coreClient.OperationArguments,
|
|
183
|
+
spec: coreClient.OperationSpec
|
|
184
|
+
): Promise<void> => {
|
|
185
|
+
return this.client.sendOperationRequest(args, spec);
|
|
186
|
+
};
|
|
187
|
+
const sendOperation = async (
|
|
188
|
+
args: coreClient.OperationArguments,
|
|
189
|
+
spec: coreClient.OperationSpec
|
|
190
|
+
) => {
|
|
191
|
+
let currentRawResponse:
|
|
192
|
+
| coreClient.FullOperationResponse
|
|
193
|
+
| undefined = undefined;
|
|
194
|
+
const providedCallback = args.options?.onResponse;
|
|
195
|
+
const callback: coreClient.RawResponseCallback = (
|
|
196
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
197
|
+
flatResponse: unknown
|
|
198
|
+
) => {
|
|
199
|
+
currentRawResponse = rawResponse;
|
|
200
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
201
|
+
};
|
|
202
|
+
const updatedArgs = {
|
|
203
|
+
...args,
|
|
204
|
+
options: {
|
|
205
|
+
...args.options,
|
|
206
|
+
onResponse: callback
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
210
|
+
return {
|
|
211
|
+
flatResponse,
|
|
212
|
+
rawResponse: {
|
|
213
|
+
statusCode: currentRawResponse!.status,
|
|
214
|
+
body: currentRawResponse!.parsedBody,
|
|
215
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const lro = new LroImpl(
|
|
221
|
+
sendOperation,
|
|
222
|
+
{ resourceGroupName, accountName, commitmentPlanName, options },
|
|
223
|
+
deleteOperationSpec
|
|
224
|
+
);
|
|
225
|
+
return new LroEngine(lro, {
|
|
226
|
+
resumeFrom: options?.resumeFrom,
|
|
227
|
+
intervalInMs: options?.updateIntervalInMs
|
|
228
|
+
});
|
|
155
229
|
}
|
|
156
230
|
|
|
157
231
|
/**
|
|
@@ -159,67 +233,50 @@ export class CommitmentPlans {
|
|
|
159
233
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
160
234
|
* @param accountName The name of Cognitive Services account.
|
|
161
235
|
* @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
|
|
162
|
-
*
|
|
163
|
-
* @param
|
|
164
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
236
|
+
* Account
|
|
237
|
+
* @param options The options parameters.
|
|
165
238
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
239
|
+
async beginDeleteAndWait(
|
|
240
|
+
resourceGroupName: string,
|
|
241
|
+
accountName: string,
|
|
242
|
+
commitmentPlanName: string,
|
|
243
|
+
options?: CommitmentPlansDeleteOptionalParams
|
|
244
|
+
): Promise<void> {
|
|
245
|
+
const poller = await this.beginDelete(
|
|
246
|
+
resourceGroupName,
|
|
247
|
+
accountName,
|
|
248
|
+
commitmentPlanName,
|
|
249
|
+
options
|
|
250
|
+
);
|
|
251
|
+
return poller.pollUntilDone();
|
|
176
252
|
}
|
|
177
253
|
|
|
178
254
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param
|
|
181
|
-
* @param
|
|
182
|
-
* @
|
|
183
|
-
|
|
184
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.CommitmentPlansListNextResponse>;
|
|
185
|
-
/**
|
|
186
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
187
|
-
* @param callback The callback
|
|
188
|
-
*/
|
|
189
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.CommitmentPlanListResult>): void;
|
|
190
|
-
/**
|
|
191
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
192
|
-
* @param options The optional parameters
|
|
193
|
-
* @param callback The callback
|
|
255
|
+
* ListNext
|
|
256
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
257
|
+
* @param accountName The name of Cognitive Services account.
|
|
258
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
259
|
+
* @param options The options parameters.
|
|
194
260
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
261
|
+
private _listNext(
|
|
262
|
+
resourceGroupName: string,
|
|
263
|
+
accountName: string,
|
|
264
|
+
nextLink: string,
|
|
265
|
+
options?: CommitmentPlansListNextOptionalParams
|
|
266
|
+
): Promise<CommitmentPlansListNextResponse> {
|
|
197
267
|
return this.client.sendOperationRequest(
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
listNextOperationSpec,
|
|
203
|
-
callback) as Promise<Models.CommitmentPlansListNextResponse>;
|
|
268
|
+
{ resourceGroupName, accountName, nextLink, options },
|
|
269
|
+
listNextOperationSpec
|
|
270
|
+
);
|
|
204
271
|
}
|
|
205
272
|
}
|
|
206
|
-
|
|
207
273
|
// Operation Specifications
|
|
208
|
-
const serializer =
|
|
209
|
-
|
|
274
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
275
|
+
|
|
276
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
277
|
+
path:
|
|
278
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans",
|
|
210
279
|
httpMethod: "GET",
|
|
211
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans",
|
|
212
|
-
urlParameters: [
|
|
213
|
-
Parameters.resourceGroupName,
|
|
214
|
-
Parameters.accountName,
|
|
215
|
-
Parameters.subscriptionId
|
|
216
|
-
],
|
|
217
|
-
queryParameters: [
|
|
218
|
-
Parameters.apiVersion
|
|
219
|
-
],
|
|
220
|
-
headerParameters: [
|
|
221
|
-
Parameters.acceptLanguage
|
|
222
|
-
],
|
|
223
280
|
responses: {
|
|
224
281
|
200: {
|
|
225
282
|
bodyMapper: Mappers.CommitmentPlanListResult
|
|
@@ -228,24 +285,20 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
228
285
|
bodyMapper: Mappers.ErrorResponse
|
|
229
286
|
}
|
|
230
287
|
},
|
|
231
|
-
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
235
|
-
httpMethod: "GET",
|
|
236
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
288
|
+
queryParameters: [Parameters.apiVersion],
|
|
237
289
|
urlParameters: [
|
|
290
|
+
Parameters.$host,
|
|
238
291
|
Parameters.resourceGroupName,
|
|
239
292
|
Parameters.accountName,
|
|
240
|
-
Parameters.subscriptionId
|
|
241
|
-
Parameters.commitmentPlanName
|
|
242
|
-
],
|
|
243
|
-
queryParameters: [
|
|
244
|
-
Parameters.apiVersion
|
|
245
|
-
],
|
|
246
|
-
headerParameters: [
|
|
247
|
-
Parameters.acceptLanguage
|
|
293
|
+
Parameters.subscriptionId
|
|
248
294
|
],
|
|
295
|
+
headerParameters: [Parameters.accept],
|
|
296
|
+
serializer
|
|
297
|
+
};
|
|
298
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
299
|
+
path:
|
|
300
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
301
|
+
httpMethod: "GET",
|
|
249
302
|
responses: {
|
|
250
303
|
200: {
|
|
251
304
|
bodyMapper: Mappers.CommitmentPlan
|
|
@@ -254,31 +307,21 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
254
307
|
bodyMapper: Mappers.ErrorResponse
|
|
255
308
|
}
|
|
256
309
|
},
|
|
257
|
-
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
const createOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
261
|
-
httpMethod: "PUT",
|
|
262
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
310
|
+
queryParameters: [Parameters.apiVersion],
|
|
263
311
|
urlParameters: [
|
|
312
|
+
Parameters.$host,
|
|
264
313
|
Parameters.resourceGroupName,
|
|
265
314
|
Parameters.accountName,
|
|
266
315
|
Parameters.subscriptionId,
|
|
267
316
|
Parameters.commitmentPlanName
|
|
268
317
|
],
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
parameterPath: "commitmentPlan",
|
|
277
|
-
mapper: {
|
|
278
|
-
...Mappers.CommitmentPlan,
|
|
279
|
-
required: true
|
|
280
|
-
}
|
|
281
|
-
},
|
|
318
|
+
headerParameters: [Parameters.accept],
|
|
319
|
+
serializer
|
|
320
|
+
};
|
|
321
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
322
|
+
path:
|
|
323
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
324
|
+
httpMethod: "PUT",
|
|
282
325
|
responses: {
|
|
283
326
|
200: {
|
|
284
327
|
bodyMapper: Mappers.CommitmentPlan
|
|
@@ -290,48 +333,46 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
|
290
333
|
bodyMapper: Mappers.ErrorResponse
|
|
291
334
|
}
|
|
292
335
|
},
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
297
|
-
httpMethod: "DELETE",
|
|
298
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
336
|
+
requestBody: Parameters.commitmentPlan,
|
|
337
|
+
queryParameters: [Parameters.apiVersion],
|
|
299
338
|
urlParameters: [
|
|
339
|
+
Parameters.$host,
|
|
300
340
|
Parameters.resourceGroupName,
|
|
301
341
|
Parameters.accountName,
|
|
302
342
|
Parameters.subscriptionId,
|
|
303
343
|
Parameters.commitmentPlanName
|
|
304
344
|
],
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
345
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
346
|
+
mediaType: "json",
|
|
347
|
+
serializer
|
|
348
|
+
};
|
|
349
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
350
|
+
path:
|
|
351
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
|
|
352
|
+
httpMethod: "DELETE",
|
|
311
353
|
responses: {
|
|
312
354
|
200: {},
|
|
355
|
+
201: {},
|
|
313
356
|
202: {},
|
|
314
357
|
204: {},
|
|
315
358
|
default: {
|
|
316
359
|
bodyMapper: Mappers.ErrorResponse
|
|
317
360
|
}
|
|
318
361
|
},
|
|
362
|
+
queryParameters: [Parameters.apiVersion],
|
|
363
|
+
urlParameters: [
|
|
364
|
+
Parameters.$host,
|
|
365
|
+
Parameters.resourceGroupName,
|
|
366
|
+
Parameters.accountName,
|
|
367
|
+
Parameters.subscriptionId,
|
|
368
|
+
Parameters.commitmentPlanName
|
|
369
|
+
],
|
|
370
|
+
headerParameters: [Parameters.accept],
|
|
319
371
|
serializer
|
|
320
372
|
};
|
|
321
|
-
|
|
322
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
323
|
-
httpMethod: "GET",
|
|
324
|
-
baseUrl: "https://management.azure.com",
|
|
373
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
325
374
|
path: "{nextLink}",
|
|
326
|
-
|
|
327
|
-
Parameters.nextPageLink
|
|
328
|
-
],
|
|
329
|
-
queryParameters: [
|
|
330
|
-
Parameters.apiVersion
|
|
331
|
-
],
|
|
332
|
-
headerParameters: [
|
|
333
|
-
Parameters.acceptLanguage
|
|
334
|
-
],
|
|
375
|
+
httpMethod: "GET",
|
|
335
376
|
responses: {
|
|
336
377
|
200: {
|
|
337
378
|
bodyMapper: Mappers.CommitmentPlanListResult
|
|
@@ -340,5 +381,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
340
381
|
bodyMapper: Mappers.ErrorResponse
|
|
341
382
|
}
|
|
342
383
|
},
|
|
384
|
+
queryParameters: [Parameters.apiVersion],
|
|
385
|
+
urlParameters: [
|
|
386
|
+
Parameters.$host,
|
|
387
|
+
Parameters.resourceGroupName,
|
|
388
|
+
Parameters.accountName,
|
|
389
|
+
Parameters.subscriptionId,
|
|
390
|
+
Parameters.nextLink
|
|
391
|
+
],
|
|
392
|
+
headerParameters: [Parameters.accept],
|
|
343
393
|
serializer
|
|
344
394
|
};
|