@azure/arm-cognitiveservices 7.3.1 → 7.4.0-alpha.20230217.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.
Files changed (163) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1232 -42
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/accountsCreateSample.js +17 -8
  8. package/dist-esm/samples-dev/accountsCreateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/accountsDeleteSample.js +12 -4
  10. package/dist-esm/samples-dev/accountsDeleteSample.js.map +1 -1
  11. package/dist-esm/samples-dev/accountsGetSample.js +12 -4
  12. package/dist-esm/samples-dev/accountsGetSample.js.map +1 -1
  13. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +12 -4
  14. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js.map +1 -1
  15. package/dist-esm/samples-dev/accountsListKeysSample.js +12 -4
  16. package/dist-esm/samples-dev/accountsListKeysSample.js.map +1 -1
  17. package/dist-esm/samples-dev/accountsListModelsSample.js +11 -4
  18. package/dist-esm/samples-dev/accountsListModelsSample.js.map +1 -1
  19. package/dist-esm/samples-dev/accountsListSample.js +11 -3
  20. package/dist-esm/samples-dev/accountsListSample.js.map +1 -1
  21. package/dist-esm/samples-dev/accountsListSkusSample.js +12 -4
  22. package/dist-esm/samples-dev/accountsListSkusSample.js.map +1 -1
  23. package/dist-esm/samples-dev/accountsListUsagesSample.js +12 -4
  24. package/dist-esm/samples-dev/accountsListUsagesSample.js.map +1 -1
  25. package/dist-esm/samples-dev/accountsRegenerateKeySample.js +12 -4
  26. package/dist-esm/samples-dev/accountsRegenerateKeySample.js.map +1 -1
  27. package/dist-esm/samples-dev/accountsUpdateSample.js +12 -4
  28. package/dist-esm/samples-dev/accountsUpdateSample.js.map +1 -1
  29. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +11 -3
  30. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js.map +1 -1
  31. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +11 -3
  32. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js.map +1 -1
  33. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.d.ts +2 -0
  34. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js +43 -0
  36. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js.map +1 -0
  37. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.d.ts +2 -0
  38. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js +50 -0
  40. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js.map +1 -0
  41. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +11 -4
  42. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js.map +1 -1
  43. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js +40 -0
  46. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js.map +1 -0
  47. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js +39 -0
  50. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js.map +1 -0
  51. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +11 -4
  52. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js.map +1 -1
  53. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.d.ts +2 -0
  54. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.d.ts.map +1 -0
  55. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js +40 -0
  56. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js.map +1 -0
  57. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.d.ts +2 -0
  58. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.d.ts.map +1 -0
  59. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js +39 -0
  60. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js.map +1 -0
  61. package/dist-esm/samples-dev/commitmentPlansGetSample.js +11 -4
  62. package/dist-esm/samples-dev/commitmentPlansGetSample.js.map +1 -1
  63. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js +53 -0
  66. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js.map +1 -0
  67. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js +52 -0
  70. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js.map +1 -0
  71. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js +51 -0
  74. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js.map +1 -0
  75. package/dist-esm/samples-dev/commitmentPlansListSample.js +11 -4
  76. package/dist-esm/samples-dev/commitmentPlansListSample.js.map +1 -1
  77. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.d.ts +2 -0
  78. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.d.ts.map +1 -0
  79. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js +40 -0
  80. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js.map +1 -0
  81. package/dist-esm/samples-dev/commitmentTiersListSample.js +10 -3
  82. package/dist-esm/samples-dev/commitmentTiersListSample.js.map +1 -1
  83. package/dist-esm/samples-dev/deletedAccountsGetSample.js +12 -4
  84. package/dist-esm/samples-dev/deletedAccountsGetSample.js.map +1 -1
  85. package/dist-esm/samples-dev/deletedAccountsListSample.js +11 -3
  86. package/dist-esm/samples-dev/deletedAccountsListSample.js.map +1 -1
  87. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +12 -4
  88. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js.map +1 -1
  89. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +11 -4
  90. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js.map +1 -1
  91. package/dist-esm/samples-dev/deploymentsDeleteSample.js +11 -4
  92. package/dist-esm/samples-dev/deploymentsDeleteSample.js.map +1 -1
  93. package/dist-esm/samples-dev/deploymentsGetSample.js +11 -4
  94. package/dist-esm/samples-dev/deploymentsGetSample.js.map +1 -1
  95. package/dist-esm/samples-dev/deploymentsListSample.js +11 -4
  96. package/dist-esm/samples-dev/deploymentsListSample.js.map +1 -1
  97. package/dist-esm/samples-dev/operationsListSample.js +11 -3
  98. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  99. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +11 -4
  100. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js.map +1 -1
  101. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +11 -4
  102. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
  103. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +11 -4
  104. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
  105. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +11 -4
  106. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  107. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +11 -4
  108. package/dist-esm/samples-dev/privateLinkResourcesListSample.js.map +1 -1
  109. package/dist-esm/samples-dev/resourceSkusListSample.js +11 -3
  110. package/dist-esm/samples-dev/resourceSkusListSample.js.map +1 -1
  111. package/dist-esm/src/cognitiveServicesManagementClient.js +2 -2
  112. package/dist-esm/src/models/index.d.ts +248 -0
  113. package/dist-esm/src/models/index.d.ts.map +1 -1
  114. package/dist-esm/src/models/index.js +36 -0
  115. package/dist-esm/src/models/index.js.map +1 -1
  116. package/dist-esm/src/models/mappers.d.ts +10 -0
  117. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  118. package/dist-esm/src/models/mappers.js +259 -0
  119. package/dist-esm/src/models/mappers.js.map +1 -1
  120. package/dist-esm/src/models/parameters.d.ts +4 -0
  121. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  122. package/dist-esm/src/models/parameters.js +36 -2
  123. package/dist-esm/src/models/parameters.js.map +1 -1
  124. package/dist-esm/src/operations/accounts.js +0 -3
  125. package/dist-esm/src/operations/accounts.js.map +1 -1
  126. package/dist-esm/src/operations/commitmentPlans.d.ts +181 -1
  127. package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -1
  128. package/dist-esm/src/operations/commitmentPlans.js +864 -5
  129. package/dist-esm/src/operations/commitmentPlans.js.map +1 -1
  130. package/dist-esm/src/operations/commitmentTiers.js +0 -1
  131. package/dist-esm/src/operations/commitmentTiers.js.map +1 -1
  132. package/dist-esm/src/operations/deletedAccounts.js +0 -1
  133. package/dist-esm/src/operations/deletedAccounts.js.map +1 -1
  134. package/dist-esm/src/operations/deployments.js +0 -1
  135. package/dist-esm/src/operations/deployments.js.map +1 -1
  136. package/dist-esm/src/operations/operations.js +0 -1
  137. package/dist-esm/src/operations/operations.js.map +1 -1
  138. package/dist-esm/src/operations/resourceSkus.js +0 -1
  139. package/dist-esm/src/operations/resourceSkus.js.map +1 -1
  140. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +132 -1
  141. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -1
  142. package/dist-esm/src/pagingHelper.d.ts +4 -4
  143. package/dist-esm/src/pagingHelper.js +4 -4
  144. package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -1
  145. package/dist-esm/test/cognitiveservices_examples.js +19 -0
  146. package/dist-esm/test/cognitiveservices_examples.js.map +1 -1
  147. package/package.json +8 -7
  148. package/review/arm-cognitiveservices.api.md +220 -0
  149. package/src/cognitiveServicesManagementClient.ts +2 -2
  150. package/src/models/index.ts +287 -0
  151. package/src/models/mappers.ts +283 -0
  152. package/src/models/parameters.ts +42 -2
  153. package/src/operations/accounts.ts +0 -3
  154. package/src/operations/commitmentPlans.ts +1222 -47
  155. package/src/operations/commitmentTiers.ts +0 -1
  156. package/src/operations/deletedAccounts.ts +0 -1
  157. package/src/operations/deployments.ts +0 -1
  158. package/src/operations/operations.ts +0 -1
  159. package/src/operations/resourceSkus.ts +0 -1
  160. package/src/operationsInterfaces/commitmentPlans.ts +232 -1
  161. package/src/pagingHelper.ts +4 -4
  162. package/types/arm-cognitiveservices.d.ts +423 -4
  163. package/types/tsdoc-metadata.json +1 -1
@@ -83,6 +83,187 @@ export class CommitmentPlansImpl {
83
83
  }
84
84
  });
85
85
  }
86
+ /**
87
+ * Returns all the resources of a particular type belonging to a resource group
88
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
89
+ * @param options The options parameters.
90
+ */
91
+ listPlansByResourceGroup(resourceGroupName, options) {
92
+ const iter = this.listPlansByResourceGroupPagingAll(resourceGroupName, options);
93
+ return {
94
+ next() {
95
+ return iter.next();
96
+ },
97
+ [Symbol.asyncIterator]() {
98
+ return this;
99
+ },
100
+ byPage: (settings) => {
101
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
102
+ throw new Error("maxPageSize is not supported by this operation.");
103
+ }
104
+ return this.listPlansByResourceGroupPagingPage(resourceGroupName, options, settings);
105
+ }
106
+ };
107
+ }
108
+ listPlansByResourceGroupPagingPage(resourceGroupName, options, settings) {
109
+ return __asyncGenerator(this, arguments, function* listPlansByResourceGroupPagingPage_1() {
110
+ let result;
111
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
112
+ if (!continuationToken) {
113
+ result = yield __await(this._listPlansByResourceGroup(resourceGroupName, options));
114
+ let page = result.value || [];
115
+ continuationToken = result.nextLink;
116
+ setContinuationToken(page, continuationToken);
117
+ yield yield __await(page);
118
+ }
119
+ while (continuationToken) {
120
+ result = yield __await(this._listPlansByResourceGroupNext(resourceGroupName, continuationToken, options));
121
+ continuationToken = result.nextLink;
122
+ let page = result.value || [];
123
+ setContinuationToken(page, continuationToken);
124
+ yield yield __await(page);
125
+ }
126
+ });
127
+ }
128
+ listPlansByResourceGroupPagingAll(resourceGroupName, options) {
129
+ return __asyncGenerator(this, arguments, function* listPlansByResourceGroupPagingAll_1() {
130
+ var e_2, _a;
131
+ try {
132
+ for (var _b = __asyncValues(this.listPlansByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
133
+ const page = _c.value;
134
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
135
+ }
136
+ }
137
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
138
+ finally {
139
+ try {
140
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
141
+ }
142
+ finally { if (e_2) throw e_2.error; }
143
+ }
144
+ });
145
+ }
146
+ /**
147
+ * Returns all the resources of a particular type belonging to a subscription.
148
+ * @param options The options parameters.
149
+ */
150
+ listPlansBySubscription(options) {
151
+ const iter = this.listPlansBySubscriptionPagingAll(options);
152
+ return {
153
+ next() {
154
+ return iter.next();
155
+ },
156
+ [Symbol.asyncIterator]() {
157
+ return this;
158
+ },
159
+ byPage: (settings) => {
160
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
161
+ throw new Error("maxPageSize is not supported by this operation.");
162
+ }
163
+ return this.listPlansBySubscriptionPagingPage(options, settings);
164
+ }
165
+ };
166
+ }
167
+ listPlansBySubscriptionPagingPage(options, settings) {
168
+ return __asyncGenerator(this, arguments, function* listPlansBySubscriptionPagingPage_1() {
169
+ let result;
170
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
171
+ if (!continuationToken) {
172
+ result = yield __await(this._listPlansBySubscription(options));
173
+ let page = result.value || [];
174
+ continuationToken = result.nextLink;
175
+ setContinuationToken(page, continuationToken);
176
+ yield yield __await(page);
177
+ }
178
+ while (continuationToken) {
179
+ result = yield __await(this._listPlansBySubscriptionNext(continuationToken, options));
180
+ continuationToken = result.nextLink;
181
+ let page = result.value || [];
182
+ setContinuationToken(page, continuationToken);
183
+ yield yield __await(page);
184
+ }
185
+ });
186
+ }
187
+ listPlansBySubscriptionPagingAll(options) {
188
+ return __asyncGenerator(this, arguments, function* listPlansBySubscriptionPagingAll_1() {
189
+ var e_3, _a;
190
+ try {
191
+ for (var _b = __asyncValues(this.listPlansBySubscriptionPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
192
+ const page = _c.value;
193
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
194
+ }
195
+ }
196
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
197
+ finally {
198
+ try {
199
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
200
+ }
201
+ finally { if (e_3) throw e_3.error; }
202
+ }
203
+ });
204
+ }
205
+ /**
206
+ * Gets the associations of the Cognitive Services commitment plan.
207
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
208
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
209
+ * Account
210
+ * @param options The options parameters.
211
+ */
212
+ listAssociations(resourceGroupName, commitmentPlanName, options) {
213
+ const iter = this.listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options);
214
+ return {
215
+ next() {
216
+ return iter.next();
217
+ },
218
+ [Symbol.asyncIterator]() {
219
+ return this;
220
+ },
221
+ byPage: (settings) => {
222
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
223
+ throw new Error("maxPageSize is not supported by this operation.");
224
+ }
225
+ return this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings);
226
+ }
227
+ };
228
+ }
229
+ listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings) {
230
+ return __asyncGenerator(this, arguments, function* listAssociationsPagingPage_1() {
231
+ let result;
232
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
233
+ if (!continuationToken) {
234
+ result = yield __await(this._listAssociations(resourceGroupName, commitmentPlanName, options));
235
+ let page = result.value || [];
236
+ continuationToken = result.nextLink;
237
+ setContinuationToken(page, continuationToken);
238
+ yield yield __await(page);
239
+ }
240
+ while (continuationToken) {
241
+ result = yield __await(this._listAssociationsNext(resourceGroupName, commitmentPlanName, continuationToken, options));
242
+ continuationToken = result.nextLink;
243
+ let page = result.value || [];
244
+ setContinuationToken(page, continuationToken);
245
+ yield yield __await(page);
246
+ }
247
+ });
248
+ }
249
+ listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options) {
250
+ return __asyncGenerator(this, arguments, function* listAssociationsPagingAll_1() {
251
+ var e_4, _a;
252
+ try {
253
+ for (var _b = __asyncValues(this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
254
+ const page = _c.value;
255
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
256
+ }
257
+ }
258
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
259
+ finally {
260
+ try {
261
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
262
+ }
263
+ finally { if (e_4) throw e_4.error; }
264
+ }
265
+ });
266
+ }
86
267
  /**
87
268
  * Gets the commitmentPlans associated with the Cognitive Services account.
88
269
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -176,15 +357,392 @@ export class CommitmentPlansImpl {
176
357
  return poller.pollUntilDone();
177
358
  });
178
359
  }
360
+ /**
361
+ * Create Cognitive Services commitment plan.
362
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
363
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
364
+ * Account
365
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
366
+ * @param options The options parameters.
367
+ */
368
+ beginCreateOrUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
369
+ return __awaiter(this, void 0, void 0, function* () {
370
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
371
+ return this.client.sendOperationRequest(args, spec);
372
+ });
373
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
374
+ var _a;
375
+ let currentRawResponse = undefined;
376
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
377
+ const callback = (rawResponse, flatResponse) => {
378
+ currentRawResponse = rawResponse;
379
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
380
+ };
381
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
382
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
383
+ return {
384
+ flatResponse,
385
+ rawResponse: {
386
+ statusCode: currentRawResponse.status,
387
+ body: currentRawResponse.parsedBody,
388
+ headers: currentRawResponse.headers.toJSON()
389
+ }
390
+ };
391
+ });
392
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, commitmentPlan, options }, createOrUpdatePlanOperationSpec);
393
+ const poller = new LroEngine(lro, {
394
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
395
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
396
+ lroResourceLocationConfig: "azure-async-operation"
397
+ });
398
+ yield poller.poll();
399
+ return poller;
400
+ });
401
+ }
402
+ /**
403
+ * Create Cognitive Services commitment plan.
404
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
405
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
406
+ * Account
407
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
408
+ * @param options The options parameters.
409
+ */
410
+ beginCreateOrUpdatePlanAndWait(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ const poller = yield this.beginCreateOrUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options);
413
+ return poller.pollUntilDone();
414
+ });
415
+ }
416
+ /**
417
+ * Create Cognitive Services commitment plan.
418
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
419
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
420
+ * Account
421
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
422
+ * @param options The options parameters.
423
+ */
424
+ beginUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
425
+ return __awaiter(this, void 0, void 0, function* () {
426
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
427
+ return this.client.sendOperationRequest(args, spec);
428
+ });
429
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
430
+ var _a;
431
+ let currentRawResponse = undefined;
432
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
433
+ const callback = (rawResponse, flatResponse) => {
434
+ currentRawResponse = rawResponse;
435
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
436
+ };
437
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
438
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
439
+ return {
440
+ flatResponse,
441
+ rawResponse: {
442
+ statusCode: currentRawResponse.status,
443
+ body: currentRawResponse.parsedBody,
444
+ headers: currentRawResponse.headers.toJSON()
445
+ }
446
+ };
447
+ });
448
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, commitmentPlan, options }, updatePlanOperationSpec);
449
+ const poller = new LroEngine(lro, {
450
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
451
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
452
+ lroResourceLocationConfig: "location"
453
+ });
454
+ yield poller.poll();
455
+ return poller;
456
+ });
457
+ }
458
+ /**
459
+ * Create Cognitive Services commitment plan.
460
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
461
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
462
+ * Account
463
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
464
+ * @param options The options parameters.
465
+ */
466
+ beginUpdatePlanAndWait(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
467
+ return __awaiter(this, void 0, void 0, function* () {
468
+ const poller = yield this.beginUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options);
469
+ return poller.pollUntilDone();
470
+ });
471
+ }
472
+ /**
473
+ * Deletes a Cognitive Services commitment plan from the resource group.
474
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
475
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
476
+ * Account
477
+ * @param options The options parameters.
478
+ */
479
+ beginDeletePlan(resourceGroupName, commitmentPlanName, options) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
482
+ return this.client.sendOperationRequest(args, spec);
483
+ });
484
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
485
+ var _a;
486
+ let currentRawResponse = undefined;
487
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
488
+ const callback = (rawResponse, flatResponse) => {
489
+ currentRawResponse = rawResponse;
490
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
491
+ };
492
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
493
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
494
+ return {
495
+ flatResponse,
496
+ rawResponse: {
497
+ statusCode: currentRawResponse.status,
498
+ body: currentRawResponse.parsedBody,
499
+ headers: currentRawResponse.headers.toJSON()
500
+ }
501
+ };
502
+ });
503
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, options }, deletePlanOperationSpec);
504
+ const poller = new LroEngine(lro, {
505
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
506
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
507
+ lroResourceLocationConfig: "location"
508
+ });
509
+ yield poller.poll();
510
+ return poller;
511
+ });
512
+ }
513
+ /**
514
+ * Deletes a Cognitive Services commitment plan from the resource group.
515
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
516
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
517
+ * Account
518
+ * @param options The options parameters.
519
+ */
520
+ beginDeletePlanAndWait(resourceGroupName, commitmentPlanName, options) {
521
+ return __awaiter(this, void 0, void 0, function* () {
522
+ const poller = yield this.beginDeletePlan(resourceGroupName, commitmentPlanName, options);
523
+ return poller.pollUntilDone();
524
+ });
525
+ }
526
+ /**
527
+ * Returns a Cognitive Services commitment plan specified by the parameters.
528
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
529
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
530
+ * Account
531
+ * @param options The options parameters.
532
+ */
533
+ getPlan(resourceGroupName, commitmentPlanName, options) {
534
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, getPlanOperationSpec);
535
+ }
536
+ /**
537
+ * Returns all the resources of a particular type belonging to a resource group
538
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
539
+ * @param options The options parameters.
540
+ */
541
+ _listPlansByResourceGroup(resourceGroupName, options) {
542
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listPlansByResourceGroupOperationSpec);
543
+ }
544
+ /**
545
+ * Returns all the resources of a particular type belonging to a subscription.
546
+ * @param options The options parameters.
547
+ */
548
+ _listPlansBySubscription(options) {
549
+ return this.client.sendOperationRequest({ options }, listPlansBySubscriptionOperationSpec);
550
+ }
551
+ /**
552
+ * Gets the associations of the Cognitive Services commitment plan.
553
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
554
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
555
+ * Account
556
+ * @param options The options parameters.
557
+ */
558
+ _listAssociations(resourceGroupName, commitmentPlanName, options) {
559
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, listAssociationsOperationSpec);
560
+ }
561
+ /**
562
+ * Gets the association of the Cognitive Services commitment plan.
563
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
564
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
565
+ * Account
566
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
567
+ * Services Account
568
+ * @param options The options parameters.
569
+ */
570
+ getAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
571
+ return this.client.sendOperationRequest({
572
+ resourceGroupName,
573
+ commitmentPlanName,
574
+ commitmentPlanAssociationName,
575
+ options
576
+ }, getAssociationOperationSpec);
577
+ }
578
+ /**
579
+ * Create or update the association of the Cognitive Services commitment plan.
580
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
581
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
582
+ * Account
583
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
584
+ * Services Account
585
+ * @param association The commitmentPlan properties.
586
+ * @param options The options parameters.
587
+ */
588
+ beginCreateOrUpdateAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options) {
589
+ return __awaiter(this, void 0, void 0, function* () {
590
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
591
+ return this.client.sendOperationRequest(args, spec);
592
+ });
593
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
594
+ var _a;
595
+ let currentRawResponse = undefined;
596
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
597
+ const callback = (rawResponse, flatResponse) => {
598
+ currentRawResponse = rawResponse;
599
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
600
+ };
601
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
602
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
603
+ return {
604
+ flatResponse,
605
+ rawResponse: {
606
+ statusCode: currentRawResponse.status,
607
+ body: currentRawResponse.parsedBody,
608
+ headers: currentRawResponse.headers.toJSON()
609
+ }
610
+ };
611
+ });
612
+ const lro = new LroImpl(sendOperation, {
613
+ resourceGroupName,
614
+ commitmentPlanName,
615
+ commitmentPlanAssociationName,
616
+ association,
617
+ options
618
+ }, createOrUpdateAssociationOperationSpec);
619
+ const poller = new LroEngine(lro, {
620
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
621
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
622
+ lroResourceLocationConfig: "azure-async-operation"
623
+ });
624
+ yield poller.poll();
625
+ return poller;
626
+ });
627
+ }
628
+ /**
629
+ * Create or update the association of the Cognitive Services commitment plan.
630
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
631
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
632
+ * Account
633
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
634
+ * Services Account
635
+ * @param association The commitmentPlan properties.
636
+ * @param options The options parameters.
637
+ */
638
+ beginCreateOrUpdateAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options) {
639
+ return __awaiter(this, void 0, void 0, function* () {
640
+ const poller = yield this.beginCreateOrUpdateAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options);
641
+ return poller.pollUntilDone();
642
+ });
643
+ }
644
+ /**
645
+ * Deletes the association of the Cognitive Services commitment plan.
646
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
647
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
648
+ * Account
649
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
650
+ * Services Account
651
+ * @param options The options parameters.
652
+ */
653
+ beginDeleteAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
654
+ return __awaiter(this, void 0, void 0, function* () {
655
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
656
+ return this.client.sendOperationRequest(args, spec);
657
+ });
658
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
659
+ var _a;
660
+ let currentRawResponse = undefined;
661
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
662
+ const callback = (rawResponse, flatResponse) => {
663
+ currentRawResponse = rawResponse;
664
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
665
+ };
666
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
667
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
668
+ return {
669
+ flatResponse,
670
+ rawResponse: {
671
+ statusCode: currentRawResponse.status,
672
+ body: currentRawResponse.parsedBody,
673
+ headers: currentRawResponse.headers.toJSON()
674
+ }
675
+ };
676
+ });
677
+ const lro = new LroImpl(sendOperation, {
678
+ resourceGroupName,
679
+ commitmentPlanName,
680
+ commitmentPlanAssociationName,
681
+ options
682
+ }, deleteAssociationOperationSpec);
683
+ const poller = new LroEngine(lro, {
684
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
685
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
686
+ lroResourceLocationConfig: "location"
687
+ });
688
+ yield poller.poll();
689
+ return poller;
690
+ });
691
+ }
692
+ /**
693
+ * Deletes the association of the Cognitive Services commitment plan.
694
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
695
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
696
+ * Account
697
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
698
+ * Services Account
699
+ * @param options The options parameters.
700
+ */
701
+ beginDeleteAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
702
+ return __awaiter(this, void 0, void 0, function* () {
703
+ const poller = yield this.beginDeleteAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options);
704
+ return poller.pollUntilDone();
705
+ });
706
+ }
179
707
  /**
180
708
  * ListNext
181
709
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
182
- * @param accountName The name of Cognitive Services account.
183
- * @param nextLink The nextLink from the previous successful call to the List method.
710
+ * @param accountName The name of Cognitive Services account.
711
+ * @param nextLink The nextLink from the previous successful call to the List method.
712
+ * @param options The options parameters.
713
+ */
714
+ _listNext(resourceGroupName, accountName, nextLink, options) {
715
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec);
716
+ }
717
+ /**
718
+ * ListPlansByResourceGroupNext
719
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
720
+ * @param nextLink The nextLink from the previous successful call to the ListPlansByResourceGroup
721
+ * method.
722
+ * @param options The options parameters.
723
+ */
724
+ _listPlansByResourceGroupNext(resourceGroupName, nextLink, options) {
725
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listPlansByResourceGroupNextOperationSpec);
726
+ }
727
+ /**
728
+ * ListPlansBySubscriptionNext
729
+ * @param nextLink The nextLink from the previous successful call to the ListPlansBySubscription
730
+ * method.
731
+ * @param options The options parameters.
732
+ */
733
+ _listPlansBySubscriptionNext(nextLink, options) {
734
+ return this.client.sendOperationRequest({ nextLink, options }, listPlansBySubscriptionNextOperationSpec);
735
+ }
736
+ /**
737
+ * ListAssociationsNext
738
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
739
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
740
+ * Account
741
+ * @param nextLink The nextLink from the previous successful call to the ListAssociations method.
184
742
  * @param options The options parameters.
185
743
  */
186
- _listNext(resourceGroupName, accountName, nextLink, options) {
187
- return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec);
744
+ _listAssociationsNext(resourceGroupName, commitmentPlanName, nextLink, options) {
745
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listAssociationsNextOperationSpec);
188
746
  }
189
747
  }
190
748
  // Operation Specifications
@@ -282,6 +840,248 @@ const deleteOperationSpec = {
282
840
  headerParameters: [Parameters.accept],
283
841
  serializer
284
842
  };
843
+ const createOrUpdatePlanOperationSpec = {
844
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
845
+ httpMethod: "PUT",
846
+ responses: {
847
+ 200: {
848
+ bodyMapper: Mappers.CommitmentPlan
849
+ },
850
+ 201: {
851
+ bodyMapper: Mappers.CommitmentPlan
852
+ },
853
+ 202: {
854
+ bodyMapper: Mappers.CommitmentPlan
855
+ },
856
+ 204: {
857
+ bodyMapper: Mappers.CommitmentPlan
858
+ },
859
+ default: {
860
+ bodyMapper: Mappers.ErrorResponse
861
+ }
862
+ },
863
+ requestBody: Parameters.commitmentPlan,
864
+ queryParameters: [Parameters.apiVersion],
865
+ urlParameters: [
866
+ Parameters.$host,
867
+ Parameters.resourceGroupName,
868
+ Parameters.subscriptionId,
869
+ Parameters.commitmentPlanName1
870
+ ],
871
+ headerParameters: [Parameters.contentType, Parameters.accept],
872
+ mediaType: "json",
873
+ serializer
874
+ };
875
+ const updatePlanOperationSpec = {
876
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
877
+ httpMethod: "PATCH",
878
+ responses: {
879
+ 200: {
880
+ bodyMapper: Mappers.CommitmentPlan
881
+ },
882
+ 201: {
883
+ bodyMapper: Mappers.CommitmentPlan
884
+ },
885
+ 202: {
886
+ bodyMapper: Mappers.CommitmentPlan
887
+ },
888
+ 204: {
889
+ bodyMapper: Mappers.CommitmentPlan
890
+ },
891
+ default: {
892
+ bodyMapper: Mappers.ErrorResponse
893
+ }
894
+ },
895
+ requestBody: Parameters.commitmentPlan1,
896
+ queryParameters: [Parameters.apiVersion],
897
+ urlParameters: [
898
+ Parameters.$host,
899
+ Parameters.resourceGroupName,
900
+ Parameters.subscriptionId,
901
+ Parameters.commitmentPlanName1
902
+ ],
903
+ headerParameters: [Parameters.contentType, Parameters.accept],
904
+ mediaType: "json",
905
+ serializer
906
+ };
907
+ const deletePlanOperationSpec = {
908
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
909
+ httpMethod: "DELETE",
910
+ responses: {
911
+ 200: {},
912
+ 201: {},
913
+ 202: {},
914
+ 204: {},
915
+ default: {
916
+ bodyMapper: Mappers.ErrorResponse
917
+ }
918
+ },
919
+ queryParameters: [Parameters.apiVersion],
920
+ urlParameters: [
921
+ Parameters.$host,
922
+ Parameters.resourceGroupName,
923
+ Parameters.subscriptionId,
924
+ Parameters.commitmentPlanName1
925
+ ],
926
+ headerParameters: [Parameters.accept],
927
+ serializer
928
+ };
929
+ const getPlanOperationSpec = {
930
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
931
+ httpMethod: "GET",
932
+ responses: {
933
+ 200: {
934
+ bodyMapper: Mappers.CommitmentPlan
935
+ },
936
+ default: {
937
+ bodyMapper: Mappers.ErrorResponse
938
+ }
939
+ },
940
+ queryParameters: [Parameters.apiVersion],
941
+ urlParameters: [
942
+ Parameters.$host,
943
+ Parameters.resourceGroupName,
944
+ Parameters.subscriptionId,
945
+ Parameters.commitmentPlanName1
946
+ ],
947
+ headerParameters: [Parameters.accept],
948
+ serializer
949
+ };
950
+ const listPlansByResourceGroupOperationSpec = {
951
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans",
952
+ httpMethod: "GET",
953
+ responses: {
954
+ 200: {
955
+ bodyMapper: Mappers.CommitmentPlanListResult
956
+ },
957
+ default: {
958
+ bodyMapper: Mappers.ErrorResponse
959
+ }
960
+ },
961
+ queryParameters: [Parameters.apiVersion],
962
+ urlParameters: [
963
+ Parameters.$host,
964
+ Parameters.resourceGroupName,
965
+ Parameters.subscriptionId
966
+ ],
967
+ headerParameters: [Parameters.accept],
968
+ serializer
969
+ };
970
+ const listPlansBySubscriptionOperationSpec = {
971
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/commitmentPlans",
972
+ httpMethod: "GET",
973
+ responses: {
974
+ 200: {
975
+ bodyMapper: Mappers.CommitmentPlanListResult
976
+ },
977
+ default: {
978
+ bodyMapper: Mappers.ErrorResponse
979
+ }
980
+ },
981
+ queryParameters: [Parameters.apiVersion],
982
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
983
+ headerParameters: [Parameters.accept],
984
+ serializer
985
+ };
986
+ const listAssociationsOperationSpec = {
987
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations",
988
+ httpMethod: "GET",
989
+ responses: {
990
+ 200: {
991
+ bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult
992
+ },
993
+ default: {
994
+ bodyMapper: Mappers.ErrorResponse
995
+ }
996
+ },
997
+ queryParameters: [Parameters.apiVersion],
998
+ urlParameters: [
999
+ Parameters.$host,
1000
+ Parameters.resourceGroupName,
1001
+ Parameters.subscriptionId,
1002
+ Parameters.commitmentPlanName1
1003
+ ],
1004
+ headerParameters: [Parameters.accept],
1005
+ serializer
1006
+ };
1007
+ const getAssociationOperationSpec = {
1008
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
1009
+ httpMethod: "GET",
1010
+ responses: {
1011
+ 200: {
1012
+ bodyMapper: Mappers.CommitmentPlanAccountAssociation
1013
+ },
1014
+ default: {
1015
+ bodyMapper: Mappers.ErrorResponse
1016
+ }
1017
+ },
1018
+ queryParameters: [Parameters.apiVersion],
1019
+ urlParameters: [
1020
+ Parameters.$host,
1021
+ Parameters.resourceGroupName,
1022
+ Parameters.subscriptionId,
1023
+ Parameters.commitmentPlanName1,
1024
+ Parameters.commitmentPlanAssociationName
1025
+ ],
1026
+ headerParameters: [Parameters.accept],
1027
+ serializer
1028
+ };
1029
+ const createOrUpdateAssociationOperationSpec = {
1030
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
1031
+ httpMethod: "PUT",
1032
+ responses: {
1033
+ 200: {
1034
+ bodyMapper: Mappers.CommitmentPlanAccountAssociation
1035
+ },
1036
+ 201: {
1037
+ bodyMapper: Mappers.CommitmentPlanAccountAssociation
1038
+ },
1039
+ 202: {
1040
+ bodyMapper: Mappers.CommitmentPlanAccountAssociation
1041
+ },
1042
+ 204: {
1043
+ bodyMapper: Mappers.CommitmentPlanAccountAssociation
1044
+ },
1045
+ default: {
1046
+ bodyMapper: Mappers.ErrorResponse
1047
+ }
1048
+ },
1049
+ requestBody: Parameters.association,
1050
+ queryParameters: [Parameters.apiVersion],
1051
+ urlParameters: [
1052
+ Parameters.$host,
1053
+ Parameters.resourceGroupName,
1054
+ Parameters.subscriptionId,
1055
+ Parameters.commitmentPlanName1,
1056
+ Parameters.commitmentPlanAssociationName
1057
+ ],
1058
+ headerParameters: [Parameters.contentType, Parameters.accept],
1059
+ mediaType: "json",
1060
+ serializer
1061
+ };
1062
+ const deleteAssociationOperationSpec = {
1063
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
1064
+ httpMethod: "DELETE",
1065
+ responses: {
1066
+ 200: {},
1067
+ 201: {},
1068
+ 202: {},
1069
+ 204: {},
1070
+ default: {
1071
+ bodyMapper: Mappers.ErrorResponse
1072
+ }
1073
+ },
1074
+ queryParameters: [Parameters.apiVersion],
1075
+ urlParameters: [
1076
+ Parameters.$host,
1077
+ Parameters.resourceGroupName,
1078
+ Parameters.subscriptionId,
1079
+ Parameters.commitmentPlanName1,
1080
+ Parameters.commitmentPlanAssociationName
1081
+ ],
1082
+ headerParameters: [Parameters.accept],
1083
+ serializer
1084
+ };
285
1085
  const listNextOperationSpec = {
286
1086
  path: "{nextLink}",
287
1087
  httpMethod: "GET",
@@ -293,7 +1093,6 @@ const listNextOperationSpec = {
293
1093
  bodyMapper: Mappers.ErrorResponse
294
1094
  }
295
1095
  },
296
- queryParameters: [Parameters.apiVersion],
297
1096
  urlParameters: [
298
1097
  Parameters.$host,
299
1098
  Parameters.resourceGroupName,
@@ -304,4 +1103,64 @@ const listNextOperationSpec = {
304
1103
  headerParameters: [Parameters.accept],
305
1104
  serializer
306
1105
  };
1106
+ const listPlansByResourceGroupNextOperationSpec = {
1107
+ path: "{nextLink}",
1108
+ httpMethod: "GET",
1109
+ responses: {
1110
+ 200: {
1111
+ bodyMapper: Mappers.CommitmentPlanListResult
1112
+ },
1113
+ default: {
1114
+ bodyMapper: Mappers.ErrorResponse
1115
+ }
1116
+ },
1117
+ urlParameters: [
1118
+ Parameters.$host,
1119
+ Parameters.resourceGroupName,
1120
+ Parameters.subscriptionId,
1121
+ Parameters.nextLink
1122
+ ],
1123
+ headerParameters: [Parameters.accept],
1124
+ serializer
1125
+ };
1126
+ const listPlansBySubscriptionNextOperationSpec = {
1127
+ path: "{nextLink}",
1128
+ httpMethod: "GET",
1129
+ responses: {
1130
+ 200: {
1131
+ bodyMapper: Mappers.CommitmentPlanListResult
1132
+ },
1133
+ default: {
1134
+ bodyMapper: Mappers.ErrorResponse
1135
+ }
1136
+ },
1137
+ urlParameters: [
1138
+ Parameters.$host,
1139
+ Parameters.subscriptionId,
1140
+ Parameters.nextLink
1141
+ ],
1142
+ headerParameters: [Parameters.accept],
1143
+ serializer
1144
+ };
1145
+ const listAssociationsNextOperationSpec = {
1146
+ path: "{nextLink}",
1147
+ httpMethod: "GET",
1148
+ responses: {
1149
+ 200: {
1150
+ bodyMapper: Mappers.CommitmentPlanAccountAssociationListResult
1151
+ },
1152
+ default: {
1153
+ bodyMapper: Mappers.ErrorResponse
1154
+ }
1155
+ },
1156
+ urlParameters: [
1157
+ Parameters.$host,
1158
+ Parameters.resourceGroupName,
1159
+ Parameters.subscriptionId,
1160
+ Parameters.nextLink,
1161
+ Parameters.commitmentPlanName1
1162
+ ],
1163
+ headerParameters: [Parameters.accept],
1164
+ serializer
1165
+ };
307
1166
  //# sourceMappingURL=commitmentPlans.js.map