@azure/arm-cognitiveservices 5.2.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} +2 -2
- package/README.md +72 -77
- 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 +1474 -738
- 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 +4 -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/dist-esm/src/operationsInterfaces/accounts.js +9 -0
- 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/dist-esm/src/operationsInterfaces/commitmentPlans.js +9 -0
- 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/dist-esm/src/operationsInterfaces/commitmentTiers.js +9 -0
- 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/dist-esm/src/operationsInterfaces/deletedAccounts.js +9 -0
- 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 -21
- package/review/arm-cognitiveservices.api.md +1150 -0
- package/rollup.config.js +181 -30
- package/src/cognitiveServicesManagementClient.ts +163 -142
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1223 -1103
- package/src/models/mappers.ts +1513 -736
- package/src/models/parameters.ts +162 -47
- package/src/operations/accounts.ts +610 -495
- package/src/operations/commitmentPlans.ts +394 -0
- package/src/operations/commitmentTiers.ts +158 -0
- package/src/operations/deletedAccounts.ts +298 -0
- package/src/operations/deployments.ts +464 -0
- package/src/operations/index.ts +7 -5
- package/src/operations/operations.ts +91 -77
- package/src/operations/privateEndpointConnections.ts +281 -134
- package/src/operations/privateLinkResources.ts +40 -55
- package/src/operations/resourceSkus.ts +96 -80
- 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} +8 -6
- 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 -2719
- 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 -70
- package/esm/cognitiveServicesManagementClient.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClient.js +0 -116
- package/esm/cognitiveServicesManagementClient.js.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.d.ts +0 -16
- package/esm/cognitiveServicesManagementClientContext.d.ts.map +0 -1
- package/esm/cognitiveServicesManagementClientContext.js +0 -56
- 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/index.d.ts +0 -1277
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -50
- 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 +0 -9
- 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 -119
- 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 -260
- package/esm/operations/accounts.d.ts.map +0 -1
- package/esm/operations/accounts.js +0 -411
- package/esm/operations/accounts.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 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -99
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -131
- 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 -58
- 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 -80
- package/esm/operations/resourceSkus.js.map +0 -1
- package/src/cognitiveServicesManagementClientContext.ts +0 -62
- package/src/models/accountsMappers.ts +0 -44
- package/src/models/operationsMappers.ts +0 -14
- package/src/models/privateEndpointConnectionsMappers.ts +0 -35
- package/src/models/privateLinkResourcesMappers.ts +0 -36
- package/src/models/resourceSkusMappers.ts +0 -15
|
@@ -0,0 +1,298 @@
|
|
|
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 { DeletedAccounts } 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 { 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";
|
|
27
|
+
|
|
28
|
+
/// <reference lib="esnext.asynciterable" />
|
|
29
|
+
/** Class containing DeletedAccounts operations. */
|
|
30
|
+
export class DeletedAccountsImpl implements DeletedAccounts {
|
|
31
|
+
private readonly client: CognitiveServicesManagementClient;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Initialize a new instance of the class DeletedAccounts class.
|
|
35
|
+
* @param client Reference to the service client
|
|
36
|
+
*/
|
|
37
|
+
constructor(client: CognitiveServicesManagementClient) {
|
|
38
|
+
this.client = client;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
43
|
+
* @param options The options parameters.
|
|
44
|
+
*/
|
|
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
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns a Cognitive Services account specified by the parameters.
|
|
85
|
+
* @param location Resource location.
|
|
86
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
87
|
+
* @param accountName The name of Cognitive Services account.
|
|
88
|
+
* @param options The options parameters.
|
|
89
|
+
*/
|
|
90
|
+
get(
|
|
91
|
+
location: string,
|
|
92
|
+
resourceGroupName: string,
|
|
93
|
+
accountName: string,
|
|
94
|
+
options?: DeletedAccountsGetOptionalParams
|
|
95
|
+
): Promise<DeletedAccountsGetResponse> {
|
|
96
|
+
return this.client.sendOperationRequest(
|
|
97
|
+
{ location, resourceGroupName, accountName, options },
|
|
98
|
+
getOperationSpec
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
104
|
+
* @param location Resource location.
|
|
105
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
106
|
+
* @param accountName The name of Cognitive Services account.
|
|
107
|
+
* @param options The options parameters.
|
|
108
|
+
*/
|
|
109
|
+
async beginPurge(
|
|
110
|
+
location: string,
|
|
111
|
+
resourceGroupName: string,
|
|
112
|
+
accountName: string,
|
|
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
|
+
};
|
|
153
|
+
|
|
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
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Deletes a Cognitive Services account from the resource group.
|
|
167
|
+
* @param location Resource location.
|
|
168
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
169
|
+
* @param accountName The name of Cognitive Services account.
|
|
170
|
+
* @param options The options parameters.
|
|
171
|
+
*/
|
|
172
|
+
async beginPurgeAndWait(
|
|
173
|
+
location: string,
|
|
174
|
+
resourceGroupName: string,
|
|
175
|
+
accountName: string,
|
|
176
|
+
options?: DeletedAccountsPurgeOptionalParams
|
|
177
|
+
): Promise<void> {
|
|
178
|
+
const poller = await this.beginPurge(
|
|
179
|
+
location,
|
|
180
|
+
resourceGroupName,
|
|
181
|
+
accountName,
|
|
182
|
+
options
|
|
183
|
+
);
|
|
184
|
+
return poller.pollUntilDone();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Returns all the resources of a particular type belonging to a subscription.
|
|
189
|
+
* @param options The options parameters.
|
|
190
|
+
*/
|
|
191
|
+
private _list(
|
|
192
|
+
options?: DeletedAccountsListOptionalParams
|
|
193
|
+
): Promise<DeletedAccountsListResponse> {
|
|
194
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* ListNext
|
|
199
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
200
|
+
* @param options The options parameters.
|
|
201
|
+
*/
|
|
202
|
+
private _listNext(
|
|
203
|
+
nextLink: string,
|
|
204
|
+
options?: DeletedAccountsListNextOptionalParams
|
|
205
|
+
): Promise<DeletedAccountsListNextResponse> {
|
|
206
|
+
return this.client.sendOperationRequest(
|
|
207
|
+
{ nextLink, options },
|
|
208
|
+
listNextOperationSpec
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Operation Specifications
|
|
213
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
214
|
+
|
|
215
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
216
|
+
path:
|
|
217
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
218
|
+
httpMethod: "GET",
|
|
219
|
+
responses: {
|
|
220
|
+
200: {
|
|
221
|
+
bodyMapper: Mappers.Account
|
|
222
|
+
},
|
|
223
|
+
default: {
|
|
224
|
+
bodyMapper: Mappers.ErrorResponse
|
|
225
|
+
}
|
|
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],
|
|
236
|
+
serializer
|
|
237
|
+
};
|
|
238
|
+
const purgeOperationSpec: coreClient.OperationSpec = {
|
|
239
|
+
path:
|
|
240
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
|
|
241
|
+
httpMethod: "DELETE",
|
|
242
|
+
responses: {
|
|
243
|
+
200: {},
|
|
244
|
+
201: {},
|
|
245
|
+
202: {},
|
|
246
|
+
204: {},
|
|
247
|
+
default: {
|
|
248
|
+
bodyMapper: Mappers.ErrorResponse
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
queryParameters: [Parameters.apiVersion],
|
|
252
|
+
urlParameters: [
|
|
253
|
+
Parameters.$host,
|
|
254
|
+
Parameters.resourceGroupName,
|
|
255
|
+
Parameters.accountName,
|
|
256
|
+
Parameters.subscriptionId,
|
|
257
|
+
Parameters.location
|
|
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",
|
|
266
|
+
responses: {
|
|
267
|
+
200: {
|
|
268
|
+
bodyMapper: Mappers.AccountListResult
|
|
269
|
+
},
|
|
270
|
+
default: {
|
|
271
|
+
bodyMapper: Mappers.ErrorResponse
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
queryParameters: [Parameters.apiVersion],
|
|
275
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
276
|
+
headerParameters: [Parameters.accept],
|
|
277
|
+
serializer
|
|
278
|
+
};
|
|
279
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
280
|
+
path: "{nextLink}",
|
|
281
|
+
httpMethod: "GET",
|
|
282
|
+
responses: {
|
|
283
|
+
200: {
|
|
284
|
+
bodyMapper: Mappers.AccountListResult
|
|
285
|
+
},
|
|
286
|
+
default: {
|
|
287
|
+
bodyMapper: Mappers.ErrorResponse
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
queryParameters: [Parameters.apiVersion],
|
|
291
|
+
urlParameters: [
|
|
292
|
+
Parameters.$host,
|
|
293
|
+
Parameters.subscriptionId,
|
|
294
|
+
Parameters.nextLink
|
|
295
|
+
],
|
|
296
|
+
headerParameters: [Parameters.accept],
|
|
297
|
+
serializer
|
|
298
|
+
};
|