@azure/arm-powerbidedicated 4.0.2-alpha.20250620.1 → 4.0.2-alpha.20250721.1

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 (59) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +38 -17
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/autoScaleVCores.js +19 -53
  6. package/dist/browser/operations/autoScaleVCores.js.map +1 -1
  7. package/dist/browser/operations/capacities.js +74 -83
  8. package/dist/browser/operations/capacities.js.map +1 -1
  9. package/dist/browser/operations/operations.js +23 -40
  10. package/dist/browser/operations/operations.js.map +1 -1
  11. package/dist/browser/pagingHelper.js +2 -4
  12. package/dist/browser/pagingHelper.js.map +1 -1
  13. package/dist/browser/powerBIDedicated.js +16 -5
  14. package/dist/browser/powerBIDedicated.js.map +1 -1
  15. package/dist/commonjs/lroImpl.js +11 -3
  16. package/dist/commonjs/lroImpl.js.map +1 -1
  17. package/dist/commonjs/models/mappers.js +38 -17
  18. package/dist/commonjs/models/mappers.js.map +1 -1
  19. package/dist/commonjs/operations/autoScaleVCores.js +19 -52
  20. package/dist/commonjs/operations/autoScaleVCores.js.map +1 -1
  21. package/dist/commonjs/operations/capacities.js +74 -82
  22. package/dist/commonjs/operations/capacities.js.map +1 -1
  23. package/dist/commonjs/operations/operations.js +23 -39
  24. package/dist/commonjs/operations/operations.js.map +1 -1
  25. package/dist/commonjs/pagingHelper.js +2 -4
  26. package/dist/commonjs/pagingHelper.js.map +1 -1
  27. package/dist/commonjs/powerBIDedicated.js +16 -5
  28. package/dist/commonjs/powerBIDedicated.js.map +1 -1
  29. package/dist/commonjs/tsdoc-metadata.json +11 -11
  30. package/dist/esm/lroImpl.js +11 -3
  31. package/dist/esm/lroImpl.js.map +1 -1
  32. package/dist/esm/models/mappers.js +38 -17
  33. package/dist/esm/models/mappers.js.map +1 -1
  34. package/dist/esm/operations/autoScaleVCores.js +19 -53
  35. package/dist/esm/operations/autoScaleVCores.js.map +1 -1
  36. package/dist/esm/operations/capacities.js +74 -83
  37. package/dist/esm/operations/capacities.js.map +1 -1
  38. package/dist/esm/operations/operations.js +23 -40
  39. package/dist/esm/operations/operations.js.map +1 -1
  40. package/dist/esm/pagingHelper.js +2 -4
  41. package/dist/esm/pagingHelper.js.map +1 -1
  42. package/dist/esm/powerBIDedicated.js +16 -5
  43. package/dist/esm/powerBIDedicated.js.map +1 -1
  44. package/dist/react-native/lroImpl.js +11 -3
  45. package/dist/react-native/lroImpl.js.map +1 -1
  46. package/dist/react-native/models/mappers.js +38 -17
  47. package/dist/react-native/models/mappers.js.map +1 -1
  48. package/dist/react-native/operations/autoScaleVCores.js +19 -53
  49. package/dist/react-native/operations/autoScaleVCores.js.map +1 -1
  50. package/dist/react-native/operations/capacities.js +74 -83
  51. package/dist/react-native/operations/capacities.js.map +1 -1
  52. package/dist/react-native/operations/operations.js +23 -40
  53. package/dist/react-native/operations/operations.js.map +1 -1
  54. package/dist/react-native/pagingHelper.js +2 -4
  55. package/dist/react-native/pagingHelper.js.map +1 -1
  56. package/dist/react-native/powerBIDedicated.js +16 -5
  57. package/dist/react-native/powerBIDedicated.js.map +1 -1
  58. package/package.json +2 -2
  59. /package/review/{arm-powerbidedicated.api.md → arm-powerbidedicated-node.api.md} +0 -0
@@ -5,13 +5,13 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing AutoScaleVCores operations. */
14
13
  export class AutoScaleVCoresImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class AutoScaleVCores class.
17
17
  * @param client Reference to the service client
@@ -35,39 +35,22 @@ export class AutoScaleVCoresImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
42
42
  }
43
43
  };
44
44
  }
45
- listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
46
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
47
- let result;
48
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
49
- yield yield __await(result.value || []);
50
- });
45
+ async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
46
+ let result;
47
+ result = await this._listByResourceGroup(resourceGroupName, options);
48
+ yield result.value || [];
51
49
  }
52
- listByResourceGroupPagingAll(resourceGroupName, options) {
53
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
54
- var _a, e_1, _b, _c;
55
- try {
56
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
57
- _c = _f.value;
58
- _d = false;
59
- const page = _c;
60
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
61
- }
62
- }
63
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
64
- finally {
65
- try {
66
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
67
- }
68
- finally { if (e_1) throw e_1.error; }
69
- }
70
- });
50
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
51
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
52
+ yield* page;
53
+ }
71
54
  }
72
55
  /**
73
56
  * Lists all the auto scale v-cores for the given subscription.
@@ -83,39 +66,22 @@ export class AutoScaleVCoresImpl {
83
66
  return this;
84
67
  },
85
68
  byPage: (settings) => {
86
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
69
+ if (settings?.maxPageSize) {
87
70
  throw new Error("maxPageSize is not supported by this operation.");
88
71
  }
89
72
  return this.listBySubscriptionPagingPage(options, settings);
90
73
  }
91
74
  };
92
75
  }
93
- listBySubscriptionPagingPage(options, _settings) {
94
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
95
- let result;
96
- result = yield __await(this._listBySubscription(options));
97
- yield yield __await(result.value || []);
98
- });
76
+ async *listBySubscriptionPagingPage(options, _settings) {
77
+ let result;
78
+ result = await this._listBySubscription(options);
79
+ yield result.value || [];
99
80
  }
100
- listBySubscriptionPagingAll(options) {
101
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
102
- var _a, e_2, _b, _c;
103
- try {
104
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
105
- _c = _f.value;
106
- _d = false;
107
- const page = _c;
108
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
109
- }
110
- }
111
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
112
- finally {
113
- try {
114
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
115
- }
116
- finally { if (e_2) throw e_2.error; }
117
- }
118
- });
81
+ async *listBySubscriptionPagingAll(options) {
82
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
83
+ yield* page;
84
+ }
119
85
  }
120
86
  /**
121
87
  * Gets details about the specified auto scale v-core.
@@ -1 +1 @@
1
- {"version":3,"file":"autoScaleVCores.js","sourceRoot":"","sources":["../../../src/operations/autoScaleVCores.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAkBtD,4CAA4C;AAC5C,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AU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AutoScaleVCores } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { PowerBIDedicated } from \"../powerBIDedicated.js\";\nimport {\n AutoScaleVCore,\n AutoScaleVCoresListByResourceGroupOptionalParams,\n AutoScaleVCoresListByResourceGroupResponse,\n AutoScaleVCoresListBySubscriptionOptionalParams,\n AutoScaleVCoresListBySubscriptionResponse,\n AutoScaleVCoresGetOptionalParams,\n AutoScaleVCoresGetResponse,\n AutoScaleVCoresCreateOptionalParams,\n AutoScaleVCoresCreateResponse,\n AutoScaleVCoresDeleteOptionalParams,\n AutoScaleVCoreUpdateParameters,\n AutoScaleVCoresUpdateOptionalParams,\n AutoScaleVCoresUpdateResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoScaleVCores operations. */\nexport class AutoScaleVCoresImpl implements AutoScaleVCores {\n private readonly client: PowerBIDedicated;\n\n /**\n * Initialize a new instance of the class AutoScaleVCores class.\n * @param client Reference to the service client\n */\n constructor(client: PowerBIDedicated) {\n this.client = client;\n }\n\n /**\n * Gets all the auto scale v-cores for the given resource group.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<AutoScaleVCore> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<AutoScaleVCore[]> {\n let result: AutoScaleVCoresListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): AsyncIterableIterator<AutoScaleVCore> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all the auto scale v-cores for the given subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<AutoScaleVCore> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<AutoScaleVCore[]> {\n let result: AutoScaleVCoresListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): AsyncIterableIterator<AutoScaleVCore> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets details about the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n vcoreName: string,\n options?: AutoScaleVCoresGetOptionalParams\n ): Promise<AutoScaleVCoresGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, options },\n getOperationSpec\n );\n }\n\n /**\n * Provisions the specified auto scale v-core based on the configuration specified in the request.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param vCoreParameters Contains the information used to provision the auto scale v-core.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n vcoreName: string,\n vCoreParameters: AutoScaleVCore,\n options?: AutoScaleVCoresCreateOptionalParams\n ): Promise<AutoScaleVCoresCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, vCoreParameters, options },\n createOperationSpec\n );\n }\n\n /**\n * Deletes the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n vcoreName: string,\n options?: AutoScaleVCoresDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Updates the current state of the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale\n * v-core.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n vcoreName: string,\n vCoreUpdateParameters: AutoScaleVCoreUpdateParameters,\n options?: AutoScaleVCoresUpdateOptionalParams\n ): Promise<AutoScaleVCoresUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, vCoreUpdateParameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * Gets all the auto scale v-cores for the given resource group.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): Promise<AutoScaleVCoresListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec\n );\n }\n\n /**\n * Lists all the auto scale v-cores for the given subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): Promise<AutoScaleVCoresListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.vCoreParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.vCoreUpdateParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCoreListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCoreListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"autoScaleVCores.js","sourceRoot":"","sources":["../../../src/operations/autoScaleVCores.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAkBtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,C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C,qBAAqB;IAC7C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EACF,yHAAyH;IAC3H,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EACF,sFAAsF;IACxF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { AutoScaleVCores } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { PowerBIDedicated } from \"../powerBIDedicated.js\";\nimport {\n AutoScaleVCore,\n AutoScaleVCoresListByResourceGroupOptionalParams,\n AutoScaleVCoresListByResourceGroupResponse,\n AutoScaleVCoresListBySubscriptionOptionalParams,\n AutoScaleVCoresListBySubscriptionResponse,\n AutoScaleVCoresGetOptionalParams,\n AutoScaleVCoresGetResponse,\n AutoScaleVCoresCreateOptionalParams,\n AutoScaleVCoresCreateResponse,\n AutoScaleVCoresDeleteOptionalParams,\n AutoScaleVCoreUpdateParameters,\n AutoScaleVCoresUpdateOptionalParams,\n AutoScaleVCoresUpdateResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AutoScaleVCores operations. */\nexport class AutoScaleVCoresImpl implements AutoScaleVCores {\n private readonly client: PowerBIDedicated;\n\n /**\n * Initialize a new instance of the class AutoScaleVCores class.\n * @param client Reference to the service client\n */\n constructor(client: PowerBIDedicated) {\n this.client = client;\n }\n\n /**\n * Gets all the auto scale v-cores for the given resource group.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<AutoScaleVCore> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<AutoScaleVCore[]> {\n let result: AutoScaleVCoresListByResourceGroupResponse;\n result = await this._listByResourceGroup(resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): AsyncIterableIterator<AutoScaleVCore> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all the auto scale v-cores for the given subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<AutoScaleVCore> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<AutoScaleVCore[]> {\n let result: AutoScaleVCoresListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): AsyncIterableIterator<AutoScaleVCore> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets details about the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n vcoreName: string,\n options?: AutoScaleVCoresGetOptionalParams\n ): Promise<AutoScaleVCoresGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, options },\n getOperationSpec\n );\n }\n\n /**\n * Provisions the specified auto scale v-core based on the configuration specified in the request.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param vCoreParameters Contains the information used to provision the auto scale v-core.\n * @param options The options parameters.\n */\n create(\n resourceGroupName: string,\n vcoreName: string,\n vCoreParameters: AutoScaleVCore,\n options?: AutoScaleVCoresCreateOptionalParams\n ): Promise<AutoScaleVCoresCreateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, vCoreParameters, options },\n createOperationSpec\n );\n }\n\n /**\n * Deletes the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n vcoreName: string,\n options?: AutoScaleVCoresDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Updates the current state of the specified auto scale v-core.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param vcoreName The name of the auto scale v-core. It must be a minimum of 3 characters, and a\n * maximum of 63.\n * @param vCoreUpdateParameters Request object that contains the updated information for the auto scale\n * v-core.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n vcoreName: string,\n vCoreUpdateParameters: AutoScaleVCoreUpdateParameters,\n options?: AutoScaleVCoresUpdateOptionalParams\n ): Promise<AutoScaleVCoresUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, vcoreName, vCoreUpdateParameters, options },\n updateOperationSpec\n );\n }\n\n /**\n * Gets all the auto scale v-cores for the given resource group.\n * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated\n * capacity is part. This name must be at least 1 character in length, and no more than 90.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: AutoScaleVCoresListByResourceGroupOptionalParams\n ): Promise<AutoScaleVCoresListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec\n );\n }\n\n /**\n * Lists all the auto scale v-cores for the given subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: AutoScaleVCoresListBySubscriptionOptionalParams\n ): Promise<AutoScaleVCoresListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.vCoreParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores/{vcoreName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCore\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.vCoreUpdateParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.vcoreName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBIDedicated/autoScaleVCores\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCoreListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.PowerBIDedicated/autoScaleVCores\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutoScaleVCoreListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
@@ -14,6 +13,7 @@ import { LroImpl } from "../lroImpl.js";
14
13
  /// <reference lib="esnext.asynciterable" />
15
14
  /** Class containing Capacities operations. */
16
15
  export class CapacitiesImpl {
16
+ client;
17
17
  /**
18
18
  * Initialize a new instance of the class Capacities class.
19
19
  * @param client Reference to the service client
@@ -37,39 +37,22 @@ export class CapacitiesImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
44
44
  }
45
45
  };
46
46
  }
47
- listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
48
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
49
- let result;
50
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
51
- yield yield __await(result.value || []);
52
- });
47
+ async *listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
48
+ let result;
49
+ result = await this._listByResourceGroup(resourceGroupName, options);
50
+ yield result.value || [];
53
51
  }
54
- listByResourceGroupPagingAll(resourceGroupName, options) {
55
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
56
- var _a, e_1, _b, _c;
57
- try {
58
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
59
- _c = _f.value;
60
- _d = false;
61
- const page = _c;
62
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
63
- }
64
- }
65
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
66
- finally {
67
- try {
68
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
69
- }
70
- finally { if (e_1) throw e_1.error; }
71
- }
72
- });
52
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
53
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
54
+ yield* page;
55
+ }
73
56
  }
74
57
  /**
75
58
  * Lists all the Dedicated capacities for the given subscription.
@@ -85,39 +68,22 @@ export class CapacitiesImpl {
85
68
  return this;
86
69
  },
87
70
  byPage: (settings) => {
88
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
71
+ if (settings?.maxPageSize) {
89
72
  throw new Error("maxPageSize is not supported by this operation.");
90
73
  }
91
74
  return this.listPagingPage(options, settings);
92
75
  }
93
76
  };
94
77
  }
95
- listPagingPage(options, _settings) {
96
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
97
- let result;
98
- result = yield __await(this._list(options));
99
- yield yield __await(result.value || []);
100
- });
78
+ async *listPagingPage(options, _settings) {
79
+ let result;
80
+ result = await this._list(options);
81
+ yield result.value || [];
101
82
  }
102
- listPagingAll(options) {
103
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
104
- var _a, e_2, _b, _c;
105
- try {
106
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
107
- _c = _f.value;
108
- _d = false;
109
- const page = _c;
110
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
111
- }
112
- }
113
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
114
- finally {
115
- try {
116
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
117
- }
118
- finally { if (e_2) throw e_2.error; }
119
- }
120
- });
83
+ async *listPagingAll(options) {
84
+ for await (const page of this.listPagingPage(options)) {
85
+ yield* page;
86
+ }
121
87
  }
122
88
  /**
123
89
  * Gets details about the specified dedicated capacity.
@@ -144,14 +110,19 @@ export class CapacitiesImpl {
144
110
  return this.client.sendOperationRequest(args, spec);
145
111
  };
146
112
  const sendOperation = async (args, spec) => {
147
- var _a;
148
113
  let currentRawResponse = undefined;
149
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
114
+ const providedCallback = args.options?.onResponse;
150
115
  const callback = (rawResponse, flatResponse) => {
151
116
  currentRawResponse = rawResponse;
152
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
117
+ providedCallback?.(rawResponse, flatResponse);
118
+ };
119
+ const updatedArgs = {
120
+ ...args,
121
+ options: {
122
+ ...args.options,
123
+ onResponse: callback
124
+ }
153
125
  };
154
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
155
126
  const flatResponse = await directSendOperation(updatedArgs, spec);
156
127
  return {
157
128
  flatResponse,
@@ -164,8 +135,8 @@ export class CapacitiesImpl {
164
135
  };
165
136
  const lro = new LroImpl(sendOperation, { resourceGroupName, dedicatedCapacityName, capacityParameters, options }, createOperationSpec);
166
137
  const poller = new LroEngine(lro, {
167
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
168
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
138
+ resumeFrom: options?.resumeFrom,
139
+ intervalInMs: options?.updateIntervalInMs
169
140
  });
170
141
  await poller.poll();
171
142
  return poller;
@@ -196,14 +167,19 @@ export class CapacitiesImpl {
196
167
  return this.client.sendOperationRequest(args, spec);
197
168
  };
198
169
  const sendOperation = async (args, spec) => {
199
- var _a;
200
170
  let currentRawResponse = undefined;
201
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
171
+ const providedCallback = args.options?.onResponse;
202
172
  const callback = (rawResponse, flatResponse) => {
203
173
  currentRawResponse = rawResponse;
204
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
174
+ providedCallback?.(rawResponse, flatResponse);
175
+ };
176
+ const updatedArgs = {
177
+ ...args,
178
+ options: {
179
+ ...args.options,
180
+ onResponse: callback
181
+ }
205
182
  };
206
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
207
183
  const flatResponse = await directSendOperation(updatedArgs, spec);
208
184
  return {
209
185
  flatResponse,
@@ -216,8 +192,8 @@ export class CapacitiesImpl {
216
192
  };
217
193
  const lro = new LroImpl(sendOperation, { resourceGroupName, dedicatedCapacityName, options }, deleteOperationSpec);
218
194
  const poller = new LroEngine(lro, {
219
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
220
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
195
+ resumeFrom: options?.resumeFrom,
196
+ intervalInMs: options?.updateIntervalInMs
221
197
  });
222
198
  await poller.poll();
223
199
  return poller;
@@ -249,14 +225,19 @@ export class CapacitiesImpl {
249
225
  return this.client.sendOperationRequest(args, spec);
250
226
  };
251
227
  const sendOperation = async (args, spec) => {
252
- var _a;
253
228
  let currentRawResponse = undefined;
254
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
229
+ const providedCallback = args.options?.onResponse;
255
230
  const callback = (rawResponse, flatResponse) => {
256
231
  currentRawResponse = rawResponse;
257
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
232
+ providedCallback?.(rawResponse, flatResponse);
233
+ };
234
+ const updatedArgs = {
235
+ ...args,
236
+ options: {
237
+ ...args.options,
238
+ onResponse: callback
239
+ }
258
240
  };
259
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
260
241
  const flatResponse = await directSendOperation(updatedArgs, spec);
261
242
  return {
262
243
  flatResponse,
@@ -274,8 +255,8 @@ export class CapacitiesImpl {
274
255
  options
275
256
  }, updateOperationSpec);
276
257
  const poller = new LroEngine(lro, {
277
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
278
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
258
+ resumeFrom: options?.resumeFrom,
259
+ intervalInMs: options?.updateIntervalInMs
279
260
  });
280
261
  await poller.poll();
281
262
  return poller;
@@ -307,14 +288,19 @@ export class CapacitiesImpl {
307
288
  return this.client.sendOperationRequest(args, spec);
308
289
  };
309
290
  const sendOperation = async (args, spec) => {
310
- var _a;
311
291
  let currentRawResponse = undefined;
312
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
292
+ const providedCallback = args.options?.onResponse;
313
293
  const callback = (rawResponse, flatResponse) => {
314
294
  currentRawResponse = rawResponse;
315
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
295
+ providedCallback?.(rawResponse, flatResponse);
296
+ };
297
+ const updatedArgs = {
298
+ ...args,
299
+ options: {
300
+ ...args.options,
301
+ onResponse: callback
302
+ }
316
303
  };
317
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
318
304
  const flatResponse = await directSendOperation(updatedArgs, spec);
319
305
  return {
320
306
  flatResponse,
@@ -327,8 +313,8 @@ export class CapacitiesImpl {
327
313
  };
328
314
  const lro = new LroImpl(sendOperation, { resourceGroupName, dedicatedCapacityName, options }, suspendOperationSpec);
329
315
  const poller = new LroEngine(lro, {
330
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
331
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
316
+ resumeFrom: options?.resumeFrom,
317
+ intervalInMs: options?.updateIntervalInMs
332
318
  });
333
319
  await poller.poll();
334
320
  return poller;
@@ -358,14 +344,19 @@ export class CapacitiesImpl {
358
344
  return this.client.sendOperationRequest(args, spec);
359
345
  };
360
346
  const sendOperation = async (args, spec) => {
361
- var _a;
362
347
  let currentRawResponse = undefined;
363
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
348
+ const providedCallback = args.options?.onResponse;
364
349
  const callback = (rawResponse, flatResponse) => {
365
350
  currentRawResponse = rawResponse;
366
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
351
+ providedCallback?.(rawResponse, flatResponse);
352
+ };
353
+ const updatedArgs = {
354
+ ...args,
355
+ options: {
356
+ ...args.options,
357
+ onResponse: callback
358
+ }
367
359
  };
368
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
369
360
  const flatResponse = await directSendOperation(updatedArgs, spec);
370
361
  return {
371
362
  flatResponse,
@@ -378,8 +369,8 @@ export class CapacitiesImpl {
378
369
  };
379
370
  const lro = new LroImpl(sendOperation, { resourceGroupName, dedicatedCapacityName, options }, resumeOperationSpec);
380
371
  const poller = new LroEngine(lro, {
381
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
382
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
372
+ resumeFrom: options?.resumeFrom,
373
+ intervalInMs: options?.updateIntervalInMs
383
374
  });
384
375
  await poller.poll();
385
376
  return poller;