@azure/arm-quota 1.1.1-alpha.20250717.1 → 1.1.1-alpha.20250718.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/browser/azureQuotaExtensionAPI.js +24 -5
  2. package/dist/browser/azureQuotaExtensionAPI.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 +72 -28
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/groupQuotaLimits.js +1 -0
  8. package/dist/browser/operations/groupQuotaLimits.js.map +1 -1
  9. package/dist/browser/operations/groupQuotaLimitsRequest.js +34 -46
  10. package/dist/browser/operations/groupQuotaLimitsRequest.js.map +1 -1
  11. package/dist/browser/operations/groupQuotaSubscriptionAllocation.js +1 -0
  12. package/dist/browser/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
  13. package/dist/browser/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
  14. package/dist/browser/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
  15. package/dist/browser/operations/groupQuotaSubscriptionRequests.js +23 -40
  16. package/dist/browser/operations/groupQuotaSubscriptionRequests.js.map +1 -1
  17. package/dist/browser/operations/groupQuotaSubscriptions.js +56 -58
  18. package/dist/browser/operations/groupQuotaSubscriptions.js.map +1 -1
  19. package/dist/browser/operations/groupQuotas.js +56 -58
  20. package/dist/browser/operations/groupQuotas.js.map +1 -1
  21. package/dist/browser/operations/quota.js +45 -52
  22. package/dist/browser/operations/quota.js.map +1 -1
  23. package/dist/browser/operations/quotaOperation.js +23 -40
  24. package/dist/browser/operations/quotaOperation.js.map +1 -1
  25. package/dist/browser/operations/quotaRequestStatus.js +23 -40
  26. package/dist/browser/operations/quotaRequestStatus.js.map +1 -1
  27. package/dist/browser/operations/usages.js +23 -40
  28. package/dist/browser/operations/usages.js.map +1 -1
  29. package/dist/browser/pagingHelper.js +2 -4
  30. package/dist/browser/pagingHelper.js.map +1 -1
  31. package/dist/commonjs/azureQuotaExtensionAPI.js +24 -5
  32. package/dist/commonjs/azureQuotaExtensionAPI.js.map +1 -1
  33. package/dist/commonjs/lroImpl.js +7 -3
  34. package/dist/commonjs/lroImpl.js.map +1 -1
  35. package/dist/commonjs/models/mappers.js +72 -28
  36. package/dist/commonjs/models/mappers.js.map +1 -1
  37. package/dist/commonjs/operations/groupQuotaLimits.js +1 -0
  38. package/dist/commonjs/operations/groupQuotaLimits.js.map +1 -1
  39. package/dist/commonjs/operations/groupQuotaLimitsRequest.js +34 -45
  40. package/dist/commonjs/operations/groupQuotaLimitsRequest.js.map +1 -1
  41. package/dist/commonjs/operations/groupQuotaSubscriptionAllocation.js +1 -0
  42. package/dist/commonjs/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
  43. package/dist/commonjs/operations/groupQuotaSubscriptionAllocationRequest.js +34 -45
  44. package/dist/commonjs/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
  45. package/dist/commonjs/operations/groupQuotaSubscriptionRequests.js +23 -39
  46. package/dist/commonjs/operations/groupQuotaSubscriptionRequests.js.map +1 -1
  47. package/dist/commonjs/operations/groupQuotaSubscriptions.js +56 -57
  48. package/dist/commonjs/operations/groupQuotaSubscriptions.js.map +1 -1
  49. package/dist/commonjs/operations/groupQuotas.js +56 -57
  50. package/dist/commonjs/operations/groupQuotas.js.map +1 -1
  51. package/dist/commonjs/operations/quota.js +45 -51
  52. package/dist/commonjs/operations/quota.js.map +1 -1
  53. package/dist/commonjs/operations/quotaOperation.js +23 -39
  54. package/dist/commonjs/operations/quotaOperation.js.map +1 -1
  55. package/dist/commonjs/operations/quotaRequestStatus.js +23 -39
  56. package/dist/commonjs/operations/quotaRequestStatus.js.map +1 -1
  57. package/dist/commonjs/operations/usages.js +23 -39
  58. package/dist/commonjs/operations/usages.js.map +1 -1
  59. package/dist/commonjs/pagingHelper.js +2 -4
  60. package/dist/commonjs/pagingHelper.js.map +1 -1
  61. package/dist/commonjs/tsdoc-metadata.json +11 -11
  62. package/dist/esm/azureQuotaExtensionAPI.js +24 -5
  63. package/dist/esm/azureQuotaExtensionAPI.js.map +1 -1
  64. package/dist/esm/lroImpl.js +7 -3
  65. package/dist/esm/lroImpl.js.map +1 -1
  66. package/dist/esm/models/mappers.js +72 -28
  67. package/dist/esm/models/mappers.js.map +1 -1
  68. package/dist/esm/operations/groupQuotaLimits.js +1 -0
  69. package/dist/esm/operations/groupQuotaLimits.js.map +1 -1
  70. package/dist/esm/operations/groupQuotaLimitsRequest.js +34 -46
  71. package/dist/esm/operations/groupQuotaLimitsRequest.js.map +1 -1
  72. package/dist/esm/operations/groupQuotaSubscriptionAllocation.js +1 -0
  73. package/dist/esm/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
  74. package/dist/esm/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
  75. package/dist/esm/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
  76. package/dist/esm/operations/groupQuotaSubscriptionRequests.js +23 -40
  77. package/dist/esm/operations/groupQuotaSubscriptionRequests.js.map +1 -1
  78. package/dist/esm/operations/groupQuotaSubscriptions.js +56 -58
  79. package/dist/esm/operations/groupQuotaSubscriptions.js.map +1 -1
  80. package/dist/esm/operations/groupQuotas.js +56 -58
  81. package/dist/esm/operations/groupQuotas.js.map +1 -1
  82. package/dist/esm/operations/quota.js +45 -52
  83. package/dist/esm/operations/quota.js.map +1 -1
  84. package/dist/esm/operations/quotaOperation.js +23 -40
  85. package/dist/esm/operations/quotaOperation.js.map +1 -1
  86. package/dist/esm/operations/quotaRequestStatus.js +23 -40
  87. package/dist/esm/operations/quotaRequestStatus.js.map +1 -1
  88. package/dist/esm/operations/usages.js +23 -40
  89. package/dist/esm/operations/usages.js.map +1 -1
  90. package/dist/esm/pagingHelper.js +2 -4
  91. package/dist/esm/pagingHelper.js.map +1 -1
  92. package/dist/react-native/azureQuotaExtensionAPI.js +24 -5
  93. package/dist/react-native/azureQuotaExtensionAPI.js.map +1 -1
  94. package/dist/react-native/lroImpl.js +7 -3
  95. package/dist/react-native/lroImpl.js.map +1 -1
  96. package/dist/react-native/models/mappers.js +72 -28
  97. package/dist/react-native/models/mappers.js.map +1 -1
  98. package/dist/react-native/operations/groupQuotaLimits.js +1 -0
  99. package/dist/react-native/operations/groupQuotaLimits.js.map +1 -1
  100. package/dist/react-native/operations/groupQuotaLimitsRequest.js +34 -46
  101. package/dist/react-native/operations/groupQuotaLimitsRequest.js.map +1 -1
  102. package/dist/react-native/operations/groupQuotaSubscriptionAllocation.js +1 -0
  103. package/dist/react-native/operations/groupQuotaSubscriptionAllocation.js.map +1 -1
  104. package/dist/react-native/operations/groupQuotaSubscriptionAllocationRequest.js +34 -46
  105. package/dist/react-native/operations/groupQuotaSubscriptionAllocationRequest.js.map +1 -1
  106. package/dist/react-native/operations/groupQuotaSubscriptionRequests.js +23 -40
  107. package/dist/react-native/operations/groupQuotaSubscriptionRequests.js.map +1 -1
  108. package/dist/react-native/operations/groupQuotaSubscriptions.js +56 -58
  109. package/dist/react-native/operations/groupQuotaSubscriptions.js.map +1 -1
  110. package/dist/react-native/operations/groupQuotas.js +56 -58
  111. package/dist/react-native/operations/groupQuotas.js.map +1 -1
  112. package/dist/react-native/operations/quota.js +45 -52
  113. package/dist/react-native/operations/quota.js.map +1 -1
  114. package/dist/react-native/operations/quotaOperation.js +23 -40
  115. package/dist/react-native/operations/quotaOperation.js.map +1 -1
  116. package/dist/react-native/operations/quotaRequestStatus.js +23 -40
  117. package/dist/react-native/operations/quotaRequestStatus.js.map +1 -1
  118. package/dist/react-native/operations/usages.js +23 -40
  119. package/dist/react-native/operations/usages.js.map +1 -1
  120. package/dist/react-native/pagingHelper.js +2 -4
  121. package/dist/react-native/pagingHelper.js.map +1 -1
  122. package/package.json +2 -2
  123. package/review/arm-quota-node.api.md +1148 -1148
@@ -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 GroupQuotaLimitsRequest operations. */
17
16
  export class GroupQuotaLimitsRequestImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class GroupQuotaLimitsRequest class.
20
20
  * @param client Reference to the service client
@@ -46,52 +46,35 @@ export class GroupQuotaLimitsRequestImpl {
46
46
  return this;
47
47
  },
48
48
  byPage: (settings) => {
49
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
49
+ if (settings?.maxPageSize) {
50
50
  throw new Error("maxPageSize is not supported by this operation.");
51
51
  }
52
52
  return this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings);
53
53
  },
54
54
  };
55
55
  }
56
- listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
57
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
58
- let result;
59
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
60
- if (!continuationToken) {
61
- result = yield __await(this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options));
62
- let page = result.value || [];
63
- continuationToken = result.nextLink;
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- while (continuationToken) {
68
- result = yield __await(this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options));
69
- continuationToken = result.nextLink;
70
- let page = result.value || [];
71
- setContinuationToken(page, continuationToken);
72
- yield yield __await(page);
73
- }
74
- });
56
+ async *listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
57
+ let result;
58
+ let continuationToken = settings?.continuationToken;
59
+ if (!continuationToken) {
60
+ result = await this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options);
61
+ let page = result.value || [];
62
+ continuationToken = result.nextLink;
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
66
+ while (continuationToken) {
67
+ result = await this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options);
68
+ continuationToken = result.nextLink;
69
+ let page = result.value || [];
70
+ setContinuationToken(page, continuationToken);
71
+ yield page;
72
+ }
75
73
  }
76
- listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
77
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
78
- var _a, e_1, _b, _c;
79
- try {
80
- for (var _d = true, _e = __asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
81
- _c = _f.value;
82
- _d = false;
83
- const page = _c;
84
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
85
- }
86
- }
87
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
88
- finally {
89
- try {
90
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
91
- }
92
- finally { if (e_1) throw e_1.error; }
93
- }
94
- });
74
+ async *listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
75
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)) {
76
+ yield* page;
77
+ }
95
78
  }
96
79
  /**
97
80
  * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName
@@ -113,14 +96,19 @@ export class GroupQuotaLimitsRequestImpl {
113
96
  return this.client.sendOperationRequest(args, spec);
114
97
  };
115
98
  const sendOperationFn = async (args, spec) => {
116
- var _a;
117
99
  let currentRawResponse = undefined;
118
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
100
+ const providedCallback = args.options?.onResponse;
119
101
  const callback = (rawResponse, flatResponse) => {
120
102
  currentRawResponse = rawResponse;
121
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
103
+ providedCallback?.(rawResponse, flatResponse);
104
+ };
105
+ const updatedArgs = {
106
+ ...args,
107
+ options: {
108
+ ...args.options,
109
+ onResponse: callback,
110
+ },
122
111
  };
123
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
124
112
  const flatResponse = await directSendOperation(updatedArgs, spec);
125
113
  return {
126
114
  flatResponse,
@@ -143,8 +131,8 @@ export class GroupQuotaLimitsRequestImpl {
143
131
  spec: updateOperationSpec,
144
132
  });
145
133
  const poller = await createHttpPoller(lro, {
146
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
147
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
134
+ restoreFrom: options?.resumeFrom,
135
+ intervalInMs: options?.updateIntervalInMs,
148
136
  resourceLocationConfig: "location",
149
137
  });
150
138
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"groupQuotaLimitsRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaLimitsRequest.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;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAa9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAM,OAAO,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,IAAI,CACT,iB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AE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,oBAAoB;KAChC;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,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,oBAAoB;KAChC;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 { GroupQuotaLimitsRequest } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SubmittedResourceRequestStatus,\n GroupQuotaLimitsRequestListNextOptionalParams,\n GroupQuotaLimitsRequestListOptionalParams,\n GroupQuotaLimitsRequestListResponse,\n GroupQuotaLimitsRequestUpdateOptionalParams,\n GroupQuotaLimitsRequestUpdateResponse,\n GroupQuotaLimitsRequestGetOptionalParams,\n GroupQuotaLimitsRequestGetResponse,\n GroupQuotaLimitsRequestListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaLimitsRequest operations. */\nexport class GroupQuotaLimitsRequestImpl implements GroupQuotaLimitsRequest {\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaLimitsRequest class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location} and resource eq {resourceName}\n * Example: $filter=location eq eastus and resourceName eq cores\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): PagedAsyncIterableIterator<SubmittedResourceRequestStatus> {\n const iter = this.listPagingAll(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SubmittedResourceRequestStatus[]> {\n let result: GroupQuotaLimitsRequestListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n );\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): AsyncIterableIterator<SubmittedResourceRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName\n * properties are specified in the request body. Only 1 resource quota can be requested. Please note\n * that patch request creates a new groupQuota request.\n * Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with\n * retry-after duration in seconds to check the intermediate status. This API provides the finals\n * status with the request details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaLimitsRequestUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaLimitsRequestUpdateResponse>,\n GroupQuotaLimitsRequestUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaLimitsRequestUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaLimitsRequestUpdateResponse,\n OperationState<GroupQuotaLimitsRequestUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName\n * properties are specified in the request body. Only 1 resource quota can be requested. Please note\n * that patch request creates a new groupQuota request.\n * Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with\n * retry-after duration in seconds to check the intermediate status. This API provides the finals\n * status with the request details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaLimitsRequestUpdateOptionalParams,\n ): Promise<GroupQuotaLimitsRequestUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param requestId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n requestId: string,\n options?: GroupQuotaLimitsRequestGetOptionalParams,\n ): Promise<GroupQuotaLimitsRequestGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, requestId, options },\n getOperationSpec,\n );\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location} and resource eq {resourceName}\n * Example: $filter=location eq eastus and resourceName eq cores\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): Promise<GroupQuotaLimitsRequestListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n nextLink: string,\n options?: GroupQuotaLimitsRequestListNextOptionalParams,\n ): Promise<GroupQuotaLimitsRequestListNextResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n nextLink,\n options,\n },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaLimits/{location}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.groupQuotaRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.resourceProviderName,\n Parameters.location,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/groupQuotaRequests/{requestId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubmittedResourceRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.requestId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubmittedResourceRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.resourceProviderName,\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.SubmittedResourceRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n Parameters.resourceProviderName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"groupQuotaLimitsRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaLimitsRequest.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;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAa9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAM,OAAO,2BAA2B;IACrB,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;Q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AAc;QACzB,UAAU,CAAC,oBAAoB;KAChC;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,kCAAkC;SACvD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,oBAAoB;KAChC;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 { GroupQuotaLimitsRequest } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SubmittedResourceRequestStatus,\n GroupQuotaLimitsRequestListNextOptionalParams,\n GroupQuotaLimitsRequestListOptionalParams,\n GroupQuotaLimitsRequestListResponse,\n GroupQuotaLimitsRequestUpdateOptionalParams,\n GroupQuotaLimitsRequestUpdateResponse,\n GroupQuotaLimitsRequestGetOptionalParams,\n GroupQuotaLimitsRequestGetResponse,\n GroupQuotaLimitsRequestListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaLimitsRequest operations. */\nexport class GroupQuotaLimitsRequestImpl implements GroupQuotaLimitsRequest {\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaLimitsRequest class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location} and resource eq {resourceName}\n * Example: $filter=location eq eastus and resourceName eq cores\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): PagedAsyncIterableIterator<SubmittedResourceRequestStatus> {\n const iter = this.listPagingAll(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SubmittedResourceRequestStatus[]> {\n let result: GroupQuotaLimitsRequestListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n );\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): AsyncIterableIterator<SubmittedResourceRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName\n * properties are specified in the request body. Only 1 resource quota can be requested. Please note\n * that patch request creates a new groupQuota request.\n * Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with\n * retry-after duration in seconds to check the intermediate status. This API provides the finals\n * status with the request details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaLimitsRequestUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaLimitsRequestUpdateResponse>,\n GroupQuotaLimitsRequestUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaLimitsRequestUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaLimitsRequestUpdateResponse,\n OperationState<GroupQuotaLimitsRequestUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName\n * properties are specified in the request body. Only 1 resource quota can be requested. Please note\n * that patch request creates a new groupQuota request.\n * Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with\n * retry-after duration in seconds to check the intermediate status. This API provides the finals\n * status with the request details and status.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaLimitsRequestUpdateOptionalParams,\n ): Promise<GroupQuotaLimitsRequestUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param requestId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n requestId: string,\n options?: GroupQuotaLimitsRequestGetOptionalParams,\n ): Promise<GroupQuotaLimitsRequestGetResponse> {\n return this.client.sendOperationRequest(\n { managementGroupId, groupQuotaName, requestId, options },\n getOperationSpec,\n );\n }\n\n /**\n * Get API to check the status of a GroupQuota request by requestId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location} and resource eq {resourceName}\n * Example: $filter=location eq eastus and resourceName eq cores\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaLimitsRequestListOptionalParams,\n ): Promise<GroupQuotaLimitsRequestListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n nextLink: string,\n options?: GroupQuotaLimitsRequestListNextOptionalParams,\n ): Promise<GroupQuotaLimitsRequestListNextResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n nextLink,\n options,\n },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaLimits/{location}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 201: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 202: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n 204: {\n bodyMapper: Mappers.GroupQuotaLimitList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.groupQuotaRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.resourceProviderName,\n Parameters.location,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/groupQuotaRequests/{requestId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubmittedResourceRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.requestId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubmittedResourceRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.resourceProviderName,\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.SubmittedResourceRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n Parameters.resourceProviderName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing GroupQuotaSubscriptionAllocation operations. */
12
12
  export class GroupQuotaSubscriptionAllocationImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class GroupQuotaSubscriptionAllocation class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"groupQuotaSubscriptionAllocation.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionAllocation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,oEAAoE;AACpE,MAAM,OAAO,oCAAoC;IAK/C;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,iBAAyB,EACzB,cAAsB,EACtB,oBAA4B,EAC5B,QAAgB,EAChB,OAA4D;QAE5D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,cAAc;YACd,oBAAoB;YACpB,QAAQ;YACR,OAAO;SACR,EACD,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,iOAAiO;IACvO,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;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;QACzB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,oBAAoB;QAC/B,UAAU,CAAC,QAAQ;KACpB;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 { GroupQuotaSubscriptionAllocation } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n GroupQuotaSubscriptionAllocationListOptionalParams,\n GroupQuotaSubscriptionAllocationListResponse,\n} from \"../models/index.js\";\n\n/** Class containing GroupQuotaSubscriptionAllocation operations. */\nexport class GroupQuotaSubscriptionAllocationImpl\n implements GroupQuotaSubscriptionAllocation\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionAllocation class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Gets all the quota allocated to a subscription for the specified resource provider and location for\n * resource names passed in $filter=resourceName eq {SKU}. This will include the GroupQuota and total\n * quota allocated to the subscription. Only the Group quota allocated to the subscription can be\n * allocated back to the MG Group Quota.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaSubscriptionAllocationListOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocations/{location}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"groupQuotaSubscriptionAllocation.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionAllocation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,oEAAoE;AACpE,MAAM,OAAO,oCAAoC;IAG9B,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,iBAAyB,EACzB,cAAsB,EACtB,oBAA4B,EAC5B,QAAgB,EAChB,OAA4D;QAE5D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,cAAc;YACd,oBAAoB;YACpB,QAAQ;YACR,OAAO;SACR,EACD,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,iOAAiO;IACvO,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;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;QACzB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,oBAAoB;QAC/B,UAAU,CAAC,QAAQ;KACpB;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 { GroupQuotaSubscriptionAllocation } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n GroupQuotaSubscriptionAllocationListOptionalParams,\n GroupQuotaSubscriptionAllocationListResponse,\n} from \"../models/index.js\";\n\n/** Class containing GroupQuotaSubscriptionAllocation operations. */\nexport class GroupQuotaSubscriptionAllocationImpl\n implements GroupQuotaSubscriptionAllocation\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionAllocation class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Gets all the quota allocated to a subscription for the specified resource provider and location for\n * resource names passed in $filter=resourceName eq {SKU}. This will include the GroupQuota and total\n * quota allocated to the subscription. Only the Group quota allocated to the subscription can be\n * allocated back to the MG Group Quota.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param options The options parameters.\n */\n list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n options?: GroupQuotaSubscriptionAllocationListOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n options,\n },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocations/{location}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.location,\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 GroupQuotaSubscriptionAllocationRequest operations. */
17
16
  export class GroupQuotaSubscriptionAllocationRequestImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class GroupQuotaSubscriptionAllocationRequest class.
20
20
  * @param client Reference to the service client
@@ -47,52 +47,35 @@ export class GroupQuotaSubscriptionAllocationRequestImpl {
47
47
  return this;
48
48
  },
49
49
  byPage: (settings) => {
50
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
50
+ if (settings?.maxPageSize) {
51
51
  throw new Error("maxPageSize is not supported by this operation.");
52
52
  }
53
53
  return this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings);
54
54
  },
55
55
  };
56
56
  }
57
- listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
58
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
59
- let result;
60
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
61
- if (!continuationToken) {
62
- result = yield __await(this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options));
63
- let page = result.value || [];
64
- continuationToken = result.nextLink;
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- while (continuationToken) {
69
- result = yield __await(this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options));
70
- continuationToken = result.nextLink;
71
- let page = result.value || [];
72
- setContinuationToken(page, continuationToken);
73
- yield yield __await(page);
74
- }
75
- });
57
+ async *listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
58
+ let result;
59
+ let continuationToken = settings?.continuationToken;
60
+ if (!continuationToken) {
61
+ result = await this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options);
62
+ let page = result.value || [];
63
+ continuationToken = result.nextLink;
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
67
+ while (continuationToken) {
68
+ result = await this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options);
69
+ continuationToken = result.nextLink;
70
+ let page = result.value || [];
71
+ setContinuationToken(page, continuationToken);
72
+ yield page;
73
+ }
76
74
  }
77
- listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
78
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
79
- var _a, e_1, _b, _c;
80
- try {
81
- for (var _d = true, _e = __asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
82
- _c = _f.value;
83
- _d = false;
84
- const page = _c;
85
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
86
- }
87
- }
88
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
89
- finally {
90
- try {
91
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
92
- }
93
- finally { if (e_1) throw e_1.error; }
94
- }
95
- });
75
+ async *listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
76
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)) {
77
+ yield* page;
78
+ }
96
79
  }
97
80
  /**
98
81
  * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to
@@ -115,14 +98,19 @@ export class GroupQuotaSubscriptionAllocationRequestImpl {
115
98
  return this.client.sendOperationRequest(args, spec);
116
99
  };
117
100
  const sendOperationFn = async (args, spec) => {
118
- var _a;
119
101
  let currentRawResponse = undefined;
120
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
102
+ const providedCallback = args.options?.onResponse;
121
103
  const callback = (rawResponse, flatResponse) => {
122
104
  currentRawResponse = rawResponse;
123
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
105
+ providedCallback?.(rawResponse, flatResponse);
106
+ };
107
+ const updatedArgs = {
108
+ ...args,
109
+ options: {
110
+ ...args.options,
111
+ onResponse: callback,
112
+ },
124
113
  };
125
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
126
114
  const flatResponse = await directSendOperation(updatedArgs, spec);
127
115
  return {
128
116
  flatResponse,
@@ -146,8 +134,8 @@ export class GroupQuotaSubscriptionAllocationRequestImpl {
146
134
  spec: updateOperationSpec,
147
135
  });
148
136
  const poller = await createHttpPoller(lro, {
149
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
150
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
137
+ restoreFrom: options?.resumeFrom,
138
+ intervalInMs: options?.updateIntervalInMs,
151
139
  resourceLocationConfig: "location",
152
140
  });
153
141
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"groupQuotaSubscriptionAllocationRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionAllocationRequest.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;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAc9C,4CAA4C;AAC5C,2EAA2E;AAC3E,MAAM,OAAO,2CAA2C;IAKtD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,oBAA4B,EAC5B,MAAc,EACd,OAAmE;QAEnE,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAC7B,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,iBAAiB,EACjB,cAAc,EACd,oBAA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,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,oBAAoB;KAChC;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 { GroupQuotaSubscriptionAllocationRequest } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n QuotaAllocationRequestStatus,\n GroupQuotaSubscriptionAllocationRequestListNextOptionalParams,\n GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n GroupQuotaSubscriptionAllocationRequestListResponse,\n SubscriptionQuotaAllocationsList,\n GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n GroupQuotaSubscriptionAllocationRequestUpdateResponse,\n GroupQuotaSubscriptionAllocationRequestGetOptionalParams,\n GroupQuotaSubscriptionAllocationRequestGetResponse,\n GroupQuotaSubscriptionAllocationRequestListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptionAllocationRequest operations. */\nexport class GroupQuotaSubscriptionAllocationRequestImpl\n implements GroupQuotaSubscriptionAllocationRequest\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionAllocationRequest class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Get all the quotaAllocationRequests for a resourceProvider/location. The filter paramter for\n * location is required.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location}\n * Example: $filter=location eq eastus\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): PagedAsyncIterableIterator<QuotaAllocationRequestStatus> {\n const iter = this.listPagingAll(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<QuotaAllocationRequestStatus[]> {\n let result: GroupQuotaSubscriptionAllocationRequestListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n );\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): AsyncIterableIterator<QuotaAllocationRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to\n * subscriptions or reduce the quota allocated to subscription to give back the unused quota ( quota >=\n * usages) to the groupQuota. So, this API can be used to assign Quota to subscriptions and assign back\n * unused quota to group quota, which can be assigned to another subscriptions in the GroupQuota. User\n * can collect unused quotas from multiple subscriptions within the groupQuota and assign the\n * groupQuota to the subscription, where it's needed.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param allocateQuotaRequest Quota requests payload.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n allocateQuotaRequest: SubscriptionQuotaAllocationsList,\n options?: GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionAllocationRequestUpdateResponse>,\n GroupQuotaSubscriptionAllocationRequestUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionAllocationRequestUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n allocateQuotaRequest,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionAllocationRequestUpdateResponse,\n OperationState<GroupQuotaSubscriptionAllocationRequestUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to\n * subscriptions or reduce the quota allocated to subscription to give back the unused quota ( quota >=\n * usages) to the groupQuota. So, this API can be used to assign Quota to subscriptions and assign back\n * unused quota to group quota, which can be assigned to another subscriptions in the GroupQuota. User\n * can collect unused quotas from multiple subscriptions within the groupQuota and assign the\n * groupQuota to the subscription, where it's needed.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param allocateQuotaRequest Quota requests payload.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n allocateQuotaRequest: SubscriptionQuotaAllocationsList,\n options?: GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n allocateQuotaRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the quota allocation request status for the subscriptionId by allocationId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param allocationId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n allocationId: string,\n options?: GroupQuotaSubscriptionAllocationRequestGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestGetResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n allocationId,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Get all the quotaAllocationRequests for a resourceProvider/location. The filter paramter for\n * location is required.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location}\n * Example: $filter=location eq eastus\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionAllocationRequestListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestListNextResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n nextLink,\n options,\n },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocations/{location}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 201: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 202: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 204: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.allocateQuotaRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.location,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{allocationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaAllocationRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.allocationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaAllocationRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\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.QuotaAllocationRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"groupQuotaSubscriptionAllocationRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionAllocationRequest.ts"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.\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 { GroupQuotaSubscriptionAllocationRequest } 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 { AzureQuotaExtensionAPI } from \"../azureQuotaExtensionAPI.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n QuotaAllocationRequestStatus,\n GroupQuotaSubscriptionAllocationRequestListNextOptionalParams,\n GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n GroupQuotaSubscriptionAllocationRequestListResponse,\n SubscriptionQuotaAllocationsList,\n GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n GroupQuotaSubscriptionAllocationRequestUpdateResponse,\n GroupQuotaSubscriptionAllocationRequestGetOptionalParams,\n GroupQuotaSubscriptionAllocationRequestGetResponse,\n GroupQuotaSubscriptionAllocationRequestListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing GroupQuotaSubscriptionAllocationRequest operations. */\nexport class GroupQuotaSubscriptionAllocationRequestImpl\n implements GroupQuotaSubscriptionAllocationRequest\n{\n private readonly client: AzureQuotaExtensionAPI;\n\n /**\n * Initialize a new instance of the class GroupQuotaSubscriptionAllocationRequest class.\n * @param client Reference to the service client\n */\n constructor(client: AzureQuotaExtensionAPI) {\n this.client = client;\n }\n\n /**\n * Get all the quotaAllocationRequests for a resourceProvider/location. The filter paramter for\n * location is required.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location}\n * Example: $filter=location eq eastus\n * @param options The options parameters.\n */\n public list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): PagedAsyncIterableIterator<QuotaAllocationRequestStatus> {\n const iter = this.listPagingAll(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listPagingPage(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<QuotaAllocationRequestStatus[]> {\n let result: GroupQuotaSubscriptionAllocationRequestListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n );\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 managementGroupId,\n groupQuotaName,\n resourceProviderName,\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): AsyncIterableIterator<QuotaAllocationRequestStatus> {\n for await (const page of this.listPagingPage(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to\n * subscriptions or reduce the quota allocated to subscription to give back the unused quota ( quota >=\n * usages) to the groupQuota. So, this API can be used to assign Quota to subscriptions and assign back\n * unused quota to group quota, which can be assigned to another subscriptions in the GroupQuota. User\n * can collect unused quotas from multiple subscriptions within the groupQuota and assign the\n * groupQuota to the subscription, where it's needed.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param allocateQuotaRequest Quota requests payload.\n * @param options The options parameters.\n */\n async beginUpdate(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n allocateQuotaRequest: SubscriptionQuotaAllocationsList,\n options?: GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<GroupQuotaSubscriptionAllocationRequestUpdateResponse>,\n GroupQuotaSubscriptionAllocationRequestUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<GroupQuotaSubscriptionAllocationRequestUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n allocateQuotaRequest,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n GroupQuotaSubscriptionAllocationRequestUpdateResponse,\n OperationState<GroupQuotaSubscriptionAllocationRequestUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to\n * subscriptions or reduce the quota allocated to subscription to give back the unused quota ( quota >=\n * usages) to the groupQuota. So, this API can be used to assign Quota to subscriptions and assign back\n * unused quota to group quota, which can be assigned to another subscriptions in the GroupQuota. User\n * can collect unused quotas from multiple subscriptions within the groupQuota and assign the\n * groupQuota to the subscription, where it's needed.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param location The name of the Azure region.\n * @param allocateQuotaRequest Quota requests payload.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n location: string,\n allocateQuotaRequest: SubscriptionQuotaAllocationsList,\n options?: GroupQuotaSubscriptionAllocationRequestUpdateOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestUpdateResponse> {\n const poller = await this.beginUpdate(\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n location,\n allocateQuotaRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get the quota allocation request status for the subscriptionId by allocationId.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param allocationId Request Id.\n * @param options The options parameters.\n */\n get(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n allocationId: string,\n options?: GroupQuotaSubscriptionAllocationRequestGetOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestGetResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n allocationId,\n options,\n },\n getOperationSpec,\n );\n }\n\n /**\n * Get all the quotaAllocationRequests for a resourceProvider/location. The filter paramter for\n * location is required.\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\n * @param filter | Field | Supported operators\n * |---------------------|------------------------\n *\n * location eq {location}\n * Example: $filter=location eq eastus\n * @param options The options parameters.\n */\n private _list(\n managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n filter: string,\n options?: GroupQuotaSubscriptionAllocationRequestListOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestListResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n filter,\n options,\n },\n listOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param managementGroupId Management Group Id.\n * @param groupQuotaName The GroupQuota name. The name should be unique for the provided context\n * tenantId/MgId.\n * @param resourceProviderName The resource provider name, such as - Microsoft.Compute. Currently only\n * Microsoft.Compute resource provider supports this API.\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 managementGroupId: string,\n groupQuotaName: string,\n resourceProviderName: string,\n nextLink: string,\n options?: GroupQuotaSubscriptionAllocationRequestListNextOptionalParams,\n ): Promise<GroupQuotaSubscriptionAllocationRequestListNextResponse> {\n return this.client.sendOperationRequest(\n {\n managementGroupId,\n groupQuotaName,\n resourceProviderName,\n nextLink,\n options,\n },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocations/{location}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 201: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 202: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n 204: {\n bodyMapper: Mappers.SubscriptionQuotaAllocationsList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.allocateQuotaRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.location,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{allocationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaAllocationRequestStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\n Parameters.allocationId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.QuotaAllocationRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\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.QuotaAllocationRequestStatusList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.managementGroupId,\n Parameters.groupQuotaName,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceProviderName,\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";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing GroupQuotaSubscriptionRequests operations. */
15
14
  export class GroupQuotaSubscriptionRequestsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class GroupQuotaSubscriptionRequests class.
18
18
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class GroupQuotaSubscriptionRequestsImpl {
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(managementGroupId, groupQuotaName, options, settings);
45
45
  },
46
46
  };
47
47
  }
48
- listPagingPage(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listPagingAll(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, 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(managementGroupId, groupQuotaName, options) {
67
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * List API to check the status of a subscriptionId requests by requestId. Request history is