diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index f64b70065d1d9..cbedb015d4026 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -328,7 +328,7 @@ com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-b
com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-avs;1.5.0;1.6.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0
com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1
diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
index 4304d271b6c3a..ec39ce4069218 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md
@@ -1,14 +1,417 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.1.0 (2026-08-17)
-### Features Added
+- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.MarketplacesListResult` was removed
+
+#### `models.BudgetsListResult` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.ReservationDetailsListResult` was removed
+
+#### `models.LegacyReservationTransaction` was removed
+
+#### `models.Events` was removed
+
+#### `models.ResourceAttributes` was removed
+
+#### `models.ReservationRecommendationsListResult` was removed
+
+#### `models.UsageDetailsListResult` was removed
+
+#### `models.ModernReservationTransactionsListResult` was removed
+
+#### `models.ReservationTransactionResource` was removed
+
+#### `models.ReservationTransactionsListResult` was removed
+
+#### `models.Lots` was removed
+
+#### `models.ReservationSummariesListResult` was removed
+
+#### `models.ForecastSpend` was modified
+
+* `ForecastSpend()` was changed to private access
+* `validate()` was removed
+
+#### `models.ReservationRecommendationDetailsUsageProperties` was modified
+
+* `ReservationRecommendationDetailsUsageProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.BudgetTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.ModernChargeSummary` was modified
+
+* `ModernChargeSummary()` was changed to private access
+* `validate()` was removed
+* `withEtag(java.lang.String)` was removed
+
+#### `models.ModernSingleScopeReservationRecommendationProperties` was modified
+
+* `ModernSingleScopeReservationRecommendationProperties()` was changed to private access
+* `java.util.UUID subscriptionId()` -> `java.lang.String subscriptionId()`
+* `validate()` was removed
+
+#### `models.ModernReservationTransaction` was modified
+
+* `java.util.UUID purchasingSubscriptionGuid()` -> `java.lang.String purchasingSubscriptionGuid()`
+
+#### `models.ChargeSummary` was modified
+
+* `validate()` was removed
+* `models.ChargeSummary withEtag(java.lang.String)` -> `models.ChargeSummary withEtag(java.lang.String)`
+
+#### `models.ReservationRecommendationDetailsSavingsProperties` was modified
+
+* `ReservationRecommendationDetailsSavingsProperties()` was changed to private access
+* `java.lang.Float recommendedQuantity()` -> `java.lang.Double recommendedQuantity()`
+* `withCalculatedSavings(java.util.List)` was removed
+* `validate()` was removed
+
+#### `models.BudgetFilter` was modified
+
+* `validate()` was removed
+
+#### `models.BalancePropertiesAdjustmentDetailsItem` was modified
+
+* `BalancePropertiesAdjustmentDetailsItem()` was changed to private access
+* `validate()` was removed
+
+#### `models.MeterDetails` was modified
+
+* `MeterDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.Amount` was modified
+
+* `validate()` was removed
+
+#### `models.ModernSharedScopeReservationRecommendationProperties` was modified
+
+* `ModernSharedScopeReservationRecommendationProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.LegacyUsageDetail` was modified
+
+* `LegacyUsageDetail()` was changed to private access
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+* `validate()` was removed
+
+#### `models.PriceSheetProperties` was modified
+
+* `PriceSheetProperties()` was changed to private access
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+* `validate()` was removed
+
+#### `models.ModernUsageDetail` was modified
+
+* `ModernUsageDetail()` was changed to private access
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+* `validate()` was removed
+
+#### `models.BudgetFilterProperties` was modified
+
+* `validate()` was removed
+
+#### `models.LegacyChargeSummary` was modified
+
+* `LegacyChargeSummary()` was changed to private access
+* `withEtag(java.lang.String)` was removed
+* `validate()` was removed
+
+#### `models.ReservationRecommendationDetails` was modified
+
+* `getWithResponse(java.lang.String,models.Scope,java.lang.String,models.Term,models.LookBackPeriod,java.lang.String,com.azure.core.util.Context)` was removed
+
+#### `models.ReservationRecommendationDetailsResourceProperties` was modified
+
+* `ReservationRecommendationDetailsResourceProperties()` was changed to private access
+* `validate()` was removed
+* `java.lang.Float onDemandRate()` -> `java.lang.Double onDemandRate()`
+* `java.lang.Float reservationRate()` -> `java.lang.Double reservationRate()`
+
+#### `models.AmountWithExchangeRate` was modified
+
+* `AmountWithExchangeRate()` was changed to private access
+* `validate()` was removed
+
+#### `models.SkuProperty` was modified
+
+* `SkuProperty()` was changed to private access
+* `validate()` was removed
+
+#### `models.MeterDetailsResponse` was modified
+
+* `MeterDetailsResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.BalancePropertiesNewPurchasesDetailsItem` was modified
+
+* `BalancePropertiesNewPurchasesDetailsItem()` was changed to private access
+* `validate()` was removed
+
+#### `models.LegacySharedScopeReservationRecommendationProperties` was modified
+
+* `LegacySharedScopeReservationRecommendationProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.BudgetComparisonExpression` was modified
+
+* `validate()` was removed
+
+#### `models.CreditBalanceSummary` was modified
+
+* `CreditBalanceSummary()` was changed to private access
+* `validate()` was removed
+
+#### `models.CurrentSpend` was modified
+
+* `CurrentSpend()` was changed to private access
+* `validate()` was removed
+
+#### `models.ReservationRecommendationDetailsCalculatedSavingsProperties` was modified
+
+* `ReservationRecommendationDetailsCalculatedSavingsProperties()` was changed to private access
+* `java.lang.Float reservationCost()` -> `java.lang.Double reservationCost()`
+* `java.lang.Float onDemandCost()` -> `java.lang.Double onDemandCost()`
+* `java.lang.Float savings()` -> `java.lang.Double savings()`
+* `java.lang.Float quantity()` -> `java.lang.Double quantity()`
+* `java.lang.Float reservedUnitCount()` -> `java.lang.Double reservedUnitCount()`
+* `validate()` was removed
+* `java.lang.Float totalReservationCost()` -> `java.lang.Double totalReservationCost()`
+* `withReservedUnitCount(java.lang.Float)` was removed
+* `java.lang.Float overageCost()` -> `java.lang.Double overageCost()`
+
+#### `models.Marketplace` was modified
+
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+* `java.util.UUID subscriptionGuid()` -> `java.lang.String subscriptionGuid()`
+
+#### `models.LegacyReservationRecommendation` was modified
+
+* `LegacyReservationRecommendation()` was changed to private access
+* `validate()` was removed
+* `withProperties(models.LegacyReservationRecommendationProperties)` was removed
+
+#### `models.Reseller` was modified
+
+* `Reseller()` was changed to private access
+* `validate()` was removed
+
+#### `models.Notification` was modified
+
+* `validate()` was removed
+
+#### `models.ReservationTransactions` was modified
+
+* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+
+#### `models.ReservationTransaction` was modified
+
+* `java.util.UUID purchasingSubscriptionGuid()` -> `java.lang.String purchasingSubscriptionGuid()`
+
+#### `models.ModernReservationRecommendationProperties` was modified
+
+* `validate()` was removed
+* `java.lang.Float instanceFlexibilityRatio()` -> `java.lang.Double instanceFlexibilityRatio()`
+* `java.lang.Float recommendedQuantityNormalized()` -> `java.lang.Double recommendedQuantityNormalized()`
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+
+#### `models.ModernReservationRecommendation` was modified
+
+* `ModernReservationRecommendation()` was changed to private access
+* `validate()` was removed
+* `withProperties(models.ModernReservationRecommendationProperties)` was removed
+
+#### `models.LegacySingleScopeReservationRecommendationProperties` was modified
+
+* `LegacySingleScopeReservationRecommendationProperties()` was changed to private access
+* `java.util.UUID subscriptionId()` -> `java.lang.String subscriptionId()`
+* `validate()` was removed
+
+#### `models.Tag` was modified
+
+* `Tag()` was changed to private access
+* `withValue(java.util.List)` was removed
+* `validate()` was removed
+* `withKey(java.lang.String)` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `validate()` was removed
+
+#### `models.LegacyReservationRecommendationProperties` was modified
+
+* `java.lang.Float instanceFlexibilityRatio()` -> `java.lang.Double instanceFlexibilityRatio()`
+* `java.util.UUID meterId()` -> `java.lang.String meterId()`
+* `java.lang.Float recommendedQuantityNormalized()` -> `java.lang.Double recommendedQuantityNormalized()`
+* `validate()` was removed
+
+### Features Added
+
+* `models.SavingsPlan` was added
+
+* `models.LegacyManagementGroupScopeReservationRecommendationProperties` was added
+
+* `models.ModernManagementGroupScopeReservationRecommendationProperties` was added
+
+* `models.OrganizationType` was added
+
+* `models.OperationStatus` was added
+
+* `models.OperationStatusType` was added
+
+* `models.ReservationRecommendationDetailsProjectedUsageProperties` was added
+
+#### `models.ModernChargeSummary` was modified
+
+* `systemData()` was added
+* `etag()` was added
+
+#### `models.ReservationSummary` was modified
+
+* `systemData()` was added
+
+#### `models.LotSummary` was modified
+
+* `organizationType()` was added
+* `isEstimatedBalance()` was added
+* `usedAmount()` was added
+* `systemData()` was added
+
+#### `models.ModernReservationTransaction` was modified
+
+* `systemData()` was added
+
+#### `models.ChargeSummary` was modified
+
+* `systemData()` was added
+
+#### `models.Term` was modified
+
+* `P1M` was added
+
+#### `models.LegacyUsageDetail` was modified
+
+* `systemData()` was added
+
+#### `models.PriceSheetProperties` was modified
+
+* `savingsPlan()` was added
+
+#### `models.ModernUsageDetail` was modified
+
+* `systemData()` was added
+
+#### `models.LegacyChargeSummary` was modified
+
+* `etag()` was added
+* `systemData()` was added
+
+#### `models.ReservationRecommendationDetails` was modified
+
+* `getWithResponse(java.lang.String,models.Scope,java.lang.String,models.Term,models.LookBackPeriod,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.Balance` was modified
+
+* `overageRefund()` was added
+* `systemData()` was added
+
+#### `models.EventSummary` was modified
+
+* `billingAccountId()` was added
+* `isEstimatedBalance()` was added
+* `systemData()` was added
+* `billingAccountDisplayName()` was added
+
+#### `models.ReservationDetail` was modified
+
+* `systemData()` was added
+
+#### `models.PriceSheetResult` was modified
+
+* `systemData()` was added
+
+#### `models.ReservationRecommendation` was modified
+
+* `systemData()` was added
+
+#### `models.Marketplace` was modified
+
+* `systemData()` was added
+
+#### `models.Budget` was modified
+
+* `systemData()` was added
+
+#### `models.LegacyReservationRecommendation` was modified
+
+* `systemData()` was added
+
+#### `models.ReservationTransactions` was modified
+
+* `list(java.lang.String,java.lang.String,java.lang.Boolean,java.math.BigDecimal,com.azure.core.util.Context)` was added
+
+#### `models.ManagementGroupAggregatedCostResult` was modified
+
+* `systemData()` was added
+
+#### `models.ReservationTransaction` was modified
+
+* `systemData()` was added
+
+#### `models.ModernReservationRecommendationProperties` was modified
+
+* `totalHours()` was added
+* `lastUsageDate()` was added
+
+#### `models.TagsResult` was modified
+
+* `systemData()` was added
+
+#### `models.Scope` was modified
+
+* `MANAGEMENT_GROUP` was added
+
+#### `models.UsageDetail` was modified
+
+* `systemData()` was added
+
+#### `models.ModernReservationRecommendation` was modified
+
+* `systemData()` was added
+
+#### `models.ReservationRecommendationDetailsModel` was modified
+
+* `managementGroupId()` was added
+* `tenantId()` was added
+* `systemData()` was added
+* `projectedUsage()` was added
+
+#### `models.PriceSheets` was modified
+
+* `downloadByBillingAccountPeriod(java.lang.String,java.lang.String)` was added
+* `downloadByBillingAccountPeriod(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.CreditSummary` was modified
+
+* `tags()` was added
+* `systemData()` was added
+* `isEstimatedBalance()` was added
+
+#### `models.LegacyReservationRecommendationProperties` was modified
-### Other Changes
+* `totalHours()` was added
+* `lastUsageDate()` was added
## 1.0.0 (2024-12-24)
diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md
index 339faa32331ac..4898304df5d37 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/README.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Consumption client library for Java.
-This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-consumption
- 1.1.0-beta.1
+ 1.1.0
```
[//]: # ({x-version-update-end})
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ ConsumptionManager manager = ConsumptionManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
index 7508874cf3ac9..4d649ade4f443 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
+++ b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md
@@ -47,6 +47,7 @@
## PriceSheet
+- [DownloadByBillingAccountPeriod](#pricesheet_downloadbybillingaccountperiod)
- [Get](#pricesheet_get)
- [GetByBillingPeriod](#pricesheet_getbybillingperiod)
@@ -90,8 +91,7 @@
*/
public final class AggregatedCostGetByManagementGroupSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * AggregatedCostByManagementGroupFilterByDate.json
+ * x-ms-original-file: 2026-06-01/AggregatedCostByManagementGroupFilterByDate.json
*/
/**
* Sample code: AggregatedCostByManagementGroupFilterByDate.
@@ -107,8 +107,7 @@ public final class AggregatedCostGetByManagementGroupSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * AggregatedCostByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/AggregatedCostByManagementGroup.json
*/
/**
* Sample code: AggregatedCostByManagementGroup.
@@ -131,8 +130,7 @@ public final class AggregatedCostGetByManagementGroupSamples {
*/
public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * AggregatedCostForBillingPeriodByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/AggregatedCostForBillingPeriodByManagementGroup.json
*/
/**
* Sample code: AggregatedCostListForBillingPeriodByManagementGroup.
@@ -156,8 +154,7 @@ public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples {
*/
public final class BalancesGetByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * BalancesByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/BalancesByBillingAccount.json
*/
/**
* Sample code: Balances.
@@ -178,8 +175,7 @@ public final class BalancesGetByBillingAccountSamples {
*/
public final class BalancesGetForBillingPeriodByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * BalancesByBillingAccountForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/BalancesByBillingAccountForBillingPeriod.json
*/
/**
* Sample code: Balances.
@@ -218,9 +214,7 @@ import java.util.Map;
*/
public final class BudgetsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreateOrUpdateBudget.
- * json
+ * x-ms-original-file: 2026-06-01/CreateOrUpdateBudget.json
*/
/**
* Sample code: CreateOrUpdateBudget.
@@ -283,8 +277,7 @@ public final class BudgetsCreateOrUpdateSamples {
*/
public final class BudgetsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/DeleteBudget.json
+ * x-ms-original-file: 2026-06-01/DeleteBudget.json
*/
/**
* Sample code: DeleteBudget.
@@ -307,8 +300,7 @@ public final class BudgetsDeleteSamples {
*/
public final class BudgetsGetSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Budget.json
+ * x-ms-original-file: 2026-06-01/Budget.json
*/
/**
* Sample code: Budget.
@@ -331,8 +323,7 @@ public final class BudgetsGetSamples {
*/
public final class BudgetsListSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BudgetsList.json
+ * x-ms-original-file: 2026-06-01/BudgetsList.json
*/
/**
* Sample code: BudgetsList.
@@ -353,8 +344,7 @@ public final class BudgetsListSamples {
*/
public final class ChargesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccount.json
*/
/**
* Sample code: ChargesListByBillingAccount-Modern.
@@ -369,8 +359,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesForBillingPeriodByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ChargesForBillingPeriodByEnrollmentAccount.json
*/
/**
* Sample code: ChangesForBillingPeriodByEnrollmentAccount-Legacy.
@@ -385,8 +374,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingAccountGroupByCustomerId.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByCustomerId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByCustomerId-Modern.
@@ -401,8 +389,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingProfile.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfile.json
*/
/**
* Sample code: ChargesListByBillingProfile-Modern.
@@ -417,8 +404,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingProfileInvoiceSection.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfileInvoiceSection.json
*/
/**
* Sample code: ChargesListByBillingProfileInvoiceSection-Modern.
@@ -434,8 +420,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernCustomer.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernCustomer.json
*/
/**
* Sample code: ChargesListByCustomer-Modern.
@@ -449,8 +434,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListForDepartmentFilterByStartEndDate.json
+ * x-ms-original-file: 2026-06-01/ChargesListForDepartmentFilterByStartEndDate.json
*/
/**
* Sample code: ChargesListByDepartment-Legacy.
@@ -464,8 +448,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListForEnrollmentAccountFilterByStartEndDate.json
+ * x-ms-original-file: 2026-06-01/ChargesListForEnrollmentAccountFilterByStartEndDate.json
*/
/**
* Sample code: ChargesListForEnrollmentAccount-Legacy.
@@ -480,8 +463,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingProfileGroupByInvoiceSectionId.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByBillingProfileGroupByInvoiceSectionId-Modern.
@@ -497,8 +479,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingAccountGroupByBillingProfileId.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByBillingProfileId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByBillingProfileId-Modern.
@@ -513,8 +494,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernBillingAccountGroupByInvoiceSectionId.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByBillingAccountGroupByInvoiceSectionId-Modern.
@@ -530,8 +510,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesForBillingPeriodByDepartment.json
+ * x-ms-original-file: 2026-06-01/ChargesForBillingPeriodByDepartment.json
*/
/**
* Sample code: ChangesForBillingPeriodByDepartment-Legacy.
@@ -546,8 +525,7 @@ public final class ChargesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ChargesListByModernInvoiceSectionId.json
+ * x-ms-original-file: 2026-06-01/ChargesListByModernInvoiceSectionId.json
*/
/**
* Sample code: ChargesListByInvoiceSectionId-Modern.
@@ -571,8 +549,7 @@ public final class ChargesListSamples {
*/
public final class CreditsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * CreditSummaryByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/CreditSummaryByBillingProfile.json
*/
/**
* Sample code: CreditSummaryByBillingProfile.
@@ -593,8 +570,36 @@ public final class CreditsGetSamples {
*/
public final class EventsOperationListByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * EventsGetByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount-Primary.json
+ */
+ /**
+ * Sample code: EventsGetByBillingAccount-Primary.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void
+ eventsGetByBillingAccountPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.eventsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters-Primary.json
+ */
+ /**
+ * Sample code: EventsGetByBillingAccountWithFilters-Primary.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void
+ eventsGetByBillingAccountWithFiltersPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.eventsOperations()
+ .listByBillingAccount("1234:5678",
+ "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount.json
*/
/**
* Sample code: EventsGetByBillingAccount.
@@ -606,8 +611,7 @@ public final class EventsOperationListByBillingAccountSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * EventsGetByBillingAccountWithFilters.json
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters.json
*/
/**
* Sample code: EventsGetByBillingAccountWithFilters.
@@ -621,6 +625,35 @@ public final class EventsOperationListByBillingAccountSamples {
"lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'",
com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters-Contributor.json
+ */
+ /**
+ * Sample code: EventsGetByBillingAccountWithFilters-Contributor.json.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void eventsGetByBillingAccountWithFiltersContributorJson(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.eventsOperations()
+ .listByBillingAccount("1234:5678",
+ "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount-Contributor.json
+ */
+ /**
+ * Sample code: EventsGetByBillingAccount-Contributor.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void
+ eventsGetByBillingAccountContributor(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.eventsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
+ }
}
```
@@ -632,8 +665,7 @@ public final class EventsOperationListByBillingAccountSamples {
*/
public final class EventsOperationListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * EventsListByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/EventsListByBillingProfile.json
*/
/**
* Sample code: EventsListByBillingProfile.
@@ -655,8 +687,20 @@ public final class EventsOperationListByBillingProfileSamples {
*/
public final class LotsOperationListByBillingAccountSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * LotsListByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccount-Primary.json
+ */
+ /**
+ * Sample code: LotsListByBillingAccount-Primary.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void
+ lotsListByBillingAccountPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccount.json
*/
/**
* Sample code: LotsListByBillingAccount.
@@ -668,8 +712,7 @@ public final class LotsOperationListByBillingAccountSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * LotsListByBillingAccountWithFilters.json
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters.json
*/
/**
* Sample code: LotsListByBillingAccountWithStatusFilter.
@@ -682,6 +725,49 @@ public final class LotsOperationListByBillingAccountSamples {
.listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'",
com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccount-Contributor.json
+ */
+ /**
+ * Sample code: LotsListByBillingAccount-Contributor.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void
+ lotsListByBillingAccountContributor(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters-Primary.json
+ */
+ /**
+ * Sample code: LotsListByBillingAccountWithStatusFilter-Primary.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByBillingAccountWithStatusFilterPrimary(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations()
+ .listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters-Contributor.json
+ */
+ /**
+ * Sample code: LotsListByBillingAccountWithStatusFilter-Contributor.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void lotsListByBillingAccountWithStatusFilterContributor(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.lotsOperations()
+ .listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'",
+ com.azure.core.util.Context.NONE);
+ }
}
```
@@ -693,8 +779,7 @@ public final class LotsOperationListByBillingAccountSamples {
*/
public final class LotsOperationListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * LotsListByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/LotsListByBillingProfile.json
*/
/**
* Sample code: LotsListByBillingProfile.
@@ -715,9 +800,7 @@ public final class LotsOperationListByBillingProfileSamples {
*/
public final class LotsOperationListByCustomerSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer.
- * json
+ * x-ms-original-file: 2026-06-01/LotsListByCustomer.json
*/
/**
* Sample code: LotsListByCustomer.
@@ -729,8 +812,7 @@ public final class LotsOperationListByCustomerSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * LotsListByCustomerWithFilters.json
+ * x-ms-original-file: 2026-06-01/LotsListByCustomerWithFilters.json
*/
/**
* Sample code: LotsListByCustomerWithFilter.
@@ -753,8 +835,7 @@ public final class LotsOperationListByCustomerSamples {
*/
public final class MarketplacesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByBillingAccountListForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByBillingAccountListForBillingPeriod.json
*/
/**
* Sample code: BillingAccountMarketplacesListForBillingPeriod.
@@ -769,8 +850,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json
*/
/**
* Sample code: EnrollmentAccountMarketplacesListForBillingPeriod.
@@ -785,8 +865,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesList.json
+ * x-ms-original-file: 2026-06-01/MarketplacesList.json
*/
/**
* Sample code: SubscriptionMarketplacesList.
@@ -800,8 +879,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByEnrollmentAccountList.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByEnrollmentAccountList.json
*/
/**
* Sample code: EnrollmentAccountMarketplacesList.
@@ -816,8 +894,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByDepartment_ListByBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByDepartment_ListByBillingPeriod.json
*/
/**
* Sample code: DepartmentMarketplacesListForBillingPeriod.
@@ -831,8 +908,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByManagementGroupList.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByManagementGroupList.json
*/
/**
* Sample code: ManagementGroupMarketplacesList.
@@ -847,8 +923,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesListForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/MarketplacesListForBillingPeriod.json
*/
/**
* Sample code: SubscriptionMarketplacesListForBillingPeriod.
@@ -863,8 +938,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByDepartmentList.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByDepartmentList.json
*/
/**
* Sample code: DepartmentMarketplacesList.
@@ -877,8 +951,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByManagementGroup_ListForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByManagementGroup_ListForBillingPeriod.json
*/
/**
* Sample code: ManagementGroupMarketplacesListForBillingPeriod.
@@ -893,8 +966,7 @@ public final class MarketplacesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * MarketplacesByBillingAccountList.json
+ * x-ms-original-file: 2026-06-01/MarketplacesByBillingAccountList.json
*/
/**
* Sample code: BillingAccountMarketplacesList.
@@ -918,8 +990,7 @@ public final class MarketplacesListSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json
+ * x-ms-original-file: 2026-06-01/OperationList.json
*/
/**
* Sample code: OperationList.
@@ -932,6 +1003,27 @@ public final class OperationsListSamples {
}
```
+### PriceSheet_DownloadByBillingAccountPeriod
+
+```java
+/**
+ * Samples for PriceSheet DownloadByBillingAccountPeriod.
+ */
+public final class PriceSheetDownloadByBillingAccountPeriodSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/EAPriceSheetForBillingPeriod.json
+ */
+ /**
+ * Sample code: EAPriceSheetForBillingPeriod.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void eAPriceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.priceSheets().downloadByBillingAccountPeriod("0000000", "202305", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### PriceSheet_Get
```java
@@ -940,8 +1032,7 @@ public final class OperationsListSamples {
*/
public final class PriceSheetGetSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheet.json
+ * x-ms-original-file: 2026-06-01/PriceSheet.json
*/
/**
* Sample code: PriceSheet.
@@ -962,8 +1053,7 @@ public final class PriceSheetGetSamples {
*/
public final class PriceSheetGetByBillingPeriodSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * PriceSheetForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/PriceSheetForBillingPeriod.json
*/
/**
* Sample code: PriceSheetForBillingPeriod.
@@ -976,8 +1066,7 @@ public final class PriceSheetGetByBillingPeriodSamples {
}
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetExpand.json
+ * x-ms-original-file: 2026-06-01/PriceSheetExpand.json
*/
/**
* Sample code: PriceSheetExpand.
@@ -1003,8 +1092,7 @@ import com.azure.resourcemanager.consumption.models.Term;
*/
public final class ReservationRecommendationDetailsGetSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationDetailsBySubscription.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsBySubscription.json
*/
/**
* Sample code: ReservationRecommendationsBySubscription-Legacy.
@@ -1015,12 +1103,11 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.reservationRecommendationDetails()
.getWithResponse("subscriptions/00000000-0000-0000-0000-00000000", Scope.SINGLE, "westus", Term.P3Y,
- LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", com.azure.core.util.Context.NONE);
+ LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationDetailsByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingProfile.json
*/
/**
* Sample code: ReservationRecommendationsByBillingProfile-Modern.
@@ -1033,12 +1120,12 @@ public final class ReservationRecommendationDetailsGetSamples {
.getWithResponse(
"providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000",
Scope.SHARED, "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s",
+ "properties/subscriptionId eq 00000000-0000-0000-0000-00000000", null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationDetailsByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByResourceGroup.json
*/
/**
* Sample code: ReservationRecommendationsByResourceGroup-Legacy.
@@ -1049,12 +1136,27 @@ public final class ReservationRecommendationDetailsGetSamples {
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.reservationRecommendationDetails()
.getWithResponse("subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup", Scope.SINGLE,
- "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", com.azure.core.util.Context.NONE);
+ "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationDetailsByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsPrePurchasePlanBySubscription.json
+ */
+ /**
+ * Sample code: ReservationRecommendationDetailsPrePurchasePlanBySubscription.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void reservationRecommendationDetailsPrePurchasePlanBySubscription(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.reservationRecommendationDetails()
+ .getWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", Scope.SINGLE, "westus", Term.P3Y,
+ LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingAccount.json
*/
/**
* Sample code: ReservationRecommendationsByBillingAccount-Legacy.
@@ -1064,8 +1166,27 @@ public final class ReservationRecommendationDetailsGetSamples {
public static void reservationRecommendationsByBillingAccountLegacy(
com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.reservationRecommendationDetails()
- .getWithResponse("providers/Microsoft.Billing/billingAccounts/000000", Scope.SHARED, "eastus", Term.P1Y,
- LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", com.azure.core.util.Context.NONE);
+ .getWithResponse("providers/Microsoft.Billing/billingAccounts/00000000", Scope.SHARED, "eastus", Term.P1Y,
+ LookBackPeriod.LAST60DAYS, "Standard_DS14_v2",
+ "properties/subscriptionId eq 00000000-0000-0000-0000-00000000", null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingAccountForManagementGroup.json
+ */
+ /**
+ * Sample code: ReservationRecommendationDetailsByBillingAccountForManagementGroup.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void reservationRecommendationDetailsByBillingAccountForManagementGroup(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.reservationRecommendationDetails()
+ .getWithResponse("providers/Microsoft.Billing/billingAccounts/00000000", Scope.MANAGEMENT_GROUP, "westus",
+ Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null,
+ "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1078,8 +1199,7 @@ public final class ReservationRecommendationDetailsGetSamples {
*/
public final class ReservationRecommendationsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationsBySubscription.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsBySubscription.json
*/
/**
* Sample code: ReservationRecommendationsBySubscription-Legacy.
@@ -1093,8 +1213,7 @@ public final class ReservationRecommendationsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationsByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingProfile.json
*/
/**
* Sample code: ReservationRecommendationsByBillingProfile-Modern.
@@ -1109,8 +1228,7 @@ public final class ReservationRecommendationsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationsByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsByResourceGroup.json
*/
/**
* Sample code: ReservationRecommendationsByResourceGroup-Legacy.
@@ -1125,8 +1243,7 @@ public final class ReservationRecommendationsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json
*/
/**
* Sample code: ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod-Legacy.
@@ -1142,8 +1259,7 @@ public final class ReservationRecommendationsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationRecommendationsByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccount.json
*/
/**
* Sample code: ReservationRecommendationsByBillingAccount-Legacy.
@@ -1155,19 +1271,51 @@ public final class ReservationRecommendationsListSamples {
manager.reservationRecommendations()
.list("providers/Microsoft.Billing/billingAccounts/123456", null, com.azure.core.util.Context.NONE);
}
+
+ /*
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccountForManagementGroup.json
+ */
+ /**
+ * Sample code: ReservationRecommendationsByBillingAccountForManagementGroup.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void reservationRecommendationsByBillingAccountForManagementGroup(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.reservationRecommendations()
+ .list("providers/Microsoft.Billing/billingAccounts/00000000",
+ "properties/scope eq 'ManagementGroup' and properties/managementGroupId eq '/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000'",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccountFilterByScope.json
+ */
+ /**
+ * Sample code: ReservationRecommendationsByBillingAccountFilterForScope.
+ *
+ * @param manager Entry point to ConsumptionManager.
+ */
+ public static void reservationRecommendationsByBillingAccountFilterForScope(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ manager.reservationRecommendations()
+ .list("providers/Microsoft.Billing/billingAccounts/123456", "properties/scope eq 'Single'",
+ com.azure.core.util.Context.NONE);
+ }
}
```
### ReservationTransactions_List
```java
+import java.math.BigDecimal;
+
/**
* Samples for ReservationTransactions List.
*/
public final class ReservationTransactionsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationTransactionsListByEnrollmentNumber.json
+ * x-ms-original-file: 2026-06-01/ReservationTransactionsListByEnrollmentNumber.json
*/
/**
* Sample code: ReservationTransactionsByEnrollmentNumber.
@@ -1177,8 +1325,8 @@ public final class ReservationTransactionsListSamples {
public static void
reservationTransactionsByEnrollmentNumber(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.reservationTransactions()
- .list("123456", "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30",
- com.azure.core.util.Context.NONE);
+ .list("123456", "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30", true,
+ new BigDecimal("15.5"), com.azure.core.util.Context.NONE);
}
}
```
@@ -1191,8 +1339,7 @@ public final class ReservationTransactionsListSamples {
*/
public final class ReservationTransactionsListByBillingProfileSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationTransactionsListByBillingProfileId.json
+ * x-ms-original-file: 2026-06-01/ReservationTransactionsListByBillingProfileId.json
*/
/**
* Sample code: ReservationTransactionsByBillingProfileId.
@@ -1218,8 +1365,7 @@ public final class ReservationTransactionsListByBillingProfileSamples {
*/
public final class ReservationsDetailsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationDetailsByBillingProfileIdReservationId.json
+ * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingProfileIdReservationId.json
*/
/**
* Sample code: ReservationDetailsByBillingProfileIdReservationId.
@@ -1235,8 +1381,7 @@ public final class ReservationsDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationDetailsByBillingAccountId.json
+ * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingAccountId.json
*/
/**
* Sample code: ReservationDetailsByBillingAccountId.
@@ -1252,8 +1397,7 @@ public final class ReservationsDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationDetailsByBillingProfileId.json
+ * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingProfileId.json
*/
/**
* Sample code: ReservationDetailsByBillingProfileId.
@@ -1277,9 +1421,7 @@ public final class ReservationsDetailsListSamples {
*/
public final class ReservationsDetailsListByReservationOrderSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetails.
- * json
+ * x-ms-original-file: 2026-06-01/ReservationDetails.json
*/
/**
* Sample code: ReservationDetails.
@@ -1303,8 +1445,7 @@ public final class ReservationsDetailsListByReservationOrderSamples {
*/
public final class ReservationsDetailsListByReservationOrderAndReservationSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationDetailsWithReservationId.json
+ * x-ms-original-file: 2026-06-01/ReservationDetailsWithReservationId.json
*/
/**
* Sample code: ReservationDetailsWithReservationId.
@@ -1332,8 +1473,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain;
*/
public final class ReservationsSummariesListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesDailyWithBillingAccountId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithBillingAccountId.json
*/
/**
* Sample code: ReservationSummariesDailyWithBillingAccountId.
@@ -1349,8 +1489,7 @@ public final class ReservationsSummariesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesDailyWithBillingProfileId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithBillingProfileId.json
*/
/**
* Sample code: ReservationSummariesDailyWithBillingProfileId.
@@ -1365,8 +1504,7 @@ public final class ReservationsSummariesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesMonthlyWithBillingAccountId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingAccountId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingAccountId.
@@ -1381,8 +1519,7 @@ public final class ReservationsSummariesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesMonthlyWithBillingProfileId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingProfileId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingProfileId.
@@ -1397,8 +1534,7 @@ public final class ReservationsSummariesListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithBillingProfileIdReservationId.
@@ -1425,8 +1561,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain;
*/
public final class ReservationsSummariesListByReservationOrderSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesMonthly.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesMonthly.json
*/
/**
* Sample code: ReservationSummariesMonthly.
@@ -1440,8 +1575,7 @@ public final class ReservationsSummariesListByReservationOrderSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesDaily.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesDaily.json
*/
/**
* Sample code: ReservationSummariesDaily.
@@ -1467,8 +1601,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain;
*/
public final class ReservationsSummariesListByReservationOrderAndReservationSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesDailyWithReservationId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithReservationId.json
*/
/**
* Sample code: ReservationSummariesDailyWithReservationId.
@@ -1485,8 +1618,7 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * ReservationSummariesMonthlyWithReservationId.json
+ * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithReservationId.json
*/
/**
* Sample code: ReservationSummariesMonthlyWithReservationId.
@@ -1510,8 +1642,7 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp
*/
public final class TagsGetSamples {
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Tags.json
+ * x-ms-original-file: 2026-06-01/Tags.json
*/
/**
* Sample code: Tags_Get.
@@ -1536,8 +1667,7 @@ import com.azure.resourcemanager.consumption.models.Metrictype;
*/
public final class UsageDetailsListSamples {
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListForBillingPeriodByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByBillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsListForBillingPeriod-Legacy.
@@ -1552,8 +1682,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMCAInvoiceSection.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMCAInvoiceSection.json
*/
/**
* Sample code: InvoiceSectionUsageDetailsList-Modern.
@@ -1568,8 +1697,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsList.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsList.json
*/
/**
* Sample code: UsageDetailsList-Legacy.
@@ -1583,8 +1711,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListFilterByTag.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListFilterByTag.json
*/
/**
* Sample code: UsageDetailsListFilterByTag-Legacy.
@@ -1599,8 +1726,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByBillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsList-Legacy.
@@ -1615,8 +1741,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMCABillingProfile.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMCABillingProfile.json
*/
/**
* Sample code: BillingProfileUsageDetailsList-Modern.
@@ -1631,8 +1756,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListForBillingPeriodByDepartment.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByDepartment.json
*/
/**
* Sample code: DepartmentUsageDetailsListForBillingPeriod-Legacy.
@@ -1647,8 +1771,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListForBillingPeriodByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByManagementGroup.json
*/
/**
* Sample code: ManagementGroupUsageDetailsListForBillingPeriod-Legacy.
@@ -1663,8 +1786,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMetricAmortizedCost.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricAmortizedCost.json
*/
/**
* Sample code: UsageDetailsListByMetricAmortizedCost-Legacy.
@@ -1679,8 +1801,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMetricUsage.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricUsage.json
*/
/**
* Sample code: UsageDetailsListByMetricUsage-Legacy.
@@ -1695,8 +1816,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByManagementGroup.json
*/
/**
* Sample code: ManagementGroupUsageDetailsList-Legacy.
@@ -1711,8 +1831,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByDepartment.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByDepartment.json
*/
/**
* Sample code: DepartmentUsageDetailsList-Legacy.
@@ -1727,8 +1846,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMetricActualCost.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricActualCost.json
*/
/**
* Sample code: UsageDetailsListByMetricActualCost-Legacy.
@@ -1743,8 +1861,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByEnrollmentAccount.json
*/
/**
* Sample code: EnrollmentAccountUsageDetailsList-Legacy.
@@ -1759,8 +1876,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMCABillingAccount.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMCABillingAccount.json
*/
/**
* Sample code: BillingAccountUsageDetailsList-Modern.
@@ -1775,8 +1891,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListByMCACustomer.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListByMCACustomer.json
*/
/**
* Sample code: CustomerUsageDetailsList-Modern.
@@ -1792,9 +1907,7 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file:
- * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsExpand.
- * json
+ * x-ms-original-file: 2026-06-01/UsageDetailsExpand.json
*/
/**
* Sample code: UsageDetailsExpand-Legacy.
@@ -1808,34 +1921,32 @@ public final class UsageDetailsListSamples {
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListForBillingPeriodByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriod.json
*/
/**
- * Sample code: EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy.
+ * Sample code: UsageDetailsListForBillingPeriod-Legacy.
*
* @param manager Entry point to ConsumptionManager.
*/
- public static void enrollmentAccountUsageDetailsListForBillingPeriodLegacy(
- com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ public static void
+ usageDetailsListForBillingPeriodLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.usageDetails()
- .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null,
+ .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/
- * UsageDetailsListForBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByEnrollmentAccount.json
*/
/**
- * Sample code: UsageDetailsListForBillingPeriod-Legacy.
+ * Sample code: EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy.
*
* @param manager Entry point to ConsumptionManager.
*/
- public static void
- usageDetailsListForBillingPeriodLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) {
+ public static void enrollmentAccountUsageDetailsListForBillingPeriodLegacy(
+ com.azure.resourcemanager.consumption.ConsumptionManager manager) {
manager.usageDetails()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null,
+ .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null,
com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
index e6b182b0083b7..92a23d5211908 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml
+++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
@@ -1,9 +1,9 @@
-
+
4.0.0
com.azure
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-consumption
- 1.1.0-beta.1
+ 1.1.0
jar
Microsoft Azure SDK for Consumption Management
- This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10.
+ This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,7 @@
UTF-8
0
0
- false
+ true
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
index 598132d35f3aa..f089e39689cc8 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption;
@@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.ConsumptionManagementClient;
import com.azure.resourcemanager.consumption.implementation.AggregatedCostsImpl;
@@ -63,6 +64,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -71,12 +73,18 @@
* Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
*/
public final class ConsumptionManager {
- private UsageDetails usageDetails;
+ private Operations operations;
- private Marketplaces marketplaces;
+ private PriceSheets priceSheets;
private Budgets budgets;
+ private Credits credits;
+
+ private UsageDetails usageDetails;
+
+ private Marketplaces marketplaces;
+
private Tags tags;
private Charges charges;
@@ -93,18 +101,12 @@ public final class ConsumptionManager {
private ReservationTransactions reservationTransactions;
- private PriceSheets priceSheets;
-
- private Operations operations;
-
private AggregatedCosts aggregatedCosts;
private EventsOperations eventsOperations;
private LotsOperations lotsOperations;
- private Credits credits;
-
private final ConsumptionManagementClient clientObject;
private ConsumptionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -157,6 +159,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-consumption.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -264,12 +269,14 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.consumption")
.append("/")
- .append("1.0.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -316,27 +323,27 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile
}
/**
- * Gets the resource collection API of UsageDetails.
+ * Gets the resource collection API of Operations.
*
- * @return Resource collection API of UsageDetails.
+ * @return Resource collection API of Operations.
*/
- public UsageDetails usageDetails() {
- if (this.usageDetails == null) {
- this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return usageDetails;
+ return operations;
}
/**
- * Gets the resource collection API of Marketplaces.
+ * Gets the resource collection API of PriceSheets.
*
- * @return Resource collection API of Marketplaces.
+ * @return Resource collection API of PriceSheets.
*/
- public Marketplaces marketplaces() {
- if (this.marketplaces == null) {
- this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
+ public PriceSheets priceSheets() {
+ if (this.priceSheets == null) {
+ this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
}
- return marketplaces;
+ return priceSheets;
}
/**
@@ -351,6 +358,42 @@ public Budgets budgets() {
return budgets;
}
+ /**
+ * Gets the resource collection API of Credits.
+ *
+ * @return Resource collection API of Credits.
+ */
+ public Credits credits() {
+ if (this.credits == null) {
+ this.credits = new CreditsImpl(clientObject.getCredits(), this);
+ }
+ return credits;
+ }
+
+ /**
+ * Gets the resource collection API of UsageDetails.
+ *
+ * @return Resource collection API of UsageDetails.
+ */
+ public UsageDetails usageDetails() {
+ if (this.usageDetails == null) {
+ this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this);
+ }
+ return usageDetails;
+ }
+
+ /**
+ * Gets the resource collection API of Marketplaces.
+ *
+ * @return Resource collection API of Marketplaces.
+ */
+ public Marketplaces marketplaces() {
+ if (this.marketplaces == null) {
+ this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this);
+ }
+ return marketplaces;
+ }
+
/**
* Gets the resource collection API of Tags.
*
@@ -450,30 +493,6 @@ public ReservationTransactions reservationTransactions() {
return reservationTransactions;
}
- /**
- * Gets the resource collection API of PriceSheets.
- *
- * @return Resource collection API of PriceSheets.
- */
- public PriceSheets priceSheets() {
- if (this.priceSheets == null) {
- this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
- }
- return priceSheets;
- }
-
- /**
- * Gets the resource collection API of Operations.
- *
- * @return Resource collection API of Operations.
- */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
/**
* Gets the resource collection API of AggregatedCosts.
*
@@ -510,18 +529,6 @@ public LotsOperations lotsOperations() {
return lotsOperations;
}
- /**
- * Gets the resource collection API of Credits.
- *
- * @return Resource collection API of Credits.
- */
- public Credits credits() {
- if (this.credits == null) {
- this.credits = new CreditsImpl(clientObject.getCredits(), this);
- }
- return credits;
- }
-
/**
* Gets wrapped service client ConsumptionManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
index 6bf61ca519550..0ddf182937ed5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -17,10 +17,9 @@ public interface AggregatedCostsClient {
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
- * @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param managementGroupId Order Id of the reservation.
+ * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter
+ * supports 'le' and 'ge'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -34,7 +33,7 @@ Response getByManagementGroupWithRespo
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -46,7 +45,7 @@ Response getByManagementGroupWithRespo
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @param billingPeriodName Billing Period Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -61,7 +60,7 @@ Response getForBillingPeriodByManageme
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @param billingPeriodName Billing Period Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
index 0e8cc73c081cf..41edd275676c2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
index 2d81f64659bc9..04302c2a8f420 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -15,65 +15,10 @@
* An instance of this class provides access to all the operations defined in BudgetsClient.
*/
public interface BudgetsClient {
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope);
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String scope, Context context);
-
/**
* Gets the budget for the scope by budget name.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -87,17 +32,7 @@ public interface BudgetsClient {
/**
* Gets the budget for the scope by budget name.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -112,17 +47,7 @@ public interface BudgetsClient {
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @param context The context to associate with this operation.
@@ -140,17 +65,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -164,17 +79,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName
/**
* The operation to delete a budget.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -188,17 +93,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName
/**
* The operation to delete a budget.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -206,4 +101,29 @@ Response createOrUpdateWithResponse(String scope, String budgetName
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String scope, String budgetName);
+
+ /**
+ * Lists all budgets for the defined scope.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope);
+
+ /**
+ * Lists all budgets for the defined scope.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String scope, Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
index 93f311441dd96..0aa84c4181670 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -17,21 +17,7 @@ public interface ChargesClient {
/**
* Lists the charges based for the defined scope.
*
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param startDate Start date.
* @param endDate End date.
* @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
@@ -53,21 +39,7 @@ Response listWithResponse(String scope, String startDate
/**
* Lists the charges based for the defined scope.
*
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
index 9d4e04161fbf0..7198102208001 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -12,26 +12,26 @@
*/
public interface ConsumptionManagementClient {
/**
- * Gets Azure Subscription ID.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -47,18 +47,18 @@ public interface ConsumptionManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the UsageDetailsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the UsageDetailsClient object.
+ * @return the OperationsClient object.
*/
- UsageDetailsClient getUsageDetails();
+ OperationsClient getOperations();
/**
- * Gets the MarketplacesClient object to access its operations.
+ * Gets the PriceSheetsClient object to access its operations.
*
- * @return the MarketplacesClient object.
+ * @return the PriceSheetsClient object.
*/
- MarketplacesClient getMarketplaces();
+ PriceSheetsClient getPriceSheets();
/**
* Gets the BudgetsClient object to access its operations.
@@ -67,6 +67,27 @@ public interface ConsumptionManagementClient {
*/
BudgetsClient getBudgets();
+ /**
+ * Gets the CreditsClient object to access its operations.
+ *
+ * @return the CreditsClient object.
+ */
+ CreditsClient getCredits();
+
+ /**
+ * Gets the UsageDetailsClient object to access its operations.
+ *
+ * @return the UsageDetailsClient object.
+ */
+ UsageDetailsClient getUsageDetails();
+
+ /**
+ * Gets the MarketplacesClient object to access its operations.
+ *
+ * @return the MarketplacesClient object.
+ */
+ MarketplacesClient getMarketplaces();
+
/**
* Gets the TagsClient object to access its operations.
*
@@ -123,20 +144,6 @@ public interface ConsumptionManagementClient {
*/
ReservationTransactionsClient getReservationTransactions();
- /**
- * Gets the PriceSheetsClient object to access its operations.
- *
- * @return the PriceSheetsClient object.
- */
- PriceSheetsClient getPriceSheets();
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- OperationsClient getOperations();
-
/**
* Gets the AggregatedCostsClient object to access its operations.
*
@@ -157,11 +164,4 @@ public interface ConsumptionManagementClient {
* @return the LotsOperationsClient object.
*/
LotsOperationsClient getLotsOperations();
-
- /**
- * Gets the CreditsClient object to access its operations.
- *
- * @return the CreditsClient object.
- */
- CreditsClient getCredits();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
index 5d7990e373e3b..098f1e3ba9e8a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
index 7a5b5cfb072dd..283b01b8a242d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
index 606ef1d8020ac..ca0e700ec7d55 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
index 1e84c1962e60d..f8ecb310af47d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -18,15 +18,7 @@ public interface MarketplacesClient {
* Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1,
* 2014 or later.
*
- * @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing
- * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify
- * billing period at department scope use
- * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -39,15 +31,7 @@ public interface MarketplacesClient {
* Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1,
* 2014 or later.
*
- * @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing
- * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify
- * billing period at department scope use
- * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc
* time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq',
* 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
index f3c685991cc8b..b10c80bffab68 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -15,7 +15,7 @@
*/
public interface OperationsClient {
/**
- * Lists all of the available consumption REST API operations.
+ * List the operations for the provider.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -25,7 +25,7 @@ public interface OperationsClient {
PagedIterable list();
/**
- * Lists all of the available consumption REST API operations.
+ * List the operations for the provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
index e7abf9164225c..bbb98dde1abf1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java
@@ -1,19 +1,56 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.consumption.fluent.models.OperationStatusInner;
import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner;
/**
* An instance of this class provides access to all the operations defined in PriceSheetsClient.
*/
public interface PriceSheetsClient {
+ /**
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
+ *
+ * @param billingPeriodName Billing Period Name.
+ * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
+ * are not included when returning price sheet.
+ * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
+ * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies
+ * a starting point to use for subsequent calls.
+ * @param top May be used to limit the number of results to the top N results.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByBillingPeriodWithResponse(String billingPeriodName, String expand,
+ String skiptoken, Integer top, Context context);
+
+ /**
+ * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
+ * for May 1, 2014 or later.
+ *
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the price sheet for a scope by subscriptionId and billing period.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PriceSheetResultInner getByBillingPeriod(String billingPeriodName);
+
/**
* Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
*
@@ -43,36 +80,59 @@ public interface PriceSheetsClient {
PriceSheetResultInner get();
/**
- * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
- * for May 1, 2014 or later.
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
*
+ * @param billingAccountId BillingAccount ID.
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner>
+ beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
- * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields
- * are not included when returning price sheet.
- * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
- * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies
- * a starting point to use for subsequent calls.
- * @param top May be used to limit the number of results to the top N results.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner>
+ beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName, Context context);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingPeriodName Billing Period Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of the long running operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByBillingPeriodWithResponse(String billingPeriodName, String expand,
- String skiptoken, Integer top, Context context);
+ OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName);
/**
- * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only
- * for May 1, 2014 or later.
+ * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id.
*
+ * @param billingAccountId BillingAccount ID.
* @param billingPeriodName Billing Period Name.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the price sheet for a scope by subscriptionId and billing period.
+ * @return the status of the long running operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PriceSheetResultInner getByBillingPeriod(String billingPeriodName);
+ OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName,
+ Context context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
index 83291fbf99313..660d6ceac41bf 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -32,6 +32,10 @@ public interface ReservationRecommendationDetailsClient {
* @param lookBackPeriod Filter the time period on which reservation recommendation results are based.
* @param product Filter the products for which reservation recommendation results are generated. Examples:
* Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks).
+ * @param filter Used to filter reservation recommendation details by: properties/subscriptionId can be specified
+ * for billing account and billing profile paths.
+ * @param managementGroupId Specify the management group ID. Required when recommendation scope is
+ * 'ManagementGroup'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -40,7 +44,8 @@ public interface ReservationRecommendationDetailsClient {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String resourceScope, Scope scope,
- String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context);
+ String region, Term term, LookBackPeriod lookBackPeriod, String product, String filter,
+ String managementGroupId, Context context);
/**
* Details of a reservation recommendation for what-if analysis of reserved instances.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
index 91e1aa4368a78..d33eec340edd9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -17,12 +17,7 @@ public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
*
- * @param resourceScope The scope associated with reservation recommendations operations. This includes
- * '/subscriptions/{subscriptionId}/' for subscription scope,
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope.
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -34,12 +29,7 @@ public interface ReservationRecommendationsClient {
/**
* List of recommendations for purchasing reserved instances.
*
- * @param resourceScope The scope associated with reservation recommendations operations. This includes
- * '/subscriptions/{subscriptionId}/' for subscription scope,
- * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope.
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @param filter May be used to filter reservationRecommendations by: properties/scope with allowed values
* ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines',
* 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB',
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
index e63cb24a41b4c..3dccc10f2d063 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -10,6 +10,7 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner;
import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner;
+import java.math.BigDecimal;
/**
* An instance of this class provides access to all the operations defined in ReservationTransactionsClient.
@@ -19,7 +20,8 @@ public interface ReservationTransactionsClient {
* List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
* along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
* May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
- * reservation purchase was made.
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -34,13 +36,16 @@ public interface ReservationTransactionsClient {
* List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted
* along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in
* May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
- * reservation purchase was made.
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end
* date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's
* billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will
* include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31).
+ * @param useMarkupIfPartner Applies mark up to the transactions if the caller is a partner.
+ * @param previewMarkupPercentage Preview markup percentage to be applied.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -48,13 +53,15 @@ public interface ReservationTransactionsClient {
* @return result of listing reservation recommendations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String billingAccountId, String filter, Context context);
+ PagedIterable list(String billingAccountId, String filter, Boolean useMarkupIfPartner,
+ BigDecimal previewMarkupPercentage, Context context);
/**
* List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
* with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
* 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
- * reservation purchase was made.
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
@@ -71,7 +78,8 @@ PagedIterable listByBillingProfile(String bil
* List of transactions for reserved instances on billing profile scope. The refund transactions are posted along
* with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May
* 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the
- * reservation purchase was made.
+ * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the
+ * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
*
* @param billingAccountId BillingAccount ID.
* @param billingProfileId Azure Billing Profile ID.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
index ecbb1d1c92c82..68329bdb7b7f0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -16,8 +16,10 @@
public interface ReservationsDetailsClient {
/**
* Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
- * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
- * date ranges.
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -32,8 +34,10 @@ public interface ReservationsDetailsClient {
/**
* Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
- * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
- * date ranges.
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
@@ -50,8 +54,10 @@ PagedIterable listByReservationOrder(String reservationO
/**
* Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
- * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
- * date ranges.
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -68,8 +74,10 @@ PagedIterable listByReservationOrderAndReservation(Strin
/**
* Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
- * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller
- * date ranges.
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -86,14 +94,13 @@ PagedIterable listByReservationOrderAndReservation(Strin
String reservationId, String filter, Context context);
/**
- * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
- * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
- * should be made with smaller date ranges.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
- * @param resourceScope The scope associated with reservations details operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope (modern).
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -103,14 +110,13 @@ PagedIterable listByReservationOrderAndReservation(Strin
PagedIterable list(String resourceScope);
/**
- * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit
- * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
- * should be made with smaller date ranges.
+ * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently
+ * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also
+ * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges
+ * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into
+ * response size time outs.
*
- * @param resourceScope The scope associated with reservations details operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope (modern).
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @param startDate Start date. Only applicable when querying with billing profile.
* @param endDate End date. Only applicable when querying with billing profile.
* @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
index 3fff9471d4c96..ade975936d9a1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -16,7 +16,9 @@
*/
public interface ReservationsSummariesClient {
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param grain Can be daily or monthly.
@@ -29,7 +31,9 @@ public interface ReservationsSummariesClient {
PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param grain Can be daily or monthly.
@@ -46,7 +50,9 @@ PagedIterable listByReservationOrder(String reservation
String filter, Context context);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -61,7 +67,9 @@ PagedIterable listByReservationOrderAndReservation(Stri
String reservationId, Datagrain grain);
/**
- * Lists the reservations summaries for daily or monthly grain.
+ * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so
+ * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made
+ * with smaller date ranges.
*
* @param reservationOrderId Order Id of the reservation.
* @param reservationId Id of the reservation.
@@ -79,12 +87,11 @@ PagedIterable listByReservationOrderAndReservation(Stri
String reservationId, Datagrain grain, String filter, Context context);
/**
- * Lists the reservations summaries for the defined scope daily or monthly grain.
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param resourceScope The scope associated with reservations summaries operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope (modern).
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @param grain Can be daily or monthly.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -95,12 +102,11 @@ PagedIterable listByReservationOrderAndReservation(Stri
PagedIterable list(String resourceScope, Datagrain grain);
/**
- * Lists the reservations summaries for the defined scope daily or monthly grain.
+ * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit
+ * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call
+ * should be made with smaller date ranges.
*
- * @param resourceScope The scope associated with reservations summaries operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope (modern).
+ * @param resourceScope The fully qualified Azure Resource manager identifier of the resource.
* @param grain Can be daily or monthly.
* @param startDate Start date. Only applicable when querying with billing profile.
* @param endDate End date. Only applicable when querying with billing profile.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
index 381907adfc027..2e5fe1899dd05 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -17,13 +17,7 @@ public interface TagsClient {
/**
* Get all available tag keys for the defined scope.
*
- * @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope..
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -36,13 +30,7 @@ public interface TagsClient {
/**
* Get all available tag keys for the defined scope.
*
- * @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope..
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
index afe79cbe4a9f1..515dbde6d3853 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent;
@@ -19,22 +19,13 @@ public interface UsageDetailsClient {
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
*
- * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and management group, you can also add billing
- * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify
- * billing period at department scope use
- * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -47,22 +38,13 @@ public interface UsageDetailsClient {
* Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
* later.
*
- * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
- * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
- * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
- * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
- * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
- * subscription, billing account, department, enrollment account and management group, you can also add billing
- * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify
- * billing period at department scope use
- * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not
+ * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify
+ * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report -
+ * Create
+ * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
* usage details. By default, these fields are not included when listing usage details.
* @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
index 2fb5e95a7b548..6be4abedac898 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -20,7 +21,7 @@
/**
* A balance resource.
*/
-@Fluent
+@Immutable
public final class BalanceInner extends ProxyResource {
/*
* The properties of the balance.
@@ -37,6 +38,11 @@ public final class BalanceInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -55,7 +61,7 @@ public final class BalanceInner extends ProxyResource {
/**
* Creates an instance of BalanceInner class.
*/
- public BalanceInner() {
+ private BalanceInner() {
}
/**
@@ -85,6 +91,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -224,20 +239,6 @@ public BillingFrequency billingFrequency() {
return this.innerProperties() == null ? null : this.innerProperties().billingFrequency();
}
- /**
- * Set the billingFrequency property: The billing frequency.
- *
- * @param billingFrequency the billingFrequency value to set.
- * @return the BalanceInner object itself.
- */
- public BalanceInner withBillingFrequency(BillingFrequency billingFrequency) {
- if (this.innerProperties() == null) {
- this.innerProperties = new BalanceProperties();
- }
- this.innerProperties().withBillingFrequency(billingFrequency);
- return this;
- }
-
/**
* Get the priceHidden property: Price is hidden or not.
*
@@ -247,6 +248,15 @@ public Boolean priceHidden() {
return this.innerProperties() == null ? null : this.innerProperties().priceHidden();
}
+ /**
+ * Get the overageRefund property: Overage Refunds.
+ *
+ * @return the overageRefund value.
+ */
+ public BigDecimal overageRefund() {
+ return this.innerProperties() == null ? null : this.innerProperties().overageRefund();
+ }
+
/**
* Get the newPurchasesDetails property: List of new purchases.
*
@@ -265,17 +275,6 @@ public List adjustmentDetails() {
return this.innerProperties() == null ? null : this.innerProperties().adjustmentDetails();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -315,6 +314,8 @@ public static BalanceInner fromJson(JsonReader jsonReader) throws IOException {
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedBalanceInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBalanceInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
index 29fa359005faf..001e57c9cb6b5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -19,7 +19,7 @@
/**
* The properties of the balance.
*/
-@Fluent
+@Immutable
public final class BalanceProperties implements JsonSerializable {
/*
* The ISO currency in which the meter is charged, for example, USD.
@@ -86,6 +86,11 @@ public final class BalanceProperties implements JsonSerializable adjustmentDetails() {
return this.adjustmentDetails;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (newPurchasesDetails() != null) {
- newPurchasesDetails().forEach(e -> e.validate());
- }
- if (adjustmentDetails() != null) {
- adjustmentDetails().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -325,6 +314,9 @@ public static BalanceProperties fromJson(JsonReader jsonReader) throws IOExcepti
deserializedBalanceProperties.billingFrequency = BillingFrequency.fromString(reader.getString());
} else if ("priceHidden".equals(fieldName)) {
deserializedBalanceProperties.priceHidden = reader.getNullable(JsonReader::getBoolean);
+ } else if ("overageRefund".equals(fieldName)) {
+ deserializedBalanceProperties.overageRefund
+ = reader.getNullable(nonNullReader -> new BigDecimal(nonNullReader.getString()));
} else if ("newPurchasesDetails".equals(fieldName)) {
List newPurchasesDetails
= reader.readArray(reader1 -> BalancePropertiesNewPurchasesDetailsItem.fromJson(reader1));
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
index 37efe0832f7ad..8ff01233b1770 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -36,6 +37,11 @@ public final class BudgetInner extends ProxyResource {
*/
private String etag;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -88,6 +94,15 @@ public BudgetInner withEtag(String etag) {
return this;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -284,17 +299,6 @@ public ForecastSpend forecastSpend() {
return this.innerProperties() == null ? null : this.innerProperties().forecastSpend();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -332,6 +336,8 @@ public static BudgetInner fromJson(JsonReader jsonReader) throws IOException {
deserializedBudgetInner.innerProperties = BudgetProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedBudgetInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBudgetInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
index a25c9d88e2a58..d1f22f8aa8fc6 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BudgetProperties.java
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -224,50 +223,6 @@ public ForecastSpend forecastSpend() {
return this.forecastSpend;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (category() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property category in model BudgetProperties"));
- }
- if (amount() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property amount in model BudgetProperties"));
- }
- if (timeGrain() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property timeGrain in model BudgetProperties"));
- }
- if (timePeriod() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property timePeriod in model BudgetProperties"));
- } else {
- timePeriod().validate();
- }
- if (filter() != null) {
- filter().validate();
- }
- if (currentSpend() != null) {
- currentSpend().validate();
- }
- if (notifications() != null) {
- notifications().values().forEach(e -> {
- if (e != null) {
- e.validate();
- }
- });
- }
- if (forecastSpend() != null) {
- forecastSpend().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(BudgetProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
index 01f2812a3b2f8..562319a15d067 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ChargesListResultInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -26,7 +26,7 @@ public final class ChargesListResultInner implements JsonSerializable value() {
return this.value;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
index d5c1c41d6492f..7b749b8635c2e 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -13,11 +14,12 @@
import com.azure.resourcemanager.consumption.models.CreditBalanceSummary;
import com.azure.resourcemanager.consumption.models.Reseller;
import java.io.IOException;
+import java.util.Map;
/**
* A credit summary resource.
*/
-@Fluent
+@Immutable
public final class CreditSummaryInner extends ProxyResource {
/*
* The properties of the credit summary.
@@ -30,6 +32,16 @@ public final class CreditSummaryInner extends ProxyResource {
*/
private String etag;
+ /*
+ * A list of Tag.
+ */
+ private Map tags;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -48,7 +60,7 @@ public final class CreditSummaryInner extends ProxyResource {
/**
* Creates an instance of CreditSummaryInner class.
*/
- public CreditSummaryInner() {
+ private CreditSummaryInner() {
}
/**
@@ -71,15 +83,21 @@ public String etag() {
}
/**
- * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
- * determine whether the user is updating the latest version or not.
+ * Get the tags property: A list of Tag.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param etag the etag value to set.
- * @return the CreditSummaryInner object itself.
+ * @return the systemData value.
*/
- public CreditSummaryInner withEtag(String etag) {
- this.etag = etag;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -176,23 +194,22 @@ public Reseller reseller() {
}
/**
- * Get the etag property: The eTag for the resource.
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
*
- * @return the etag value.
+ * @return the isEstimatedBalance value.
*/
- public String etagPropertiesEtag() {
- return this.innerProperties() == null ? null : this.innerProperties().etag();
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
}
/**
- * Validates the instance.
+ * Get the etag property: The eTag for the resource.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the etag value.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public String etagPropertiesEtag() {
+ return this.innerProperties() == null ? null : this.innerProperties().etag();
}
/**
@@ -203,6 +220,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
jsonWriter.writeStringField("eTag", this.etag);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
return jsonWriter.writeEndObject();
}
@@ -232,6 +250,11 @@ public static CreditSummaryInner fromJson(JsonReader jsonReader) throws IOExcept
deserializedCreditSummaryInner.innerProperties = CreditSummaryProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedCreditSummaryInner.etag = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedCreditSummaryInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCreditSummaryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
index f167f3ccc79eb..fe688e4d292f1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/CreditSummaryProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -54,6 +54,11 @@ public final class CreditSummaryProperties implements JsonSerializable {
/*
* The date of the event.
@@ -53,10 +53,21 @@ public final class EventProperties implements JsonSerializable
private Amount charges;
/*
- * The balance after the event.
+ * The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity
+ * consumption commitment
*/
private Amount closedBalance;
+ /*
+ * Identifier of the billing account.
+ */
+ private String billingAccountId;
+
+ /*
+ * Name of the billing account.
+ */
+ private String billingAccountDisplayName;
+
/*
* Identifies the type of the event.
*/
@@ -131,10 +142,16 @@ public final class EventProperties implements JsonSerializable
private AmountWithExchangeRate chargesInBillingCurrency;
/*
- * The balance in billing currency after the event.
+ * The balance in billing currency after the event, Note: This will not be returned for Contributor Organization
+ * Type in Multi-Entity consumption commitment
*/
private AmountWithExchangeRate closedBalanceInBillingCurrency;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
@@ -143,7 +160,7 @@ public final class EventProperties implements JsonSerializable
/**
* Creates an instance of EventProperties class.
*/
- public EventProperties() {
+ private EventProperties() {
}
/**
@@ -202,7 +219,8 @@ public Amount charges() {
}
/**
- * Get the closedBalance property: The balance after the event.
+ * Get the closedBalance property: The balance after the event, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
*
* @return the closedBalance value.
*/
@@ -211,23 +229,30 @@ public Amount closedBalance() {
}
/**
- * Get the eventType property: Identifies the type of the event.
+ * Get the billingAccountId property: Identifier of the billing account.
*
- * @return the eventType value.
+ * @return the billingAccountId value.
*/
- public EventType eventType() {
- return this.eventType;
+ public String billingAccountId() {
+ return this.billingAccountId;
}
/**
- * Set the eventType property: Identifies the type of the event.
+ * Get the billingAccountDisplayName property: Name of the billing account.
*
- * @param eventType the eventType value to set.
- * @return the EventProperties object itself.
+ * @return the billingAccountDisplayName value.
*/
- public EventProperties withEventType(EventType eventType) {
- this.eventType = eventType;
- return this;
+ public String billingAccountDisplayName() {
+ return this.billingAccountDisplayName;
+ }
+
+ /**
+ * Get the eventType property: Identifies the type of the event.
+ *
+ * @return the eventType value.
+ */
+ public EventType eventType() {
+ return this.eventType;
}
/**
@@ -354,7 +379,8 @@ public AmountWithExchangeRate chargesInBillingCurrency() {
}
/**
- * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event.
+ * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event, Note: This will
+ * not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
*
* @return the closedBalanceInBillingCurrency value.
*/
@@ -363,56 +389,22 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
}
/**
- * Get the etag property: The eTag for the resource.
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
*
- * @return the etag value.
+ * @return the isEstimatedBalance value.
*/
- public String etag() {
- return this.etag;
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
}
/**
- * Validates the instance.
+ * Get the etag property: The eTag for the resource.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (newCredit() != null) {
- newCredit().validate();
- }
- if (adjustments() != null) {
- adjustments().validate();
- }
- if (creditExpired() != null) {
- creditExpired().validate();
- }
- if (charges() != null) {
- charges().validate();
- }
- if (closedBalance() != null) {
- closedBalance().validate();
- }
- if (canceledCredit() != null) {
- canceledCredit().validate();
- }
- if (reseller() != null) {
- reseller().validate();
- }
- if (creditExpiredInBillingCurrency() != null) {
- creditExpiredInBillingCurrency().validate();
- }
- if (newCreditInBillingCurrency() != null) {
- newCreditInBillingCurrency().validate();
- }
- if (adjustmentsInBillingCurrency() != null) {
- adjustmentsInBillingCurrency().validate();
- }
- if (chargesInBillingCurrency() != null) {
- chargesInBillingCurrency().validate();
- }
- if (closedBalanceInBillingCurrency() != null) {
- closedBalanceInBillingCurrency().validate();
- }
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
}
/**
@@ -455,6 +447,10 @@ public static EventProperties fromJson(JsonReader jsonReader) throws IOException
deserializedEventProperties.charges = Amount.fromJson(reader);
} else if ("closedBalance".equals(fieldName)) {
deserializedEventProperties.closedBalance = Amount.fromJson(reader);
+ } else if ("billingAccountId".equals(fieldName)) {
+ deserializedEventProperties.billingAccountId = reader.getString();
+ } else if ("billingAccountDisplayName".equals(fieldName)) {
+ deserializedEventProperties.billingAccountDisplayName = reader.getString();
} else if ("eventType".equals(fieldName)) {
deserializedEventProperties.eventType = EventType.fromString(reader.getString());
} else if ("invoiceNumber".equals(fieldName)) {
@@ -487,6 +483,8 @@ public static EventProperties fromJson(JsonReader jsonReader) throws IOException
} else if ("closedBalanceInBillingCurrency".equals(fieldName)) {
deserializedEventProperties.closedBalanceInBillingCurrency
= AmountWithExchangeRate.fromJson(reader);
+ } else if ("isEstimatedBalance".equals(fieldName)) {
+ deserializedEventProperties.isEstimatedBalance = reader.getNullable(JsonReader::getBoolean);
} else if ("eTag".equals(fieldName)) {
deserializedEventProperties.etag = reader.getString();
} else {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
index f57af0a420ccf..58001918ab0a1 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/EventSummaryInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -19,7 +20,7 @@
/**
* An event summary resource.
*/
-@Fluent
+@Immutable
public final class EventSummaryInner extends ProxyResource {
/*
* The event properties.
@@ -27,11 +28,15 @@ public final class EventSummaryInner extends ProxyResource {
private EventProperties innerProperties;
/*
- * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user
- * is updating the latest version or not.
+ * The eTag for the resource.
*/
private String etag;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -50,7 +55,7 @@ public final class EventSummaryInner extends ProxyResource {
/**
* Creates an instance of EventSummaryInner class.
*/
- public EventSummaryInner() {
+ private EventSummaryInner() {
}
/**
@@ -63,8 +68,7 @@ private EventProperties innerProperties() {
}
/**
- * Get the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
- * determine whether the user is updating the latest version or not.
+ * Get the etag property: The eTag for the resource.
*
* @return the etag value.
*/
@@ -73,15 +77,12 @@ public String etag() {
}
/**
- * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
- * determine whether the user is updating the latest version or not.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param etag the etag value to set.
- * @return the EventSummaryInner object itself.
+ * @return the systemData value.
*/
- public EventSummaryInner withEtag(String etag) {
- this.etag = etag;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -170,7 +171,8 @@ public Amount charges() {
}
/**
- * Get the closedBalance property: The balance after the event.
+ * Get the closedBalance property: The balance after the event, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
*
* @return the closedBalance value.
*/
@@ -179,26 +181,30 @@ public Amount closedBalance() {
}
/**
- * Get the eventType property: Identifies the type of the event.
+ * Get the billingAccountId property: Identifier of the billing account.
*
- * @return the eventType value.
+ * @return the billingAccountId value.
*/
- public EventType eventType() {
- return this.innerProperties() == null ? null : this.innerProperties().eventType();
+ public String billingAccountId() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingAccountId();
}
/**
- * Set the eventType property: Identifies the type of the event.
+ * Get the billingAccountDisplayName property: Name of the billing account.
*
- * @param eventType the eventType value to set.
- * @return the EventSummaryInner object itself.
+ * @return the billingAccountDisplayName value.
*/
- public EventSummaryInner withEventType(EventType eventType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withEventType(eventType);
- return this;
+ public String billingAccountDisplayName() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingAccountDisplayName();
+ }
+
+ /**
+ * Get the eventType property: Identifies the type of the event.
+ *
+ * @return the eventType value.
+ */
+ public EventType eventType() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventType();
}
/**
@@ -325,7 +331,8 @@ public AmountWithExchangeRate chargesInBillingCurrency() {
}
/**
- * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event.
+ * Get the closedBalanceInBillingCurrency property: The balance in billing currency after the event, Note: This will
+ * not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
*
* @return the closedBalanceInBillingCurrency value.
*/
@@ -334,23 +341,22 @@ public AmountWithExchangeRate closedBalanceInBillingCurrency() {
}
/**
- * Get the etag property: The eTag for the resource.
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
*
- * @return the etag value.
+ * @return the isEstimatedBalance value.
*/
- public String etagPropertiesEtag() {
- return this.innerProperties() == null ? null : this.innerProperties().etag();
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
}
/**
- * Validates the instance.
+ * Get the etag property: The eTag for the resource.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the etag value.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public String etagPropertiesEtag() {
+ return this.innerProperties() == null ? null : this.innerProperties().etag();
}
/**
@@ -360,7 +366,6 @@ public void validate() {
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
- jsonWriter.writeStringField("eTag", this.etag);
return jsonWriter.writeEndObject();
}
@@ -390,6 +395,8 @@ public static EventSummaryInner fromJson(JsonReader jsonReader) throws IOExcepti
deserializedEventSummaryInner.innerProperties = EventProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedEventSummaryInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedEventSummaryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
index 42ddf14079dde..70700333fb6b0 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyChargeSummaryProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -55,7 +55,7 @@ public final class LegacyChargeSummaryProperties implements JsonSerializable UUID.fromString(nonNullReader.getString()));
+ deserializedLegacyReservationTransactionProperties.purchasingSubscriptionGuid = reader.getString();
} else if ("purchasingSubscriptionName".equals(fieldName)) {
deserializedLegacyReservationTransactionProperties.purchasingSubscriptionName = reader.getString();
} else if ("armSkuName".equals(fieldName)) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
index 8656936c62a3f..81513c68b0491 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LegacyUsageDetailProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -15,7 +15,6 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
-import java.util.UUID;
/**
* The properties of the legacy usage detail.
@@ -92,7 +91,7 @@ public final class LegacyUsageDetailProperties implements JsonSerializable UUID.fromString(nonNullReader.getString()));
+ deserializedLegacyUsageDetailProperties.meterId = reader.getString();
} else if ("meterDetails".equals(fieldName)) {
deserializedLegacyUsageDetailProperties.meterDetails = MeterDetailsResponse.fromJson(reader);
} else if ("quantity".equals(fieldName)) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
index 47343688e6e6a..795bc62ce0f64 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -13,6 +13,7 @@
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.LotSource;
+import com.azure.resourcemanager.consumption.models.OrganizationType;
import com.azure.resourcemanager.consumption.models.Reseller;
import com.azure.resourcemanager.consumption.models.Status;
import java.io.IOException;
@@ -24,7 +25,8 @@
@Immutable
public final class LotProperties implements JsonSerializable {
/*
- * The original amount of a lot.
+ * The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity
+ * consumption commitment
*/
private Amount originalAmount;
@@ -75,7 +77,8 @@ public final class LotProperties implements JsonSerializable {
private String billingCurrency;
/*
- * The original amount of a lot in billing currency.
+ * The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization
+ * Type in Multi-Entity consumption commitment
*/
private AmountWithExchangeRate originalAmountInBillingCurrency;
@@ -89,19 +92,35 @@ public final class LotProperties implements JsonSerializable {
*/
private Reseller reseller;
+ /*
+ * If true, the listed details are based on an estimation and it will be subjected to change.
+ */
+ private Boolean isEstimatedBalance;
+
/*
* The eTag for the resource.
*/
private String etag;
+ /*
+ * The organization type of the lot.
+ */
+ private OrganizationType organizationType;
+
+ /*
+ * Amount consumed from the commitment.
+ */
+ private Amount usedAmount;
+
/**
* Creates an instance of LotProperties class.
*/
- public LotProperties() {
+ private LotProperties() {
}
/**
- * Get the originalAmount property: The original amount of a lot.
+ * Get the originalAmount property: The original amount of a lot, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
*
* @return the originalAmount value.
*/
@@ -192,7 +211,8 @@ public String billingCurrency() {
}
/**
- * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency.
+ * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency, Note: This
+ * will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
*
* @return the originalAmountInBillingCurrency value.
*/
@@ -218,6 +238,16 @@ public Reseller reseller() {
return this.reseller;
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.isEstimatedBalance;
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
@@ -228,26 +258,21 @@ public String etag() {
}
/**
- * Validates the instance.
+ * Get the organizationType property: The organization type of the lot.
+ *
+ * @return the organizationType value.
+ */
+ public OrganizationType organizationType() {
+ return this.organizationType;
+ }
+
+ /**
+ * Get the usedAmount property: Amount consumed from the commitment.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (originalAmount() != null) {
- originalAmount().validate();
- }
- if (closedBalance() != null) {
- closedBalance().validate();
- }
- if (originalAmountInBillingCurrency() != null) {
- originalAmountInBillingCurrency().validate();
- }
- if (closedBalanceInBillingCurrency() != null) {
- closedBalanceInBillingCurrency().validate();
- }
- if (reseller() != null) {
- reseller().validate();
- }
+ * @return the usedAmount value.
+ */
+ public Amount usedAmount() {
+ return this.usedAmount;
}
/**
@@ -303,8 +328,14 @@ public static LotProperties fromJson(JsonReader jsonReader) throws IOException {
deserializedLotProperties.closedBalanceInBillingCurrency = AmountWithExchangeRate.fromJson(reader);
} else if ("reseller".equals(fieldName)) {
deserializedLotProperties.reseller = Reseller.fromJson(reader);
+ } else if ("isEstimatedBalance".equals(fieldName)) {
+ deserializedLotProperties.isEstimatedBalance = reader.getNullable(JsonReader::getBoolean);
} else if ("eTag".equals(fieldName)) {
deserializedLotProperties.etag = reader.getString();
+ } else if ("OrganizationType".equals(fieldName)) {
+ deserializedLotProperties.organizationType = OrganizationType.fromString(reader.getString());
+ } else if ("usedAmount".equals(fieldName)) {
+ deserializedLotProperties.usedAmount = Amount.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
index bebf56a99017c..484e2d13b2271 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/LotSummaryInner.java
@@ -1,17 +1,19 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.consumption.models.Amount;
import com.azure.resourcemanager.consumption.models.AmountWithExchangeRate;
import com.azure.resourcemanager.consumption.models.LotSource;
+import com.azure.resourcemanager.consumption.models.OrganizationType;
import com.azure.resourcemanager.consumption.models.Reseller;
import com.azure.resourcemanager.consumption.models.Status;
import java.io.IOException;
@@ -20,7 +22,7 @@
/**
* A lot summary resource.
*/
-@Fluent
+@Immutable
public final class LotSummaryInner extends ProxyResource {
/*
* The lot properties.
@@ -33,6 +35,11 @@ public final class LotSummaryInner extends ProxyResource {
*/
private String etag;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -51,7 +58,7 @@ public final class LotSummaryInner extends ProxyResource {
/**
* Creates an instance of LotSummaryInner class.
*/
- public LotSummaryInner() {
+ private LotSummaryInner() {
}
/**
@@ -74,15 +81,12 @@ public String etag() {
}
/**
- * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
- * determine whether the user is updating the latest version or not.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param etag the etag value to set.
- * @return the LotSummaryInner object itself.
+ * @return the systemData value.
*/
- public LotSummaryInner withEtag(String etag) {
- this.etag = etag;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -116,7 +120,8 @@ public String id() {
}
/**
- * Get the originalAmount property: The original amount of a lot.
+ * Get the originalAmount property: The original amount of a lot, Note: This will not be returned for Contributor
+ * Organization Type in Multi-Entity consumption commitment.
*
* @return the originalAmount value.
*/
@@ -207,7 +212,8 @@ public String billingCurrency() {
}
/**
- * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency.
+ * Get the originalAmountInBillingCurrency property: The original amount of a lot in billing currency, Note: This
+ * will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
*
* @return the originalAmountInBillingCurrency value.
*/
@@ -233,6 +239,16 @@ public Reseller reseller() {
return this.innerProperties() == null ? null : this.innerProperties().reseller();
}
+ /**
+ * Get the isEstimatedBalance property: If true, the listed details are based on an estimation and it will be
+ * subjected to change.
+ *
+ * @return the isEstimatedBalance value.
+ */
+ public Boolean isEstimatedBalance() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEstimatedBalance();
+ }
+
/**
* Get the etag property: The eTag for the resource.
*
@@ -243,14 +259,21 @@ public String etagPropertiesEtag() {
}
/**
- * Validates the instance.
+ * Get the organizationType property: The organization type of the lot.
+ *
+ * @return the organizationType value.
+ */
+ public OrganizationType organizationType() {
+ return this.innerProperties() == null ? null : this.innerProperties().organizationType();
+ }
+
+ /**
+ * Get the usedAmount property: Amount consumed from the commitment.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the usedAmount value.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public Amount usedAmount() {
+ return this.innerProperties() == null ? null : this.innerProperties().usedAmount();
}
/**
@@ -290,6 +313,8 @@ public static LotSummaryInner fromJson(JsonReader jsonReader) throws IOException
deserializedLotSummaryInner.innerProperties = LotProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedLotSummaryInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLotSummaryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
index a8200c14a42d9..5246148836279 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
@@ -18,7 +18,7 @@
/**
* The properties of the Management Group Aggregated Cost.
*/
-@Fluent
+@Immutable
public final class ManagementGroupAggregatedCostProperties
implements JsonSerializable {
/*
@@ -74,7 +74,7 @@ public final class ManagementGroupAggregatedCostProperties
/**
* Creates an instance of ManagementGroupAggregatedCostProperties class.
*/
- public ManagementGroupAggregatedCostProperties() {
+ private ManagementGroupAggregatedCostProperties() {
}
/**
@@ -149,18 +149,6 @@ public List children() {
return this.children;
}
- /**
- * Set the children property: Children of a management group.
- *
- * @param children the children value to set.
- * @return the ManagementGroupAggregatedCostProperties object itself.
- */
- public ManagementGroupAggregatedCostProperties
- withChildren(List children) {
- this.children = children;
- return this;
- }
-
/**
* Get the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
@@ -171,18 +159,6 @@ public List includedSubscriptions() {
return this.includedSubscriptions;
}
- /**
- * Set the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
- * cost.
- *
- * @param includedSubscriptions the includedSubscriptions value to set.
- * @return the ManagementGroupAggregatedCostProperties object itself.
- */
- public ManagementGroupAggregatedCostProperties withIncludedSubscriptions(List includedSubscriptions) {
- this.includedSubscriptions = includedSubscriptions;
- return this;
- }
-
/**
* Get the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
* cost.
@@ -193,29 +169,6 @@ public List excludedSubscriptions() {
return this.excludedSubscriptions;
}
- /**
- * Set the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
- * cost.
- *
- * @param excludedSubscriptions the excludedSubscriptions value to set.
- * @return the ManagementGroupAggregatedCostProperties object itself.
- */
- public ManagementGroupAggregatedCostProperties withExcludedSubscriptions(List excludedSubscriptions) {
- this.excludedSubscriptions = excludedSubscriptions;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (children() != null) {
- children().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
index 76b37743a82aa..c33e5f904c2c5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ManagementGroupAggregatedCostResultInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -18,7 +19,7 @@
/**
* A management group aggregated cost resource.
*/
-@Fluent
+@Immutable
public final class ManagementGroupAggregatedCostResultInner extends ProxyResource {
/*
* The properties of the Management Group Aggregated Cost.
@@ -35,6 +36,11 @@ public final class ManagementGroupAggregatedCostResultInner extends ProxyResourc
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -53,7 +59,7 @@ public final class ManagementGroupAggregatedCostResultInner extends ProxyResourc
/**
* Creates an instance of ManagementGroupAggregatedCostResultInner class.
*/
- public ManagementGroupAggregatedCostResultInner() {
+ private ManagementGroupAggregatedCostResultInner() {
}
/**
@@ -83,6 +89,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -185,21 +200,6 @@ public List children() {
return this.innerProperties() == null ? null : this.innerProperties().children();
}
- /**
- * Set the children property: Children of a management group.
- *
- * @param children the children value to set.
- * @return the ManagementGroupAggregatedCostResultInner object itself.
- */
- public ManagementGroupAggregatedCostResultInner
- withChildren(List children) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ManagementGroupAggregatedCostProperties();
- }
- this.innerProperties().withChildren(children);
- return this;
- }
-
/**
* Get the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
* cost.
@@ -210,21 +210,6 @@ public List includedSubscriptions() {
return this.innerProperties() == null ? null : this.innerProperties().includedSubscriptions();
}
- /**
- * Set the includedSubscriptions property: List of subscription Guids included in the calculation of aggregated
- * cost.
- *
- * @param includedSubscriptions the includedSubscriptions value to set.
- * @return the ManagementGroupAggregatedCostResultInner object itself.
- */
- public ManagementGroupAggregatedCostResultInner withIncludedSubscriptions(List includedSubscriptions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ManagementGroupAggregatedCostProperties();
- }
- this.innerProperties().withIncludedSubscriptions(includedSubscriptions);
- return this;
- }
-
/**
* Get the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
* cost.
@@ -235,32 +220,6 @@ public List excludedSubscriptions() {
return this.innerProperties() == null ? null : this.innerProperties().excludedSubscriptions();
}
- /**
- * Set the excludedSubscriptions property: List of subscription Guids excluded from the calculation of aggregated
- * cost.
- *
- * @param excludedSubscriptions the excludedSubscriptions value to set.
- * @return the ManagementGroupAggregatedCostResultInner object itself.
- */
- public ManagementGroupAggregatedCostResultInner withExcludedSubscriptions(List excludedSubscriptions) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ManagementGroupAggregatedCostProperties();
- }
- this.innerProperties().withExcludedSubscriptions(excludedSubscriptions);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -302,6 +261,8 @@ public static ManagementGroupAggregatedCostResultInner fromJson(JsonReader jsonR
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedManagementGroupAggregatedCostResultInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedManagementGroupAggregatedCostResultInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
index 7bdad83a2d33a..408b00942e449 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -13,7 +14,6 @@
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.Map;
-import java.util.UUID;
/**
* A marketplace resource.
@@ -35,6 +35,11 @@ public final class MarketplaceInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -53,7 +58,7 @@ public final class MarketplaceInner extends ProxyResource {
/**
* Creates an instance of MarketplaceInner class.
*/
- public MarketplaceInner() {
+ private MarketplaceInner() {
}
/**
@@ -83,6 +88,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -253,7 +267,7 @@ public Boolean isEstimated() {
*
* @return the meterId value.
*/
- public UUID meterId() {
+ public String meterId() {
return this.innerProperties() == null ? null : this.innerProperties().meterId();
}
@@ -262,7 +276,7 @@ public UUID meterId() {
*
* @return the subscriptionGuid value.
*/
- public UUID subscriptionGuid() {
+ public String subscriptionGuid() {
return this.innerProperties() == null ? null : this.innerProperties().subscriptionGuid();
}
@@ -348,17 +362,6 @@ public Boolean isRecurringCharge() {
return this.innerProperties() == null ? null : this.innerProperties().isRecurringCharge();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -398,6 +401,8 @@ public static MarketplaceInner fromJson(JsonReader jsonReader) throws IOExceptio
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedMarketplaceInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMarketplaceInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
index 1018a7567c532..ce1f43fe2e679 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/MarketplaceProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -13,7 +13,6 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
-import java.util.UUID;
/**
* The properties of the marketplace usage detail.
@@ -98,12 +97,12 @@ public final class MarketplaceProperties implements JsonSerializable UUID.fromString(nonNullReader.getString()));
+ deserializedMarketplaceProperties.meterId = reader.getString();
} else if ("subscriptionGuid".equals(fieldName)) {
- deserializedMarketplaceProperties.subscriptionGuid
- = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ deserializedMarketplaceProperties.subscriptionGuid = reader.getString();
} else if ("subscriptionName".equals(fieldName)) {
deserializedMarketplaceProperties.subscriptionName = reader.getString();
} else if ("accountName".equals(fieldName)) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
index 9b89389867c40..29b1935ea3b15 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernChargeSummaryProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -80,7 +80,7 @@ public final class ModernChargeSummaryProperties implements JsonSerializable tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -49,7 +53,7 @@ public final class ModernReservationTransactionInner extends ReservationTransact
/**
* Creates an instance of ModernReservationTransactionInner class.
*/
- public ModernReservationTransactionInner() {
+ private ModernReservationTransactionInner() {
}
/**
@@ -66,11 +70,19 @@ private ModernReservationTransactionProperties innerProperties() {
*
* @return the tags value.
*/
- @Override
public List tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -224,7 +236,7 @@ public String invoiceSectionName() {
*
* @return the purchasingSubscriptionGuid value.
*/
- public UUID purchasingSubscriptionGuid() {
+ public String purchasingSubscriptionGuid() {
return this.innerProperties() == null ? null : this.innerProperties().purchasingSubscriptionGuid();
}
@@ -284,24 +296,6 @@ public String term() {
return this.innerProperties() == null ? null : this.innerProperties().term();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property innerProperties in model ModernReservationTransactionInner"));
- } else {
- innerProperties().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ModernReservationTransactionInner.class);
-
/**
* {@inheritDoc}
*/
@@ -335,12 +329,14 @@ public static ModernReservationTransactionInner fromJson(JsonReader jsonReader)
deserializedModernReservationTransactionInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedModernReservationTransactionInner.type = reader.getString();
- } else if ("tags".equals(fieldName)) {
- List tags = reader.readArray(reader1 -> reader1.getString());
- deserializedModernReservationTransactionInner.tags = tags;
} else if ("properties".equals(fieldName)) {
deserializedModernReservationTransactionInner.innerProperties
= ModernReservationTransactionProperties.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ List tags = reader.readArray(reader1 -> reader1.getString());
+ deserializedModernReservationTransactionInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedModernReservationTransactionInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
index 2ac0490ac0485..80d4e38f0207f 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernReservationTransactionProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -13,7 +13,6 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
-import java.util.UUID;
/**
* The properties of a modern reservation transaction.
@@ -89,7 +88,7 @@ public final class ModernReservationTransactionProperties
/*
* The subscription guid that makes the transaction.
*/
- private UUID purchasingSubscriptionGuid;
+ private String purchasingSubscriptionGuid;
/*
* The subscription name that makes the transaction.
@@ -126,7 +125,7 @@ public final class ModernReservationTransactionProperties
/**
* Creates an instance of ModernReservationTransactionProperties class.
*/
- public ModernReservationTransactionProperties() {
+ private ModernReservationTransactionProperties() {
}
/**
@@ -252,7 +251,7 @@ public String invoiceSectionName() {
*
* @return the purchasingSubscriptionGuid value.
*/
- public UUID purchasingSubscriptionGuid() {
+ public String purchasingSubscriptionGuid() {
return this.purchasingSubscriptionGuid;
}
@@ -312,14 +311,6 @@ public String term() {
return this.term;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
@@ -374,8 +365,7 @@ public static ModernReservationTransactionProperties fromJson(JsonReader jsonRea
} else if ("invoiceSectionName".equals(fieldName)) {
deserializedModernReservationTransactionProperties.invoiceSectionName = reader.getString();
} else if ("purchasingSubscriptionGuid".equals(fieldName)) {
- deserializedModernReservationTransactionProperties.purchasingSubscriptionGuid
- = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString()));
+ deserializedModernReservationTransactionProperties.purchasingSubscriptionGuid = reader.getString();
} else if ("purchasingSubscriptionName".equals(fieldName)) {
deserializedModernReservationTransactionProperties.purchasingSubscriptionName = reader.getString();
} else if ("quantity".equals(fieldName)) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
index 66e89068e64e2..f596116faaebd 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ModernUsageDetailProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -14,7 +14,6 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
-import java.util.UUID;
/**
* The properties of the usage detail.
@@ -91,7 +90,7 @@ public final class ModernUsageDetailProperties implements JsonSerializable UUID.fromString(nonNullReader.getString()));
+ deserializedModernUsageDetailProperties.meterId = reader.getString();
} else if ("meterName".equals(fieldName)) {
deserializedModernUsageDetailProperties.meterName = reader.getString();
} else if ("meterRegion".equals(fieldName)) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
index 1546aa8727b54..be83de35ef5a2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -15,7 +15,7 @@
/**
* A Consumption REST API operation.
*/
-@Fluent
+@Immutable
public final class OperationInner implements JsonSerializable {
/*
* Operation Id.
@@ -35,7 +35,7 @@ public final class OperationInner implements JsonSerializable {
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -65,28 +65,6 @@ public OperationDisplay display() {
return this.display;
}
- /**
- * Set the display property: The object that represents the operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
new file mode 100644
index 0000000000000..7615506885b90
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.consumption.models.OperationStatusType;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * The status of the long running operation.
+ */
+@Immutable
+public final class OperationStatusInner implements JsonSerializable {
+ /*
+ * The status of the long running operation.
+ */
+ private OperationStatusType status;
+
+ /*
+ * The properties of the resource generated.
+ */
+ private PricesheetDownloadProperties innerProperties;
+
+ /**
+ * Creates an instance of OperationStatusInner class.
+ */
+ private OperationStatusInner() {
+ }
+
+ /**
+ * Get the status property: The status of the long running operation.
+ *
+ * @return the status value.
+ */
+ public OperationStatusType status() {
+ return this.status;
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the resource generated.
+ *
+ * @return the innerProperties value.
+ */
+ private PricesheetDownloadProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.innerProperties() == null ? null : this.innerProperties().downloadUrl();
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.innerProperties() == null ? null : this.innerProperties().validTill();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationStatusInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationStatusInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationStatusInner.
+ */
+ public static OperationStatusInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationStatusInner deserializedOperationStatusInner = new OperationStatusInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedOperationStatusInner.status = OperationStatusType.fromString(reader.getString());
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperationStatusInner.innerProperties = PricesheetDownloadProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationStatusInner;
+ });
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
index 4f501422ce062..de81f87542730 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetModel.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -37,7 +37,7 @@ public final class PriceSheetModel implements JsonSerializable
/**
* Creates an instance of PriceSheetModel class.
*/
- public PriceSheetModel() {
+ private PriceSheetModel() {
}
/**
@@ -67,20 +67,6 @@ public MeterDetails download() {
return this.download;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (pricesheets() != null) {
- pricesheets().forEach(e -> e.validate());
- }
- if (download() != null) {
- download().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
index f302590848ba2..5e2fee2550a91 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PriceSheetResultInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -26,7 +27,8 @@ public final class PriceSheetResultInner extends ProxyResource {
private PriceSheetModel innerProperties;
/*
- * The etag for the resource.
+ * eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user
+ * is updating the latest version or not.
*/
private String etag;
@@ -35,6 +37,11 @@ public final class PriceSheetResultInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -53,7 +60,7 @@ public final class PriceSheetResultInner extends ProxyResource {
/**
* Creates an instance of PriceSheetResultInner class.
*/
- public PriceSheetResultInner() {
+ private PriceSheetResultInner() {
}
/**
@@ -66,7 +73,8 @@ private PriceSheetModel innerProperties() {
}
/**
- * Get the etag property: The etag for the resource.
+ * Get the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
+ * determine whether the user is updating the latest version or not.
*
* @return the etag value.
*/
@@ -83,6 +91,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -140,17 +157,6 @@ public MeterDetails download() {
return this.innerProperties() == null ? null : this.innerProperties().download();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -190,6 +196,8 @@ public static PriceSheetResultInner fromJson(JsonReader jsonReader) throws IOExc
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedPriceSheetResultInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPriceSheetResultInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
new file mode 100644
index 0000000000000..64ebde35f3315
--- /dev/null
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.consumption.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * The properties of the price sheet download.
+ */
+@Immutable
+public final class PricesheetDownloadProperties implements JsonSerializable {
+ /*
+ * The link (url) to download the pricesheet.
+ */
+ private String downloadUrl;
+
+ /*
+ * Download link validity.
+ */
+ private OffsetDateTime validTill;
+
+ /**
+ * Creates an instance of PricesheetDownloadProperties class.
+ */
+ private PricesheetDownloadProperties() {
+ }
+
+ /**
+ * Get the downloadUrl property: The link (url) to download the pricesheet.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.downloadUrl;
+ }
+
+ /**
+ * Get the validTill property: Download link validity.
+ *
+ * @return the validTill value.
+ */
+ public OffsetDateTime validTill() {
+ return this.validTill;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PricesheetDownloadProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PricesheetDownloadProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PricesheetDownloadProperties.
+ */
+ public static PricesheetDownloadProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PricesheetDownloadProperties deserializedPricesheetDownloadProperties = new PricesheetDownloadProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("downloadUrl".equals(fieldName)) {
+ deserializedPricesheetDownloadProperties.downloadUrl = reader.getString();
+ } else if ("validTill".equals(fieldName)) {
+ deserializedPricesheetDownloadProperties.validTill = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPricesheetDownloadProperties;
+ });
+ }
+}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
index 2ffcb3f8ad160..81ec0234749cd 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -34,6 +35,11 @@ public final class ReservationDetailInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -52,7 +58,7 @@ public final class ReservationDetailInner extends ProxyResource {
/**
* Creates an instance of ReservationDetailInner class.
*/
- public ReservationDetailInner() {
+ private ReservationDetailInner() {
}
/**
@@ -82,6 +88,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -218,17 +233,6 @@ public String kind() {
return this.innerProperties() == null ? null : this.innerProperties().kind();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -268,6 +272,8 @@ public static ReservationDetailInner fromJson(JsonReader jsonReader) throws IOEx
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedReservationDetailInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedReservationDetailInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
index bf54896a3e185..023d86e11c0a5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationDetailProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -82,7 +82,7 @@ public final class ReservationDetailProperties implements JsonSerializable tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -63,7 +70,7 @@ public final class ReservationRecommendationDetailsModelInner extends ProxyResou
/**
* Creates an instance of ReservationRecommendationDetailsModelInner class.
*/
- public ReservationRecommendationDetailsModelInner() {
+ private ReservationRecommendationDetailsModelInner() {
}
/**
@@ -75,17 +82,6 @@ public String location() {
return this.location;
}
- /**
- * Set the location property: Resource Location.
- *
- * @param location the location value to set.
- * @return the ReservationRecommendationDetailsModelInner object itself.
- */
- public ReservationRecommendationDetailsModelInner withLocation(String location) {
- this.location = location;
- return this;
- }
-
/**
* Get the sku property: Resource sku.
*
@@ -95,17 +91,6 @@ public String sku() {
return this.sku;
}
- /**
- * Set the sku property: Resource sku.
- *
- * @param sku the sku value to set.
- * @return the ReservationRecommendationDetailsModelInner object itself.
- */
- public ReservationRecommendationDetailsModelInner withSku(String sku) {
- this.sku = sku;
- return this;
- }
-
/**
* Get the innerProperties property: The properties of the reservation recommendation.
*
@@ -133,6 +118,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -218,14 +212,31 @@ public ReservationRecommendationDetailsUsageProperties usage() {
}
/**
- * Validates the instance.
+ * Get the managementGroupId property: Management group id associated with management group scoped recommendation.
+ *
+ * @return the managementGroupId value.
+ */
+ public String managementGroupId() {
+ return this.innerProperties() == null ? null : this.innerProperties().managementGroupId();
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID associated with the management group. Populated only when
+ * managementGroupId is populated.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Get the projectedUsage property: Projected usage details used for generating the recommendation.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the projectedUsage value.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public ReservationRecommendationDetailsProjectedUsageProperties projectedUsage() {
+ return this.innerProperties() == null ? null : this.innerProperties().projectedUsage();
}
/**
@@ -275,6 +286,8 @@ public static ReservationRecommendationDetailsModelInner fromJson(JsonReader jso
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedReservationRecommendationDetailsModelInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedReservationRecommendationDetailsModelInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
index fa94dabbe223d..164c4243ff0ff 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationDetailsProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -9,6 +9,7 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsProjectedUsageProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsResourceProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsSavingsProperties;
import com.azure.resourcemanager.consumption.models.ReservationRecommendationDetailsUsageProperties;
@@ -50,10 +51,25 @@ public final class ReservationRecommendationDetailsProperties
*/
private ReservationRecommendationDetailsUsageProperties usage;
+ /*
+ * Management group id associated with management group scoped recommendation.
+ */
+ private String managementGroupId;
+
+ /*
+ * The tenant ID associated with the management group. Populated only when managementGroupId is populated.
+ */
+ private String tenantId;
+
+ /*
+ * Projected usage details used for generating the recommendation.
+ */
+ private ReservationRecommendationDetailsProjectedUsageProperties projectedUsage;
+
/**
* Creates an instance of ReservationRecommendationDetailsProperties class.
*/
- public ReservationRecommendationDetailsProperties() {
+ private ReservationRecommendationDetailsProperties() {
}
/**
@@ -111,20 +127,31 @@ public ReservationRecommendationDetailsUsageProperties usage() {
}
/**
- * Validates the instance.
+ * Get the managementGroupId property: Management group id associated with management group scoped recommendation.
+ *
+ * @return the managementGroupId value.
+ */
+ public String managementGroupId() {
+ return this.managementGroupId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID associated with the management group. Populated only when
+ * managementGroupId is populated.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the projectedUsage property: Projected usage details used for generating the recommendation.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (resource() != null) {
- resource().validate();
- }
- if (savings() != null) {
- savings().validate();
- }
- if (usage() != null) {
- usage().validate();
- }
+ * @return the projectedUsage value.
+ */
+ public ReservationRecommendationDetailsProjectedUsageProperties projectedUsage() {
+ return this.projectedUsage;
}
/**
@@ -167,6 +194,13 @@ public static ReservationRecommendationDetailsProperties fromJson(JsonReader jso
} else if ("usage".equals(fieldName)) {
deserializedReservationRecommendationDetailsProperties.usage
= ReservationRecommendationDetailsUsageProperties.fromJson(reader);
+ } else if ("managementGroupId".equals(fieldName)) {
+ deserializedReservationRecommendationDetailsProperties.managementGroupId = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedReservationRecommendationDetailsProperties.tenantId = reader.getString();
+ } else if ("projectedUsage".equals(fieldName)) {
+ deserializedReservationRecommendationDetailsProperties.projectedUsage
+ = ReservationRecommendationDetailsProjectedUsageProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
index 89a3f1cddcd29..6c07eb3df8691 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationRecommendationInner.java
@@ -1,12 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.consumption.models.LegacyReservationRecommendation;
@@ -19,21 +20,33 @@
* A reservation recommendation resource.
*/
@Immutable
-public class ReservationRecommendationInner extends ProxyResource {
+public class ReservationRecommendationInner implements JsonSerializable {
/*
* Specifies the kind of reservation recommendation.
*/
private ReservationRecommendationKind kind = ReservationRecommendationKind.fromString("ReservationRecommendation");
/*
- * The etag for the resource.
+ * Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{
+ * resourceType}/{resourceName}
*/
- private String etag;
+ private String id;
/*
- * Resource tags.
+ * The name of the resource
*/
- private Map tags;
+ private String name;
+
+ /*
+ * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ */
+ private String type;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
/*
* Resource location
@@ -46,24 +59,19 @@ public class ReservationRecommendationInner extends ProxyResource {
private String sku;
/*
- * The type of the resource.
- */
- private String type;
-
- /*
- * The name of the resource.
+ * The etag for the resource.
*/
- private String name;
+ private String etag;
/*
- * Fully qualified resource Id for the resource.
+ * Resource tags.
*/
- private String id;
+ private Map tags;
/**
* Creates an instance of ReservationRecommendationInner class.
*/
- public ReservationRecommendationInner() {
+ protected ReservationRecommendationInner() {
}
/**
@@ -76,42 +84,86 @@ public ReservationRecommendationKind kind() {
}
/**
- * Get the etag property: The etag for the resource.
+ * Get the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
*
- * @return the etag value.
+ * @return the id value.
*/
- public String etag() {
- return this.etag;
+ public String id() {
+ return this.id;
}
/**
- * Set the etag property: The etag for the resource.
+ * Set the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
*
- * @param etag the etag value to set.
+ * @param id the id value to set.
* @return the ReservationRecommendationInner object itself.
*/
- ReservationRecommendationInner withEtag(String etag) {
- this.etag = etag;
+ ReservationRecommendationInner withId(String id) {
+ this.id = id;
return this;
}
/**
- * Get the tags property: Resource tags.
+ * Get the name property: The name of the resource.
*
- * @return the tags value.
+ * @return the name value.
*/
- public Map tags() {
- return this.tags;
+ public String name() {
+ return this.name;
}
/**
- * Set the tags property: Resource tags.
+ * Set the name property: The name of the resource.
*
- * @param tags the tags value to set.
+ * @param name the name value to set.
* @return the ReservationRecommendationInner object itself.
*/
- ReservationRecommendationInner withTags(Map tags) {
- this.tags = tags;
+ ReservationRecommendationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @param type the type value to set.
+ * @return the ReservationRecommendationInner object itself.
+ */
+ ReservationRecommendationInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @param systemData the systemData value to set.
+ * @return the ReservationRecommendationInner object itself.
+ */
+ ReservationRecommendationInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
return this;
}
@@ -156,41 +208,43 @@ ReservationRecommendationInner withSku(String sku) {
}
/**
- * Get the type property: The type of the resource.
+ * Get the etag property: The etag for the resource.
*
- * @return the type value.
+ * @return the etag value.
*/
- @Override
- public String type() {
- return this.type;
+ public String etag() {
+ return this.etag;
}
/**
- * Get the name property: The name of the resource.
+ * Set the etag property: The etag for the resource.
*
- * @return the name value.
+ * @param etag the etag value to set.
+ * @return the ReservationRecommendationInner object itself.
*/
- @Override
- public String name() {
- return this.name;
+ ReservationRecommendationInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the tags property: Resource tags.
*
- * @return the id value.
+ * @return the tags value.
*/
- @Override
- public String id() {
- return this.id;
+ public Map tags() {
+ return this.tags;
}
/**
- * Validates the instance.
+ * Set the tags property: Resource tags.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @param tags the tags value to set.
+ * @return the ReservationRecommendationInner object itself.
*/
- public void validate() {
+ ReservationRecommendationInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
}
/**
@@ -209,7 +263,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of ReservationRecommendationInner if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ReservationRecommendationInner.
*/
public static ReservationRecommendationInner fromJson(JsonReader jsonReader) throws IOException {
@@ -247,24 +300,26 @@ static ReservationRecommendationInner fromJsonKnownDiscriminator(JsonReader json
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("id".equals(fieldName)) {
+ if ("kind".equals(fieldName)) {
+ deserializedReservationRecommendationInner.kind
+ = ReservationRecommendationKind.fromString(reader.getString());
+ } else if ("id".equals(fieldName)) {
deserializedReservationRecommendationInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedReservationRecommendationInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedReservationRecommendationInner.type = reader.getString();
- } else if ("kind".equals(fieldName)) {
- deserializedReservationRecommendationInner.kind
- = ReservationRecommendationKind.fromString(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedReservationRecommendationInner.systemData = SystemData.fromJson(reader);
+ } else if ("location".equals(fieldName)) {
+ deserializedReservationRecommendationInner.location = reader.getString();
+ } else if ("sku".equals(fieldName)) {
+ deserializedReservationRecommendationInner.sku = reader.getString();
} else if ("etag".equals(fieldName)) {
deserializedReservationRecommendationInner.etag = reader.getString();
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedReservationRecommendationInner.tags = tags;
- } else if ("location".equals(fieldName)) {
- deserializedReservationRecommendationInner.location = reader.getString();
- } else if ("sku".equals(fieldName)) {
- deserializedReservationRecommendationInner.sku = reader.getString();
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
index d8533780c022e..9b85f921830a7 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -34,6 +35,11 @@ public final class ReservationSummaryInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -52,7 +58,7 @@ public final class ReservationSummaryInner extends ProxyResource {
/**
* Creates an instance of ReservationSummaryInner class.
*/
- public ReservationSummaryInner() {
+ private ReservationSummaryInner() {
}
/**
@@ -82,6 +88,15 @@ public Map tags() {
return this.tags;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -260,17 +275,6 @@ public BigDecimal utilizedPercentage() {
return this.innerProperties() == null ? null : this.innerProperties().utilizedPercentage();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -310,6 +314,8 @@ public static ReservationSummaryInner fromJson(JsonReader jsonReader) throws IOE
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedReservationSummaryInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedReservationSummaryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
index 4a25ec6a704d2..78bbdd68ce532 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/ReservationSummaryProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
@@ -104,7 +104,7 @@ public final class ReservationSummaryProperties implements JsonSerializable tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -48,7 +53,7 @@ public class ReservationTransactionInner extends ReservationTransactionResource
/**
* Creates an instance of ReservationTransactionInner class.
*/
- public ReservationTransactionInner() {
+ private ReservationTransactionInner() {
}
/**
@@ -61,24 +66,21 @@ private LegacyReservationTransactionProperties innerProperties() {
}
/**
- * Set the innerProperties property: The properties of a legacy reservation transaction.
+ * Get the tags property: Resource tags.
*
- * @param innerProperties the innerProperties value to set.
- * @return the ReservationTransactionInner object itself.
+ * @return the tags value.
*/
- ReservationTransactionInner withInnerProperties(LegacyReservationTransactionProperties innerProperties) {
- this.innerProperties = innerProperties;
- return this;
+ public List tags() {
+ return this.tags;
}
/**
- * Get the tags property: Resource tags.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @return the tags value.
+ * @return the systemData value.
*/
- @Override
- public List tags() {
- return this.tags;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -199,7 +201,7 @@ public String purchasingEnrollment() {
*
* @return the purchasingSubscriptionGuid value.
*/
- public UUID purchasingSubscriptionGuid() {
+ public String purchasingSubscriptionGuid() {
return this.innerProperties() == null ? null : this.innerProperties().purchasingSubscriptionGuid();
}
@@ -322,18 +324,6 @@ public BigDecimal overage() {
return this.innerProperties() == null ? null : this.innerProperties().overage();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -366,12 +356,14 @@ public static ReservationTransactionInner fromJson(JsonReader jsonReader) throws
deserializedReservationTransactionInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedReservationTransactionInner.type = reader.getString();
- } else if ("tags".equals(fieldName)) {
- List tags = reader.readArray(reader1 -> reader1.getString());
- deserializedReservationTransactionInner.tags = tags;
} else if ("properties".equals(fieldName)) {
deserializedReservationTransactionInner.innerProperties
= LegacyReservationTransactionProperties.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ List tags = reader.readArray(reader1 -> reader1.getString());
+ deserializedReservationTransactionInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedReservationTransactionInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
index 2d453596c8a72..806298ed26190 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,7 +16,7 @@
/**
* The properties of the tag.
*/
-@Fluent
+@Immutable
public final class TagProperties implements JsonSerializable {
/*
* A list of Tag.
@@ -36,7 +36,7 @@ public final class TagProperties implements JsonSerializable {
/**
* Creates an instance of TagProperties class.
*/
- public TagProperties() {
+ private TagProperties() {
}
/**
@@ -48,17 +48,6 @@ public List tags() {
return this.tags;
}
- /**
- * Set the tags property: A list of Tag.
- *
- * @param tags the tags value to set.
- * @return the TagProperties object itself.
- */
- public TagProperties withTags(List tags) {
- this.tags = tags;
- return this;
- }
-
/**
* Get the nextLink property: The link (url) to the next page of results.
*
@@ -77,17 +66,6 @@ public String previousLink() {
return this.previousLink;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (tags() != null) {
- tags().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
index a9cba3a71236e..7ddc475344d9d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/TagsResultInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -16,7 +17,7 @@
/**
* A resource listing all tags.
*/
-@Fluent
+@Immutable
public final class TagsResultInner extends ProxyResource {
/*
* The properties of the tag.
@@ -29,6 +30,11 @@ public final class TagsResultInner extends ProxyResource {
*/
private String etag;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -47,7 +53,7 @@ public final class TagsResultInner extends ProxyResource {
/**
* Creates an instance of TagsResultInner class.
*/
- public TagsResultInner() {
+ private TagsResultInner() {
}
/**
@@ -70,15 +76,12 @@ public String etag() {
}
/**
- * Set the etag property: eTag of the resource. To handle concurrent update scenario, this field will be used to
- * determine whether the user is updating the latest version or not.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param etag the etag value to set.
- * @return the TagsResultInner object itself.
+ * @return the systemData value.
*/
- public TagsResultInner withEtag(String etag) {
- this.etag = etag;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
@@ -120,20 +123,6 @@ public List tags() {
return this.innerProperties() == null ? null : this.innerProperties().tags();
}
- /**
- * Set the tags property: A list of Tag.
- *
- * @param tags the tags value to set.
- * @return the TagsResultInner object itself.
- */
- public TagsResultInner withTags(List tags) {
- if (this.innerProperties() == null) {
- this.innerProperties = new TagProperties();
- }
- this.innerProperties().withTags(tags);
- return this;
- }
-
/**
* Get the nextLink property: The link (url) to the next page of results.
*
@@ -152,17 +141,6 @@ public String previousLink() {
return this.innerProperties() == null ? null : this.innerProperties().previousLink();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -200,6 +178,8 @@ public static TagsResultInner fromJson(JsonReader jsonReader) throws IOException
deserializedTagsResultInner.innerProperties = TagProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedTagsResultInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTagsResultInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
index 7ef9ee294af7e..f15b36ce3aad3 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/UsageDetailInner.java
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -35,6 +36,11 @@ public class UsageDetailInner extends ProxyResource {
*/
private Map tags;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -53,7 +59,7 @@ public class UsageDetailInner extends ProxyResource {
/**
* Creates an instance of UsageDetailInner class.
*/
- public UsageDetailInner() {
+ protected UsageDetailInner() {
}
/**
@@ -105,6 +111,26 @@ UsageDetailInner withTags(Map tags) {
return this;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @param systemData the systemData value to set.
+ * @return the UsageDetailInner object itself.
+ */
+ UsageDetailInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -135,14 +161,6 @@ public String id() {
return this.id;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
@@ -209,6 +227,8 @@ static UsageDetailInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedUsageDetailInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedUsageDetailInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
index 82de9c902780f..71e9adf5fdea9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for ConsumptionManagementClient.
+ * Package containing the inner data models for Consumption.
* Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.consumption.fluent.models;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
index 599c20c7e9417..3aeae8ddedc03 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for ConsumptionManagementClient.
+ * Package containing the service clients for Consumption.
* Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.consumption.fluent;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
index e75f6ab389bd5..e8ff6201ce282 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -54,16 +54,25 @@ public final class AggregatedCostsClientImpl implements AggregatedCostsClient {
* The interface defining all the services for ConsumptionManagementClientAggregatedCosts to be used by the proxy
* service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ConsumptionManagemen")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ConsumptionManagementClientAggregatedCosts")
public interface AggregatedCostsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByManagementGroup(
- @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("managementGroupId") String managementGroupId, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByManagementGroupSync(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("managementGroupId") String managementGroupId, @QueryParam("$filter") String filter,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -71,18 +80,28 @@ Mono> getByManagementGroup(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getForBillingPeriodByManagementGroup(
- @HostParam("$host") String endpoint, @PathParam("managementGroupId") String managementGroupId,
- @PathParam("billingPeriodName") String billingPeriodName, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("managementGroupId") String managementGroupId,
+ @PathParam("billingPeriodName") String billingPeriodName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getForBillingPeriodByManagementGroupSync(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("managementGroupId") String managementGroupId,
+ @PathParam("billingPeriodName") String billingPeriodName, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
- * @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
+ * @param managementGroupId Order Id of the reservation.
+ * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter
+ * supports 'le' and 'ge'.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -92,56 +111,17 @@ Mono> getForBillingPeriodByMa
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
getByManagementGroupWithResponseAsync(String managementGroupId, String filter) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (managementGroupId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.getByManagementGroup(this.client.getEndpoint(), managementGroupId,
- this.client.getApiVersion(), filter, accept, context))
+ .withContext(context -> service.getByManagementGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ managementGroupId, filter, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Provides the aggregate cost of a management group and all child management groups by current billing period.
*
- * @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- getByManagementGroupWithResponseAsync(String managementGroupId, String filter, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (managementGroupId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByManagementGroup(this.client.getEndpoint(), managementGroupId, this.client.getApiVersion(),
- filter, accept, context);
- }
-
- /**
- * Provides the aggregate cost of a management group and all child management groups by current billing period.
- *
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -154,34 +134,16 @@ private Mono getByManagementGroupAsync
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Provides the aggregate cost of a management group and all child management groups by current billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc
- * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or
- * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByManagementGroupWithResponse(String managementGroupId,
String filter, Context context) {
- return getByManagementGroupWithResponseAsync(managementGroupId, filter, context).block();
+ final String accept = "application/json";
+ return service.getByManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ managementGroupId, filter, accept, context);
}
- /**
- * Provides the aggregate cost of a management group and all child management groups by current billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public ManagementGroupAggregatedCostResultInner getByManagementGroup(String managementGroupId) {
final String filter = null;
@@ -191,7 +153,7 @@ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String mana
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @param billingPeriodName Billing Period Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -202,63 +164,17 @@ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String mana
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>
getForBillingPeriodByManagementGroupWithResponseAsync(String managementGroupId, String billingPeriodName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (managementGroupId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
- }
- if (billingPeriodName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.getForBillingPeriodByManagementGroup(this.client.getEndpoint(),
- managementGroupId, billingPeriodName, this.client.getApiVersion(), accept, context))
+ this.client.getApiVersion(), managementGroupId, billingPeriodName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Provides the aggregate cost of a management group and all child management groups by specified billing period.
*
- * @param managementGroupId Azure Management Group ID.
- * @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- getForBillingPeriodByManagementGroupWithResponseAsync(String managementGroupId, String billingPeriodName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (managementGroupId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."));
- }
- if (billingPeriodName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getForBillingPeriodByManagementGroup(this.client.getEndpoint(), managementGroupId,
- billingPeriodName, this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Provides the aggregate cost of a management group and all child management groups by specified billing period.
- *
- * @param managementGroupId Azure Management Group ID.
+ * @param managementGroupId Order Id of the reservation.
* @param billingPeriodName Billing Period Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -272,34 +188,16 @@ public ManagementGroupAggregatedCostResultInner getByManagementGroup(String mana
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Provides the aggregate cost of a management group and all child management groups by specified billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getForBillingPeriodByManagementGroupWithResponse(
String managementGroupId, String billingPeriodName, Context context) {
- return getForBillingPeriodByManagementGroupWithResponseAsync(managementGroupId, billingPeriodName, context)
- .block();
+ final String accept = "application/json";
+ return service.getForBillingPeriodByManagementGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ managementGroupId, billingPeriodName, accept, context);
}
- /**
- * Provides the aggregate cost of a management group and all child management groups by specified billing period.
- *
- * @param managementGroupId Azure Management Group ID.
- * @param billingPeriodName Billing Period Name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a management group aggregated cost resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public ManagementGroupAggregatedCostResultInner getForBillingPeriodByManagementGroup(String managementGroupId,
String billingPeriodName) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
index 1171488586a89..762a286df082d 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/AggregatedCostsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -30,12 +30,8 @@ public Response getByManagementGroupWithRes
String filter, Context context) {
Response inner
= this.serviceClient().getByManagementGroupWithResponse(managementGroupId, filter, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
}
public ManagementGroupAggregatedCostResult getByManagementGroup(String managementGroupId) {
@@ -51,12 +47,8 @@ public Response getForBillingPeriodByManage
String managementGroupId, String billingPeriodName, Context context) {
Response inner = this.serviceClient()
.getForBillingPeriodByManagementGroupWithResponse(managementGroupId, billingPeriodName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ManagementGroupAggregatedCostResultImpl(inner.getValue(), this.manager()));
}
public ManagementGroupAggregatedCostResult getForBillingPeriodByManagementGroup(String managementGroupId,
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
index 2f73babf5e6d9..f27921c978c82 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalanceImpl.java
@@ -1,9 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import com.azure.resourcemanager.consumption.models.Balance;
import com.azure.resourcemanager.consumption.models.BalancePropertiesAdjustmentDetailsItem;
@@ -49,6 +50,10 @@ public Map tags() {
}
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String currency() {
return this.innerModel().currency();
}
@@ -101,6 +106,10 @@ public Boolean priceHidden() {
return this.innerModel().priceHidden();
}
+ public BigDecimal overageRefund() {
+ return this.innerModel().overageRefund();
+ }
+
public List newPurchasesDetails() {
List inner = this.innerModel().newPurchasesDetails();
if (inner != null) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
index 4c87e42826552..7e3898eb3ff00 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -53,14 +53,22 @@ public final class BalancesClientImpl implements BalancesClient {
* The interface defining all the services for ConsumptionManagementClientBalances to be used by the proxy service
* to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ConsumptionManagemen")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ConsumptionManagementClientBalances")
public interface BalancesService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByBillingAccount(@HostParam("$host") String endpoint,
+ Mono> getByBillingAccount(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByBillingAccountSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
@HeaderParam("Accept") String accept, Context context);
@@ -68,7 +76,16 @@ Mono> getByBillingAccount(@HostParam("$host") String endp
@Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getForBillingPeriodByBillingAccount(@HostParam("$host") String endpoint,
+ Mono> getForBillingPeriodByBillingAccount(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
+ @PathParam("billingPeriodName") String billingPeriodName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getForBillingPeriodByBillingAccountSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("billingAccountId") String billingAccountId,
@PathParam("billingPeriodName") String billingPeriodName, @HeaderParam("Accept") String accept,
Context context);
@@ -87,14 +104,6 @@ Mono> getForBillingPeriodByBillingAccount(@HostParam("$ho
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByBillingAccountWithResponseAsync(String billingAccountId) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (billingAccountId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.getByBillingAccount(this.client.getEndpoint(), this.client.getApiVersion(),
@@ -102,35 +111,6 @@ private Mono> getByBillingAccountWithResponseAsync(String
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
- * later.
- *
- * @param billingAccountId BillingAccount ID.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByBillingAccountWithResponseAsync(String billingAccountId,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (billingAccountId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByBillingAccount(this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId,
- accept, context);
- }
-
/**
* Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
* later.
@@ -146,32 +126,15 @@ private Mono getByBillingAccountAsync(String billingAccountId) {
return getByBillingAccountWithResponseAsync(billingAccountId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
- * later.
- *
- * @param billingAccountId BillingAccount ID.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
- return getByBillingAccountWithResponseAsync(billingAccountId, context).block();
+ final String accept = "application/json";
+ return service.getByBillingAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), billingAccountId,
+ accept, context);
}
- /**
- * Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or
- * later.
- *
- * @param billingAccountId BillingAccount ID.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billingAccountId.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public BalanceInner getByBillingAccount(String billingAccountId) {
return getByBillingAccountWithResponse(billingAccountId, Context.NONE).getValue();
@@ -192,18 +155,6 @@ public BalanceInner getByBillingAccount(String billingAccountId) {
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(String billingAccountId,
String billingPeriodName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (billingAccountId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
- }
- if (billingPeriodName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.getForBillingPeriodByBillingAccount(this.client.getEndpoint(),
@@ -211,40 +162,6 @@ private Mono> getForBillingPeriodByBillingAccountWithResp
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
- * for May 1, 2014 or later.
- *
- * @param billingAccountId BillingAccount ID.
- * @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getForBillingPeriodByBillingAccountWithResponseAsync(String billingAccountId,
- String billingPeriodName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (billingAccountId == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingAccountId is required and cannot be null."));
- }
- if (billingPeriodName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter billingPeriodName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getForBillingPeriodByBillingAccount(this.client.getEndpoint(), this.client.getApiVersion(),
- billingAccountId, billingPeriodName, accept, context);
- }
-
/**
* Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
* for May 1, 2014 or later.
@@ -263,36 +180,16 @@ private Mono getForBillingPeriodByBillingAccountAsync(String billi
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
- * for May 1, 2014 or later.
- *
- * @param billingAccountId BillingAccount ID.
- * @param billingPeriodName Billing Period Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getForBillingPeriodByBillingAccountWithResponse(String billingAccountId,
String billingPeriodName, Context context) {
- return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName, context)
- .block();
+ final String accept = "application/json";
+ return service.getForBillingPeriodByBillingAccountSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ billingAccountId, billingPeriodName, accept, context);
}
- /**
- * Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only
- * for May 1, 2014 or later.
- *
- * @param billingAccountId BillingAccount ID.
- * @param billingPeriodName Billing Period Name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the balances for a scope by billing period and billingAccountId.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public BalanceInner getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
return getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, Context.NONE)
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
index d9f8e0c14867b..165f17dde75c9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -28,12 +28,8 @@ public BalancesImpl(BalancesClient innerClient,
public Response getByBillingAccountWithResponse(String billingAccountId, Context context) {
Response inner = this.serviceClient().getByBillingAccountWithResponse(billingAccountId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new BalanceImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
}
public Balance getByBillingAccount(String billingAccountId) {
@@ -49,12 +45,8 @@ public Response getForBillingPeriodByBillingAccountWithResponse(String
String billingPeriodName, Context context) {
Response inner = this.serviceClient()
.getForBillingPeriodByBillingAccountWithResponse(billingAccountId, billingPeriodName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new BalanceImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BalanceImpl(inner.getValue(), this.manager()));
}
public Balance getForBillingPeriodByBillingAccount(String billingAccountId, String billingPeriodName) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
index 40db430b39ded..0424d7f82e160 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetImpl.java
@@ -1,9 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
import com.azure.resourcemanager.consumption.models.Budget;
@@ -39,6 +40,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public CategoryType category() {
return this.innerModel().category();
}
@@ -94,11 +99,7 @@ public BudgetImpl withExistingScope(String scope) {
}
public Budget create() {
- this.innerObject = serviceManager.serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
+ return this.create(Context.NONE);
}
public Budget create(Context context) {
@@ -120,11 +121,7 @@ public BudgetImpl update() {
}
public Budget apply() {
- this.innerObject = serviceManager.serviceClient()
- .getBudgets()
- .createOrUpdateWithResponse(scope, budgetName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
+ return this.apply(Context.NONE);
}
public Budget apply(Context context) {
@@ -145,9 +142,7 @@ public Budget apply(Context context) {
}
public Budget refresh() {
- this.innerObject
- = serviceManager.serviceClient().getBudgets().getWithResponse(scope, budgetName, Context.NONE).getValue();
- return this;
+ return this.refresh(Context.NONE);
}
public Budget refresh(Context context) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
index eabb93e397507..8d9f8289ea7a9 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -30,7 +30,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.consumption.fluent.BudgetsClient;
import com.azure.resourcemanager.consumption.fluent.models.BudgetInner;
-import com.azure.resourcemanager.consumption.models.BudgetsListResult;
+import com.azure.resourcemanager.consumption.implementation.models.BudgetsListResult;
import reactor.core.publisher.Mono;
/**
@@ -61,236 +61,94 @@ public final class BudgetsClientImpl implements BudgetsClient {
* The interface defining all the services for ConsumptionManagementClientBudgets to be used by the proxy service to
* perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ConsumptionManagemen")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ConsumptionManagementClientBudgets")
public interface BudgetsService {
@Headers({ "Content-Type: application/json" })
- @Get("/{scope}/providers/Microsoft.Consumption/budgets")
+ @Get("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("budgetName") String budgetName, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
@PathParam("budgetName") String budgetName, @HeaderParam("Accept") String accept, Context context);
- @Headers({ "Content-Type: application/json" })
@Put("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
@ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(@HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
- @PathParam("budgetName") String budgetName, @BodyParam("application/json") BudgetInner parameters,
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("budgetName") String budgetName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BudgetInner parameters,
+ Context context);
+
+ @Put("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("budgetName") String budgetName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BudgetInner parameters,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam("budgetName") String budgetName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "scope", encoded = true) String scope, @PathParam("budgetName") String budgetName,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{scope}/providers/Microsoft.Consumption/budgets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Delete("/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}")
+ @Get("/{scope}/providers/Microsoft.Consumption/budgets")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> delete(@HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
- @PathParam("budgetName") String budgetName, @HeaderParam("Accept") String accept, Context context);
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String scope) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String scope, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String scope) {
- return new PagedFlux<>(() -> listSinglePageAsync(scope), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String scope, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(scope, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String scope) {
- return new PagedIterable<>(listAsync(scope));
- }
-
- /**
- * Lists all budgets for the defined scope.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String scope, Context context) {
- return new PagedIterable<>(listAsync(scope, context));
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
* Gets the budget for the scope by budget name.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -300,19 +158,9 @@ public PagedIterable list(String scope, Context context) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String budgetName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), scope, this.client.getApiVersion(),
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope,
budgetName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -320,56 +168,7 @@ private Mono> getWithResponseAsync(String scope, String bu
/**
* Gets the budget for the scope by budget name.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String scope, String budgetName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept, context);
- }
-
- /**
- * Gets the budget for the scope by budget name.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -381,52 +180,15 @@ private Mono getAsync(String scope, String budgetName) {
return getWithResponseAsync(scope, budgetName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Gets the budget for the scope by budget name.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String scope, String budgetName, Context context) {
- return getWithResponseAsync(scope, budgetName, context).block();
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, budgetName, accept,
+ context);
}
- /**
- * Gets the budget for the scope by budget name.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the budget for the scope by budget name.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public BudgetInner get(String scope, String budgetName) {
return getWithResponse(scope, budgetName, Context.NONE).getValue();
@@ -437,17 +199,7 @@ public BudgetInner get(String scope, String budgetName) {
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -458,25 +210,11 @@ public BudgetInner get(String scope, String budgetName) {
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(String scope, String budgetName,
BudgetInner parameters) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), scope,
- this.client.getApiVersion(), budgetName, parameters, accept, context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ scope, budgetName, contentType, accept, parameters, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -485,65 +223,7 @@ private Mono> createOrUpdateWithResponseAsync(String scope
* concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
* operation.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param parameters Parameters supplied to the Create Budget operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(String scope, String budgetName,
- BudgetInner parameters, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrUpdate(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName,
- parameters, accept, context);
- }
-
- /**
- * The operation to create or update a budget. You can optionally provide an eTag if desired as a form of
- * concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
- * operation.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @param parameters Parameters supplied to the Create Budget operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -557,59 +237,17 @@ private Mono createOrUpdateAsync(String scope, String budgetName, B
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * The operation to create or update a budget. You can optionally provide an eTag if desired as a form of
- * concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
- * operation.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param parameters Parameters supplied to the Create Budget operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(String scope, String budgetName, BudgetInner parameters,
Context context) {
- return createOrUpdateWithResponseAsync(scope, budgetName, parameters, context).block();
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, budgetName,
+ contentType, accept, parameters, context);
}
- /**
- * The operation to create or update a budget. You can optionally provide an eTag if desired as a form of
- * concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put
- * operation.
- *
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param parameters Parameters supplied to the Create Budget operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a budget resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters) {
return createOrUpdateWithResponse(scope, budgetName, parameters, Context.NONE).getValue();
@@ -618,17 +256,7 @@ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner p
/**
* The operation to delete a budget.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -637,135 +265,117 @@ public BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner p
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(String scope, String budgetName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
- final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), scope, this.client.getApiVersion(),
- budgetName, accept, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), scope,
+ budgetName, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* The operation to delete a budget.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param budgetName Budget Name.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteWithResponseAsync(String scope, String budgetName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- if (budgetName == null) {
- return Mono.error(new IllegalArgumentException("Parameter budgetName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), scope, this.client.getApiVersion(), budgetName, accept,
- context);
+ private Mono deleteAsync(String scope, String budgetName) {
+ return deleteWithResponseAsync(scope, budgetName).flatMap(ignored -> Mono.empty());
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String scope, String budgetName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, budgetName, context);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String scope, String budgetName) {
+ deleteWithResponse(scope, budgetName, Context.NONE);
}
/**
- * The operation to delete a budget.
+ * Lists all budgets for the defined scope.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
+ * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String scope, String budgetName) {
- return deleteWithResponseAsync(scope, budgetName).flatMap(ignored -> Mono.empty());
+ private Mono> listSinglePageAsync(String scope) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * The operation to delete a budget.
+ * Lists all budgets for the defined scope.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
- * @param context The context to associate with this operation.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return result of listing budgets as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String scope) {
+ return new PagedFlux<>(() -> listSinglePageAsync(scope), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all budgets for the defined scope.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteWithResponse(String scope, String budgetName, Context context) {
- return deleteWithResponseAsync(scope, budgetName, context).block();
+ private PagedResponse listSinglePage(String scope) {
+ return listSinglePage(scope, Context.NONE);
}
/**
- * The operation to delete a budget.
+ * Lists all budgets for the defined scope.
*
- * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
- * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
- * Management Group scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * invoiceSection scope.
- * @param budgetName Budget Name.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String scope, String budgetName) {
- deleteWithResponse(scope, budgetName, Context.NONE);
+ private PagedResponse listSinglePage(String scope, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String scope) {
+ return list(scope, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String scope, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(scope, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -779,13 +389,6 @@ public void delete(String scope, String budgetName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
@@ -793,6 +396,20 @@ private Mono> listNextSinglePageAsync(String nextLink
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of listing budgets along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ return listNextSinglePage(nextLink, Context.NONE);
+ }
+
/**
* Get the next page of items.
*
@@ -801,21 +418,13 @@ private Mono> listNextSinglePageAsync(String nextLink
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing budgets along with {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return result of listing budgets along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
index f678d67451ff8..a96f9eecf8c69 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BudgetsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -27,24 +27,10 @@ public BudgetsImpl(BudgetsClient innerClient,
this.serviceManager = serviceManager;
}
- public PagedIterable list(String scope) {
- PagedIterable inner = this.serviceClient().list(scope);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(String scope, Context context) {
- PagedIterable inner = this.serviceClient().list(scope, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
- }
-
public Response getWithResponse(String scope, String budgetName, Context context) {
Response inner = this.serviceClient().getWithResponse(scope, budgetName, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new BudgetImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BudgetImpl(inner.getValue(), this.manager()));
}
public Budget get(String scope, String budgetName) {
@@ -61,70 +47,39 @@ public Response deleteByResourceGroupWithResponse(String scope, String bud
}
public void deleteByResourceGroup(String scope, String budgetName) {
- this.serviceClient().delete(scope, budgetName);
+ this.deleteByResourceGroupWithResponse(scope, budgetName, Context.NONE);
+ }
+
+ public PagedIterable list(String scope) {
+ return this.list(scope, Context.NONE);
+ }
+
+ public PagedIterable list(String scope, Context context) {
+ PagedIterable inner = this.serviceClient().list(scope, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BudgetImpl(inner1, this.manager()));
}
public Budget getById(String id) {
- String scope = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
- if (scope == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
- }
- String budgetName = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
- if (budgetName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
- }
- return this.getWithResponse(scope, budgetName, Context.NONE).getValue();
+ return this.getByIdWithResponse(id, Context.NONE).getValue();
}
public Response getByIdWithResponse(String id, Context context) {
- String scope = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
- if (scope == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
- }
- String budgetName = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
- if (budgetName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
- }
+ String scope = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope", "scope", LOGGER);
+ String budgetName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName", "budgets", LOGGER);
return this.getWithResponse(scope, budgetName, context);
}
public void deleteById(String id) {
- String scope = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
- if (scope == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
- }
- String budgetName = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
- if (budgetName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
- }
- this.deleteByResourceGroupWithResponse(scope, budgetName, Context.NONE);
+ this.deleteByIdWithResponse(id, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
- String scope = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope");
- if (scope == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'scope'.", id)));
- }
- String budgetName = ResourceManagerUtils.getValueFromIdByParameterName(id,
- "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName");
- if (budgetName == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'budgets'.", id)));
- }
+ String scope = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "scope", "scope", LOGGER);
+ String budgetName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id,
+ "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", "budgetName", "budgets", LOGGER);
return this.deleteByResourceGroupWithResponse(scope, budgetName, context);
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
index 3cf1f22e7e231..d390df101926c 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -53,15 +53,25 @@ public final class ChargesClientImpl implements ChargesClient {
* The interface defining all the services for ConsumptionManagementClientCharges to be used by the proxy service to
* perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "ConsumptionManagemen")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ConsumptionManagementClientCharges")
public interface ChargesService {
@Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Consumption/charges")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam(value = "scope", encoded = true) String scope, @QueryParam("api-version") String apiVersion,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @QueryParam("startDate") String startDate, @QueryParam("endDate") String endDate,
+ @QueryParam("$filter") String filter, @QueryParam("$apply") String apply,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{scope}/providers/Microsoft.Consumption/charges")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
@QueryParam("startDate") String startDate, @QueryParam("endDate") String endDate,
@QueryParam("$filter") String filter, @QueryParam("$apply") String apply,
@HeaderParam("Accept") String accept, Context context);
@@ -70,21 +80,7 @@ Mono> list(@HostParam("$host") String endpoint,
/**
* Lists the charges based for the defined scope.
*
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param startDate Start date.
* @param endDate End date.
* @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
@@ -101,16 +97,9 @@ Mono> list(@HostParam("$host") String endpoint,
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listWithResponseAsync(String scope, String startDate, String endDate,
String filter, String apply) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(),
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope,
startDate, endDate, filter, apply, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -118,69 +107,7 @@ private Mono> listWithResponseAsync(String scop
/**
* Lists the charges based for the defined scope.
*
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
- * Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String scope, String startDate, String endDate,
- String filter, String apply, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (scope == null) {
- return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), scope, this.client.getApiVersion(), startDate, endDate, filter,
- apply, accept, context);
- }
-
- /**
- * Lists the charges based for the defined scope.
- *
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -196,67 +123,16 @@ private Mono listAsync(String scope) {
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Lists the charges based for the defined scope.
- *
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param startDate Start date.
- * @param endDate End date.
- * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time).
- * The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
- * Tag filter is a key value pair string where key and value is separated by a colon (:).
- * @param apply May be used to group charges for billingAccount scope by properties/billingProfileId,
- * properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by
- * properties/invoiceSectionId.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listWithResponse(String scope, String startDate, String endDate,
String filter, String apply, Context context) {
- return listWithResponseAsync(scope, startDate, endDate, filter, apply, context).block();
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, startDate, endDate,
+ filter, apply, accept, context);
}
- /**
- * Lists the charges based for the defined scope.
- *
- * @param scope The scope associated with charges operations. This includes
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
- * scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
- * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope
- * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at
- * department scope use
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
- * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
- * billingAccount scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * billingProfile scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of listing charge summary.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public ChargesListResultInner list(String scope) {
final String startDate = null;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
index 728351550e33d..928527be8f09a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -30,12 +30,8 @@ public Response listWithResponse(String scope, String startDa
String apply, Context context) {
Response inner
= this.serviceClient().listWithResponse(scope, startDate, endDate, filter, apply, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new ChargesListResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ChargesListResultImpl(inner.getValue(), this.manager()));
}
public ChargesListResult list(String scope) {
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java
index c9abd6d00344d..1563da02846c2 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ChargesListResultImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
index 5679df0a7f0f1..14ab728b29dc5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -20,34 +20,34 @@
@ServiceClientBuilder(serviceClients = { ConsumptionManagementClientImpl.class })
public final class ConsumptionManagementClientBuilder {
/*
- * Azure Subscription ID.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets Azure Subscription ID.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
+ * @param endpoint the endpoint value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public ConsumptionManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
+ * @param subscriptionId the subscriptionId value.
* @return the ConsumptionManagementClientBuilder.
*/
- public ConsumptionManagementClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public ConsumptionManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -132,7 +132,7 @@ public ConsumptionManagementClientImpl buildClient() {
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
ConsumptionManagementClientImpl client = new ConsumptionManagementClientImpl(localPipeline,
- localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
index 01cb2f6b476f1..3ab576add908a 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
+++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ConsumptionManagementClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.consumption.implementation;
@@ -15,12 +15,16 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollResponse;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.consumption.fluent.AggregatedCostsClient;
@@ -56,26 +60,12 @@
@ServiceClient(builder = ConsumptionManagementClientBuilder.class)
public final class ConsumptionManagementClientImpl implements ConsumptionManagementClient {
/**
- * Azure Subscription ID.
- */
- private final String subscriptionId;
-
- /**
- * Gets Azure Subscription ID.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -84,12 +74,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -97,6 +87,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -140,31 +144,31 @@ public Duration getDefaultPollInterval() {
}
/**
- * The UsageDetailsClient object to access its operations.
+ * The OperationsClient object to access its operations.
*/
- private final UsageDetailsClient usageDetails;
+ private final OperationsClient operations;
/**
- * Gets the UsageDetailsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the UsageDetailsClient object.
+ * @return the OperationsClient object.
*/
- public UsageDetailsClient getUsageDetails() {
- return this.usageDetails;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
- * The MarketplacesClient object to access its operations.
+ * The PriceSheetsClient object to access its operations.
*/
- private final MarketplacesClient marketplaces;
+ private final PriceSheetsClient priceSheets;
/**
- * Gets the MarketplacesClient object to access its operations.
+ * Gets the PriceSheetsClient object to access its operations.
*
- * @return the MarketplacesClient object.
+ * @return the PriceSheetsClient object.
*/
- public MarketplacesClient getMarketplaces() {
- return this.marketplaces;
+ public PriceSheetsClient getPriceSheets() {
+ return this.priceSheets;
}
/**
@@ -181,6 +185,48 @@ public BudgetsClient getBudgets() {
return this.budgets;
}
+ /**
+ * The CreditsClient object to access its operations.
+ */
+ private final CreditsClient credits;
+
+ /**
+ * Gets the CreditsClient object to access its operations.
+ *
+ * @return the CreditsClient object.
+ */
+ public CreditsClient getCredits() {
+ return this.credits;
+ }
+
+ /**
+ * The UsageDetailsClient object to access its operations.
+ */
+ private final UsageDetailsClient usageDetails;
+
+ /**
+ * Gets the UsageDetailsClient object to access its operations.
+ *
+ * @return the UsageDetailsClient object.
+ */
+ public UsageDetailsClient getUsageDetails() {
+ return this.usageDetails;
+ }
+
+ /**
+ * The MarketplacesClient object to access its operations.
+ */
+ private final MarketplacesClient marketplaces;
+
+ /**
+ * Gets the MarketplacesClient object to access its operations.
+ *
+ * @return the MarketplacesClient object.
+ */
+ public MarketplacesClient getMarketplaces() {
+ return this.marketplaces;
+ }
+
/**
* The TagsClient object to access its operations.
*/
@@ -293,34 +339,6 @@ public ReservationTransactionsClient getReservationTransactions() {
return this.reservationTransactions;
}
- /**
- * The PriceSheetsClient object to access its operations.
- */
- private final PriceSheetsClient priceSheets;
-
- /**
- * Gets the PriceSheetsClient object to access its operations.
- *
- * @return the PriceSheetsClient object.
- */
- public PriceSheetsClient getPriceSheets() {
- return this.priceSheets;
- }
-
- /**
- * The OperationsClient object to access its operations.
- */
- private final OperationsClient operations;
-
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- public OperationsClient getOperations() {
- return this.operations;
- }
-
/**
* The AggregatedCostsClient object to access its operations.
*/
@@ -363,20 +381,6 @@ public LotsOperationsClient getLotsOperations() {
return this.lotsOperations;
}
- /**
- * The CreditsClient object to access its operations.
- */
- private final CreditsClient credits;
-
- /**
- * Gets the CreditsClient object to access its operations.
- *
- * @return the CreditsClient object.
- */
- public CreditsClient getCredits() {
- return this.credits;
- }
-
/**
* Initializes an instance of ConsumptionManagementClient client.
*
@@ -384,20 +388,23 @@ public CreditsClient getCredits() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId Azure Subscription ID.
- * @param endpoint server parameter.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
ConsumptionManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
- Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-10-01";
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2026-06-01";
+ this.operations = new OperationsClientImpl(this);
+ this.priceSheets = new PriceSheetsClientImpl(this);
+ this.budgets = new BudgetsClientImpl(this);
+ this.credits = new CreditsClientImpl(this);
this.usageDetails = new UsageDetailsClientImpl(this);
this.marketplaces = new MarketplacesClientImpl(this);
- this.budgets = new BudgetsClientImpl(this);
this.tags = new TagsClientImpl(this);
this.charges = new ChargesClientImpl(this);
this.balances = new BalancesClientImpl(this);
@@ -406,12 +413,9 @@ public CreditsClient getCredits() {
this.reservationRecommendations = new ReservationRecommendationsClientImpl(this);
this.reservationRecommendationDetails = new ReservationRecommendationDetailsClientImpl(this);
this.reservationTransactions = new ReservationTransactionsClientImpl(this);
- this.priceSheets = new PriceSheetsClientImpl(this);
- this.operations = new OperationsClientImpl(this);
this.aggregatedCosts = new AggregatedCostsClientImpl(this);
this.eventsOperations = new EventsOperationsClientImpl(this);
this.lotsOperations = new LotsOperationsClientImpl(this);
- this.credits = new CreditsClientImpl(this);
}
/**
@@ -451,6 +455,41 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
+ /**
+ * Waits for completion and gets the final result, or throws an error.
+ *
+ * @param poller the synchronous poller.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result.
+ * @throws ManagementException if the long running operation fails.
+ */
+ public U getLroFinalResultOrError(SyncPoller, U> poller) {
+ PollResponse