@azure/arm-quota 1.1.1-alpha.20250619.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.api.md → arm-quota-node.api.md} +0 -0
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing GroupQuotaLimitsRequest operations. */
20
20
  class GroupQuotaLimitsRequestImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class GroupQuotaLimitsRequest class.
23
24
  * @param client Reference to the service client
@@ -49,52 +50,35 @@ class GroupQuotaLimitsRequestImpl {
49
50
  return this;
50
51
  },
51
52
  byPage: (settings) => {
52
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
53
+ if (settings?.maxPageSize) {
53
54
  throw new Error("maxPageSize is not supported by this operation.");
54
55
  }
55
56
  return this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings);
56
57
  },
57
58
  };
58
59
  }
59
- listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
60
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
61
- let result;
62
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
63
- if (!continuationToken) {
64
- result = yield tslib_1.__await(this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options));
65
- let page = result.value || [];
66
- continuationToken = result.nextLink;
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- while (continuationToken) {
71
- result = yield tslib_1.__await(this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options));
72
- continuationToken = result.nextLink;
73
- let page = result.value || [];
74
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
75
- yield yield tslib_1.__await(page);
76
- }
77
- });
60
+ async *listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
61
+ let result;
62
+ let continuationToken = settings?.continuationToken;
63
+ if (!continuationToken) {
64
+ result = await this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options);
65
+ let page = result.value || [];
66
+ continuationToken = result.nextLink;
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
70
+ while (continuationToken) {
71
+ result = await this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options);
72
+ continuationToken = result.nextLink;
73
+ let page = result.value || [];
74
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
75
+ yield page;
76
+ }
78
77
  }
79
- listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
80
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
81
- var _a, e_1, _b, _c;
82
- try {
83
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
84
- _c = _f.value;
85
- _d = false;
86
- const page = _c;
87
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
88
- }
89
- }
90
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
91
- finally {
92
- try {
93
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
94
- }
95
- finally { if (e_1) throw e_1.error; }
96
- }
97
- });
78
+ async *listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
79
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)) {
80
+ yield* page;
81
+ }
98
82
  }
99
83
  /**
100
84
  * Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName
@@ -116,14 +100,19 @@ class GroupQuotaLimitsRequestImpl {
116
100
  return this.client.sendOperationRequest(args, spec);
117
101
  };
118
102
  const sendOperationFn = async (args, spec) => {
119
- var _a;
120
103
  let currentRawResponse = undefined;
121
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
104
+ const providedCallback = args.options?.onResponse;
122
105
  const callback = (rawResponse, flatResponse) => {
123
106
  currentRawResponse = rawResponse;
124
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
107
+ providedCallback?.(rawResponse, flatResponse);
108
+ };
109
+ const updatedArgs = {
110
+ ...args,
111
+ options: {
112
+ ...args.options,
113
+ onResponse: callback,
114
+ },
125
115
  };
126
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
127
116
  const flatResponse = await directSendOperation(updatedArgs, spec);
128
117
  return {
129
118
  flatResponse,
@@ -146,8 +135,8 @@ class GroupQuotaLimitsRequestImpl {
146
135
  spec: updateOperationSpec,
147
136
  });
148
137
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
149
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
150
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
138
+ restoreFrom: options?.resumeFrom,
139
+ intervalInMs: options?.updateIntervalInMs,
151
140
  resourceLocationConfig: "location",
152
141
  });
153
142
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"groupQuotaLimitsRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaLimitsRequest.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAa9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,oBAA4B,EAC5B,MAAc,EACd,OAAmD;QAEnD,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,M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AC,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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAa9C,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAAyB;IAEhD;;;OAGG;IACH,YAAY,MAA8B;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,IAAI,CACT,iBAAyB,EACzB,cAAsB,EACtB,oBAA4B,EAC5B,MAAc,EACd,OAAmD;QAEnD,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;Y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C,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"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing GroupQuotaSubscriptionAllocation operations. */
16
16
  class GroupQuotaSubscriptionAllocationImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class GroupQuotaSubscriptionAllocation class.
19
20
  * @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,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,oEAAoE;AACpE,MAAa,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;AA5CD,oFA4CC;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,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,oEAAoE;AACpE,MAAa,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;AA5CD,oFA4CC;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"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing GroupQuotaSubscriptionAllocationRequest operations. */
20
20
  class GroupQuotaSubscriptionAllocationRequestImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class GroupQuotaSubscriptionAllocationRequest class.
23
24
  * @param client Reference to the service client
@@ -50,52 +51,35 @@ class GroupQuotaSubscriptionAllocationRequestImpl {
50
51
  return this;
51
52
  },
52
53
  byPage: (settings) => {
53
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
54
+ if (settings?.maxPageSize) {
54
55
  throw new Error("maxPageSize is not supported by this operation.");
55
56
  }
56
57
  return this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings);
57
58
  },
58
59
  };
59
60
  }
60
- listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
61
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
62
- let result;
63
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
64
- if (!continuationToken) {
65
- result = yield tslib_1.__await(this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options));
66
- let page = result.value || [];
67
- continuationToken = result.nextLink;
68
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
- yield yield tslib_1.__await(page);
70
- }
71
- while (continuationToken) {
72
- result = yield tslib_1.__await(this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options));
73
- continuationToken = result.nextLink;
74
- let page = result.value || [];
75
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
76
- yield yield tslib_1.__await(page);
77
- }
78
- });
61
+ async *listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options, settings) {
62
+ let result;
63
+ let continuationToken = settings?.continuationToken;
64
+ if (!continuationToken) {
65
+ result = await this._list(managementGroupId, groupQuotaName, resourceProviderName, filter, options);
66
+ let page = result.value || [];
67
+ continuationToken = result.nextLink;
68
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
69
+ yield page;
70
+ }
71
+ while (continuationToken) {
72
+ result = await this._listNext(managementGroupId, groupQuotaName, resourceProviderName, continuationToken, options);
73
+ continuationToken = result.nextLink;
74
+ let page = result.value || [];
75
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
76
+ yield page;
77
+ }
79
78
  }
80
- listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
81
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
82
- var _a, e_1, _b, _c;
83
- try {
84
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
85
- _c = _f.value;
86
- _d = false;
87
- const page = _c;
88
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
89
- }
90
- }
91
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
92
- finally {
93
- try {
94
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
95
- }
96
- finally { if (e_1) throw e_1.error; }
97
- }
98
- });
79
+ async *listPagingAll(managementGroupId, groupQuotaName, resourceProviderName, filter, options) {
80
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, resourceProviderName, filter, options)) {
81
+ yield* page;
82
+ }
99
83
  }
100
84
  /**
101
85
  * Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to
@@ -118,14 +102,19 @@ class GroupQuotaSubscriptionAllocationRequestImpl {
118
102
  return this.client.sendOperationRequest(args, spec);
119
103
  };
120
104
  const sendOperationFn = async (args, spec) => {
121
- var _a;
122
105
  let currentRawResponse = undefined;
123
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
106
+ const providedCallback = args.options?.onResponse;
124
107
  const callback = (rawResponse, flatResponse) => {
125
108
  currentRawResponse = rawResponse;
126
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
109
+ providedCallback?.(rawResponse, flatResponse);
110
+ };
111
+ const updatedArgs = {
112
+ ...args,
113
+ options: {
114
+ ...args.options,
115
+ onResponse: callback,
116
+ },
127
117
  };
128
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
129
118
  const flatResponse = await directSendOperation(updatedArgs, spec);
130
119
  return {
131
120
  flatResponse,
@@ -149,8 +138,8 @@ class GroupQuotaSubscriptionAllocationRequestImpl {
149
138
  spec: updateOperationSpec,
150
139
  });
151
140
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
152
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
153
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
141
+ restoreFrom: options?.resumeFrom,
142
+ intervalInMs: options?.updateIntervalInMs,
154
143
  resourceLocationConfig: "location",
155
144
  });
156
145
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"groupQuotaSubscriptionAllocationRequest.js","sourceRoot":"","sources":["../../../src/operations/groupQuotaSubscriptionAllocationRequest.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,2EAA2E;AAC3E,MAAa,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,c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AgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,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,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,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"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAc9C,4CAA4C;AAC5C,2EAA2E;AAC3E,MAAa,2CAA2C;IAGrC,MAAM,CAAyB;IAEhD;;;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,EAAE,WAAW,EAAE,CAAC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AE;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"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing GroupQuotaSubscriptionRequests operations. */
18
18
  class GroupQuotaSubscriptionRequestsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class GroupQuotaSubscriptionRequests class.
21
22
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class GroupQuotaSubscriptionRequestsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(managementGroupId, groupQuotaName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listPagingPage(managementGroupId, groupQuotaName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._list(managementGroupId, groupQuotaName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listNext(managementGroupId, groupQuotaName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listPagingPage(managementGroupId, groupQuotaName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._list(managementGroupId, groupQuotaName, options);
57
+ let page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listNext(managementGroupId, groupQuotaName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ let page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listPagingAll(managementGroupId, groupQuotaName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(managementGroupId, groupQuotaName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listPagingAll(managementGroupId, groupQuotaName, options) {
71
+ for await (const page of this.listPagingPage(managementGroupId, groupQuotaName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * List API to check the status of a subscriptionId requests by requestId. Request history is