@azure/arm-reservations 9.0.1-alpha.20250620.1 → 9.0.1-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 (107) hide show
  1. package/dist/browser/azureReservationAPI.js +42 -45
  2. package/dist/browser/azureReservationAPI.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +21 -9
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/calculateExchange.js +12 -6
  8. package/dist/browser/operations/calculateExchange.js.map +1 -1
  9. package/dist/browser/operations/calculateRefund.js +1 -0
  10. package/dist/browser/operations/calculateRefund.js.map +1 -1
  11. package/dist/browser/operations/exchange.js +12 -6
  12. package/dist/browser/operations/exchange.js.map +1 -1
  13. package/dist/browser/operations/operation.js +23 -40
  14. package/dist/browser/operations/operation.js.map +1 -1
  15. package/dist/browser/operations/quota.js +45 -52
  16. package/dist/browser/operations/quota.js.map +1 -1
  17. package/dist/browser/operations/quotaRequestStatus.js +23 -40
  18. package/dist/browser/operations/quotaRequestStatus.js.map +1 -1
  19. package/dist/browser/operations/reservation.js +111 -142
  20. package/dist/browser/operations/reservation.js.map +1 -1
  21. package/dist/browser/operations/reservationOrder.js +34 -46
  22. package/dist/browser/operations/reservationOrder.js.map +1 -1
  23. package/dist/browser/operations/return.js +12 -6
  24. package/dist/browser/operations/return.js.map +1 -1
  25. package/dist/browser/pagingHelper.js +2 -4
  26. package/dist/browser/pagingHelper.js.map +1 -1
  27. package/dist/commonjs/azureReservationAPI.js +42 -44
  28. package/dist/commonjs/azureReservationAPI.js.map +1 -1
  29. package/dist/commonjs/lroImpl.js +7 -3
  30. package/dist/commonjs/lroImpl.js.map +1 -1
  31. package/dist/commonjs/models/mappers.js +21 -9
  32. package/dist/commonjs/models/mappers.js.map +1 -1
  33. package/dist/commonjs/operations/calculateExchange.js +12 -6
  34. package/dist/commonjs/operations/calculateExchange.js.map +1 -1
  35. package/dist/commonjs/operations/calculateRefund.js +1 -0
  36. package/dist/commonjs/operations/calculateRefund.js.map +1 -1
  37. package/dist/commonjs/operations/exchange.js +12 -6
  38. package/dist/commonjs/operations/exchange.js.map +1 -1
  39. package/dist/commonjs/operations/operation.js +23 -39
  40. package/dist/commonjs/operations/operation.js.map +1 -1
  41. package/dist/commonjs/operations/quota.js +45 -51
  42. package/dist/commonjs/operations/quota.js.map +1 -1
  43. package/dist/commonjs/operations/quotaRequestStatus.js +23 -39
  44. package/dist/commonjs/operations/quotaRequestStatus.js.map +1 -1
  45. package/dist/commonjs/operations/reservation.js +111 -141
  46. package/dist/commonjs/operations/reservation.js.map +1 -1
  47. package/dist/commonjs/operations/reservationOrder.js +34 -45
  48. package/dist/commonjs/operations/reservationOrder.js.map +1 -1
  49. package/dist/commonjs/operations/return.js +12 -6
  50. package/dist/commonjs/operations/return.js.map +1 -1
  51. package/dist/commonjs/pagingHelper.js +2 -4
  52. package/dist/commonjs/pagingHelper.js.map +1 -1
  53. package/dist/commonjs/tsdoc-metadata.json +11 -11
  54. package/dist/esm/azureReservationAPI.js +42 -45
  55. package/dist/esm/azureReservationAPI.js.map +1 -1
  56. package/dist/esm/lroImpl.js +7 -3
  57. package/dist/esm/lroImpl.js.map +1 -1
  58. package/dist/esm/models/mappers.js +21 -9
  59. package/dist/esm/models/mappers.js.map +1 -1
  60. package/dist/esm/operations/calculateExchange.js +12 -6
  61. package/dist/esm/operations/calculateExchange.js.map +1 -1
  62. package/dist/esm/operations/calculateRefund.js +1 -0
  63. package/dist/esm/operations/calculateRefund.js.map +1 -1
  64. package/dist/esm/operations/exchange.js +12 -6
  65. package/dist/esm/operations/exchange.js.map +1 -1
  66. package/dist/esm/operations/operation.js +23 -40
  67. package/dist/esm/operations/operation.js.map +1 -1
  68. package/dist/esm/operations/quota.js +45 -52
  69. package/dist/esm/operations/quota.js.map +1 -1
  70. package/dist/esm/operations/quotaRequestStatus.js +23 -40
  71. package/dist/esm/operations/quotaRequestStatus.js.map +1 -1
  72. package/dist/esm/operations/reservation.js +111 -142
  73. package/dist/esm/operations/reservation.js.map +1 -1
  74. package/dist/esm/operations/reservationOrder.js +34 -46
  75. package/dist/esm/operations/reservationOrder.js.map +1 -1
  76. package/dist/esm/operations/return.js +12 -6
  77. package/dist/esm/operations/return.js.map +1 -1
  78. package/dist/esm/pagingHelper.js +2 -4
  79. package/dist/esm/pagingHelper.js.map +1 -1
  80. package/dist/react-native/azureReservationAPI.js +42 -45
  81. package/dist/react-native/azureReservationAPI.js.map +1 -1
  82. package/dist/react-native/lroImpl.js +7 -3
  83. package/dist/react-native/lroImpl.js.map +1 -1
  84. package/dist/react-native/models/mappers.js +21 -9
  85. package/dist/react-native/models/mappers.js.map +1 -1
  86. package/dist/react-native/operations/calculateExchange.js +12 -6
  87. package/dist/react-native/operations/calculateExchange.js.map +1 -1
  88. package/dist/react-native/operations/calculateRefund.js +1 -0
  89. package/dist/react-native/operations/calculateRefund.js.map +1 -1
  90. package/dist/react-native/operations/exchange.js +12 -6
  91. package/dist/react-native/operations/exchange.js.map +1 -1
  92. package/dist/react-native/operations/operation.js +23 -40
  93. package/dist/react-native/operations/operation.js.map +1 -1
  94. package/dist/react-native/operations/quota.js +45 -52
  95. package/dist/react-native/operations/quota.js.map +1 -1
  96. package/dist/react-native/operations/quotaRequestStatus.js +23 -40
  97. package/dist/react-native/operations/quotaRequestStatus.js.map +1 -1
  98. package/dist/react-native/operations/reservation.js +111 -142
  99. package/dist/react-native/operations/reservation.js.map +1 -1
  100. package/dist/react-native/operations/reservationOrder.js +34 -46
  101. package/dist/react-native/operations/reservationOrder.js.map +1 -1
  102. package/dist/react-native/operations/return.js +12 -6
  103. package/dist/react-native/operations/return.js.map +1 -1
  104. package/dist/react-native/pagingHelper.js +2 -4
  105. package/dist/react-native/pagingHelper.js.map +1 -1
  106. package/package.json +2 -2
  107. /package/review/{arm-reservations.api.md → arm-reservations-node.api.md} +0 -0
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing QuotaRequestStatus operations. */
15
14
  export class QuotaRequestStatusImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class QuotaRequestStatus class.
18
18
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class QuotaRequestStatusImpl {
38
38
  return this;
39
39
  },
40
40
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
42
42
  throw new Error("maxPageSize is not supported by this operation.");
43
43
  }
44
44
  return this.listPagingPage(subscriptionId, providerId, location, options, settings);
45
45
  }
46
46
  };
47
47
  }
48
- listPagingPage(subscriptionId, providerId, location, options, settings) {
49
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield __await(this._list(subscriptionId, providerId, location, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- setContinuationToken(page, continuationToken);
57
- yield yield __await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield __await(this._listNext(subscriptionId, providerId, location, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- setContinuationToken(page, continuationToken);
64
- yield yield __await(page);
65
- }
66
- });
48
+ async *listPagingPage(subscriptionId, providerId, location, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(subscriptionId, providerId, location, options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ setContinuationToken(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listNext(subscriptionId, providerId, location, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listPagingAll(subscriptionId, providerId, location, options) {
69
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = __asyncValues(this.listPagingPage(subscriptionId, providerId, location, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
66
+ async *listPagingAll(subscriptionId, providerId, location, options) {
67
+ for await (const page of this.listPagingPage(subscriptionId, providerId, location, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * For the specified Azure region (location), get the details and status of the quota request by the
@@ -1 +1 @@
1
- {"version":3,"file":"quotaRequestStatus.js","sourceRoot":"","sources":["../../../src/operations/quotaRequestStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAGjC;;;OAGG;IACH,YAAY,MAA2B;QACrC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,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { QuotaRequestStatus } 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 { AzureReservationAPI } from \"../azureReservationAPI.js\";\nimport {\n QuotaRequestDetails,\n QuotaRequestStatusListNextOptionalParams,\n QuotaRequestStatusListOptionalParams,\n QuotaRequestStatusListResponse,\n QuotaRequestStatusGetOptionalParams,\n QuotaRequestStatusGetResponse,\n QuotaRequestStatusListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing QuotaRequestStatus operations. */\nexport class QuotaRequestStatusImpl implements QuotaRequestStatus {\n private readonly client: AzureReservationAPI;\n\n /**\n * Initialize a new instance of the class QuotaRequestStatus class.\n * @param client Reference to the service client\n */\n constructor(client: AzureReservationAPI) {\n this.client = client;\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n public list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): PagedAsyncIterableIterator<QuotaRequestDetails> {\n const iter = this.listPagingAll(\n subscriptionId,\n providerId,\n location,\n options\n );\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.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaRequestDetails[]> {\n let result: QuotaRequestStatusListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(subscriptionId, providerId, location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n subscriptionId,\n providerId,\n location,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): AsyncIterableIterator<QuotaRequestDetails> {\n for await (const page of this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * For the specified Azure region (location), get the details and status of the quota request by the\n * quota request ID for the resources of the resource provider. The PUT request for the quota (service\n * limit) returns a response with the requestId parameter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param id Quota Request ID.\n * @param options The options parameters.\n */\n get(\n subscriptionId: string,\n providerId: string,\n location: string,\n id: string,\n options?: QuotaRequestStatusGetOptionalParams\n ): Promise<QuotaRequestStatusGetResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, id, options },\n getOperationSpec\n );\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n private _list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): Promise<QuotaRequestStatusListResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n subscriptionId: string,\n providerId: string,\n location: string,\n nextLink: string,\n options?: QuotaRequestStatusListNextOptionalParams\n ): Promise<QuotaRequestStatusListNextResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetails\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1,\n Parameters.id\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion1,\n Parameters.top,\n Parameters.skiptoken1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"quotaRequestStatus.js","sourceRoot":"","sources":["../../../src/operations/quotaRequestStatus.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAChB,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAO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;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;KACrB;IACD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { QuotaRequestStatus } 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 { AzureReservationAPI } from \"../azureReservationAPI.js\";\nimport {\n QuotaRequestDetails,\n QuotaRequestStatusListNextOptionalParams,\n QuotaRequestStatusListOptionalParams,\n QuotaRequestStatusListResponse,\n QuotaRequestStatusGetOptionalParams,\n QuotaRequestStatusGetResponse,\n QuotaRequestStatusListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing QuotaRequestStatus operations. */\nexport class QuotaRequestStatusImpl implements QuotaRequestStatus {\n private readonly client: AzureReservationAPI;\n\n /**\n * Initialize a new instance of the class QuotaRequestStatus class.\n * @param client Reference to the service client\n */\n constructor(client: AzureReservationAPI) {\n this.client = client;\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n public list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): PagedAsyncIterableIterator<QuotaRequestDetails> {\n const iter = this.listPagingAll(\n subscriptionId,\n providerId,\n location,\n options\n );\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.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<QuotaRequestDetails[]> {\n let result: QuotaRequestStatusListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(subscriptionId, providerId, location, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n subscriptionId,\n providerId,\n location,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): AsyncIterableIterator<QuotaRequestDetails> {\n for await (const page of this.listPagingPage(\n subscriptionId,\n providerId,\n location,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * For the specified Azure region (location), get the details and status of the quota request by the\n * quota request ID for the resources of the resource provider. The PUT request for the quota (service\n * limit) returns a response with the requestId parameter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param id Quota Request ID.\n * @param options The options parameters.\n */\n get(\n subscriptionId: string,\n providerId: string,\n location: string,\n id: string,\n options?: QuotaRequestStatusGetOptionalParams\n ): Promise<QuotaRequestStatusGetResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, id, options },\n getOperationSpec\n );\n }\n\n /**\n * For the specified Azure region (location), subscription, and resource provider, get the history of\n * the quota requests for the past year. To select specific quota requests, use the oData filter.\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param options The options parameters.\n */\n private _list(\n subscriptionId: string,\n providerId: string,\n location: string,\n options?: QuotaRequestStatusListOptionalParams\n ): Promise<QuotaRequestStatusListResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param subscriptionId Azure subscription ID.\n * @param providerId Azure resource provider ID.\n * @param location Azure region.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n subscriptionId: string,\n providerId: string,\n location: string,\n nextLink: string,\n options?: QuotaRequestStatusListNextOptionalParams\n ): Promise<QuotaRequestStatusListNextResponse> {\n return this.client.sendOperationRequest(\n { subscriptionId, providerId, location, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetails\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1,\n Parameters.id\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimitsRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n queryParameters: [\n Parameters.filter,\n Parameters.apiVersion1,\n Parameters.top,\n Parameters.skiptoken1\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaRequestDetailsList\n },\n default: {\n bodyMapper: Mappers.ExceptionResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.providerId,\n Parameters.location1\n ],\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 { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing Reservation operations. */
17
16
  export class ReservationImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Reservation class.
20
20
  * @param client Reference to the service client
@@ -37,52 +37,35 @@ export class ReservationImpl {
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.listPagingPage(reservationOrderId, options, settings);
44
44
  }
45
45
  };
46
46
  }
47
- listPagingPage(reservationOrderId, options, settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._list(reservationOrderId, options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listNext(reservationOrderId, continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
47
+ async *listPagingPage(reservationOrderId, options, settings) {
48
+ let result;
49
+ let continuationToken = settings?.continuationToken;
50
+ if (!continuationToken) {
51
+ result = await this._list(reservationOrderId, options);
52
+ let page = result.value || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield page;
56
+ }
57
+ while (continuationToken) {
58
+ result = await this._listNext(reservationOrderId, continuationToken, options);
59
+ continuationToken = result.nextLink;
60
+ let page = result.value || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield page;
63
+ }
66
64
  }
67
- listPagingAll(reservationOrderId, options) {
68
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listPagingPage(reservationOrderId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
65
+ async *listPagingAll(reservationOrderId, options) {
66
+ for await (const page of this.listPagingPage(reservationOrderId, options)) {
67
+ yield* page;
68
+ }
86
69
  }
87
70
  /**
88
71
  * List of all the revisions for the `Reservation`.
@@ -100,52 +83,35 @@ export class ReservationImpl {
100
83
  return this;
101
84
  },
102
85
  byPage: (settings) => {
103
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
86
+ if (settings?.maxPageSize) {
104
87
  throw new Error("maxPageSize is not supported by this operation.");
105
88
  }
106
89
  return this.listRevisionsPagingPage(reservationOrderId, reservationId, options, settings);
107
90
  }
108
91
  };
109
92
  }
110
- listRevisionsPagingPage(reservationOrderId, reservationId, options, settings) {
111
- return __asyncGenerator(this, arguments, function* listRevisionsPagingPage_1() {
112
- let result;
113
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
114
- if (!continuationToken) {
115
- result = yield __await(this._listRevisions(reservationOrderId, reservationId, options));
116
- let page = result.value || [];
117
- continuationToken = result.nextLink;
118
- setContinuationToken(page, continuationToken);
119
- yield yield __await(page);
120
- }
121
- while (continuationToken) {
122
- result = yield __await(this._listRevisionsNext(reservationOrderId, reservationId, continuationToken, options));
123
- continuationToken = result.nextLink;
124
- let page = result.value || [];
125
- setContinuationToken(page, continuationToken);
126
- yield yield __await(page);
127
- }
128
- });
93
+ async *listRevisionsPagingPage(reservationOrderId, reservationId, options, settings) {
94
+ let result;
95
+ let continuationToken = settings?.continuationToken;
96
+ if (!continuationToken) {
97
+ result = await this._listRevisions(reservationOrderId, reservationId, options);
98
+ let page = result.value || [];
99
+ continuationToken = result.nextLink;
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
103
+ while (continuationToken) {
104
+ result = await this._listRevisionsNext(reservationOrderId, reservationId, continuationToken, options);
105
+ continuationToken = result.nextLink;
106
+ let page = result.value || [];
107
+ setContinuationToken(page, continuationToken);
108
+ yield page;
109
+ }
129
110
  }
130
- listRevisionsPagingAll(reservationOrderId, reservationId, options) {
131
- return __asyncGenerator(this, arguments, function* listRevisionsPagingAll_1() {
132
- var _a, e_2, _b, _c;
133
- try {
134
- for (var _d = true, _e = __asyncValues(this.listRevisionsPagingPage(reservationOrderId, reservationId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
135
- _c = _f.value;
136
- _d = false;
137
- const page = _c;
138
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
139
- }
140
- }
141
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
142
- finally {
143
- try {
144
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
145
- }
146
- finally { if (e_2) throw e_2.error; }
147
- }
148
- });
111
+ async *listRevisionsPagingAll(reservationOrderId, reservationId, options) {
112
+ for await (const page of this.listRevisionsPagingPage(reservationOrderId, reservationId, options)) {
113
+ yield* page;
114
+ }
149
115
  }
150
116
  /**
151
117
  * List the reservations and the roll up counts of reservations group by provisioning states that the
@@ -162,52 +128,35 @@ export class ReservationImpl {
162
128
  return this;
163
129
  },
164
130
  byPage: (settings) => {
165
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
131
+ if (settings?.maxPageSize) {
166
132
  throw new Error("maxPageSize is not supported by this operation.");
167
133
  }
168
134
  return this.listAllPagingPage(options, settings);
169
135
  }
170
136
  };
171
137
  }
172
- listAllPagingPage(options, settings) {
173
- return __asyncGenerator(this, arguments, function* listAllPagingPage_1() {
174
- let result;
175
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
176
- if (!continuationToken) {
177
- result = yield __await(this._listAll(options));
178
- let page = result.value || [];
179
- continuationToken = result.nextLink;
180
- setContinuationToken(page, continuationToken);
181
- yield yield __await(page);
182
- }
183
- while (continuationToken) {
184
- result = yield __await(this._listAllNext(continuationToken, options));
185
- continuationToken = result.nextLink;
186
- let page = result.value || [];
187
- setContinuationToken(page, continuationToken);
188
- yield yield __await(page);
189
- }
190
- });
138
+ async *listAllPagingPage(options, settings) {
139
+ let result;
140
+ let continuationToken = settings?.continuationToken;
141
+ if (!continuationToken) {
142
+ result = await this._listAll(options);
143
+ let page = result.value || [];
144
+ continuationToken = result.nextLink;
145
+ setContinuationToken(page, continuationToken);
146
+ yield page;
147
+ }
148
+ while (continuationToken) {
149
+ result = await this._listAllNext(continuationToken, options);
150
+ continuationToken = result.nextLink;
151
+ let page = result.value || [];
152
+ setContinuationToken(page, continuationToken);
153
+ yield page;
154
+ }
191
155
  }
192
- listAllPagingAll(options) {
193
- return __asyncGenerator(this, arguments, function* listAllPagingAll_1() {
194
- var _a, e_3, _b, _c;
195
- try {
196
- for (var _d = true, _e = __asyncValues(this.listAllPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
197
- _c = _f.value;
198
- _d = false;
199
- const page = _c;
200
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
201
- }
202
- }
203
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
204
- finally {
205
- try {
206
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
207
- }
208
- finally { if (e_3) throw e_3.error; }
209
- }
210
- });
156
+ async *listAllPagingAll(options) {
157
+ for await (const page of this.listAllPagingPage(options)) {
158
+ yield* page;
159
+ }
211
160
  }
212
161
  /**
213
162
  * Check whether the scopes from request is valid for `Reservation`.
@@ -222,14 +171,19 @@ export class ReservationImpl {
222
171
  return this.client.sendOperationRequest(args, spec);
223
172
  };
224
173
  const sendOperationFn = async (args, spec) => {
225
- var _a;
226
174
  let currentRawResponse = undefined;
227
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
175
+ const providedCallback = args.options?.onResponse;
228
176
  const callback = (rawResponse, flatResponse) => {
229
177
  currentRawResponse = rawResponse;
230
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
178
+ providedCallback?.(rawResponse, flatResponse);
179
+ };
180
+ const updatedArgs = {
181
+ ...args,
182
+ options: {
183
+ ...args.options,
184
+ onResponse: callback
185
+ }
231
186
  };
232
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
233
187
  const flatResponse = await directSendOperation(updatedArgs, spec);
234
188
  return {
235
189
  flatResponse,
@@ -246,8 +200,8 @@ export class ReservationImpl {
246
200
  spec: availableScopesOperationSpec
247
201
  });
248
202
  const poller = await createHttpPoller(lro, {
249
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
250
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
203
+ restoreFrom: options?.resumeFrom,
204
+ intervalInMs: options?.updateIntervalInMs
251
205
  });
252
206
  await poller.poll();
253
207
  return poller;
@@ -275,14 +229,19 @@ export class ReservationImpl {
275
229
  return this.client.sendOperationRequest(args, spec);
276
230
  };
277
231
  const sendOperationFn = async (args, spec) => {
278
- var _a;
279
232
  let currentRawResponse = undefined;
280
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
233
+ const providedCallback = args.options?.onResponse;
281
234
  const callback = (rawResponse, flatResponse) => {
282
235
  currentRawResponse = rawResponse;
283
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
236
+ providedCallback?.(rawResponse, flatResponse);
237
+ };
238
+ const updatedArgs = {
239
+ ...args,
240
+ options: {
241
+ ...args.options,
242
+ onResponse: callback
243
+ }
284
244
  };
285
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
286
245
  const flatResponse = await directSendOperation(updatedArgs, spec);
287
246
  return {
288
247
  flatResponse,
@@ -299,8 +258,8 @@ export class ReservationImpl {
299
258
  spec: splitOperationSpec
300
259
  });
301
260
  const poller = await createHttpPoller(lro, {
302
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
303
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
261
+ restoreFrom: options?.resumeFrom,
262
+ intervalInMs: options?.updateIntervalInMs,
304
263
  resourceLocationConfig: "location"
305
264
  });
306
265
  await poller.poll();
@@ -328,14 +287,19 @@ export class ReservationImpl {
328
287
  return this.client.sendOperationRequest(args, spec);
329
288
  };
330
289
  const sendOperationFn = async (args, spec) => {
331
- var _a;
332
290
  let currentRawResponse = undefined;
333
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
291
+ const providedCallback = args.options?.onResponse;
334
292
  const callback = (rawResponse, flatResponse) => {
335
293
  currentRawResponse = rawResponse;
336
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
294
+ providedCallback?.(rawResponse, flatResponse);
295
+ };
296
+ const updatedArgs = {
297
+ ...args,
298
+ options: {
299
+ ...args.options,
300
+ onResponse: callback
301
+ }
337
302
  };
338
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
339
303
  const flatResponse = await directSendOperation(updatedArgs, spec);
340
304
  return {
341
305
  flatResponse,
@@ -352,8 +316,8 @@ export class ReservationImpl {
352
316
  spec: mergeOperationSpec
353
317
  });
354
318
  const poller = await createHttpPoller(lro, {
355
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
356
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
319
+ restoreFrom: options?.resumeFrom,
320
+ intervalInMs: options?.updateIntervalInMs,
357
321
  resourceLocationConfig: "location"
358
322
  });
359
323
  await poller.poll();
@@ -399,14 +363,19 @@ export class ReservationImpl {
399
363
  return this.client.sendOperationRequest(args, spec);
400
364
  };
401
365
  const sendOperationFn = async (args, spec) => {
402
- var _a;
403
366
  let currentRawResponse = undefined;
404
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
367
+ const providedCallback = args.options?.onResponse;
405
368
  const callback = (rawResponse, flatResponse) => {
406
369
  currentRawResponse = rawResponse;
407
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
370
+ providedCallback?.(rawResponse, flatResponse);
371
+ };
372
+ const updatedArgs = {
373
+ ...args,
374
+ options: {
375
+ ...args.options,
376
+ onResponse: callback
377
+ }
408
378
  };
409
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
410
379
  const flatResponse = await directSendOperation(updatedArgs, spec);
411
380
  return {
412
381
  flatResponse,
@@ -423,8 +392,8 @@ export class ReservationImpl {
423
392
  spec: updateOperationSpec
424
393
  });
425
394
  const poller = await createHttpPoller(lro, {
426
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
427
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
395
+ restoreFrom: options?.resumeFrom,
396
+ intervalInMs: options?.updateIntervalInMs,
428
397
  resourceLocationConfig: "azure-async-operation"
429
398
  });
430
399
  await poller.poll();