@azure/arm-cognitiveservices 7.4.1-alpha.20230717.1 → 7.5.0

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 (156) hide show
  1. package/CHANGELOG.md +37 -10
  2. package/dist/index.js +770 -166
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/accountsCreateSample.js +2 -2
  7. package/dist-esm/samples-dev/accountsDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/accountsGetSample.js +1 -1
  9. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +1 -1
  10. package/dist-esm/samples-dev/accountsListKeysSample.js +1 -1
  11. package/dist-esm/samples-dev/accountsListModelsSample.js +1 -1
  12. package/dist-esm/samples-dev/accountsListSample.js +1 -1
  13. package/dist-esm/samples-dev/accountsListSkusSample.js +1 -1
  14. package/dist-esm/samples-dev/accountsListUsagesSample.js +1 -1
  15. package/dist-esm/samples-dev/accountsRegenerateKeySample.js +1 -1
  16. package/dist-esm/samples-dev/accountsUpdateSample.js +1 -1
  17. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +1 -1
  18. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +1 -1
  19. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js +1 -1
  20. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js +1 -1
  21. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +1 -1
  22. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js +1 -1
  23. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js +1 -1
  24. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +1 -1
  25. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js +1 -1
  26. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js +1 -1
  27. package/dist-esm/samples-dev/commitmentPlansGetSample.js +1 -1
  28. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js +1 -1
  29. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js +1 -1
  30. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js +1 -1
  31. package/dist-esm/samples-dev/commitmentPlansListSample.js +1 -1
  32. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js +1 -1
  33. package/dist-esm/samples-dev/commitmentTiersListSample.js +1 -1
  34. package/dist-esm/samples-dev/deletedAccountsGetSample.js +1 -1
  35. package/dist-esm/samples-dev/deletedAccountsListSample.js +1 -1
  36. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +1 -1
  37. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +3 -5
  38. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js.map +1 -1
  39. package/dist-esm/samples-dev/deploymentsDeleteSample.js +1 -1
  40. package/dist-esm/samples-dev/deploymentsGetSample.js +1 -1
  41. package/dist-esm/samples-dev/deploymentsListSample.js +1 -1
  42. package/dist-esm/samples-dev/modelsListSample.d.ts +2 -0
  43. package/dist-esm/samples-dev/modelsListSample.d.ts.map +1 -0
  44. package/dist-esm/samples-dev/modelsListSample.js +59 -0
  45. package/dist-esm/samples-dev/modelsListSample.js.map +1 -0
  46. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  47. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
  48. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  49. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  50. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
  51. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
  52. package/dist-esm/samples-dev/resourceSkusListSample.js +1 -1
  53. package/dist-esm/samples-dev/usagesListSample.d.ts +2 -0
  54. package/dist-esm/samples-dev/usagesListSample.d.ts.map +1 -0
  55. package/dist-esm/samples-dev/usagesListSample.js +59 -0
  56. package/dist-esm/samples-dev/usagesListSample.js.map +1 -0
  57. package/dist-esm/src/cognitiveServicesManagementClient.d.ts +3 -1
  58. package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -1
  59. package/dist-esm/src/cognitiveServicesManagementClient.js +5 -3
  60. package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -1
  61. package/dist-esm/src/lroImpl.d.ts +6 -11
  62. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  63. package/dist-esm/src/lroImpl.js +12 -20
  64. package/dist-esm/src/lroImpl.js.map +1 -1
  65. package/dist-esm/src/models/index.d.ts +144 -5
  66. package/dist-esm/src/models/index.d.ts.map +1 -1
  67. package/dist-esm/src/models/index.js +24 -0
  68. package/dist-esm/src/models/index.js.map +1 -1
  69. package/dist-esm/src/models/mappers.d.ts +5 -0
  70. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  71. package/dist-esm/src/models/mappers.js +229 -1
  72. package/dist-esm/src/models/mappers.js.map +1 -1
  73. package/dist-esm/src/models/parameters.js +1 -1
  74. package/dist-esm/src/operations/accounts.d.ts +4 -4
  75. package/dist-esm/src/operations/accounts.d.ts.map +1 -1
  76. package/dist-esm/src/operations/accounts.js +26 -14
  77. package/dist-esm/src/operations/accounts.js.map +1 -1
  78. package/dist-esm/src/operations/commitmentPlans.d.ts +7 -7
  79. package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -1
  80. package/dist-esm/src/operations/commitmentPlans.js +66 -42
  81. package/dist-esm/src/operations/commitmentPlans.js.map +1 -1
  82. package/dist-esm/src/operations/deletedAccounts.d.ts +2 -2
  83. package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -1
  84. package/dist-esm/src/operations/deletedAccounts.js +10 -6
  85. package/dist-esm/src/operations/deletedAccounts.js.map +1 -1
  86. package/dist-esm/src/operations/deployments.d.ts +3 -3
  87. package/dist-esm/src/operations/deployments.d.ts.map +1 -1
  88. package/dist-esm/src/operations/deployments.js +26 -11
  89. package/dist-esm/src/operations/deployments.js.map +1 -1
  90. package/dist-esm/src/operations/index.d.ts +2 -0
  91. package/dist-esm/src/operations/index.d.ts.map +1 -1
  92. package/dist-esm/src/operations/index.js +2 -0
  93. package/dist-esm/src/operations/index.js.map +1 -1
  94. package/dist-esm/src/operations/models.d.ts +35 -0
  95. package/dist-esm/src/operations/models.d.ts.map +1 -0
  96. package/dist-esm/src/operations/models.js +150 -0
  97. package/dist-esm/src/operations/models.js.map +1 -0
  98. package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
  99. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  100. package/dist-esm/src/operations/privateEndpointConnections.js +29 -21
  101. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  102. package/dist-esm/src/operations/usages.d.ts +35 -0
  103. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  104. package/dist-esm/src/operations/usages.js +150 -0
  105. package/dist-esm/src/operations/usages.js.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/accounts.d.ts +4 -4
  107. package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -1
  108. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +7 -7
  109. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -1
  110. package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts +2 -2
  111. package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -1
  112. package/dist-esm/src/operationsInterfaces/deployments.d.ts +3 -3
  113. package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -1
  114. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  115. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  116. package/dist-esm/src/operationsInterfaces/index.js +2 -0
  117. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  118. package/dist-esm/src/operationsInterfaces/models.d.ts +12 -0
  119. package/dist-esm/src/operationsInterfaces/models.d.ts.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/models.js +9 -0
  121. package/dist-esm/src/operationsInterfaces/models.js.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +3 -3
  123. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
  124. package/dist-esm/src/operationsInterfaces/usages.d.ts +12 -0
  125. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  128. package/dist-esm/test/cognitiveservices_congitiveservice.spec.js +1 -1
  129. package/dist-esm/test/cognitiveservices_congitiveservice.spec.js.map +1 -1
  130. package/dist-esm/test/cognitiveservices_openai.spec.js +1 -2
  131. package/dist-esm/test/cognitiveservices_openai.spec.js.map +1 -1
  132. package/package.json +7 -7
  133. package/review/arm-cognitiveservices.api.md +127 -16
  134. package/src/cognitiveServicesManagementClient.ts +10 -2
  135. package/src/lroImpl.ts +31 -23
  136. package/src/models/index.ts +160 -5
  137. package/src/models/mappers.ts +236 -0
  138. package/src/models/parameters.ts +1 -1
  139. package/src/operations/accounts.ts +41 -31
  140. package/src/operations/commitmentPlans.ts +77 -64
  141. package/src/operations/deletedAccounts.ts +15 -11
  142. package/src/operations/deployments.ts +36 -22
  143. package/src/operations/index.ts +2 -0
  144. package/src/operations/models.ts +170 -0
  145. package/src/operations/privateEndpointConnections.ts +28 -21
  146. package/src/operations/usages.ts +170 -0
  147. package/src/operationsInterfaces/accounts.ts +6 -6
  148. package/src/operationsInterfaces/commitmentPlans.ts +10 -10
  149. package/src/operationsInterfaces/deletedAccounts.ts +2 -2
  150. package/src/operationsInterfaces/deployments.ts +4 -4
  151. package/src/operationsInterfaces/index.ts +2 -0
  152. package/src/operationsInterfaces/models.ts +24 -0
  153. package/src/operationsInterfaces/privateEndpointConnections.ts +4 -4
  154. package/src/operationsInterfaces/usages.ts +24 -0
  155. package/types/arm-cognitiveservices.d.ts +199 -21
  156. package/types/tsdoc-metadata.json +1 -1
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  Account,
20
24
  AccountsListByResourceGroupNextOptionalParams,
@@ -278,8 +282,8 @@ export class AccountsImpl implements Accounts {
278
282
  account: Account,
279
283
  options?: AccountsCreateOptionalParams
280
284
  ): Promise<
281
- PollerLike<
282
- PollOperationState<AccountsCreateResponse>,
285
+ SimplePollerLike<
286
+ OperationState<AccountsCreateResponse>,
283
287
  AccountsCreateResponse
284
288
  >
285
289
  > {
@@ -289,7 +293,7 @@ export class AccountsImpl implements Accounts {
289
293
  ): Promise<AccountsCreateResponse> => {
290
294
  return this.client.sendOperationRequest(args, spec);
291
295
  };
292
- const sendOperation = async (
296
+ const sendOperationFn = async (
293
297
  args: coreClient.OperationArguments,
294
298
  spec: coreClient.OperationSpec
295
299
  ) => {
@@ -322,13 +326,16 @@ export class AccountsImpl implements Accounts {
322
326
  };
323
327
  };
324
328
 
325
- const lro = new LroImpl(
326
- sendOperation,
327
- { resourceGroupName, accountName, account, options },
328
- createOperationSpec
329
- );
330
- const poller = new LroEngine(lro, {
331
- resumeFrom: options?.resumeFrom,
329
+ const lro = createLroSpec({
330
+ sendOperationFn,
331
+ args: { resourceGroupName, accountName, account, options },
332
+ spec: createOperationSpec
333
+ });
334
+ const poller = await createHttpPoller<
335
+ AccountsCreateResponse,
336
+ OperationState<AccountsCreateResponse>
337
+ >(lro, {
338
+ restoreFrom: options?.resumeFrom,
332
339
  intervalInMs: options?.updateIntervalInMs
333
340
  });
334
341
  await poller.poll();
@@ -371,8 +378,8 @@ export class AccountsImpl implements Accounts {
371
378
  account: Account,
372
379
  options?: AccountsUpdateOptionalParams
373
380
  ): Promise<
374
- PollerLike<
375
- PollOperationState<AccountsUpdateResponse>,
381
+ SimplePollerLike<
382
+ OperationState<AccountsUpdateResponse>,
376
383
  AccountsUpdateResponse
377
384
  >
378
385
  > {
@@ -382,7 +389,7 @@ export class AccountsImpl implements Accounts {
382
389
  ): Promise<AccountsUpdateResponse> => {
383
390
  return this.client.sendOperationRequest(args, spec);
384
391
  };
385
- const sendOperation = async (
392
+ const sendOperationFn = async (
386
393
  args: coreClient.OperationArguments,
387
394
  spec: coreClient.OperationSpec
388
395
  ) => {
@@ -415,13 +422,16 @@ export class AccountsImpl implements Accounts {
415
422
  };
416
423
  };
417
424
 
418
- const lro = new LroImpl(
419
- sendOperation,
420
- { resourceGroupName, accountName, account, options },
421
- updateOperationSpec
422
- );
423
- const poller = new LroEngine(lro, {
424
- resumeFrom: options?.resumeFrom,
425
+ const lro = createLroSpec({
426
+ sendOperationFn,
427
+ args: { resourceGroupName, accountName, account, options },
428
+ spec: updateOperationSpec
429
+ });
430
+ const poller = await createHttpPoller<
431
+ AccountsUpdateResponse,
432
+ OperationState<AccountsUpdateResponse>
433
+ >(lro, {
434
+ restoreFrom: options?.resumeFrom,
425
435
  intervalInMs: options?.updateIntervalInMs
426
436
  });
427
437
  await poller.poll();
@@ -460,14 +470,14 @@ export class AccountsImpl implements Accounts {
460
470
  resourceGroupName: string,
461
471
  accountName: string,
462
472
  options?: AccountsDeleteOptionalParams
463
- ): Promise<PollerLike<PollOperationState<void>, void>> {
473
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
464
474
  const directSendOperation = async (
465
475
  args: coreClient.OperationArguments,
466
476
  spec: coreClient.OperationSpec
467
477
  ): Promise<void> => {
468
478
  return this.client.sendOperationRequest(args, spec);
469
479
  };
470
- const sendOperation = async (
480
+ const sendOperationFn = async (
471
481
  args: coreClient.OperationArguments,
472
482
  spec: coreClient.OperationSpec
473
483
  ) => {
@@ -500,13 +510,13 @@ export class AccountsImpl implements Accounts {
500
510
  };
501
511
  };
502
512
 
503
- const lro = new LroImpl(
504
- sendOperation,
505
- { resourceGroupName, accountName, options },
506
- deleteOperationSpec
507
- );
508
- const poller = new LroEngine(lro, {
509
- resumeFrom: options?.resumeFrom,
513
+ const lro = createLroSpec({
514
+ sendOperationFn,
515
+ args: { resourceGroupName, accountName, options },
516
+ spec: deleteOperationSpec
517
+ });
518
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
519
+ restoreFrom: options?.resumeFrom,
510
520
  intervalInMs: options?.updateIntervalInMs
511
521
  });
512
522
  await poller.poll();
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  CommitmentPlan,
20
24
  CommitmentPlansListNextOptionalParams,
@@ -435,14 +439,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
435
439
  accountName: string,
436
440
  commitmentPlanName: string,
437
441
  options?: CommitmentPlansDeleteOptionalParams
438
- ): Promise<PollerLike<PollOperationState<void>, void>> {
442
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
439
443
  const directSendOperation = async (
440
444
  args: coreClient.OperationArguments,
441
445
  spec: coreClient.OperationSpec
442
446
  ): Promise<void> => {
443
447
  return this.client.sendOperationRequest(args, spec);
444
448
  };
445
- const sendOperation = async (
449
+ const sendOperationFn = async (
446
450
  args: coreClient.OperationArguments,
447
451
  spec: coreClient.OperationSpec
448
452
  ) => {
@@ -475,13 +479,13 @@ export class CommitmentPlansImpl implements CommitmentPlans {
475
479
  };
476
480
  };
477
481
 
478
- const lro = new LroImpl(
479
- sendOperation,
480
- { resourceGroupName, accountName, commitmentPlanName, options },
481
- deleteOperationSpec
482
- );
483
- const poller = new LroEngine(lro, {
484
- resumeFrom: options?.resumeFrom,
482
+ const lro = createLroSpec({
483
+ sendOperationFn,
484
+ args: { resourceGroupName, accountName, commitmentPlanName, options },
485
+ spec: deleteOperationSpec
486
+ });
487
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
488
+ restoreFrom: options?.resumeFrom,
485
489
  intervalInMs: options?.updateIntervalInMs
486
490
  });
487
491
  await poller.poll();
@@ -525,8 +529,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
525
529
  commitmentPlan: CommitmentPlan,
526
530
  options?: CommitmentPlansCreateOrUpdatePlanOptionalParams
527
531
  ): Promise<
528
- PollerLike<
529
- PollOperationState<CommitmentPlansCreateOrUpdatePlanResponse>,
532
+ SimplePollerLike<
533
+ OperationState<CommitmentPlansCreateOrUpdatePlanResponse>,
530
534
  CommitmentPlansCreateOrUpdatePlanResponse
531
535
  >
532
536
  > {
@@ -536,7 +540,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
536
540
  ): Promise<CommitmentPlansCreateOrUpdatePlanResponse> => {
537
541
  return this.client.sendOperationRequest(args, spec);
538
542
  };
539
- const sendOperation = async (
543
+ const sendOperationFn = async (
540
544
  args: coreClient.OperationArguments,
541
545
  spec: coreClient.OperationSpec
542
546
  ) => {
@@ -569,15 +573,18 @@ export class CommitmentPlansImpl implements CommitmentPlans {
569
573
  };
570
574
  };
571
575
 
572
- const lro = new LroImpl(
573
- sendOperation,
574
- { resourceGroupName, commitmentPlanName, commitmentPlan, options },
575
- createOrUpdatePlanOperationSpec
576
- );
577
- const poller = new LroEngine(lro, {
578
- resumeFrom: options?.resumeFrom,
576
+ const lro = createLroSpec({
577
+ sendOperationFn,
578
+ args: { resourceGroupName, commitmentPlanName, commitmentPlan, options },
579
+ spec: createOrUpdatePlanOperationSpec
580
+ });
581
+ const poller = await createHttpPoller<
582
+ CommitmentPlansCreateOrUpdatePlanResponse,
583
+ OperationState<CommitmentPlansCreateOrUpdatePlanResponse>
584
+ >(lro, {
585
+ restoreFrom: options?.resumeFrom,
579
586
  intervalInMs: options?.updateIntervalInMs,
580
- lroResourceLocationConfig: "azure-async-operation"
587
+ resourceLocationConfig: "azure-async-operation"
581
588
  });
582
589
  await poller.poll();
583
590
  return poller;
@@ -620,8 +627,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
620
627
  commitmentPlan: PatchResourceTagsAndSku,
621
628
  options?: CommitmentPlansUpdatePlanOptionalParams
622
629
  ): Promise<
623
- PollerLike<
624
- PollOperationState<CommitmentPlansUpdatePlanResponse>,
630
+ SimplePollerLike<
631
+ OperationState<CommitmentPlansUpdatePlanResponse>,
625
632
  CommitmentPlansUpdatePlanResponse
626
633
  >
627
634
  > {
@@ -631,7 +638,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
631
638
  ): Promise<CommitmentPlansUpdatePlanResponse> => {
632
639
  return this.client.sendOperationRequest(args, spec);
633
640
  };
634
- const sendOperation = async (
641
+ const sendOperationFn = async (
635
642
  args: coreClient.OperationArguments,
636
643
  spec: coreClient.OperationSpec
637
644
  ) => {
@@ -664,15 +671,18 @@ export class CommitmentPlansImpl implements CommitmentPlans {
664
671
  };
665
672
  };
666
673
 
667
- const lro = new LroImpl(
668
- sendOperation,
669
- { resourceGroupName, commitmentPlanName, commitmentPlan, options },
670
- updatePlanOperationSpec
671
- );
672
- const poller = new LroEngine(lro, {
673
- resumeFrom: options?.resumeFrom,
674
+ const lro = createLroSpec({
675
+ sendOperationFn,
676
+ args: { resourceGroupName, commitmentPlanName, commitmentPlan, options },
677
+ spec: updatePlanOperationSpec
678
+ });
679
+ const poller = await createHttpPoller<
680
+ CommitmentPlansUpdatePlanResponse,
681
+ OperationState<CommitmentPlansUpdatePlanResponse>
682
+ >(lro, {
683
+ restoreFrom: options?.resumeFrom,
674
684
  intervalInMs: options?.updateIntervalInMs,
675
- lroResourceLocationConfig: "location"
685
+ resourceLocationConfig: "location"
676
686
  });
677
687
  await poller.poll();
678
688
  return poller;
@@ -712,14 +722,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
712
722
  resourceGroupName: string,
713
723
  commitmentPlanName: string,
714
724
  options?: CommitmentPlansDeletePlanOptionalParams
715
- ): Promise<PollerLike<PollOperationState<void>, void>> {
725
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
716
726
  const directSendOperation = async (
717
727
  args: coreClient.OperationArguments,
718
728
  spec: coreClient.OperationSpec
719
729
  ): Promise<void> => {
720
730
  return this.client.sendOperationRequest(args, spec);
721
731
  };
722
- const sendOperation = async (
732
+ const sendOperationFn = async (
723
733
  args: coreClient.OperationArguments,
724
734
  spec: coreClient.OperationSpec
725
735
  ) => {
@@ -752,15 +762,15 @@ export class CommitmentPlansImpl implements CommitmentPlans {
752
762
  };
753
763
  };
754
764
 
755
- const lro = new LroImpl(
756
- sendOperation,
757
- { resourceGroupName, commitmentPlanName, options },
758
- deletePlanOperationSpec
759
- );
760
- const poller = new LroEngine(lro, {
761
- resumeFrom: options?.resumeFrom,
765
+ const lro = createLroSpec({
766
+ sendOperationFn,
767
+ args: { resourceGroupName, commitmentPlanName, options },
768
+ spec: deletePlanOperationSpec
769
+ });
770
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
771
+ restoreFrom: options?.resumeFrom,
762
772
  intervalInMs: options?.updateIntervalInMs,
763
- lroResourceLocationConfig: "location"
773
+ resourceLocationConfig: "location"
764
774
  });
765
775
  await poller.poll();
766
776
  return poller;
@@ -893,8 +903,8 @@ export class CommitmentPlansImpl implements CommitmentPlans {
893
903
  association: CommitmentPlanAccountAssociation,
894
904
  options?: CommitmentPlansCreateOrUpdateAssociationOptionalParams
895
905
  ): Promise<
896
- PollerLike<
897
- PollOperationState<CommitmentPlansCreateOrUpdateAssociationResponse>,
906
+ SimplePollerLike<
907
+ OperationState<CommitmentPlansCreateOrUpdateAssociationResponse>,
898
908
  CommitmentPlansCreateOrUpdateAssociationResponse
899
909
  >
900
910
  > {
@@ -904,7 +914,7 @@ export class CommitmentPlansImpl implements CommitmentPlans {
904
914
  ): Promise<CommitmentPlansCreateOrUpdateAssociationResponse> => {
905
915
  return this.client.sendOperationRequest(args, spec);
906
916
  };
907
- const sendOperation = async (
917
+ const sendOperationFn = async (
908
918
  args: coreClient.OperationArguments,
909
919
  spec: coreClient.OperationSpec
910
920
  ) => {
@@ -937,21 +947,24 @@ export class CommitmentPlansImpl implements CommitmentPlans {
937
947
  };
938
948
  };
939
949
 
940
- const lro = new LroImpl(
941
- sendOperation,
942
- {
950
+ const lro = createLroSpec({
951
+ sendOperationFn,
952
+ args: {
943
953
  resourceGroupName,
944
954
  commitmentPlanName,
945
955
  commitmentPlanAssociationName,
946
956
  association,
947
957
  options
948
958
  },
949
- createOrUpdateAssociationOperationSpec
950
- );
951
- const poller = new LroEngine(lro, {
952
- resumeFrom: options?.resumeFrom,
959
+ spec: createOrUpdateAssociationOperationSpec
960
+ });
961
+ const poller = await createHttpPoller<
962
+ CommitmentPlansCreateOrUpdateAssociationResponse,
963
+ OperationState<CommitmentPlansCreateOrUpdateAssociationResponse>
964
+ >(lro, {
965
+ restoreFrom: options?.resumeFrom,
953
966
  intervalInMs: options?.updateIntervalInMs,
954
- lroResourceLocationConfig: "azure-async-operation"
967
+ resourceLocationConfig: "azure-async-operation"
955
968
  });
956
969
  await poller.poll();
957
970
  return poller;
@@ -998,14 +1011,14 @@ export class CommitmentPlansImpl implements CommitmentPlans {
998
1011
  commitmentPlanName: string,
999
1012
  commitmentPlanAssociationName: string,
1000
1013
  options?: CommitmentPlansDeleteAssociationOptionalParams
1001
- ): Promise<PollerLike<PollOperationState<void>, void>> {
1014
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
1002
1015
  const directSendOperation = async (
1003
1016
  args: coreClient.OperationArguments,
1004
1017
  spec: coreClient.OperationSpec
1005
1018
  ): Promise<void> => {
1006
1019
  return this.client.sendOperationRequest(args, spec);
1007
1020
  };
1008
- const sendOperation = async (
1021
+ const sendOperationFn = async (
1009
1022
  args: coreClient.OperationArguments,
1010
1023
  spec: coreClient.OperationSpec
1011
1024
  ) => {
@@ -1038,20 +1051,20 @@ export class CommitmentPlansImpl implements CommitmentPlans {
1038
1051
  };
1039
1052
  };
1040
1053
 
1041
- const lro = new LroImpl(
1042
- sendOperation,
1043
- {
1054
+ const lro = createLroSpec({
1055
+ sendOperationFn,
1056
+ args: {
1044
1057
  resourceGroupName,
1045
1058
  commitmentPlanName,
1046
1059
  commitmentPlanAssociationName,
1047
1060
  options
1048
1061
  },
1049
- deleteAssociationOperationSpec
1050
- );
1051
- const poller = new LroEngine(lro, {
1052
- resumeFrom: options?.resumeFrom,
1062
+ spec: deleteAssociationOperationSpec
1063
+ });
1064
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
1065
+ restoreFrom: options?.resumeFrom,
1053
1066
  intervalInMs: options?.updateIntervalInMs,
1054
- lroResourceLocationConfig: "location"
1067
+ resourceLocationConfig: "location"
1055
1068
  });
1056
1069
  await poller.poll();
1057
1070
  return poller;
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  Account,
20
24
  DeletedAccountsListNextOptionalParams,
@@ -124,14 +128,14 @@ export class DeletedAccountsImpl implements DeletedAccounts {
124
128
  resourceGroupName: string,
125
129
  accountName: string,
126
130
  options?: DeletedAccountsPurgeOptionalParams
127
- ): Promise<PollerLike<PollOperationState<void>, void>> {
131
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
128
132
  const directSendOperation = async (
129
133
  args: coreClient.OperationArguments,
130
134
  spec: coreClient.OperationSpec
131
135
  ): Promise<void> => {
132
136
  return this.client.sendOperationRequest(args, spec);
133
137
  };
134
- const sendOperation = async (
138
+ const sendOperationFn = async (
135
139
  args: coreClient.OperationArguments,
136
140
  spec: coreClient.OperationSpec
137
141
  ) => {
@@ -164,13 +168,13 @@ export class DeletedAccountsImpl implements DeletedAccounts {
164
168
  };
165
169
  };
166
170
 
167
- const lro = new LroImpl(
168
- sendOperation,
169
- { location, resourceGroupName, accountName, options },
170
- purgeOperationSpec
171
- );
172
- const poller = new LroEngine(lro, {
173
- resumeFrom: options?.resumeFrom,
171
+ const lro = createLroSpec({
172
+ sendOperationFn,
173
+ args: { location, resourceGroupName, accountName, options },
174
+ spec: purgeOperationSpec
175
+ });
176
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
177
+ restoreFrom: options?.resumeFrom,
174
178
  intervalInMs: options?.updateIntervalInMs
175
179
  });
176
180
  await poller.poll();
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  Deployment,
20
24
  DeploymentsListNextOptionalParams,
@@ -168,8 +172,8 @@ export class DeploymentsImpl implements Deployments {
168
172
  deployment: Deployment,
169
173
  options?: DeploymentsCreateOrUpdateOptionalParams
170
174
  ): Promise<
171
- PollerLike<
172
- PollOperationState<DeploymentsCreateOrUpdateResponse>,
175
+ SimplePollerLike<
176
+ OperationState<DeploymentsCreateOrUpdateResponse>,
173
177
  DeploymentsCreateOrUpdateResponse
174
178
  >
175
179
  > {
@@ -179,7 +183,7 @@ export class DeploymentsImpl implements Deployments {
179
183
  ): Promise<DeploymentsCreateOrUpdateResponse> => {
180
184
  return this.client.sendOperationRequest(args, spec);
181
185
  };
182
- const sendOperation = async (
186
+ const sendOperationFn = async (
183
187
  args: coreClient.OperationArguments,
184
188
  spec: coreClient.OperationSpec
185
189
  ) => {
@@ -212,14 +216,24 @@ export class DeploymentsImpl implements Deployments {
212
216
  };
213
217
  };
214
218
 
215
- const lro = new LroImpl(
216
- sendOperation,
217
- { resourceGroupName, accountName, deploymentName, deployment, options },
218
- createOrUpdateOperationSpec
219
- );
220
- const poller = new LroEngine(lro, {
221
- resumeFrom: options?.resumeFrom,
222
- intervalInMs: options?.updateIntervalInMs
219
+ const lro = createLroSpec({
220
+ sendOperationFn,
221
+ args: {
222
+ resourceGroupName,
223
+ accountName,
224
+ deploymentName,
225
+ deployment,
226
+ options
227
+ },
228
+ spec: createOrUpdateOperationSpec
229
+ });
230
+ const poller = await createHttpPoller<
231
+ DeploymentsCreateOrUpdateResponse,
232
+ OperationState<DeploymentsCreateOrUpdateResponse>
233
+ >(lro, {
234
+ restoreFrom: options?.resumeFrom,
235
+ intervalInMs: options?.updateIntervalInMs,
236
+ resourceLocationConfig: "azure-async-operation"
223
237
  });
224
238
  await poller.poll();
225
239
  return poller;
@@ -262,14 +276,14 @@ export class DeploymentsImpl implements Deployments {
262
276
  accountName: string,
263
277
  deploymentName: string,
264
278
  options?: DeploymentsDeleteOptionalParams
265
- ): Promise<PollerLike<PollOperationState<void>, void>> {
279
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
266
280
  const directSendOperation = async (
267
281
  args: coreClient.OperationArguments,
268
282
  spec: coreClient.OperationSpec
269
283
  ): Promise<void> => {
270
284
  return this.client.sendOperationRequest(args, spec);
271
285
  };
272
- const sendOperation = async (
286
+ const sendOperationFn = async (
273
287
  args: coreClient.OperationArguments,
274
288
  spec: coreClient.OperationSpec
275
289
  ) => {
@@ -302,13 +316,13 @@ export class DeploymentsImpl implements Deployments {
302
316
  };
303
317
  };
304
318
 
305
- const lro = new LroImpl(
306
- sendOperation,
307
- { resourceGroupName, accountName, deploymentName, options },
308
- deleteOperationSpec
309
- );
310
- const poller = new LroEngine(lro, {
311
- resumeFrom: options?.resumeFrom,
319
+ const lro = createLroSpec({
320
+ sendOperationFn,
321
+ args: { resourceGroupName, accountName, deploymentName, options },
322
+ spec: deleteOperationSpec
323
+ });
324
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
325
+ restoreFrom: options?.resumeFrom,
312
326
  intervalInMs: options?.updateIntervalInMs
313
327
  });
314
328
  await poller.poll();
@@ -9,8 +9,10 @@
9
9
  export * from "./accounts";
10
10
  export * from "./deletedAccounts";
11
11
  export * from "./resourceSkus";
12
+ export * from "./usages";
12
13
  export * from "./operations";
13
14
  export * from "./commitmentTiers";
15
+ export * from "./models";
14
16
  export * from "./privateEndpointConnections";
15
17
  export * from "./privateLinkResources";
16
18
  export * from "./deployments";