@azure/arm-cognitiveservices 7.7.0-alpha.20250717.1 → 7.7.0-alpha.20250718.2
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/dist/browser/cognitiveServicesManagementClient.js +40 -8
- package/dist/browser/cognitiveServicesManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +286 -125
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/accountCapabilityHosts.js +23 -12
- package/dist/browser/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/browser/operations/accountConnection.js +23 -40
- package/dist/browser/operations/accountConnection.js.map +1 -1
- package/dist/browser/operations/accounts.js +101 -137
- package/dist/browser/operations/accounts.js.map +1 -1
- package/dist/browser/operations/commitmentPlans.js +155 -193
- package/dist/browser/operations/commitmentPlans.js.map +1 -1
- package/dist/browser/operations/commitmentTiers.js +23 -40
- package/dist/browser/operations/commitmentTiers.js.map +1 -1
- package/dist/browser/operations/defenderForAISettings.js +23 -40
- package/dist/browser/operations/defenderForAISettings.js.map +1 -1
- package/dist/browser/operations/deletedAccounts.js +34 -46
- package/dist/browser/operations/deletedAccounts.js.map +1 -1
- package/dist/browser/operations/deployments.js +78 -97
- package/dist/browser/operations/deployments.js.map +1 -1
- package/dist/browser/operations/encryptionScopes.js +34 -46
- package/dist/browser/operations/encryptionScopes.js.map +1 -1
- package/dist/browser/operations/locationBasedModelCapacities.js +23 -40
- package/dist/browser/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/browser/operations/modelCapacities.js +23 -40
- package/dist/browser/operations/modelCapacities.js.map +1 -1
- package/dist/browser/operations/models.js +23 -40
- package/dist/browser/operations/models.js.map +1 -1
- package/dist/browser/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/browser/operations/networkSecurityPerimeterConfigurations.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/privateEndpointConnections.js +23 -12
- package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
- package/dist/browser/operations/privateLinkResources.js +1 -0
- package/dist/browser/operations/privateLinkResources.js.map +1 -1
- package/dist/browser/operations/projectCapabilityHosts.js +23 -12
- package/dist/browser/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/browser/operations/projectConnection.js +23 -40
- package/dist/browser/operations/projectConnection.js.map +1 -1
- package/dist/browser/operations/projects.js +56 -58
- package/dist/browser/operations/projects.js.map +1 -1
- package/dist/browser/operations/raiBlocklistItems.js +34 -46
- package/dist/browser/operations/raiBlocklistItems.js.map +1 -1
- package/dist/browser/operations/raiBlocklists.js +34 -46
- package/dist/browser/operations/raiBlocklists.js.map +1 -1
- package/dist/browser/operations/raiContentFilters.js +23 -40
- package/dist/browser/operations/raiContentFilters.js.map +1 -1
- package/dist/browser/operations/raiPolicies.js +34 -46
- package/dist/browser/operations/raiPolicies.js.map +1 -1
- package/dist/browser/operations/resourceSkus.js +23 -40
- package/dist/browser/operations/resourceSkus.js.map +1 -1
- package/dist/browser/operations/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/cognitiveServicesManagementClient.js +40 -8
- package/dist/commonjs/cognitiveServicesManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +286 -125
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/accountCapabilityHosts.js +23 -12
- package/dist/commonjs/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/commonjs/operations/accountConnection.js +23 -39
- package/dist/commonjs/operations/accountConnection.js.map +1 -1
- package/dist/commonjs/operations/accounts.js +101 -136
- package/dist/commonjs/operations/accounts.js.map +1 -1
- package/dist/commonjs/operations/commitmentPlans.js +155 -192
- package/dist/commonjs/operations/commitmentPlans.js.map +1 -1
- package/dist/commonjs/operations/commitmentTiers.js +23 -39
- package/dist/commonjs/operations/commitmentTiers.js.map +1 -1
- package/dist/commonjs/operations/defenderForAISettings.js +23 -39
- package/dist/commonjs/operations/defenderForAISettings.js.map +1 -1
- package/dist/commonjs/operations/deletedAccounts.js +34 -45
- package/dist/commonjs/operations/deletedAccounts.js.map +1 -1
- package/dist/commonjs/operations/deployments.js +78 -96
- package/dist/commonjs/operations/deployments.js.map +1 -1
- package/dist/commonjs/operations/encryptionScopes.js +34 -45
- package/dist/commonjs/operations/encryptionScopes.js.map +1 -1
- package/dist/commonjs/operations/locationBasedModelCapacities.js +23 -39
- package/dist/commonjs/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/commonjs/operations/modelCapacities.js +23 -39
- package/dist/commonjs/operations/modelCapacities.js.map +1 -1
- package/dist/commonjs/operations/models.js +23 -39
- package/dist/commonjs/operations/models.js.map +1 -1
- package/dist/commonjs/operations/networkSecurityPerimeterConfigurations.js +34 -45
- package/dist/commonjs/operations/networkSecurityPerimeterConfigurations.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/privateEndpointConnections.js +23 -12
- package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
- package/dist/commonjs/operations/privateLinkResources.js +1 -0
- package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
- package/dist/commonjs/operations/projectCapabilityHosts.js +23 -12
- package/dist/commonjs/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/commonjs/operations/projectConnection.js +23 -39
- package/dist/commonjs/operations/projectConnection.js.map +1 -1
- package/dist/commonjs/operations/projects.js +56 -57
- package/dist/commonjs/operations/projects.js.map +1 -1
- package/dist/commonjs/operations/raiBlocklistItems.js +34 -45
- package/dist/commonjs/operations/raiBlocklistItems.js.map +1 -1
- package/dist/commonjs/operations/raiBlocklists.js +34 -45
- package/dist/commonjs/operations/raiBlocklists.js.map +1 -1
- package/dist/commonjs/operations/raiContentFilters.js +23 -39
- package/dist/commonjs/operations/raiContentFilters.js.map +1 -1
- package/dist/commonjs/operations/raiPolicies.js +34 -45
- package/dist/commonjs/operations/raiPolicies.js.map +1 -1
- package/dist/commonjs/operations/resourceSkus.js +23 -39
- package/dist/commonjs/operations/resourceSkus.js.map +1 -1
- package/dist/commonjs/operations/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/cognitiveServicesManagementClient.js +40 -8
- package/dist/esm/cognitiveServicesManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +286 -125
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/accountCapabilityHosts.js +23 -12
- package/dist/esm/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/esm/operations/accountConnection.js +23 -40
- package/dist/esm/operations/accountConnection.js.map +1 -1
- package/dist/esm/operations/accounts.js +101 -137
- package/dist/esm/operations/accounts.js.map +1 -1
- package/dist/esm/operations/commitmentPlans.js +155 -193
- package/dist/esm/operations/commitmentPlans.js.map +1 -1
- package/dist/esm/operations/commitmentTiers.js +23 -40
- package/dist/esm/operations/commitmentTiers.js.map +1 -1
- package/dist/esm/operations/defenderForAISettings.js +23 -40
- package/dist/esm/operations/defenderForAISettings.js.map +1 -1
- package/dist/esm/operations/deletedAccounts.js +34 -46
- package/dist/esm/operations/deletedAccounts.js.map +1 -1
- package/dist/esm/operations/deployments.js +78 -97
- package/dist/esm/operations/deployments.js.map +1 -1
- package/dist/esm/operations/encryptionScopes.js +34 -46
- package/dist/esm/operations/encryptionScopes.js.map +1 -1
- package/dist/esm/operations/locationBasedModelCapacities.js +23 -40
- package/dist/esm/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/esm/operations/modelCapacities.js +23 -40
- package/dist/esm/operations/modelCapacities.js.map +1 -1
- package/dist/esm/operations/models.js +23 -40
- package/dist/esm/operations/models.js.map +1 -1
- package/dist/esm/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/esm/operations/networkSecurityPerimeterConfigurations.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/privateEndpointConnections.js +23 -12
- package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
- package/dist/esm/operations/privateLinkResources.js +1 -0
- package/dist/esm/operations/privateLinkResources.js.map +1 -1
- package/dist/esm/operations/projectCapabilityHosts.js +23 -12
- package/dist/esm/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/esm/operations/projectConnection.js +23 -40
- package/dist/esm/operations/projectConnection.js.map +1 -1
- package/dist/esm/operations/projects.js +56 -58
- package/dist/esm/operations/projects.js.map +1 -1
- package/dist/esm/operations/raiBlocklistItems.js +34 -46
- package/dist/esm/operations/raiBlocklistItems.js.map +1 -1
- package/dist/esm/operations/raiBlocklists.js +34 -46
- package/dist/esm/operations/raiBlocklists.js.map +1 -1
- package/dist/esm/operations/raiContentFilters.js +23 -40
- package/dist/esm/operations/raiContentFilters.js.map +1 -1
- package/dist/esm/operations/raiPolicies.js +34 -46
- package/dist/esm/operations/raiPolicies.js.map +1 -1
- package/dist/esm/operations/resourceSkus.js +23 -40
- package/dist/esm/operations/resourceSkus.js.map +1 -1
- package/dist/esm/operations/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/cognitiveServicesManagementClient.js +40 -8
- package/dist/react-native/cognitiveServicesManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +286 -125
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/accountCapabilityHosts.js +23 -12
- package/dist/react-native/operations/accountCapabilityHosts.js.map +1 -1
- package/dist/react-native/operations/accountConnection.js +23 -40
- package/dist/react-native/operations/accountConnection.js.map +1 -1
- package/dist/react-native/operations/accounts.js +101 -137
- package/dist/react-native/operations/accounts.js.map +1 -1
- package/dist/react-native/operations/commitmentPlans.js +155 -193
- package/dist/react-native/operations/commitmentPlans.js.map +1 -1
- package/dist/react-native/operations/commitmentTiers.js +23 -40
- package/dist/react-native/operations/commitmentTiers.js.map +1 -1
- package/dist/react-native/operations/defenderForAISettings.js +23 -40
- package/dist/react-native/operations/defenderForAISettings.js.map +1 -1
- package/dist/react-native/operations/deletedAccounts.js +34 -46
- package/dist/react-native/operations/deletedAccounts.js.map +1 -1
- package/dist/react-native/operations/deployments.js +78 -97
- package/dist/react-native/operations/deployments.js.map +1 -1
- package/dist/react-native/operations/encryptionScopes.js +34 -46
- package/dist/react-native/operations/encryptionScopes.js.map +1 -1
- package/dist/react-native/operations/locationBasedModelCapacities.js +23 -40
- package/dist/react-native/operations/locationBasedModelCapacities.js.map +1 -1
- package/dist/react-native/operations/modelCapacities.js +23 -40
- package/dist/react-native/operations/modelCapacities.js.map +1 -1
- package/dist/react-native/operations/models.js +23 -40
- package/dist/react-native/operations/models.js.map +1 -1
- package/dist/react-native/operations/networkSecurityPerimeterConfigurations.js +34 -46
- package/dist/react-native/operations/networkSecurityPerimeterConfigurations.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/privateEndpointConnections.js +23 -12
- package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
- package/dist/react-native/operations/privateLinkResources.js +1 -0
- package/dist/react-native/operations/privateLinkResources.js.map +1 -1
- package/dist/react-native/operations/projectCapabilityHosts.js +23 -12
- package/dist/react-native/operations/projectCapabilityHosts.js.map +1 -1
- package/dist/react-native/operations/projectConnection.js +23 -40
- package/dist/react-native/operations/projectConnection.js.map +1 -1
- package/dist/react-native/operations/projects.js +56 -58
- package/dist/react-native/operations/projects.js.map +1 -1
- package/dist/react-native/operations/raiBlocklistItems.js +34 -46
- package/dist/react-native/operations/raiBlocklistItems.js.map +1 -1
- package/dist/react-native/operations/raiBlocklists.js +34 -46
- package/dist/react-native/operations/raiBlocklists.js.map +1 -1
- package/dist/react-native/operations/raiContentFilters.js +23 -40
- package/dist/react-native/operations/raiContentFilters.js.map +1 -1
- package/dist/react-native/operations/raiPolicies.js +34 -46
- package/dist/react-native/operations/raiPolicies.js.map +1 -1
- package/dist/react-native/operations/resourceSkus.js +23 -40
- package/dist/react-native/operations/resourceSkus.js.map +1 -1
- package/dist/react-native/operations/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-cognitiveservices-node.api.md +3079 -3079
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing CommitmentPlans operations. */
|
|
17
16
|
export class CommitmentPlansImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class CommitmentPlans class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class CommitmentPlansImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listPagingPage(resourceGroupName, accountName, options, settings);
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listPagingPage(resourceGroupName, accountName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listPagingPage(resourceGroupName, accountName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(resourceGroupName, accountName, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(resourceGroupName, accountName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listPagingAll(resourceGroupName, accountName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, accountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listPagingAll(resourceGroupName, accountName, options) {
|
|
67
|
+
for await (const page of this.listPagingPage(resourceGroupName, accountName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Returns all the resources of a particular type belonging to a resource group
|
|
@@ -100,52 +83,35 @@ export class CommitmentPlansImpl {
|
|
|
100
83
|
return this;
|
|
101
84
|
},
|
|
102
85
|
byPage: (settings) => {
|
|
103
|
-
if (settings
|
|
86
|
+
if (settings?.maxPageSize) {
|
|
104
87
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
105
88
|
}
|
|
106
89
|
return this.listPlansByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
107
90
|
},
|
|
108
91
|
};
|
|
109
92
|
}
|
|
110
|
-
listPlansByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
});
|
|
93
|
+
async *listPlansByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
94
|
+
let result;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._listPlansByResourceGroup(resourceGroupName, options);
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
setContinuationToken(page, continuationToken);
|
|
101
|
+
yield page;
|
|
102
|
+
}
|
|
103
|
+
while (continuationToken) {
|
|
104
|
+
result = await this._listPlansByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
setContinuationToken(page, continuationToken);
|
|
108
|
+
yield page;
|
|
109
|
+
}
|
|
129
110
|
}
|
|
130
|
-
listPlansByResourceGroupPagingAll(resourceGroupName, options) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
for (var _d = true, _e = __asyncValues(this.listPlansByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
135
|
-
_c = _f.value;
|
|
136
|
-
_d = false;
|
|
137
|
-
const page = _c;
|
|
138
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
142
|
-
finally {
|
|
143
|
-
try {
|
|
144
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
145
|
-
}
|
|
146
|
-
finally { if (e_2) throw e_2.error; }
|
|
147
|
-
}
|
|
148
|
-
});
|
|
111
|
+
async *listPlansByResourceGroupPagingAll(resourceGroupName, options) {
|
|
112
|
+
for await (const page of this.listPlansByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
113
|
+
yield* page;
|
|
114
|
+
}
|
|
149
115
|
}
|
|
150
116
|
/**
|
|
151
117
|
* Returns all the resources of a particular type belonging to a subscription.
|
|
@@ -161,52 +127,35 @@ export class CommitmentPlansImpl {
|
|
|
161
127
|
return this;
|
|
162
128
|
},
|
|
163
129
|
byPage: (settings) => {
|
|
164
|
-
if (settings
|
|
130
|
+
if (settings?.maxPageSize) {
|
|
165
131
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
166
132
|
}
|
|
167
133
|
return this.listPlansBySubscriptionPagingPage(options, settings);
|
|
168
134
|
},
|
|
169
135
|
};
|
|
170
136
|
}
|
|
171
|
-
listPlansBySubscriptionPagingPage(options, settings) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
});
|
|
137
|
+
async *listPlansBySubscriptionPagingPage(options, settings) {
|
|
138
|
+
let result;
|
|
139
|
+
let continuationToken = settings?.continuationToken;
|
|
140
|
+
if (!continuationToken) {
|
|
141
|
+
result = await this._listPlansBySubscription(options);
|
|
142
|
+
let page = result.value || [];
|
|
143
|
+
continuationToken = result.nextLink;
|
|
144
|
+
setContinuationToken(page, continuationToken);
|
|
145
|
+
yield page;
|
|
146
|
+
}
|
|
147
|
+
while (continuationToken) {
|
|
148
|
+
result = await this._listPlansBySubscriptionNext(continuationToken, options);
|
|
149
|
+
continuationToken = result.nextLink;
|
|
150
|
+
let page = result.value || [];
|
|
151
|
+
setContinuationToken(page, continuationToken);
|
|
152
|
+
yield page;
|
|
153
|
+
}
|
|
190
154
|
}
|
|
191
|
-
listPlansBySubscriptionPagingAll(options) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
for (var _d = true, _e = __asyncValues(this.listPlansBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
196
|
-
_c = _f.value;
|
|
197
|
-
_d = false;
|
|
198
|
-
const page = _c;
|
|
199
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
203
|
-
finally {
|
|
204
|
-
try {
|
|
205
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
206
|
-
}
|
|
207
|
-
finally { if (e_3) throw e_3.error; }
|
|
208
|
-
}
|
|
209
|
-
});
|
|
155
|
+
async *listPlansBySubscriptionPagingAll(options) {
|
|
156
|
+
for await (const page of this.listPlansBySubscriptionPagingPage(options)) {
|
|
157
|
+
yield* page;
|
|
158
|
+
}
|
|
210
159
|
}
|
|
211
160
|
/**
|
|
212
161
|
* Gets the associations of the Cognitive Services commitment plan.
|
|
@@ -225,52 +174,35 @@ export class CommitmentPlansImpl {
|
|
|
225
174
|
return this;
|
|
226
175
|
},
|
|
227
176
|
byPage: (settings) => {
|
|
228
|
-
if (settings
|
|
177
|
+
if (settings?.maxPageSize) {
|
|
229
178
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
230
179
|
}
|
|
231
180
|
return this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings);
|
|
232
181
|
},
|
|
233
182
|
};
|
|
234
183
|
}
|
|
235
|
-
listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
});
|
|
184
|
+
async *listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings) {
|
|
185
|
+
let result;
|
|
186
|
+
let continuationToken = settings?.continuationToken;
|
|
187
|
+
if (!continuationToken) {
|
|
188
|
+
result = await this._listAssociations(resourceGroupName, commitmentPlanName, options);
|
|
189
|
+
let page = result.value || [];
|
|
190
|
+
continuationToken = result.nextLink;
|
|
191
|
+
setContinuationToken(page, continuationToken);
|
|
192
|
+
yield page;
|
|
193
|
+
}
|
|
194
|
+
while (continuationToken) {
|
|
195
|
+
result = await this._listAssociationsNext(resourceGroupName, commitmentPlanName, continuationToken, options);
|
|
196
|
+
continuationToken = result.nextLink;
|
|
197
|
+
let page = result.value || [];
|
|
198
|
+
setContinuationToken(page, continuationToken);
|
|
199
|
+
yield page;
|
|
200
|
+
}
|
|
254
201
|
}
|
|
255
|
-
listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
for (var _d = true, _e = __asyncValues(this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
260
|
-
_c = _f.value;
|
|
261
|
-
_d = false;
|
|
262
|
-
const page = _c;
|
|
263
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
267
|
-
finally {
|
|
268
|
-
try {
|
|
269
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
270
|
-
}
|
|
271
|
-
finally { if (e_4) throw e_4.error; }
|
|
272
|
-
}
|
|
273
|
-
});
|
|
202
|
+
async *listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options) {
|
|
203
|
+
for await (const page of this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options)) {
|
|
204
|
+
yield* page;
|
|
205
|
+
}
|
|
274
206
|
}
|
|
275
207
|
/**
|
|
276
208
|
* Gets the commitmentPlans associated with the Cognitive Services account.
|
|
@@ -323,14 +255,19 @@ export class CommitmentPlansImpl {
|
|
|
323
255
|
return this.client.sendOperationRequest(args, spec);
|
|
324
256
|
};
|
|
325
257
|
const sendOperationFn = async (args, spec) => {
|
|
326
|
-
var _a;
|
|
327
258
|
let currentRawResponse = undefined;
|
|
328
|
-
const providedCallback =
|
|
259
|
+
const providedCallback = args.options?.onResponse;
|
|
329
260
|
const callback = (rawResponse, flatResponse) => {
|
|
330
261
|
currentRawResponse = rawResponse;
|
|
331
|
-
providedCallback
|
|
262
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
263
|
+
};
|
|
264
|
+
const updatedArgs = {
|
|
265
|
+
...args,
|
|
266
|
+
options: {
|
|
267
|
+
...args.options,
|
|
268
|
+
onResponse: callback,
|
|
269
|
+
},
|
|
332
270
|
};
|
|
333
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
334
271
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
335
272
|
return {
|
|
336
273
|
flatResponse,
|
|
@@ -347,8 +284,8 @@ export class CommitmentPlansImpl {
|
|
|
347
284
|
spec: deleteOperationSpec,
|
|
348
285
|
});
|
|
349
286
|
const poller = await createHttpPoller(lro, {
|
|
350
|
-
restoreFrom: options
|
|
351
|
-
intervalInMs: options
|
|
287
|
+
restoreFrom: options?.resumeFrom,
|
|
288
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
352
289
|
});
|
|
353
290
|
await poller.poll();
|
|
354
291
|
return poller;
|
|
@@ -378,14 +315,19 @@ export class CommitmentPlansImpl {
|
|
|
378
315
|
return this.client.sendOperationRequest(args, spec);
|
|
379
316
|
};
|
|
380
317
|
const sendOperationFn = async (args, spec) => {
|
|
381
|
-
var _a;
|
|
382
318
|
let currentRawResponse = undefined;
|
|
383
|
-
const providedCallback =
|
|
319
|
+
const providedCallback = args.options?.onResponse;
|
|
384
320
|
const callback = (rawResponse, flatResponse) => {
|
|
385
321
|
currentRawResponse = rawResponse;
|
|
386
|
-
providedCallback
|
|
322
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
323
|
+
};
|
|
324
|
+
const updatedArgs = {
|
|
325
|
+
...args,
|
|
326
|
+
options: {
|
|
327
|
+
...args.options,
|
|
328
|
+
onResponse: callback,
|
|
329
|
+
},
|
|
387
330
|
};
|
|
388
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
389
331
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
390
332
|
return {
|
|
391
333
|
flatResponse,
|
|
@@ -402,8 +344,8 @@ export class CommitmentPlansImpl {
|
|
|
402
344
|
spec: createOrUpdatePlanOperationSpec,
|
|
403
345
|
});
|
|
404
346
|
const poller = await createHttpPoller(lro, {
|
|
405
|
-
restoreFrom: options
|
|
406
|
-
intervalInMs: options
|
|
347
|
+
restoreFrom: options?.resumeFrom,
|
|
348
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
407
349
|
resourceLocationConfig: "azure-async-operation",
|
|
408
350
|
});
|
|
409
351
|
await poller.poll();
|
|
@@ -434,14 +376,19 @@ export class CommitmentPlansImpl {
|
|
|
434
376
|
return this.client.sendOperationRequest(args, spec);
|
|
435
377
|
};
|
|
436
378
|
const sendOperationFn = async (args, spec) => {
|
|
437
|
-
var _a;
|
|
438
379
|
let currentRawResponse = undefined;
|
|
439
|
-
const providedCallback =
|
|
380
|
+
const providedCallback = args.options?.onResponse;
|
|
440
381
|
const callback = (rawResponse, flatResponse) => {
|
|
441
382
|
currentRawResponse = rawResponse;
|
|
442
|
-
providedCallback
|
|
383
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
384
|
+
};
|
|
385
|
+
const updatedArgs = {
|
|
386
|
+
...args,
|
|
387
|
+
options: {
|
|
388
|
+
...args.options,
|
|
389
|
+
onResponse: callback,
|
|
390
|
+
},
|
|
443
391
|
};
|
|
444
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
445
392
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
446
393
|
return {
|
|
447
394
|
flatResponse,
|
|
@@ -458,8 +405,8 @@ export class CommitmentPlansImpl {
|
|
|
458
405
|
spec: updatePlanOperationSpec,
|
|
459
406
|
});
|
|
460
407
|
const poller = await createHttpPoller(lro, {
|
|
461
|
-
restoreFrom: options
|
|
462
|
-
intervalInMs: options
|
|
408
|
+
restoreFrom: options?.resumeFrom,
|
|
409
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
463
410
|
resourceLocationConfig: "location",
|
|
464
411
|
});
|
|
465
412
|
await poller.poll();
|
|
@@ -489,14 +436,19 @@ export class CommitmentPlansImpl {
|
|
|
489
436
|
return this.client.sendOperationRequest(args, spec);
|
|
490
437
|
};
|
|
491
438
|
const sendOperationFn = async (args, spec) => {
|
|
492
|
-
var _a;
|
|
493
439
|
let currentRawResponse = undefined;
|
|
494
|
-
const providedCallback =
|
|
440
|
+
const providedCallback = args.options?.onResponse;
|
|
495
441
|
const callback = (rawResponse, flatResponse) => {
|
|
496
442
|
currentRawResponse = rawResponse;
|
|
497
|
-
providedCallback
|
|
443
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
444
|
+
};
|
|
445
|
+
const updatedArgs = {
|
|
446
|
+
...args,
|
|
447
|
+
options: {
|
|
448
|
+
...args.options,
|
|
449
|
+
onResponse: callback,
|
|
450
|
+
},
|
|
498
451
|
};
|
|
499
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
500
452
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
501
453
|
return {
|
|
502
454
|
flatResponse,
|
|
@@ -513,8 +465,8 @@ export class CommitmentPlansImpl {
|
|
|
513
465
|
spec: deletePlanOperationSpec,
|
|
514
466
|
});
|
|
515
467
|
const poller = await createHttpPoller(lro, {
|
|
516
|
-
restoreFrom: options
|
|
517
|
-
intervalInMs: options
|
|
468
|
+
restoreFrom: options?.resumeFrom,
|
|
469
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
518
470
|
resourceLocationConfig: "location",
|
|
519
471
|
});
|
|
520
472
|
await poller.poll();
|
|
@@ -598,14 +550,19 @@ export class CommitmentPlansImpl {
|
|
|
598
550
|
return this.client.sendOperationRequest(args, spec);
|
|
599
551
|
};
|
|
600
552
|
const sendOperationFn = async (args, spec) => {
|
|
601
|
-
var _a;
|
|
602
553
|
let currentRawResponse = undefined;
|
|
603
|
-
const providedCallback =
|
|
554
|
+
const providedCallback = args.options?.onResponse;
|
|
604
555
|
const callback = (rawResponse, flatResponse) => {
|
|
605
556
|
currentRawResponse = rawResponse;
|
|
606
|
-
providedCallback
|
|
557
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
558
|
+
};
|
|
559
|
+
const updatedArgs = {
|
|
560
|
+
...args,
|
|
561
|
+
options: {
|
|
562
|
+
...args.options,
|
|
563
|
+
onResponse: callback,
|
|
564
|
+
},
|
|
607
565
|
};
|
|
608
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
609
566
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
610
567
|
return {
|
|
611
568
|
flatResponse,
|
|
@@ -628,8 +585,8 @@ export class CommitmentPlansImpl {
|
|
|
628
585
|
spec: createOrUpdateAssociationOperationSpec,
|
|
629
586
|
});
|
|
630
587
|
const poller = await createHttpPoller(lro, {
|
|
631
|
-
restoreFrom: options
|
|
632
|
-
intervalInMs: options
|
|
588
|
+
restoreFrom: options?.resumeFrom,
|
|
589
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
633
590
|
resourceLocationConfig: "azure-async-operation",
|
|
634
591
|
});
|
|
635
592
|
await poller.poll();
|
|
@@ -663,14 +620,19 @@ export class CommitmentPlansImpl {
|
|
|
663
620
|
return this.client.sendOperationRequest(args, spec);
|
|
664
621
|
};
|
|
665
622
|
const sendOperationFn = async (args, spec) => {
|
|
666
|
-
var _a;
|
|
667
623
|
let currentRawResponse = undefined;
|
|
668
|
-
const providedCallback =
|
|
624
|
+
const providedCallback = args.options?.onResponse;
|
|
669
625
|
const callback = (rawResponse, flatResponse) => {
|
|
670
626
|
currentRawResponse = rawResponse;
|
|
671
|
-
providedCallback
|
|
627
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
628
|
+
};
|
|
629
|
+
const updatedArgs = {
|
|
630
|
+
...args,
|
|
631
|
+
options: {
|
|
632
|
+
...args.options,
|
|
633
|
+
onResponse: callback,
|
|
634
|
+
},
|
|
672
635
|
};
|
|
673
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
674
636
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
675
637
|
return {
|
|
676
638
|
flatResponse,
|
|
@@ -692,8 +654,8 @@ export class CommitmentPlansImpl {
|
|
|
692
654
|
spec: deleteAssociationOperationSpec,
|
|
693
655
|
});
|
|
694
656
|
const poller = await createHttpPoller(lro, {
|
|
695
|
-
restoreFrom: options
|
|
696
|
-
intervalInMs: options
|
|
657
|
+
restoreFrom: options?.resumeFrom,
|
|
658
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
697
659
|
resourceLocationConfig: "location",
|
|
698
660
|
});
|
|
699
661
|
await poller.poll();
|