@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
package/dist/index.js CHANGED
@@ -37,11 +37,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
37
37
  */
38
38
  const pageMap = new WeakMap();
39
39
  /**
40
- * Given a result page from a pageable operation, returns a
41
- * continuation token that can be used to begin paging from
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
42
  * that point later.
43
- * @param page A result object from calling .byPage() on a paged operation.
44
- * @returns The continuation token that can be passed into byPage().
43
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
44
+ * @returns The continuation token that can be passed into byPage() during future calls.
45
45
  */
46
46
  function getContinuationToken(page) {
47
47
  var _a;
@@ -157,6 +157,16 @@ exports.KnownPublicNetworkAccess = void 0;
157
157
  /** Disabled */
158
158
  KnownPublicNetworkAccess["Disabled"] = "Disabled";
159
159
  })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
160
+ /** Known values of {@link RoutingMethods} that the service accepts. */
161
+ exports.KnownRoutingMethods = void 0;
162
+ (function (KnownRoutingMethods) {
163
+ /** Priority */
164
+ KnownRoutingMethods["Priority"] = "Priority";
165
+ /** Weighted */
166
+ KnownRoutingMethods["Weighted"] = "Weighted";
167
+ /** Performance */
168
+ KnownRoutingMethods["Performance"] = "Performance";
169
+ })(exports.KnownRoutingMethods || (exports.KnownRoutingMethods = {}));
160
170
  /** Known values of {@link ResourceSkuRestrictionsReasonCode} that the service accepts. */
161
171
  exports.KnownResourceSkuRestrictionsReasonCode = void 0;
162
172
  (function (KnownResourceSkuRestrictionsReasonCode) {
@@ -195,6 +205,14 @@ exports.KnownQuotaUsageStatus = void 0;
195
205
  /** Unknown */
196
206
  KnownQuotaUsageStatus["Unknown"] = "Unknown";
197
207
  })(exports.KnownQuotaUsageStatus || (exports.KnownQuotaUsageStatus = {}));
208
+ /** Known values of {@link ModelLifecycleStatus} that the service accepts. */
209
+ exports.KnownModelLifecycleStatus = void 0;
210
+ (function (KnownModelLifecycleStatus) {
211
+ /** GenerallyAvailable */
212
+ KnownModelLifecycleStatus["GenerallyAvailable"] = "GenerallyAvailable";
213
+ /** Preview */
214
+ KnownModelLifecycleStatus["Preview"] = "Preview";
215
+ })(exports.KnownModelLifecycleStatus || (exports.KnownModelLifecycleStatus = {}));
198
216
  /** Known values of {@link Origin} that the service accepts. */
199
217
  exports.KnownOrigin = void 0;
200
218
  (function (KnownOrigin) {
@@ -245,6 +263,24 @@ exports.KnownDeploymentScaleType = void 0;
245
263
  /** Manual */
246
264
  KnownDeploymentScaleType["Manual"] = "Manual";
247
265
  })(exports.KnownDeploymentScaleType || (exports.KnownDeploymentScaleType = {}));
266
+ /** Known values of {@link CommitmentPlanProvisioningState} that the service accepts. */
267
+ exports.KnownCommitmentPlanProvisioningState = void 0;
268
+ (function (KnownCommitmentPlanProvisioningState) {
269
+ /** Accepted */
270
+ KnownCommitmentPlanProvisioningState["Accepted"] = "Accepted";
271
+ /** Creating */
272
+ KnownCommitmentPlanProvisioningState["Creating"] = "Creating";
273
+ /** Deleting */
274
+ KnownCommitmentPlanProvisioningState["Deleting"] = "Deleting";
275
+ /** Moving */
276
+ KnownCommitmentPlanProvisioningState["Moving"] = "Moving";
277
+ /** Failed */
278
+ KnownCommitmentPlanProvisioningState["Failed"] = "Failed";
279
+ /** Succeeded */
280
+ KnownCommitmentPlanProvisioningState["Succeeded"] = "Succeeded";
281
+ /** Canceled */
282
+ KnownCommitmentPlanProvisioningState["Canceled"] = "Canceled";
283
+ })(exports.KnownCommitmentPlanProvisioningState || (exports.KnownCommitmentPlanProvisioningState = {}));
248
284
 
249
285
  /*
250
286
  * Copyright (c) Microsoft Corporation.
@@ -595,6 +631,26 @@ const AccountProperties = {
595
631
  type: {
596
632
  name: "String"
597
633
  }
634
+ },
635
+ locations: {
636
+ serializedName: "locations",
637
+ type: {
638
+ name: "Composite",
639
+ className: "MultiRegionSettings"
640
+ }
641
+ },
642
+ commitmentPlanAssociations: {
643
+ serializedName: "commitmentPlanAssociations",
644
+ readOnly: true,
645
+ type: {
646
+ name: "Sequence",
647
+ element: {
648
+ type: {
649
+ name: "Composite",
650
+ className: "CommitmentPlanAssociation"
651
+ }
652
+ }
653
+ }
598
654
  }
599
655
  }
600
656
  }
@@ -1132,6 +1188,78 @@ const QuotaLimit = {
1132
1188
  }
1133
1189
  }
1134
1190
  };
1191
+ const MultiRegionSettings = {
1192
+ type: {
1193
+ name: "Composite",
1194
+ className: "MultiRegionSettings",
1195
+ modelProperties: {
1196
+ routingMethod: {
1197
+ serializedName: "routingMethod",
1198
+ type: {
1199
+ name: "String"
1200
+ }
1201
+ },
1202
+ regions: {
1203
+ serializedName: "regions",
1204
+ type: {
1205
+ name: "Sequence",
1206
+ element: {
1207
+ type: {
1208
+ name: "Composite",
1209
+ className: "RegionSetting"
1210
+ }
1211
+ }
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+ };
1217
+ const RegionSetting = {
1218
+ type: {
1219
+ name: "Composite",
1220
+ className: "RegionSetting",
1221
+ modelProperties: {
1222
+ name: {
1223
+ serializedName: "name",
1224
+ type: {
1225
+ name: "String"
1226
+ }
1227
+ },
1228
+ value: {
1229
+ serializedName: "value",
1230
+ type: {
1231
+ name: "Number"
1232
+ }
1233
+ },
1234
+ customsubdomain: {
1235
+ serializedName: "customsubdomain",
1236
+ type: {
1237
+ name: "String"
1238
+ }
1239
+ }
1240
+ }
1241
+ }
1242
+ };
1243
+ const CommitmentPlanAssociation = {
1244
+ type: {
1245
+ name: "Composite",
1246
+ className: "CommitmentPlanAssociation",
1247
+ modelProperties: {
1248
+ commitmentPlanId: {
1249
+ serializedName: "commitmentPlanId",
1250
+ type: {
1251
+ name: "String"
1252
+ }
1253
+ },
1254
+ commitmentPlanLocation: {
1255
+ serializedName: "commitmentPlanLocation",
1256
+ type: {
1257
+ name: "String"
1258
+ }
1259
+ }
1260
+ }
1261
+ }
1262
+ };
1135
1263
  const ErrorResponse = {
1136
1264
  type: {
1137
1265
  name: "Composite",
@@ -2267,6 +2395,19 @@ const CommitmentPlanProperties = {
2267
2395
  name: "Composite",
2268
2396
  className: "CommitmentPlanProperties",
2269
2397
  modelProperties: {
2398
+ provisioningState: {
2399
+ serializedName: "provisioningState",
2400
+ readOnly: true,
2401
+ type: {
2402
+ name: "String"
2403
+ }
2404
+ },
2405
+ commitmentPlanGuid: {
2406
+ serializedName: "commitmentPlanGuid",
2407
+ type: {
2408
+ name: "String"
2409
+ }
2410
+ },
2270
2411
  hostingModel: {
2271
2412
  serializedName: "hostingModel",
2272
2413
  type: {
@@ -2350,6 +2491,48 @@ const CommitmentPeriod = {
2350
2491
  }
2351
2492
  }
2352
2493
  };
2494
+ const PatchResourceTags = {
2495
+ type: {
2496
+ name: "Composite",
2497
+ className: "PatchResourceTags",
2498
+ modelProperties: {
2499
+ tags: {
2500
+ serializedName: "tags",
2501
+ type: {
2502
+ name: "Dictionary",
2503
+ value: { type: { name: "String" } }
2504
+ }
2505
+ }
2506
+ }
2507
+ }
2508
+ };
2509
+ const CommitmentPlanAccountAssociationListResult = {
2510
+ type: {
2511
+ name: "Composite",
2512
+ className: "CommitmentPlanAccountAssociationListResult",
2513
+ modelProperties: {
2514
+ nextLink: {
2515
+ serializedName: "nextLink",
2516
+ type: {
2517
+ name: "String"
2518
+ }
2519
+ },
2520
+ value: {
2521
+ serializedName: "value",
2522
+ readOnly: true,
2523
+ type: {
2524
+ name: "Sequence",
2525
+ element: {
2526
+ type: {
2527
+ name: "Composite",
2528
+ className: "CommitmentPlanAccountAssociation"
2529
+ }
2530
+ }
2531
+ }
2532
+ }
2533
+ }
2534
+ }
2535
+ };
2353
2536
  const AzureEntityResource = {
2354
2537
  type: {
2355
2538
  name: "Composite",
@@ -2404,12 +2587,23 @@ const AccountModel = {
2404
2587
  name: "Dictionary",
2405
2588
  value: { type: { name: "String" } }
2406
2589
  }
2590
+ }, finetuneCapabilities: {
2591
+ serializedName: "finetuneCapabilities",
2592
+ type: {
2593
+ name: "Dictionary",
2594
+ value: { type: { name: "String" } }
2595
+ }
2407
2596
  }, deprecation: {
2408
2597
  serializedName: "deprecation",
2409
2598
  type: {
2410
2599
  name: "Composite",
2411
2600
  className: "ModelDeprecationInfo"
2412
2601
  }
2602
+ }, lifecycleStatus: {
2603
+ serializedName: "lifecycleStatus",
2604
+ type: {
2605
+ name: "String"
2606
+ }
2413
2607
  }, systemData: {
2414
2608
  serializedName: "systemData",
2415
2609
  type: {
@@ -2419,6 +2613,19 @@ const AccountModel = {
2419
2613
  } })
2420
2614
  }
2421
2615
  };
2616
+ const PatchResourceTagsAndSku = {
2617
+ type: {
2618
+ name: "Composite",
2619
+ className: "PatchResourceTagsAndSku",
2620
+ modelProperties: Object.assign(Object.assign({}, PatchResourceTags.type.modelProperties), { sku: {
2621
+ serializedName: "sku",
2622
+ type: {
2623
+ name: "Composite",
2624
+ className: "Sku"
2625
+ }
2626
+ } })
2627
+ }
2628
+ };
2422
2629
  const PrivateEndpointConnection = {
2423
2630
  type: {
2424
2631
  name: "Composite",
@@ -2531,6 +2738,28 @@ const CommitmentPlan = {
2531
2738
  type: {
2532
2739
  name: "String"
2533
2740
  }
2741
+ }, kind: {
2742
+ serializedName: "kind",
2743
+ type: {
2744
+ name: "String"
2745
+ }
2746
+ }, sku: {
2747
+ serializedName: "sku",
2748
+ type: {
2749
+ name: "Composite",
2750
+ className: "Sku"
2751
+ }
2752
+ }, tags: {
2753
+ serializedName: "tags",
2754
+ type: {
2755
+ name: "Dictionary",
2756
+ value: { type: { name: "String" } }
2757
+ }
2758
+ }, location: {
2759
+ serializedName: "location",
2760
+ type: {
2761
+ name: "String"
2762
+ }
2534
2763
  }, properties: {
2535
2764
  serializedName: "properties",
2536
2765
  type: {
@@ -2540,6 +2769,72 @@ const CommitmentPlan = {
2540
2769
  } })
2541
2770
  }
2542
2771
  };
2772
+ const CommitmentPlanAccountAssociation = {
2773
+ type: {
2774
+ name: "Composite",
2775
+ className: "CommitmentPlanAccountAssociation",
2776
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
2777
+ serializedName: "systemData",
2778
+ type: {
2779
+ name: "Composite",
2780
+ className: "SystemData"
2781
+ }
2782
+ }, etag: {
2783
+ serializedName: "etag",
2784
+ readOnly: true,
2785
+ type: {
2786
+ name: "String"
2787
+ }
2788
+ }, accountId: {
2789
+ serializedName: "properties.accountId",
2790
+ type: {
2791
+ name: "String"
2792
+ }
2793
+ } })
2794
+ }
2795
+ };
2796
+ const CommitmentPlansUpdatePlanHeaders = {
2797
+ type: {
2798
+ name: "Composite",
2799
+ className: "CommitmentPlansUpdatePlanHeaders",
2800
+ modelProperties: {
2801
+ location: {
2802
+ serializedName: "location",
2803
+ type: {
2804
+ name: "String"
2805
+ }
2806
+ }
2807
+ }
2808
+ }
2809
+ };
2810
+ const CommitmentPlansDeletePlanHeaders = {
2811
+ type: {
2812
+ name: "Composite",
2813
+ className: "CommitmentPlansDeletePlanHeaders",
2814
+ modelProperties: {
2815
+ location: {
2816
+ serializedName: "location",
2817
+ type: {
2818
+ name: "String"
2819
+ }
2820
+ }
2821
+ }
2822
+ }
2823
+ };
2824
+ const CommitmentPlansDeleteAssociationHeaders = {
2825
+ type: {
2826
+ name: "Composite",
2827
+ className: "CommitmentPlansDeleteAssociationHeaders",
2828
+ modelProperties: {
2829
+ location: {
2830
+ serializedName: "location",
2831
+ type: {
2832
+ name: "String"
2833
+ }
2834
+ }
2835
+ }
2836
+ }
2837
+ };
2543
2838
 
2544
2839
  var Mappers = /*#__PURE__*/Object.freeze({
2545
2840
  __proto__: null,
@@ -2565,6 +2860,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
2565
2860
  ThrottlingRule: ThrottlingRule,
2566
2861
  RequestMatchPattern: RequestMatchPattern,
2567
2862
  QuotaLimit: QuotaLimit,
2863
+ MultiRegionSettings: MultiRegionSettings,
2864
+ RegionSetting: RegionSetting,
2865
+ CommitmentPlanAssociation: CommitmentPlanAssociation,
2568
2866
  ErrorResponse: ErrorResponse,
2569
2867
  ErrorDetail: ErrorDetail,
2570
2868
  ErrorAdditionalInfo: ErrorAdditionalInfo,
@@ -2604,14 +2902,21 @@ var Mappers = /*#__PURE__*/Object.freeze({
2604
2902
  CommitmentPlanListResult: CommitmentPlanListResult,
2605
2903
  CommitmentPlanProperties: CommitmentPlanProperties,
2606
2904
  CommitmentPeriod: CommitmentPeriod,
2905
+ PatchResourceTags: PatchResourceTags,
2906
+ CommitmentPlanAccountAssociationListResult: CommitmentPlanAccountAssociationListResult,
2607
2907
  AzureEntityResource: AzureEntityResource,
2608
2908
  PrivateLinkResource: PrivateLinkResource,
2609
2909
  ProxyResource: ProxyResource,
2610
2910
  AccountModel: AccountModel,
2911
+ PatchResourceTagsAndSku: PatchResourceTagsAndSku,
2611
2912
  PrivateEndpointConnection: PrivateEndpointConnection,
2612
2913
  Account: Account,
2613
2914
  Deployment: Deployment,
2614
- CommitmentPlan: CommitmentPlan
2915
+ CommitmentPlan: CommitmentPlan,
2916
+ CommitmentPlanAccountAssociation: CommitmentPlanAccountAssociation,
2917
+ CommitmentPlansUpdatePlanHeaders: CommitmentPlansUpdatePlanHeaders,
2918
+ CommitmentPlansDeletePlanHeaders: CommitmentPlansDeletePlanHeaders,
2919
+ CommitmentPlansDeleteAssociationHeaders: CommitmentPlansDeleteAssociationHeaders
2615
2920
  });
2616
2921
 
2617
2922
  /*
@@ -2690,7 +2995,7 @@ const accountName = {
2690
2995
  const apiVersion = {
2691
2996
  parameterPath: "apiVersion",
2692
2997
  mapper: {
2693
- defaultValue: "2022-10-01",
2998
+ defaultValue: "2022-12-01",
2694
2999
  isConstant: true,
2695
3000
  serializedName: "api-version",
2696
3001
  type: {
@@ -2783,6 +3088,40 @@ const commitmentPlan = {
2783
3088
  parameterPath: "commitmentPlan",
2784
3089
  mapper: CommitmentPlan
2785
3090
  };
3091
+ const commitmentPlanName1 = {
3092
+ parameterPath: "commitmentPlanName",
3093
+ mapper: {
3094
+ constraints: {
3095
+ Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
3096
+ },
3097
+ serializedName: "commitmentPlanName",
3098
+ required: true,
3099
+ type: {
3100
+ name: "String"
3101
+ }
3102
+ }
3103
+ };
3104
+ const commitmentPlan1 = {
3105
+ parameterPath: "commitmentPlan",
3106
+ mapper: PatchResourceTagsAndSku
3107
+ };
3108
+ const commitmentPlanAssociationName = {
3109
+ parameterPath: "commitmentPlanAssociationName",
3110
+ mapper: {
3111
+ constraints: {
3112
+ Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
3113
+ },
3114
+ serializedName: "commitmentPlanAssociationName",
3115
+ required: true,
3116
+ type: {
3117
+ name: "String"
3118
+ }
3119
+ }
3120
+ };
3121
+ const association = {
3122
+ parameterPath: "association",
3123
+ mapper: CommitmentPlanAccountAssociation
3124
+ };
2786
3125
 
2787
3126
  /*
2788
3127
  * Copyright (c) Microsoft Corporation.
@@ -3532,7 +3871,6 @@ const listByResourceGroupNextOperationSpec = {
3532
3871
  bodyMapper: ErrorResponse
3533
3872
  }
3534
3873
  },
3535
- queryParameters: [apiVersion],
3536
3874
  urlParameters: [
3537
3875
  $host,
3538
3876
  resourceGroupName,
@@ -3553,7 +3891,6 @@ const listNextOperationSpec$6 = {
3553
3891
  bodyMapper: ErrorResponse
3554
3892
  }
3555
3893
  },
3556
- queryParameters: [apiVersion],
3557
3894
  urlParameters: [
3558
3895
  $host,
3559
3896
  subscriptionId,
@@ -3573,7 +3910,6 @@ const listModelsNextOperationSpec = {
3573
3910
  bodyMapper: ErrorResponse
3574
3911
  }
3575
3912
  },
3576
- queryParameters: [apiVersion],
3577
3913
  urlParameters: [
3578
3914
  $host,
3579
3915
  resourceGroupName,
@@ -3814,7 +4150,6 @@ const listNextOperationSpec$5 = {
3814
4150
  bodyMapper: ErrorResponse
3815
4151
  }
3816
4152
  },
3817
- queryParameters: [apiVersion],
3818
4153
  urlParameters: [
3819
4154
  $host,
3820
4155
  subscriptionId,
@@ -3945,7 +4280,6 @@ const listNextOperationSpec$4 = {
3945
4280
  bodyMapper: ErrorResponse
3946
4281
  }
3947
4282
  },
3948
- queryParameters: [apiVersion],
3949
4283
  urlParameters: [
3950
4284
  $host,
3951
4285
  subscriptionId,
@@ -4076,7 +4410,6 @@ const listNextOperationSpec$3 = {
4076
4410
  bodyMapper: ErrorResponse
4077
4411
  }
4078
4412
  },
4079
- queryParameters: [apiVersion],
4080
4413
  urlParameters: [$host, nextLink],
4081
4414
  headerParameters: [accept],
4082
4415
  serializer: serializer$6
@@ -4210,7 +4543,6 @@ const listNextOperationSpec$2 = {
4210
4543
  bodyMapper: ErrorResponse
4211
4544
  }
4212
4545
  },
4213
- queryParameters: [apiVersion],
4214
4546
  urlParameters: [
4215
4547
  $host,
4216
4548
  subscriptionId,
@@ -4868,7 +5200,6 @@ const listNextOperationSpec$1 = {
4868
5200
  bodyMapper: ErrorResponse
4869
5201
  }
4870
5202
  },
4871
- queryParameters: [apiVersion],
4872
5203
  urlParameters: [
4873
5204
  $host,
4874
5205
  resourceGroupName,
@@ -4959,18 +5290,199 @@ class CommitmentPlansImpl {
4959
5290
  });
4960
5291
  }
4961
5292
  /**
4962
- * Gets the commitmentPlans associated with the Cognitive Services account.
5293
+ * Returns all the resources of a particular type belonging to a resource group
4963
5294
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
4964
- * @param accountName The name of Cognitive Services account.
4965
5295
  * @param options The options parameters.
4966
5296
  */
4967
- _list(resourceGroupName, accountName, options) {
4968
- return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec);
4969
- }
4970
- /**
4971
- * Gets the specified commitmentPlans associated with the Cognitive Services account.
4972
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
4973
- * @param accountName The name of Cognitive Services account.
5297
+ listPlansByResourceGroup(resourceGroupName, options) {
5298
+ const iter = this.listPlansByResourceGroupPagingAll(resourceGroupName, options);
5299
+ return {
5300
+ next() {
5301
+ return iter.next();
5302
+ },
5303
+ [Symbol.asyncIterator]() {
5304
+ return this;
5305
+ },
5306
+ byPage: (settings) => {
5307
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5308
+ throw new Error("maxPageSize is not supported by this operation.");
5309
+ }
5310
+ return this.listPlansByResourceGroupPagingPage(resourceGroupName, options, settings);
5311
+ }
5312
+ };
5313
+ }
5314
+ listPlansByResourceGroupPagingPage(resourceGroupName, options, settings) {
5315
+ return tslib.__asyncGenerator(this, arguments, function* listPlansByResourceGroupPagingPage_1() {
5316
+ let result;
5317
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5318
+ if (!continuationToken) {
5319
+ result = yield tslib.__await(this._listPlansByResourceGroup(resourceGroupName, options));
5320
+ let page = result.value || [];
5321
+ continuationToken = result.nextLink;
5322
+ setContinuationToken(page, continuationToken);
5323
+ yield yield tslib.__await(page);
5324
+ }
5325
+ while (continuationToken) {
5326
+ result = yield tslib.__await(this._listPlansByResourceGroupNext(resourceGroupName, continuationToken, options));
5327
+ continuationToken = result.nextLink;
5328
+ let page = result.value || [];
5329
+ setContinuationToken(page, continuationToken);
5330
+ yield yield tslib.__await(page);
5331
+ }
5332
+ });
5333
+ }
5334
+ listPlansByResourceGroupPagingAll(resourceGroupName, options) {
5335
+ return tslib.__asyncGenerator(this, arguments, function* listPlansByResourceGroupPagingAll_1() {
5336
+ var e_2, _a;
5337
+ try {
5338
+ for (var _b = tslib.__asyncValues(this.listPlansByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
5339
+ const page = _c.value;
5340
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
5341
+ }
5342
+ }
5343
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
5344
+ finally {
5345
+ try {
5346
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
5347
+ }
5348
+ finally { if (e_2) throw e_2.error; }
5349
+ }
5350
+ });
5351
+ }
5352
+ /**
5353
+ * Returns all the resources of a particular type belonging to a subscription.
5354
+ * @param options The options parameters.
5355
+ */
5356
+ listPlansBySubscription(options) {
5357
+ const iter = this.listPlansBySubscriptionPagingAll(options);
5358
+ return {
5359
+ next() {
5360
+ return iter.next();
5361
+ },
5362
+ [Symbol.asyncIterator]() {
5363
+ return this;
5364
+ },
5365
+ byPage: (settings) => {
5366
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5367
+ throw new Error("maxPageSize is not supported by this operation.");
5368
+ }
5369
+ return this.listPlansBySubscriptionPagingPage(options, settings);
5370
+ }
5371
+ };
5372
+ }
5373
+ listPlansBySubscriptionPagingPage(options, settings) {
5374
+ return tslib.__asyncGenerator(this, arguments, function* listPlansBySubscriptionPagingPage_1() {
5375
+ let result;
5376
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5377
+ if (!continuationToken) {
5378
+ result = yield tslib.__await(this._listPlansBySubscription(options));
5379
+ let page = result.value || [];
5380
+ continuationToken = result.nextLink;
5381
+ setContinuationToken(page, continuationToken);
5382
+ yield yield tslib.__await(page);
5383
+ }
5384
+ while (continuationToken) {
5385
+ result = yield tslib.__await(this._listPlansBySubscriptionNext(continuationToken, options));
5386
+ continuationToken = result.nextLink;
5387
+ let page = result.value || [];
5388
+ setContinuationToken(page, continuationToken);
5389
+ yield yield tslib.__await(page);
5390
+ }
5391
+ });
5392
+ }
5393
+ listPlansBySubscriptionPagingAll(options) {
5394
+ return tslib.__asyncGenerator(this, arguments, function* listPlansBySubscriptionPagingAll_1() {
5395
+ var e_3, _a;
5396
+ try {
5397
+ for (var _b = tslib.__asyncValues(this.listPlansBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
5398
+ const page = _c.value;
5399
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
5400
+ }
5401
+ }
5402
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
5403
+ finally {
5404
+ try {
5405
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
5406
+ }
5407
+ finally { if (e_3) throw e_3.error; }
5408
+ }
5409
+ });
5410
+ }
5411
+ /**
5412
+ * Gets the associations of the Cognitive Services commitment plan.
5413
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5414
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5415
+ * Account
5416
+ * @param options The options parameters.
5417
+ */
5418
+ listAssociations(resourceGroupName, commitmentPlanName, options) {
5419
+ const iter = this.listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options);
5420
+ return {
5421
+ next() {
5422
+ return iter.next();
5423
+ },
5424
+ [Symbol.asyncIterator]() {
5425
+ return this;
5426
+ },
5427
+ byPage: (settings) => {
5428
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5429
+ throw new Error("maxPageSize is not supported by this operation.");
5430
+ }
5431
+ return this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings);
5432
+ }
5433
+ };
5434
+ }
5435
+ listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options, settings) {
5436
+ return tslib.__asyncGenerator(this, arguments, function* listAssociationsPagingPage_1() {
5437
+ let result;
5438
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5439
+ if (!continuationToken) {
5440
+ result = yield tslib.__await(this._listAssociations(resourceGroupName, commitmentPlanName, options));
5441
+ let page = result.value || [];
5442
+ continuationToken = result.nextLink;
5443
+ setContinuationToken(page, continuationToken);
5444
+ yield yield tslib.__await(page);
5445
+ }
5446
+ while (continuationToken) {
5447
+ result = yield tslib.__await(this._listAssociationsNext(resourceGroupName, commitmentPlanName, continuationToken, options));
5448
+ continuationToken = result.nextLink;
5449
+ let page = result.value || [];
5450
+ setContinuationToken(page, continuationToken);
5451
+ yield yield tslib.__await(page);
5452
+ }
5453
+ });
5454
+ }
5455
+ listAssociationsPagingAll(resourceGroupName, commitmentPlanName, options) {
5456
+ return tslib.__asyncGenerator(this, arguments, function* listAssociationsPagingAll_1() {
5457
+ var e_4, _a;
5458
+ try {
5459
+ for (var _b = tslib.__asyncValues(this.listAssociationsPagingPage(resourceGroupName, commitmentPlanName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
5460
+ const page = _c.value;
5461
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
5462
+ }
5463
+ }
5464
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
5465
+ finally {
5466
+ try {
5467
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
5468
+ }
5469
+ finally { if (e_4) throw e_4.error; }
5470
+ }
5471
+ });
5472
+ }
5473
+ /**
5474
+ * Gets the commitmentPlans associated with the Cognitive Services account.
5475
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5476
+ * @param accountName The name of Cognitive Services account.
5477
+ * @param options The options parameters.
5478
+ */
5479
+ _list(resourceGroupName, accountName, options) {
5480
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec);
5481
+ }
5482
+ /**
5483
+ * Gets the specified commitmentPlans associated with the Cognitive Services account.
5484
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5485
+ * @param accountName The name of Cognitive Services account.
4974
5486
  * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
4975
5487
  * Account
4976
5488
  * @param options The options parameters.
@@ -5051,6 +5563,353 @@ class CommitmentPlansImpl {
5051
5563
  return poller.pollUntilDone();
5052
5564
  });
5053
5565
  }
5566
+ /**
5567
+ * Create Cognitive Services commitment plan.
5568
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5569
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5570
+ * Account
5571
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
5572
+ * @param options The options parameters.
5573
+ */
5574
+ beginCreateOrUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
5575
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5576
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5577
+ return this.client.sendOperationRequest(args, spec);
5578
+ });
5579
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5580
+ var _a;
5581
+ let currentRawResponse = undefined;
5582
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
5583
+ const callback = (rawResponse, flatResponse) => {
5584
+ currentRawResponse = rawResponse;
5585
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
5586
+ };
5587
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
5588
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
5589
+ return {
5590
+ flatResponse,
5591
+ rawResponse: {
5592
+ statusCode: currentRawResponse.status,
5593
+ body: currentRawResponse.parsedBody,
5594
+ headers: currentRawResponse.headers.toJSON()
5595
+ }
5596
+ };
5597
+ });
5598
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, commitmentPlan, options }, createOrUpdatePlanOperationSpec);
5599
+ const poller = new coreLro.LroEngine(lro, {
5600
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5601
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5602
+ lroResourceLocationConfig: "azure-async-operation"
5603
+ });
5604
+ yield poller.poll();
5605
+ return poller;
5606
+ });
5607
+ }
5608
+ /**
5609
+ * Create Cognitive Services commitment plan.
5610
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5611
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5612
+ * Account
5613
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
5614
+ * @param options The options parameters.
5615
+ */
5616
+ beginCreateOrUpdatePlanAndWait(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
5617
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5618
+ const poller = yield this.beginCreateOrUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options);
5619
+ return poller.pollUntilDone();
5620
+ });
5621
+ }
5622
+ /**
5623
+ * Create Cognitive Services commitment plan.
5624
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5625
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5626
+ * Account
5627
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
5628
+ * @param options The options parameters.
5629
+ */
5630
+ beginUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
5631
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5632
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5633
+ return this.client.sendOperationRequest(args, spec);
5634
+ });
5635
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5636
+ var _a;
5637
+ let currentRawResponse = undefined;
5638
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
5639
+ const callback = (rawResponse, flatResponse) => {
5640
+ currentRawResponse = rawResponse;
5641
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
5642
+ };
5643
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
5644
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
5645
+ return {
5646
+ flatResponse,
5647
+ rawResponse: {
5648
+ statusCode: currentRawResponse.status,
5649
+ body: currentRawResponse.parsedBody,
5650
+ headers: currentRawResponse.headers.toJSON()
5651
+ }
5652
+ };
5653
+ });
5654
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, commitmentPlan, options }, updatePlanOperationSpec);
5655
+ const poller = new coreLro.LroEngine(lro, {
5656
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5657
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5658
+ lroResourceLocationConfig: "location"
5659
+ });
5660
+ yield poller.poll();
5661
+ return poller;
5662
+ });
5663
+ }
5664
+ /**
5665
+ * Create Cognitive Services commitment plan.
5666
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5667
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5668
+ * Account
5669
+ * @param commitmentPlan The parameters to provide for the created commitment plan.
5670
+ * @param options The options parameters.
5671
+ */
5672
+ beginUpdatePlanAndWait(resourceGroupName, commitmentPlanName, commitmentPlan, options) {
5673
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5674
+ const poller = yield this.beginUpdatePlan(resourceGroupName, commitmentPlanName, commitmentPlan, options);
5675
+ return poller.pollUntilDone();
5676
+ });
5677
+ }
5678
+ /**
5679
+ * Deletes a Cognitive Services commitment plan from the resource group.
5680
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5681
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5682
+ * Account
5683
+ * @param options The options parameters.
5684
+ */
5685
+ beginDeletePlan(resourceGroupName, commitmentPlanName, options) {
5686
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5687
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5688
+ return this.client.sendOperationRequest(args, spec);
5689
+ });
5690
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5691
+ var _a;
5692
+ let currentRawResponse = undefined;
5693
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
5694
+ const callback = (rawResponse, flatResponse) => {
5695
+ currentRawResponse = rawResponse;
5696
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
5697
+ };
5698
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
5699
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
5700
+ return {
5701
+ flatResponse,
5702
+ rawResponse: {
5703
+ statusCode: currentRawResponse.status,
5704
+ body: currentRawResponse.parsedBody,
5705
+ headers: currentRawResponse.headers.toJSON()
5706
+ }
5707
+ };
5708
+ });
5709
+ const lro = new LroImpl(sendOperation, { resourceGroupName, commitmentPlanName, options }, deletePlanOperationSpec);
5710
+ const poller = new coreLro.LroEngine(lro, {
5711
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5712
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5713
+ lroResourceLocationConfig: "location"
5714
+ });
5715
+ yield poller.poll();
5716
+ return poller;
5717
+ });
5718
+ }
5719
+ /**
5720
+ * Deletes a Cognitive Services commitment plan from the resource group.
5721
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5722
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5723
+ * Account
5724
+ * @param options The options parameters.
5725
+ */
5726
+ beginDeletePlanAndWait(resourceGroupName, commitmentPlanName, options) {
5727
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5728
+ const poller = yield this.beginDeletePlan(resourceGroupName, commitmentPlanName, options);
5729
+ return poller.pollUntilDone();
5730
+ });
5731
+ }
5732
+ /**
5733
+ * Returns a Cognitive Services commitment plan specified by the parameters.
5734
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5735
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5736
+ * Account
5737
+ * @param options The options parameters.
5738
+ */
5739
+ getPlan(resourceGroupName, commitmentPlanName, options) {
5740
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, getPlanOperationSpec);
5741
+ }
5742
+ /**
5743
+ * Returns all the resources of a particular type belonging to a resource group
5744
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5745
+ * @param options The options parameters.
5746
+ */
5747
+ _listPlansByResourceGroup(resourceGroupName, options) {
5748
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listPlansByResourceGroupOperationSpec);
5749
+ }
5750
+ /**
5751
+ * Returns all the resources of a particular type belonging to a subscription.
5752
+ * @param options The options parameters.
5753
+ */
5754
+ _listPlansBySubscription(options) {
5755
+ return this.client.sendOperationRequest({ options }, listPlansBySubscriptionOperationSpec);
5756
+ }
5757
+ /**
5758
+ * Gets the associations of the Cognitive Services commitment plan.
5759
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5760
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5761
+ * Account
5762
+ * @param options The options parameters.
5763
+ */
5764
+ _listAssociations(resourceGroupName, commitmentPlanName, options) {
5765
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, listAssociationsOperationSpec);
5766
+ }
5767
+ /**
5768
+ * Gets the association of the Cognitive Services commitment plan.
5769
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5770
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5771
+ * Account
5772
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
5773
+ * Services Account
5774
+ * @param options The options parameters.
5775
+ */
5776
+ getAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
5777
+ return this.client.sendOperationRequest({
5778
+ resourceGroupName,
5779
+ commitmentPlanName,
5780
+ commitmentPlanAssociationName,
5781
+ options
5782
+ }, getAssociationOperationSpec);
5783
+ }
5784
+ /**
5785
+ * Create or update the association of the Cognitive Services commitment plan.
5786
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5787
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5788
+ * Account
5789
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
5790
+ * Services Account
5791
+ * @param association The commitmentPlan properties.
5792
+ * @param options The options parameters.
5793
+ */
5794
+ beginCreateOrUpdateAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options) {
5795
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5796
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5797
+ return this.client.sendOperationRequest(args, spec);
5798
+ });
5799
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5800
+ var _a;
5801
+ let currentRawResponse = undefined;
5802
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
5803
+ const callback = (rawResponse, flatResponse) => {
5804
+ currentRawResponse = rawResponse;
5805
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
5806
+ };
5807
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
5808
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
5809
+ return {
5810
+ flatResponse,
5811
+ rawResponse: {
5812
+ statusCode: currentRawResponse.status,
5813
+ body: currentRawResponse.parsedBody,
5814
+ headers: currentRawResponse.headers.toJSON()
5815
+ }
5816
+ };
5817
+ });
5818
+ const lro = new LroImpl(sendOperation, {
5819
+ resourceGroupName,
5820
+ commitmentPlanName,
5821
+ commitmentPlanAssociationName,
5822
+ association,
5823
+ options
5824
+ }, createOrUpdateAssociationOperationSpec);
5825
+ const poller = new coreLro.LroEngine(lro, {
5826
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5827
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5828
+ lroResourceLocationConfig: "azure-async-operation"
5829
+ });
5830
+ yield poller.poll();
5831
+ return poller;
5832
+ });
5833
+ }
5834
+ /**
5835
+ * Create or update the association of the Cognitive Services commitment plan.
5836
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5837
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5838
+ * Account
5839
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
5840
+ * Services Account
5841
+ * @param association The commitmentPlan properties.
5842
+ * @param options The options parameters.
5843
+ */
5844
+ beginCreateOrUpdateAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options) {
5845
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5846
+ const poller = yield this.beginCreateOrUpdateAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association, options);
5847
+ return poller.pollUntilDone();
5848
+ });
5849
+ }
5850
+ /**
5851
+ * Deletes the association of the Cognitive Services commitment plan.
5852
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5853
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5854
+ * Account
5855
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
5856
+ * Services Account
5857
+ * @param options The options parameters.
5858
+ */
5859
+ beginDeleteAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
5860
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5861
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5862
+ return this.client.sendOperationRequest(args, spec);
5863
+ });
5864
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
5865
+ var _a;
5866
+ let currentRawResponse = undefined;
5867
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
5868
+ const callback = (rawResponse, flatResponse) => {
5869
+ currentRawResponse = rawResponse;
5870
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
5871
+ };
5872
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
5873
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
5874
+ return {
5875
+ flatResponse,
5876
+ rawResponse: {
5877
+ statusCode: currentRawResponse.status,
5878
+ body: currentRawResponse.parsedBody,
5879
+ headers: currentRawResponse.headers.toJSON()
5880
+ }
5881
+ };
5882
+ });
5883
+ const lro = new LroImpl(sendOperation, {
5884
+ resourceGroupName,
5885
+ commitmentPlanName,
5886
+ commitmentPlanAssociationName,
5887
+ options
5888
+ }, deleteAssociationOperationSpec);
5889
+ const poller = new coreLro.LroEngine(lro, {
5890
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5891
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
5892
+ lroResourceLocationConfig: "location"
5893
+ });
5894
+ yield poller.poll();
5895
+ return poller;
5896
+ });
5897
+ }
5898
+ /**
5899
+ * Deletes the association of the Cognitive Services commitment plan.
5900
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5901
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5902
+ * Account
5903
+ * @param commitmentPlanAssociationName The name of the commitment plan association with the Cognitive
5904
+ * Services Account
5905
+ * @param options The options parameters.
5906
+ */
5907
+ beginDeleteAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options) {
5908
+ return tslib.__awaiter(this, void 0, void 0, function* () {
5909
+ const poller = yield this.beginDeleteAssociation(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, options);
5910
+ return poller.pollUntilDone();
5911
+ });
5912
+ }
5054
5913
  /**
5055
5914
  * ListNext
5056
5915
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -5061,6 +5920,36 @@ class CommitmentPlansImpl {
5061
5920
  _listNext(resourceGroupName, accountName, nextLink, options) {
5062
5921
  return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec);
5063
5922
  }
5923
+ /**
5924
+ * ListPlansByResourceGroupNext
5925
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5926
+ * @param nextLink The nextLink from the previous successful call to the ListPlansByResourceGroup
5927
+ * method.
5928
+ * @param options The options parameters.
5929
+ */
5930
+ _listPlansByResourceGroupNext(resourceGroupName, nextLink, options) {
5931
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listPlansByResourceGroupNextOperationSpec);
5932
+ }
5933
+ /**
5934
+ * ListPlansBySubscriptionNext
5935
+ * @param nextLink The nextLink from the previous successful call to the ListPlansBySubscription
5936
+ * method.
5937
+ * @param options The options parameters.
5938
+ */
5939
+ _listPlansBySubscriptionNext(nextLink, options) {
5940
+ return this.client.sendOperationRequest({ nextLink, options }, listPlansBySubscriptionNextOperationSpec);
5941
+ }
5942
+ /**
5943
+ * ListAssociationsNext
5944
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
5945
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
5946
+ * Account
5947
+ * @param nextLink The nextLink from the previous successful call to the ListAssociations method.
5948
+ * @param options The options parameters.
5949
+ */
5950
+ _listAssociationsNext(resourceGroupName, commitmentPlanName, nextLink, options) {
5951
+ return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listAssociationsNextOperationSpec);
5952
+ }
5064
5953
  }
5065
5954
  // Operation Specifications
5066
5955
  const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
@@ -5069,29 +5958,79 @@ const listOperationSpec = {
5069
5958
  httpMethod: "GET",
5070
5959
  responses: {
5071
5960
  200: {
5072
- bodyMapper: CommitmentPlanListResult
5961
+ bodyMapper: CommitmentPlanListResult
5962
+ },
5963
+ default: {
5964
+ bodyMapper: ErrorResponse
5965
+ }
5966
+ },
5967
+ queryParameters: [apiVersion],
5968
+ urlParameters: [
5969
+ $host,
5970
+ resourceGroupName,
5971
+ accountName,
5972
+ subscriptionId
5973
+ ],
5974
+ headerParameters: [accept],
5975
+ serializer: serializer$1
5976
+ };
5977
+ const getOperationSpec = {
5978
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
5979
+ httpMethod: "GET",
5980
+ responses: {
5981
+ 200: {
5982
+ bodyMapper: CommitmentPlan
5983
+ },
5984
+ default: {
5985
+ bodyMapper: ErrorResponse
5986
+ }
5987
+ },
5988
+ queryParameters: [apiVersion],
5989
+ urlParameters: [
5990
+ $host,
5991
+ resourceGroupName,
5992
+ accountName,
5993
+ subscriptionId,
5994
+ commitmentPlanName
5995
+ ],
5996
+ headerParameters: [accept],
5997
+ serializer: serializer$1
5998
+ };
5999
+ const createOrUpdateOperationSpec = {
6000
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
6001
+ httpMethod: "PUT",
6002
+ responses: {
6003
+ 200: {
6004
+ bodyMapper: CommitmentPlan
6005
+ },
6006
+ 201: {
6007
+ bodyMapper: CommitmentPlan
5073
6008
  },
5074
6009
  default: {
5075
6010
  bodyMapper: ErrorResponse
5076
6011
  }
5077
6012
  },
6013
+ requestBody: commitmentPlan,
5078
6014
  queryParameters: [apiVersion],
5079
6015
  urlParameters: [
5080
6016
  $host,
5081
6017
  resourceGroupName,
5082
6018
  accountName,
5083
- subscriptionId
6019
+ subscriptionId,
6020
+ commitmentPlanName
5084
6021
  ],
5085
- headerParameters: [accept],
6022
+ headerParameters: [contentType, accept],
6023
+ mediaType: "json",
5086
6024
  serializer: serializer$1
5087
6025
  };
5088
- const getOperationSpec = {
6026
+ const deleteOperationSpec = {
5089
6027
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
5090
- httpMethod: "GET",
6028
+ httpMethod: "DELETE",
5091
6029
  responses: {
5092
- 200: {
5093
- bodyMapper: CommitmentPlan
5094
- },
6030
+ 200: {},
6031
+ 201: {},
6032
+ 202: {},
6033
+ 204: {},
5095
6034
  default: {
5096
6035
  bodyMapper: ErrorResponse
5097
6036
  }
@@ -5107,8 +6046,8 @@ const getOperationSpec = {
5107
6046
  headerParameters: [accept],
5108
6047
  serializer: serializer$1
5109
6048
  };
5110
- const createOrUpdateOperationSpec = {
5111
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
6049
+ const createOrUpdatePlanOperationSpec = {
6050
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
5112
6051
  httpMethod: "PUT",
5113
6052
  responses: {
5114
6053
  200: {
@@ -5117,6 +6056,12 @@ const createOrUpdateOperationSpec = {
5117
6056
  201: {
5118
6057
  bodyMapper: CommitmentPlan
5119
6058
  },
6059
+ 202: {
6060
+ bodyMapper: CommitmentPlan
6061
+ },
6062
+ 204: {
6063
+ bodyMapper: CommitmentPlan
6064
+ },
5120
6065
  default: {
5121
6066
  bodyMapper: ErrorResponse
5122
6067
  }
@@ -5126,16 +6071,47 @@ const createOrUpdateOperationSpec = {
5126
6071
  urlParameters: [
5127
6072
  $host,
5128
6073
  resourceGroupName,
5129
- accountName,
5130
6074
  subscriptionId,
5131
- commitmentPlanName
6075
+ commitmentPlanName1
5132
6076
  ],
5133
6077
  headerParameters: [contentType, accept],
5134
6078
  mediaType: "json",
5135
6079
  serializer: serializer$1
5136
6080
  };
5137
- const deleteOperationSpec = {
5138
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
6081
+ const updatePlanOperationSpec = {
6082
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
6083
+ httpMethod: "PATCH",
6084
+ responses: {
6085
+ 200: {
6086
+ bodyMapper: CommitmentPlan
6087
+ },
6088
+ 201: {
6089
+ bodyMapper: CommitmentPlan
6090
+ },
6091
+ 202: {
6092
+ bodyMapper: CommitmentPlan
6093
+ },
6094
+ 204: {
6095
+ bodyMapper: CommitmentPlan
6096
+ },
6097
+ default: {
6098
+ bodyMapper: ErrorResponse
6099
+ }
6100
+ },
6101
+ requestBody: commitmentPlan1,
6102
+ queryParameters: [apiVersion],
6103
+ urlParameters: [
6104
+ $host,
6105
+ resourceGroupName,
6106
+ subscriptionId,
6107
+ commitmentPlanName1
6108
+ ],
6109
+ headerParameters: [contentType, accept],
6110
+ mediaType: "json",
6111
+ serializer: serializer$1
6112
+ };
6113
+ const deletePlanOperationSpec = {
6114
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
5139
6115
  httpMethod: "DELETE",
5140
6116
  responses: {
5141
6117
  200: {},
@@ -5150,9 +6126,164 @@ const deleteOperationSpec = {
5150
6126
  urlParameters: [
5151
6127
  $host,
5152
6128
  resourceGroupName,
5153
- accountName,
5154
6129
  subscriptionId,
5155
- commitmentPlanName
6130
+ commitmentPlanName1
6131
+ ],
6132
+ headerParameters: [accept],
6133
+ serializer: serializer$1
6134
+ };
6135
+ const getPlanOperationSpec = {
6136
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}",
6137
+ httpMethod: "GET",
6138
+ responses: {
6139
+ 200: {
6140
+ bodyMapper: CommitmentPlan
6141
+ },
6142
+ default: {
6143
+ bodyMapper: ErrorResponse
6144
+ }
6145
+ },
6146
+ queryParameters: [apiVersion],
6147
+ urlParameters: [
6148
+ $host,
6149
+ resourceGroupName,
6150
+ subscriptionId,
6151
+ commitmentPlanName1
6152
+ ],
6153
+ headerParameters: [accept],
6154
+ serializer: serializer$1
6155
+ };
6156
+ const listPlansByResourceGroupOperationSpec = {
6157
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans",
6158
+ httpMethod: "GET",
6159
+ responses: {
6160
+ 200: {
6161
+ bodyMapper: CommitmentPlanListResult
6162
+ },
6163
+ default: {
6164
+ bodyMapper: ErrorResponse
6165
+ }
6166
+ },
6167
+ queryParameters: [apiVersion],
6168
+ urlParameters: [
6169
+ $host,
6170
+ resourceGroupName,
6171
+ subscriptionId
6172
+ ],
6173
+ headerParameters: [accept],
6174
+ serializer: serializer$1
6175
+ };
6176
+ const listPlansBySubscriptionOperationSpec = {
6177
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/commitmentPlans",
6178
+ httpMethod: "GET",
6179
+ responses: {
6180
+ 200: {
6181
+ bodyMapper: CommitmentPlanListResult
6182
+ },
6183
+ default: {
6184
+ bodyMapper: ErrorResponse
6185
+ }
6186
+ },
6187
+ queryParameters: [apiVersion],
6188
+ urlParameters: [$host, subscriptionId],
6189
+ headerParameters: [accept],
6190
+ serializer: serializer$1
6191
+ };
6192
+ const listAssociationsOperationSpec = {
6193
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations",
6194
+ httpMethod: "GET",
6195
+ responses: {
6196
+ 200: {
6197
+ bodyMapper: CommitmentPlanAccountAssociationListResult
6198
+ },
6199
+ default: {
6200
+ bodyMapper: ErrorResponse
6201
+ }
6202
+ },
6203
+ queryParameters: [apiVersion],
6204
+ urlParameters: [
6205
+ $host,
6206
+ resourceGroupName,
6207
+ subscriptionId,
6208
+ commitmentPlanName1
6209
+ ],
6210
+ headerParameters: [accept],
6211
+ serializer: serializer$1
6212
+ };
6213
+ const getAssociationOperationSpec = {
6214
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
6215
+ httpMethod: "GET",
6216
+ responses: {
6217
+ 200: {
6218
+ bodyMapper: CommitmentPlanAccountAssociation
6219
+ },
6220
+ default: {
6221
+ bodyMapper: ErrorResponse
6222
+ }
6223
+ },
6224
+ queryParameters: [apiVersion],
6225
+ urlParameters: [
6226
+ $host,
6227
+ resourceGroupName,
6228
+ subscriptionId,
6229
+ commitmentPlanName1,
6230
+ commitmentPlanAssociationName
6231
+ ],
6232
+ headerParameters: [accept],
6233
+ serializer: serializer$1
6234
+ };
6235
+ const createOrUpdateAssociationOperationSpec = {
6236
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
6237
+ httpMethod: "PUT",
6238
+ responses: {
6239
+ 200: {
6240
+ bodyMapper: CommitmentPlanAccountAssociation
6241
+ },
6242
+ 201: {
6243
+ bodyMapper: CommitmentPlanAccountAssociation
6244
+ },
6245
+ 202: {
6246
+ bodyMapper: CommitmentPlanAccountAssociation
6247
+ },
6248
+ 204: {
6249
+ bodyMapper: CommitmentPlanAccountAssociation
6250
+ },
6251
+ default: {
6252
+ bodyMapper: ErrorResponse
6253
+ }
6254
+ },
6255
+ requestBody: association,
6256
+ queryParameters: [apiVersion],
6257
+ urlParameters: [
6258
+ $host,
6259
+ resourceGroupName,
6260
+ subscriptionId,
6261
+ commitmentPlanName1,
6262
+ commitmentPlanAssociationName
6263
+ ],
6264
+ headerParameters: [contentType, accept],
6265
+ mediaType: "json",
6266
+ serializer: serializer$1
6267
+ };
6268
+ const deleteAssociationOperationSpec = {
6269
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/commitmentPlans/{commitmentPlanName}/accountAssociations/{commitmentPlanAssociationName}",
6270
+ httpMethod: "DELETE",
6271
+ responses: {
6272
+ 200: {},
6273
+ 201: {},
6274
+ 202: {},
6275
+ 204: {},
6276
+ default: {
6277
+ bodyMapper: ErrorResponse
6278
+ }
6279
+ },
6280
+ queryParameters: [apiVersion],
6281
+ urlParameters: [
6282
+ $host,
6283
+ resourceGroupName,
6284
+ subscriptionId,
6285
+ commitmentPlanName1,
6286
+ commitmentPlanAssociationName
5156
6287
  ],
5157
6288
  headerParameters: [accept],
5158
6289
  serializer: serializer$1
@@ -5168,7 +6299,6 @@ const listNextOperationSpec = {
5168
6299
  bodyMapper: ErrorResponse
5169
6300
  }
5170
6301
  },
5171
- queryParameters: [apiVersion],
5172
6302
  urlParameters: [
5173
6303
  $host,
5174
6304
  resourceGroupName,
@@ -5179,6 +6309,66 @@ const listNextOperationSpec = {
5179
6309
  headerParameters: [accept],
5180
6310
  serializer: serializer$1
5181
6311
  };
6312
+ const listPlansByResourceGroupNextOperationSpec = {
6313
+ path: "{nextLink}",
6314
+ httpMethod: "GET",
6315
+ responses: {
6316
+ 200: {
6317
+ bodyMapper: CommitmentPlanListResult
6318
+ },
6319
+ default: {
6320
+ bodyMapper: ErrorResponse
6321
+ }
6322
+ },
6323
+ urlParameters: [
6324
+ $host,
6325
+ resourceGroupName,
6326
+ subscriptionId,
6327
+ nextLink
6328
+ ],
6329
+ headerParameters: [accept],
6330
+ serializer: serializer$1
6331
+ };
6332
+ const listPlansBySubscriptionNextOperationSpec = {
6333
+ path: "{nextLink}",
6334
+ httpMethod: "GET",
6335
+ responses: {
6336
+ 200: {
6337
+ bodyMapper: CommitmentPlanListResult
6338
+ },
6339
+ default: {
6340
+ bodyMapper: ErrorResponse
6341
+ }
6342
+ },
6343
+ urlParameters: [
6344
+ $host,
6345
+ subscriptionId,
6346
+ nextLink
6347
+ ],
6348
+ headerParameters: [accept],
6349
+ serializer: serializer$1
6350
+ };
6351
+ const listAssociationsNextOperationSpec = {
6352
+ path: "{nextLink}",
6353
+ httpMethod: "GET",
6354
+ responses: {
6355
+ 200: {
6356
+ bodyMapper: CommitmentPlanAccountAssociationListResult
6357
+ },
6358
+ default: {
6359
+ bodyMapper: ErrorResponse
6360
+ }
6361
+ },
6362
+ urlParameters: [
6363
+ $host,
6364
+ resourceGroupName,
6365
+ subscriptionId,
6366
+ nextLink,
6367
+ commitmentPlanName1
6368
+ ],
6369
+ headerParameters: [accept],
6370
+ serializer: serializer$1
6371
+ };
5182
6372
 
5183
6373
  /*
5184
6374
  * Copyright (c) Microsoft Corporation.
@@ -5210,7 +6400,7 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
5210
6400
  requestContentType: "application/json; charset=utf-8",
5211
6401
  credential: credentials
5212
6402
  };
5213
- const packageDetails = `azsdk-js-arm-cognitiveservices/7.3.1`;
6403
+ const packageDetails = `azsdk-js-arm-cognitiveservices/7.4.0`;
5214
6404
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
5215
6405
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
5216
6406
  : `${packageDetails}`;
@@ -5243,7 +6433,7 @@ class CognitiveServicesManagementClient extends coreClient__namespace.ServiceCli
5243
6433
  this.subscriptionId = subscriptionId;
5244
6434
  // Assigning values to Constant parameters
5245
6435
  this.$host = options.$host || "https://management.azure.com";
5246
- this.apiVersion = options.apiVersion || "2022-10-01";
6436
+ this.apiVersion = options.apiVersion || "2022-12-01";
5247
6437
  this.accounts = new AccountsImpl(this);
5248
6438
  this.deletedAccounts = new DeletedAccountsImpl(this);
5249
6439
  this.resourceSkus = new ResourceSkusImpl(this);