@azure/arm-billing 5.0.1-alpha.20250618.1 → 5.0.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.
- package/dist/browser/billingManagementClient.js +43 -5
- package/dist/browser/billingManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +868 -393
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/address.js +1 -0
- package/dist/browser/operations/address.js.map +1 -1
- package/dist/browser/operations/agreements.js +23 -40
- package/dist/browser/operations/agreements.js.map +1 -1
- package/dist/browser/operations/associatedTenants.js +45 -52
- package/dist/browser/operations/associatedTenants.js.map +1 -1
- package/dist/browser/operations/availableBalances.js +1 -0
- package/dist/browser/operations/availableBalances.js.map +1 -1
- package/dist/browser/operations/billingAccounts.js +79 -98
- package/dist/browser/operations/billingAccounts.js.map +1 -1
- package/dist/browser/operations/billingPermissions.js +162 -281
- package/dist/browser/operations/billingPermissions.js.map +1 -1
- package/dist/browser/operations/billingProfiles.js +45 -52
- package/dist/browser/operations/billingProfiles.js.map +1 -1
- package/dist/browser/operations/billingPropertyOperations.js +1 -0
- package/dist/browser/operations/billingPropertyOperations.js.map +1 -1
- package/dist/browser/operations/billingRequests.js +122 -202
- package/dist/browser/operations/billingRequests.js.map +1 -1
- package/dist/browser/operations/billingRoleAssignments.js +260 -307
- package/dist/browser/operations/billingRoleAssignments.js.map +1 -1
- package/dist/browser/operations/billingRoleDefinitionOperations.js +139 -241
- package/dist/browser/operations/billingRoleDefinitionOperations.js.map +1 -1
- package/dist/browser/operations/billingSubscriptions.js +199 -271
- package/dist/browser/operations/billingSubscriptions.js.map +1 -1
- package/dist/browser/operations/billingSubscriptionsAliases.js +34 -46
- package/dist/browser/operations/billingSubscriptionsAliases.js.map +1 -1
- package/dist/browser/operations/customers.js +45 -79
- package/dist/browser/operations/customers.js.map +1 -1
- package/dist/browser/operations/departments.js +23 -40
- package/dist/browser/operations/departments.js.map +1 -1
- package/dist/browser/operations/enrollmentAccounts.js +45 -79
- package/dist/browser/operations/enrollmentAccounts.js.map +1 -1
- package/dist/browser/operations/invoiceSections.js +45 -52
- package/dist/browser/operations/invoiceSections.js.map +1 -1
- package/dist/browser/operations/invoices.js +133 -154
- package/dist/browser/operations/invoices.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/partnerTransfers.js +23 -40
- package/dist/browser/operations/partnerTransfers.js.map +1 -1
- package/dist/browser/operations/paymentMethods.js +67 -118
- package/dist/browser/operations/paymentMethods.js.map +1 -1
- package/dist/browser/operations/policies.js +45 -24
- package/dist/browser/operations/policies.js.map +1 -1
- package/dist/browser/operations/products.js +100 -163
- package/dist/browser/operations/products.js.map +1 -1
- package/dist/browser/operations/recipientTransfers.js +23 -40
- package/dist/browser/operations/recipientTransfers.js.map +1 -1
- package/dist/browser/operations/reservationOrders.js +23 -40
- package/dist/browser/operations/reservationOrders.js.map +1 -1
- package/dist/browser/operations/reservations.js +78 -124
- package/dist/browser/operations/reservations.js.map +1 -1
- package/dist/browser/operations/savingsPlanOrders.js +23 -40
- package/dist/browser/operations/savingsPlanOrders.js.map +1 -1
- package/dist/browser/operations/savingsPlans.js +56 -85
- package/dist/browser/operations/savingsPlans.js.map +1 -1
- package/dist/browser/operations/transactions.js +100 -163
- package/dist/browser/operations/transactions.js.map +1 -1
- package/dist/browser/operations/transfers.js +23 -40
- package/dist/browser/operations/transfers.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/billingManagementClient.js +43 -5
- package/dist/commonjs/billingManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +868 -393
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/address.js +1 -0
- package/dist/commonjs/operations/address.js.map +1 -1
- package/dist/commonjs/operations/agreements.js +23 -39
- package/dist/commonjs/operations/agreements.js.map +1 -1
- package/dist/commonjs/operations/associatedTenants.js +45 -51
- package/dist/commonjs/operations/associatedTenants.js.map +1 -1
- package/dist/commonjs/operations/availableBalances.js +1 -0
- package/dist/commonjs/operations/availableBalances.js.map +1 -1
- package/dist/commonjs/operations/billingAccounts.js +79 -97
- package/dist/commonjs/operations/billingAccounts.js.map +1 -1
- package/dist/commonjs/operations/billingPermissions.js +155 -273
- package/dist/commonjs/operations/billingPermissions.js.map +1 -1
- package/dist/commonjs/operations/billingProfiles.js +45 -51
- package/dist/commonjs/operations/billingProfiles.js.map +1 -1
- package/dist/commonjs/operations/billingPropertyOperations.js +1 -0
- package/dist/commonjs/operations/billingPropertyOperations.js.map +1 -1
- package/dist/commonjs/operations/billingRequests.js +122 -201
- package/dist/commonjs/operations/billingRequests.js.map +1 -1
- package/dist/commonjs/operations/billingRoleAssignments.js +260 -306
- package/dist/commonjs/operations/billingRoleAssignments.js.map +1 -1
- package/dist/commonjs/operations/billingRoleDefinitionOperations.js +139 -240
- package/dist/commonjs/operations/billingRoleDefinitionOperations.js.map +1 -1
- package/dist/commonjs/operations/billingSubscriptions.js +199 -270
- package/dist/commonjs/operations/billingSubscriptions.js.map +1 -1
- package/dist/commonjs/operations/billingSubscriptionsAliases.js +34 -45
- package/dist/commonjs/operations/billingSubscriptionsAliases.js.map +1 -1
- package/dist/commonjs/operations/customers.js +45 -78
- package/dist/commonjs/operations/customers.js.map +1 -1
- package/dist/commonjs/operations/departments.js +23 -39
- package/dist/commonjs/operations/departments.js.map +1 -1
- package/dist/commonjs/operations/enrollmentAccounts.js +45 -78
- package/dist/commonjs/operations/enrollmentAccounts.js.map +1 -1
- package/dist/commonjs/operations/invoiceSections.js +45 -51
- package/dist/commonjs/operations/invoiceSections.js.map +1 -1
- package/dist/commonjs/operations/invoices.js +133 -153
- package/dist/commonjs/operations/invoices.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/partnerTransfers.js +23 -39
- package/dist/commonjs/operations/partnerTransfers.js.map +1 -1
- package/dist/commonjs/operations/paymentMethods.js +67 -117
- package/dist/commonjs/operations/paymentMethods.js.map +1 -1
- package/dist/commonjs/operations/policies.js +45 -24
- package/dist/commonjs/operations/policies.js.map +1 -1
- package/dist/commonjs/operations/products.js +100 -162
- package/dist/commonjs/operations/products.js.map +1 -1
- package/dist/commonjs/operations/recipientTransfers.js +23 -39
- package/dist/commonjs/operations/recipientTransfers.js.map +1 -1
- package/dist/commonjs/operations/reservationOrders.js +23 -39
- package/dist/commonjs/operations/reservationOrders.js.map +1 -1
- package/dist/commonjs/operations/reservations.js +78 -123
- package/dist/commonjs/operations/reservations.js.map +1 -1
- package/dist/commonjs/operations/savingsPlanOrders.js +23 -39
- package/dist/commonjs/operations/savingsPlanOrders.js.map +1 -1
- package/dist/commonjs/operations/savingsPlans.js +56 -84
- package/dist/commonjs/operations/savingsPlans.js.map +1 -1
- package/dist/commonjs/operations/transactions.js +100 -162
- package/dist/commonjs/operations/transactions.js.map +1 -1
- package/dist/commonjs/operations/transfers.js +23 -39
- package/dist/commonjs/operations/transfers.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/billingManagementClient.js +43 -5
- package/dist/esm/billingManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +868 -393
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/address.js +1 -0
- package/dist/esm/operations/address.js.map +1 -1
- package/dist/esm/operations/agreements.js +23 -40
- package/dist/esm/operations/agreements.js.map +1 -1
- package/dist/esm/operations/associatedTenants.js +45 -52
- package/dist/esm/operations/associatedTenants.js.map +1 -1
- package/dist/esm/operations/availableBalances.js +1 -0
- package/dist/esm/operations/availableBalances.js.map +1 -1
- package/dist/esm/operations/billingAccounts.js +79 -98
- package/dist/esm/operations/billingAccounts.js.map +1 -1
- package/dist/esm/operations/billingPermissions.js +162 -281
- package/dist/esm/operations/billingPermissions.js.map +1 -1
- package/dist/esm/operations/billingProfiles.js +45 -52
- package/dist/esm/operations/billingProfiles.js.map +1 -1
- package/dist/esm/operations/billingPropertyOperations.js +1 -0
- package/dist/esm/operations/billingPropertyOperations.js.map +1 -1
- package/dist/esm/operations/billingRequests.js +122 -202
- package/dist/esm/operations/billingRequests.js.map +1 -1
- package/dist/esm/operations/billingRoleAssignments.js +260 -307
- package/dist/esm/operations/billingRoleAssignments.js.map +1 -1
- package/dist/esm/operations/billingRoleDefinitionOperations.js +139 -241
- package/dist/esm/operations/billingRoleDefinitionOperations.js.map +1 -1
- package/dist/esm/operations/billingSubscriptions.js +199 -271
- package/dist/esm/operations/billingSubscriptions.js.map +1 -1
- package/dist/esm/operations/billingSubscriptionsAliases.js +34 -46
- package/dist/esm/operations/billingSubscriptionsAliases.js.map +1 -1
- package/dist/esm/operations/customers.js +45 -79
- package/dist/esm/operations/customers.js.map +1 -1
- package/dist/esm/operations/departments.js +23 -40
- package/dist/esm/operations/departments.js.map +1 -1
- package/dist/esm/operations/enrollmentAccounts.js +45 -79
- package/dist/esm/operations/enrollmentAccounts.js.map +1 -1
- package/dist/esm/operations/invoiceSections.js +45 -52
- package/dist/esm/operations/invoiceSections.js.map +1 -1
- package/dist/esm/operations/invoices.js +133 -154
- package/dist/esm/operations/invoices.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/partnerTransfers.js +23 -40
- package/dist/esm/operations/partnerTransfers.js.map +1 -1
- package/dist/esm/operations/paymentMethods.js +67 -118
- package/dist/esm/operations/paymentMethods.js.map +1 -1
- package/dist/esm/operations/policies.js +45 -24
- package/dist/esm/operations/policies.js.map +1 -1
- package/dist/esm/operations/products.js +100 -163
- package/dist/esm/operations/products.js.map +1 -1
- package/dist/esm/operations/recipientTransfers.js +23 -40
- package/dist/esm/operations/recipientTransfers.js.map +1 -1
- package/dist/esm/operations/reservationOrders.js +23 -40
- package/dist/esm/operations/reservationOrders.js.map +1 -1
- package/dist/esm/operations/reservations.js +78 -124
- package/dist/esm/operations/reservations.js.map +1 -1
- package/dist/esm/operations/savingsPlanOrders.js +23 -40
- package/dist/esm/operations/savingsPlanOrders.js.map +1 -1
- package/dist/esm/operations/savingsPlans.js +56 -85
- package/dist/esm/operations/savingsPlans.js.map +1 -1
- package/dist/esm/operations/transactions.js +100 -163
- package/dist/esm/operations/transactions.js.map +1 -1
- package/dist/esm/operations/transfers.js +23 -40
- package/dist/esm/operations/transfers.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/billingManagementClient.js +43 -5
- package/dist/react-native/billingManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +868 -393
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/address.js +1 -0
- package/dist/react-native/operations/address.js.map +1 -1
- package/dist/react-native/operations/agreements.js +23 -40
- package/dist/react-native/operations/agreements.js.map +1 -1
- package/dist/react-native/operations/associatedTenants.js +45 -52
- package/dist/react-native/operations/associatedTenants.js.map +1 -1
- package/dist/react-native/operations/availableBalances.js +1 -0
- package/dist/react-native/operations/availableBalances.js.map +1 -1
- package/dist/react-native/operations/billingAccounts.js +79 -98
- package/dist/react-native/operations/billingAccounts.js.map +1 -1
- package/dist/react-native/operations/billingPermissions.js +162 -281
- package/dist/react-native/operations/billingPermissions.js.map +1 -1
- package/dist/react-native/operations/billingProfiles.js +45 -52
- package/dist/react-native/operations/billingProfiles.js.map +1 -1
- package/dist/react-native/operations/billingPropertyOperations.js +1 -0
- package/dist/react-native/operations/billingPropertyOperations.js.map +1 -1
- package/dist/react-native/operations/billingRequests.js +122 -202
- package/dist/react-native/operations/billingRequests.js.map +1 -1
- package/dist/react-native/operations/billingRoleAssignments.js +260 -307
- package/dist/react-native/operations/billingRoleAssignments.js.map +1 -1
- package/dist/react-native/operations/billingRoleDefinitionOperations.js +139 -241
- package/dist/react-native/operations/billingRoleDefinitionOperations.js.map +1 -1
- package/dist/react-native/operations/billingSubscriptions.js +199 -271
- package/dist/react-native/operations/billingSubscriptions.js.map +1 -1
- package/dist/react-native/operations/billingSubscriptionsAliases.js +34 -46
- package/dist/react-native/operations/billingSubscriptionsAliases.js.map +1 -1
- package/dist/react-native/operations/customers.js +45 -79
- package/dist/react-native/operations/customers.js.map +1 -1
- package/dist/react-native/operations/departments.js +23 -40
- package/dist/react-native/operations/departments.js.map +1 -1
- package/dist/react-native/operations/enrollmentAccounts.js +45 -79
- package/dist/react-native/operations/enrollmentAccounts.js.map +1 -1
- package/dist/react-native/operations/invoiceSections.js +45 -52
- package/dist/react-native/operations/invoiceSections.js.map +1 -1
- package/dist/react-native/operations/invoices.js +133 -154
- package/dist/react-native/operations/invoices.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/partnerTransfers.js +23 -40
- package/dist/react-native/operations/partnerTransfers.js.map +1 -1
- package/dist/react-native/operations/paymentMethods.js +67 -118
- package/dist/react-native/operations/paymentMethods.js.map +1 -1
- package/dist/react-native/operations/policies.js +45 -24
- package/dist/react-native/operations/policies.js.map +1 -1
- package/dist/react-native/operations/products.js +100 -163
- package/dist/react-native/operations/products.js.map +1 -1
- package/dist/react-native/operations/recipientTransfers.js +23 -40
- package/dist/react-native/operations/recipientTransfers.js.map +1 -1
- package/dist/react-native/operations/reservationOrders.js +23 -40
- package/dist/react-native/operations/reservationOrders.js.map +1 -1
- package/dist/react-native/operations/reservations.js +78 -124
- package/dist/react-native/operations/reservations.js.map +1 -1
- package/dist/react-native/operations/savingsPlanOrders.js +23 -40
- package/dist/react-native/operations/savingsPlanOrders.js.map +1 -1
- package/dist/react-native/operations/savingsPlans.js +56 -85
- package/dist/react-native/operations/savingsPlans.js.map +1 -1
- package/dist/react-native/operations/transactions.js +100 -163
- package/dist/react-native/operations/transactions.js.map +1 -1
- package/dist/react-native/operations/transfers.js +23 -40
- package/dist/react-native/operations/transfers.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-billing.api.md → arm-billing-node.api.md} +0 -0
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Address operations. */
|
|
12
12
|
export class AddressImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Address class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/operations/address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/operations/address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CACN,UAA0B,EAC1B,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,UAAU,EAAE,OAAO,EAAE,EACvB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { Address } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n AddressDetails,\n AddressValidateOptionalParams,\n AddressValidateResponse,\n} from \"../models/index.js\";\n\n/** Class containing Address operations. */\nexport class AddressImpl implements Address {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class Address class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Validates an address. Use the operation to validate an address before using it as soldTo or a billTo\n * address.\n * @param parameters Address details.\n * @param options The options parameters.\n */\n validate(\n parameters: AddressDetails,\n options?: AddressValidateOptionalParams,\n ): Promise<AddressValidateResponse> {\n return this.client.sendOperationRequest(\n { parameters, options },\n validateOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst validateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/validateAddress\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AddressValidationResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters4,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Agreements operations. */
|
|
15
14
|
export class AgreementsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Agreements class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -35,52 +35,35 @@ export class AgreementsImpl {
|
|
|
35
35
|
return this;
|
|
36
36
|
},
|
|
37
37
|
byPage: (settings) => {
|
|
38
|
-
if (settings
|
|
38
|
+
if (settings?.maxPageSize) {
|
|
39
39
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
40
40
|
}
|
|
41
41
|
return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
listByBillingAccountPagingPage(billingAccountName, options, settings) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
});
|
|
45
|
+
async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
|
|
46
|
+
let result;
|
|
47
|
+
let continuationToken = settings?.continuationToken;
|
|
48
|
+
if (!continuationToken) {
|
|
49
|
+
result = await this._listByBillingAccount(billingAccountName, options);
|
|
50
|
+
let page = result.value || [];
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
setContinuationToken(page, continuationToken);
|
|
53
|
+
yield page;
|
|
54
|
+
}
|
|
55
|
+
while (continuationToken) {
|
|
56
|
+
result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
|
|
57
|
+
continuationToken = result.nextLink;
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
setContinuationToken(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
64
62
|
}
|
|
65
|
-
listByBillingAccountPagingAll(billingAccountName, options) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
70
|
-
_c = _f.value;
|
|
71
|
-
_d = false;
|
|
72
|
-
const page = _c;
|
|
73
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
-
finally {
|
|
78
|
-
try {
|
|
79
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
80
|
-
}
|
|
81
|
-
finally { if (e_1) throw e_1.error; }
|
|
82
|
-
}
|
|
83
|
-
});
|
|
63
|
+
async *listByBillingAccountPagingAll(billingAccountName, options) {
|
|
64
|
+
for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
|
|
65
|
+
yield* page;
|
|
66
|
+
}
|
|
84
67
|
}
|
|
85
68
|
/**
|
|
86
69
|
* Gets an agreement by ID.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreements.js","sourceRoot":"","sources":["../../../src/operations/agreements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CACzB,kBAA0B,EAC1B,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,6BAA6B,CAC7C,kBAAkB,EAClB,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,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xC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,8EAA8E;IACpF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;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,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAChE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Agreements } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n Agreement,\n AgreementsListByBillingAccountNextOptionalParams,\n AgreementsListByBillingAccountOptionalParams,\n AgreementsListByBillingAccountResponse,\n AgreementsGetOptionalParams,\n AgreementsGetResponse,\n AgreementsListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Agreements operations. */\nexport class AgreementsImpl implements Agreements {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class Agreements class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the agreements for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<Agreement> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Agreement[]> {\n let result: AgreementsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountName,\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 *listByBillingAccountPagingAll(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<Agreement> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets an agreement by ID.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param agreementName The ID that uniquely identifies an agreement.\n * @param options The options parameters.\n */\n get(\n billingAccountName: string,\n agreementName: string,\n options?: AgreementsGetOptionalParams,\n ): Promise<AgreementsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, agreementName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists the agreements for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): Promise<AgreementsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountName: string,\n nextLink: string,\n options?: AgreementsListByBillingAccountNextOptionalParams,\n ): Promise<AgreementsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Agreement,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.agreementName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgreementListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgreementListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"agreements.js","sourceRoot":"","sources":["../../../src/operations/agreements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CACzB,kBAA0B,EAC1B,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,6BAA6B,CAC7C,kBAAkB,EAClB,OAAO,CACR,CAAC;QACF,OAAO;YAC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AC,kBAAkB;QAC7B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,8EAA8E;IACpF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;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,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAChE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Agreements } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n Agreement,\n AgreementsListByBillingAccountNextOptionalParams,\n AgreementsListByBillingAccountOptionalParams,\n AgreementsListByBillingAccountResponse,\n AgreementsGetOptionalParams,\n AgreementsGetResponse,\n AgreementsListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Agreements operations. */\nexport class AgreementsImpl implements Agreements {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class Agreements class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the agreements for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<Agreement> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Agreement[]> {\n let result: AgreementsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountName,\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 *listByBillingAccountPagingAll(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<Agreement> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets an agreement by ID.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param agreementName The ID that uniquely identifies an agreement.\n * @param options The options parameters.\n */\n get(\n billingAccountName: string,\n agreementName: string,\n options?: AgreementsGetOptionalParams,\n ): Promise<AgreementsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, agreementName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists the agreements for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: AgreementsListByBillingAccountOptionalParams,\n ): Promise<AgreementsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountName: string,\n nextLink: string,\n options?: AgreementsListByBillingAccountNextOptionalParams,\n ): Promise<AgreementsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Agreement,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.agreementName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgreementListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgreementListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing AssociatedTenants operations. */
|
|
17
16
|
export class AssociatedTenantsImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class AssociatedTenants class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -39,52 +39,35 @@ export class AssociatedTenantsImpl {
|
|
|
39
39
|
return this;
|
|
40
40
|
},
|
|
41
41
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
44
|
}
|
|
45
45
|
return this.listByBillingAccountPagingPage(billingAccountName, options, settings);
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
listByBillingAccountPagingPage(billingAccountName, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
49
|
+
async *listByBillingAccountPagingPage(billingAccountName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listByBillingAccount(billingAccountName, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
setContinuationToken(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listByBillingAccountNext(billingAccountName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
setContinuationToken(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
68
66
|
}
|
|
69
|
-
listByBillingAccountPagingAll(billingAccountName, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = __asyncValues(this.listByBillingAccountPagingPage(billingAccountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
67
|
+
async *listByBillingAccountPagingAll(billingAccountName, options) {
|
|
68
|
+
for await (const page of this.listByBillingAccountPagingPage(billingAccountName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
73
|
* Deletes an associated tenant for a billing account.
|
|
@@ -97,14 +80,19 @@ export class AssociatedTenantsImpl {
|
|
|
97
80
|
return this.client.sendOperationRequest(args, spec);
|
|
98
81
|
};
|
|
99
82
|
const sendOperationFn = async (args, spec) => {
|
|
100
|
-
var _a;
|
|
101
83
|
let currentRawResponse = undefined;
|
|
102
|
-
const providedCallback =
|
|
84
|
+
const providedCallback = args.options?.onResponse;
|
|
103
85
|
const callback = (rawResponse, flatResponse) => {
|
|
104
86
|
currentRawResponse = rawResponse;
|
|
105
|
-
providedCallback
|
|
87
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
88
|
+
};
|
|
89
|
+
const updatedArgs = {
|
|
90
|
+
...args,
|
|
91
|
+
options: {
|
|
92
|
+
...args.options,
|
|
93
|
+
onResponse: callback,
|
|
94
|
+
},
|
|
106
95
|
};
|
|
107
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
108
96
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
109
97
|
return {
|
|
110
98
|
flatResponse,
|
|
@@ -121,8 +109,8 @@ export class AssociatedTenantsImpl {
|
|
|
121
109
|
spec: deleteOperationSpec,
|
|
122
110
|
});
|
|
123
111
|
const poller = await createHttpPoller(lro, {
|
|
124
|
-
restoreFrom: options
|
|
125
|
-
intervalInMs: options
|
|
112
|
+
restoreFrom: options?.resumeFrom,
|
|
113
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
126
114
|
resourceLocationConfig: "location",
|
|
127
115
|
});
|
|
128
116
|
await poller.poll();
|
|
@@ -159,14 +147,19 @@ export class AssociatedTenantsImpl {
|
|
|
159
147
|
return this.client.sendOperationRequest(args, spec);
|
|
160
148
|
};
|
|
161
149
|
const sendOperationFn = async (args, spec) => {
|
|
162
|
-
var _a;
|
|
163
150
|
let currentRawResponse = undefined;
|
|
164
|
-
const providedCallback =
|
|
151
|
+
const providedCallback = args.options?.onResponse;
|
|
165
152
|
const callback = (rawResponse, flatResponse) => {
|
|
166
153
|
currentRawResponse = rawResponse;
|
|
167
|
-
providedCallback
|
|
154
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
155
|
+
};
|
|
156
|
+
const updatedArgs = {
|
|
157
|
+
...args,
|
|
158
|
+
options: {
|
|
159
|
+
...args.options,
|
|
160
|
+
onResponse: callback,
|
|
161
|
+
},
|
|
168
162
|
};
|
|
169
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
170
163
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
171
164
|
return {
|
|
172
165
|
flatResponse,
|
|
@@ -183,8 +176,8 @@ export class AssociatedTenantsImpl {
|
|
|
183
176
|
spec: createOrUpdateOperationSpec,
|
|
184
177
|
});
|
|
185
178
|
const poller = await createHttpPoller(lro, {
|
|
186
|
-
restoreFrom: options
|
|
187
|
-
intervalInMs: options
|
|
179
|
+
restoreFrom: options?.resumeFrom,
|
|
180
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
188
181
|
resourceLocationConfig: "location",
|
|
189
182
|
});
|
|
190
183
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"associatedTenants.js","sourceRoot":"","sources":["../../../src/operations/associatedTenants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,IAAI;QACf,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,MAAM;KAClB;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAChE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;QAC7B,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AssociatedTenants } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AssociatedTenant,\n AssociatedTenantsListByBillingAccountNextOptionalParams,\n AssociatedTenantsListByBillingAccountOptionalParams,\n AssociatedTenantsListByBillingAccountResponse,\n AssociatedTenantsDeleteOptionalParams,\n AssociatedTenantsDeleteResponse,\n AssociatedTenantsGetOptionalParams,\n AssociatedTenantsGetResponse,\n AssociatedTenantsCreateOrUpdateOptionalParams,\n AssociatedTenantsCreateOrUpdateResponse,\n AssociatedTenantsListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AssociatedTenants operations. */\nexport class AssociatedTenantsImpl implements AssociatedTenants {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class AssociatedTenants class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the associated tenants that can collaborate with the billing account on commerce activities\n * like viewing and downloading invoices, managing payments, making purchases, and managing or\n * provisioning licenses.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<AssociatedTenant> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AssociatedTenant[]> {\n let result: AssociatedTenantsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountName,\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 *listByBillingAccountPagingAll(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<AssociatedTenant> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Deletes an associated tenant for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n async beginDelete(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AssociatedTenantsDeleteResponse>,\n AssociatedTenantsDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AssociatedTenantsDeleteResponse> => {\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: { billingAccountName, associatedTenantName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n AssociatedTenantsDeleteResponse,\n OperationState<AssociatedTenantsDeleteResponse>\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 * Deletes an associated tenant for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsDeleteOptionalParams,\n ): Promise<AssociatedTenantsDeleteResponse> {\n const poller = await this.beginDelete(\n billingAccountName,\n associatedTenantName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets an associated tenant by ID.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n get(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsGetOptionalParams,\n ): Promise<AssociatedTenantsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, associatedTenantName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update an associated tenant for the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param parameters An associated tenant.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n billingAccountName: string,\n associatedTenantName: string,\n parameters: AssociatedTenant,\n options?: AssociatedTenantsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AssociatedTenantsCreateOrUpdateResponse>,\n AssociatedTenantsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AssociatedTenantsCreateOrUpdateResponse> => {\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: { billingAccountName, associatedTenantName, parameters, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AssociatedTenantsCreateOrUpdateResponse,\n OperationState<AssociatedTenantsCreateOrUpdateResponse>\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 or update an associated tenant for the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param parameters An associated tenant.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n billingAccountName: string,\n associatedTenantName: string,\n parameters: AssociatedTenant,\n options?: AssociatedTenantsCreateOrUpdateOptionalParams,\n ): Promise<AssociatedTenantsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n billingAccountName,\n associatedTenantName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Lists the associated tenants that can collaborate with the billing account on commerce activities\n * like viewing and downloading invoices, managing payments, making purchases, and managing or\n * provisioning licenses.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): Promise<AssociatedTenantsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountName: string,\n nextLink: string,\n options?: AssociatedTenantsListByBillingAccountNextOptionalParams,\n ): Promise<AssociatedTenantsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 201: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 202: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 204: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenantListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.includeRevoked,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.top,\n Parameters.skip,\n Parameters.count,\n Parameters.search,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenantListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"associatedTenants.js","sourceRoot":"","sources":["../../../src/operations/associatedTenants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK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,kBAAkB;QAC7B,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AssociatedTenants } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AssociatedTenant,\n AssociatedTenantsListByBillingAccountNextOptionalParams,\n AssociatedTenantsListByBillingAccountOptionalParams,\n AssociatedTenantsListByBillingAccountResponse,\n AssociatedTenantsDeleteOptionalParams,\n AssociatedTenantsDeleteResponse,\n AssociatedTenantsGetOptionalParams,\n AssociatedTenantsGetResponse,\n AssociatedTenantsCreateOrUpdateOptionalParams,\n AssociatedTenantsCreateOrUpdateResponse,\n AssociatedTenantsListByBillingAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AssociatedTenants operations. */\nexport class AssociatedTenantsImpl implements AssociatedTenants {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class AssociatedTenants class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists the associated tenants that can collaborate with the billing account on commerce activities\n * like viewing and downloading invoices, managing payments, making purchases, and managing or\n * provisioning licenses.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n public listByBillingAccount(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): PagedAsyncIterableIterator<AssociatedTenant> {\n const iter = this.listByBillingAccountPagingAll(\n billingAccountName,\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.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBillingAccountPagingPage(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AssociatedTenant[]> {\n let result: AssociatedTenantsListByBillingAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBillingAccount(billingAccountName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByBillingAccountNext(\n billingAccountName,\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 *listByBillingAccountPagingAll(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): AsyncIterableIterator<AssociatedTenant> {\n for await (const page of this.listByBillingAccountPagingPage(\n billingAccountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Deletes an associated tenant for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n async beginDelete(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AssociatedTenantsDeleteResponse>,\n AssociatedTenantsDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AssociatedTenantsDeleteResponse> => {\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: { billingAccountName, associatedTenantName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n AssociatedTenantsDeleteResponse,\n OperationState<AssociatedTenantsDeleteResponse>\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 * Deletes an associated tenant for a billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsDeleteOptionalParams,\n ): Promise<AssociatedTenantsDeleteResponse> {\n const poller = await this.beginDelete(\n billingAccountName,\n associatedTenantName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets an associated tenant by ID.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param options The options parameters.\n */\n get(\n billingAccountName: string,\n associatedTenantName: string,\n options?: AssociatedTenantsGetOptionalParams,\n ): Promise<AssociatedTenantsGetResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, associatedTenantName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update an associated tenant for the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param parameters An associated tenant.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n billingAccountName: string,\n associatedTenantName: string,\n parameters: AssociatedTenant,\n options?: AssociatedTenantsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AssociatedTenantsCreateOrUpdateResponse>,\n AssociatedTenantsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AssociatedTenantsCreateOrUpdateResponse> => {\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: { billingAccountName, associatedTenantName, parameters, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n AssociatedTenantsCreateOrUpdateResponse,\n OperationState<AssociatedTenantsCreateOrUpdateResponse>\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 or update an associated tenant for the billing account.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param associatedTenantName The ID that uniquely identifies a tenant.\n * @param parameters An associated tenant.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n billingAccountName: string,\n associatedTenantName: string,\n parameters: AssociatedTenant,\n options?: AssociatedTenantsCreateOrUpdateOptionalParams,\n ): Promise<AssociatedTenantsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n billingAccountName,\n associatedTenantName,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Lists the associated tenants that can collaborate with the billing account on commerce activities\n * like viewing and downloading invoices, managing payments, making purchases, and managing or\n * provisioning licenses.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n private _listByBillingAccount(\n billingAccountName: string,\n options?: AssociatedTenantsListByBillingAccountOptionalParams,\n ): Promise<AssociatedTenantsListByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n listByBillingAccountOperationSpec,\n );\n }\n\n /**\n * ListByBillingAccountNext\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param nextLink The nextLink from the previous successful call to the ListByBillingAccount method.\n * @param options The options parameters.\n */\n private _listByBillingAccountNext(\n billingAccountName: string,\n nextLink: string,\n options?: AssociatedTenantsListByBillingAccountNextOptionalParams,\n ): Promise<AssociatedTenantsListByBillingAccountNextResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, nextLink, options },\n listByBillingAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.AssociatedTenantsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 201: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 202: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n 204: {\n bodyMapper: Mappers.AssociatedTenant,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.associatedTenantName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenantListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.includeRevoked,\n Parameters.filter,\n Parameters.orderBy,\n Parameters.top,\n Parameters.skip,\n Parameters.count,\n Parameters.search,\n ],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBillingAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AssociatedTenantListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing AvailableBalances operations. */
|
|
12
12
|
export class AvailableBalancesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class AvailableBalances class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availableBalances.js","sourceRoot":"","sources":["../../../src/operations/availableBalances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAStD,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;
|
|
1
|
+
{"version":3,"file":"availableBalances.js","sourceRoot":"","sources":["../../../src/operations/availableBalances.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAA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AE,OAAO,CAAC,gBAAgB;SACrC;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,kBAAkB;QAC7B,UAAU,CAAC,kBAAkB;KAC9B;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 { AvailableBalances } 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 { BillingManagementClient } from \"../billingManagementClient.js\";\nimport {\n AvailableBalancesGetByBillingAccountOptionalParams,\n AvailableBalancesGetByBillingAccountResponse,\n AvailableBalancesGetByBillingProfileOptionalParams,\n AvailableBalancesGetByBillingProfileResponse,\n} from \"../models/index.js\";\n\n/** Class containing AvailableBalances operations. */\nexport class AvailableBalancesImpl implements AvailableBalances {\n private readonly client: BillingManagementClient;\n\n /**\n * Initialize a new instance of the class AvailableBalances class.\n * @param client Reference to the service client\n */\n constructor(client: BillingManagementClient) {\n this.client = client;\n }\n\n /**\n * The Available Credit or Payment on Account Balance for a billing account. The credit balance can be\n * used to settle due or past due invoices and is supported for billing accounts with agreement type\n * Microsoft Customer Agreement. The payment on account balance is supported for billing accounts with\n * agreement type Microsoft Customer Agreement or Microsoft Online Services Program.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param options The options parameters.\n */\n getByBillingAccount(\n billingAccountName: string,\n options?: AvailableBalancesGetByBillingAccountOptionalParams,\n ): Promise<AvailableBalancesGetByBillingAccountResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, options },\n getByBillingAccountOperationSpec,\n );\n }\n\n /**\n * The Available Credit or Payment on Account Balance for a billing profile. The credit balance can be\n * used to settle due or past due invoices and is supported for billing accounts with agreement type\n * Microsoft Customer Agreement. The payment on account balance is supported for billing accounts with\n * agreement type Microsoft Customer Agreement.\n * @param billingAccountName The ID that uniquely identifies a billing account.\n * @param billingProfileName The ID that uniquely identifies a billing profile.\n * @param options The options parameters.\n */\n getByBillingProfile(\n billingAccountName: string,\n billingProfileName: string,\n options?: AvailableBalancesGetByBillingProfileOptionalParams,\n ): Promise<AvailableBalancesGetByBillingProfileResponse> {\n return this.client.sendOperationRequest(\n { billingAccountName, billingProfileName, options },\n getByBillingProfileOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getByBillingAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/availableBalance/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableBalance,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.billingAccountName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getByBillingProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableBalance,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.billingAccountName,\n Parameters.billingProfileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|