@azure/arm-cognitiveservices 6.0.0 → 7.0.0-alpha.20211220.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 +11 -0
- package/{LICENSE.txt → LICENSE} +1 -1
- package/README.md +70 -95
- 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 +1017 -713
- 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 +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +17 -0
- 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/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/commitmentTiers.js} +2 -2
- 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/{src/models/resourceSkusMappers.ts → dist-esm/src/operationsInterfaces/deletedAccounts.js} +2 -10
- 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 -24
- package/src/cognitiveServicesManagementClient.ts +148 -172
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1122 -1415
- package/src/models/mappers.ts +1161 -835
- package/src/models/parameters.ts +159 -40
- package/src/operations/accounts.ts +587 -574
- package/src/operations/commitmentPlans.ts +394 -0
- package/src/operations/commitmentTiers.ts +158 -0
- package/src/operations/deletedAccounts.ts +197 -185
- package/src/operations/deployments.ts +464 -0
- package/src/operations/index.ts +4 -2
- package/src/operations/operations.ts +85 -85
- package/src/operations/privateEndpointConnections.ts +232 -202
- package/src/operations/privateLinkResources.ts +34 -62
- package/src/operations/resourceSkus.ts +90 -86
- 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/{esm/operations/index.js → src/operationsInterfaces/index.ts} +5 -3
- 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 -3385
- 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 -77
- package/esm/cognitiveServicesManagementClient.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClient.js +0 -108
- 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 -61
- 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/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/index.d.ts +0 -1645
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -58
- 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 -11
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -115
- 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 -389
- package/esm/operations/accounts.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 -149
- package/esm/operations/deletedAccounts.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 -69
- 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 -193
- 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 -49
- 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 -70
- package/esm/operations/resourceSkus.js.map +0 -1
- package/src/cognitiveServicesManagementClientContext.ts +0 -74
- package/src/models/accountsMappers.ts +0 -51
- package/src/models/deletedAccountsMappers.ts +0 -44
- package/src/models/privateEndpointConnectionsMappers.ts +0 -44
- package/src/models/privateLinkResourcesMappers.ts +0 -44
|
@@ -3,86 +3,100 @@
|
|
|
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 { DeletedAccounts } 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
|
+
Account,
|
|
19
|
+
DeletedAccountsListNextOptionalParams,
|
|
20
|
+
DeletedAccountsListOptionalParams,
|
|
21
|
+
DeletedAccountsGetOptionalParams,
|
|
22
|
+
DeletedAccountsGetResponse,
|
|
23
|
+
DeletedAccountsPurgeOptionalParams,
|
|
24
|
+
DeletedAccountsListResponse,
|
|
25
|
+
DeletedAccountsListNextResponse
|
|
26
|
+
} from "../models";
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
/// <reference lib="esnext.asynciterable" />
|
|
29
|
+
/** Class containing DeletedAccounts operations. */
|
|
30
|
+
export class DeletedAccountsImpl implements DeletedAccounts {
|
|
31
|
+
private readonly client: CognitiveServicesManagementClient;
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
34
|
+
* Initialize a new instance of the class DeletedAccounts class.
|
|
35
|
+
* @param client Reference to the service client
|
|
24
36
|
*/
|
|
25
|
-
constructor(client:
|
|
37
|
+
constructor(client: CognitiveServicesManagementClient) {
|
|
26
38
|
this.client = client;
|
|
27
39
|
}
|
|
28
40
|
|
|
29
41
|
/**
|
|
30
|
-
* Returns a
|
|
31
|
-
* @param
|
|
32
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
33
|
-
* @param accountName The name of Cognitive Services account.
|
|
34
|
-
* @param [options] The optional parameters
|
|
35
|
-
* @returns Promise<Models.DeletedAccountsGetResponse>
|
|
36
|
-
*/
|
|
37
|
-
get(
|
|
38
|
-
location: string,
|
|
39
|
-
resourceGroupName: string,
|
|
40
|
-
accountName: string,
|
|
41
|
-
options?: msRest.RequestOptionsBase
|
|
42
|
-
): Promise<Models.DeletedAccountsGetResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* @param location Resource location.
|
|
45
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
46
|
-
* @param accountName The name of Cognitive Services account.
|
|
47
|
-
* @param callback The callback
|
|
42
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
43
|
+
* @param options The options parameters.
|
|
48
44
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
public list(
|
|
46
|
+
options?: DeletedAccountsListOptionalParams
|
|
47
|
+
): PagedAsyncIterableIterator<Account> {
|
|
48
|
+
const iter = this.listPagingAll(options);
|
|
49
|
+
return {
|
|
50
|
+
next() {
|
|
51
|
+
return iter.next();
|
|
52
|
+
},
|
|
53
|
+
[Symbol.asyncIterator]() {
|
|
54
|
+
return this;
|
|
55
|
+
},
|
|
56
|
+
byPage: () => {
|
|
57
|
+
return this.listPagingPage(options);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private async *listPagingPage(
|
|
63
|
+
options?: DeletedAccountsListOptionalParams
|
|
64
|
+
): AsyncIterableIterator<Account[]> {
|
|
65
|
+
let result = await this._list(options);
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
let continuationToken = result.nextLink;
|
|
68
|
+
while (continuationToken) {
|
|
69
|
+
result = await this._listNext(continuationToken, options);
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
yield result.value || [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private async *listPagingAll(
|
|
76
|
+
options?: DeletedAccountsListOptionalParams
|
|
77
|
+
): AsyncIterableIterator<Account> {
|
|
78
|
+
for await (const page of this.listPagingPage(options)) {
|
|
79
|
+
yield* page;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
55
83
|
/**
|
|
84
|
+
* Returns a Cognitive Services account specified by the parameters.
|
|
56
85
|
* @param location Resource location.
|
|
57
86
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
58
87
|
* @param accountName The name of Cognitive Services account.
|
|
59
|
-
* @param options The
|
|
60
|
-
* @param callback The callback
|
|
88
|
+
* @param options The options parameters.
|
|
61
89
|
*/
|
|
62
90
|
get(
|
|
63
91
|
location: string,
|
|
64
92
|
resourceGroupName: string,
|
|
65
93
|
accountName: string,
|
|
66
|
-
options
|
|
67
|
-
|
|
68
|
-
): void;
|
|
69
|
-
get(
|
|
70
|
-
location: string,
|
|
71
|
-
resourceGroupName: string,
|
|
72
|
-
accountName: string,
|
|
73
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Account>,
|
|
74
|
-
callback?: msRest.ServiceCallback<Models.Account>
|
|
75
|
-
): Promise<Models.DeletedAccountsGetResponse> {
|
|
94
|
+
options?: DeletedAccountsGetOptionalParams
|
|
95
|
+
): Promise<DeletedAccountsGetResponse> {
|
|
76
96
|
return this.client.sendOperationRequest(
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
accountName,
|
|
81
|
-
options
|
|
82
|
-
},
|
|
83
|
-
getOperationSpec,
|
|
84
|
-
callback
|
|
85
|
-
) as Promise<Models.DeletedAccountsGetResponse>;
|
|
97
|
+
{ location, resourceGroupName, accountName, options },
|
|
98
|
+
getOperationSpec
|
|
99
|
+
);
|
|
86
100
|
}
|
|
87
101
|
|
|
88
102
|
/**
|
|
@@ -90,49 +104,62 @@ export class DeletedAccounts {
|
|
|
90
104
|
* @param location Resource location.
|
|
91
105
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
92
106
|
* @param accountName The name of Cognitive Services account.
|
|
93
|
-
* @param
|
|
94
|
-
* @returns Promise<msRest.RestResponse>
|
|
107
|
+
* @param options The options parameters.
|
|
95
108
|
*/
|
|
96
|
-
|
|
109
|
+
async beginPurge(
|
|
97
110
|
location: string,
|
|
98
111
|
resourceGroupName: string,
|
|
99
112
|
accountName: string,
|
|
100
|
-
options?:
|
|
101
|
-
): Promise<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
options?: DeletedAccountsPurgeOptionalParams
|
|
114
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
115
|
+
const directSendOperation = async (
|
|
116
|
+
args: coreClient.OperationArguments,
|
|
117
|
+
spec: coreClient.OperationSpec
|
|
118
|
+
): Promise<void> => {
|
|
119
|
+
return this.client.sendOperationRequest(args, spec);
|
|
120
|
+
};
|
|
121
|
+
const sendOperation = async (
|
|
122
|
+
args: coreClient.OperationArguments,
|
|
123
|
+
spec: coreClient.OperationSpec
|
|
124
|
+
) => {
|
|
125
|
+
let currentRawResponse:
|
|
126
|
+
| coreClient.FullOperationResponse
|
|
127
|
+
| undefined = undefined;
|
|
128
|
+
const providedCallback = args.options?.onResponse;
|
|
129
|
+
const callback: coreClient.RawResponseCallback = (
|
|
130
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
131
|
+
flatResponse: unknown
|
|
132
|
+
) => {
|
|
133
|
+
currentRawResponse = rawResponse;
|
|
134
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
135
|
+
};
|
|
136
|
+
const updatedArgs = {
|
|
137
|
+
...args,
|
|
138
|
+
options: {
|
|
139
|
+
...args.options,
|
|
140
|
+
onResponse: callback
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
144
|
+
return {
|
|
145
|
+
flatResponse,
|
|
146
|
+
rawResponse: {
|
|
147
|
+
statusCode: currentRawResponse!.status,
|
|
148
|
+
body: currentRawResponse!.parsedBody,
|
|
149
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
};
|
|
106
153
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
list(callback: msRest.ServiceCallback<Models.AccountListResult>): void;
|
|
117
|
-
/**
|
|
118
|
-
* @param options The optional parameters
|
|
119
|
-
* @param callback The callback
|
|
120
|
-
*/
|
|
121
|
-
list(
|
|
122
|
-
options: msRest.RequestOptionsBase,
|
|
123
|
-
callback: msRest.ServiceCallback<Models.AccountListResult>
|
|
124
|
-
): void;
|
|
125
|
-
list(
|
|
126
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountListResult>,
|
|
127
|
-
callback?: msRest.ServiceCallback<Models.AccountListResult>
|
|
128
|
-
): Promise<Models.DeletedAccountsListResponse> {
|
|
129
|
-
return this.client.sendOperationRequest(
|
|
130
|
-
{
|
|
131
|
-
options
|
|
132
|
-
},
|
|
133
|
-
listOperationSpec,
|
|
134
|
-
callback
|
|
135
|
-
) as Promise<Models.DeletedAccountsListResponse>;
|
|
154
|
+
const lro = new LroImpl(
|
|
155
|
+
sendOperation,
|
|
156
|
+
{ location, resourceGroupName, accountName, options },
|
|
157
|
+
purgeOperationSpec
|
|
158
|
+
);
|
|
159
|
+
return new LroEngine(lro, {
|
|
160
|
+
resumeFrom: options?.resumeFrom,
|
|
161
|
+
intervalInMs: options?.updateIntervalInMs
|
|
162
|
+
});
|
|
136
163
|
}
|
|
137
164
|
|
|
138
165
|
/**
|
|
@@ -140,82 +167,55 @@ export class DeletedAccounts {
|
|
|
140
167
|
* @param location Resource location.
|
|
141
168
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
142
169
|
* @param accountName The name of Cognitive Services account.
|
|
143
|
-
* @param
|
|
144
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
170
|
+
* @param options The options parameters.
|
|
145
171
|
*/
|
|
146
|
-
|
|
172
|
+
async beginPurgeAndWait(
|
|
147
173
|
location: string,
|
|
148
174
|
resourceGroupName: string,
|
|
149
175
|
accountName: string,
|
|
150
|
-
options?:
|
|
151
|
-
): Promise<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
accountName,
|
|
157
|
-
options
|
|
158
|
-
},
|
|
159
|
-
beginPurgeOperationSpec,
|
|
176
|
+
options?: DeletedAccountsPurgeOptionalParams
|
|
177
|
+
): Promise<void> {
|
|
178
|
+
const poller = await this.beginPurge(
|
|
179
|
+
location,
|
|
180
|
+
resourceGroupName,
|
|
181
|
+
accountName,
|
|
160
182
|
options
|
|
161
183
|
);
|
|
184
|
+
return poller.pollUntilDone();
|
|
162
185
|
}
|
|
163
186
|
|
|
164
187
|
/**
|
|
165
188
|
* Returns all the resources of a particular type belonging to a subscription.
|
|
166
|
-
* @param
|
|
167
|
-
* @param [options] The optional parameters
|
|
168
|
-
* @returns Promise<Models.DeletedAccountsListNextResponse>
|
|
169
|
-
*/
|
|
170
|
-
listNext(
|
|
171
|
-
nextPageLink: string,
|
|
172
|
-
options?: msRest.RequestOptionsBase
|
|
173
|
-
): Promise<Models.DeletedAccountsListNextResponse>;
|
|
174
|
-
/**
|
|
175
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
176
|
-
* @param callback The callback
|
|
189
|
+
* @param options The options parameters.
|
|
177
190
|
*/
|
|
178
|
-
|
|
191
|
+
private _list(
|
|
192
|
+
options?: DeletedAccountsListOptionalParams
|
|
193
|
+
): Promise<DeletedAccountsListResponse> {
|
|
194
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
195
|
+
}
|
|
196
|
+
|
|
179
197
|
/**
|
|
180
|
-
*
|
|
181
|
-
* @param
|
|
182
|
-
* @param
|
|
198
|
+
* ListNext
|
|
199
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
200
|
+
* @param options The options parameters.
|
|
183
201
|
*/
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
options
|
|
187
|
-
|
|
188
|
-
): void;
|
|
189
|
-
listNext(
|
|
190
|
-
nextPageLink: string,
|
|
191
|
-
options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AccountListResult>,
|
|
192
|
-
callback?: msRest.ServiceCallback<Models.AccountListResult>
|
|
193
|
-
): Promise<Models.DeletedAccountsListNextResponse> {
|
|
202
|
+
private _listNext(
|
|
203
|
+
nextLink: string,
|
|
204
|
+
options?: DeletedAccountsListNextOptionalParams
|
|
205
|
+
): Promise<DeletedAccountsListNextResponse> {
|
|
194
206
|
return this.client.sendOperationRequest(
|
|
195
|
-
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
listNextOperationSpec,
|
|
200
|
-
callback
|
|
201
|
-
) as Promise<Models.DeletedAccountsListNextResponse>;
|
|
207
|
+
{ nextLink, options },
|
|
208
|
+
listNextOperationSpec
|
|
209
|
+
);
|
|
202
210
|
}
|
|
203
211
|
}
|
|
204
|
-
|
|
205
212
|
// Operation Specifications
|
|
206
|
-
const serializer =
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
214
|
+
|
|
215
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
209
216
|
path:
|
|
210
|
-
"subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
211
|
-
|
|
212
|
-
Parameters.location,
|
|
213
|
-
Parameters.resourceGroupName,
|
|
214
|
-
Parameters.accountName,
|
|
215
|
-
Parameters.subscriptionId
|
|
216
|
-
],
|
|
217
|
-
queryParameters: [Parameters.apiVersion],
|
|
218
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
217
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
218
|
+
httpMethod: "GET",
|
|
219
219
|
responses: {
|
|
220
220
|
200: {
|
|
221
221
|
bodyMapper: Mappers.Account
|
|
@@ -224,56 +224,61 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
224
224
|
bodyMapper: Mappers.ErrorResponse
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
|
+
queryParameters: [Parameters.apiVersion],
|
|
228
|
+
urlParameters: [
|
|
229
|
+
Parameters.$host,
|
|
230
|
+
Parameters.resourceGroupName,
|
|
231
|
+
Parameters.accountName,
|
|
232
|
+
Parameters.subscriptionId,
|
|
233
|
+
Parameters.location
|
|
234
|
+
],
|
|
235
|
+
headerParameters: [Parameters.accept],
|
|
227
236
|
serializer
|
|
228
237
|
};
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
urlParameters: [Parameters.subscriptionId],
|
|
234
|
-
queryParameters: [Parameters.apiVersion],
|
|
235
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
238
|
+
const purgeOperationSpec: coreClient.OperationSpec = {
|
|
239
|
+
path:
|
|
240
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
241
|
+
httpMethod: "DELETE",
|
|
236
242
|
responses: {
|
|
237
|
-
200: {
|
|
238
|
-
|
|
239
|
-
},
|
|
243
|
+
200: {},
|
|
244
|
+
201: {},
|
|
245
|
+
202: {},
|
|
246
|
+
204: {},
|
|
240
247
|
default: {
|
|
241
248
|
bodyMapper: Mappers.ErrorResponse
|
|
242
249
|
}
|
|
243
250
|
},
|
|
244
|
-
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
const beginPurgeOperationSpec: msRest.OperationSpec = {
|
|
248
|
-
httpMethod: "DELETE",
|
|
249
|
-
path:
|
|
250
|
-
"subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
251
|
+
queryParameters: [Parameters.apiVersion],
|
|
251
252
|
urlParameters: [
|
|
252
|
-
Parameters
|
|
253
|
+
Parameters.$host,
|
|
253
254
|
Parameters.resourceGroupName,
|
|
254
255
|
Parameters.accountName,
|
|
255
|
-
Parameters.subscriptionId
|
|
256
|
+
Parameters.subscriptionId,
|
|
257
|
+
Parameters.location
|
|
256
258
|
],
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
headerParameters: [Parameters.accept],
|
|
260
|
+
serializer
|
|
261
|
+
};
|
|
262
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
263
|
+
path:
|
|
264
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts",
|
|
265
|
+
httpMethod: "GET",
|
|
259
266
|
responses: {
|
|
260
|
-
200: {
|
|
261
|
-
|
|
262
|
-
|
|
267
|
+
200: {
|
|
268
|
+
bodyMapper: Mappers.AccountListResult
|
|
269
|
+
},
|
|
263
270
|
default: {
|
|
264
271
|
bodyMapper: Mappers.ErrorResponse
|
|
265
272
|
}
|
|
266
273
|
},
|
|
274
|
+
queryParameters: [Parameters.apiVersion],
|
|
275
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
276
|
+
headerParameters: [Parameters.accept],
|
|
267
277
|
serializer
|
|
268
278
|
};
|
|
269
|
-
|
|
270
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
271
|
-
httpMethod: "GET",
|
|
272
|
-
baseUrl: "https://management.azure.com",
|
|
279
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
273
280
|
path: "{nextLink}",
|
|
274
|
-
|
|
275
|
-
queryParameters: [Parameters.apiVersion],
|
|
276
|
-
headerParameters: [Parameters.acceptLanguage],
|
|
281
|
+
httpMethod: "GET",
|
|
277
282
|
responses: {
|
|
278
283
|
200: {
|
|
279
284
|
bodyMapper: Mappers.AccountListResult
|
|
@@ -282,5 +287,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
282
287
|
bodyMapper: Mappers.ErrorResponse
|
|
283
288
|
}
|
|
284
289
|
},
|
|
290
|
+
queryParameters: [Parameters.apiVersion],
|
|
291
|
+
urlParameters: [
|
|
292
|
+
Parameters.$host,
|
|
293
|
+
Parameters.subscriptionId,
|
|
294
|
+
Parameters.nextLink
|
|
295
|
+
],
|
|
296
|
+
headerParameters: [Parameters.accept],
|
|
285
297
|
serializer
|
|
286
298
|
};
|