diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index f64b70065d1d9..163baf863b6ac 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -293,7 +293,7 @@ com.azure.resourcemanager:azure-resourcemanager-postgresql;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-hdinsight;1.0.0;1.1.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-sqlvirtualmachine;1.0.0-beta.5;1.0.0-beta.6
com.azure.resourcemanager:azure-resourcemanager-relay;1.1.0;1.2.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-costmanagement;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-costmanagement;1.0.0;1.1.0
com.azure.resourcemanager:azure-resourcemanager-recoveryservices;1.9.0;1.10.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-kusto;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-loganalytics;2.2.0;2.3.0-beta.1
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/CHANGELOG.md b/sdk/costmanagement/azure-resourcemanager-costmanagement/CHANGELOG.md
index d7225af287064..75120f1f7f707 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/CHANGELOG.md
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/CHANGELOG.md
@@ -1,14 +1,622 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.1.0 (2026-08-12)
-### Features Added
+- Azure Resource Manager CostManagement client library for Java. This package contains Microsoft Azure SDK for CostManagement Management SDK. CostManagement management client provides access to CostManagement 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.BenefitRecommendationsListResult` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.ViewListResult` was removed
+
+#### `models.BenefitUtilizationSummariesListResult` was removed
+
+#### `models.ScheduledActionListResult` was removed
+
+#### `models.DimensionsListResult` was removed
+
+#### `models.ScheduledActionProxyResource` was removed
+
+#### `models.AlertPropertiesDetails` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastFilter` was modified
+
+* `validate()` was removed
+
+#### `models.ReportConfigSorting` was modified
+
+* `validate()` was removed
+
+#### `models.QueryDatasetConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.BenefitRecommendationProperties` was modified
+
+* `models.BenefitRecommendationProperties withLookBackPeriod(models.LookBackPeriod)` -> `models.BenefitRecommendationProperties withLookBackPeriod(models.LookBackPeriod)`
+* `models.BenefitRecommendationProperties withRecommendationDetails(models.AllSavingsBenefitDetails)` -> `models.BenefitRecommendationProperties withRecommendationDetails(models.AllSavingsBenefitDetails)`
+* `models.BenefitRecommendationProperties withTerm(models.Term)` -> `models.BenefitRecommendationProperties withTerm(models.Term)`
+* `validate()` was removed
+* `models.BenefitRecommendationProperties withUsage(models.RecommendationUsageDetails)` -> `models.BenefitRecommendationProperties withUsage(models.RecommendationUsageDetails)`
+* `models.BenefitRecommendationProperties withCommitmentGranularity(models.Grain)` -> `models.BenefitRecommendationProperties withCommitmentGranularity(models.Grain)`
+
+#### `models.ExportDeliveryInfo` was modified
+
+* `validate()` was removed
+
+#### `models.Status` was modified
+
+* `Status()` was changed to private access
+* `withStatus(models.ReportOperationStatusType)` was removed
+* `validate()` was removed
+
+#### `models.BlobInfo` was modified
+
+* `BlobInfo()` was changed to private access
+* `withBlobLink(java.lang.String)` was removed
+* `validate()` was removed
+* `withByteCount(java.lang.Long)` was removed
+
+#### `models.ReportConfigTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.QueryDataset` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastAggregation` was modified
+
+* `validate()` was removed
+
+#### `models.BenefitResource` was modified
+
+* `models.BenefitResource withKind(models.BenefitKind)` -> `models.BenefitResource withKind(models.BenefitKind)`
+* `validate()` was removed
+
+#### `models.GenerateDetailedCostReportTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `validate()` was removed
+
+#### `models.CostManagementProxyResource` was modified
+
+* `validate()` was removed
+* `models.CostManagementProxyResource withEtag(java.lang.String)` -> `models.CostManagementProxyResource withEtag(java.lang.String)`
+
+#### `models.QueryGrouping` was modified
+
+* `validate()` was removed
+
+#### `models.ReportConfigAggregation` was modified
+
+* `validate()` was removed
+
+#### `models.ReportConfigDataset` was modified
+
+* `validate()` was removed
+
+#### `models.ReportConfigDatasetConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.CostDetailsTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.GenerateDetailedCostReportDefinition` was modified
+
+* `validate()` was removed
+
+#### `models.RecommendationUsageDetails` was modified
+
+* `RecommendationUsageDetails()` was changed to private access
+* `withUsageGrain(models.Grain)` was removed
+* `validate()` was removed
+
+#### `models.QueryDefinition` was modified
+
+* `validate()` was removed
+
+#### `models.SavingsPlanUtilizationSummary` was modified
+
+* `SavingsPlanUtilizationSummary()` was changed to private access
+* `validate()` was removed
+* `withBenefitType(models.BenefitKind)` was removed
+
+#### `models.Exports` was modified
+
+* `executeWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+
+#### `models.ForecastColumn` was modified
+
+* `ForecastColumn()` was changed to private access
+* `withName(java.lang.String)` was removed
+* `validate()` was removed
+* `withType(java.lang.String)` was removed
+
+#### `models.ReportConfigFilter` was modified
+
+* `validate()` was removed
+
+#### `models.BenefitUtilizationSummaryProperties` was modified
+
+* `models.BenefitUtilizationSummaryProperties withBenefitType(models.BenefitKind)` -> `models.BenefitUtilizationSummaryProperties withBenefitType(models.BenefitKind)`
+* `validate()` was removed
+
+#### `models.QueryComparisonExpression` was modified
+
+* `validate()` was removed
+
+#### `models.QueryColumn` was modified
+
+* `QueryColumn()` was changed to private access
+* `validate()` was removed
+* `withName(java.lang.String)` was removed
+* `withType(java.lang.String)` was removed
+
+#### `models.CostManagementResource` was modified
+
+* `withLocation(java.lang.String)` was removed
+* `withTags(java.util.Map)` was removed
+* `models.CostManagementResource withLocation(java.lang.String)` -> `models.CostManagementResource withLocation(java.lang.String)`
+* `validate()` was removed
+* `models.CostManagementResource withTags(java.util.Map)` -> `models.CostManagementResource withTags(java.util.Map)`
+
+#### `CostManagementManager` was modified
+
+* `fluent.CostManagementClient serviceClient()` -> `fluent.CostManagementManagementClient serviceClient()`
+
+#### `models.ForecastTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.SingleScopeBenefitRecommendationProperties` was modified
+
+* `SingleScopeBenefitRecommendationProperties()` was changed to private access
+* `withLookBackPeriod(models.LookBackPeriod)` was removed
+* `withRecommendationDetails(models.AllSavingsBenefitDetails)` was removed
+* `withTerm(models.Term)` was removed
+* `withUsage(models.RecommendationUsageDetails)` was removed
+* `validate()` was removed
+* `withCommitmentGranularity(models.Grain)` was removed
+
+#### `models.ExportSchedule` was modified
+
+* `validate()` was removed
+
+#### `models.PivotProperties` was modified
+
+* `validate()` was removed
+
+#### `models.CheckNameAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DismissAlertPayload` was modified
+
+* `validate()` was removed
+
+#### `models.KpiProperties` was modified
+
+* `validate()` was removed
+
+#### `models.GenerateCostDetailsReportRequestDefinition` was modified
+
+* `validate()` was removed
+
+#### `models.Export` was modified
+
+* `executeWithResponse(com.azure.core.util.Context)` was removed
+
+#### `models.ExportTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastDefinition` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastComparisonExpression` was modified
+
+* `validate()` was removed
+
+#### `models.ExportDatasetConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastDataset` was modified
+
+* `validate()` was removed
+
+#### `models.ExportRecurrencePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.Operation` was modified
+
+* `validate()` was removed
+* `models.Operation withDisplay(models.OperationDisplay)` -> `models.Operation withDisplay(models.OperationDisplay)`
+
+#### `models.PriceSheets` was modified
+
+* `download(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `models.DownloadUrl downloadByBillingProfile(java.lang.String,java.lang.String)` -> `models.PricesheetDownloadProperties downloadByBillingProfile(java.lang.String,java.lang.String)`
+* `download(java.lang.String,java.lang.String,java.lang.String)` was removed
+* `models.DownloadUrl downloadByBillingProfile(java.lang.String,java.lang.String,com.azure.core.util.Context)` -> `models.PricesheetDownloadProperties downloadByBillingProfile(java.lang.String,java.lang.String,com.azure.core.util.Context)`
+
+#### `models.ExportDeliveryDestination` was modified
+
+* `validate()` was removed
+
+#### `models.QueryFilter` was modified
+
+* `validate()` was removed
+
+#### `models.ReportConfigComparisonExpression` was modified
+
+* `validate()` was removed
+
+#### `models.QueryAggregation` was modified
+
+* `validate()` was removed
+
+#### `models.ExportDataset` was modified
+
+* `validate()` was removed
+
+#### `models.ExportDefinition` was modified
+
+* `validate()` was removed
+
+#### `models.AllSavingsList` was modified
+
+* `AllSavingsList()` was changed to private access
+* `validate()` was removed
+
+#### `models.QueryTimePeriod` was modified
+
+* `validate()` was removed
+
+#### `models.ForecastDatasetConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.AllSavingsBenefitDetails` was modified
+
+* `AllSavingsBenefitDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.IncludedQuantityUtilizationSummary` was modified
+
+* `IncludedQuantityUtilizationSummary()` was changed to private access
+* `withBenefitType(models.BenefitKind)` was removed
+* `validate()` was removed
+
+#### `models.SharedScopeBenefitRecommendationProperties` was modified
+
+* `SharedScopeBenefitRecommendationProperties()` was changed to private access
+* `withTerm(models.Term)` was removed
+* `validate()` was removed
+* `withLookBackPeriod(models.LookBackPeriod)` was removed
+* `withCommitmentGranularity(models.Grain)` was removed
+* `withUsage(models.RecommendationUsageDetails)` was removed
+* `withRecommendationDetails(models.AllSavingsBenefitDetails)` was removed
+
+#### `models.ReportConfigGrouping` was modified
+
+* `validate()` was removed
+
+#### `models.ScheduleProperties` was modified
+
+* `validate()` was removed
+
+#### `models.NotificationProperties` was modified
+
+* `validate()` was removed
+
+#### `models.FileDestination` was modified
+
+* `validate()` was removed
+
+#### `models.AlertPropertiesDefinition` was modified
+
+* `validate()` was removed
+
+### Features Added
+
+* `models.Budget$Update` was added
+
+* `models.CostAllocationRuleDetails` was added
+
+* `models.BudgetFilter` was added
+
+* `models.AsyncOperationStatusProperties` was added
+
+* `models.FilterItemNames` was added
+
+* `models.MarkupRules` was added
+
+* `models.CostAllocationRuleCheckNameAvailabilityResponse` was added
+
+* `models.ExportSuspensionContext` was added
+
+* `models.ExportRunRequest` was added
+
+* `models.CostAllocationRuleDefinition` was added
+
+* `models.CompressionModeType` was added
+
+* `models.CostAllocationRuleCheckNameAvailabilityRequest` was added
+
+* `models.CostAllocationResource` was added
+
+* `models.CostAllocationProportion` was added
+
+* `models.BudgetComparisonExpression` was added
+
+* `models.FilterItems` was added
+
+* `models.SourceCostAllocationResource` was added
+
+* `models.SystemAssignedServiceIdentity` was added
+
+* `models.CostAllocationPolicyType` was added
+
+* `models.BudgetOperatorType` was added
+
+* `models.TimeGrainType` was added
+
+* `models.CultureCode` was added
+
+* `models.BudgetTimePeriod` was added
+
+* `models.ManagementGroupScopeBenefitRecommendationProperties` was added
+
+* `models.MarkupRule` was added
+
+* `models.BenefitUtilizationSummariesOperationStatus` was added
+
+* `models.CurrentSpend` was added
+
+* `models.SettingsKind` was added
+
+* `models.TagInheritanceProperties` was added
+
+* `models.Notification` was added
+
+* `models.CustomerMetadata` was added
+
+* `models.BudgetFilterProperties` was added
+
+* `models.BenefitUtilizationSummaryReportSchema` was added
+
+* `models.Budgets` was added
+
+* `models.MCAPriceSheetProperties` was added
+
+* `models.Budget$UpdateStages` was added
+
+* `models.PricesheetDownloadProperties` was added
+
+* `models.BudgetNotificationOperatorType` was added
+
+* `models.CostAllocationRuleProperties` was added
+
+* `models.DestinationType` was added
+
+* `models.TagInheritanceSetting` was added
+
+* `models.MarkupRuleProperties` was added
+
+* `models.Reason` was added
+
+* `models.Setting` was added
+
+* `models.SystemAssignedServiceIdentityType` was added
+
+* `models.ForecastSpend` was added
+
+* `models.Budget$DefinitionStages` was added
+
+* `models.CategoryType` was added
+
+* `models.CostAllocationResourceType` was added
+
+* `models.BenefitUtilizationSummariesRequest` was added
+
+* `models.GenerateBenefitUtilizationSummariesReports` was added
+
+* `models.DataOverwriteBehaviorType` was added
+
+* `models.CostAllocationRules` was added
+
+* `models.RuleStatus` was added
+
+* `models.Settings` was added
+
+* `models.SettingsListResult` was added
+
+* `models.Frequency` was added
+
+* `models.TargetCostAllocationResource` was added
+
+* `models.SettingType` was added
+
+* `models.Budget$Definition` was added
+
+* `models.ThresholdType` was added
+
+* `models.Budget` was added
+
+#### `models.View$Update` was modified
+
+* `withModifiedOn(java.time.OffsetDateTime)` was added
+
+#### `models.View` was modified
+
+* `systemData()` was added
+
+#### `models.GenerateDetailedCostReportOperationResult` was modified
+
+* `systemData()` was added
+
+#### `models.BenefitResource` was modified
+
+* `systemData()` was added
+
+#### `models.View$Definition` was modified
+
+* `withModifiedOn(java.time.OffsetDateTime)` was added
+
+#### `models.CommonExportProperties` was modified
+
+* `systemSuspensionContext()` was added
+* `dataOverwriteBehavior()` was added
+* `exportDescription()` was added
+* `compressionMode()` was added
+
+#### `models.SavingsPlanUtilizationSummary` was modified
+
+* `systemData()` was added
+
+#### `models.Exports` was modified
+
+* `executeWithResponse(java.lang.String,java.lang.String,models.ExportRunRequest,com.azure.core.util.Context)` was added
+
+#### `models.FormatType` was modified
+
+* `PARQUET` was added
+
+#### `models.Export$Definition` was modified
+
+* `withDataOverwriteBehavior(models.DataOverwriteBehaviorType)` was added
+* `withCompressionMode(models.CompressionModeType)` was added
+* `withRegion(java.lang.String)` was added
+* `withIdentity(models.SystemAssignedServiceIdentity)` was added
+* `withExportDescription(java.lang.String)` was added
+* `withRegion(com.azure.core.management.Region)` was added
+
+#### `models.CostManagementResource` was modified
+
+* `tags()` was added
+* `location()` was added
+
+#### `CostManagementManager` was modified
+
+* `costAllocationRules()` was added
+* `generateBenefitUtilizationSummariesReports()` was added
+* `settings()` was added
+* `budgets()` was added
+* `markupRules()` was added
+
+#### `models.Export` was modified
+
+* `location()` was added
+* `compressionMode()` was added
+* `systemData()` was added
+* `exportDescription()` was added
+* `region()` was added
+* `regionName()` was added
+* `executeWithResponse(models.ExportRunRequest,com.azure.core.util.Context)` was added
+* `identity()` was added
+* `dataOverwriteBehavior()` was added
+* `systemSuspensionContext()` was added
+
+#### `models.ExportType` was modified
+
+* `FOCUS_COST` was added
+* `PRICE_SHEET` was added
+* `RESERVATION_RECOMMENDATIONS` was added
+* `RESERVATION_TRANSACTIONS` was added
+* `RESERVATION_DETAILS` was added
+
+#### `models.ExportRun` was modified
+
+* `manifestFile()` was added
+* `startDate()` was added
+* `endDate()` was added
+
+#### `models.ExportRunProperties` was modified
+
+* `startDate()` was added
+* `manifestFile()` was added
+* `endDate()` was added
+
+#### `models.ExportDatasetConfiguration` was modified
+
+* `dataVersion()` was added
+* `withDataVersion(java.lang.String)` was added
+* `filters()` was added
+* `withFilters(java.util.List)` was added
+
+#### `models.BenefitUtilizationSummary` was modified
+
+* `systemData()` was added
+
+#### `models.TimeframeType` was modified
+
+* `THE_CURRENT_MONTH` was added
+
+#### `models.PriceSheets` was modified
+
+* `downloadByInvoice(java.lang.String,java.lang.String,java.lang.String)` was added
+* `downloadByBillingAccount(java.lang.String,java.lang.String)` was added
+* `downloadByInvoice(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `downloadByBillingAccount(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.ExportDeliveryDestination` was modified
+
+* `withType(models.DestinationType)` was added
+* `type()` was added
+
+#### `models.BenefitRecommendationModel` was modified
+
+* `systemData()` was added
+
+#### `models.Export$Update` was modified
+
+* `withIdentity(models.SystemAssignedServiceIdentity)` was added
+* `withCompressionMode(models.CompressionModeType)` was added
+* `withExportDescription(java.lang.String)` was added
+* `withDataOverwriteBehavior(models.DataOverwriteBehaviorType)` was added
+
+#### `models.GranularityType` was modified
+
+* `MONTHLY` was added
+
+#### `models.ScheduledAction$Definition` was modified
+
+* `withEtag(java.lang.String)` was added
+
+#### `models.GenerateDetailedCostReportOperationStatuses` was modified
+
+* `systemData()` was added
+
+#### `models.Alert` was modified
+
+* `systemData()` was added
+
+#### `models.Scope` was modified
+
+* `MANAGEMENT_GROUP` was added
+
+#### `models.IncludedQuantityUtilizationSummary` was modified
+
+* `systemData()` was added
+
+#### `models.ScheduledAction$Update` was modified
-### Other Changes
+* `withEtag(java.lang.String)` was added
## 1.0.0 (2024-12-24)
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/README.md b/sdk/costmanagement/azure-resourcemanager-costmanagement/README.md
index 1f893603120d7..428f8c8cf32ea 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/README.md
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager CostManagement client library for Java.
-This package contains Microsoft Azure SDK for CostManagement Management SDK. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-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 CostManagement Management SDK. CostManagement management client provides access to CostManagement 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-costmanagement
- 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 @@ CostManagementManager manager = CostManagementManager
.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/costmanagement/azure-resourcemanager-costmanagement/SAMPLE.md b/sdk/costmanagement/azure-resourcemanager-costmanagement/SAMPLE.md
index b18be2bbe44ba..793347a2f4ce9 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/SAMPLE.md
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/SAMPLE.md
@@ -19,6 +19,21 @@
- [ListBySavingsPlanId](#benefitutilizationsummaries_listbysavingsplanid)
- [ListBySavingsPlanOrder](#benefitutilizationsummaries_listbysavingsplanorder)
+## Budgets
+
+- [CreateOrUpdate](#budgets_createorupdate)
+- [Delete](#budgets_delete)
+- [Get](#budgets_get)
+- [List](#budgets_list)
+
+## CostAllocationRules
+
+- [CheckNameAvailability](#costallocationrules_checknameavailability)
+- [CreateOrUpdate](#costallocationrules_createorupdate)
+- [Delete](#costallocationrules_delete)
+- [Get](#costallocationrules_get)
+- [List](#costallocationrules_list)
+
## Dimensions
- [ByExternalCloudProviderType](#dimensions_byexternalcloudprovidertype)
@@ -38,6 +53,15 @@
- [ExternalCloudProviderUsage](#forecast_externalcloudproviderusage)
- [Usage](#forecast_usage)
+## GenerateBenefitUtilizationSummariesReport
+
+- [GenerateByBillingAccount](#generatebenefitutilizationsummariesreport_generatebybillingaccount)
+- [GenerateByBillingProfile](#generatebenefitutilizationsummariesreport_generatebybillingprofile)
+- [GenerateByReservationId](#generatebenefitutilizationsummariesreport_generatebyreservationid)
+- [GenerateByReservationOrderId](#generatebenefitutilizationsummariesreport_generatebyreservationorderid)
+- [GenerateBySavingsPlanId](#generatebenefitutilizationsummariesreport_generatebysavingsplanid)
+- [GenerateBySavingsPlanOrderId](#generatebenefitutilizationsummariesreport_generatebysavingsplanorderid)
+
## GenerateCostDetailsReport
- [CreateOperation](#generatecostdetailsreport_createoperation)
@@ -60,14 +84,22 @@
- [ByBillingAccountId](#generatereservationdetailsreport_bybillingaccountid)
- [ByBillingProfileId](#generatereservationdetailsreport_bybillingprofileid)
+## MarkupRules
+
+- [CreateOrUpdate](#markuprules_createorupdate)
+- [Delete](#markuprules_delete)
+- [Get](#markuprules_get)
+- [List](#markuprules_list)
+
## Operations
- [List](#operations_list)
## PriceSheet
-- [Download](#pricesheet_download)
+- [DownloadByBillingAccount](#pricesheet_downloadbybillingaccount)
- [DownloadByBillingProfile](#pricesheet_downloadbybillingprofile)
+- [DownloadByInvoice](#pricesheet_downloadbyinvoice)
## Query
@@ -89,6 +121,13 @@
- [Run](#scheduledactions_run)
- [RunByScope](#scheduledactions_runbyscope)
+## Settings
+
+- [CreateOrUpdateByScope](#settings_createorupdatebyscope)
+- [DeleteByScope](#settings_deletebyscope)
+- [GetByScope](#settings_getbyscope)
+- [List](#settings_list)
+
## Views
- [CreateOrUpdate](#views_createorupdate)
@@ -110,9 +149,7 @@ import com.azure.resourcemanager.costmanagement.models.DismissAlertPayload;
*/
public final class AlertsDismissSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DismissResourceGroupAlerts.json
+ * x-ms-original-file: 2026-06-01/DismissResourceGroupAlerts.json
*/
/**
* Sample code: PatchResourceGroupAlerts.
@@ -129,9 +166,7 @@ public final class AlertsDismissSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DismissSubscriptionAlerts.json
+ * x-ms-original-file: 2026-06-01/DismissSubscriptionAlerts.json
*/
/**
* Sample code: PatchSubscriptionAlerts.
@@ -155,9 +190,7 @@ public final class AlertsDismissSamples {
*/
public final class AlertsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SingleSubscriptionAlert.json
+ * x-ms-original-file: 2026-06-01/SingleSubscriptionAlert.json
*/
/**
* Sample code: SingleSubscriptionAlerts.
@@ -172,9 +205,7 @@ public final class AlertsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SingleResourceGroupAlert.json
+ * x-ms-original-file: 2026-06-01/SingleResourceGroupAlert.json
*/
/**
* Sample code: SingleResourceGroupAlerts.
@@ -198,9 +229,7 @@ public final class AlertsGetSamples {
*/
public final class AlertsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SubscriptionAlerts.json
+ * x-ms-original-file: 2026-06-01/SubscriptionAlerts.json
*/
/**
* Sample code: SubscriptionAlerts.
@@ -213,9 +242,7 @@ public final class AlertsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingProfileAlerts.json
+ * x-ms-original-file: 2026-06-01/BillingProfileAlerts.json
*/
/**
* Sample code: BillingProfileAlerts.
@@ -224,14 +251,12 @@ public final class AlertsListSamples {
*/
public static void billingProfileAlerts(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.alerts()
- .listWithResponse("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579",
+ .listWithResponse("providers/Microsoft.Billing/billingAccounts/12345-6789/billingProfiles/13579",
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ResourceGroupAlerts.json
+ * x-ms-original-file: 2026-06-01/ResourceGroupAlerts.json
*/
/**
* Sample code: ResourceGroupAlerts.
@@ -246,9 +271,7 @@ public final class AlertsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentAlerts.json
+ * x-ms-original-file: 2026-06-01/DepartmentAlerts.json
*/
/**
* Sample code: DepartmentAlerts.
@@ -262,9 +285,7 @@ public final class AlertsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * InvoiceSectionAlerts.json
+ * x-ms-original-file: 2026-06-01/InvoiceSectionAlerts.json
*/
/**
* Sample code: InvoiceSectionAlerts.
@@ -279,9 +300,7 @@ public final class AlertsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountAlerts.json
+ * x-ms-original-file: 2026-06-01/BillingAccountAlerts.json
*/
/**
* Sample code: BillingAccountAlerts.
@@ -290,14 +309,12 @@ public final class AlertsListSamples {
*/
public static void billingAccountAlerts(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.alerts()
- .listWithResponse("providers/Microsoft.Billing/billingAccounts/12345:6789",
+ .listWithResponse("providers/Microsoft.Billing/billingAccounts/12345-6789",
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountAlerts.json
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountAlerts.json
*/
/**
* Sample code: EnrollmentAccountAlerts.
@@ -322,9 +339,7 @@ import com.azure.resourcemanager.costmanagement.models.ExternalCloudProviderType
*/
public final class AlertsListExternalSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalBillingAccountAlerts.json
+ * x-ms-original-file: 2026-06-01/ExternalBillingAccountAlerts.json
*/
/**
* Sample code: ExternalBillingAccountAlerts.
@@ -339,9 +354,7 @@ public final class AlertsListExternalSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalSubscriptionAlerts.json
+ * x-ms-original-file: 2026-06-01/ExternalSubscriptionAlerts.json
*/
/**
* Sample code: ExternalSubscriptionAlerts.
@@ -365,9 +378,23 @@ public final class AlertsListExternalSamples {
*/
public final class BenefitRecommendationsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BenefitRecommendationsByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/BenefitRecommendationsByBillingAccountForManagementGroup.json
+ */
+ /**
+ * Sample code: BenefitRecommendationsManagementGroupList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void benefitRecommendationsManagementGroupList(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.benefitRecommendations()
+ .list("providers/Microsoft.Billing/billingAccounts/123456",
+ "properties/scope eq 'ManagementGroup' AND properties/managementGroupId eq '/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001' AND properties/lookBackPeriod eq 'Last7Days' AND properties/term eq 'P1Y'",
+ null, "properties/usage,properties/allRecommendationDetails", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/BenefitRecommendationsByBillingAccount.json
*/
/**
* Sample code: BenefitRecommendationsBillingAccountList.
@@ -393,9 +420,7 @@ public final class BenefitRecommendationsListSamples {
*/
public final class BenefitUtilizationSummariesListByBillingAccountIdSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json
+ * x-ms-original-file: 2026-06-01/BenefitUtilizationSummaries/SavingsPlan-BillingAccount.json
*/
/**
* Sample code: SavingsPlanUtilizationSummaries-BillingAccount.
@@ -421,9 +446,7 @@ public final class BenefitUtilizationSummariesListByBillingAccountIdSamples {
*/
public final class BenefitUtilizationSummariesListByBillingProfileIdSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json
+ * x-ms-original-file: 2026-06-01/BenefitUtilizationSummaries/SavingsPlan-BillingProfile.json
*/
/**
* Sample code: SavingsPlanUtilizationSummaries-BillingProfile.
@@ -450,9 +473,7 @@ public final class BenefitUtilizationSummariesListByBillingProfileIdSamples {
*/
public final class BenefitUtilizationSummariesListBySavingsPlanIdSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json
+ * x-ms-original-file: 2026-06-01/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanId-Monthly.json
*/
/**
* Sample code: SavingsPlanUtilizationSummariesMonthlyWithSavingsPlanId.
@@ -477,9 +498,7 @@ public final class BenefitUtilizationSummariesListBySavingsPlanIdSamples {
*/
public final class BenefitUtilizationSummariesListBySavingsPlanOrderSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json
+ * x-ms-original-file: 2026-06-01/BenefitUtilizationSummaries/SavingsPlan-SavingsPlanOrderId-Daily.json
*/
/**
* Sample code: SavingsPlanUtilizationSummariesDaily.
@@ -495,402 +514,1187 @@ public final class BenefitUtilizationSummariesListBySavingsPlanOrderSamples {
}
```
-### Dimensions_ByExternalCloudProviderType
+### Budgets_CreateOrUpdate
```java
-import com.azure.resourcemanager.costmanagement.models.ExternalCloudProviderType;
+import com.azure.resourcemanager.costmanagement.models.BudgetComparisonExpression;
+import com.azure.resourcemanager.costmanagement.models.BudgetFilter;
+import com.azure.resourcemanager.costmanagement.models.BudgetFilterProperties;
+import com.azure.resourcemanager.costmanagement.models.BudgetNotificationOperatorType;
+import com.azure.resourcemanager.costmanagement.models.BudgetOperatorType;
+import com.azure.resourcemanager.costmanagement.models.BudgetTimePeriod;
+import com.azure.resourcemanager.costmanagement.models.CategoryType;
+import com.azure.resourcemanager.costmanagement.models.CultureCode;
+import com.azure.resourcemanager.costmanagement.models.Frequency;
+import com.azure.resourcemanager.costmanagement.models.Notification;
+import com.azure.resourcemanager.costmanagement.models.ThresholdType;
+import com.azure.resourcemanager.costmanagement.models.TimeGrainType;
+import java.time.OffsetDateTime;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
/**
- * Samples for Dimensions ByExternalCloudProviderType.
+ * Samples for Budgets CreateOrUpdate.
*/
-public final class DimensionsByExternalCloudProviderTypeSamples {
+public final class BudgetsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalSubscriptionsDimensions.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservationIdFilter.json
*/
/**
- * Sample code: ExternalSubscriptionDimensionList.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingAccountEA-AlertRule-ReservationIdFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- externalSubscriptionDimensionList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .byExternalCloudProviderType(ExternalCloudProviderType.EXTERNAL_SUBSCRIPTIONS, "100", null, null, null,
- null, com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationBillingAccountEAAlertRuleReservationIdFilter(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST7DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservationId")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("00000000-0000-0000-0000-000000000000",
+ "00000000-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000002"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.WEEKLY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalBillingAccountsDimensions.json
+ * x-ms-original-file: 2026-06-01/Budgets/CreateOrUpdate/Cost/CreateOrUpdate-Cost-Subscription-Budget.json
*/
/**
- * Sample code: ExternalBillingAccountDimensionList.
+ * Sample code: CreateOrUpdate-Cost-Subscription-Budget.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- externalBillingAccountDimensionList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .byExternalCloudProviderType(ExternalCloudProviderType.EXTERNAL_BILLING_ACCOUNTS, "100", null, null, null,
- null, com.azure.core.util.Context.NONE);
+ createOrUpdateCostSubscriptionBudget(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestBudget")
+ .withExistingScope("subscriptions/00000000-0000-0000-0000-000000000000")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.COST)
+ .withAmount(100.65D)
+ .withTimeGrain(TimeGrainType.MONTHLY)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2024-10-31T00:00:00Z")))
+ .withFilter(new BudgetFilter().withAnd(Arrays.asList(
+ new BudgetFilterProperties().withDimensions(new BudgetComparisonExpression().withName("ResourceId")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1"))),
+ new BudgetFilterProperties().withTags(new BudgetComparisonExpression().withName("category")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("Dev", "Prod"))),
+ new BudgetFilterProperties().withTags(new BudgetComparisonExpression().withName("department")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("engineering", "sales"))))))
+ .withNotifications(mapOf("Actual_GreaterThan_80_Percent", new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.GREATER_THAN)
+ .withThreshold(80.0)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withContactRoles(Arrays.asList("Contributor", "Reader"))
+ .withContactGroups(Arrays.asList(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup"))
+ .withThresholdType(ThresholdType.ACTUAL)
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
-}
-```
-
-### Dimensions_List
-```java
-/**
- * Samples for Dimensions List.
- */
-public final class DimensionsListSamples {
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCACustomerDimensionsList.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservedResourceTypeFilter.json
*/
/**
- * Sample code: CustomerDimensionsList-MCA.
+ * Sample code: CreateOrUpdate-ReservationUtilization-CustomerCSP-AlertRule-ReservedResourceTypeFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- customerDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", null, null, null, null,
- com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationCustomerCSPAlertRuleReservedResourceTypeFilter(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(
+ new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservedResourceType")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("VirtualMachines", "SqlDatabases", "CosmosDb"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule.json
*/
/**
- * Sample code: DepartmentDimensionsList-Legacy.
+ * Sample code: CreateOrUpdate-ReservationUtilization-CustomerCSP-AlertRule.json.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- departmentDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100/departments/123", null, null, null, null,
- com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationCustomerCSPAlertRuleJson(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter())
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCAInvoiceSectionDimensionsListWithFilter.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservationIdFilter.json
*/
/**
- * Sample code: InvoiceSectionDimensionsListWithFilter-MCA.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingProfileMCA-AlertRule-ReservationIdFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void invoiceSectionDimensionsListWithFilterMCA(
+ public static void createOrUpdateReservationUtilizationBillingProfileMCAAlertRuleReservationIdFilter(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876",
- "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservationId")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("00000000-0000-0000-0000-000000000000",
+ "00000000-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000002"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCACustomerDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule.json
*/
/**
- * Sample code: CustomerDimensionsListWithFilter-MCA.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingProfileMCA-AlertRule.json.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- customerDimensionsListWithFilterMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678",
- "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationBillingProfileMCAAlertRuleJson(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter())
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ManagementGroupDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule.json
*/
/**
- * Sample code: ManagementGroupDimensionsListWithFilter-Legacy.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingAccountEA-AlertRule.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void managementGroupDimensionsListWithFilterLegacy(
+ public static void createOrUpdateReservationUtilizationBillingAccountEAAlertRule(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Management/managementGroups/MyMgId", "properties/category eq 'resourceId'",
- "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST7DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter())
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.WEEKLY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountDimensionsList.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/EA/BillingAccountEA-AlertRule-ReservedResourceTypeFilter
+ * .json
*/
/**
- * Sample code: BillingAccountDimensionsList-Legacy.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingAccountEA-AlertRule-ReservedResourceTypeFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- billingAccountDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100", null, null, null, null,
- com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationBillingAccountEAAlertRuleReservedResourceTypeFilter(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST7DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(
+ new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservedResourceType")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("VirtualMachines", "SqlDatabases", "CosmosDb"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.WEEKLY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ManagementGroupDimensionsListExpandAndTop.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/BillingProfile-AlertRule-ReservedResourceTypeFilter.
+ * json
*/
/**
- * Sample code: ManagementGroupDimensionsListExpandAndTop-Legacy.
+ * Sample code: CreateOrUpdate-ReservationUtilization-BillingProfileMCA-AlertRule-ReservedResourceTypeFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void managementGroupDimensionsListExpandAndTopLegacy(
+ public static void createOrUpdateReservationUtilizationBillingProfileMCAAlertRuleReservedResourceTypeFilter(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Management/managementGroups/MyMgId", null, "properties/data", null, 5,
- com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(
+ new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservedResourceType")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("VirtualMachines", "SqlDatabases", "CosmosDb"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
}
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingProfileDimensionsList.json
+ * 2026-06-01/Budgets/CreateOrUpdate/ReservationUtilization/MCA/Customer-AlertRule-ReservationIdFilter.json
*/
/**
- * Sample code: BillingProfileDimensionsList-MCA.
+ * Sample code: CreateOrUpdate-ReservationUtilization-CustomerCSP-AlertRule-ReservationIdFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- billingProfileDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", null, null, null,
- null, com.azure.core.util.Context.NONE);
+ public static void createOrUpdateReservationUtilizationCustomerCSPAlertRuleReservationIdFilter(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .define("TestAlertRule")
+ .withExistingScope(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444")
+ .withETag("\"1d34d016a593709\"")
+ .withCategory(CategoryType.RESERVATION_UTILIZATION)
+ .withTimeGrain(TimeGrainType.LAST30DAYS)
+ .withTimePeriod(new BudgetTimePeriod().withStartDate(OffsetDateTime.parse("2023-04-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2025-04-01T00:00:00Z")))
+ .withFilter(new BudgetFilter().withDimensions(new BudgetComparisonExpression().withName("ReservationId")
+ .withOperator(BudgetOperatorType.IN)
+ .withValues(Arrays.asList("00000000-0000-0000-0000-000000000000",
+ "00000000-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000002"))))
+ .withNotifications(mapOf("Actual_LessThan_99_Percent",
+ new Notification().withEnabled(true)
+ .withOperator(BudgetNotificationOperatorType.LESS_THAN)
+ .withThreshold(99.0)
+ .withFrequency(Frequency.DAILY)
+ .withContactEmails(Arrays.asList("johndoe@contoso.com", "janesmith@contoso.com"))
+ .withLocale(CultureCode.EN_US)))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
}
+}
+```
+
+### Budgets_Delete
+```java
+/**
+ * Samples for Budgets Delete.
+ */
+public final class BudgetsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/Delete/DeleteBudget.json
*/
/**
- * Sample code: DepartmentDimensionsListExpandAndTop-Legacy.
+ * Sample code: DeleteBudget.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void departmentDimensionsListExpandAndTopLegacy(
- com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100/departments/123", null, "properties/data", null, 5,
+ public static void deleteBudget(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .deleteByResourceGroupWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget",
com.azure.core.util.Context.NONE);
}
+}
+```
+
+### Budgets_Get
+```java
+/**
+ * Samples for Budgets Get.
+ */
+public final class BudgetsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/Get/ReservationUtilization/Get-ReservationUtilization-AlertRule.json
*/
/**
- * Sample code: EnrollmentAccountDimensionsList-Legacy.
+ * Sample code: Get-ReservationUtilization-AlertRule.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- enrollmentAccountDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", null, null, null, null,
- com.azure.core.util.Context.NONE);
+ getReservationUtilizationAlertRule(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .getWithResponse(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/KKKK-LLLL-MMM-NNN",
+ "TestAlertRule", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingAccountDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/Get/Cost/Get-Cost-Budget.json
*/
/**
- * Sample code: BillingAccountDimensionsListExpandAndTop-MCA.
+ * Sample code: Get-Cost-Budget.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void billingAccountDimensionsListExpandAndTopMCA(
- com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789", null, "properties/data", null, 5,
+ public static void getCostBudget(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .getWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestBudget",
com.azure.core.util.Context.NONE);
}
+}
+```
+
+### Budgets_List
+```java
+/**
+ * Samples for Budgets List.
+ */
+public final class BudgetsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/BillingProfileBudgetsList.json
*/
/**
- * Sample code: BillingAccountDimensionsListWithFilter-Legacy.
+ * Sample code: BillingProfileBudgetsList-MCA.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void billingAccountDimensionsListWithFilterLegacy(
+ public static void
+ billingProfileBudgetsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP",
+ null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/CustomerBudgetsList-CategoryTypeFilter.json
+ */
+ /**
+ * Sample code: CustomerBudgetsList-MCA-CSP-CategoryTypeFilter.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void customerBudgetsListMCACSPCategoryTypeFilter(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100", "properties/category eq 'resourceId'",
- "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444",
+ "properties/category eq 'ReservationUtilization'", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ResourceGroupDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/EA/BillingAccountBudgetsList-EA.json
*/
/**
- * Sample code: ResourceGroupDimensionsList-Legacy.
+ * Sample code: BillingAccountBudgetsList-EA.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- resourceGroupDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando", null,
- "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ billingAccountBudgetsListEA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("providers/Microsoft.Billing/billingAccounts/123456", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SubscriptionDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/CustomerBudgetsList.json
*/
/**
- * Sample code: SubscriptionDimensionsList-Legacy.
+ * Sample code: CustomerBudgetsList-MCA-CSP.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- subscriptionDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("subscriptions/00000000-0000-0000-0000-000000000000", null, "properties/data", null, 5,
- com.azure.core.util.Context.NONE);
+ customerBudgetsListMCACSP(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/customers/000000-1111-2222-3333-444444444444",
+ null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/EA/BillingAccountBudgetsList-EA-CategoryTypeFilter.json
*/
/**
- * Sample code: BillingAccountDimensionsListExpandAndTop-Legacy.
+ * Sample code: BillingAccountBudgetsList-EA-CategoryTypeFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void billingAccountDimensionsListExpandAndTopLegacy(
+ public static void billingAccountBudgetsListEACategoryTypeFilter(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100", null, "properties/data", null, 5,
- com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .list("providers/Microsoft.Billing/billingAccounts/123456",
+ "properties/category eq 'ReservationUtilization'", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingAccountDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/RBAC/ManagementGroupBudgetsList.json
*/
/**
- * Sample code: BillingAccountDimensionsList-MCA.
+ * Sample code: ManagementGroupBudgetsList.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- billingAccountDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789", null, null, null, null,
- com.azure.core.util.Context.NONE);
+ managementGroupBudgetsList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("Microsoft.Management/managementGroups/MYDEVTESTMG", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/EA/DepartmentBudgetsList.json
*/
/**
- * Sample code: EnrollmentAccountDimensionsListExpandAndTop-Legacy.
+ * Sample code: DepartmentBudgetsList-EA.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void enrollmentAccountDimensionsListExpandAndTopLegacy(
- com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", null, "properties/data",
- null, 5, com.azure.core.util.Context.NONE);
+ public static void departmentBudgetsListEA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("providers/Microsoft.Billing/billingAccounts/123456/departments/789101", null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCACustomerDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/EA/EnrollmentAccountBudgetsList.json
*/
/**
- * Sample code: CustomerDimensionsListExpandAndTop-MCA.
+ * Sample code: EnrollmentAccountBudgetsList-EA.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- customerDimensionsListExpandAndTopMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", null, "properties/data",
- null, 5, com.azure.core.util.Context.NONE);
+ enrollmentAccountBudgetsListEA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("providers/Microsoft.Billing/billingAccounts/123456/enrollmentAccounts/473845", null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/BillingProfileBudgetsList-CategoryTypeFilter.json
*/
/**
- * Sample code: DepartmentDimensionsListWithFilter-Legacy.
+ * Sample code: BillingProfileBudgetsList-MCA-CategoryTypeFilter.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void departmentDimensionsListWithFilterLegacy(
+ public static void billingProfileBudgetsListMCACategoryTypeFilter(
com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/100/departments/123",
- "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP",
+ "properties/category eq 'ReservationUtilization'", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCAInvoiceSectionDimensionsList.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/BillingAccountBudgetsList-MCA.json
*/
/**
- * Sample code: InvoiceSectionDimensionsList-MCA.
+ * Sample code: BillingAccountBudgetsList-MCA.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- invoiceSectionDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.dimensions()
- .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876",
- null, null, null, null, com.azure.core.util.Context.NONE);
+ billingAccountBudgetsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01",
+ null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCAInvoiceSectionDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/BillingAccountBudgetsList-MCA-CategoryTypeFilter.json
+ */
+ /**
+ * Sample code: BillingAccountBudgetsList-MCA-CategoryTypeFilter.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void billingAccountBudgetsListMCACategoryTypeFilter(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01",
+ "properties/category eq 'ReservationUtilization'", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/Budgets/List/MCA/InvoiceSectionBudgetsList.json
+ */
+ /**
+ * Sample code: InvoiceSectionBudgetsList-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ invoiceSectionBudgetsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list(
+ "providers/Microsoft.Billing/billingAccounts/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee:ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj_2023-04-01/billingProfiles/MYDEVTESTBP/invoiceSections/AAAA-BBBB-CCC-DDD",
+ null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/Budgets/List/RBAC/ResourceGroupBudgetsList.json
+ */
+ /**
+ * Sample code: ResourceGroupBudgetsList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ resourceGroupBudgetsList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG", null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/Budgets/List/RBAC/SubscriptionBudgetsList.json
+ */
+ /**
+ * Sample code: SubscriptionBudgetsList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void subscriptionBudgetsList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.budgets()
+ .list("subscriptions/00000000-0000-0000-0000-000000000000", null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### CostAllocationRules_CheckNameAvailability
+
+```java
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest;
+
+/**
+ * Samples for CostAllocationRules CheckNameAvailability.
+ */
+public final class CostAllocationRulesCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRuleCheckNameAvailability.json
+ */
+ /**
+ * Sample code: CostAllocationRuleCheckNameAvailability.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void costAllocationRuleCheckNameAvailability(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules()
+ .checkNameAvailabilityWithResponse("100",
+ new CostAllocationRuleCheckNameAvailabilityRequest().withName("testRule")
+ .withType("Microsoft.CostManagement/costAllocationRules"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### CostAllocationRules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.costmanagement.fluent.models.CostAllocationRuleDefinitionInner;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationPolicyType;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationProportion;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationResourceType;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRuleDetails;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRuleProperties;
+import com.azure.resourcemanager.costmanagement.models.RuleStatus;
+import com.azure.resourcemanager.costmanagement.models.SourceCostAllocationResource;
+import com.azure.resourcemanager.costmanagement.models.TargetCostAllocationResource;
+import java.util.Arrays;
+
+/**
+ * Samples for CostAllocationRules CreateOrUpdate.
+ */
+public final class CostAllocationRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRuleCreateTag.json
+ */
+ /**
+ * Sample code: CostAllocationRulesCreateTag.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ costAllocationRulesCreateTag(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules()
+ .createOrUpdateWithResponse("100", "testRule",
+ new CostAllocationRuleDefinitionInner().withProperties(new CostAllocationRuleProperties()
+ .withDescription("This is a testRule")
+ .withDetails(new CostAllocationRuleDetails()
+ .withSourceResources(Arrays
+ .asList(new SourceCostAllocationResource().withResourceType(CostAllocationResourceType.TAG)
+ .withName("category")
+ .withValues(Arrays.asList("devops"))))
+ .withTargetResources(Arrays.asList(
+ new TargetCostAllocationResource().withResourceType(CostAllocationResourceType.DIMENSION)
+ .withName("ResourceGroupName")
+ .withValues(Arrays.asList(
+ new CostAllocationProportion().withName("destinationRG").withPercentage(33.33),
+ new CostAllocationProportion().withName("destinationRG2").withPercentage(33.33),
+ new CostAllocationProportion().withName("destinationRG3").withPercentage(33.34)))
+ .withPolicyType(CostAllocationPolicyType.FIXED_PROPORTION))))
+ .withStatus(RuleStatus.ACTIVE)),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRuleCreate.json
+ */
+ /**
+ * Sample code: CostAllocationRulesCreateResourceGroup.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ costAllocationRulesCreateResourceGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules()
+ .createOrUpdateWithResponse("100", "testRule",
+ new CostAllocationRuleDefinitionInner().withProperties(new CostAllocationRuleProperties()
+ .withDescription("This is a testRule")
+ .withDetails(new CostAllocationRuleDetails()
+ .withSourceResources(Arrays.asList(
+ new SourceCostAllocationResource().withResourceType(CostAllocationResourceType.DIMENSION)
+ .withName("ResourceGroupName")
+ .withValues(Arrays.asList("sampleRG", "secondRG"))))
+ .withTargetResources(Arrays.asList(
+ new TargetCostAllocationResource().withResourceType(CostAllocationResourceType.DIMENSION)
+ .withName("ResourceGroupName")
+ .withValues(Arrays.asList(
+ new CostAllocationProportion().withName("destinationRG").withPercentage(45.0),
+ new CostAllocationProportion().withName("destinationRG2").withPercentage(54.0)))
+ .withPolicyType(CostAllocationPolicyType.FIXED_PROPORTION))))
+ .withStatus(RuleStatus.ACTIVE)),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### CostAllocationRules_Delete
+
+```java
+/**
+ * Samples for CostAllocationRules Delete.
+ */
+public final class CostAllocationRulesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRuleDelete.json
+ */
+ /**
+ * Sample code: DeleteCostAllocationRule.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ deleteCostAllocationRule(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules()
+ .deleteByResourceGroupWithResponse("100", "testRule", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### CostAllocationRules_Get
+
+```java
+/**
+ * Samples for CostAllocationRules Get.
+ */
+public final class CostAllocationRulesGetSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRuleGet.json
+ */
+ /**
+ * Sample code: CostAllocationRules.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void costAllocationRules(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules().getWithResponse("100", "testRule", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### CostAllocationRules_List
+
+```java
+/**
+ * Samples for CostAllocationRules List.
+ */
+public final class CostAllocationRulesListSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/CostAllocationRulesList.json
+ */
+ /**
+ * Sample code: CostAllocationRulesList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void costAllocationRulesList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.costAllocationRules().list("100", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Dimensions_ByExternalCloudProviderType
+
+```java
+import com.azure.resourcemanager.costmanagement.models.ExternalCloudProviderType;
+
+/**
+ * Samples for Dimensions ByExternalCloudProviderType.
+ */
+public final class DimensionsByExternalCloudProviderTypeSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/ExternalSubscriptionsDimensions.json
+ */
+ /**
+ * Sample code: ExternalSubscriptionDimensionList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ externalSubscriptionDimensionList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .byExternalCloudProviderType(ExternalCloudProviderType.EXTERNAL_SUBSCRIPTIONS, "100", null, null, null,
+ null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExternalBillingAccountsDimensions.json
+ */
+ /**
+ * Sample code: ExternalBillingAccountDimensionList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ externalBillingAccountDimensionList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .byExternalCloudProviderType(ExternalCloudProviderType.EXTERNAL_BILLING_ACCOUNTS, "100", null, null, null,
+ null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Dimensions_List
+
+```java
+/**
+ * Samples for Dimensions List.
+ */
+public final class DimensionsListSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/MCACustomerDimensionsList.json
+ */
+ /**
+ * Sample code: CustomerDimensionsList-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ customerDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", null, null, null, null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/DepartmentDimensionsList.json
+ */
+ /**
+ * Sample code: DepartmentDimensionsList-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ departmentDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100/departments/123", null, null, null, null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCAInvoiceSectionDimensionsListWithFilter.json
+ */
+ /**
+ * Sample code: InvoiceSectionDimensionsListWithFilter-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void invoiceSectionDimensionsListWithFilterMCA(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876",
+ "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCACustomerDimensionsListWithFilter.json
+ */
+ /**
+ * Sample code: CustomerDimensionsListWithFilter-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ customerDimensionsListWithFilterMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678",
+ "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ManagementGroupDimensionsListWithFilter.json
+ */
+ /**
+ * Sample code: ManagementGroupDimensionsListWithFilter-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void managementGroupDimensionsListWithFilterLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Management/managementGroups/MyMgId", "properties/category eq 'resourceId'",
+ "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/BillingAccountDimensionsList.json
+ */
+ /**
+ * Sample code: BillingAccountDimensionsList-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ billingAccountDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100", null, null, null, null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ManagementGroupDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: ManagementGroupDimensionsListExpandAndTop-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void managementGroupDimensionsListExpandAndTopLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Management/managementGroups/MyMgId", null, "properties/data", null, 5,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCABillingProfileDimensionsList.json
+ */
+ /**
+ * Sample code: BillingProfileDimensionsList-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ billingProfileDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579", null, null, null,
+ null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/DepartmentDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: DepartmentDimensionsListExpandAndTop-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void departmentDimensionsListExpandAndTopLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100/departments/123", null, "properties/data", null, 5,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountDimensionsList.json
+ */
+ /**
+ * Sample code: EnrollmentAccountDimensionsList-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ enrollmentAccountDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", null, null, null, null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCABillingAccountDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: BillingAccountDimensionsListExpandAndTop-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void billingAccountDimensionsListExpandAndTopMCA(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789", null, "properties/data", null, 5,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/BillingAccountDimensionsListWithFilter.json
+ */
+ /**
+ * Sample code: BillingAccountDimensionsListWithFilter-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void billingAccountDimensionsListWithFilterLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100", "properties/category eq 'resourceId'",
+ "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ResourceGroupDimensionsList.json
+ */
+ /**
+ * Sample code: ResourceGroupDimensionsList-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ resourceGroupDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/system.orlando", null,
+ "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/SubscriptionDimensionsList.json
+ */
+ /**
+ * Sample code: SubscriptionDimensionsList-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ subscriptionDimensionsListLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("subscriptions/00000000-0000-0000-0000-000000000000", null, "properties/data", null, 5,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/BillingAccountDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: BillingAccountDimensionsListExpandAndTop-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void billingAccountDimensionsListExpandAndTopLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100", null, "properties/data", null, 5,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCABillingAccountDimensionsList.json
+ */
+ /**
+ * Sample code: BillingAccountDimensionsList-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ billingAccountDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789", null, null, null, null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: EnrollmentAccountDimensionsListExpandAndTop-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void enrollmentAccountDimensionsListExpandAndTopLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", null, "properties/data",
+ null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/DepartmentDimensionsListWithFilter.json
+ */
+ /**
+ * Sample code: DepartmentDimensionsListWithFilter-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void departmentDimensionsListWithFilterLegacy(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/100/departments/123",
+ "properties/category eq 'resourceId'", "properties/data", null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCACustomerDimensionsListExpandAndTop.json
+ */
+ /**
+ * Sample code: CustomerDimensionsListExpandAndTop-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ customerDimensionsListExpandAndTopMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/customers/5678", null, "properties/data",
+ null, 5, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCAInvoiceSectionDimensionsList.json
+ */
+ /**
+ * Sample code: InvoiceSectionDimensionsList-MCA.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ invoiceSectionDimensionsListMCA(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.dimensions()
+ .list("providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/invoiceSections/9876",
+ null, null, null, null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCAInvoiceSectionDimensionsListExpandAndTop.json
*/
/**
* Sample code: InvoiceSectionDimensionsListExpandAndTop-MCA.
@@ -905,9 +1709,7 @@ public final class DimensionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ManagementGroupDimensionsList.json
+ * x-ms-original-file: 2026-06-01/ManagementGroupDimensionsList.json
*/
/**
* Sample code: ManagementGroupDimensionsList-Legacy.
@@ -922,9 +1724,7 @@ public final class DimensionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingProfileDimensionsListExpandAndTop.json
+ * x-ms-original-file: 2026-06-01/MCABillingProfileDimensionsListExpandAndTop.json
*/
/**
* Sample code: BillingProfileDimensionsListExpandAndTop-MCA.
@@ -939,9 +1739,7 @@ public final class DimensionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingProfileDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/MCABillingProfileDimensionsListWithFilter.json
*/
/**
* Sample code: BillingProfileDimensionsListWithFilter-MCA.
@@ -956,9 +1754,7 @@ public final class DimensionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountDimensionsListWithFilter.json
*/
/**
* Sample code: EnrollmentAccountDimensionsListWithFilter-Legacy.
@@ -973,9 +1769,7 @@ public final class DimensionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingAccountDimensionsListWithFilter.json
+ * x-ms-original-file: 2026-06-01/MCABillingAccountDimensionsListWithFilter.json
*/
/**
* Sample code: BillingAccountDimensionsListWithFilter-MCA.
@@ -994,6 +1788,9 @@ public final class DimensionsListSamples {
### Exports_CreateOrUpdate
```java
+import com.azure.resourcemanager.costmanagement.models.CompressionModeType;
+import com.azure.resourcemanager.costmanagement.models.DataOverwriteBehaviorType;
+import com.azure.resourcemanager.costmanagement.models.DestinationType;
import com.azure.resourcemanager.costmanagement.models.ExportDataset;
import com.azure.resourcemanager.costmanagement.models.ExportDatasetConfiguration;
import com.azure.resourcemanager.costmanagement.models.ExportDefinition;
@@ -1001,188 +1798,458 @@ import com.azure.resourcemanager.costmanagement.models.ExportDeliveryDestination
import com.azure.resourcemanager.costmanagement.models.ExportDeliveryInfo;
import com.azure.resourcemanager.costmanagement.models.ExportRecurrencePeriod;
import com.azure.resourcemanager.costmanagement.models.ExportSchedule;
+import com.azure.resourcemanager.costmanagement.models.ExportTimePeriod;
import com.azure.resourcemanager.costmanagement.models.ExportType;
+import com.azure.resourcemanager.costmanagement.models.FilterItemNames;
+import com.azure.resourcemanager.costmanagement.models.FilterItems;
import com.azure.resourcemanager.costmanagement.models.FormatType;
import com.azure.resourcemanager.costmanagement.models.GranularityType;
import com.azure.resourcemanager.costmanagement.models.RecurrenceType;
import com.azure.resourcemanager.costmanagement.models.StatusType;
+import com.azure.resourcemanager.costmanagement.models.SystemAssignedServiceIdentity;
+import com.azure.resourcemanager.costmanagement.models.SystemAssignedServiceIdentityType;
import com.azure.resourcemanager.costmanagement.models.TimeframeType;
import java.time.OffsetDateTime;
import java.util.Arrays;
-/**
- * Samples for Exports CreateOrUpdate.
- */
-public final class ExportsCreateOrUpdateSamples {
+/**
+ * Samples for Exports CreateOrUpdate.
+ */
+public final class ExportsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByManagementGroup.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateByManagementGroup.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ exportCreateOrUpdateByManagementGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Management/managementGroups/TestMG")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
+ .withRecurrence(RecurrenceType.DAILY)
+ .withRecurrencePeriod(
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
+ .withFormat(FormatType.CSV)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
+ .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountReservationDetails.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateByBillingAccountReservationDetails.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void exportCreateOrUpdateByBillingAccountReservationDetails(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
+ .withRecurrence(RecurrenceType.DAILY)
+ .withRecurrencePeriod(
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2023-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2023-06-30T00:00:00Z"))))
+ .withFormat(FormatType.CSV)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(new ExportDefinition().withType(ExportType.RESERVATION_DETAILS)
+ .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-03-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccount.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateByBillingAccount.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ exportCreateOrUpdateByBillingAccount(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
+ .withRecurrence(RecurrenceType.DAILY)
+ .withRecurrencePeriod(
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
+ .withFormat(FormatType.CSV)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
+ .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByDepartment.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateByDepartment.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ exportCreateOrUpdateByDepartment(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/12/departments/1234")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
+ .withRecurrence(RecurrenceType.DAILY)
+ .withRecurrencePeriod(
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
+ .withFormat(FormatType.PARQUET)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
+ .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.SNAPPY)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByResourceGroup.json
*/
/**
- * Sample code: ExportCreateOrUpdateByManagementGroup.
+ * Sample code: ExportCreateOrUpdateByResourceGroup.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- exportCreateOrUpdateByManagementGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ exportCreateOrUpdateByResourceGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.define("TestExport")
- .withExistingScope("providers/Microsoft.Management/managementGroups/TestMG")
+ .withExistingScope("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.DAILY)
.withRecurrencePeriod(
new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
.withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
.withTimeframe(TimeframeType.MONTH_TO_DATE)
.withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountReservationTransactions.json
*/
/**
- * Sample code: ExportCreateOrUpdateByBillingAccount.
+ * Sample code: ExportCreateOrUpdateExportCreateOrUpdateByBillingAccountReservationTransactionsByBillingAccount.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- exportCreateOrUpdateByBillingAccount(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ public static void exportCreateOrUpdateExportCreateOrUpdateByBillingAccountReservationTransactionsByBillingAccount(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.define("TestExport")
.withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.DAILY)
.withRecurrencePeriod(
- new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2023-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2023-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
- .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
+ .withDefinition(new ExportDefinition().withType(ExportType.RESERVATION_TRANSACTIONS)
.withTimeframe(TimeframeType.MONTH_TO_DATE)
- .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withDataSet(new ExportDataset()
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountReservationRecommendation.json
*/
/**
- * Sample code: ExportCreateOrUpdateByDepartment.
+ * Sample code: ExportCreateOrUpdateByBillingAccountReservationRecommendation.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void exportCreateOrUpdateByBillingAccountReservationRecommendation(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
+ .withRecurrence(RecurrenceType.DAILY)
+ .withRecurrencePeriod(
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2023-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2023-06-30T00:00:00Z"))))
+ .withFormat(FormatType.CSV)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(
+ new ExportDefinition().withType(ExportType.RESERVATION_RECOMMENDATIONS)
+ .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDataSet(new ExportDataset()
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01")
+ .withFilters(Arrays.asList(
+ new FilterItems().withName(FilterItemNames.RESERVATION_SCOPE).withValue("Single"),
+ new FilterItems().withName(FilterItemNames.RESOURCE_TYPE).withValue("VirtualMachines"),
+ new FilterItems().withName(FilterItemNames.LOOK_BACK_PERIOD).withValue("Last7Days"))))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateBySubscription.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateBySubscription.
*
* @param manager Entry point to CostManagementManager.
*/
public static void
- exportCreateOrUpdateByDepartment(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ exportCreateOrUpdateBySubscription(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.define("TestExport")
- .withExistingScope("providers/Microsoft.Billing/billingAccounts/12/departments/1234")
+ .withExistingScope("subscriptions/00000000-0000-0000-0000-000000000000")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.DAILY)
.withRecurrencePeriod(
new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
.withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
.withTimeframe(TimeframeType.MONTH_TO_DATE)
.withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountCustom.json
*/
/**
- * Sample code: ExportCreateOrUpdateByResourceGroup.
+ * Sample code: ExportCreateOrUpdateByBillingAccountCustom.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- exportCreateOrUpdateByResourceGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ public static void exportCreateOrUpdateByBillingAccountCustom(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.define("TestExport")
- .withExistingScope("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withSchedule(new ExportSchedule().withStatus(StatusType.INACTIVE))
+ .withFormat(FormatType.CSV)
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withContainer("exports")
+ .withRootFolderPath("ad-hoc")))
+ .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
+ .withTimeframe(TimeframeType.CUSTOM)
+ .withTimePeriod(new ExportTimePeriod().withFrom(OffsetDateTime.parse("2025-04-03T00:00:00.000Z"))
+ .withTo(OffsetDateTime.parse("2025-04-03T00:00:00.000Z")))
+ .withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountMonthly.json
+ */
+ /**
+ * Sample code: ExportCreateOrUpdateByBillingAccountMonthly.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void exportCreateOrUpdateByBillingAccountMonthly(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .define("TestExport")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.MONTHLY)
.withRecurrencePeriod(
- new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-05T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2030-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
.withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
- .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withTimeframe(TimeframeType.THE_LAST_MONTH)
.withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByBillingAccountPricesheet.json
*/
/**
- * Sample code: ExportCreateOrUpdateBySubscription.
+ * Sample code: ExportCreateOrUpdateByBillingAccountPricesheet.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void
- exportCreateOrUpdateBySubscription(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ public static void exportCreateOrUpdateByBillingAccountPricesheet(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.define("TestExport")
- .withExistingScope("subscriptions/00000000-0000-0000-0000-000000000000")
+ .withExistingScope("providers/Microsoft.Billing/billingAccounts/123456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.DAILY)
.withRecurrencePeriod(
- new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2023-06-01T00:00:00Z"))
+ .withTo(OffsetDateTime.parse("2023-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
- .withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
- .withTimeframe(TimeframeType.MONTH_TO_DATE)
+ .withDefinition(new ExportDefinition().withType(ExportType.PRICE_SHEET)
+ .withTimeframe(TimeframeType.THE_CURRENT_MONTH)
.withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportCreateOrUpdateByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportCreateOrUpdateByEnrollmentAccount.json
*/
/**
* Sample code: ExportCreateOrUpdateByEnrollmentAccount.
@@ -1194,21 +2261,29 @@ public final class ExportsCreateOrUpdateSamples {
manager.exports()
.define("TestExport")
.withExistingScope("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456")
+ .withRegion("centralus")
+ .withIdentity(
+ new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withSchedule(new ExportSchedule().withStatus(StatusType.ACTIVE)
- .withRecurrence(RecurrenceType.WEEKLY)
+ .withRecurrence(RecurrenceType.DAILY)
.withRecurrencePeriod(
new ExportRecurrencePeriod().withFrom(OffsetDateTime.parse("2020-06-01T00:00:00Z"))
- .withTo(OffsetDateTime.parse("2020-10-31T00:00:00Z"))))
+ .withTo(OffsetDateTime.parse("2020-06-30T00:00:00Z"))))
.withFormat(FormatType.CSV)
- .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination().withResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
+ .withDeliveryInfo(new ExportDeliveryInfo().withDestination(new ExportDeliveryDestination()
+ .withType(DestinationType.AZURE_BLOB)
+ .withResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.withContainer("exports")
.withRootFolderPath("ad-hoc")))
.withDefinition(new ExportDefinition().withType(ExportType.ACTUAL_COST)
.withTimeframe(TimeframeType.MONTH_TO_DATE)
.withDataSet(new ExportDataset().withGranularity(GranularityType.DAILY)
- .withConfiguration(new ExportDatasetConfiguration()
- .withColumns(Arrays.asList("Date", "MeterId", "ResourceId", "ResourceLocation", "Quantity")))))
+ .withConfiguration(new ExportDatasetConfiguration().withDataVersion("2023-05-01"))))
+ .withPartitionData(true)
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.OVERWRITE_PREVIOUS_REPORT)
+ .withCompressionMode(CompressionModeType.GZIP)
+ .withExportDescription("This is a test export.")
.create();
}
}
@@ -1222,9 +2297,7 @@ public final class ExportsCreateOrUpdateSamples {
*/
public final class ExportsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteByBillingAccount.json
*/
/**
* Sample code: ExportDeleteByBillingAccount.
@@ -1239,9 +2312,7 @@ public final class ExportsDeleteSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteByManagementGroup.json
*/
/**
* Sample code: ExportDeleteByManagementGroup.
@@ -1256,9 +2327,7 @@ public final class ExportsDeleteSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteByResourceGroup.json
*/
/**
* Sample code: ExportDeleteByResourceGroup.
@@ -1274,9 +2343,7 @@ public final class ExportsDeleteSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteByDepartment.json
*/
/**
* Sample code: ExportDeleteByDepartment.
@@ -1291,9 +2358,7 @@ public final class ExportsDeleteSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteBySubscription.json
*/
/**
* Sample code: ExportDeleteBySubscription.
@@ -1308,9 +2373,7 @@ public final class ExportsDeleteSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportDeleteByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportDeleteByEnrollmentAccount.json
*/
/**
* Sample code: ExportDeleteByEnrollmentAccount.
@@ -1329,14 +2392,13 @@ public final class ExportsDeleteSamples {
### Exports_Execute
```java
+
/**
* Samples for Exports Execute.
*/
public final class ExportsExecuteSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportRunByManagementGroup.json
*/
/**
* Sample code: ExportRunByManagementGroup.
@@ -1346,14 +2408,12 @@ public final class ExportsExecuteSamples {
public static void
exportRunByManagementGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
- .executeWithResponse("providers/Microsoft.Management/managementGroups/TestMG", "TestExport",
+ .executeWithResponse("providers/Microsoft.Management/managementGroups/TestMG", "TestExport", null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportRunByBillingAccount.json
*/
/**
* Sample code: ExportRunByBillingAccount.
@@ -1363,14 +2423,12 @@ public final class ExportsExecuteSamples {
public static void
exportRunByBillingAccount(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
- .executeWithResponse("providers/Microsoft.Billing/billingAccounts/123456", "TestExport",
+ .executeWithResponse("providers/Microsoft.Billing/billingAccounts/123456", "TestExport", null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportRunBySubscription.json
*/
/**
* Sample code: ExportRunBySubscription.
@@ -1379,14 +2437,27 @@ public final class ExportsExecuteSamples {
*/
public static void exportRunBySubscription(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
- .executeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestExport",
+ .executeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", "TestExport", null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportRunByBillingAccountWithOptionalRequestBody.json
+ */
+ /**
+ * Sample code: ExportRunByBillingAccountWithOptionalRequestBody.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void exportRunByBillingAccountWithOptionalRequestBody(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.exports()
+ .executeWithResponse("providers/Microsoft.Billing/billingAccounts/123456", "TestExport", null,
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/ExportRunByDepartment.json
*/
/**
* Sample code: ExportRunByDepartment.
@@ -1395,14 +2466,12 @@ public final class ExportsExecuteSamples {
*/
public static void exportRunByDepartment(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
- .executeWithResponse("providers/Microsoft.Billing/billingAccounts/12/departments/1234", "TestExport",
+ .executeWithResponse("providers/Microsoft.Billing/billingAccounts/12/departments/1234", "TestExport", null,
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportRunByResourceGroup.json
*/
/**
* Sample code: ExportRunByResourceGroup.
@@ -1413,13 +2482,11 @@ public final class ExportsExecuteSamples {
exportRunByResourceGroup(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.executeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG",
- "TestExport", com.azure.core.util.Context.NONE);
+ "TestExport", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportRunByEnrollmentAccount.json
*/
/**
* Sample code: ExportRunByEnrollmentAccount.
@@ -1430,7 +2497,7 @@ public final class ExportsExecuteSamples {
exportRunByEnrollmentAccount(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
manager.exports()
.executeWithResponse("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456", "TestExport",
- com.azure.core.util.Context.NONE);
+ null, com.azure.core.util.Context.NONE);
}
}
```
@@ -1443,9 +2510,7 @@ public final class ExportsExecuteSamples {
*/
public final class ExportsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportGetByEnrollmentAccount.json
*/
/**
* Sample code: ExportGetByEnrollmentAccount.
@@ -1460,9 +2525,7 @@ public final class ExportsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportGetByManagementGroup.json
*/
/**
* Sample code: ExportGetByManagementGroup.
@@ -1477,9 +2540,7 @@ public final class ExportsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportGetByDepartment.json
*/
/**
* Sample code: ExportGetByDepartment.
@@ -1493,9 +2554,7 @@ public final class ExportsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportGetBySubscription.json
*/
/**
* Sample code: ExportGetBySubscription.
@@ -1509,9 +2568,7 @@ public final class ExportsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportGetByBillingAccount.json
*/
/**
* Sample code: ExportGetByBillingAccount.
@@ -1526,9 +2583,7 @@ public final class ExportsGetSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportGetByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportGetByResourceGroup.json
*/
/**
* Sample code: ExportGetByResourceGroup.
@@ -1552,9 +2607,7 @@ public final class ExportsGetSamples {
*/
public final class ExportsGetExecutionHistorySamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetByManagementGroup.json
*/
/**
* Sample code: ExportRunHistoryGetByManagementGroup.
@@ -1569,9 +2622,7 @@ public final class ExportsGetExecutionHistorySamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetBySubscription.json
*/
/**
* Sample code: ExportRunHistoryGetBySubscription.
@@ -1586,9 +2637,7 @@ public final class ExportsGetExecutionHistorySamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetByResourceGroup.json
*/
/**
* Sample code: ExportRunHistoryGetByResourceGroup.
@@ -1604,9 +2653,7 @@ public final class ExportsGetExecutionHistorySamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetByEnrollmentAccount.json
*/
/**
* Sample code: ExportRunHistoryGetByEnrollmentAccount.
@@ -1621,9 +2668,7 @@ public final class ExportsGetExecutionHistorySamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetByBillingAccount.json
*/
/**
* Sample code: ExportRunHistoryGetByBillingAccount.
@@ -1638,9 +2683,7 @@ public final class ExportsGetExecutionHistorySamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportRunHistoryGetByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportRunHistoryGetByDepartment.json
*/
/**
* Sample code: ExportRunHistoryGetByDepartment.
@@ -1664,9 +2707,7 @@ public final class ExportsGetExecutionHistorySamples {
*/
public final class ExportsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ExportsGetByResourceGroup.json
*/
/**
* Sample code: ExportsGetByResourceGroup.
@@ -1681,9 +2722,7 @@ public final class ExportsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetByDepartment.json
+ * x-ms-original-file: 2026-06-01/ExportsGetByDepartment.json
*/
/**
* Sample code: ExportsGetByDepartment.
@@ -1697,9 +2736,7 @@ public final class ExportsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/ExportsGetByBillingAccount.json
*/
/**
* Sample code: ExportsGetByBillingAccount.
@@ -1714,9 +2751,7 @@ public final class ExportsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetByEnrollmentAccount.json
+ * x-ms-original-file: 2026-06-01/ExportsGetByEnrollmentAccount.json
*/
/**
* Sample code: ExportsGetByEnrollmentAccount.
@@ -1731,9 +2766,7 @@ public final class ExportsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetByManagementGroup.json
+ * x-ms-original-file: 2026-06-01/ExportsGetByManagementGroup.json
*/
/**
* Sample code: ExportsGetByManagementGroup.
@@ -1748,9 +2781,7 @@ public final class ExportsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExportsGetBySubscription.json
+ * x-ms-original-file: 2026-06-01/ExportsGetBySubscription.json
*/
/**
* Sample code: ExportsGetBySubscription.
@@ -1792,9 +2823,7 @@ import java.util.Map;
*/
public final class ForecastExternalCloudProviderUsageSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalSubscriptionForecast.json
+ * x-ms-original-file: 2026-06-01/ExternalSubscriptionForecast.json
*/
/**
* Sample code: ExternalSubscriptionForecast.
@@ -1829,9 +2858,7 @@ public final class ForecastExternalCloudProviderUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalBillingAccountForecast.json
+ * x-ms-original-file: 2026-06-01/ExternalBillingAccountForecast.json
*/
/**
* Sample code: ExternalBillingAccountForecast.
@@ -1904,9 +2931,7 @@ import java.util.Map;
*/
public final class ForecastUsageSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ResourceGroupForecast.json
+ * x-ms-original-file: 2026-06-01/ResourceGroupForecast.json
*/
/**
* Sample code: ResourceGroupForecast.
@@ -1943,9 +2968,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountForecast.json
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountForecast.json
*/
/**
* Sample code: EnrollmentAccountForecast.
@@ -1982,9 +3005,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SubscriptionForecast.json
+ * x-ms-original-file: 2026-06-01/SubscriptionForecast.json
*/
/**
* Sample code: SubscriptionForecast.
@@ -2020,9 +3041,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingProfileForecast.json
+ * x-ms-original-file: 2026-06-01/BillingProfileForecast.json
*/
/**
* Sample code: BillingProfileForecast.
@@ -2058,9 +3077,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentForecast.json
+ * x-ms-original-file: 2026-06-01/DepartmentForecast.json
*/
/**
* Sample code: DepartmentForecast.
@@ -2096,9 +3113,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountForecast.json
+ * x-ms-original-file: 2026-06-01/BillingAccountForecast.json
*/
/**
* Sample code: BillingAccountForecast.
@@ -2134,9 +3149,7 @@ public final class ForecastUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * InvoiceSectionForecast.json
+ * x-ms-original-file: 2026-06-01/InvoiceSectionForecast.json
*/
/**
* Sample code: InvoiceSectionForecast.
@@ -2186,6 +3199,202 @@ public final class ForecastUsageSamples {
}
```
+### GenerateBenefitUtilizationSummariesReport_GenerateByBillingAccount
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitKind;
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateByBillingAccount.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateByBillingAccountSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingAccount.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportByBillingAccount.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportByBillingAccount(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateByBillingAccount("8099099",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z"))
+ .withKind(BenefitKind.RESERVATION),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GenerateBenefitUtilizationSummariesReport_GenerateByBillingProfile
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitKind;
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateByBillingProfile.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateByBillingProfileSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByBillingProfile.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportByBillingProfile.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportByBillingProfile(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateByBillingProfile("00000000-0000-0000-0000-000000000000", "CZSFR-SDFXC-DSDF",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z"))
+ .withKind(BenefitKind.RESERVATION),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GenerateBenefitUtilizationSummariesReport_GenerateByReservationId
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateByReservationId.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateByReservationIdSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservation.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportByReservation.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportByReservation(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateByReservationId("00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GenerateBenefitUtilizationSummariesReport_GenerateByReservationOrderId
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateByReservationOrderId.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateByReservationOrderIdSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportByReservationOrder.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportByReservationOrder.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportByReservationOrder(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateByReservationOrderId("00000000-0000-0000-0000-000000000000",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanId
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateBySavingsPlanId.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateBySavingsPlanIdSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlan.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportBySavingsPlan.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportBySavingsPlan(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateBySavingsPlanId("00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GenerateBenefitUtilizationSummariesReport_GenerateBySavingsPlanOrderId
+
+```java
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.Grain;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for GenerateBenefitUtilizationSummariesReport GenerateBySavingsPlanOrderId.
+ */
+public final class GenerateBenefitUtilizationSummariesReportGenerateBySavingsPlanOrderIdSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-06-01/BenefitUtilizationSummaries/Async/GenerateBenefitUtilizationSummariesReportBySavingsPlanOrder.json
+ */
+ /**
+ * Sample code: GenerateUtilizationSummariesReportBySavingsPlanOrder.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void generateUtilizationSummariesReportBySavingsPlanOrder(
+ com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.generateBenefitUtilizationSummariesReports()
+ .generateBySavingsPlanOrderId("00000000-0000-0000-0000-000000000000",
+ new BenefitUtilizationSummariesRequest().withGrain(Grain.DAILY)
+ .withStartDate(OffsetDateTime.parse("2022-06-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-08-31T00:00:00Z")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### GenerateCostDetailsReport_CreateOperation
```java
@@ -2198,9 +3407,7 @@ import com.azure.resourcemanager.costmanagement.models.GenerateCostDetailsReport
*/
public final class GenerateCostDetailsReportCreateOperationSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportBySubscriptionAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportBySubscriptionAndTimePeriod.json
*/
/**
* Sample code: GenerateCostDetailsReportBySubscriptionAndTimePeriod.
@@ -2217,9 +3424,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.json
*/
/**
* Sample code: GenerateCostDetailsReportByEnrollmentAccountsAndTimePeriod.
@@ -2236,9 +3441,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByBillingProfileAndInvoiceId.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportByBillingProfileAndInvoiceId.json
*/
/**
* Sample code: GenerateCostDetailsReportByBillingProfileAndInvoiceId.
@@ -2256,8 +3459,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
/*
* x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json
+ * 2026-06-01/GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.json
*/
/**
* Sample code: GenerateCostDetailsReportByBillingAccountEnterpriseAgreementCustomerAndBillingPeriod.
@@ -2274,9 +3476,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.json
*/
/**
* Sample code: GenerateCostDetailsReportByBillingProfileAndInvoiceIdAndCustomerId.
@@ -2293,9 +3493,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByCustomerAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportByCustomerAndTimePeriod.json
*/
/**
* Sample code: GenerateCostDetailsReportByCustomerAndTimePeriod.
@@ -2312,9 +3510,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateCostDetailsReportByDepartmentsAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateCostDetailsReportByDepartmentsAndTimePeriod.json
*/
/**
* Sample code: GenerateCostDetailsReportByDepartmentsAndTimePeriod.
@@ -2340,9 +3536,7 @@ public final class GenerateCostDetailsReportCreateOperationSamples {
*/
public final class GenerateCostDetailsReportGetOperationResultsSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * CostDetailsOperationResultsBySubscriptionScope.json
+ * x-ms-original-file: 2026-06-01/CostDetailsOperationResultsBySubscriptionScope.json
*/
/**
* Sample code: Get details of the operation result.
@@ -2370,9 +3564,7 @@ import com.azure.resourcemanager.costmanagement.models.GenerateDetailedCostRepor
*/
public final class GenerateDetailedCostReportCreateOperationSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportByBillingProfileAndInvoiceId.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportByBillingProfileAndInvoiceId.json
*/
/**
* Sample code: GenerateDetailedCostReportByBillingProfileAndInvoiceId.
@@ -2389,9 +3581,7 @@ public final class GenerateDetailedCostReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.json
*/
/**
* Sample code: GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod.
@@ -2408,9 +3598,7 @@ public final class GenerateDetailedCostReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.json
*/
/**
* Sample code: GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId.
@@ -2428,9 +3616,7 @@ public final class GenerateDetailedCostReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportBySubscriptionAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportBySubscriptionAndTimePeriod.json
*/
/**
* Sample code: GenerateDetailedCostReportBySubscriptionAndTimePeriod.
@@ -2448,9 +3634,7 @@ public final class GenerateDetailedCostReportCreateOperationSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportByCustomerAndTimePeriod.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportByCustomerAndTimePeriod.json
*/
/**
* Sample code: GenerateDetailedCostReportByCustomerAndTimePeriod.
@@ -2477,9 +3661,7 @@ public final class GenerateDetailedCostReportCreateOperationSamples {
*/
public final class GenerateDetailedCostReportOperationResultsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportOperationResultsBySubscriptionScope.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportOperationResultsBySubscriptionScope.json
*/
/**
* Sample code: Get details of the operation result.
@@ -2503,9 +3685,7 @@ public final class GenerateDetailedCostReportOperationResultsGetSamples {
*/
public final class GenerateDetailedCostReportOperationStatusGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateDetailedCostReportOperationStatusBySubscriptionScope.json
+ * x-ms-original-file: 2026-06-01/GenerateDetailedCostReportOperationStatusBySubscriptionScope.json
*/
/**
* Sample code: Get details of the operation status.
@@ -2529,9 +3709,7 @@ public final class GenerateDetailedCostReportOperationStatusGetSamples {
*/
public final class GenerateReservationDetailsReportByBillingAccountIdSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateReservationDetailsReportByBillingAccount.json
+ * x-ms-original-file: 2026-06-01/GenerateReservationDetailsReportByBillingAccount.json
*/
/**
* Sample code: ReservationDetails.
@@ -2553,9 +3731,7 @@ public final class GenerateReservationDetailsReportByBillingAccountIdSamples {
*/
public final class GenerateReservationDetailsReportByBillingProfileIdSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * GenerateReservationDetailsReportByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/GenerateReservationDetailsReportByBillingProfile.json
*/
/**
* Sample code: ReservationDetails.
@@ -2570,6 +3746,114 @@ public final class GenerateReservationDetailsReportByBillingProfileIdSamples {
}
```
+### MarkupRules_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.costmanagement.fluent.models.MarkupRuleInner;
+import com.azure.resourcemanager.costmanagement.models.CustomerMetadata;
+import com.azure.resourcemanager.costmanagement.models.MarkupRuleProperties;
+import java.time.OffsetDateTime;
+
+/**
+ * Samples for MarkupRules CreateOrUpdate.
+ */
+public final class MarkupRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/MarkupRulesCreateOrUpdate.json
+ */
+ /**
+ * Sample code: MarkupRulesCreateOrUpdate.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ markupRulesCreateOrUpdate(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.markupRules()
+ .createOrUpdateWithResponse("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
+ "cbf78278-f4b8-43d9-8f13-47112da1c63e", "markup-2022",
+ new MarkupRuleInner()
+ .withProperties(new MarkupRuleProperties().withDescription("Markup rule for year 2022")
+ .withPercentage(5.0)
+ .withStartDate(OffsetDateTime.parse("2022-01-01T00:00:00Z"))
+ .withEndDate(OffsetDateTime.parse("2022-12-31T00:00:00Z"))
+ .withCustomerDetails(new CustomerMetadata()
+ .withBillingAccountId(
+ "cff9aa6d-941c-43f2-b6cb-1d2bb34a02b4:780237f3-1aa6-4159-943b-498e0d647dd9")
+ .withBillingProfileId("08eeecee-efb2-40d5-817c-0a254d2e042c"))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### MarkupRules_Delete
+
+```java
+/**
+ * Samples for MarkupRules Delete.
+ */
+public final class MarkupRulesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/MarkupRulesDelete.json
+ */
+ /**
+ * Sample code: MarkupRulesDelete.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void markupRulesDelete(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.markupRules()
+ .deleteWithResponse("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
+ "cbf78278-f4b8-43d9-8f13-47112da1c63e", "markup-2022", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### MarkupRules_Get
+
+```java
+/**
+ * Samples for MarkupRules Get.
+ */
+public final class MarkupRulesGetSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/MarkupRulesGet.json
+ */
+ /**
+ * Sample code: MarkupRulesGet.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void markupRulesGet(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.markupRules()
+ .getWithResponse("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
+ "cbf78278-f4b8-43d9-8f13-47112da1c63e", "markup-2022", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### MarkupRules_List
+
+```java
+/**
+ * Samples for MarkupRules List.
+ */
+public final class MarkupRulesListSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/MarkupRulesList.json
+ */
+ /**
+ * Sample code: MarkupRulesList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void markupRulesList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.markupRules()
+ .list("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
+ "cbf78278-f4b8-43d9-8f13-47112da1c63e", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Operations_List
```java
@@ -2578,9 +3862,7 @@ public final class GenerateReservationDetailsReportByBillingProfileIdSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/OperationList.
- * json
+ * x-ms-original-file: 2026-06-01/OperationList.json
*/
/**
* Sample code: OperationList.
@@ -2593,27 +3875,24 @@ public final class OperationsListSamples {
}
```
-### PriceSheet_Download
+### PriceSheet_DownloadByBillingAccount
```java
/**
- * Samples for PriceSheet Download.
+ * Samples for PriceSheet DownloadByBillingAccount.
*/
-public final class PriceSheetDownloadSamples {
+public final class PriceSheetDownloadByBillingAccountSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * PricesheetDownload.json
+ * x-ms-original-file: 2026-06-01/EAPriceSheetForBillingPeriod.json
*/
/**
- * Sample code: PricesheetDownload.
+ * Sample code: EAPriceSheetForBillingPeriod.
*
* @param manager Entry point to CostManagementManager.
*/
- public static void pricesheetDownload(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.priceSheets()
- .download("7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31",
- "2USN-TPCD-BG7-TGB", "T000940677", com.azure.core.util.Context.NONE);
+ public static void
+ eAPriceSheetForBillingPeriod(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.priceSheets().downloadByBillingAccount("0000000", "202311", com.azure.core.util.Context.NONE);
}
}
```
@@ -2626,9 +3905,7 @@ public final class PriceSheetDownloadSamples {
*/
public final class PriceSheetDownloadByBillingProfileSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * PricesheetDownloadByBillingProfile.json
+ * x-ms-original-file: 2026-06-01/PricesheetDownloadByBillingProfile.json
*/
/**
* Sample code: PricesheetDownloadByBillingProfile.
@@ -2645,6 +3922,29 @@ public final class PriceSheetDownloadByBillingProfileSamples {
}
```
+### PriceSheet_DownloadByInvoice
+
+```java
+/**
+ * Samples for PriceSheet DownloadByInvoice.
+ */
+public final class PriceSheetDownloadByInvoiceSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/PricesheetDownload.json
+ */
+ /**
+ * Sample code: PricesheetDownload.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void pricesheetDownload(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.priceSheets()
+ .downloadByInvoice("7c05a543-80ff-571e-9f98-1063b3b53cf2:99ad03ad-2d1b-4889-a452-090ad407d25f_2019-05-31",
+ "2USN-TPCD-BG7-TGB", "T000940677", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Query_Usage
```java
@@ -2669,9 +3969,7 @@ import java.util.Map;
*/
public final class QueryUsageSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SubscriptionQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/SubscriptionQueryGrouping.json
*/
/**
* Sample code: SubscriptionQueryGrouping-Legacy.
@@ -2693,9 +3991,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountQueryGrouping.json
*/
/**
* Sample code: EnrollmentAccountQueryGrouping-Legacy.
@@ -2717,9 +4013,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentQuery.json
+ * x-ms-original-file: 2026-06-01/DepartmentQuery.json
*/
/**
* Sample code: DepartmentQuery-Legacy.
@@ -2749,9 +4043,29 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingAccountQuery.json
+ * x-ms-original-file: 2026-06-01/BillingAccountQueryGrouping.json
+ */
+ /**
+ * Sample code: BillingAccountQueryGrouping-Legacy.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ billingAccountQueryGroupingLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.queries()
+ .usageWithResponse("providers/Microsoft.Billing/billingAccounts/70664866",
+ new QueryDefinition().withType(ExportType.USAGE)
+ .withTimeframe(TimeframeType.THE_LAST_MONTH)
+ .withDataset(new QueryDataset().withGranularity(GranularityType.fromString("None"))
+ .withAggregation(mapOf("totalCost",
+ new QueryAggregation().withName("PreTaxCost").withFunction(FunctionType.SUM)))
+ .withGrouping(Arrays.asList(
+ new QueryGrouping().withType(QueryColumnType.DIMENSION).withName("ResourceGroup")))),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-06-01/MCABillingAccountQuery.json
*/
/**
* Sample code: BillingAccountQuery-MCA.
@@ -2781,33 +4095,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountQueryGrouping.json
- */
- /**
- * Sample code: BillingAccountQueryGrouping-Legacy.
- *
- * @param manager Entry point to CostManagementManager.
- */
- public static void
- billingAccountQueryGroupingLegacy(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
- manager.queries()
- .usageWithResponse("providers/Microsoft.Billing/billingAccounts/70664866",
- new QueryDefinition().withType(ExportType.USAGE)
- .withTimeframe(TimeframeType.THE_LAST_MONTH)
- .withDataset(new QueryDataset().withGranularity(GranularityType.fromString("None"))
- .withAggregation(mapOf("totalCost",
- new QueryAggregation().withName("PreTaxCost").withFunction(FunctionType.SUM)))
- .withGrouping(Arrays.asList(
- new QueryGrouping().withType(QueryColumnType.DIMENSION).withName("ResourceGroup")))),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * SubscriptionQuery.json
+ * x-ms-original-file: 2026-06-01/SubscriptionQuery.json
*/
/**
* Sample code: SubscriptionQuery-Legacy.
@@ -2837,9 +4125,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingAccountQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/MCABillingAccountQueryGrouping.json
*/
/**
* Sample code: BillingAccountQueryGrouping-MCA.
@@ -2861,9 +4147,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCAInvoiceSectionQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/MCAInvoiceSectionQueryGrouping.json
*/
/**
* Sample code: InvoiceSectionQueryGrouping-MCA.
@@ -2886,9 +4170,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * EnrollmentAccountQuery.json
+ * x-ms-original-file: 2026-06-01/EnrollmentAccountQuery.json
*/
/**
* Sample code: EnrollmentAccountQuery-Legacy.
@@ -2919,9 +4201,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ResourceGroupQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/ResourceGroupQueryGrouping.json
*/
/**
* Sample code: ResourceGroupQueryGrouping-Legacy.
@@ -2944,9 +4224,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * BillingAccountQuery.json
+ * x-ms-original-file: 2026-06-01/BillingAccountQuery.json
*/
/**
* Sample code: BillingAccountQuery-Legacy.
@@ -2977,9 +4255,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingProfileQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/MCABillingProfileQueryGrouping.json
*/
/**
* Sample code: BillingProfileQueryGrouping-MCA.
@@ -3001,9 +4277,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ResourceGroupQuery.json
+ * x-ms-original-file: 2026-06-01/ResourceGroupQuery.json
*/
/**
* Sample code: ResourceGroupQuery-Legacy.
@@ -3035,9 +4309,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCAInvoiceSectionQuery.json
+ * x-ms-original-file: 2026-06-01/MCAInvoiceSectionQuery.json
*/
/**
* Sample code: InvoiceSectionQuery-MCA.
@@ -3068,9 +4340,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCACustomerQuery.json
+ * x-ms-original-file: 2026-06-01/MCACustomerQuery.json
*/
/**
* Sample code: CustomerQuery-MCA.
@@ -3100,9 +4370,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ManagementGroupQuery.json
+ * x-ms-original-file: 2026-06-01/ManagementGroupQuery.json
*/
/**
* Sample code: ManagementGroupQuery-Legacy.
@@ -3133,9 +4401,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * DepartmentQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/DepartmentQueryGrouping.json
*/
/**
* Sample code: DepartmentQueryGrouping-Legacy.
@@ -3157,9 +4423,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCABillingProfileQuery.json
+ * x-ms-original-file: 2026-06-01/MCABillingProfileQuery.json
*/
/**
* Sample code: BillingProfileQuery-MCA.
@@ -3189,9 +4453,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ManagementGroupQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/ManagementGroupQueryGrouping.json
*/
/**
* Sample code: ManagementGroupQueryGrouping-Legacy.
@@ -3213,9 +4475,7 @@ public final class QueryUsageSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * MCACustomerQueryGrouping.json
+ * x-ms-original-file: 2026-06-01/MCACustomerQueryGrouping.json
*/
/**
* Sample code: CustomerQueryGrouping-MCA.
@@ -3269,9 +4529,7 @@ import java.util.Arrays;
*/
public final class QueryUsageByExternalCloudProviderTypeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalSubscriptionsQuery.json
+ * x-ms-original-file: 2026-06-01/ExternalSubscriptionsQuery.json
*/
/**
* Sample code: ExternalSubscriptionsQuery.
@@ -3302,9 +4560,7 @@ public final class QueryUsageByExternalCloudProviderTypeSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ExternalBillingAccountsQuery.json
+ * x-ms-original-file: 2026-06-01/ExternalBillingAccountsQuery.json
*/
/**
* Sample code: ExternalBillingAccountQueryList.
@@ -3346,9 +4602,7 @@ import com.azure.resourcemanager.costmanagement.models.CheckNameAvailabilityRequ
*/
public final class ScheduledActionsCheckNameAvailabilitySamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/checkNameAvailability-private-scheduledAction.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/checkNameAvailability-private-scheduledAction.json
*/
/**
* Sample code: ScheduledActionCheckNameAvailability.
@@ -3374,9 +4628,7 @@ import com.azure.resourcemanager.costmanagement.models.CheckNameAvailabilityRequ
*/
public final class ScheduledActionsCheckNameAvailabilityByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/checkNameAvailability-shared-scheduledAction.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/checkNameAvailability-shared-scheduledAction.json
*/
/**
* Sample code: ScheduledActionCheckNameAvailabilityByScope.
@@ -3413,9 +4665,7 @@ import java.util.Arrays;
*/
public final class ScheduledActionsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-createOrUpdate-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-createOrUpdate-private.json
*/
/**
* Sample code: CreateOrUpdatePrivateScheduledAction.
@@ -3463,9 +4713,7 @@ import java.util.Arrays;
*/
public final class ScheduledActionsCreateOrUpdateByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-createOrUpdate-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-createOrUpdate-shared.json
*/
/**
* Sample code: CreateOrUpdateScheduledActionByScope.
@@ -3495,9 +4743,7 @@ public final class ScheduledActionsCreateOrUpdateByScopeSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-insightAlert-createOrUpdate-shared.json
*/
/**
* Sample code: CreateOrUpdateInsightAlertScheduledActionByScope.
@@ -3532,9 +4778,7 @@ public final class ScheduledActionsCreateOrUpdateByScopeSamples {
*/
public final class ScheduledActionsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-delete-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-delete-private.json
*/
/**
* Sample code: PrivateScheduledActionDelete.
@@ -3556,9 +4800,7 @@ public final class ScheduledActionsDeleteSamples {
*/
public final class ScheduledActionsDeleteByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-delete-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-delete-shared.json
*/
/**
* Sample code: ScheduledActionDeleteByScope.
@@ -3582,9 +4824,7 @@ public final class ScheduledActionsDeleteByScopeSamples {
*/
public final class ScheduledActionsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-get-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-get-private.json
*/
/**
* Sample code: PrivateScheduledAction.
@@ -3605,9 +4845,7 @@ public final class ScheduledActionsGetSamples {
*/
public final class ScheduledActionsGetByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-get-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-get-shared.json
*/
/**
* Sample code: ScheduledActionByScope.
@@ -3630,9 +4868,7 @@ public final class ScheduledActionsGetByScopeSamples {
*/
public final class ScheduledActionsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledActions-listWithFilter-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledActions-listWithFilter-private.json
*/
/**
* Sample code: PrivateScheduledActionsListFilterByViewId.
@@ -3647,9 +4883,7 @@ public final class ScheduledActionsListSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledActions-list-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledActions-list-private.json
*/
/**
* Sample code: PrivateScheduledActionsList.
@@ -3671,9 +4905,7 @@ public final class ScheduledActionsListSamples {
*/
public final class ScheduledActionsListByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledActions-listWithFilter-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledActions-listWithFilter-shared.json
*/
/**
* Sample code: ScheduledActionsListByScopeFilterByViewId.
@@ -3689,9 +4921,7 @@ public final class ScheduledActionsListByScopeSamples {
}
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledActions-list-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledActions-list-shared.json
*/
/**
* Sample code: ScheduledActionsListByScope.
@@ -3714,9 +4944,7 @@ public final class ScheduledActionsListByScopeSamples {
*/
public final class ScheduledActionsRunSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-sendNow-private.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-sendNow-private.json
*/
/**
* Sample code: ScheduledActionSendNow.
@@ -3737,9 +4965,7 @@ public final class ScheduledActionsRunSamples {
*/
public final class ScheduledActionsRunByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * scheduledActions/scheduledAction-sendNow-shared.json
+ * x-ms-original-file: 2026-06-01/scheduledActions/scheduledAction-sendNow-shared.json
*/
/**
* Sample code: ScheduledActionRunByScope.
@@ -3755,6 +4981,108 @@ public final class ScheduledActionsRunByScopeSamples {
}
```
+### Settings_CreateOrUpdateByScope
+
+```java
+import com.azure.resourcemanager.costmanagement.models.SettingType;
+import com.azure.resourcemanager.costmanagement.models.TagInheritanceProperties;
+import com.azure.resourcemanager.costmanagement.models.TagInheritanceSetting;
+
+/**
+ * Samples for Settings CreateOrUpdateByScope.
+ */
+public final class SettingsCreateOrUpdateByScopeSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/settings-createOrUpdate.json
+ */
+ /**
+ * Sample code: CreateOrUpdateSettingByScope.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void
+ createOrUpdateSettingByScope(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.settings()
+ .createOrUpdateByScopeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000",
+ SettingType.TAGINHERITANCE, new TagInheritanceSetting().withProperties(
+ new TagInheritanceProperties().withPreferContainerTags(false)),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Settings_DeleteByScope
+
+```java
+import com.azure.resourcemanager.costmanagement.models.SettingType;
+
+/**
+ * Samples for Settings DeleteByScope.
+ */
+public final class SettingsDeleteByScopeSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/setting-delete.json
+ */
+ /**
+ * Sample code: SettingDeleteByScope.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void settingDeleteByScope(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.settings()
+ .deleteByScopeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", SettingType.TAGINHERITANCE,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Settings_GetByScope
+
+```java
+import com.azure.resourcemanager.costmanagement.models.SettingType;
+
+/**
+ * Samples for Settings GetByScope.
+ */
+public final class SettingsGetByScopeSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/setting-get.json
+ */
+ /**
+ * Sample code: SettingByScope.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void settingByScope(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.settings()
+ .getByScopeWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", SettingType.TAGINHERITANCE,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Settings_List
+
+```java
+/**
+ * Samples for Settings List.
+ */
+public final class SettingsListSamples {
+ /*
+ * x-ms-original-file: 2026-06-01/settingsList.json
+ */
+ /**
+ * Sample code: SettingsList.
+ *
+ * @param manager Entry point to CostManagementManager.
+ */
+ public static void settingsList(com.azure.resourcemanager.costmanagement.CostManagementManager manager) {
+ manager.settings()
+ .listWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Views_CreateOrUpdate
```java
@@ -3783,9 +5111,7 @@ import java.util.Map;
*/
public final class ViewsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * PrivateViewCreateOrUpdate.json
+ * x-ms-original-file: 2026-06-01/PrivateViewCreateOrUpdate.json
*/
/**
* Sample code: CreateOrUpdatePrivateView.
@@ -3861,9 +5187,7 @@ import java.util.Map;
*/
public final class ViewsCreateOrUpdateByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ViewCreateOrUpdateByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ViewCreateOrUpdateByResourceGroup.json
*/
/**
* Sample code: ResourceGroupCreateOrUpdateView.
@@ -3921,9 +5245,7 @@ public final class ViewsCreateOrUpdateByScopeSamples {
*/
public final class ViewsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * PrivateViewDelete.json
+ * x-ms-original-file: 2026-06-01/PrivateViewDelete.json
*/
/**
* Sample code: DeletePrivateView.
@@ -3944,9 +5266,7 @@ public final class ViewsDeleteSamples {
*/
public final class ViewsDeleteByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ViewDeleteByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ViewDeleteByResourceGroup.json
*/
/**
* Sample code: ResourceGroupDeleteView.
@@ -3969,9 +5289,7 @@ public final class ViewsDeleteByScopeSamples {
*/
public final class ViewsGetSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/PrivateView.
- * json
+ * x-ms-original-file: 2026-06-01/PrivateView.json
*/
/**
* Sample code: PrivateView.
@@ -3992,9 +5310,7 @@ public final class ViewsGetSamples {
*/
public final class ViewsGetByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ViewByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ViewByResourceGroup.json
*/
/**
* Sample code: ResourceGroupView.
@@ -4017,9 +5333,7 @@ public final class ViewsGetByScopeSamples {
*/
public final class ViewsListSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * PrivateViewList.json
+ * x-ms-original-file: 2026-06-01/PrivateViewList.json
*/
/**
* Sample code: PrivateViewList.
@@ -4040,9 +5354,7 @@ public final class ViewsListSamples {
*/
public final class ViewsListByScopeSamples {
/*
- * x-ms-original-file:
- * specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-10-01/examples/
- * ViewListByResourceGroup.json
+ * x-ms-original-file: 2026-06-01/ViewListByResourceGroup.json
*/
/**
* Sample code: ResourceGroupViewList.
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
index 9ef18e4a877f8..4c7a4f5c715ef 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
@@ -1,9 +1,9 @@
-
+
4.0.0
com.azure
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-costmanagement
- 1.1.0-beta.1
+ 1.1.0
jar
Microsoft Azure SDK for CostManagement Management
- This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-10.
+ This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement 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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/CostManagementManager.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/CostManagementManager.java
index 5b63cadcb0127..7f67bc8a6b356 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/CostManagementManager.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/CostManagementManager.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.costmanagement;
@@ -22,45 +22,57 @@
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.costmanagement.fluent.CostManagementClient;
+import com.azure.resourcemanager.costmanagement.fluent.CostManagementManagementClient;
import com.azure.resourcemanager.costmanagement.implementation.AlertsImpl;
import com.azure.resourcemanager.costmanagement.implementation.BenefitRecommendationsImpl;
import com.azure.resourcemanager.costmanagement.implementation.BenefitUtilizationSummariesImpl;
-import com.azure.resourcemanager.costmanagement.implementation.CostManagementClientBuilder;
+import com.azure.resourcemanager.costmanagement.implementation.BudgetsImpl;
+import com.azure.resourcemanager.costmanagement.implementation.CostAllocationRulesImpl;
+import com.azure.resourcemanager.costmanagement.implementation.CostManagementManagementClientBuilder;
import com.azure.resourcemanager.costmanagement.implementation.DimensionsImpl;
import com.azure.resourcemanager.costmanagement.implementation.ExportsImpl;
import com.azure.resourcemanager.costmanagement.implementation.ForecastsImpl;
+import com.azure.resourcemanager.costmanagement.implementation.GenerateBenefitUtilizationSummariesReportsImpl;
import com.azure.resourcemanager.costmanagement.implementation.GenerateCostDetailsReportsImpl;
import com.azure.resourcemanager.costmanagement.implementation.GenerateDetailedCostReportOperationResultsImpl;
import com.azure.resourcemanager.costmanagement.implementation.GenerateDetailedCostReportOperationStatusImpl;
import com.azure.resourcemanager.costmanagement.implementation.GenerateDetailedCostReportsImpl;
import com.azure.resourcemanager.costmanagement.implementation.GenerateReservationDetailsReportsImpl;
+import com.azure.resourcemanager.costmanagement.implementation.MarkupRulesImpl;
import com.azure.resourcemanager.costmanagement.implementation.OperationsImpl;
import com.azure.resourcemanager.costmanagement.implementation.PriceSheetsImpl;
import com.azure.resourcemanager.costmanagement.implementation.QueriesImpl;
import com.azure.resourcemanager.costmanagement.implementation.ScheduledActionsImpl;
+import com.azure.resourcemanager.costmanagement.implementation.SettingsImpl;
import com.azure.resourcemanager.costmanagement.implementation.ViewsImpl;
import com.azure.resourcemanager.costmanagement.models.Alerts;
import com.azure.resourcemanager.costmanagement.models.BenefitRecommendations;
import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummaries;
+import com.azure.resourcemanager.costmanagement.models.Budgets;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRules;
import com.azure.resourcemanager.costmanagement.models.Dimensions;
import com.azure.resourcemanager.costmanagement.models.Exports;
import com.azure.resourcemanager.costmanagement.models.Forecasts;
+import com.azure.resourcemanager.costmanagement.models.GenerateBenefitUtilizationSummariesReports;
import com.azure.resourcemanager.costmanagement.models.GenerateCostDetailsReports;
import com.azure.resourcemanager.costmanagement.models.GenerateDetailedCostReportOperationResults;
import com.azure.resourcemanager.costmanagement.models.GenerateDetailedCostReportOperationStatus;
import com.azure.resourcemanager.costmanagement.models.GenerateDetailedCostReports;
import com.azure.resourcemanager.costmanagement.models.GenerateReservationDetailsReports;
+import com.azure.resourcemanager.costmanagement.models.MarkupRules;
import com.azure.resourcemanager.costmanagement.models.Operations;
import com.azure.resourcemanager.costmanagement.models.PriceSheets;
import com.azure.resourcemanager.costmanagement.models.Queries;
import com.azure.resourcemanager.costmanagement.models.ScheduledActions;
+import com.azure.resourcemanager.costmanagement.models.Settings;
import com.azure.resourcemanager.costmanagement.models.Views;
import java.time.Duration;
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;
@@ -69,44 +81,54 @@
* CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions.
*/
public final class CostManagementManager {
+ private GenerateDetailedCostReportOperationStatus generateDetailedCostReportOperationStatus;
+
private Operations operations;
+ private Budgets budgets;
+
+ private Exports exports;
+
+ private GenerateDetailedCostReportOperationResults generateDetailedCostReportOperationResults;
+
private Views views;
private Alerts alerts;
- private Forecasts forecasts;
+ private ScheduledActions scheduledActions;
- private Dimensions dimensions;
+ private Settings settings;
- private Queries queries;
+ private MarkupRules markupRules;
- private GenerateReservationDetailsReports generateReservationDetailsReports;
+ private GenerateCostDetailsReports generateCostDetailsReports;
- private Exports exports;
+ private CostAllocationRules costAllocationRules;
- private GenerateCostDetailsReports generateCostDetailsReports;
+ private BenefitRecommendations benefitRecommendations;
- private GenerateDetailedCostReports generateDetailedCostReports;
+ private BenefitUtilizationSummaries benefitUtilizationSummaries;
- private GenerateDetailedCostReportOperationResults generateDetailedCostReportOperationResults;
+ private GenerateBenefitUtilizationSummariesReports generateBenefitUtilizationSummariesReports;
- private GenerateDetailedCostReportOperationStatus generateDetailedCostReportOperationStatus;
+ private GenerateDetailedCostReports generateDetailedCostReports;
- private PriceSheets priceSheets;
+ private Forecasts forecasts;
- private ScheduledActions scheduledActions;
+ private Dimensions dimensions;
- private BenefitRecommendations benefitRecommendations;
+ private Queries queries;
- private BenefitUtilizationSummaries benefitUtilizationSummaries;
+ private GenerateReservationDetailsReports generateReservationDetailsReports;
- private final CostManagementClient clientObject;
+ private PriceSheets priceSheets;
+
+ private final CostManagementManagementClient clientObject;
private CostManagementManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new CostManagementClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new CostManagementManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.defaultPollInterval(defaultPollInterval)
.buildClient();
@@ -152,6 +174,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-costmanagement.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -259,12 +284,14 @@ public CostManagementManager authenticate(TokenCredential credential, AzureProfi
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.costmanagement")
.append("/")
- .append("1.0.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -310,6 +337,19 @@ public CostManagementManager authenticate(TokenCredential credential, AzureProfi
}
}
+ /**
+ * Gets the resource collection API of GenerateDetailedCostReportOperationStatus.
+ *
+ * @return Resource collection API of GenerateDetailedCostReportOperationStatus.
+ */
+ public GenerateDetailedCostReportOperationStatus generateDetailedCostReportOperationStatus() {
+ if (this.generateDetailedCostReportOperationStatus == null) {
+ this.generateDetailedCostReportOperationStatus = new GenerateDetailedCostReportOperationStatusImpl(
+ clientObject.getGenerateDetailedCostReportOperationStatus(), this);
+ }
+ return generateDetailedCostReportOperationStatus;
+ }
+
/**
* Gets the resource collection API of Operations.
*
@@ -322,6 +362,43 @@ public Operations operations() {
return operations;
}
+ /**
+ * Gets the resource collection API of Budgets. It manages Budget.
+ *
+ * @return Resource collection API of Budgets.
+ */
+ public Budgets budgets() {
+ if (this.budgets == null) {
+ this.budgets = new BudgetsImpl(clientObject.getBudgets(), this);
+ }
+ return budgets;
+ }
+
+ /**
+ * Gets the resource collection API of Exports. It manages Export.
+ *
+ * @return Resource collection API of Exports.
+ */
+ public Exports exports() {
+ if (this.exports == null) {
+ this.exports = new ExportsImpl(clientObject.getExports(), this);
+ }
+ return exports;
+ }
+
+ /**
+ * Gets the resource collection API of GenerateDetailedCostReportOperationResults.
+ *
+ * @return Resource collection API of GenerateDetailedCostReportOperationResults.
+ */
+ public GenerateDetailedCostReportOperationResults generateDetailedCostReportOperationResults() {
+ if (this.generateDetailedCostReportOperationResults == null) {
+ this.generateDetailedCostReportOperationResults = new GenerateDetailedCostReportOperationResultsImpl(
+ clientObject.getGenerateDetailedCostReportOperationResults(), this);
+ }
+ return generateDetailedCostReportOperationResults;
+ }
+
/**
* Gets the resource collection API of Views. It manages View.
*
@@ -347,77 +424,103 @@ public Alerts alerts() {
}
/**
- * Gets the resource collection API of Forecasts.
+ * Gets the resource collection API of ScheduledActions. It manages ScheduledAction.
*
- * @return Resource collection API of Forecasts.
+ * @return Resource collection API of ScheduledActions.
*/
- public Forecasts forecasts() {
- if (this.forecasts == null) {
- this.forecasts = new ForecastsImpl(clientObject.getForecasts(), this);
+ public ScheduledActions scheduledActions() {
+ if (this.scheduledActions == null) {
+ this.scheduledActions = new ScheduledActionsImpl(clientObject.getScheduledActions(), this);
}
- return forecasts;
+ return scheduledActions;
}
/**
- * Gets the resource collection API of Dimensions.
+ * Gets the resource collection API of Settings.
*
- * @return Resource collection API of Dimensions.
+ * @return Resource collection API of Settings.
*/
- public Dimensions dimensions() {
- if (this.dimensions == null) {
- this.dimensions = new DimensionsImpl(clientObject.getDimensions(), this);
+ public Settings settings() {
+ if (this.settings == null) {
+ this.settings = new SettingsImpl(clientObject.getSettings(), this);
}
- return dimensions;
+ return settings;
}
/**
- * Gets the resource collection API of Queries.
+ * Gets the resource collection API of MarkupRules.
*
- * @return Resource collection API of Queries.
+ * @return Resource collection API of MarkupRules.
*/
- public Queries queries() {
- if (this.queries == null) {
- this.queries = new QueriesImpl(clientObject.getQueries(), this);
+ public MarkupRules markupRules() {
+ if (this.markupRules == null) {
+ this.markupRules = new MarkupRulesImpl(clientObject.getMarkupRules(), this);
}
- return queries;
+ return markupRules;
}
/**
- * Gets the resource collection API of GenerateReservationDetailsReports.
+ * Gets the resource collection API of GenerateCostDetailsReports.
*
- * @return Resource collection API of GenerateReservationDetailsReports.
+ * @return Resource collection API of GenerateCostDetailsReports.
*/
- public GenerateReservationDetailsReports generateReservationDetailsReports() {
- if (this.generateReservationDetailsReports == null) {
- this.generateReservationDetailsReports
- = new GenerateReservationDetailsReportsImpl(clientObject.getGenerateReservationDetailsReports(), this);
+ public GenerateCostDetailsReports generateCostDetailsReports() {
+ if (this.generateCostDetailsReports == null) {
+ this.generateCostDetailsReports
+ = new GenerateCostDetailsReportsImpl(clientObject.getGenerateCostDetailsReports(), this);
}
- return generateReservationDetailsReports;
+ return generateCostDetailsReports;
}
/**
- * Gets the resource collection API of Exports. It manages Export.
+ * Gets the resource collection API of CostAllocationRules.
*
- * @return Resource collection API of Exports.
+ * @return Resource collection API of CostAllocationRules.
*/
- public Exports exports() {
- if (this.exports == null) {
- this.exports = new ExportsImpl(clientObject.getExports(), this);
+ public CostAllocationRules costAllocationRules() {
+ if (this.costAllocationRules == null) {
+ this.costAllocationRules = new CostAllocationRulesImpl(clientObject.getCostAllocationRules(), this);
}
- return exports;
+ return costAllocationRules;
}
/**
- * Gets the resource collection API of GenerateCostDetailsReports.
+ * Gets the resource collection API of BenefitRecommendations.
*
- * @return Resource collection API of GenerateCostDetailsReports.
+ * @return Resource collection API of BenefitRecommendations.
*/
- public GenerateCostDetailsReports generateCostDetailsReports() {
- if (this.generateCostDetailsReports == null) {
- this.generateCostDetailsReports
- = new GenerateCostDetailsReportsImpl(clientObject.getGenerateCostDetailsReports(), this);
+ public BenefitRecommendations benefitRecommendations() {
+ if (this.benefitRecommendations == null) {
+ this.benefitRecommendations
+ = new BenefitRecommendationsImpl(clientObject.getBenefitRecommendations(), this);
}
- return generateCostDetailsReports;
+ return benefitRecommendations;
+ }
+
+ /**
+ * Gets the resource collection API of BenefitUtilizationSummaries.
+ *
+ * @return Resource collection API of BenefitUtilizationSummaries.
+ */
+ public BenefitUtilizationSummaries benefitUtilizationSummaries() {
+ if (this.benefitUtilizationSummaries == null) {
+ this.benefitUtilizationSummaries
+ = new BenefitUtilizationSummariesImpl(clientObject.getBenefitUtilizationSummaries(), this);
+ }
+ return benefitUtilizationSummaries;
+ }
+
+ /**
+ * Gets the resource collection API of GenerateBenefitUtilizationSummariesReports.
+ *
+ * @return Resource collection API of GenerateBenefitUtilizationSummariesReports.
+ */
+ public GenerateBenefitUtilizationSummariesReports generateBenefitUtilizationSummariesReports() {
+ if (this.generateBenefitUtilizationSummariesReports == null) {
+ this.generateBenefitUtilizationSummariesReports = new GenerateBenefitUtilizationSummariesReportsImpl(
+ clientObject.getGenerateBenefitUtilizationSummariesReports(), this);
+ }
+ return generateBenefitUtilizationSummariesReports;
}
/**
@@ -434,88 +537,73 @@ public GenerateDetailedCostReports generateDetailedCostReports() {
}
/**
- * Gets the resource collection API of GenerateDetailedCostReportOperationResults.
- *
- * @return Resource collection API of GenerateDetailedCostReportOperationResults.
- */
- public GenerateDetailedCostReportOperationResults generateDetailedCostReportOperationResults() {
- if (this.generateDetailedCostReportOperationResults == null) {
- this.generateDetailedCostReportOperationResults = new GenerateDetailedCostReportOperationResultsImpl(
- clientObject.getGenerateDetailedCostReportOperationResults(), this);
- }
- return generateDetailedCostReportOperationResults;
- }
-
- /**
- * Gets the resource collection API of GenerateDetailedCostReportOperationStatus.
+ * Gets the resource collection API of Forecasts.
*
- * @return Resource collection API of GenerateDetailedCostReportOperationStatus.
+ * @return Resource collection API of Forecasts.
*/
- public GenerateDetailedCostReportOperationStatus generateDetailedCostReportOperationStatus() {
- if (this.generateDetailedCostReportOperationStatus == null) {
- this.generateDetailedCostReportOperationStatus = new GenerateDetailedCostReportOperationStatusImpl(
- clientObject.getGenerateDetailedCostReportOperationStatus(), this);
+ public Forecasts forecasts() {
+ if (this.forecasts == null) {
+ this.forecasts = new ForecastsImpl(clientObject.getForecasts(), this);
}
- return generateDetailedCostReportOperationStatus;
+ return forecasts;
}
/**
- * Gets the resource collection API of PriceSheets.
+ * Gets the resource collection API of Dimensions.
*
- * @return Resource collection API of PriceSheets.
+ * @return Resource collection API of Dimensions.
*/
- public PriceSheets priceSheets() {
- if (this.priceSheets == null) {
- this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
+ public Dimensions dimensions() {
+ if (this.dimensions == null) {
+ this.dimensions = new DimensionsImpl(clientObject.getDimensions(), this);
}
- return priceSheets;
+ return dimensions;
}
/**
- * Gets the resource collection API of ScheduledActions. It manages ScheduledAction.
+ * Gets the resource collection API of Queries.
*
- * @return Resource collection API of ScheduledActions.
+ * @return Resource collection API of Queries.
*/
- public ScheduledActions scheduledActions() {
- if (this.scheduledActions == null) {
- this.scheduledActions = new ScheduledActionsImpl(clientObject.getScheduledActions(), this);
+ public Queries queries() {
+ if (this.queries == null) {
+ this.queries = new QueriesImpl(clientObject.getQueries(), this);
}
- return scheduledActions;
+ return queries;
}
/**
- * Gets the resource collection API of BenefitRecommendations.
+ * Gets the resource collection API of GenerateReservationDetailsReports.
*
- * @return Resource collection API of BenefitRecommendations.
+ * @return Resource collection API of GenerateReservationDetailsReports.
*/
- public BenefitRecommendations benefitRecommendations() {
- if (this.benefitRecommendations == null) {
- this.benefitRecommendations
- = new BenefitRecommendationsImpl(clientObject.getBenefitRecommendations(), this);
+ public GenerateReservationDetailsReports generateReservationDetailsReports() {
+ if (this.generateReservationDetailsReports == null) {
+ this.generateReservationDetailsReports
+ = new GenerateReservationDetailsReportsImpl(clientObject.getGenerateReservationDetailsReports(), this);
}
- return benefitRecommendations;
+ return generateReservationDetailsReports;
}
/**
- * Gets the resource collection API of BenefitUtilizationSummaries.
+ * Gets the resource collection API of PriceSheets.
*
- * @return Resource collection API of BenefitUtilizationSummaries.
+ * @return Resource collection API of PriceSheets.
*/
- public BenefitUtilizationSummaries benefitUtilizationSummaries() {
- if (this.benefitUtilizationSummaries == null) {
- this.benefitUtilizationSummaries
- = new BenefitUtilizationSummariesImpl(clientObject.getBenefitUtilizationSummaries(), this);
+ public PriceSheets priceSheets() {
+ if (this.priceSheets == null) {
+ this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this);
}
- return benefitUtilizationSummaries;
+ return priceSheets;
}
/**
- * Gets wrapped service client CostManagementClient providing direct access to the underlying auto-generated API
- * implementation, based on Azure REST API.
+ * Gets wrapped service client CostManagementManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
*
- * @return Wrapped service client CostManagementClient.
+ * @return Wrapped service client CostManagementManagementClient.
*/
- public CostManagementClient serviceClient() {
+ public CostManagementManagementClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/AlertsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/AlertsClient.java
index cf498e0bea22d..c7c9db6a461d6 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/AlertsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/AlertsClient.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.costmanagement.fluent;
@@ -18,99 +18,64 @@
*/
public interface AlertsClient {
/**
- * Lists the alerts for scope defined.
+ * Gets the alert for the scope by alert ID.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @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 alerts along with {@link Response}.
+ * @return the alert for the scope by alert ID along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(String scope, Context context);
+ Response getWithResponse(String scope, String alertId, Context context);
/**
- * Lists the alerts for scope defined.
+ * Gets the alert for the scope by alert ID.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @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 alerts.
+ * @return the alert for the scope by alert ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertsResultInner list(String scope);
+ AlertInner get(String scope, String alertId);
/**
- * Gets the alert for the scope by alert ID.
+ * Dismisses the specified alert.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
+ * @param parameters Parameters supplied to the Dismiss Alert operation.
* @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 alert for the scope by alert ID along with {@link Response}.
+ * @return an individual alert along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String scope, String alertId, Context context);
+ Response dismissWithResponse(String scope, String alertId, DismissAlertPayload parameters,
+ Context context);
/**
- * Gets the alert for the scope by alert ID.
+ * Dismisses the specified alert.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
+ * @param parameters Parameters supplied to the Dismiss Alert 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 alert for the scope by alert ID.
+ * @return an individual alert.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertInner get(String scope, String alertId);
+ AlertInner dismiss(String scope, String alertId, DismissAlertPayload parameters);
/**
- * Dismisses the specified alert.
+ * Lists the alerts for scope defined.
*
* @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
@@ -123,20 +88,17 @@ public interface AlertsClient {
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert ID.
- * @param parameters Parameters supplied to the Dismiss Alert operation.
* @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 an individual alert along with {@link Response}.
+ * @return result of alerts along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response dismissWithResponse(String scope, String alertId, DismissAlertPayload parameters,
- Context context);
+ Response listWithResponse(String scope, Context context);
/**
- * Dismisses the specified alert.
+ * Lists the alerts for scope defined.
*
* @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
@@ -149,15 +111,13 @@ Response dismissWithResponse(String scope, String alertId, DismissAl
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert ID.
- * @param parameters Parameters supplied to the Dismiss Alert 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 an individual alert.
+ * @return result of alerts.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AlertInner dismiss(String scope, String alertId, DismissAlertPayload parameters);
+ AlertsResultInner list(String scope);
/**
* Lists the Alerts for external cloud provider type defined.
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitRecommendationsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitRecommendationsClient.java
index b30e386dbaebf..e5be7e755d347 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitRecommendationsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitRecommendationsClient.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.costmanagement.fluent;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitUtilizationSummariesClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitUtilizationSummariesClient.java
index f9ef173c12407..c7f03c8d03e18 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitUtilizationSummariesClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BenefitUtilizationSummariesClient.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.costmanagement.fluent;
@@ -19,7 +19,7 @@ public interface BenefitUtilizationSummariesClient {
* Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily'
* and 'Monthly'.
*
- * @param billingAccountId Billing account ID.
+ * @param billingAccountId BillingAccount ID.
* @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.
@@ -32,7 +32,7 @@ public interface BenefitUtilizationSummariesClient {
* Lists savings plan utilization summaries for the enterprise agreement scope. Supported at grain values: 'Daily'
* and 'Monthly'.
*
- * @param billingAccountId Billing account ID.
+ * @param billingAccountId BillingAccount ID.
* @param grainParameter Grain.
* @param filter Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
* @param context The context to associate with this operation.
@@ -48,8 +48,8 @@ PagedIterable listByBillingAccountId(String bill
/**
* Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @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.
@@ -62,8 +62,8 @@ PagedIterable listByBillingProfileId(String bill
/**
* Lists savings plan utilization summaries for billing profile. Supported at grain values: 'Daily' and 'Monthly'.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @param grainParameter Grain.
* @param filter Supports filtering by properties/benefitId, properties/benefitOrderId and properties/usageDate.
* @param context The context to associate with this operation.
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BudgetsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BudgetsClient.java
new file mode 100644
index 0000000000000..35a15e30a4dfb
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/BudgetsClient.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.costmanagement.fluent.models.BudgetInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BudgetsClient.
+ */
+public interface BudgetsClient {
+ /**
+ * Gets the budget for the scope by budget name.
+ *
+ * @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 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 budget for the scope by budget name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String scope, String budgetName, Context context);
+
+ /**
+ * Gets the budget for the scope by budget name.
+ *
+ * @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.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the budget for the scope by budget name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BudgetInner get(String scope, String budgetName);
+
+ /**
+ * 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 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.
+ * @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 a budget resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String scope, String budgetName, BudgetInner parameters,
+ Context 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 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.
+ * @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 a budget resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BudgetInner createOrUpdate(String scope, String budgetName, BudgetInner parameters);
+
+ /**
+ * The operation to delete a budget.
+ *
+ * @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 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String scope, String budgetName, Context context);
+
+ /**
+ * The operation to delete a budget.
+ *
+ * @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.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @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 filter OData filter option. May be used to filter budgets by properties/category. The filter supports 'eq'
+ * only.
+ * @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, String filter, Context context);
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostAllocationRulesClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostAllocationRulesClient.java
new file mode 100644
index 0000000000000..d6943e8d72510
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostAllocationRulesClient.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.costmanagement.fluent.models.CostAllocationRuleCheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.costmanagement.fluent.models.CostAllocationRuleDefinitionInner;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRuleCheckNameAvailabilityRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in CostAllocationRulesClient.
+ */
+public interface CostAllocationRulesClient {
+ /**
+ * Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @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 a cost allocation rule by rule name and billing account or enterprise enrollment along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountId, String ruleName,
+ Context context);
+
+ /**
+ * Get a cost allocation rule by rule name and billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @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 a cost allocation rule by rule name and billing account or enterprise enrollment.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CostAllocationRuleDefinitionInner get(String billingAccountId, String ruleName);
+
+ /**
+ * Create/Update a rule to allocate cost between different resources within a billing account or enterprise
+ * enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @param costAllocationRule Cost allocation rule to be created or updated.
+ * @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 cost allocation rule model definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String billingAccountId, String ruleName,
+ CostAllocationRuleDefinitionInner costAllocationRule, Context context);
+
+ /**
+ * Create/Update a rule to allocate cost between different resources within a billing account or enterprise
+ * enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @param costAllocationRule Cost allocation rule to be created or updated.
+ * @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 cost allocation rule model definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CostAllocationRuleDefinitionInner createOrUpdate(String billingAccountId, String ruleName,
+ CostAllocationRuleDefinitionInner costAllocationRule);
+
+ /**
+ * Delete cost allocation rule for billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String billingAccountId, String ruleName, Context context);
+
+ /**
+ * Delete cost allocation rule for billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param ruleName Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters
+ * other than '_' and '-'. The max length is 260 characters.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String billingAccountId, String ruleName);
+
+ /**
+ * Get the list of all cost allocation rules for a billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @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 list of all cost allocation rules for a billing account or enterprise enrollment as paginated
+ * response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId);
+
+ /**
+ * Get the list of all cost allocation rules for a billing account or enterprise enrollment.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @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 list of all cost allocation rules for a billing account or enterprise enrollment as paginated
+ * response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, Context context);
+
+ /**
+ * Checks availability and correctness of a name for a cost allocation rule.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param costAllocationRuleCheckNameAvailabilityRequest Cost allocation rule to be created or updated.
+ * @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 cost allocation rule check name availability response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ String billingAccountId,
+ CostAllocationRuleCheckNameAvailabilityRequest costAllocationRuleCheckNameAvailabilityRequest, Context context);
+
+ /**
+ * Checks availability and correctness of a name for a cost allocation rule.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param costAllocationRuleCheckNameAvailabilityRequest Cost allocation rule to be created or updated.
+ * @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 cost allocation rule check name availability response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CostAllocationRuleCheckNameAvailabilityResponseInner checkNameAvailability(String billingAccountId,
+ CostAllocationRuleCheckNameAvailabilityRequest costAllocationRuleCheckNameAvailabilityRequest);
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementManagementClient.java
similarity index 76%
rename from sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementClient.java
rename to sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementManagementClient.java
index 240133de73e49..274bb78ce963d 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/CostManagementManagementClient.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.costmanagement.fluent;
@@ -8,18 +8,18 @@
import java.time.Duration;
/**
- * The interface for CostManagementClient class.
+ * The interface for CostManagementManagementClient class.
*/
-public interface CostManagementClient {
+public interface CostManagementManagementClient {
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -39,6 +39,13 @@ public interface CostManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the GenerateDetailedCostReportOperationStatusClient object to access its operations.
+ *
+ * @return the GenerateDetailedCostReportOperationStatusClient object.
+ */
+ GenerateDetailedCostReportOperationStatusClient getGenerateDetailedCostReportOperationStatus();
+
/**
* Gets the OperationsClient object to access its operations.
*
@@ -46,6 +53,27 @@ public interface CostManagementClient {
*/
OperationsClient getOperations();
+ /**
+ * Gets the BudgetsClient object to access its operations.
+ *
+ * @return the BudgetsClient object.
+ */
+ BudgetsClient getBudgets();
+
+ /**
+ * Gets the ExportsClient object to access its operations.
+ *
+ * @return the ExportsClient object.
+ */
+ ExportsClient getExports();
+
+ /**
+ * Gets the GenerateDetailedCostReportOperationResultsClient object to access its operations.
+ *
+ * @return the GenerateDetailedCostReportOperationResultsClient object.
+ */
+ GenerateDetailedCostReportOperationResultsClient getGenerateDetailedCostReportOperationResults();
+
/**
* Gets the ViewsClient object to access its operations.
*
@@ -61,93 +89,100 @@ public interface CostManagementClient {
AlertsClient getAlerts();
/**
- * Gets the ForecastsClient object to access its operations.
+ * Gets the ScheduledActionsClient object to access its operations.
*
- * @return the ForecastsClient object.
+ * @return the ScheduledActionsClient object.
*/
- ForecastsClient getForecasts();
+ ScheduledActionsClient getScheduledActions();
/**
- * Gets the DimensionsClient object to access its operations.
+ * Gets the SettingsClient object to access its operations.
*
- * @return the DimensionsClient object.
+ * @return the SettingsClient object.
*/
- DimensionsClient getDimensions();
+ SettingsClient getSettings();
/**
- * Gets the QueriesClient object to access its operations.
+ * Gets the MarkupRulesClient object to access its operations.
*
- * @return the QueriesClient object.
+ * @return the MarkupRulesClient object.
*/
- QueriesClient getQueries();
+ MarkupRulesClient getMarkupRules();
/**
- * Gets the GenerateReservationDetailsReportsClient object to access its operations.
+ * Gets the GenerateCostDetailsReportsClient object to access its operations.
*
- * @return the GenerateReservationDetailsReportsClient object.
+ * @return the GenerateCostDetailsReportsClient object.
*/
- GenerateReservationDetailsReportsClient getGenerateReservationDetailsReports();
+ GenerateCostDetailsReportsClient getGenerateCostDetailsReports();
/**
- * Gets the ExportsClient object to access its operations.
+ * Gets the CostAllocationRulesClient object to access its operations.
*
- * @return the ExportsClient object.
+ * @return the CostAllocationRulesClient object.
*/
- ExportsClient getExports();
+ CostAllocationRulesClient getCostAllocationRules();
/**
- * Gets the GenerateCostDetailsReportsClient object to access its operations.
+ * Gets the BenefitRecommendationsClient object to access its operations.
*
- * @return the GenerateCostDetailsReportsClient object.
+ * @return the BenefitRecommendationsClient object.
*/
- GenerateCostDetailsReportsClient getGenerateCostDetailsReports();
+ BenefitRecommendationsClient getBenefitRecommendations();
/**
- * Gets the GenerateDetailedCostReportsClient object to access its operations.
+ * Gets the BenefitUtilizationSummariesClient object to access its operations.
*
- * @return the GenerateDetailedCostReportsClient object.
+ * @return the BenefitUtilizationSummariesClient object.
*/
- GenerateDetailedCostReportsClient getGenerateDetailedCostReports();
+ BenefitUtilizationSummariesClient getBenefitUtilizationSummaries();
/**
- * Gets the GenerateDetailedCostReportOperationResultsClient object to access its operations.
+ * Gets the GenerateBenefitUtilizationSummariesReportsClient object to access its operations.
*
- * @return the GenerateDetailedCostReportOperationResultsClient object.
+ * @return the GenerateBenefitUtilizationSummariesReportsClient object.
*/
- GenerateDetailedCostReportOperationResultsClient getGenerateDetailedCostReportOperationResults();
+ GenerateBenefitUtilizationSummariesReportsClient getGenerateBenefitUtilizationSummariesReports();
/**
- * Gets the GenerateDetailedCostReportOperationStatusClient object to access its operations.
+ * Gets the GenerateDetailedCostReportsClient object to access its operations.
*
- * @return the GenerateDetailedCostReportOperationStatusClient object.
+ * @return the GenerateDetailedCostReportsClient object.
*/
- GenerateDetailedCostReportOperationStatusClient getGenerateDetailedCostReportOperationStatus();
+ GenerateDetailedCostReportsClient getGenerateDetailedCostReports();
/**
- * Gets the PriceSheetsClient object to access its operations.
+ * Gets the ForecastsClient object to access its operations.
*
- * @return the PriceSheetsClient object.
+ * @return the ForecastsClient object.
*/
- PriceSheetsClient getPriceSheets();
+ ForecastsClient getForecasts();
/**
- * Gets the ScheduledActionsClient object to access its operations.
+ * Gets the DimensionsClient object to access its operations.
*
- * @return the ScheduledActionsClient object.
+ * @return the DimensionsClient object.
*/
- ScheduledActionsClient getScheduledActions();
+ DimensionsClient getDimensions();
/**
- * Gets the BenefitRecommendationsClient object to access its operations.
+ * Gets the QueriesClient object to access its operations.
*
- * @return the BenefitRecommendationsClient object.
+ * @return the QueriesClient object.
*/
- BenefitRecommendationsClient getBenefitRecommendations();
+ QueriesClient getQueries();
/**
- * Gets the BenefitUtilizationSummariesClient object to access its operations.
+ * Gets the GenerateReservationDetailsReportsClient object to access its operations.
*
- * @return the BenefitUtilizationSummariesClient object.
+ * @return the GenerateReservationDetailsReportsClient object.
*/
- BenefitUtilizationSummariesClient getBenefitUtilizationSummaries();
+ GenerateReservationDetailsReportsClient getGenerateReservationDetailsReports();
+
+ /**
+ * Gets the PriceSheetsClient object to access its operations.
+ *
+ * @return the PriceSheetsClient object.
+ */
+ PriceSheetsClient getPriceSheets();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/DimensionsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/DimensionsClient.java
index d07a787c942cc..b61df5e4aba22 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/DimensionsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/DimensionsClient.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.costmanagement.fluent;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ExportsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ExportsClient.java
index 30615e1649622..29dc98c70e1e7 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ExportsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ExportsClient.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.costmanagement.fluent;
@@ -11,72 +11,16 @@
import com.azure.resourcemanager.costmanagement.fluent.models.ExportExecutionListResultInner;
import com.azure.resourcemanager.costmanagement.fluent.models.ExportInner;
import com.azure.resourcemanager.costmanagement.fluent.models.ExportListResultInner;
+import com.azure.resourcemanager.costmanagement.models.ExportRunRequest;
/**
* An instance of this class provides access to all the operations defined in ExportsClient.
*/
public interface ExportsClient {
- /**
- * The operation to list all exports at the given scope.
- *
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param expand May be used to expand the properties within an export. Currently only 'runHistory' is supported and
- * will return information for the last run of each export.
- * @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 exports along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(String scope, String expand, Context context);
-
- /**
- * The operation to list all exports at the given scope.
- *
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 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 exports.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ExportListResultInner list(String scope);
-
/**
* The operation to get the export for the defined scope by export name.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @param expand May be used to expand the properties within an export. Currently only 'runHistory' is supported and
* will return information for the last 10 runs of the export.
@@ -92,17 +36,7 @@ public interface ExportsClient {
/**
* The operation to get the export for the defined scope by export name.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -116,17 +50,7 @@ public interface ExportsClient {
* The operation to create or update a export. Update operation requires latest eTag to be set in the request. You
* may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @param parameters Parameters supplied to the CreateOrUpdate Export operation.
* @param context The context to associate with this operation.
@@ -143,17 +67,7 @@ Response createOrUpdateWithResponse(String scope, String exportName
* The operation to create or update a export. Update operation requires latest eTag to be set in the request. You
* may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @param parameters Parameters supplied to the CreateOrUpdate Export operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -167,17 +81,7 @@ Response createOrUpdateWithResponse(String scope, String exportName
/**
* The operation to delete a export.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -191,7 +95,19 @@ Response createOrUpdateWithResponse(String scope, String exportName
/**
* The operation to delete a export.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
+ * @param exportName Export 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String scope, String exportName);
+
+ /**
+ * The operation to list all exports at the given scope.
+ *
+ * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
@@ -202,18 +118,21 @@ Response createOrUpdateWithResponse(String scope, String exportName
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param exportName Export Name.
+ * @param expand May be used to expand the properties within an export. Currently only 'runHistory' is supported and
+ * will return information for the last run of each export.
+ * @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 exports along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String scope, String exportName);
+ Response listWithResponse(String scope, String expand, Context context);
/**
- * The operation to run an export.
+ * The operation to list all exports at the given scope.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
+ * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
@@ -224,7 +143,20 @@ Response createOrUpdateWithResponse(String scope, String exportName
* '/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 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 exports.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExportListResultInner list(String scope);
+
+ /**
+ * The operation to run an export.
+ *
+ * @param scope The fully qualified Azure Resource manager identifier of the resource.
* @param exportName Export Name.
+ * @param parameters Parameters supplied to the Execute Export operation.
* @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.
@@ -232,22 +164,12 @@ Response createOrUpdateWithResponse(String scope, String exportName
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(String scope, String exportName, Context context);
+ Response executeWithResponse(String scope, String exportName, ExportRunRequest parameters, Context context);
/**
* The operation to run an export.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -259,17 +181,7 @@ Response createOrUpdateWithResponse(String scope, String exportName
/**
* The operation to get the run history of an export for the defined scope and export name.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export Name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -284,17 +196,7 @@ Response getExecutionHistoryWithResponse(String
/**
* The operation to get the run history of an export for the defined scope and export name.
*
- * @param scope The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 exportName Export 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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ForecastsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ForecastsClient.java
index a08cc0fd8bc74..7459b094fb878 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ForecastsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ForecastsClient.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.costmanagement.fluent;
@@ -74,7 +74,7 @@ Response usageWithResponse(String scope, ForecastDefinition
* This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
* @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
* '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @param parameters Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ * @param parameters The request body.
* @param filter May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or
* properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support
* 'ne', 'or', or 'not'.
@@ -96,7 +96,7 @@ Response externalCloudProviderUsageWithResponse(
* This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
* @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
* '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @param parameters Parameters supplied to the CreateOrUpdate Forecast Config operation.
+ * @param parameters The request body.
* @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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateBenefitUtilizationSummariesReportsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateBenefitUtilizationSummariesReportsClient.java
new file mode 100644
index 0000000000000..6dd80b8429906
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateBenefitUtilizationSummariesReportsClient.java
@@ -0,0 +1,400 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.costmanagement.fluent.models.BenefitUtilizationSummariesOperationStatusInner;
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * GenerateBenefitUtilizationSummariesReportsClient.
+ */
+public interface GenerateBenefitUtilizationSummariesReportsClient {
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports
+ * only enrollment accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByBillingAccount(String billingAccountId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports
+ * only enrollment accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByBillingAccount(String billingAccountId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports
+ * only enrollment accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByBillingAccount(String billingAccountId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account. This API supports
+ * only enrollment accounts.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByBillingAccount(String billingAccountId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account and billing
+ * profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByBillingProfile(String billingAccountId, String billingProfileId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account and billing
+ * profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByBillingProfile(String billingAccountId, String billingProfileId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account and billing
+ * profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByBillingProfile(String billingAccountId,
+ String billingProfileId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided billing account and billing
+ * profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByBillingProfile(String billingAccountId,
+ String billingProfileId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest,
+ Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByReservationOrderId(String reservationOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByReservationOrderId(String reservationOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByReservationOrderId(String reservationOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation order.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByReservationOrderId(String reservationOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param reservationId Reservation ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByReservationId(String reservationOrderId, String reservationId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param reservationId Reservation ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateByReservationId(String reservationOrderId, String reservationId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param reservationId Reservation ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByReservationId(String reservationOrderId,
+ String reservationId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided reservation.
+ *
+ * @param reservationOrderId Reservation Order ID.
+ * @param reservationId Reservation ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateByReservationId(String reservationOrderId,
+ String reservationId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateBySavingsPlanOrderId(String savingsPlanOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateBySavingsPlanOrderId(String savingsPlanOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateBySavingsPlanOrderId(String savingsPlanOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan order.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateBySavingsPlanOrderId(String savingsPlanOrderId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param savingsPlanId Savings plan ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateBySavingsPlanId(String savingsPlanOrderId, String savingsPlanId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param savingsPlanId Savings plan ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 {@link SyncPoller} for polling of status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BenefitUtilizationSummariesOperationStatusInner>
+ beginGenerateBySavingsPlanId(String savingsPlanOrderId, String savingsPlanId,
+ BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param savingsPlanId Savings plan ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateBySavingsPlanId(String savingsPlanOrderId,
+ String savingsPlanId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest);
+
+ /**
+ * Triggers generation of a benefit utilization summaries report for the provided savings plan.
+ *
+ * @param savingsPlanOrderId Savings plan order ID.
+ * @param savingsPlanId Savings plan ID.
+ * @param benefitUtilizationSummariesRequest Async Benefit Utilization Summary report to be created.
+ * @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 status of a benefit utilization summaries report.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BenefitUtilizationSummariesOperationStatusInner generateBySavingsPlanId(String savingsPlanOrderId,
+ String savingsPlanId, BenefitUtilizationSummariesRequest benefitUtilizationSummariesRequest, Context context);
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateCostDetailsReportsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateCostDetailsReportsClient.java
index 0a80ac1e7f4c0..a5bec209985ee 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateCostDetailsReportsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateCostDetailsReportsClient.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.costmanagement.fluent;
@@ -16,6 +16,70 @@
* An instance of this class provides access to all the operations defined in GenerateCostDetailsReportsClient.
*/
public interface GenerateCostDetailsReportsClient {
+ /**
+ * Get the result of the specified operation. This link is provided in the CostDetails creation request response
+ * Location header.
+ *
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
+ * @param operationId The target operation Id.
+ * @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 result of the specified operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CostDetailsOperationResultsInner>
+ beginGetOperationResults(String scope, String operationId);
+
+ /**
+ * Get the result of the specified operation. This link is provided in the CostDetails creation request response
+ * Location header.
+ *
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
+ * @param operationId The target operation Id.
+ * @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 {@link SyncPoller} for polling of the result of the specified operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CostDetailsOperationResultsInner>
+ beginGetOperationResults(String scope, String operationId, Context context);
+
+ /**
+ * Get the result of the specified operation. This link is provided in the CostDetails creation request response
+ * Location header.
+ *
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
+ * @param operationId The target operation Id.
+ * @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 result of the specified operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CostDetailsOperationResultsInner getOperationResults(String scope, String operationId);
+
+ /**
+ * Get the result of the specified operation. This link is provided in the CostDetails creation request response
+ * Location header.
+ *
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
+ * @param operationId The target operation Id.
+ * @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 result of the specified operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CostDetailsOperationResultsInner getOperationResults(String scope, String operationId, Context context);
+
/**
* This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details
* report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a
@@ -26,10 +90,11 @@ public interface GenerateCostDetailsReportsClient {
* report generation operation completes, the polling endpoint will provide a 200 response along with details on the
* report blob(s) that are available for download. The details on the file(s) available for download will be
* available in the polling response body. To Understand cost details (formerly known as usage details) fields found
- * in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields.
+ * in files ,see
+ * https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields.
*
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
* @param parameters Parameters supplied to the Create cost details operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -50,10 +115,11 @@ public interface GenerateCostDetailsReportsClient {
* report generation operation completes, the polling endpoint will provide a 200 response along with details on the
* report blob(s) that are available for download. The details on the file(s) available for download will be
* available in the polling response body. To Understand cost details (formerly known as usage details) fields found
- * in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields.
+ * in files ,see
+ * https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields.
*
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
* @param parameters Parameters supplied to the Create cost details operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -75,10 +141,11 @@ public interface GenerateCostDetailsReportsClient {
* report generation operation completes, the polling endpoint will provide a 200 response along with details on the
* report blob(s) that are available for download. The details on the file(s) available for download will be
* available in the polling response body. To Understand cost details (formerly known as usage details) fields found
- * in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields.
+ * in files ,see
+ * https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields.
*
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
* @param parameters Parameters supplied to the Create cost details operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -99,10 +166,11 @@ CostDetailsOperationResultsInner createOperation(String scope,
* report generation operation completes, the polling endpoint will provide a 200 response along with details on the
* report blob(s) that are available for download. The details on the file(s) available for download will be
* available in the polling response body. To Understand cost details (formerly known as usage details) fields found
- * in files ,see https://learn.microsoft.com/azure/cost-management-billing/automate/understand-usage-details-fields.
+ * in files ,see
+ * https://learn.microsoft.com/en-us/azure/cost-management-billing/automate/understand-usage-details-fields.
*
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @param scope The ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource
+ * Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.
* @param parameters Parameters supplied to the Create cost details operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -113,68 +181,4 @@ CostDetailsOperationResultsInner createOperation(String scope,
@ServiceMethod(returns = ReturnType.SINGLE)
CostDetailsOperationResultsInner createOperation(String scope,
GenerateCostDetailsReportRequestDefinition parameters, Context context);
-
- /**
- * Get the result of the specified operation. This link is provided in the CostDetails creation request response
- * Location header.
- *
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
- * @param operationId The target operation Id.
- * @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 result of the specified operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CostDetailsOperationResultsInner>
- beginGetOperationResults(String scope, String operationId);
-
- /**
- * Get the result of the specified operation. This link is provided in the CostDetails creation request response
- * Location header.
- *
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
- * @param operationId The target operation Id.
- * @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 {@link SyncPoller} for polling of the result of the specified operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CostDetailsOperationResultsInner>
- beginGetOperationResults(String scope, String operationId, Context context);
-
- /**
- * Get the result of the specified operation. This link is provided in the CostDetails creation request response
- * Location header.
- *
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
- * @param operationId The target operation Id.
- * @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 result of the specified operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CostDetailsOperationResultsInner getOperationResults(String scope, String operationId);
-
- /**
- * Get the result of the specified operation. This link is provided in the CostDetails creation request response
- * Location header.
- *
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
- * @param operationId The target operation Id.
- * @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 result of the specified operation.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CostDetailsOperationResultsInner getOperationResults(String scope, String operationId, Context context);
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationResultsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationResultsClient.java
index fd8370c269e30..a5b19ba3c9e9b 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationResultsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationResultsClient.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.costmanagement.fluent;
@@ -21,8 +21,7 @@ public interface GenerateDetailedCostReportOperationResultsClient {
* the initial request.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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.
@@ -37,8 +36,7 @@ public interface GenerateDetailedCostReportOperationResultsClient {
* the initial request.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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.
@@ -54,8 +52,7 @@ public interface GenerateDetailedCostReportOperationResultsClient {
* the initial request.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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.
@@ -69,8 +66,7 @@ public interface GenerateDetailedCostReportOperationResultsClient {
* the initial request.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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.
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationStatusClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationStatusClient.java
index dcdfa199a304a..eaec1a89f9b03 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationStatusClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportOperationStatusClient.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.costmanagement.fluent;
@@ -20,8 +20,7 @@ public interface GenerateDetailedCostReportOperationStatusClient {
* request response header.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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.
@@ -37,8 +36,7 @@ Response getWithResponse(Strin
* request response header.
*
* @param operationId The target operation Id.
- * @param scope The ARM Resource ID for subscription, resource group, billing account, or other billing scopes. For
- * details, see https://aka.ms/costmgmt/scopes.
+ * @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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportsClient.java
index 2e63a6acbe4a6..eecb3508149b1 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateDetailedCostReportsClient.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.costmanagement.fluent;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateReservationDetailsReportsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateReservationDetailsReportsClient.java
index 5211a4d76b15d..202f6446e4742 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateReservationDetailsReportsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/GenerateReservationDetailsReportsClient.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.costmanagement.fluent;
@@ -18,9 +18,9 @@ public interface GenerateReservationDetailsReportsClient {
/**
* Generates the reservations details report for provided date range asynchronously based on enrollment id. The
* Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
*
- * @param billingAccountId Enrollment ID (Legacy BillingAccount ID).
+ * @param billingAccountId BillingAccount ID.
* @param startDate Start Date.
* @param endDate End Date.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -35,9 +35,9 @@ SyncPoller, OperationStatusInner> beginByBillin
/**
* Generates the reservations details report for provided date range asynchronously based on enrollment id. The
* Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
*
- * @param billingAccountId Enrollment ID (Legacy BillingAccount ID).
+ * @param billingAccountId BillingAccount ID.
* @param startDate Start Date.
* @param endDate End Date.
* @param context The context to associate with this operation.
@@ -53,9 +53,9 @@ SyncPoller, OperationStatusInner> beginByBillin
/**
* Generates the reservations details report for provided date range asynchronously based on enrollment id. The
* Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
*
- * @param billingAccountId Enrollment ID (Legacy BillingAccount ID).
+ * @param billingAccountId BillingAccount ID.
* @param startDate Start Date.
* @param endDate End Date.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -69,9 +69,9 @@ SyncPoller, OperationStatusInner> beginByBillin
/**
* Generates the reservations details report for provided date range asynchronously based on enrollment id. The
* Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role.
*
- * @param billingAccountId Enrollment ID (Legacy BillingAccount ID).
+ * @param billingAccountId BillingAccount ID.
* @param startDate Start Date.
* @param endDate End Date.
* @param context The context to associate with this operation.
@@ -87,10 +87,10 @@ SyncPoller, OperationStatusInner> beginByBillin
* Generates the reservations details report for provided date range asynchronously by billing profile. The
* Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the
* roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @param startDate Start Date.
* @param endDate End Date.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -106,10 +106,10 @@ SyncPoller, OperationStatusInner> beginByBillin
* Generates the reservations details report for provided date range asynchronously by billing profile. The
* Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the
* roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @param startDate Start Date.
* @param endDate End Date.
* @param context The context to associate with this operation.
@@ -126,10 +126,10 @@ SyncPoller, OperationStatusInner> beginByBillin
* Generates the reservations details report for provided date range asynchronously by billing profile. The
* Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the
* roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @param startDate Start Date.
* @param endDate End Date.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -145,10 +145,10 @@ OperationStatusInner byBillingProfileId(String billingAccountId, String billingP
* Generates the reservations details report for provided date range asynchronously by billing profile. The
* Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the
* roles see,
- * https://docs.microsoft.com/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
+ * https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access.
*
- * @param billingAccountId Billing account ID.
- * @param billingProfileId Billing profile ID.
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId Billing Profile ID.
* @param startDate Start Date.
* @param endDate End Date.
* @param context The context to associate with this operation.
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/MarkupRulesClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/MarkupRulesClient.java
new file mode 100644
index 0000000000000..f07faba6eaf65
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/MarkupRulesClient.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.costmanagement.fluent.models.MarkupRuleInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in MarkupRulesClient.
+ */
+public interface MarkupRulesClient {
+ /**
+ * Get a markup rule by name for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule 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 a markup rule by name for a billing account and billing profile along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String billingAccountId, String billingProfileId, String ruleName,
+ Context context);
+
+ /**
+ * Get a markup rule by name for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule 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 a markup rule by name for a billing account and billing profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MarkupRuleInner get(String billingAccountId, String billingProfileId, String ruleName);
+
+ /**
+ * Create or update a markup rule for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule name.
+ * @param resource The markup rule to create or update.
+ * @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 markup rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String billingAccountId, String billingProfileId,
+ String ruleName, MarkupRuleInner resource, Context context);
+
+ /**
+ * Create or update a markup rule for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule name.
+ * @param resource The markup rule to create or update.
+ * @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 markup rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MarkupRuleInner createOrUpdate(String billingAccountId, String billingProfileId, String ruleName,
+ MarkupRuleInner resource);
+
+ /**
+ * Delete a markup rule for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule 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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String billingAccountId, String billingProfileId, String ruleName,
+ Context context);
+
+ /**
+ * Delete a markup rule for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @param ruleName Markup rule 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String billingAccountId, String billingProfileId, String ruleName);
+
+ /**
+ * List all markup rules for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @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 markup rule list result as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, String billingProfileId);
+
+ /**
+ * List all markup rules for a billing account and billing profile.
+ *
+ * @param billingAccountId BillingAccount ID.
+ * @param billingProfileId BillingProfile ID.
+ * @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 markup rule list result as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String billingAccountId, String billingProfileId, Context context);
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/OperationsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/OperationsClient.java
index cd272ca8e8e91..d0f14c320ade2 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/OperationsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/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.costmanagement.fluent;
@@ -15,7 +15,7 @@
*/
public interface OperationsClient {
/**
- * Lists all of the available cost management 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 cost management 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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/PriceSheetsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/PriceSheetsClient.java
index ad5d5ff67928c..198a4a5daac4e 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/PriceSheetsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/PriceSheetsClient.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.costmanagement.fluent;
@@ -10,6 +10,8 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.costmanagement.fluent.models.DownloadUrlInner;
+import com.azure.resourcemanager.costmanagement.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.costmanagement.fluent.models.PricesheetDownloadPropertiesInner;
/**
* An instance of this class provides access to all the operations defined in PriceSheetsClient.
@@ -19,8 +21,8 @@ public interface PriceSheetsClient {
* Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with
* agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile Name.
* @param invoiceName The ID that uniquely identifies an invoice.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -28,15 +30,15 @@ public interface PriceSheetsClient {
* @return the {@link SyncPoller} for polling of a URL to download the pricesheet for an invoice.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DownloadUrlInner> beginDownload(String billingAccountName,
+ SyncPoller, DownloadUrlInner> beginDownloadByInvoice(String billingAccountName,
String billingProfileName, String invoiceName);
/**
* Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with
* agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile Name.
* @param invoiceName The ID that uniquely identifies an invoice.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -45,15 +47,15 @@ SyncPoller, DownloadUrlInner> beginDownload(String
* @return the {@link SyncPoller} for polling of a URL to download the pricesheet for an invoice.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DownloadUrlInner> beginDownload(String billingAccountName,
+ SyncPoller, DownloadUrlInner> beginDownloadByInvoice(String billingAccountName,
String billingProfileName, String invoiceName, Context context);
/**
* Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with
* agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile Name.
* @param invoiceName The ID that uniquely identifies an invoice.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -61,14 +63,14 @@ SyncPoller, DownloadUrlInner> beginDownload(String
* @return a URL to download the pricesheet for an invoice.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DownloadUrlInner download(String billingAccountName, String billingProfileName, String invoiceName);
+ DownloadUrlInner downloadByInvoice(String billingAccountName, String billingProfileName, String invoiceName);
/**
* Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with
* agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile Name.
* @param invoiceName The ID that uniquely identifies an invoice.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -77,17 +79,21 @@ SyncPoller, DownloadUrlInner> beginDownload(String
* @return a URL to download the pricesheet for an invoice.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DownloadUrlInner download(String billingAccountName, String billingProfileName, String invoiceName,
+ DownloadUrlInner downloadByInvoice(String billingAccountName, String billingProfileName, String invoiceName,
Context context);
/**
* Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for
- * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure
- * product growth, the Azure price sheet download experience in this preview version will be updated from a single
- * csv file to a Zip file containing multiple csv files, each with max 200k records.
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI)
+ * pricing is only available through the new version of the API.
+ *
+ * Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated
+ * from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
+ *
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile 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.
@@ -95,17 +101,21 @@ DownloadUrlInner download(String billingAccountName, String billingProfileName,
* profile.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DownloadUrlInner> beginDownloadByBillingProfile(String billingAccountName,
- String billingProfileName);
+ SyncPoller, PricesheetDownloadPropertiesInner>
+ beginDownloadByBillingProfile(String billingAccountName, String billingProfileName);
/**
* Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for
- * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure
- * product growth, the Azure price sheet download experience in this preview version will be updated from a single
- * csv file to a Zip file containing multiple csv files, each with max 200k records.
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI)
+ * pricing is only available through the new version of the API.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated
+ * from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
+ *
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile 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.
@@ -114,33 +124,41 @@ SyncPoller, DownloadUrlInner> beginDownloadByBillin
* profile.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DownloadUrlInner> beginDownloadByBillingProfile(String billingAccountName,
- String billingProfileName, Context context);
+ SyncPoller, PricesheetDownloadPropertiesInner>
+ beginDownloadByBillingProfile(String billingAccountName, String billingProfileName, Context context);
/**
* Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for
- * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure
- * product growth, the Azure price sheet download experience in this preview version will be updated from a single
- * csv file to a Zip file containing multiple csv files, each with max 200k records.
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI)
+ * pricing is only available through the new version of the API.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated
+ * from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
+ *
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile 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 a URL to download the current month's pricesheet for a billing profile.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DownloadUrlInner downloadByBillingProfile(String billingAccountName, String billingProfileName);
+ PricesheetDownloadPropertiesInner downloadByBillingProfile(String billingAccountName, String billingProfileName);
/**
* Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for
- * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure
- * product growth, the Azure price sheet download experience in this preview version will be updated from a single
- * csv file to a Zip file containing multiple csv files, each with max 200k records.
+ * billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
+ *
+ * You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI)
+ * pricing is only available through the new version of the API.
*
- * @param billingAccountName The ID that uniquely identifies a billing account.
- * @param billingProfileName The ID that uniquely identifies a billing profile.
+ * Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated
+ * from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.
+ *
+ * @param billingAccountName BillingAccount ID.
+ * @param billingProfileName Billing Profile 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.
@@ -148,5 +166,154 @@ SyncPoller, DownloadUrlInner> beginDownloadByBillin
* @return a URL to download the current month's pricesheet for a billing profile.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DownloadUrlInner downloadByBillingProfile(String billingAccountName, String billingProfileName, Context context);
+ PricesheetDownloadPropertiesInner downloadByBillingProfile(String billingAccountName, String billingProfileName,
+ Context context);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for
+ * Enterprise Agreement customers.
+ *
+ * **Migrate to version 2025-03-01**
+ *
+ * You can use the 2025-03-01 API version with the new URI:
+ *
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ *
+ * With a new schema detailed below, the new version of the price sheet provides additional information and includes
+ * prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price
+ * Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved
+ * Instance (RI) pricing.
+ *
+ * The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a
+ * billing period older than 13 months, please contact support.
+ *
+ * The Azure price sheet download experience has been updated from a single .csv file to a zip file containing
+ * multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST
+ * method; details can be found below.
+ *
+ * All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01,
+ * 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no
+ * longer be supported after this date.
+ *
+ * @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>
+ beginDownloadByBillingAccount(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for
+ * Enterprise Agreement customers.
+ *
+ * **Migrate to version 2025-03-01**
+ *
+ * You can use the 2025-03-01 API version with the new URI:
+ *
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ *
+ * With a new schema detailed below, the new version of the price sheet provides additional information and includes
+ * prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price
+ * Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved
+ * Instance (RI) pricing.
+ *
+ * The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a
+ * billing period older than 13 months, please contact support.
+ *
+ * The Azure price sheet download experience has been updated from a single .csv file to a zip file containing
+ * multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST
+ * method; details can be found below.
+ *
+ * All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01,
+ * 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no
+ * longer be supported after this date.
+ *
+ * @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 {@link SyncPoller} for polling of the status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationStatusInner>
+ beginDownloadByBillingAccount(String billingAccountId, String billingPeriodName, Context context);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for
+ * Enterprise Agreement customers.
+ *
+ * **Migrate to version 2025-03-01**
+ *
+ * You can use the 2025-03-01 API version with the new URI:
+ *
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ *
+ * With a new schema detailed below, the new version of the price sheet provides additional information and includes
+ * prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price
+ * Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved
+ * Instance (RI) pricing.
+ *
+ * The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a
+ * billing period older than 13 months, please contact support.
+ *
+ * The Azure price sheet download experience has been updated from a single .csv file to a zip file containing
+ * multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST
+ * method; details can be found below.
+ *
+ * All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01,
+ * 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no
+ * longer be supported after this date.
+ *
+ * @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)
+ OperationStatusInner downloadByBillingAccount(String billingAccountId, String billingPeriodName);
+
+ /**
+ * Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for
+ * Enterprise Agreement customers.
+ *
+ * **Migrate to version 2025-03-01**
+ *
+ * You can use the 2025-03-01 API version with the new URI:
+ *
+ * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download'
+ *
+ * With a new schema detailed below, the new version of the price sheet provides additional information and includes
+ * prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price
+ * Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved
+ * Instance (RI) pricing.
+ *
+ * The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a
+ * billing period older than 13 months, please contact support.
+ *
+ * The Azure price sheet download experience has been updated from a single .csv file to a zip file containing
+ * multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST
+ * method; details can be found below.
+ *
+ * All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01,
+ * 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no
+ * longer be supported after this date.
+ *
+ * @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 status of the long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner downloadByBillingAccount(String billingAccountId, String billingPeriodName, Context context);
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/QueriesClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/QueriesClient.java
index 7fae81778f44f..c8ff38fb917b5 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/QueriesClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/QueriesClient.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.costmanagement.fluent;
@@ -72,7 +72,7 @@ public interface QueriesClient {
* This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
* @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
* '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @param parameters Parameters supplied to the CreateOrUpdate Query Config operation.
+ * @param parameters The request body.
* @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.
@@ -91,7 +91,7 @@ Response usageByExternalCloudProviderTypeWithResponse(
* This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
* @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
* '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @param parameters Parameters supplied to the CreateOrUpdate Query Config operation.
+ * @param parameters The request body.
* @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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ScheduledActionsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ScheduledActionsClient.java
index cb0f255dc64c5..7d7f8c4fc401d 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ScheduledActionsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ScheduledActionsClient.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.costmanagement.fluent;
@@ -18,79 +18,29 @@
*/
public interface ScheduledActionsClient {
/**
- * List all private scheduled actions.
- *
- * @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 scheduled actions list result as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * List all private scheduled actions.
+ * Get the private scheduled action by name.
*
- * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
+ * @param name Scheduled action 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 scheduled actions list result as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String filter, Context context);
-
- /**
- * List all shared scheduled actions within the given scope.
- *
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription 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 scheduled actions list result as paginated response with {@link PagedIterable}.
+ * @return the private scheduled action by name along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByScope(String scope);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String name, Context context);
/**
- * List all shared scheduled actions within the given scope.
+ * Get the private scheduled action by name.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
- * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
- * @param context The context to associate with this operation.
+ * @param name Scheduled action 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 scheduled actions list result as paginated response with {@link PagedIterable}.
+ * @return the private scheduled action by name.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByScope(String scope, String filter, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ScheduledActionInner get(String name);
/**
* Create or update a private scheduled action.
@@ -123,129 +73,80 @@ Response createOrUpdateWithResponse(String name, Scheduled
ScheduledActionInner createOrUpdate(String name, ScheduledActionInner scheduledAction);
/**
- * Get the private scheduled action by name.
+ * Delete a private scheduled action.
*
* @param name Scheduled action 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 private scheduled action by name along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String name, Context context);
+ Response deleteWithResponse(String name, Context context);
/**
- * Get the private scheduled action by name.
+ * Delete a private scheduled action.
*
* @param name Scheduled action 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 private scheduled action by name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ScheduledActionInner get(String name);
+ void delete(String name);
/**
- * Delete a private scheduled action.
+ * List all private scheduled actions.
*
- * @param name Scheduled action 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 {@link Response}.
+ * @return scheduled actions list result as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(String name, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Delete a private scheduled action.
+ * List all private scheduled actions.
*
- * @param name Scheduled action name.
+ * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
+ * @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 scheduled actions list result as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String name);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String filter, Context context);
/**
- * Create or update a shared scheduled action within the given scope.
+ * Processes a private scheduled action.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
* @param name Scheduled action name.
- * @param scheduledAction Scheduled action to be created or updated.
- * @param ifMatch ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can
- * be specified to achieve optimistic concurrency.
* @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 scheduled action definition along with {@link Response}.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateByScopeWithResponse(String scope, String name,
- ScheduledActionInner scheduledAction, String ifMatch, Context context);
+ Response runWithResponse(String name, Context context);
/**
- * Create or update a shared scheduled action within the given scope.
+ * Processes a private scheduled action.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
* @param name Scheduled action name.
- * @param scheduledAction Scheduled action to be created or updated.
* @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 scheduled action definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ScheduledActionInner createOrUpdateByScope(String scope, String name, ScheduledActionInner scheduledAction);
+ void run(String name);
/**
* Get the shared scheduled action from the given scope by name.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -259,20 +160,7 @@ Response createOrUpdateByScopeWithResponse(String scope, S
/**
* Get the shared scheduled action from the given scope by name.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -283,60 +171,41 @@ Response createOrUpdateByScopeWithResponse(String scope, S
ScheduledActionInner getByScope(String scope, String name);
/**
- * Delete a scheduled action within the given scope.
+ * Create or update a shared scheduled action within the given scope.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
+ * @param scheduledAction Scheduled action to be created or updated.
+ * @param ifMatch ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can
+ * be specified to achieve optimistic concurrency.
* @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 {@link Response}.
+ * @return scheduled action definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteByScopeWithResponse(String scope, String name, Context context);
+ Response createOrUpdateByScopeWithResponse(String scope, String name,
+ ScheduledActionInner scheduledAction, String ifMatch, Context context);
/**
- * Delete a scheduled action within the given scope.
+ * Create or update a shared scheduled action within the given scope.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
+ * @param scheduledAction Scheduled action to be created or updated.
* @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 scheduled action definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void deleteByScope(String scope, String name);
+ ScheduledActionInner createOrUpdateByScope(String scope, String name, ScheduledActionInner scheduledAction);
/**
- * Processes a private scheduled action.
+ * Delete a scheduled action within the given scope.
*
+ * @param scope undefined.
* @param name Scheduled action name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -345,36 +214,50 @@ Response createOrUpdateByScopeWithResponse(String scope, S
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response runWithResponse(String name, Context context);
+ Response deleteByScopeWithResponse(String scope, String name, Context context);
/**
- * Processes a private scheduled action.
+ * Delete a scheduled action within the given scope.
*
+ * @param scope undefined.
* @param name Scheduled action 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void run(String name);
+ void deleteByScope(String scope, String name);
+
+ /**
+ * List all shared scheduled actions within the given scope.
+ *
+ * @param scope undefined.
+ * @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 scheduled actions list result as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScope(String scope);
+
+ /**
+ * List all shared scheduled actions within the given scope.
+ *
+ * @param scope undefined.
+ * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
+ * @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 scheduled actions list result as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScope(String scope, String filter, Context context);
/**
* Runs a shared scheduled action within the given scope.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -388,20 +271,7 @@ Response createOrUpdateByScopeWithResponse(String scope, S
/**
* Runs a shared scheduled action within the given scope.
*
- * @param scope The scope associated with scheduled action 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}'
- * for External Billing Account scope and
- * 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription
- * scope. Note: Insight Alerts are only available on subscription scope.
+ * @param scope undefined.
* @param name Scheduled action name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -413,7 +283,7 @@ Response createOrUpdateByScopeWithResponse(String scope, S
/**
* Checks availability and correctness of the name for a scheduled action.
*
- * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
+ * @param checkNameAvailabilityRequest The request body.
* @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.
@@ -427,7 +297,7 @@ Response createOrUpdateByScopeWithResponse(String scope, S
/**
* Checks availability and correctness of the name for a scheduled action.
*
- * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
+ * @param checkNameAvailabilityRequest The request body.
* @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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/SettingsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/SettingsClient.java
new file mode 100644
index 0000000000000..53cffc712601e
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/SettingsClient.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.costmanagement.fluent.models.SettingInner;
+import com.azure.resourcemanager.costmanagement.fluent.models.SettingsListResultInner;
+import com.azure.resourcemanager.costmanagement.models.SettingType;
+
+/**
+ * An instance of this class provides access to all the operations defined in SettingsClient.
+ */
+public interface SettingsClient {
+ /**
+ * Get the setting from the given scope by name.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @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 setting from the given scope by name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByScopeWithResponse(String scope, SettingType type, Context context);
+
+ /**
+ * Get the setting from the given scope by name.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @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 setting from the given scope by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SettingInner getByScope(String scope, SettingType type);
+
+ /**
+ * Create or update a setting within the given scope.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @param setting Setting to be created or updated.
+ * @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 setting definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateByScopeWithResponse(String scope, SettingType type, SettingInner setting,
+ Context context);
+
+ /**
+ * Create or update a setting within the given scope.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @param setting Setting to be created or updated.
+ * @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 setting definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SettingInner createOrUpdateByScope(String scope, SettingType type, SettingInner setting);
+
+ /**
+ * Delete a setting within the given scope.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteByScopeWithResponse(String scope, SettingType type, Context context);
+
+ /**
+ * Delete a setting within the given scope.
+ *
+ * @param scope undefined.
+ * @param type Setting type.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void deleteByScope(String scope, SettingType type);
+
+ /**
+ * List all cost management settings in the requested scope.
+ *
+ * @param scope undefined.
+ * @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 setting list result along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(String scope, Context context);
+
+ /**
+ * List all cost management settings in the requested scope.
+ *
+ * @param scope undefined.
+ * @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 setting list result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SettingsListResultInner list(String scope);
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ViewsClient.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ViewsClient.java
index 76d78a7a26be6..b158876144215 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ViewsClient.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/ViewsClient.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.costmanagement.fluent;
@@ -15,77 +15,6 @@
* An instance of this class provides access to all the operations defined in ViewsClient.
*/
public interface ViewsClient {
- /**
- * Lists all views by tenant and object.
- *
- * @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 views as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * Lists all views by tenant and object.
- *
- * @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 views as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
-
- /**
- * Lists all views at the given scope.
- *
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription 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 views as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByScope(String scope);
-
- /**
- * Lists all views at the given scope.
- *
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription 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 views as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByScope(String scope, Context context);
-
/**
* Gets the view by view name.
*
@@ -164,22 +93,32 @@ public interface ViewsClient {
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String viewName);
+ /**
+ * Lists all views by tenant and object.
+ *
+ * @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 views as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all views by tenant and object.
+ *
+ * @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 views as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
/**
* Gets the view for the defined scope by view name.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -193,19 +132,7 @@ public interface ViewsClient {
/**
* Gets the view for the defined scope by view name.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -219,19 +146,7 @@ public interface ViewsClient {
* The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may
* obtain the latest eTag by performing a get operation. Create operation does not require eTag.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @param parameters Parameters supplied to the CreateOrUpdate View operation.
* @param context The context to associate with this operation.
@@ -248,19 +163,7 @@ Response createOrUpdateByScopeWithResponse(String scope, String viewN
* The operation to create or update a view. Update operation requires latest eTag to be set in the request. You may
* obtain the latest eTag by performing a get operation. Create operation does not require eTag.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @param parameters Parameters supplied to the CreateOrUpdate View operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -274,19 +177,7 @@ Response createOrUpdateByScopeWithResponse(String scope, String viewN
/**
* The operation to delete a view.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -300,19 +191,7 @@ Response createOrUpdateByScopeWithResponse(String scope, String viewN
/**
* The operation to delete a view.
*
- * @param scope The scope associated with view 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.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
- * BillingProfile scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
- * InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group
- * scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
- * Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'
- * for External Subscription scope.
+ * @param scope undefined.
* @param viewName View name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -320,4 +199,29 @@ Response createOrUpdateByScopeWithResponse(String scope, String viewN
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void deleteByScope(String scope, String viewName);
+
+ /**
+ * Lists all views at the given scope.
+ *
+ * @param scope undefined.
+ * @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 views as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScope(String scope);
+
+ /**
+ * Lists all views at the given scope.
+ *
+ * @param scope undefined.
+ * @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 views as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScope(String scope, Context context);
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertInner.java
index 01210d20c6b4f..c34063c8b38cf 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertInner.java
@@ -1,10 +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.costmanagement.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;
@@ -12,19 +14,29 @@
import com.azure.resourcemanager.costmanagement.models.AlertPropertiesDetails;
import com.azure.resourcemanager.costmanagement.models.AlertSource;
import com.azure.resourcemanager.costmanagement.models.AlertStatus;
-import com.azure.resourcemanager.costmanagement.models.CostManagementProxyResource;
import java.io.IOException;
/**
* An individual alert.
*/
-@Fluent
-public final class AlertInner extends CostManagementProxyResource {
+@Immutable
+public final class AlertInner extends ProxyResource {
/*
* Alert properties.
*/
private AlertProperties 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.
+ */
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -43,7 +55,7 @@ public final class AlertInner extends CostManagementProxyResource {
/**
* Creates an instance of AlertInner class.
*/
- public AlertInner() {
+ private AlertInner() {
}
/**
@@ -55,6 +67,25 @@ private AlertProperties innerProperties() {
return this.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.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * 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.
*
@@ -85,15 +116,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public AlertInner withEtag(String etag) {
- super.withEtag(etag);
- return this;
- }
-
/**
* Get the definition property: defines the type of alert.
*
@@ -103,20 +125,6 @@ public AlertPropertiesDefinition definition() {
return this.innerProperties() == null ? null : this.innerProperties().definition();
}
- /**
- * Set the definition property: defines the type of alert.
- *
- * @param definition the definition value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withDefinition(AlertPropertiesDefinition definition) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withDefinition(definition);
- return this;
- }
-
/**
* Get the description property: Alert description.
*
@@ -126,20 +134,6 @@ public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
- /**
- * Set the description property: Alert description.
- *
- * @param description the description value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withDescription(String description) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withDescription(description);
- return this;
- }
-
/**
* Get the source property: Source of alert.
*
@@ -149,20 +143,6 @@ public AlertSource source() {
return this.innerProperties() == null ? null : this.innerProperties().source();
}
- /**
- * Set the source property: Source of alert.
- *
- * @param source the source value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withSource(AlertSource source) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withSource(source);
- return this;
- }
-
/**
* Get the details property: Alert details.
*
@@ -172,20 +152,6 @@ public AlertPropertiesDetails details() {
return this.innerProperties() == null ? null : this.innerProperties().details();
}
- /**
- * Set the details property: Alert details.
- *
- * @param details the details value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withDetails(AlertPropertiesDetails details) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withDetails(details);
- return this;
- }
-
/**
* Get the costEntityId property: related budget.
*
@@ -195,20 +161,6 @@ public String costEntityId() {
return this.innerProperties() == null ? null : this.innerProperties().costEntityId();
}
- /**
- * Set the costEntityId property: related budget.
- *
- * @param costEntityId the costEntityId value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withCostEntityId(String costEntityId) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withCostEntityId(costEntityId);
- return this;
- }
-
/**
* Get the status property: alert status.
*
@@ -218,20 +170,6 @@ public AlertStatus status() {
return this.innerProperties() == null ? null : this.innerProperties().status();
}
- /**
- * Set the status property: alert status.
- *
- * @param status the status value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withStatus(AlertStatus status) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withStatus(status);
- return this;
- }
-
/**
* Get the creationTime property: dateTime in which alert was created.
*
@@ -241,20 +179,6 @@ public String creationTime() {
return this.innerProperties() == null ? null : this.innerProperties().creationTime();
}
- /**
- * Set the creationTime property: dateTime in which alert was created.
- *
- * @param creationTime the creationTime value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withCreationTime(String creationTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withCreationTime(creationTime);
- return this;
- }
-
/**
* Get the closeTime property: dateTime in which alert was closed.
*
@@ -264,20 +188,6 @@ public String closeTime() {
return this.innerProperties() == null ? null : this.innerProperties().closeTime();
}
- /**
- * Set the closeTime property: dateTime in which alert was closed.
- *
- * @param closeTime the closeTime value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withCloseTime(String closeTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withCloseTime(closeTime);
- return this;
- }
-
/**
* Get the modificationTime property: dateTime in which alert was last modified.
*
@@ -287,20 +197,6 @@ public String modificationTime() {
return this.innerProperties() == null ? null : this.innerProperties().modificationTime();
}
- /**
- * Set the modificationTime property: dateTime in which alert was last modified.
- *
- * @param modificationTime the modificationTime value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withModificationTime(String modificationTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withModificationTime(modificationTime);
- return this;
- }
-
/**
* Get the statusModificationUsername property: User who last modified the alert.
*
@@ -310,20 +206,6 @@ public String statusModificationUsername() {
return this.innerProperties() == null ? null : this.innerProperties().statusModificationUsername();
}
- /**
- * Set the statusModificationUsername property: User who last modified the alert.
- *
- * @param statusModificationUsername the statusModificationUsername value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withStatusModificationUsername(String statusModificationUsername) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withStatusModificationUsername(statusModificationUsername);
- return this;
- }
-
/**
* Get the statusModificationTime property: dateTime in which the alert status was last modified.
*
@@ -333,40 +215,14 @@ public String statusModificationTime() {
return this.innerProperties() == null ? null : this.innerProperties().statusModificationTime();
}
- /**
- * Set the statusModificationTime property: dateTime in which the alert status was last modified.
- *
- * @param statusModificationTime the statusModificationTime value to set.
- * @return the AlertInner object itself.
- */
- public AlertInner withStatusModificationTime(String statusModificationTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new AlertProperties();
- }
- this.innerProperties().withStatusModificationTime(statusModificationTime);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("eTag", etag());
jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("eTag", this.etag);
return jsonWriter.writeEndObject();
}
@@ -392,10 +248,12 @@ public static AlertInner fromJson(JsonReader jsonReader) throws IOException {
deserializedAlertInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedAlertInner.type = reader.getString();
- } else if ("eTag".equals(fieldName)) {
- deserializedAlertInner.withEtag(reader.getString());
} else if ("properties".equals(fieldName)) {
deserializedAlertInner.innerProperties = AlertProperties.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedAlertInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAlertInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertProperties.java
index b5226b30d3ad3..66d54d2ede281 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertProperties.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.costmanagement.fluent.models;
@@ -301,20 +301,6 @@ public AlertProperties withStatusModificationTime(String statusModificationTime)
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (definition() != null) {
- definition().validate();
- }
- if (details() != null) {
- details().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertsResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertsResultInner.java
index d98169b9ebf78..2bc58d557b30d 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertsResultInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/AlertsResultInner.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.costmanagement.fluent.models;
@@ -30,7 +30,7 @@ public final class AlertsResultInner implements JsonSerializable e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitRecommendationModelInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitRecommendationModelInner.java
index 59e62559a3c27..eafd34349021e 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitRecommendationModelInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitRecommendationModelInner.java
@@ -1,10 +1,11 @@
// 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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -16,13 +17,23 @@
/**
* benefit plan recommendation details.
*/
-@Fluent
+@Immutable
public final class BenefitRecommendationModelInner extends BenefitResource {
/*
* The properties of the benefit recommendations.
*/
private BenefitRecommendationProperties properties;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Reservation or SavingsPlan.
+ */
+ private BenefitKind kind;
+
/*
* The type of the resource.
*/
@@ -41,7 +52,7 @@ public final class BenefitRecommendationModelInner extends BenefitResource {
/**
* Creates an instance of BenefitRecommendationModelInner class.
*/
- public BenefitRecommendationModelInner() {
+ private BenefitRecommendationModelInner() {
}
/**
@@ -54,14 +65,23 @@ public BenefitRecommendationProperties properties() {
}
/**
- * Set the properties property: The properties of the benefit recommendations.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param properties the properties value to set.
- * @return the BenefitRecommendationModelInner object itself.
+ * @return the systemData value.
*/
- public BenefitRecommendationModelInner withProperties(BenefitRecommendationProperties properties) {
- this.properties = properties;
- return this;
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the kind property: Reservation or SavingsPlan.
+ *
+ * @return the kind value.
+ */
+ @Override
+ public BenefitKind kind() {
+ return this.kind;
}
/**
@@ -94,27 +114,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public BenefitRecommendationModelInner withKind(BenefitKind kind) {
- super.withKind(kind);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -150,7 +149,9 @@ public static BenefitRecommendationModelInner fromJson(JsonReader jsonReader) th
} else if ("type".equals(fieldName)) {
deserializedBenefitRecommendationModelInner.type = reader.getString();
} else if ("kind".equals(fieldName)) {
- deserializedBenefitRecommendationModelInner.withKind(BenefitKind.fromString(reader.getString()));
+ deserializedBenefitRecommendationModelInner.kind = BenefitKind.fromString(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBenefitRecommendationModelInner.systemData = SystemData.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedBenefitRecommendationModelInner.properties
= BenefitRecommendationProperties.fromJson(reader);
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummariesOperationStatusInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummariesOperationStatusInner.java
new file mode 100644
index 0000000000000..11e17388d59cf
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummariesOperationStatusInner.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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.costmanagement.models.AsyncOperationStatusProperties;
+import com.azure.resourcemanager.costmanagement.models.BenefitUtilizationSummariesRequest;
+import com.azure.resourcemanager.costmanagement.models.OperationStatusType;
+import java.io.IOException;
+
+/**
+ * Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries Request input, status,
+ * and report sas url.
+ */
+@Immutable
+public final class BenefitUtilizationSummariesOperationStatusInner
+ implements JsonSerializable {
+ /*
+ * Input given to create the benefit utilization summaries report.
+ */
+ private BenefitUtilizationSummariesRequest input;
+
+ /*
+ * The status of the creation of the benefit utilization summaries report.
+ */
+ private OperationStatusType status;
+
+ /*
+ * Contains sas url to the async benefit utilization summaries report and a date that the url is valid until. These
+ * values will be empty if the report is in a Running or Failed state
+ */
+ private AsyncOperationStatusProperties properties;
+
+ /**
+ * Creates an instance of BenefitUtilizationSummariesOperationStatusInner class.
+ */
+ private BenefitUtilizationSummariesOperationStatusInner() {
+ }
+
+ /**
+ * Get the input property: Input given to create the benefit utilization summaries report.
+ *
+ * @return the input value.
+ */
+ public BenefitUtilizationSummariesRequest input() {
+ return this.input;
+ }
+
+ /**
+ * Get the status property: The status of the creation of the benefit utilization summaries report.
+ *
+ * @return the status value.
+ */
+ public OperationStatusType status() {
+ return this.status;
+ }
+
+ /**
+ * Get the properties property: Contains sas url to the async benefit utilization summaries report and a date that
+ * the url is valid until. These values will be empty if the report is in a Running or Failed state.
+ *
+ * @return the properties value.
+ */
+ public AsyncOperationStatusProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("input", this.input);
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BenefitUtilizationSummariesOperationStatusInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BenefitUtilizationSummariesOperationStatusInner 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 BenefitUtilizationSummariesOperationStatusInner.
+ */
+ public static BenefitUtilizationSummariesOperationStatusInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BenefitUtilizationSummariesOperationStatusInner deserializedBenefitUtilizationSummariesOperationStatusInner
+ = new BenefitUtilizationSummariesOperationStatusInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("input".equals(fieldName)) {
+ deserializedBenefitUtilizationSummariesOperationStatusInner.input
+ = BenefitUtilizationSummariesRequest.fromJson(reader);
+ } else if ("status".equals(fieldName)) {
+ deserializedBenefitUtilizationSummariesOperationStatusInner.status
+ = OperationStatusType.fromString(reader.getString());
+ } else if ("properties".equals(fieldName)) {
+ deserializedBenefitUtilizationSummariesOperationStatusInner.properties
+ = AsyncOperationStatusProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBenefitUtilizationSummariesOperationStatusInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummaryInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummaryInner.java
index 7412d43bc0910..2e931bdd21e31 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummaryInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BenefitUtilizationSummaryInner.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.costmanagement.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;
@@ -24,6 +25,11 @@ public class BenefitUtilizationSummaryInner extends ProxyResource {
*/
private BenefitKind kind = BenefitKind.fromString("BenefitUtilizationSummary");
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -42,7 +48,7 @@ public class BenefitUtilizationSummaryInner extends ProxyResource {
/**
* Creates an instance of BenefitUtilizationSummaryInner class.
*/
- public BenefitUtilizationSummaryInner() {
+ protected BenefitUtilizationSummaryInner() {
}
/**
@@ -54,6 +60,26 @@ public BenefitKind kind() {
return this.kind;
}
+ /**
+ * 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 BenefitUtilizationSummaryInner object itself.
+ */
+ BenefitUtilizationSummaryInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
+ }
+
/**
* Get the type property: The type of the resource.
*
@@ -84,14 +110,6 @@ public String id() {
return this.id;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
@@ -154,6 +172,8 @@ static BenefitUtilizationSummaryInner fromJsonKnownDiscriminator(JsonReader json
deserializedBenefitUtilizationSummaryInner.type = reader.getString();
} else if ("kind".equals(fieldName)) {
deserializedBenefitUtilizationSummaryInner.kind = BenefitKind.fromString(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBenefitUtilizationSummaryInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetInner.java
new file mode 100644
index 0000000000000..9f537ee9acb93
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetInner.java
@@ -0,0 +1,422 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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;
+import com.azure.resourcemanager.costmanagement.models.BudgetFilter;
+import com.azure.resourcemanager.costmanagement.models.BudgetTimePeriod;
+import com.azure.resourcemanager.costmanagement.models.CategoryType;
+import com.azure.resourcemanager.costmanagement.models.CurrentSpend;
+import com.azure.resourcemanager.costmanagement.models.ForecastSpend;
+import com.azure.resourcemanager.costmanagement.models.Notification;
+import com.azure.resourcemanager.costmanagement.models.TimeGrainType;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * A budget resource.
+ */
+@Fluent
+public final class BudgetInner extends ProxyResource {
+ /*
+ * The properties of the budget.
+ */
+ private BudgetProperties 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.
+ */
+ private String eTag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of BudgetInner class.
+ */
+ public BudgetInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the budget.
+ *
+ * @return the innerProperties value.
+ */
+ private BudgetProperties innerProperties() {
+ return this.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.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.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.
+ *
+ * @param eTag the eTag value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withETag(String eTag) {
+ this.eTag = 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.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the category property: The category of the budget.
+ * - 'Cost' defines a Budget.
+ * - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ *
+ * @return the category value.
+ */
+ public CategoryType category() {
+ return this.innerProperties() == null ? null : this.innerProperties().category();
+ }
+
+ /**
+ * Set the category property: The category of the budget.
+ * - 'Cost' defines a Budget.
+ * - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ *
+ * @param category the category value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withCategory(CategoryType category) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withCategory(category);
+ return this;
+ }
+
+ /**
+ * Get the amount property: The total amount of cost to track with the budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * Required for CategoryType(s): Cost.
+ *
+ * @return the amount value.
+ */
+ public Double amount() {
+ return this.innerProperties() == null ? null : this.innerProperties().amount();
+ }
+
+ /**
+ * Set the amount property: The total amount of cost to track with the budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * Required for CategoryType(s): Cost.
+ *
+ * @param amount the amount value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withAmount(Double amount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withAmount(amount);
+ return this;
+ }
+
+ /**
+ * Get the timeGrain property: The time covered by a budget. Tracking of the amount will be reset based on the time
+ * grain.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Supported timeGrainTypes for **CategoryType: Cost**
+ *
+ * - Monthly
+ * - Quarterly
+ * - Annually
+ * - BillingMonth*
+ * - BillingQuarter*
+ * - BillingAnnual*
+ *
+ * *only supported for Web Direct customers.
+ *
+ * Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ * - Last7Days
+ * - Last30Days
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the timeGrain value.
+ */
+ public TimeGrainType timeGrain() {
+ return this.innerProperties() == null ? null : this.innerProperties().timeGrain();
+ }
+
+ /**
+ * Set the timeGrain property: The time covered by a budget. Tracking of the amount will be reset based on the time
+ * grain.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Supported timeGrainTypes for **CategoryType: Cost**
+ *
+ * - Monthly
+ * - Quarterly
+ * - Annually
+ * - BillingMonth*
+ * - BillingQuarter*
+ * - BillingAnnual*
+ *
+ * *only supported for Web Direct customers.
+ *
+ * Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ * - Last7Days
+ * - Last30Days
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param timeGrain the timeGrain value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withTimeGrain(TimeGrainType timeGrain) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withTimeGrain(timeGrain);
+ return this;
+ }
+
+ /**
+ * Get the timePeriod property: The time period that defines the active period of the budget. The budget will
+ * evaluate data on or after the startDate and will expire on the endDate.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the timePeriod value.
+ */
+ public BudgetTimePeriod timePeriod() {
+ return this.innerProperties() == null ? null : this.innerProperties().timePeriod();
+ }
+
+ /**
+ * Set the timePeriod property: The time period that defines the active period of the budget. The budget will
+ * evaluate data on or after the startDate and will expire on the endDate.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param timePeriod the timePeriod value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withTimePeriod(BudgetTimePeriod timePeriod) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withTimePeriod(timePeriod);
+ return this;
+ }
+
+ /**
+ * Get the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the filter value.
+ */
+ public BudgetFilter filter() {
+ return this.innerProperties() == null ? null : this.innerProperties().filter();
+ }
+
+ /**
+ * Set the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param filter the filter value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withFilter(BudgetFilter filter) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withFilter(filter);
+ return this;
+ }
+
+ /**
+ * Get the currentSpend property: The current amount of cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * @return the currentSpend value.
+ */
+ public CurrentSpend currentSpend() {
+ return this.innerProperties() == null ? null : this.innerProperties().currentSpend();
+ }
+
+ /**
+ * Get the notifications property: Dictionary of notifications associated with the budget.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5
+ * notifications with thresholdType: Forecasted.
+ * - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not
+ * applicable.
+ *
+ * @return the notifications value.
+ */
+ public Map notifications() {
+ return this.innerProperties() == null ? null : this.innerProperties().notifications();
+ }
+
+ /**
+ * Set the notifications property: Dictionary of notifications associated with the budget.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5
+ * notifications with thresholdType: Forecasted.
+ * - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not
+ * applicable.
+ *
+ * @param notifications the notifications value to set.
+ * @return the BudgetInner object itself.
+ */
+ public BudgetInner withNotifications(Map notifications) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new BudgetProperties();
+ }
+ this.innerProperties().withNotifications(notifications);
+ return this;
+ }
+
+ /**
+ * Get the forecastSpend property: The forecasted cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * @return the forecastSpend value.
+ */
+ public ForecastSpend forecastSpend() {
+ return this.innerProperties() == null ? null : this.innerProperties().forecastSpend();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BudgetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BudgetInner 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 BudgetInner.
+ */
+ public static BudgetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BudgetInner deserializedBudgetInner = new BudgetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBudgetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBudgetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBudgetInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ 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();
+ }
+ }
+
+ return deserializedBudgetInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetProperties.java
new file mode 100644
index 0000000000000..c6b7e2f4d8358
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/BudgetProperties.java
@@ -0,0 +1,394 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.costmanagement.models.BudgetFilter;
+import com.azure.resourcemanager.costmanagement.models.BudgetTimePeriod;
+import com.azure.resourcemanager.costmanagement.models.CategoryType;
+import com.azure.resourcemanager.costmanagement.models.CurrentSpend;
+import com.azure.resourcemanager.costmanagement.models.ForecastSpend;
+import com.azure.resourcemanager.costmanagement.models.Notification;
+import com.azure.resourcemanager.costmanagement.models.TimeGrainType;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The properties of the budget.
+ */
+@Fluent
+public final class BudgetProperties implements JsonSerializable {
+ /*
+ * The category of the budget.
+ * - 'Cost' defines a Budget.
+ * - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ */
+ private CategoryType category;
+
+ /*
+ * The total amount of cost to track with the budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * Required for CategoryType(s): Cost.
+ */
+ private Double amount;
+
+ /*
+ * The time covered by a budget. Tracking of the amount will be reset based on the time grain.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Supported timeGrainTypes for **CategoryType: Cost**
+ *
+ * - Monthly
+ * - Quarterly
+ * - Annually
+ * - BillingMonth*
+ * - BillingQuarter*
+ * - BillingAnnual*
+ *
+ * *only supported for Web Direct customers.
+ *
+ * Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ * - Last7Days
+ * - Last30Days
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ */
+ private TimeGrainType timeGrain;
+
+ /*
+ * The time period that defines the active period of the budget. The budget will evaluate data on or after the
+ * startDate and will expire on the endDate.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ */
+ private BudgetTimePeriod timePeriod;
+
+ /*
+ * May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ */
+ private BudgetFilter filter;
+
+ /*
+ * The current amount of cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ */
+ private CurrentSpend currentSpend;
+
+ /*
+ * Dictionary of notifications associated with the budget.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5
+ * notifications with thresholdType: Forecasted.
+ * - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not
+ * applicable.
+ */
+ private Map notifications;
+
+ /*
+ * The forecasted cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ */
+ private ForecastSpend forecastSpend;
+
+ /**
+ * Creates an instance of BudgetProperties class.
+ */
+ public BudgetProperties() {
+ }
+
+ /**
+ * Get the category property: The category of the budget.
+ * - 'Cost' defines a Budget.
+ * - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ *
+ * @return the category value.
+ */
+ public CategoryType category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: The category of the budget.
+ * - 'Cost' defines a Budget.
+ * - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
+ *
+ * @param category the category value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withCategory(CategoryType category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the amount property: The total amount of cost to track with the budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * Required for CategoryType(s): Cost.
+ *
+ * @return the amount value.
+ */
+ public Double amount() {
+ return this.amount;
+ }
+
+ /**
+ * Set the amount property: The total amount of cost to track with the budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * Required for CategoryType(s): Cost.
+ *
+ * @param amount the amount value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withAmount(Double amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * Get the timeGrain property: The time covered by a budget. Tracking of the amount will be reset based on the time
+ * grain.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Supported timeGrainTypes for **CategoryType: Cost**
+ *
+ * - Monthly
+ * - Quarterly
+ * - Annually
+ * - BillingMonth*
+ * - BillingQuarter*
+ * - BillingAnnual*
+ *
+ * *only supported for Web Direct customers.
+ *
+ * Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ * - Last7Days
+ * - Last30Days
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the timeGrain value.
+ */
+ public TimeGrainType timeGrain() {
+ return this.timeGrain;
+ }
+
+ /**
+ * Set the timeGrain property: The time covered by a budget. Tracking of the amount will be reset based on the time
+ * grain.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Supported timeGrainTypes for **CategoryType: Cost**
+ *
+ * - Monthly
+ * - Quarterly
+ * - Annually
+ * - BillingMonth*
+ * - BillingQuarter*
+ * - BillingAnnual*
+ *
+ * *only supported for Web Direct customers.
+ *
+ * Supported timeGrainTypes for **CategoryType: ReservationUtilization**
+ * - Last7Days
+ * - Last30Days
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param timeGrain the timeGrain value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withTimeGrain(TimeGrainType timeGrain) {
+ this.timeGrain = timeGrain;
+ return this;
+ }
+
+ /**
+ * Get the timePeriod property: The time period that defines the active period of the budget. The budget will
+ * evaluate data on or after the startDate and will expire on the endDate.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the timePeriod value.
+ */
+ public BudgetTimePeriod timePeriod() {
+ return this.timePeriod;
+ }
+
+ /**
+ * Set the timePeriod property: The time period that defines the active period of the budget. The budget will
+ * evaluate data on or after the startDate and will expire on the endDate.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * Required for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param timePeriod the timePeriod value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withTimePeriod(BudgetTimePeriod timePeriod) {
+ this.timePeriod = timePeriod;
+ return this;
+ }
+
+ /**
+ * Get the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @return the filter value.
+ */
+ public BudgetFilter filter() {
+ return this.filter;
+ }
+
+ /**
+ * Set the filter property: May be used to filter budgets by user-specified dimensions and/or tags.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * @param filter the filter value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withFilter(BudgetFilter filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Get the currentSpend property: The current amount of cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * @return the currentSpend value.
+ */
+ public CurrentSpend currentSpend() {
+ return this.currentSpend;
+ }
+
+ /**
+ * Get the notifications property: Dictionary of notifications associated with the budget.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5
+ * notifications with thresholdType: Forecasted.
+ * - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not
+ * applicable.
+ *
+ * @return the notifications value.
+ */
+ public Map notifications() {
+ return this.notifications;
+ }
+
+ /**
+ * Set the notifications property: Dictionary of notifications associated with the budget.
+ *
+ * Supported for CategoryType(s): Cost, ReservationUtilization.
+ *
+ * - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5
+ * notifications with thresholdType: Forecasted.
+ * - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not
+ * applicable.
+ *
+ * @param notifications the notifications value to set.
+ * @return the BudgetProperties object itself.
+ */
+ public BudgetProperties withNotifications(Map notifications) {
+ this.notifications = notifications;
+ return this;
+ }
+
+ /**
+ * Get the forecastSpend property: The forecasted cost which is being tracked for a budget.
+ *
+ * Supported for CategoryType(s): Cost.
+ *
+ * @return the forecastSpend value.
+ */
+ public ForecastSpend forecastSpend() {
+ return this.forecastSpend;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString());
+ jsonWriter.writeStringField("timeGrain", this.timeGrain == null ? null : this.timeGrain.toString());
+ jsonWriter.writeJsonField("timePeriod", this.timePeriod);
+ jsonWriter.writeNumberField("amount", this.amount);
+ jsonWriter.writeJsonField("filter", this.filter);
+ jsonWriter.writeMapField("notifications", this.notifications, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BudgetProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BudgetProperties 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 BudgetProperties.
+ */
+ public static BudgetProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BudgetProperties deserializedBudgetProperties = new BudgetProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("category".equals(fieldName)) {
+ deserializedBudgetProperties.category = CategoryType.fromString(reader.getString());
+ } else if ("timeGrain".equals(fieldName)) {
+ deserializedBudgetProperties.timeGrain = TimeGrainType.fromString(reader.getString());
+ } else if ("timePeriod".equals(fieldName)) {
+ deserializedBudgetProperties.timePeriod = BudgetTimePeriod.fromJson(reader);
+ } else if ("amount".equals(fieldName)) {
+ deserializedBudgetProperties.amount = reader.getNullable(JsonReader::getDouble);
+ } else if ("filter".equals(fieldName)) {
+ deserializedBudgetProperties.filter = BudgetFilter.fromJson(reader);
+ } else if ("currentSpend".equals(fieldName)) {
+ deserializedBudgetProperties.currentSpend = CurrentSpend.fromJson(reader);
+ } else if ("notifications".equals(fieldName)) {
+ Map notifications = reader.readMap(reader1 -> Notification.fromJson(reader1));
+ deserializedBudgetProperties.notifications = notifications;
+ } else if ("forecastSpend".equals(fieldName)) {
+ deserializedBudgetProperties.forecastSpend = ForecastSpend.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBudgetProperties;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CheckNameAvailabilityResponseInner.java
index 3956183fc088c..65d83f93ccb4c 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CheckNameAvailabilityResponseInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CheckNameAvailabilityResponseInner.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.costmanagement.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 @@
/**
* The check availability result.
*/
-@Fluent
+@Immutable
public final class CheckNameAvailabilityResponseInner implements JsonSerializable {
/*
* Indicates if the resource name is available.
@@ -28,14 +28,14 @@ public final class CheckNameAvailabilityResponseInner implements JsonSerializabl
private CheckNameAvailabilityReason reason;
/*
- * Detailed reason why the given name is available.
+ * Detailed reason why the given name is not available.
*/
private String message;
/**
* Creates an instance of CheckNameAvailabilityResponseInner class.
*/
- public CheckNameAvailabilityResponseInner() {
+ private CheckNameAvailabilityResponseInner() {
}
/**
@@ -47,17 +47,6 @@ public Boolean nameAvailable() {
return this.nameAvailable;
}
- /**
- * Set the nameAvailable property: Indicates if the resource name is available.
- *
- * @param nameAvailable the nameAvailable value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) {
- this.nameAvailable = nameAvailable;
- return this;
- }
-
/**
* Get the reason property: The reason why the given name is not available.
*
@@ -68,18 +57,7 @@ public CheckNameAvailabilityReason reason() {
}
/**
- * Set the reason property: The reason why the given name is not available.
- *
- * @param reason the reason value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) {
- this.reason = reason;
- return this;
- }
-
- /**
- * Get the message property: Detailed reason why the given name is available.
+ * Get the message property: Detailed reason why the given name is not available.
*
* @return the message value.
*/
@@ -87,25 +65,6 @@ public String message() {
return this.message;
}
- /**
- * Set the message property: Detailed reason why the given name is available.
- *
- * @param message the message value to set.
- * @return the CheckNameAvailabilityResponseInner object itself.
- */
- public CheckNameAvailabilityResponseInner withMessage(String message) {
- this.message = message;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CommonExportPropertiesInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CommonExportPropertiesInner.java
index 2d1784a5162e9..4aeb62b7d12a5 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CommonExportPropertiesInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CommonExportPropertiesInner.java
@@ -1,18 +1,20 @@
// 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.costmanagement.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.costmanagement.models.CompressionModeType;
+import com.azure.resourcemanager.costmanagement.models.DataOverwriteBehaviorType;
import com.azure.resourcemanager.costmanagement.models.ExportDefinition;
import com.azure.resourcemanager.costmanagement.models.ExportDeliveryInfo;
+import com.azure.resourcemanager.costmanagement.models.ExportSuspensionContext;
import com.azure.resourcemanager.costmanagement.models.FormatType;
import java.io.IOException;
import java.time.OffsetDateTime;
@@ -23,7 +25,7 @@
@Fluent
public class CommonExportPropertiesInner implements JsonSerializable {
/*
- * The format of the export being delivered. Currently only 'Csv' is supported.
+ * The format of the export being delivered.
*/
private FormatType format;
@@ -44,15 +46,37 @@ public class CommonExportPropertiesInner implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("systemSuspensionContext".equals(fieldName)) {
+ deserializedCommonExportPropertiesInner.systemSuspensionContext
+ = ExportSuspensionContext.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleCheckNameAvailabilityResponseInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleCheckNameAvailabilityResponseInner.java
new file mode 100644
index 0000000000000..bfcc4a031ecc6
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleCheckNameAvailabilityResponseInner.java
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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.costmanagement.models.Reason;
+import java.io.IOException;
+
+/**
+ * The cost allocation rule check name availability response.
+ */
+@Immutable
+public final class CostAllocationRuleCheckNameAvailabilityResponseInner
+ implements JsonSerializable {
+ /*
+ * Whether this rule name is available
+ */
+ private Boolean nameAvailable;
+
+ /*
+ * The reason this name is not available
+ */
+ private Reason reason;
+
+ /*
+ * Error message if the name is not available
+ */
+ private String message;
+
+ /**
+ * Creates an instance of CostAllocationRuleCheckNameAvailabilityResponseInner class.
+ */
+ private CostAllocationRuleCheckNameAvailabilityResponseInner() {
+ }
+
+ /**
+ * Get the nameAvailable property: Whether this rule name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason this name is not available.
+ *
+ * @return the reason value.
+ */
+ public Reason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: Error message if the name is not available.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable);
+ jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString());
+ jsonWriter.writeStringField("message", this.message);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CostAllocationRuleCheckNameAvailabilityResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CostAllocationRuleCheckNameAvailabilityResponseInner 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 CostAllocationRuleCheckNameAvailabilityResponseInner.
+ */
+ public static CostAllocationRuleCheckNameAvailabilityResponseInner fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ CostAllocationRuleCheckNameAvailabilityResponseInner deserializedCostAllocationRuleCheckNameAvailabilityResponseInner
+ = new CostAllocationRuleCheckNameAvailabilityResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedCostAllocationRuleCheckNameAvailabilityResponseInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCostAllocationRuleCheckNameAvailabilityResponseInner.reason
+ = Reason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedCostAllocationRuleCheckNameAvailabilityResponseInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCostAllocationRuleCheckNameAvailabilityResponseInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleDefinitionInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleDefinitionInner.java
new file mode 100644
index 0000000000000..37329b65ec7bb
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostAllocationRuleDefinitionInner.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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;
+import com.azure.resourcemanager.costmanagement.models.CostAllocationRuleProperties;
+import java.io.IOException;
+
+/**
+ * The cost allocation rule model definition.
+ */
+@Fluent
+public final class CostAllocationRuleDefinitionInner extends ProxyResource {
+ /*
+ * Cost allocation rule properties
+ */
+ private CostAllocationRuleProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CostAllocationRuleDefinitionInner class.
+ */
+ public CostAllocationRuleDefinitionInner() {
+ }
+
+ /**
+ * Get the properties property: Cost allocation rule properties.
+ *
+ * @return the properties value.
+ */
+ public CostAllocationRuleProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Cost allocation rule properties.
+ *
+ * @param properties the properties value to set.
+ * @return the CostAllocationRuleDefinitionInner object itself.
+ */
+ public CostAllocationRuleDefinitionInner withProperties(CostAllocationRuleProperties properties) {
+ this.properties = properties;
+ 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.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CostAllocationRuleDefinitionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CostAllocationRuleDefinitionInner 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 CostAllocationRuleDefinitionInner.
+ */
+ public static CostAllocationRuleDefinitionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CostAllocationRuleDefinitionInner deserializedCostAllocationRuleDefinitionInner
+ = new CostAllocationRuleDefinitionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCostAllocationRuleDefinitionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCostAllocationRuleDefinitionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCostAllocationRuleDefinitionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCostAllocationRuleDefinitionInner.properties
+ = CostAllocationRuleProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCostAllocationRuleDefinitionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCostAllocationRuleDefinitionInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostDetailsOperationResultsInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostDetailsOperationResultsInner.java
index efe02918dae3a..f034300c505d1 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostDetailsOperationResultsInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostDetailsOperationResultsInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
@@ -23,7 +23,7 @@
/**
* The result of the long running operation for cost details Api.
*/
-@Fluent
+@Immutable
public final class CostDetailsOperationResultsInner implements JsonSerializable {
/*
* The id of the long running operation.
@@ -63,7 +63,7 @@ public final class CostDetailsOperationResultsInner implements JsonSerializable<
/**
* Creates an instance of CostDetailsOperationResultsInner class.
*/
- public CostDetailsOperationResultsInner() {
+ private CostDetailsOperationResultsInner() {
}
/**
@@ -75,17 +75,6 @@ public String id() {
return this.id;
}
- /**
- * Set the id property: The id of the long running operation.
- *
- * @param id the id value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withId(String id) {
- this.id = id;
- return this;
- }
-
/**
* Get the name property: The name of the long running operation.
*
@@ -95,17 +84,6 @@ public String name() {
return this.name;
}
- /**
- * Set the name property: The name of the long running operation.
- *
- * @param name the name value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withName(String name) {
- this.name = name;
- return this;
- }
-
/**
* Get the type property: The type of the long running operation.
*
@@ -115,17 +93,6 @@ public String type() {
return this.type;
}
- /**
- * Set the type property: The type of the long running operation.
- *
- * @param type the type value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withType(String type) {
- this.type = type;
- return this;
- }
-
/**
* Get the status property: The status of the cost details operation.
*
@@ -135,17 +102,6 @@ public CostDetailsStatusType status() {
return this.status;
}
- /**
- * Set the status property: The status of the cost details operation.
- *
- * @param status the status value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withStatus(CostDetailsStatusType status) {
- this.status = status;
- return this;
- }
-
/**
* Get the innerManifest property: The manifest of the report generated by the operation.
*
@@ -165,18 +121,6 @@ public OffsetDateTime validTill() {
return this.validTill;
}
- /**
- * Set the validTill property: The time at which report URL becomes invalid/expires in UTC e.g.
- * 2020-12-08T05:55:59.4394737Z.
- *
- * @param validTill the validTill value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withValidTill(OffsetDateTime validTill) {
- this.validTill = validTill;
- return this;
- }
-
/**
* Get the error property: The details of the error.
*
@@ -186,17 +130,6 @@ public ManagementError error() {
return this.error;
}
- /**
- * Set the error property: The details of the error.
- *
- * @param error the error value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withError(ManagementError error) {
- this.error = error;
- return this;
- }
-
/**
* Get the manifestVersion property: The Manifest version.
*
@@ -206,20 +139,6 @@ public String manifestVersion() {
return this.innerManifest() == null ? null : this.innerManifest().manifestVersion();
}
- /**
- * Set the manifestVersion property: The Manifest version.
- *
- * @param manifestVersion the manifestVersion value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withManifestVersion(String manifestVersion) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withManifestVersion(manifestVersion);
- return this;
- }
-
/**
* Get the dataFormat property: The data format of the report.
*
@@ -229,20 +148,6 @@ public CostDetailsDataFormat dataFormat() {
return this.innerManifest() == null ? null : this.innerManifest().dataFormat();
}
- /**
- * Set the dataFormat property: The data format of the report.
- *
- * @param dataFormat the dataFormat value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withDataFormat(CostDetailsDataFormat dataFormat) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withDataFormat(dataFormat);
- return this;
- }
-
/**
* Get the byteCount property: The total number of bytes in all blobs.
*
@@ -252,20 +157,6 @@ public Long byteCount() {
return this.innerManifest() == null ? null : this.innerManifest().byteCount();
}
- /**
- * Set the byteCount property: The total number of bytes in all blobs.
- *
- * @param byteCount the byteCount value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withByteCount(Long byteCount) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withByteCount(byteCount);
- return this;
- }
-
/**
* Get the blobCount property: The total number of blobs.
*
@@ -275,20 +166,6 @@ public Integer blobCount() {
return this.innerManifest() == null ? null : this.innerManifest().blobCount();
}
- /**
- * Set the blobCount property: The total number of blobs.
- *
- * @param blobCount the blobCount value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withBlobCount(Integer blobCount) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withBlobCount(blobCount);
- return this;
- }
-
/**
* Get the compressData property: Is the data in compressed format.
*
@@ -298,20 +175,6 @@ public Boolean compressData() {
return this.innerManifest() == null ? null : this.innerManifest().compressData();
}
- /**
- * Set the compressData property: Is the data in compressed format.
- *
- * @param compressData the compressData value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withCompressData(Boolean compressData) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withCompressData(compressData);
- return this;
- }
-
/**
* Get the blobs property: List of blob information generated by this operation.
*
@@ -321,20 +184,6 @@ public List blobs() {
return this.innerManifest() == null ? null : this.innerManifest().blobs();
}
- /**
- * Set the blobs property: List of blob information generated by this operation.
- *
- * @param blobs the blobs value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withBlobs(List blobs) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withBlobs(blobs);
- return this;
- }
-
/**
* Get the requestScope property: The request scope of the request.
*
@@ -344,20 +193,6 @@ public String requestScope() {
return this.innerManifest() == null ? null : this.innerManifest().requestScope();
}
- /**
- * Set the requestScope property: The request scope of the request.
- *
- * @param requestScope the requestScope value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withRequestScope(String requestScope) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withRequestScope(requestScope);
- return this;
- }
-
/**
* Get the requestBody property: The request payload body provided in Cost Details call.
*
@@ -367,31 +202,6 @@ public GenerateCostDetailsReportRequestDefinition requestBody() {
return this.innerManifest() == null ? null : this.innerManifest().requestBody();
}
- /**
- * Set the requestBody property: The request payload body provided in Cost Details call.
- *
- * @param requestBody the requestBody value to set.
- * @return the CostDetailsOperationResultsInner object itself.
- */
- public CostDetailsOperationResultsInner withRequestBody(GenerateCostDetailsReportRequestDefinition requestBody) {
- if (this.innerManifest() == null) {
- this.innerManifest = new ReportManifest();
- }
- this.innerManifest().withRequestBody(requestBody);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerManifest() != null) {
- innerManifest().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostManagementOperationInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostManagementOperationInner.java
index c1659d02e1b2e..4f2e96329e0ff 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostManagementOperationInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/CostManagementOperationInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -17,7 +17,7 @@
/**
* A Cost management REST API operation.
*/
-@Fluent
+@Immutable
public final class CostManagementOperationInner extends Operation {
/*
* Operation id: {provider}/{resource}/{operation}.
@@ -25,7 +25,7 @@ public final class CostManagementOperationInner extends Operation {
private String id;
/*
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
private ActionType actionType;
@@ -36,8 +36,13 @@ public final class CostManagementOperationInner extends Operation {
private Origin origin;
/*
- * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
- * ARM/control-plane operations.
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
*/
private Boolean isDataAction;
@@ -50,7 +55,7 @@ public final class CostManagementOperationInner extends Operation {
/**
* Creates an instance of CostManagementOperationInner class.
*/
- public CostManagementOperationInner() {
+ private CostManagementOperationInner() {
}
/**
@@ -63,8 +68,8 @@ public String id() {
}
/**
- * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
*
* @return the actionType value.
*/
@@ -84,9 +89,19 @@ public Origin origin() {
return this.origin;
}
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ @Override
+ public OperationDisplay display() {
+ return this.display;
+ }
+
/**
* Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
- * operations and "false" for ARM/control-plane operations.
+ * operations and "false" for Azure Resource Manager/control-plane operations.
*
* @return the isDataAction value.
*/
@@ -106,27 +121,6 @@ public String name() {
return this.name;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public CostManagementOperationInner withDisplay(OperationDisplay display) {
- super.withDisplay(display);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -157,7 +151,7 @@ public static CostManagementOperationInner fromJson(JsonReader jsonReader) throw
} else if ("isDataAction".equals(fieldName)) {
deserializedCostManagementOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
} else if ("display".equals(fieldName)) {
- deserializedCostManagementOperationInner.withDisplay(OperationDisplay.fromJson(reader));
+ deserializedCostManagementOperationInner.display = OperationDisplay.fromJson(reader);
} else if ("origin".equals(fieldName)) {
deserializedCostManagementOperationInner.origin = Origin.fromString(reader.getString());
} else if ("actionType".equals(fieldName)) {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionInner.java
index af954131e97d5..1399c19f94719 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -17,13 +17,18 @@
/**
* List of Dimension.
*/
-@Fluent
+@Immutable
public final class DimensionInner extends CostManagementResource {
/*
* Dimension properties.
*/
private DimensionProperties innerProperties;
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
/*
* ETag of the resource.
*/
@@ -35,24 +40,29 @@ public final class DimensionInner extends CostManagementResource {
private String sku;
/*
- * The type of the resource.
+ * Location of the resource.
+ */
+ private String location;
+
+ /*
+ * Resource type.
*/
private String type;
/*
- * The name of the resource.
+ * Resource name.
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Resource Id.
*/
private String id;
/**
* Creates an instance of DimensionInner class.
*/
- public DimensionInner() {
+ private DimensionInner() {
}
/**
@@ -64,6 +74,16 @@ private DimensionProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ @Override
+ public Map tags() {
+ return this.tags;
+ }
+
/**
* Get the etag property: ETag of the resource.
*
@@ -85,7 +105,17 @@ public String sku() {
}
/**
- * Get the type property: The type of the resource.
+ * Get the location property: Location of the resource.
+ *
+ * @return the location value.
+ */
+ @Override
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the type property: Resource type.
*
* @return the type value.
*/
@@ -95,7 +125,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Resource name.
*
* @return the name value.
*/
@@ -105,7 +135,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Resource Id.
*
* @return the id value.
*/
@@ -114,24 +144,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public DimensionInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public DimensionInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
/**
* Get the description property: Dimension description.
*
@@ -168,20 +180,6 @@ public List data() {
return this.innerProperties() == null ? null : this.innerProperties().data();
}
- /**
- * Set the data property: Dimension data.
- *
- * @param data the data value to set.
- * @return the DimensionInner object itself.
- */
- public DimensionInner withData(List data) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DimensionProperties();
- }
- this.innerProperties().withData(data);
- return this;
- }
-
/**
* Get the total property: Total number of data for the dimension.
*
@@ -227,26 +225,12 @@ public String nextLink() {
return this.innerProperties() == null ? null : this.innerProperties().nextLink();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -257,7 +241,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of DimensionInner 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 DimensionInner.
*/
public static DimensionInner fromJson(JsonReader jsonReader) throws IOException {
@@ -274,14 +257,14 @@ public static DimensionInner fromJson(JsonReader jsonReader) throws IOException
} else if ("type".equals(fieldName)) {
deserializedDimensionInner.type = reader.getString();
} else if ("location".equals(fieldName)) {
- deserializedDimensionInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedDimensionInner.withTags(tags);
+ deserializedDimensionInner.location = reader.getString();
} else if ("sku".equals(fieldName)) {
deserializedDimensionInner.sku = reader.getString();
} else if ("eTag".equals(fieldName)) {
deserializedDimensionInner.etag = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedDimensionInner.tags = tags;
} else if ("properties".equals(fieldName)) {
deserializedDimensionInner.innerProperties = DimensionProperties.fromJson(reader);
} else {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionProperties.java
index d0436d3716b45..d4eb2b20479f7 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DimensionProperties.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.costmanagement.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;
@@ -17,7 +17,7 @@
/**
* Dimension properties.
*/
-@Fluent
+@Immutable
public final class DimensionProperties implements JsonSerializable {
/*
* Dimension description.
@@ -67,7 +67,7 @@ public final class DimensionProperties implements JsonSerializable data() {
return this.data;
}
- /**
- * Set the data property: Dimension data.
- *
- * @param data the data value to set.
- * @return the DimensionProperties object itself.
- */
- public DimensionProperties withData(List data) {
- this.data = data;
- return this;
- }
-
/**
* Get the total property: Total number of data for the dimension.
*
@@ -162,14 +151,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DownloadUrlInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DownloadUrlInner.java
index 8dd1575cfae79..d0af392064b87 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DownloadUrlInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/DownloadUrlInner.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.costmanagement.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;
@@ -17,7 +17,7 @@
/**
* The URL to download the generated report.
*/
-@Fluent
+@Immutable
public final class DownloadUrlInner implements JsonSerializable {
/*
* The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.
@@ -37,7 +37,7 @@ public final class DownloadUrlInner 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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportInner.java
index 248dfe42b7f60..3e4e2239fa280 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportInner.java
@@ -1,18 +1,23 @@
// 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.costmanagement.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;
-import com.azure.resourcemanager.costmanagement.models.CostManagementProxyResource;
+import com.azure.resourcemanager.costmanagement.models.CompressionModeType;
+import com.azure.resourcemanager.costmanagement.models.DataOverwriteBehaviorType;
import com.azure.resourcemanager.costmanagement.models.ExportDefinition;
import com.azure.resourcemanager.costmanagement.models.ExportDeliveryInfo;
import com.azure.resourcemanager.costmanagement.models.ExportSchedule;
+import com.azure.resourcemanager.costmanagement.models.ExportSuspensionContext;
import com.azure.resourcemanager.costmanagement.models.FormatType;
+import com.azure.resourcemanager.costmanagement.models.SystemAssignedServiceIdentity;
import java.io.IOException;
import java.time.OffsetDateTime;
@@ -20,12 +25,33 @@
* An export resource.
*/
@Fluent
-public final class ExportInner extends CostManagementProxyResource {
+public final class ExportInner extends ProxyResource {
/*
* The properties of the export.
*/
private ExportProperties innerProperties;
+ /*
+ * The managed identity associated with Export
+ */
+ private SystemAssignedServiceIdentity identity;
+
+ /*
+ * The location of the Export's managed identity. Only required when utilizing managed identity.
+ */
+ private String location;
+
+ /*
+ * 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;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -56,6 +82,79 @@ private ExportProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the identity property: The managed identity associated with Export.
+ *
+ * @return the identity value.
+ */
+ public SystemAssignedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed identity associated with Export.
+ *
+ * @param identity the identity value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withIdentity(SystemAssignedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the Export's managed identity. Only required when utilizing managed
+ * identity.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the Export's managed identity. Only required when utilizing managed
+ * identity.
+ *
+ * @param location the location value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * 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.
+ */
+ public String etag() {
+ return this.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.
+ *
+ * @param etag the etag value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withEtag(String etag) {
+ this.etag = 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.
*
@@ -86,15 +185,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public ExportInner withEtag(String etag) {
- super.withEtag(etag);
- return this;
- }
-
/**
* Get the schedule property: Has schedule information for the export.
*
@@ -119,7 +209,7 @@ public ExportInner withSchedule(ExportSchedule schedule) {
}
/**
- * Get the format property: The format of the export being delivered. Currently only 'Csv' is supported.
+ * Get the format property: The format of the export being delivered.
*
* @return the format value.
*/
@@ -128,7 +218,7 @@ public FormatType format() {
}
/**
- * Set the format property: The format of the export being delivered. Currently only 'Csv' is supported.
+ * Set the format property: The format of the export being delivered.
*
* @param format the format value to set.
* @return the ExportInner object itself.
@@ -212,8 +302,7 @@ public ExportInner withRunHistory(ExportExecutionListResultInner runHistory) {
/**
* Get the partitionData property: If set to true, exported data will be partitioned by size and placed in a blob
- * directory together with a manifest file. Note: this option is currently available only for Microsoft Customer
- * Agreement commerce scopes.
+ * directory together with a manifest file.
*
* @return the partitionData value.
*/
@@ -223,8 +312,7 @@ public Boolean partitionData() {
/**
* Set the partitionData property: If set to true, exported data will be partitioned by size and placed in a blob
- * directory together with a manifest file. Note: this option is currently available only for Microsoft Customer
- * Agreement commerce scopes.
+ * directory together with a manifest file.
*
* @param partitionData the partitionData value to set.
* @return the ExportInner object itself.
@@ -237,6 +325,81 @@ public ExportInner withPartitionData(Boolean partitionData) {
return this;
}
+ /**
+ * Get the dataOverwriteBehavior property: Allow customers to select overwrite data(OverwritePreviousReport) for
+ * exports. This setting will enable overwrite data for the same month in customer storage account. By default set
+ * to CreateNewReport.
+ *
+ * @return the dataOverwriteBehavior value.
+ */
+ public DataOverwriteBehaviorType dataOverwriteBehavior() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataOverwriteBehavior();
+ }
+
+ /**
+ * Set the dataOverwriteBehavior property: Allow customers to select overwrite data(OverwritePreviousReport) for
+ * exports. This setting will enable overwrite data for the same month in customer storage account. By default set
+ * to CreateNewReport.
+ *
+ * @param dataOverwriteBehavior the dataOverwriteBehavior value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withDataOverwriteBehavior(DataOverwriteBehaviorType dataOverwriteBehavior) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExportProperties();
+ }
+ this.innerProperties().withDataOverwriteBehavior(dataOverwriteBehavior);
+ return this;
+ }
+
+ /**
+ * Get the compressionMode property: Allow customers to select compress data for exports. This setting will enable
+ * destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ *
+ * @return the compressionMode value.
+ */
+ public CompressionModeType compressionMode() {
+ return this.innerProperties() == null ? null : this.innerProperties().compressionMode();
+ }
+
+ /**
+ * Set the compressionMode property: Allow customers to select compress data for exports. This setting will enable
+ * destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet.
+ *
+ * @param compressionMode the compressionMode value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withCompressionMode(CompressionModeType compressionMode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExportProperties();
+ }
+ this.innerProperties().withCompressionMode(compressionMode);
+ return this;
+ }
+
+ /**
+ * Get the exportDescription property: The export description set by customer at time of export creation/update.
+ *
+ * @return the exportDescription value.
+ */
+ public String exportDescription() {
+ return this.innerProperties() == null ? null : this.innerProperties().exportDescription();
+ }
+
+ /**
+ * Set the exportDescription property: The export description set by customer at time of export creation/update.
+ *
+ * @param exportDescription the exportDescription value to set.
+ * @return the ExportInner object itself.
+ */
+ public ExportInner withExportDescription(String exportDescription) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ExportProperties();
+ }
+ this.innerProperties().withExportDescription(exportDescription);
+ return this;
+ }
+
/**
* Get the nextRunTimeEstimate property: If the export has an active schedule, provides an estimate of the next run
* time.
@@ -248,15 +411,13 @@ public OffsetDateTime nextRunTimeEstimate() {
}
/**
- * Validates the instance.
+ * Get the systemSuspensionContext property: The export suspension reason if export is in SystemSuspended state.
+ * This is not populated currently.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the systemSuspensionContext value.
*/
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public ExportSuspensionContext systemSuspensionContext() {
+ return this.innerProperties() == null ? null : this.innerProperties().systemSuspensionContext();
}
/**
@@ -265,8 +426,10 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("eTag", etag());
jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeStringField("eTag", this.etag);
return jsonWriter.writeEndObject();
}
@@ -292,10 +455,16 @@ public static ExportInner fromJson(JsonReader jsonReader) throws IOException {
deserializedExportInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedExportInner.type = reader.getString();
- } else if ("eTag".equals(fieldName)) {
- deserializedExportInner.withEtag(reader.getString());
} else if ("properties".equals(fieldName)) {
deserializedExportInner.innerProperties = ExportProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedExportInner.identity = SystemAssignedServiceIdentity.fromJson(reader);
+ } else if ("location".equals(fieldName)) {
+ deserializedExportInner.location = reader.getString();
+ } else if ("eTag".equals(fieldName)) {
+ deserializedExportInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedExportInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportListResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportListResultInner.java
index 092dcd5bebc39..a3f8a36987b42 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportListResultInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportListResultInner.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.costmanagement.fluent.models;
@@ -25,7 +25,7 @@ public final class ExportListResultInner 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/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportProperties.java
index 4748dc5cb10bb..363a7d0126a21 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportProperties.java
@@ -1,18 +1,20 @@
// 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.costmanagement.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.costmanagement.models.CompressionModeType;
+import com.azure.resourcemanager.costmanagement.models.DataOverwriteBehaviorType;
import com.azure.resourcemanager.costmanagement.models.ExportDefinition;
import com.azure.resourcemanager.costmanagement.models.ExportDeliveryInfo;
import com.azure.resourcemanager.costmanagement.models.ExportSchedule;
+import com.azure.resourcemanager.costmanagement.models.ExportSuspensionContext;
import com.azure.resourcemanager.costmanagement.models.FormatType;
import java.io.IOException;
import java.time.OffsetDateTime;
@@ -27,6 +29,11 @@ public final class ExportProperties extends CommonExportPropertiesInner {
*/
private ExportSchedule schedule;
+ /*
+ * The export suspension reason if export is in SystemSuspended state. This is not populated currently.
+ */
+ private ExportSuspensionContext systemSuspensionContext;
+
/*
* If the export has an active schedule, provides an estimate of the next run time.
*/
@@ -58,6 +65,17 @@ public ExportProperties withSchedule(ExportSchedule schedule) {
return this;
}
+ /**
+ * Get the systemSuspensionContext property: The export suspension reason if export is in SystemSuspended state.
+ * This is not populated currently.
+ *
+ * @return the systemSuspensionContext value.
+ */
+ @Override
+ public ExportSuspensionContext systemSuspensionContext() {
+ return this.systemSuspensionContext;
+ }
+
/**
* Get the nextRunTimeEstimate property: If the export has an active schedule, provides an estimate of the next run
* time.
@@ -115,33 +133,31 @@ public ExportProperties withPartitionData(Boolean partitionData) {
}
/**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * {@inheritDoc}
*/
@Override
- public void validate() {
- if (schedule() != null) {
- schedule().validate();
- }
- if (deliveryInfo() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property deliveryInfo in model ExportProperties"));
- } else {
- deliveryInfo().validate();
- }
- if (definition() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property definition in model ExportProperties"));
- } else {
- definition().validate();
- }
- if (runHistory() != null) {
- runHistory().validate();
- }
+ public ExportProperties withDataOverwriteBehavior(DataOverwriteBehaviorType dataOverwriteBehavior) {
+ super.withDataOverwriteBehavior(dataOverwriteBehavior);
+ return this;
}
- private static final ClientLogger LOGGER = new ClientLogger(ExportProperties.class);
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ExportProperties withCompressionMode(CompressionModeType compressionMode) {
+ super.withCompressionMode(compressionMode);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ExportProperties withExportDescription(String exportDescription) {
+ super.withExportDescription(exportDescription);
+ return this;
+ }
/**
* {@inheritDoc}
@@ -154,6 +170,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("format", format() == null ? null : format().toString());
jsonWriter.writeJsonField("runHistory", runHistory());
jsonWriter.writeBooleanField("partitionData", partitionData());
+ jsonWriter.writeStringField("dataOverwriteBehavior",
+ dataOverwriteBehavior() == null ? null : dataOverwriteBehavior().toString());
+ jsonWriter.writeStringField("compressionMode", compressionMode() == null ? null : compressionMode().toString());
+ jsonWriter.writeStringField("exportDescription", exportDescription());
jsonWriter.writeJsonField("schedule", this.schedule);
return jsonWriter.writeEndObject();
}
@@ -184,9 +204,19 @@ public static ExportProperties fromJson(JsonReader jsonReader) throws IOExceptio
deserializedExportProperties.withRunHistory(ExportExecutionListResultInner.fromJson(reader));
} else if ("partitionData".equals(fieldName)) {
deserializedExportProperties.withPartitionData(reader.getNullable(JsonReader::getBoolean));
+ } else if ("dataOverwriteBehavior".equals(fieldName)) {
+ deserializedExportProperties
+ .withDataOverwriteBehavior(DataOverwriteBehaviorType.fromString(reader.getString()));
+ } else if ("compressionMode".equals(fieldName)) {
+ deserializedExportProperties
+ .withCompressionMode(CompressionModeType.fromString(reader.getString()));
+ } else if ("exportDescription".equals(fieldName)) {
+ deserializedExportProperties.withExportDescription(reader.getString());
} else if ("nextRunTimeEstimate".equals(fieldName)) {
deserializedExportProperties.nextRunTimeEstimate = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("systemSuspensionContext".equals(fieldName)) {
+ deserializedExportProperties.systemSuspensionContext = ExportSuspensionContext.fromJson(reader);
} else if ("schedule".equals(fieldName)) {
deserializedExportProperties.schedule = ExportSchedule.fromJson(reader);
} else {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunInner.java
index c4fc5b5961aa2..b8014c9293168 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.exception.ManagementError;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
@@ -18,7 +18,7 @@
/**
* An export run.
*/
-@Fluent
+@Immutable
public final class ExportRunInner extends CostManagementProxyResource {
/*
* The properties of the export run.
@@ -26,24 +26,30 @@ public final class ExportRunInner extends CostManagementProxyResource {
private ExportRunPropertiesInner innerProperties;
/*
- * The type of 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;
+
+ /*
+ * Resource type.
*/
private String type;
/*
- * The name of the resource.
+ * Resource name.
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Resource Id.
*/
private String id;
/**
* Creates an instance of ExportRunInner class.
*/
- public ExportRunInner() {
+ private ExportRunInner() {
}
/**
@@ -56,7 +62,18 @@ private ExportRunPropertiesInner innerProperties() {
}
/**
- * Get the type property: The type of 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.
+ */
+ @Override
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the type property: Resource type.
*
* @return the type value.
*/
@@ -66,7 +83,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Resource name.
*
* @return the name value.
*/
@@ -76,7 +93,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Resource Id.
*
* @return the id value.
*/
@@ -85,15 +102,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public ExportRunInner withEtag(String etag) {
- super.withEtag(etag);
- return this;
- }
-
/**
* Get the executionType property: The type of the export run.
*
@@ -103,20 +111,6 @@ public ExecutionType executionType() {
return this.innerProperties() == null ? null : this.innerProperties().executionType();
}
- /**
- * Set the executionType property: The type of the export run.
- *
- * @param executionType the executionType value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withExecutionType(ExecutionType executionType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withExecutionType(executionType);
- return this;
- }
-
/**
* Get the status property: The last known status of the export run.
*
@@ -126,20 +120,6 @@ public ExecutionStatus status() {
return this.innerProperties() == null ? null : this.innerProperties().status();
}
- /**
- * Set the status property: The last known status of the export run.
- *
- * @param status the status value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withStatus(ExecutionStatus status) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withStatus(status);
- return this;
- }
-
/**
* Get the submittedBy property: The identifier for the entity that triggered the export. For on-demand runs it is
* the user email. For scheduled runs it is 'System'.
@@ -150,21 +130,6 @@ public String submittedBy() {
return this.innerProperties() == null ? null : this.innerProperties().submittedBy();
}
- /**
- * Set the submittedBy property: The identifier for the entity that triggered the export. For on-demand runs it is
- * the user email. For scheduled runs it is 'System'.
- *
- * @param submittedBy the submittedBy value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withSubmittedBy(String submittedBy) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withSubmittedBy(submittedBy);
- return this;
- }
-
/**
* Get the submittedTime property: The time when export was queued to be run.
*
@@ -174,20 +139,6 @@ public OffsetDateTime submittedTime() {
return this.innerProperties() == null ? null : this.innerProperties().submittedTime();
}
- /**
- * Set the submittedTime property: The time when export was queued to be run.
- *
- * @param submittedTime the submittedTime value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withSubmittedTime(OffsetDateTime submittedTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withSubmittedTime(submittedTime);
- return this;
- }
-
/**
* Get the processingStartTime property: The time when export was picked up to be run.
*
@@ -198,40 +149,30 @@ public OffsetDateTime processingStartTime() {
}
/**
- * Set the processingStartTime property: The time when export was picked up to be run.
+ * Get the processingEndTime property: The time when the export run finished.
*
- * @param processingStartTime the processingStartTime value to set.
- * @return the ExportRunInner object itself.
+ * @return the processingEndTime value.
*/
- public ExportRunInner withProcessingStartTime(OffsetDateTime processingStartTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withProcessingStartTime(processingStartTime);
- return this;
+ public OffsetDateTime processingEndTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().processingEndTime();
}
/**
- * Get the processingEndTime property: The time when the export run finished.
+ * Get the startDate property: The start datetime for the export.
*
- * @return the processingEndTime value.
+ * @return the startDate value.
*/
- public OffsetDateTime processingEndTime() {
- return this.innerProperties() == null ? null : this.innerProperties().processingEndTime();
+ public OffsetDateTime startDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().startDate();
}
/**
- * Set the processingEndTime property: The time when the export run finished.
+ * Get the endDate property: The end datetime for the export.
*
- * @param processingEndTime the processingEndTime value to set.
- * @return the ExportRunInner object itself.
+ * @return the endDate value.
*/
- public ExportRunInner withProcessingEndTime(OffsetDateTime processingEndTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withProcessingEndTime(processingEndTime);
- return this;
+ public OffsetDateTime endDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().endDate();
}
/**
@@ -244,17 +185,12 @@ public String fileName() {
}
/**
- * Set the fileName property: The name of the exported file.
+ * Get the manifestFile property: The manifest file location(URI location) for the exported files.
*
- * @param fileName the fileName value to set.
- * @return the ExportRunInner object itself.
+ * @return the manifestFile value.
*/
- public ExportRunInner withFileName(String fileName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withFileName(fileName);
- return this;
+ public String manifestFile() {
+ return this.innerProperties() == null ? null : this.innerProperties().manifestFile();
}
/**
@@ -266,20 +202,6 @@ public CommonExportPropertiesInner runSettings() {
return this.innerProperties() == null ? null : this.innerProperties().runSettings();
}
- /**
- * Set the runSettings property: The export settings that were in effect for this run.
- *
- * @param runSettings the runSettings value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withRunSettings(CommonExportPropertiesInner runSettings) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withRunSettings(runSettings);
- return this;
- }
-
/**
* Get the error property: The details of any error.
*
@@ -289,32 +211,6 @@ public ManagementError error() {
return this.innerProperties() == null ? null : this.innerProperties().error();
}
- /**
- * Set the error property: The details of any error.
- *
- * @param error the error value to set.
- * @return the ExportRunInner object itself.
- */
- public ExportRunInner withError(ManagementError error) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ExportRunPropertiesInner();
- }
- this.innerProperties().withError(error);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -332,7 +228,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of ExportRunInner 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 ExportRunInner.
*/
public static ExportRunInner fromJson(JsonReader jsonReader) throws IOException {
@@ -349,7 +244,7 @@ public static ExportRunInner fromJson(JsonReader jsonReader) throws IOException
} else if ("type".equals(fieldName)) {
deserializedExportRunInner.type = reader.getString();
} else if ("eTag".equals(fieldName)) {
- deserializedExportRunInner.withEtag(reader.getString());
+ deserializedExportRunInner.etag = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedExportRunInner.innerProperties = ExportRunPropertiesInner.fromJson(reader);
} else {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunPropertiesInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunPropertiesInner.java
index cdfceb5445949..0529619bfbce5 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunPropertiesInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ExportRunPropertiesInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
@@ -20,7 +20,7 @@
/**
* The properties of the export run.
*/
-@Fluent
+@Immutable
public final class ExportRunPropertiesInner implements JsonSerializable {
/*
* The type of the export run.
@@ -53,11 +53,26 @@ public final class ExportRunPropertiesInner implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("startDate".equals(fieldName)) {
+ deserializedExportRunPropertiesInner.startDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endDate".equals(fieldName)) {
+ deserializedExportRunPropertiesInner.endDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("fileName".equals(fieldName)) {
deserializedExportRunPropertiesInner.fileName = reader.getString();
+ } else if ("manifestFile".equals(fieldName)) {
+ deserializedExportRunPropertiesInner.manifestFile = reader.getString();
} else if ("runSettings".equals(fieldName)) {
deserializedExportRunPropertiesInner.runSettings = CommonExportPropertiesInner.fromJson(reader);
} else if ("error".equals(fieldName)) {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastProperties.java
index 69483adf4e7d8..edb324fba74a3 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastProperties.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.costmanagement.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 @@
/**
* Forecast properties.
*/
-@Fluent
+@Immutable
public final class ForecastProperties implements JsonSerializable {
/*
* The link (url) to the next page of results.
@@ -36,7 +36,7 @@ public final class ForecastProperties implements JsonSerializable columns() {
return this.columns;
}
- /**
- * Set the columns property: Array of columns.
- *
- * @param columns the columns value to set.
- * @return the ForecastProperties object itself.
- */
- public ForecastProperties withColumns(List columns) {
- this.columns = columns;
- return this;
- }
-
/**
* Get the rows property: Array of rows.
*
@@ -88,28 +66,6 @@ public List> rows() {
return this.rows;
}
- /**
- * Set the rows property: Array of rows.
- *
- * @param rows the rows value to set.
- * @return the ForecastProperties object itself.
- */
- public ForecastProperties withRows(List> rows) {
- this.rows = rows;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (columns() != null) {
- columns().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastResultInner.java
index 6a35728b373e7..f78e29762a308 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastResultInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ForecastResultInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -17,13 +17,18 @@
/**
* Result of forecast. It contains all columns listed under groupings and aggregation.
*/
-@Fluent
+@Immutable
public final class ForecastResultInner extends CostManagementResource {
/*
* Forecast properties
*/
private ForecastProperties innerProperties;
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
/*
* ETag of the resource.
*/
@@ -35,24 +40,29 @@ public final class ForecastResultInner extends CostManagementResource {
private String sku;
/*
- * The type of the resource.
+ * Location of the resource.
+ */
+ private String location;
+
+ /*
+ * Resource type.
*/
private String type;
/*
- * The name of the resource.
+ * Resource name.
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Resource Id.
*/
private String id;
/**
* Creates an instance of ForecastResultInner class.
*/
- public ForecastResultInner() {
+ private ForecastResultInner() {
}
/**
@@ -64,6 +74,16 @@ private ForecastProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ @Override
+ public Map tags() {
+ return this.tags;
+ }
+
/**
* Get the etag property: ETag of the resource.
*
@@ -85,7 +105,17 @@ public String sku() {
}
/**
- * Get the type property: The type of the resource.
+ * Get the location property: Location of the resource.
+ *
+ * @return the location value.
+ */
+ @Override
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the type property: Resource type.
*
* @return the type value.
*/
@@ -95,7 +125,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Resource name.
*
* @return the name value.
*/
@@ -105,7 +135,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Resource Id.
*
* @return the id value.
*/
@@ -114,24 +144,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public ForecastResultInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ForecastResultInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
/**
* Get the nextLink property: The link (url) to the next page of results.
*
@@ -141,20 +153,6 @@ public String nextLink() {
return this.innerProperties() == null ? null : this.innerProperties().nextLink();
}
- /**
- * Set the nextLink property: The link (url) to the next page of results.
- *
- * @param nextLink the nextLink value to set.
- * @return the ForecastResultInner object itself.
- */
- public ForecastResultInner withNextLink(String nextLink) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ForecastProperties();
- }
- this.innerProperties().withNextLink(nextLink);
- return this;
- }
-
/**
* Get the columns property: Array of columns.
*
@@ -164,20 +162,6 @@ public List columns() {
return this.innerProperties() == null ? null : this.innerProperties().columns();
}
- /**
- * Set the columns property: Array of columns.
- *
- * @param columns the columns value to set.
- * @return the ForecastResultInner object itself.
- */
- public ForecastResultInner withColumns(List columns) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ForecastProperties();
- }
- this.innerProperties().withColumns(columns);
- return this;
- }
-
/**
* Get the rows property: Array of rows.
*
@@ -187,40 +171,12 @@ public List> rows() {
return this.innerProperties() == null ? null : this.innerProperties().rows();
}
- /**
- * Set the rows property: Array of rows.
- *
- * @param rows the rows value to set.
- * @return the ForecastResultInner object itself.
- */
- public ForecastResultInner withRows(List> rows) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ForecastProperties();
- }
- this.innerProperties().withRows(rows);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -231,7 +187,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of ForecastResultInner 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 ForecastResultInner.
*/
public static ForecastResultInner fromJson(JsonReader jsonReader) throws IOException {
@@ -248,14 +203,14 @@ public static ForecastResultInner fromJson(JsonReader jsonReader) throws IOExcep
} else if ("type".equals(fieldName)) {
deserializedForecastResultInner.type = reader.getString();
} else if ("location".equals(fieldName)) {
- deserializedForecastResultInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedForecastResultInner.withTags(tags);
+ deserializedForecastResultInner.location = reader.getString();
} else if ("sku".equals(fieldName)) {
deserializedForecastResultInner.sku = reader.getString();
} else if ("eTag".equals(fieldName)) {
deserializedForecastResultInner.etag = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedForecastResultInner.tags = tags;
} else if ("properties".equals(fieldName)) {
deserializedForecastResultInner.innerProperties = ForecastProperties.fromJson(reader);
} else {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationResultInner.java
index 193b14e369cd6..135f0d9fec84b 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationResultInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationResultInner.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.costmanagement.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.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
@@ -15,102 +16,85 @@
/**
* The result of the long running operation for cost detailed report.
*/
-@Fluent
-public final class GenerateDetailedCostReportOperationResultInner
- implements JsonSerializable {
+@Immutable
+public final class GenerateDetailedCostReportOperationResultInner extends ProxyResource {
/*
- * The ARM resource id of the long running operation.
+ * The properties of the resource generated.
*/
- private String id;
+ private DownloadUrlInner innerProperties;
/*
- * The name of the long running operation.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private String name;
+ private SystemData systemData;
/*
- * The type of the long running operation.
+ * The type of the resource.
*/
private String type;
/*
- * The properties of the resource generated.
- */
- private DownloadUrlInner innerProperties;
-
- /**
- * Creates an instance of GenerateDetailedCostReportOperationResultInner class.
+ * The name of the resource.
*/
- public GenerateDetailedCostReportOperationResultInner() {
- }
+ private String name;
- /**
- * Get the id property: The ARM resource id of the long running operation.
- *
- * @return the id value.
+ /*
+ * Fully qualified resource Id for the resource.
*/
- public String id() {
- return this.id;
- }
+ private String id;
/**
- * Set the id property: The ARM resource id of the long running operation.
- *
- * @param id the id value to set.
- * @return the GenerateDetailedCostReportOperationResultInner object itself.
+ * Creates an instance of GenerateDetailedCostReportOperationResultInner class.
*/
- public GenerateDetailedCostReportOperationResultInner withId(String id) {
- this.id = id;
- return this;
+ private GenerateDetailedCostReportOperationResultInner() {
}
/**
- * Get the name property: The name of the long running operation.
+ * Get the innerProperties property: The properties of the resource generated.
*
- * @return the name value.
+ * @return the innerProperties value.
*/
- public String name() {
- return this.name;
+ private DownloadUrlInner innerProperties() {
+ return this.innerProperties;
}
/**
- * Set the name property: The name of the long running operation.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param name the name value to set.
- * @return the GenerateDetailedCostReportOperationResultInner object itself.
+ * @return the systemData value.
*/
- public GenerateDetailedCostReportOperationResultInner withName(String name) {
- this.name = name;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the type property: The type of the long running operation.
+ * Get the type property: The type of the resource.
*
* @return the type value.
*/
+ @Override
public String type() {
return this.type;
}
/**
- * Set the type property: The type of the long running operation.
+ * Get the name property: The name of the resource.
*
- * @param type the type value to set.
- * @return the GenerateDetailedCostReportOperationResultInner object itself.
+ * @return the name value.
*/
- public GenerateDetailedCostReportOperationResultInner withType(String type) {
- this.type = type;
- return this;
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the innerProperties property: The properties of the resource generated.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the innerProperties value.
+ * @return the id value.
*/
- private DownloadUrlInner innerProperties() {
- return this.innerProperties;
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -133,21 +117,6 @@ public OffsetDateTime validTill() {
return this.innerProperties() == null ? null : this.innerProperties().validTill();
}
- /**
- * Set the validTill property: The time at which report URL becomes invalid/expires in UTC e.g.
- * 2020-12-08T05:55:59.4394737Z.
- *
- * @param validTill the validTill value to set.
- * @return the GenerateDetailedCostReportOperationResultInner object itself.
- */
- public GenerateDetailedCostReportOperationResultInner withValidTill(OffsetDateTime validTill) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DownloadUrlInner();
- }
- this.innerProperties().withValidTill(validTill);
- return this;
- }
-
/**
* Get the downloadUrl property: The URL to download the generated report.
*
@@ -157,40 +126,12 @@ public String downloadUrl() {
return this.innerProperties() == null ? null : this.innerProperties().downloadUrl();
}
- /**
- * Set the downloadUrl property: The URL to download the generated report.
- *
- * @param downloadUrl the downloadUrl value to set.
- * @return the GenerateDetailedCostReportOperationResultInner object itself.
- */
- public GenerateDetailedCostReportOperationResultInner withDownloadUrl(String downloadUrl) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DownloadUrlInner();
- }
- this.innerProperties().withDownloadUrl(downloadUrl);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("id", this.id);
- jsonWriter.writeStringField("name", this.name);
- jsonWriter.writeStringField("type", this.type);
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -201,6 +142,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of GenerateDetailedCostReportOperationResultInner 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 GenerateDetailedCostReportOperationResultInner.
*/
public static GenerateDetailedCostReportOperationResultInner fromJson(JsonReader jsonReader) throws IOException {
@@ -220,6 +162,8 @@ public static GenerateDetailedCostReportOperationResultInner fromJson(JsonReader
} else if ("properties".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationResultInner.innerProperties
= DownloadUrlInner.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedGenerateDetailedCostReportOperationResultInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationStatusesInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationStatusesInner.java
index b92601abe37ac..48dce15374d94 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationStatusesInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/GenerateDetailedCostReportOperationStatusesInner.java
@@ -1,13 +1,14 @@
// 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.costmanagement.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.core.management.exception.ManagementError;
import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.costmanagement.models.Status;
@@ -17,18 +18,12 @@
/**
* The status of the long running operation for cost detailed report.
*/
-@Fluent
-public final class GenerateDetailedCostReportOperationStatusesInner
- implements JsonSerializable {
+@Immutable
+public final class GenerateDetailedCostReportOperationStatusesInner extends ProxyResource {
/*
- * The ID of the long running operation.
- */
- private String id;
-
- /*
- * The name of the long running operation.
+ * The properties of the usage file generated.
*/
- private String name;
+ private DownloadUrlInner innerProperties;
/*
* The status of the long running operation.
@@ -45,65 +40,44 @@ public final class GenerateDetailedCostReportOperationStatusesInner
*/
private String endTime;
- /*
- * The type of the long running operation.
- */
- private String type;
-
/*
* The details of the error.
*/
private ManagementError error;
/*
- * The properties of the usage file generated.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- private DownloadUrlInner innerProperties;
+ private SystemData systemData;
- /**
- * Creates an instance of GenerateDetailedCostReportOperationStatusesInner class.
+ /*
+ * The type of the resource.
*/
- public GenerateDetailedCostReportOperationStatusesInner() {
- }
+ private String type;
- /**
- * Get the id property: The ID of the long running operation.
- *
- * @return the id value.
+ /*
+ * The name of the resource.
*/
- public String id() {
- return this.id;
- }
+ private String name;
- /**
- * Set the id property: The ID of the long running operation.
- *
- * @param id the id value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
+ /*
+ * Fully qualified resource Id for the resource.
*/
- public GenerateDetailedCostReportOperationStatusesInner withId(String id) {
- this.id = id;
- return this;
- }
+ private String id;
/**
- * Get the name property: The name of the long running operation.
- *
- * @return the name value.
+ * Creates an instance of GenerateDetailedCostReportOperationStatusesInner class.
*/
- public String name() {
- return this.name;
+ private GenerateDetailedCostReportOperationStatusesInner() {
}
/**
- * Set the name property: The name of the long running operation.
+ * Get the innerProperties property: The properties of the usage file generated.
*
- * @param name the name value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
+ * @return the innerProperties value.
*/
- public GenerateDetailedCostReportOperationStatusesInner withName(String name) {
- this.name = name;
- return this;
+ private DownloadUrlInner innerProperties() {
+ return this.innerProperties;
}
/**
@@ -115,17 +89,6 @@ public Status status() {
return this.status;
}
- /**
- * Set the status property: The status of the long running operation.
- *
- * @param status the status value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
- */
- public GenerateDetailedCostReportOperationStatusesInner withStatus(Status status) {
- this.status = status;
- return this;
- }
-
/**
* Get the startTime property: The startTime of the operation.
*
@@ -135,17 +98,6 @@ public String startTime() {
return this.startTime;
}
- /**
- * Set the startTime property: The startTime of the operation.
- *
- * @param startTime the startTime value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
- */
- public GenerateDetailedCostReportOperationStatusesInner withStartTime(String startTime) {
- this.startTime = startTime;
- return this;
- }
-
/**
* Get the endTime property: The endTime of the operation.
*
@@ -156,63 +108,51 @@ public String endTime() {
}
/**
- * Set the endTime property: The endTime of the operation.
- *
- * @param endTime the endTime value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
- */
- public GenerateDetailedCostReportOperationStatusesInner withEndTime(String endTime) {
- this.endTime = endTime;
- return this;
- }
-
- /**
- * Get the type property: The type of the long running operation.
+ * Get the error property: The details of the error.
*
- * @return the type value.
+ * @return the error value.
*/
- public String type() {
- return this.type;
+ public ManagementError error() {
+ return this.error;
}
/**
- * Set the type property: The type of the long running operation.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
- * @param type the type value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
+ * @return the systemData value.
*/
- public GenerateDetailedCostReportOperationStatusesInner withType(String type) {
- this.type = type;
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Get the error property: The details of the error.
+ * Get the type property: The type of the resource.
*
- * @return the error value.
+ * @return the type value.
*/
- public ManagementError error() {
- return this.error;
+ @Override
+ public String type() {
+ return this.type;
}
/**
- * Set the error property: The details of the error.
+ * Get the name property: The name of the resource.
*
- * @param error the error value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
+ * @return the name value.
*/
- public GenerateDetailedCostReportOperationStatusesInner withError(ManagementError error) {
- this.error = error;
- return this;
+ @Override
+ public String name() {
+ return this.name;
}
/**
- * Get the innerProperties property: The properties of the usage file generated.
+ * Get the id property: Fully qualified resource Id for the resource.
*
- * @return the innerProperties value.
+ * @return the id value.
*/
- private DownloadUrlInner innerProperties() {
- return this.innerProperties;
+ @Override
+ public String id() {
+ return this.id;
}
/**
@@ -235,21 +175,6 @@ public OffsetDateTime validTill() {
return this.innerProperties() == null ? null : this.innerProperties().validTill();
}
- /**
- * Set the validTill property: The time at which report URL becomes invalid/expires in UTC e.g.
- * 2020-12-08T05:55:59.4394737Z.
- *
- * @param validTill the validTill value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
- */
- public GenerateDetailedCostReportOperationStatusesInner withValidTill(OffsetDateTime validTill) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DownloadUrlInner();
- }
- this.innerProperties().withValidTill(validTill);
- return this;
- }
-
/**
* Get the downloadUrl property: The URL to download the generated report.
*
@@ -259,48 +184,17 @@ public String downloadUrl() {
return this.innerProperties() == null ? null : this.innerProperties().downloadUrl();
}
- /**
- * Set the downloadUrl property: The URL to download the generated report.
- *
- * @param downloadUrl the downloadUrl value to set.
- * @return the GenerateDetailedCostReportOperationStatusesInner object itself.
- */
- public GenerateDetailedCostReportOperationStatusesInner withDownloadUrl(String downloadUrl) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DownloadUrlInner();
- }
- this.innerProperties().withDownloadUrl(downloadUrl);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (status() != null) {
- status().validate();
- }
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("id", this.id);
- jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
jsonWriter.writeJsonField("status", this.status);
jsonWriter.writeStringField("startTime", this.startTime);
jsonWriter.writeStringField("endTime", this.endTime);
- jsonWriter.writeStringField("type", this.type);
jsonWriter.writeJsonField("error", this.error);
- jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -310,6 +204,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of GenerateDetailedCostReportOperationStatusesInner 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 GenerateDetailedCostReportOperationStatusesInner.
*/
public static GenerateDetailedCostReportOperationStatusesInner fromJson(JsonReader jsonReader) throws IOException {
@@ -324,20 +219,23 @@ public static GenerateDetailedCostReportOperationStatusesInner fromJson(JsonRead
deserializedGenerateDetailedCostReportOperationStatusesInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationStatusesInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedGenerateDetailedCostReportOperationStatusesInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedGenerateDetailedCostReportOperationStatusesInner.innerProperties
+ = DownloadUrlInner.fromJson(reader);
} else if ("status".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationStatusesInner.status = Status.fromJson(reader);
} else if ("startTime".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationStatusesInner.startTime = reader.getString();
} else if ("endTime".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationStatusesInner.endTime = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedGenerateDetailedCostReportOperationStatusesInner.type = reader.getString();
} else if ("error".equals(fieldName)) {
deserializedGenerateDetailedCostReportOperationStatusesInner.error
= ManagementError.fromJson(reader);
- } else if ("properties".equals(fieldName)) {
- deserializedGenerateDetailedCostReportOperationStatusesInner.innerProperties
- = DownloadUrlInner.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedGenerateDetailedCostReportOperationStatusesInner.systemData
+ = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/IncludedQuantityUtilizationSummaryProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/IncludedQuantityUtilizationSummaryProperties.java
index dbfe95c2b38c9..35d50978a0f25 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/IncludedQuantityUtilizationSummaryProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/IncludedQuantityUtilizationSummaryProperties.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.costmanagement.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.JsonToken;
@@ -18,7 +18,7 @@
/**
* Included Quantity utilization summary properties.
*/
-@Fluent
+@Immutable
public final class IncludedQuantityUtilizationSummaryProperties extends BenefitUtilizationSummaryProperties {
/*
* This is the utilized percentage for the benefit ID.
@@ -31,6 +31,11 @@ public final class IncludedQuantityUtilizationSummaryProperties extends BenefitU
*/
private OffsetDateTime usageDate;
+ /*
+ * The benefit type. Supported values: 'SavingsPlan'.
+ */
+ private BenefitKind benefitType;
+
/*
* The benefit order ID is the identifier for a benefit purchase.
*/
@@ -49,7 +54,7 @@ public final class IncludedQuantityUtilizationSummaryProperties extends BenefitU
/**
* Creates an instance of IncludedQuantityUtilizationSummaryProperties class.
*/
- public IncludedQuantityUtilizationSummaryProperties() {
+ private IncludedQuantityUtilizationSummaryProperties() {
}
/**
@@ -72,6 +77,16 @@ public OffsetDateTime usageDate() {
return this.usageDate;
}
+ /**
+ * Get the benefitType property: The benefit type. Supported values: 'SavingsPlan'.
+ *
+ * @return the benefitType value.
+ */
+ @Override
+ public BenefitKind benefitType() {
+ return this.benefitType;
+ }
+
/**
* Get the benefitOrderId property: The benefit order ID is the identifier for a benefit purchase.
*
@@ -102,24 +117,6 @@ public String armSkuName() {
return this.armSkuName;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public IncludedQuantityUtilizationSummaryProperties withBenefitType(BenefitKind benefitType) {
- super.withBenefitType(benefitType);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
@@ -153,8 +150,8 @@ public static IncludedQuantityUtilizationSummaryProperties fromJson(JsonReader j
} else if ("benefitOrderId".equals(fieldName)) {
deserializedIncludedQuantityUtilizationSummaryProperties.benefitOrderId = reader.getString();
} else if ("benefitType".equals(fieldName)) {
- deserializedIncludedQuantityUtilizationSummaryProperties
- .withBenefitType(BenefitKind.fromString(reader.getString()));
+ deserializedIncludedQuantityUtilizationSummaryProperties.benefitType
+ = BenefitKind.fromString(reader.getString());
} else if ("usageDate".equals(fieldName)) {
deserializedIncludedQuantityUtilizationSummaryProperties.usageDate = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/MarkupRuleInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/MarkupRuleInner.java
new file mode 100644
index 0000000000000..194e096e6c9a2
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/MarkupRuleInner.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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;
+import com.azure.resourcemanager.costmanagement.models.MarkupRuleProperties;
+import java.io.IOException;
+
+/**
+ * Markup rule.
+ */
+@Fluent
+public final class MarkupRuleInner extends ProxyResource {
+ /*
+ * Markup rule properties
+ */
+ private MarkupRuleProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of MarkupRuleInner class.
+ */
+ public MarkupRuleInner() {
+ }
+
+ /**
+ * Get the properties property: Markup rule properties.
+ *
+ * @return the properties value.
+ */
+ public MarkupRuleProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Markup rule properties.
+ *
+ * @param properties the properties value to set.
+ * @return the MarkupRuleInner object itself.
+ */
+ public MarkupRuleInner withProperties(MarkupRuleProperties properties) {
+ this.properties = properties;
+ 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.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MarkupRuleInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MarkupRuleInner 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 MarkupRuleInner.
+ */
+ public static MarkupRuleInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MarkupRuleInner deserializedMarkupRuleInner = new MarkupRuleInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMarkupRuleInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMarkupRuleInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMarkupRuleInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedMarkupRuleInner.properties = MarkupRuleProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMarkupRuleInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMarkupRuleInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/OperationStatusInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/OperationStatusInner.java
index 557ede45af191..5e42cdba8f41e 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/OperationStatusInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/OperationStatusInner.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.costmanagement.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;
@@ -17,7 +17,7 @@
/**
* The status of the long running operation.
*/
-@Fluent
+@Immutable
public final class OperationStatusInner implements JsonSerializable {
/*
* The status of the long running operation.
@@ -32,7 +32,7 @@ public final class OperationStatusInner implements JsonSerializable {
+ /*
+ * The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.
+ */
+ private OffsetDateTime expiryTime;
+
+ /*
+ * The URL to download the generated report.
+ */
+ private String downloadUrl;
+
+ /*
+ * The properties in downloaded file
+ */
+ private MCAPriceSheetProperties downloadFileProperties;
+
+ /**
+ * Creates an instance of PricesheetDownloadPropertiesInner class.
+ */
+ private PricesheetDownloadPropertiesInner() {
+ }
+
+ /**
+ * Get the expiryTime property: The time at which report URL becomes invalid/expires in UTC e.g.
+ * 2020-12-08T05:55:59.4394737Z.
+ *
+ * @return the expiryTime value.
+ */
+ public OffsetDateTime expiryTime() {
+ return this.expiryTime;
+ }
+
+ /**
+ * Get the downloadUrl property: The URL to download the generated report.
+ *
+ * @return the downloadUrl value.
+ */
+ public String downloadUrl() {
+ return this.downloadUrl;
+ }
+
+ /**
+ * Get the downloadFileProperties property: The properties in downloaded file.
+ *
+ * @return the downloadFileProperties value.
+ */
+ public MCAPriceSheetProperties downloadFileProperties() {
+ return this.downloadFileProperties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("downloadUrl", this.downloadUrl);
+ jsonWriter.writeJsonField("downloadFileProperties", this.downloadFileProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PricesheetDownloadPropertiesInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PricesheetDownloadPropertiesInner 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 PricesheetDownloadPropertiesInner.
+ */
+ public static PricesheetDownloadPropertiesInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PricesheetDownloadPropertiesInner deserializedPricesheetDownloadPropertiesInner
+ = new PricesheetDownloadPropertiesInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("expiryTime".equals(fieldName)) {
+ deserializedPricesheetDownloadPropertiesInner.expiryTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("downloadUrl".equals(fieldName)) {
+ deserializedPricesheetDownloadPropertiesInner.downloadUrl = reader.getString();
+ } else if ("downloadFileProperties".equals(fieldName)) {
+ deserializedPricesheetDownloadPropertiesInner.downloadFileProperties
+ = MCAPriceSheetProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPricesheetDownloadPropertiesInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryProperties.java
index 21e7d1324933d..8b47ddcea5a43 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryProperties.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.costmanagement.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 @@
/**
* Query properties.
*/
-@Fluent
+@Immutable
public final class QueryProperties implements JsonSerializable {
/*
* The link (url) to the next page of results.
@@ -36,7 +36,7 @@ public final class QueryProperties implements JsonSerializable
/**
* Creates an instance of QueryProperties class.
*/
- public QueryProperties() {
+ private QueryProperties() {
}
/**
@@ -48,17 +48,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: The link (url) to the next page of results.
- *
- * @param nextLink the nextLink value to set.
- * @return the QueryProperties object itself.
- */
- public QueryProperties withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
/**
* Get the columns property: Array of columns.
*
@@ -68,17 +57,6 @@ public List columns() {
return this.columns;
}
- /**
- * Set the columns property: Array of columns.
- *
- * @param columns the columns value to set.
- * @return the QueryProperties object itself.
- */
- public QueryProperties withColumns(List columns) {
- this.columns = columns;
- return this;
- }
-
/**
* Get the rows property: Array of rows.
*
@@ -88,28 +66,6 @@ public List> rows() {
return this.rows;
}
- /**
- * Set the rows property: Array of rows.
- *
- * @param rows the rows value to set.
- * @return the QueryProperties object itself.
- */
- public QueryProperties withRows(List> rows) {
- this.rows = rows;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (columns() != null) {
- columns().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryResultInner.java
index 0f4ec1e647dce..a267959072d32 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryResultInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/QueryResultInner.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.costmanagement.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -17,13 +17,18 @@
/**
* Result of query. It contains all columns listed under groupings and aggregation.
*/
-@Fluent
+@Immutable
public final class QueryResultInner extends CostManagementResource {
/*
* Query properties
*/
private QueryProperties innerProperties;
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
/*
* ETag of the resource.
*/
@@ -35,24 +40,29 @@ public final class QueryResultInner extends CostManagementResource {
private String sku;
/*
- * The type of the resource.
+ * Location of the resource.
+ */
+ private String location;
+
+ /*
+ * Resource type.
*/
private String type;
/*
- * The name of the resource.
+ * Resource name.
*/
private String name;
/*
- * Fully qualified resource Id for the resource.
+ * Resource Id.
*/
private String id;
/**
* Creates an instance of QueryResultInner class.
*/
- public QueryResultInner() {
+ private QueryResultInner() {
}
/**
@@ -64,6 +74,16 @@ private QueryProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ @Override
+ public Map tags() {
+ return this.tags;
+ }
+
/**
* Get the etag property: ETag of the resource.
*
@@ -85,7 +105,17 @@ public String sku() {
}
/**
- * Get the type property: The type of the resource.
+ * Get the location property: Location of the resource.
+ *
+ * @return the location value.
+ */
+ @Override
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the type property: Resource type.
*
* @return the type value.
*/
@@ -95,7 +125,7 @@ public String type() {
}
/**
- * Get the name property: The name of the resource.
+ * Get the name property: Resource name.
*
* @return the name value.
*/
@@ -105,7 +135,7 @@ public String name() {
}
/**
- * Get the id property: Fully qualified resource Id for the resource.
+ * Get the id property: Resource Id.
*
* @return the id value.
*/
@@ -114,24 +144,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public QueryResultInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public QueryResultInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
/**
* Get the nextLink property: The link (url) to the next page of results.
*
@@ -141,20 +153,6 @@ public String nextLink() {
return this.innerProperties() == null ? null : this.innerProperties().nextLink();
}
- /**
- * Set the nextLink property: The link (url) to the next page of results.
- *
- * @param nextLink the nextLink value to set.
- * @return the QueryResultInner object itself.
- */
- public QueryResultInner withNextLink(String nextLink) {
- if (this.innerProperties() == null) {
- this.innerProperties = new QueryProperties();
- }
- this.innerProperties().withNextLink(nextLink);
- return this;
- }
-
/**
* Get the columns property: Array of columns.
*
@@ -164,20 +162,6 @@ public List columns() {
return this.innerProperties() == null ? null : this.innerProperties().columns();
}
- /**
- * Set the columns property: Array of columns.
- *
- * @param columns the columns value to set.
- * @return the QueryResultInner object itself.
- */
- public QueryResultInner withColumns(List columns) {
- if (this.innerProperties() == null) {
- this.innerProperties = new QueryProperties();
- }
- this.innerProperties().withColumns(columns);
- return this;
- }
-
/**
* Get the rows property: Array of rows.
*
@@ -187,40 +171,12 @@ public List> rows() {
return this.innerProperties() == null ? null : this.innerProperties().rows();
}
- /**
- * Set the rows property: Array of rows.
- *
- * @param rows the rows value to set.
- * @return the QueryResultInner object itself.
- */
- public QueryResultInner withRows(List> rows) {
- if (this.innerProperties() == null) {
- this.innerProperties = new QueryProperties();
- }
- this.innerProperties().withRows(rows);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("location", location());
- jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -231,7 +187,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of QueryResultInner 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 QueryResultInner.
*/
public static QueryResultInner fromJson(JsonReader jsonReader) throws IOException {
@@ -248,14 +203,14 @@ public static QueryResultInner fromJson(JsonReader jsonReader) throws IOExceptio
} else if ("type".equals(fieldName)) {
deserializedQueryResultInner.type = reader.getString();
} else if ("location".equals(fieldName)) {
- deserializedQueryResultInner.withLocation(reader.getString());
- } else if ("tags".equals(fieldName)) {
- Map tags = reader.readMap(reader1 -> reader1.getString());
- deserializedQueryResultInner.withTags(tags);
+ deserializedQueryResultInner.location = reader.getString();
} else if ("sku".equals(fieldName)) {
deserializedQueryResultInner.sku = reader.getString();
} else if ("eTag".equals(fieldName)) {
deserializedQueryResultInner.etag = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedQueryResultInner.tags = tags;
} else if ("properties".equals(fieldName)) {
deserializedQueryResultInner.innerProperties = QueryProperties.fromJson(reader);
} else {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportConfigDefinition.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportConfigDefinition.java
index 2b529e28b5681..ecf5039bfdec0 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportConfigDefinition.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportConfigDefinition.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.costmanagement.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;
@@ -159,31 +158,6 @@ public ReportConfigDefinition withIncludeMonetaryCommitment(Boolean includeMonet
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (type() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property type in model ReportConfigDefinition"));
- }
- if (timeframe() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property timeframe in model ReportConfigDefinition"));
- }
- if (timePeriod() != null) {
- timePeriod().validate();
- }
- if (dataSet() != null) {
- dataSet().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ReportConfigDefinition.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportManifest.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportManifest.java
index 57e7622b7986f..bdd91c59419ed 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportManifest.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportManifest.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.costmanagement.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;
@@ -18,7 +18,7 @@
/**
* The manifest of the report generated by the operation.
*/
-@Fluent
+@Immutable
public final class ReportManifest implements JsonSerializable {
/*
* The Manifest version.
@@ -58,7 +58,7 @@ public final class ReportManifest implements JsonSerializable {
/**
* Creates an instance of ReportManifest class.
*/
- public ReportManifest() {
+ private ReportManifest() {
}
/**
@@ -70,17 +70,6 @@ public String manifestVersion() {
return this.manifestVersion;
}
- /**
- * Set the manifestVersion property: The Manifest version.
- *
- * @param manifestVersion the manifestVersion value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withManifestVersion(String manifestVersion) {
- this.manifestVersion = manifestVersion;
- return this;
- }
-
/**
* Get the dataFormat property: The data format of the report.
*
@@ -90,17 +79,6 @@ public CostDetailsDataFormat dataFormat() {
return this.dataFormat;
}
- /**
- * Set the dataFormat property: The data format of the report.
- *
- * @param dataFormat the dataFormat value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withDataFormat(CostDetailsDataFormat dataFormat) {
- this.dataFormat = dataFormat;
- return this;
- }
-
/**
* Get the byteCount property: The total number of bytes in all blobs.
*
@@ -110,17 +88,6 @@ public Long byteCount() {
return this.byteCount;
}
- /**
- * Set the byteCount property: The total number of bytes in all blobs.
- *
- * @param byteCount the byteCount value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withByteCount(Long byteCount) {
- this.byteCount = byteCount;
- return this;
- }
-
/**
* Get the blobCount property: The total number of blobs.
*
@@ -130,17 +97,6 @@ public Integer blobCount() {
return this.blobCount;
}
- /**
- * Set the blobCount property: The total number of blobs.
- *
- * @param blobCount the blobCount value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withBlobCount(Integer blobCount) {
- this.blobCount = blobCount;
- return this;
- }
-
/**
* Get the compressData property: Is the data in compressed format.
*
@@ -150,17 +106,6 @@ public Boolean compressData() {
return this.compressData;
}
- /**
- * Set the compressData property: Is the data in compressed format.
- *
- * @param compressData the compressData value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withCompressData(Boolean compressData) {
- this.compressData = compressData;
- return this;
- }
-
/**
* Get the innerRequestContext property: The context of the Cost Details request.
*
@@ -179,17 +124,6 @@ public List blobs() {
return this.blobs;
}
- /**
- * Set the blobs property: List of blob information generated by this operation.
- *
- * @param blobs the blobs value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withBlobs(List blobs) {
- this.blobs = blobs;
- return this;
- }
-
/**
* Get the requestScope property: The request scope of the request.
*
@@ -199,20 +133,6 @@ public String requestScope() {
return this.innerRequestContext() == null ? null : this.innerRequestContext().requestScope();
}
- /**
- * Set the requestScope property: The request scope of the request.
- *
- * @param requestScope the requestScope value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withRequestScope(String requestScope) {
- if (this.innerRequestContext() == null) {
- this.innerRequestContext = new RequestContext();
- }
- this.innerRequestContext().withRequestScope(requestScope);
- return this;
- }
-
/**
* Get the requestBody property: The request payload body provided in Cost Details call.
*
@@ -222,34 +142,6 @@ public GenerateCostDetailsReportRequestDefinition requestBody() {
return this.innerRequestContext() == null ? null : this.innerRequestContext().requestBody();
}
- /**
- * Set the requestBody property: The request payload body provided in Cost Details call.
- *
- * @param requestBody the requestBody value to set.
- * @return the ReportManifest object itself.
- */
- public ReportManifest withRequestBody(GenerateCostDetailsReportRequestDefinition requestBody) {
- if (this.innerRequestContext() == null) {
- this.innerRequestContext = new RequestContext();
- }
- this.innerRequestContext().withRequestBody(requestBody);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerRequestContext() != null) {
- innerRequestContext().validate();
- }
- if (blobs() != null) {
- blobs().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportUrl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportUrl.java
index caeb6bbe61890..a6d784a50e65c 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportUrl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ReportUrl.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.costmanagement.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 URL to download the generated report.
*/
-@Fluent
+@Immutable
public final class ReportUrl implements JsonSerializable {
/*
* The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily
@@ -34,7 +34,7 @@ public final class ReportUrl implements JsonSerializable {
/**
* Creates an instance of ReportUrl class.
*/
- public ReportUrl() {
+ private ReportUrl() {
}
/**
@@ -47,18 +47,6 @@ public ReservationReportSchema reportUrl() {
return this.reportUrl;
}
- /**
- * Set the reportUrl property: The CSV file from the reportUrl blob link consists of reservation usage data with the
- * following schema at daily granularity.
- *
- * @param reportUrl the reportUrl value to set.
- * @return the ReportUrl object itself.
- */
- public ReportUrl withReportUrl(ReservationReportSchema reportUrl) {
- this.reportUrl = reportUrl;
- return this;
- }
-
/**
* Get the validUntil property: The time at which report URL becomes invalid.
*
@@ -68,25 +56,6 @@ public OffsetDateTime validUntil() {
return this.validUntil;
}
- /**
- * Set the validUntil property: The time at which report URL becomes invalid.
- *
- * @param validUntil the validUntil value to set.
- * @return the ReportUrl object itself.
- */
- public ReportUrl withValidUntil(OffsetDateTime validUntil) {
- this.validUntil = validUntil;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/RequestContext.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/RequestContext.java
index f7fc1a42ae3f7..27439a4ba440b 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/RequestContext.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/RequestContext.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.costmanagement.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 @@
/**
* The context of the Cost Details request.
*/
-@Fluent
+@Immutable
public final class RequestContext implements JsonSerializable {
/*
* The request scope of the request.
@@ -30,7 +30,7 @@ public final class RequestContext implements JsonSerializable {
/**
* Creates an instance of RequestContext class.
*/
- public RequestContext() {
+ private RequestContext() {
}
/**
@@ -42,17 +42,6 @@ public String requestScope() {
return this.requestScope;
}
- /**
- * Set the requestScope property: The request scope of the request.
- *
- * @param requestScope the requestScope value to set.
- * @return the RequestContext object itself.
- */
- public RequestContext withRequestScope(String requestScope) {
- this.requestScope = requestScope;
- return this;
- }
-
/**
* Get the requestBody property: The request payload body provided in Cost Details call.
*
@@ -62,28 +51,6 @@ public GenerateCostDetailsReportRequestDefinition requestBody() {
return this.requestBody;
}
- /**
- * Set the requestBody property: The request payload body provided in Cost Details call.
- *
- * @param requestBody the requestBody value to set.
- * @return the RequestContext object itself.
- */
- public RequestContext withRequestBody(GenerateCostDetailsReportRequestDefinition requestBody) {
- this.requestBody = requestBody;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (requestBody() != null) {
- requestBody().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SavingsPlanUtilizationSummaryProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SavingsPlanUtilizationSummaryProperties.java
index 03f9415dcc13a..41994cdaca510 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SavingsPlanUtilizationSummaryProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SavingsPlanUtilizationSummaryProperties.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.costmanagement.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.JsonToken;
@@ -18,11 +18,11 @@
/**
* Savings plan utilization summary properties.
*/
-@Fluent
+@Immutable
public final class SavingsPlanUtilizationSummaryProperties extends BenefitUtilizationSummaryProperties {
/*
* This is the average hourly utilization for each date range that corresponds to given grain (Daily, Monthly).
- * Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will
+ * Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will
* be one record per benefit id for each day. For a single day, the avgUtilizationPercentage value will be equal to
* the average of the set of values where the set contains 24 utilization percentage entries one for each hour in a
* specific day.
@@ -31,7 +31,7 @@ public final class SavingsPlanUtilizationSummaryProperties extends BenefitUtiliz
/*
* This is the minimum hourly utilization for each date range that corresponds to given grain (Daily, Monthly).
- * Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will
+ * Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will
* be one record per benefit id for each day. For a single day, the minUtilizationPercentage value will be equal to
* the smallest in the set of values where the set contains 24 utilization percentage entries one for each hour in a
* specific day. If on the day 2022-10-18, the lowest utilization percentage was 10% at hour 4, then the value for
@@ -41,7 +41,7 @@ public final class SavingsPlanUtilizationSummaryProperties extends BenefitUtiliz
/*
* This is the maximum hourly utilization for each date range that corresponds to given grain (Daily, Monthly).
- * Suppose the API call is for usageDate > 2022-10-01 and usageDate < 2022-10-31 at a daily granularity. There will
+ * Suppose the API call is for usageDate > 2025-03-01 and usageDate < 2022-10-31 at a daily granularity. There will
* be one record per benefit id for each day. For a single day, the maxUtilizationPercentage value will be equal to
* the largest in the set of values where the set contains 24 utilization percentage entries one for each hour in a
* specific day. If on the day 2022-10-18, the largest utilization percentage was 90% at hour 5, then the value for
@@ -55,6 +55,11 @@ public final class SavingsPlanUtilizationSummaryProperties extends BenefitUtiliz
*/
private OffsetDateTime usageDate;
+ /*
+ * The benefit type. Supported values: 'SavingsPlan'.
+ */
+ private BenefitKind benefitType;
+
/*
* The benefit order ID is the identifier for a benefit purchase.
*/
@@ -73,12 +78,12 @@ public final class SavingsPlanUtilizationSummaryProperties extends BenefitUtiliz
/**
* Creates an instance of SavingsPlanUtilizationSummaryProperties class.
*/
- public SavingsPlanUtilizationSummaryProperties() {
+ private SavingsPlanUtilizationSummaryProperties() {
}
/**
* Get the avgUtilizationPercentage property: This is the average hourly utilization for each date range that
- * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate
+ * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate
* < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day,
* the avgUtilizationPercentage value will be equal to the average of the set of values where the set contains 24
* utilization percentage entries one for each hour in a specific day.
@@ -91,7 +96,7 @@ public BigDecimal avgUtilizationPercentage() {
/**
* Get the minUtilizationPercentage property: This is the minimum hourly utilization for each date range that
- * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate
+ * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate
* < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day,
* the minUtilizationPercentage value will be equal to the smallest in the set of values where the set contains 24
* utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the lowest
@@ -106,7 +111,7 @@ public BigDecimal minUtilizationPercentage() {
/**
* Get the maxUtilizationPercentage property: This is the maximum hourly utilization for each date range that
- * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2022-10-01 and usageDate
+ * corresponds to given grain (Daily, Monthly). Suppose the API call is for usageDate > 2025-03-01 and usageDate
* < 2022-10-31 at a daily granularity. There will be one record per benefit id for each day. For a single day,
* the maxUtilizationPercentage value will be equal to the largest in the set of values where the set contains 24
* utilization percentage entries one for each hour in a specific day. If on the day 2022-10-18, the largest
@@ -130,6 +135,16 @@ public OffsetDateTime usageDate() {
return this.usageDate;
}
+ /**
+ * Get the benefitType property: The benefit type. Supported values: 'SavingsPlan'.
+ *
+ * @return the benefitType value.
+ */
+ @Override
+ public BenefitKind benefitType() {
+ return this.benefitType;
+ }
+
/**
* Get the benefitOrderId property: The benefit order ID is the identifier for a benefit purchase.
*
@@ -160,24 +175,6 @@ public String armSkuName() {
return this.armSkuName;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public SavingsPlanUtilizationSummaryProperties withBenefitType(BenefitKind benefitType) {
- super.withBenefitType(benefitType);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
@@ -211,8 +208,8 @@ public static SavingsPlanUtilizationSummaryProperties fromJson(JsonReader jsonRe
} else if ("benefitOrderId".equals(fieldName)) {
deserializedSavingsPlanUtilizationSummaryProperties.benefitOrderId = reader.getString();
} else if ("benefitType".equals(fieldName)) {
- deserializedSavingsPlanUtilizationSummaryProperties
- .withBenefitType(BenefitKind.fromString(reader.getString()));
+ deserializedSavingsPlanUtilizationSummaryProperties.benefitType
+ = BenefitKind.fromString(reader.getString());
} else if ("usageDate".equals(fieldName)) {
deserializedSavingsPlanUtilizationSummaryProperties.usageDate = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionInner.java
index 136e9e16b3b9d..61c5e15d03631 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionInner.java
@@ -1,10 +1,11 @@
// 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.costmanagement.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;
@@ -13,7 +14,6 @@
import com.azure.resourcemanager.costmanagement.models.NotificationProperties;
import com.azure.resourcemanager.costmanagement.models.ScheduleProperties;
import com.azure.resourcemanager.costmanagement.models.ScheduledActionKind;
-import com.azure.resourcemanager.costmanagement.models.ScheduledActionProxyResource;
import com.azure.resourcemanager.costmanagement.models.ScheduledActionStatus;
import java.io.IOException;
@@ -21,17 +21,12 @@
* Scheduled action definition.
*/
@Fluent
-public final class ScheduledActionInner extends ScheduledActionProxyResource {
+public final class ScheduledActionInner extends ProxyResource {
/*
* The properties of the scheduled action.
*/
private ScheduledActionProperties innerProperties;
- /*
- * Kind of the scheduled action.
- */
- private SystemData systemData;
-
/*
* Resource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch
* the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or
@@ -39,6 +34,16 @@ public final class ScheduledActionInner extends ScheduledActionProxyResource {
*/
private String etag;
+ /*
+ * Kind of the scheduled action.
+ */
+ private ScheduledActionKind kind;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -70,26 +75,58 @@ private ScheduledActionProperties innerProperties() {
}
/**
- * Get the systemData property: Kind of the scheduled action.
+ * Get the etag property: Resource Etag. For update calls, eTag is optional and can be specified to achieve
+ * optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag
+ * as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not
+ * required.
*
- * @return the systemData value.
+ * @return the etag value.
*/
- @Override
- public SystemData systemData() {
- return this.systemData;
+ public String etag() {
+ return this.etag;
}
/**
- * Get the etag property: Resource Etag. For update calls, eTag is optional and can be specified to achieve
+ * Set the etag property: Resource Etag. For update calls, eTag is optional and can be specified to achieve
* optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag
* as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not
* required.
*
- * @return the etag value.
+ * @param etag the etag value to set.
+ * @return the ScheduledActionInner object itself.
*/
- @Override
- public String etag() {
- return this.etag;
+ public ScheduledActionInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the kind property: Kind of the scheduled action.
+ *
+ * @return the kind value.
+ */
+ public ScheduledActionKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: Kind of the scheduled action.
+ *
+ * @param kind the kind value to set.
+ * @return the ScheduledActionInner object itself.
+ */
+ public ScheduledActionInner withKind(ScheduledActionKind kind) {
+ this.kind = kind;
+ 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;
}
/**
@@ -122,15 +159,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public ScheduledActionInner withKind(ScheduledActionKind kind) {
- super.withKind(kind);
- return this;
- }
-
/**
* Get the displayName property: Scheduled action name.
*
@@ -249,9 +277,10 @@ public ScheduledActionInner withSchedule(ScheduleProperties schedule) {
}
/**
- * Get the scope property: Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope,
- * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * Get the scope property: For private scheduled action(Create or Update), scope will be empty.<br /> For
+ * shared scheduled action(Create or Update By Scope), Cost Management scope can be '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,
@@ -270,9 +299,10 @@ public String scope() {
}
/**
- * Set the scope property: Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope,
- * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * Set the scope property: For private scheduled action(Create or Update), scope will be empty.<br /> For
+ * shared scheduled action(Create or Update By Scope), Cost Management scope can be '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,
@@ -343,26 +373,15 @@ public ScheduledActionInner withViewId(String viewId) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString());
jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("eTag", this.etag);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
return jsonWriter.writeEndObject();
}
@@ -388,14 +407,14 @@ public static ScheduledActionInner fromJson(JsonReader jsonReader) throws IOExce
deserializedScheduledActionInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedScheduledActionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedScheduledActionInner.innerProperties = ScheduledActionProperties.fromJson(reader);
} else if ("eTag".equals(fieldName)) {
deserializedScheduledActionInner.etag = reader.getString();
} else if ("kind".equals(fieldName)) {
- deserializedScheduledActionInner.withKind(ScheduledActionKind.fromString(reader.getString()));
+ deserializedScheduledActionInner.kind = ScheduledActionKind.fromString(reader.getString());
} else if ("systemData".equals(fieldName)) {
deserializedScheduledActionInner.systemData = SystemData.fromJson(reader);
- } else if ("properties".equals(fieldName)) {
- deserializedScheduledActionInner.innerProperties = ScheduledActionProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionProperties.java
index bc817c320558c..53be0797b469e 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ScheduledActionProperties.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.costmanagement.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;
@@ -47,7 +46,8 @@ public final class ScheduledActionProperties implements JsonSerializable For shared scheduled action(Create or
+ * Update By Scope), Cost Management scope can be '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,
@@ -183,9 +183,10 @@ public ScheduledActionProperties withSchedule(ScheduleProperties schedule) {
}
/**
- * Get the scope property: Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope,
- * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * Get the scope property: For private scheduled action(Create or Update), scope will be empty.<br /> For
+ * shared scheduled action(Create or Update By Scope), Cost Management scope can be '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,
@@ -204,9 +205,10 @@ public String scope() {
}
/**
- * Set the scope property: Cost Management scope like 'subscriptions/{subscriptionId}' for subscription scope,
- * 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
+ * Set the scope property: For private scheduled action(Create or Update), scope will be empty.<br /> For
+ * shared scheduled action(Create or Update By Scope), Cost Management scope can be '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,
@@ -268,48 +270,6 @@ public ScheduledActionProperties withViewId(String viewId) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (displayName() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property displayName in model ScheduledActionProperties"));
- }
- if (fileDestination() != null) {
- fileDestination().validate();
- }
- if (notification() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property notification in model ScheduledActionProperties"));
- } else {
- notification().validate();
- }
- if (schedule() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property schedule in model ScheduledActionProperties"));
- } else {
- schedule().validate();
- }
- if (status() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property status in model ScheduledActionProperties"));
- }
- if (viewId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Missing required property viewId in model ScheduledActionProperties"));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(ScheduledActionProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingInner.java
new file mode 100644
index 0000000000000..efa4c7f91726c
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingInner.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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;
+import com.azure.resourcemanager.costmanagement.models.SettingsKind;
+import com.azure.resourcemanager.costmanagement.models.TagInheritanceSetting;
+import java.io.IOException;
+
+/**
+ * Setting definition.
+ */
+@Immutable
+public class SettingInner extends ProxyResource {
+ /*
+ * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g.
+ * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist
+ * this value.
+ */
+ private SettingsKind kind = SettingsKind.fromString("Setting");
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SettingInner class.
+ */
+ public SettingInner() {
+ }
+
+ /**
+ * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of
+ * the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must
+ * validate and persist this value.
+ *
+ * @return the kind value.
+ */
+ public SettingsKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * 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 SettingInner object itself.
+ */
+ SettingInner withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SettingInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SettingInner 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 SettingInner.
+ */
+ public static SettingInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("kind".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("taginheritance".equals(discriminatorValue)) {
+ return TagInheritanceSetting.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static SettingInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SettingInner deserializedSettingInner = new SettingInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSettingInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSettingInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSettingInner.type = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ deserializedSettingInner.kind = SettingsKind.fromString(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSettingInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSettingInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingsListResultInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingsListResultInner.java
new file mode 100644
index 0000000000000..614c4f929e4ef
--- /dev/null
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/SettingsListResultInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.costmanagement.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 java.io.IOException;
+import java.util.List;
+
+/**
+ * Setting list result. It contains a list of settings.
+ */
+@Immutable
+public final class SettingsListResultInner implements JsonSerializable {
+ /*
+ * The list of settings.
+ */
+ private List value;
+
+ /**
+ * Creates an instance of SettingsListResultInner class.
+ */
+ private SettingsListResultInner() {
+ }
+
+ /**
+ * Get the value property: The list of settings.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SettingsListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SettingsListResultInner 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 SettingsListResultInner.
+ */
+ public static SettingsListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SettingsListResultInner deserializedSettingsListResultInner = new SettingsListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> SettingInner.fromJson(reader1));
+ deserializedSettingsListResultInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSettingsListResultInner;
+ });
+ }
+}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewInner.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewInner.java
index 2894a49728c6f..4a19ff85be3cb 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewInner.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewInner.java
@@ -1,16 +1,17 @@
// 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.costmanagement.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;
import com.azure.resourcemanager.costmanagement.models.AccumulatedType;
import com.azure.resourcemanager.costmanagement.models.ChartType;
-import com.azure.resourcemanager.costmanagement.models.CostManagementProxyResource;
import com.azure.resourcemanager.costmanagement.models.KpiProperties;
import com.azure.resourcemanager.costmanagement.models.MetricType;
import com.azure.resourcemanager.costmanagement.models.PivotProperties;
@@ -26,12 +27,23 @@
* States and configurations of Cost Analysis.
*/
@Fluent
-public final class ViewInner extends CostManagementProxyResource {
+public final class ViewInner extends ProxyResource {
/*
* The properties of the view.
*/
private ViewProperties 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.
+ */
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
/*
* The type of the resource.
*/
@@ -62,6 +74,37 @@ private ViewProperties innerProperties() {
return this.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.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.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.
+ *
+ * @param etag the etag value to set.
+ * @return the ViewInner object itself.
+ */
+ public ViewInner withEtag(String etag) {
+ this.etag = 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.
*
@@ -92,15 +135,6 @@ public String id() {
return this.id;
}
- /**
- * {@inheritDoc}
- */
- @Override
- public ViewInner withEtag(String etag) {
- super.withEtag(etag);
- return this;
- }
-
/**
* Get the displayName property: User input name of the view. Required.
*
@@ -191,6 +225,20 @@ public OffsetDateTime modifiedOn() {
return this.innerProperties() == null ? null : this.innerProperties().modifiedOn();
}
+ /**
+ * Set the modifiedOn property: Date when the user last modified this view.
+ *
+ * @param modifiedOn the modifiedOn value to set.
+ * @return the ViewInner object itself.
+ */
+ public ViewInner withModifiedOn(OffsetDateTime modifiedOn) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ViewProperties();
+ }
+ this.innerProperties().withModifiedOn(modifiedOn);
+ return this;
+ }
+
/**
* Get the dateRange property: Date range of the current view.
*
@@ -459,26 +507,14 @@ public ViewInner withIncludeMonetaryCommitment(Boolean includeMonetaryCommitment
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("eTag", etag());
jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeStringField("eTag", this.etag);
return jsonWriter.writeEndObject();
}
@@ -504,10 +540,12 @@ public static ViewInner fromJson(JsonReader jsonReader) throws IOException {
deserializedViewInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedViewInner.type = reader.getString();
- } else if ("eTag".equals(fieldName)) {
- deserializedViewInner.withEtag(reader.getString());
} else if ("properties".equals(fieldName)) {
deserializedViewInner.innerProperties = ViewProperties.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedViewInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedViewInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewProperties.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewProperties.java
index 857821d1a89d4..5033ed9968ddd 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewProperties.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/ViewProperties.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.costmanagement.fluent.models;
@@ -21,6 +21,7 @@
import com.azure.resourcemanager.costmanagement.models.ReportType;
import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.List;
/**
@@ -191,6 +192,17 @@ public OffsetDateTime modifiedOn() {
return this.modifiedOn;
}
+ /**
+ * Set the modifiedOn property: Date when the user last modified this view.
+ *
+ * @param modifiedOn the modifiedOn value to set.
+ * @return the ViewProperties object itself.
+ */
+ public ViewProperties withModifiedOn(OffsetDateTime modifiedOn) {
+ this.modifiedOn = modifiedOn;
+ return this;
+ }
+
/**
* Get the dateRange property: Date range of the current view.
*
@@ -450,23 +462,6 @@ public ViewProperties withIncludeMonetaryCommitment(Boolean includeMonetaryCommi
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerQuery() != null) {
- innerQuery().validate();
- }
- if (kpis() != null) {
- kpis().forEach(e -> e.validate());
- }
- if (pivots() != null) {
- pivots().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -475,6 +470,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("displayName", this.displayName);
jsonWriter.writeStringField("scope", this.scope);
+ jsonWriter.writeStringField("modifiedOn",
+ this.modifiedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.modifiedOn));
jsonWriter.writeStringField("dateRange", this.dateRange);
jsonWriter.writeJsonField("query", this.innerQuery);
jsonWriter.writeStringField("chart", this.chart == null ? null : this.chart.toString());
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/package-info.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/package-info.java
index fb70f3c11b5c7..c1a7871959654 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/models/package-info.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/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 CostManagementClient.
+ * Package containing the inner data models for CostManagement.
* CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.costmanagement.fluent.models;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/package-info.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/package-info.java
index 4ae35adcb0468..f4c47725a4eda 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/fluent/package-info.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/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 CostManagementClient.
+ * Package containing the service clients for CostManagement.
* CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions.
*/
package com.azure.resourcemanager.costmanagement.fluent;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertImpl.java
index 06a4ea6283347..37284bcc7d44c 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertImpl.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.costmanagement.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.costmanagement.fluent.models.AlertInner;
import com.azure.resourcemanager.costmanagement.models.Alert;
import com.azure.resourcemanager.costmanagement.models.AlertPropertiesDefinition;
@@ -37,6 +38,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public AlertPropertiesDefinition definition() {
return this.innerModel().definition();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsClientImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsClientImpl.java
index 956793a9c9e7e..910e2c677e0f0 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsClientImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsClientImpl.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.costmanagement.implementation;
@@ -42,219 +42,102 @@ public final class AlertsClientImpl implements AlertsClient {
/**
* The service client containing this operation class.
*/
- private final CostManagementClientImpl client;
+ private final CostManagementManagementClientImpl client;
/**
* Initializes an instance of AlertsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- AlertsClientImpl(CostManagementClientImpl client) {
+ AlertsClientImpl(CostManagementManagementClientImpl client) {
this.service = RestProxy.create(AlertsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for CostManagementClientAlerts to be used by the proxy service to perform
- * REST calls.
+ * The interface defining all the services for CostManagementManagementClientAlerts to be used by the proxy service
+ * to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "CostManagementClient")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CostManagementManagementClientAlerts")
public interface AlertsService {
@Headers({ "Content-Type: application/json" })
- @Get("/{scope}/providers/Microsoft.CostManagement/alerts")
+ @Get("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> get(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
- @HeaderParam("Accept") String accept, Context context);
+ @PathParam(value = "alertId", encoded = true) String alertId, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
+ Response getSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
@PathParam(value = "alertId", encoded = true) String alertId, @HeaderParam("Accept") String accept,
Context context);
- @Headers({ "Content-Type: application/json" })
@Patch("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> dismiss(@HostParam("$host") String endpoint,
+ Mono> dismiss(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
@PathParam(value = "alertId", encoded = true) String alertId,
- @BodyParam("application/json") DismissAlertPayload parameters, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DismissAlertPayload parameters, Context context);
+
+ @Patch("/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response dismissSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam(value = "scope", encoded = true) String scope,
+ @PathParam(value = "alertId", encoded = true) String alertId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DismissAlertPayload parameters, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{scope}/providers/Microsoft.CostManagement/alerts")
+ @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" })
+ @Get("/{scope}/providers/Microsoft.CostManagement/alerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ 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("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listExternal(@HostParam("$host") String endpoint,
+ Mono> listExternal(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("externalCloudProviderType") ExternalCloudProviderType externalCloudProviderType,
@PathParam("externalCloudProviderId") String externalCloudProviderId, @HeaderParam("Accept") String accept,
Context context);
- }
-
- /**
- * Lists the alerts for scope defined.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alerts along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(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(), this.client.getApiVersion(), scope, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists the alerts for scope defined.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @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 alerts along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(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(), this.client.getApiVersion(), scope, accept, context);
- }
-
- /**
- * Lists the alerts for scope defined.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alerts on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listAsync(String scope) {
- return listWithResponseAsync(scope).flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Lists the alerts for scope defined.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @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 alerts along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response listWithResponse(String scope, Context context) {
- return listWithResponseAsync(scope, context).block();
- }
- /**
- * Lists the alerts for scope defined.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alerts.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AlertsResultInner list(String scope) {
- return listWithResponse(scope, Context.NONE).getValue();
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.CostManagement/{externalCloudProviderType}/{externalCloudProviderId}/alerts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listExternalSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("externalCloudProviderType") ExternalCloudProviderType externalCloudProviderType,
+ @PathParam("externalCloudProviderId") String externalCloudProviderId, @HeaderParam("Accept") String accept,
+ Context context);
}
/**
* Gets the alert for the scope by alert ID.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -263,16 +146,6 @@ public AlertsResultInner list(String scope) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(String scope, String alertId) {
- 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 (alertId == null) {
- return Mono.error(new IllegalArgumentException("Parameter alertId is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, alertId,
@@ -283,55 +156,7 @@ private Mono> getWithResponseAsync(String scope, String ale
/**
* Gets the alert for the scope by alert ID.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert 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 alert for the scope by alert ID along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String scope, String alertId, 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 (alertId == null) {
- return Mono.error(new IllegalArgumentException("Parameter alertId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), scope, alertId, accept, context);
- }
-
- /**
- * Gets the alert for the scope by alert ID.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -343,52 +168,14 @@ private Mono getAsync(String scope, String alertId) {
return getWithResponseAsync(scope, alertId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Gets the alert for the scope by alert ID.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert 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 alert for the scope by alert ID along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String scope, String alertId, Context context) {
- return getWithResponseAsync(scope, alertId, context).block();
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, alertId, accept, context);
}
- /**
- * Gets the alert for the scope by alert ID.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert 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 alert for the scope by alert ID.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public AlertInner get(String scope, String alertId) {
return getWithResponse(scope, alertId, Context.NONE).getValue();
@@ -397,17 +184,7 @@ public AlertInner get(String scope, String alertId) {
/**
* Dismisses the specified alert.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @param parameters Parameters supplied to the Dismiss Alert operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -418,102 +195,48 @@ public AlertInner get(String scope, String alertId) {
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> dismissWithResponseAsync(String scope, String alertId,
DismissAlertPayload 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 (alertId == null) {
- return Mono.error(new IllegalArgumentException("Parameter alertId 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.dismiss(this.client.getEndpoint(), this.client.getApiVersion(), scope,
- alertId, parameters, accept, context))
+ alertId, contentType, accept, parameters, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Dismisses the specified alert.
*
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/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 alertId Alert ID.
* @param parameters Parameters supplied to the Dismiss Alert 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 an individual alert along with {@link Response} on successful completion of {@link Mono}.
+ * @return an individual alert on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> dismissWithResponseAsync(String scope, String alertId,
- DismissAlertPayload 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 (alertId == null) {
- return Mono.error(new IllegalArgumentException("Parameter alertId 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();
- }
+ private Mono dismissAsync(String scope, String alertId, DismissAlertPayload parameters) {
+ return dismissWithResponseAsync(scope, alertId, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response dismissWithResponse(String scope, String alertId, DismissAlertPayload parameters,
+ Context context) {
+ final String contentType = "application/json";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.dismiss(this.client.getEndpoint(), this.client.getApiVersion(), scope, alertId, parameters,
- accept, context);
+ return service.dismissSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, alertId, contentType,
+ accept, parameters, context);
}
- /**
- * Dismisses the specified alert.
- *
- * @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
- * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and
- * '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
- * for invoiceSection scope, and
- * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert ID.
- * @param parameters Parameters supplied to the Dismiss Alert 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 an individual alert on successful completion of {@link Mono}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono dismissAsync(String scope, String alertId, DismissAlertPayload parameters) {
- return dismissWithResponseAsync(scope, alertId, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ public AlertInner dismiss(String scope, String alertId, DismissAlertPayload parameters) {
+ return dismissWithResponse(scope, alertId, parameters, Context.NONE).getValue();
}
/**
- * Dismisses the specified alert.
+ * Lists the alerts for scope defined.
*
* @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
@@ -526,22 +249,22 @@ private Mono dismissAsync(String scope, String alertId, DismissAlert
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert ID.
- * @param parameters Parameters supplied to the Dismiss Alert 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 an individual alert along with {@link Response}.
+ * @return result of alerts along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response dismissWithResponse(String scope, String alertId, DismissAlertPayload parameters,
- Context context) {
- return dismissWithResponseAsync(scope, alertId, parameters, context).block();
+ private Mono> listWithResponseAsync(String scope) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Dismisses the specified alert.
+ * Lists the alerts for scope defined.
*
* @param scope The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for
* subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
@@ -554,16 +277,27 @@ public Response dismissWithResponse(String scope, String alertId, Di
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
* for invoiceSection scope, and
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.
- * @param alertId Alert ID.
- * @param parameters Parameters supplied to the Dismiss Alert 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 an individual alert.
+ * @return result of alerts on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public AlertInner dismiss(String scope, String alertId, DismissAlertPayload parameters) {
- return dismissWithResponse(scope, alertId, parameters, Context.NONE).getValue();
+ private Mono listAsync(String scope) {
+ return listWithResponseAsync(scope).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(String scope, Context context) {
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), scope, accept, context);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AlertsResultInner list(String scope) {
+ return listWithResponse(scope, Context.NONE).getValue();
}
/**
@@ -581,18 +315,6 @@ public AlertInner dismiss(String scope, String alertId, DismissAlertPayload para
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listExternalWithResponseAsync(
ExternalCloudProviderType externalCloudProviderType, String externalCloudProviderId) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (externalCloudProviderType == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter externalCloudProviderType is required and cannot be null."));
- }
- if (externalCloudProviderId == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter externalCloudProviderId is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(context -> service.listExternal(this.client.getEndpoint(), this.client.getApiVersion(),
@@ -600,40 +322,6 @@ private Mono> listExternalWithResponseAsync(
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Lists the Alerts for external cloud provider type defined.
- *
- * @param externalCloudProviderType The external cloud provider type associated with dimension/query operations.
- * This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- * @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
- * '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @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 alerts along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listExternalWithResponseAsync(
- ExternalCloudProviderType externalCloudProviderType, String externalCloudProviderId, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (externalCloudProviderType == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter externalCloudProviderType is required and cannot be null."));
- }
- if (externalCloudProviderId == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter externalCloudProviderId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listExternal(this.client.getEndpoint(), this.client.getApiVersion(), externalCloudProviderType,
- externalCloudProviderId, accept, context);
- }
-
/**
* Lists the Alerts for external cloud provider type defined.
*
@@ -653,37 +341,16 @@ private Mono listExternalAsync(ExternalCloudProviderType exte
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Lists the Alerts for external cloud provider type defined.
- *
- * @param externalCloudProviderType The external cloud provider type associated with dimension/query operations.
- * This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- * @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
- * '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @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 alerts along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listExternalWithResponse(ExternalCloudProviderType externalCloudProviderType,
String externalCloudProviderId, Context context) {
- return listExternalWithResponseAsync(externalCloudProviderType, externalCloudProviderId, context).block();
+ final String accept = "application/json";
+ return service.listExternalSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ externalCloudProviderType, externalCloudProviderId, accept, context);
}
- /**
- * Lists the Alerts for external cloud provider type defined.
- *
- * @param externalCloudProviderType The external cloud provider type associated with dimension/query operations.
- * This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account.
- * @param externalCloudProviderId This can be '{externalSubscriptionId}' for linked account or
- * '{externalBillingAccountId}' for consolidated account used with dimension/query operations.
- * @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 alerts.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public AlertsResultInner listExternal(ExternalCloudProviderType externalCloudProviderType,
String externalCloudProviderId) {
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsImpl.java
index b0209c0bd3878..bf28008eb9011 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsImpl.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.costmanagement.implementation;
@@ -30,33 +30,10 @@ public AlertsImpl(AlertsClient innerClient,
this.serviceManager = serviceManager;
}
- public Response listWithResponse(String scope, Context context) {
- Response inner = this.serviceClient().listWithResponse(scope, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AlertsResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public AlertsResult list(String scope) {
- AlertsResultInner inner = this.serviceClient().list(scope);
- if (inner != null) {
- return new AlertsResultImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response getWithResponse(String scope, String alertId, Context context) {
Response inner = this.serviceClient().getWithResponse(scope, alertId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AlertImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AlertImpl(inner.getValue(), this.manager()));
}
public Alert get(String scope, String alertId) {
@@ -71,18 +48,29 @@ public Alert get(String scope, String alertId) {
public Response dismissWithResponse(String scope, String alertId, DismissAlertPayload parameters,
Context context) {
Response inner = this.serviceClient().dismissWithResponse(scope, alertId, parameters, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AlertImpl(inner.getValue(), this.manager()));
+ }
+
+ public Alert dismiss(String scope, String alertId, DismissAlertPayload parameters) {
+ AlertInner inner = this.serviceClient().dismiss(scope, alertId, parameters);
if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AlertImpl(inner.getValue(), this.manager()));
+ return new AlertImpl(inner, this.manager());
} else {
return null;
}
}
- public Alert dismiss(String scope, String alertId, DismissAlertPayload parameters) {
- AlertInner inner = this.serviceClient().dismiss(scope, alertId, parameters);
+ public Response listWithResponse(String scope, Context context) {
+ Response inner = this.serviceClient().listWithResponse(scope, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AlertsResultImpl(inner.getValue(), this.manager()));
+ }
+
+ public AlertsResult list(String scope) {
+ AlertsResultInner inner = this.serviceClient().list(scope);
if (inner != null) {
- return new AlertImpl(inner, this.manager());
+ return new AlertsResultImpl(inner, this.manager());
} else {
return null;
}
@@ -92,12 +80,8 @@ public Response listExternalWithResponse(ExternalCloudProviderType
String externalCloudProviderId, Context context) {
Response inner = this.serviceClient()
.listExternalWithResponse(externalCloudProviderType, externalCloudProviderId, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AlertsResultImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AlertsResultImpl(inner.getValue(), this.manager()));
}
public AlertsResult listExternal(ExternalCloudProviderType externalCloudProviderType,
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsResultImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsResultImpl.java
index 8242c3ad2c1d0..779c57424d0e8 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsResultImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/AlertsResultImpl.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.costmanagement.implementation;
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationModelImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationModelImpl.java
index 66a2cc9f9747e..daba13fd3a159 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationModelImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationModelImpl.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.costmanagement.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.costmanagement.fluent.models.BenefitRecommendationModelInner;
import com.azure.resourcemanager.costmanagement.models.BenefitKind;
import com.azure.resourcemanager.costmanagement.models.BenefitRecommendationModel;
@@ -36,6 +37,10 @@ public BenefitKind kind() {
return this.innerModel().kind();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public BenefitRecommendationProperties properties() {
return this.innerModel().properties();
}
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationsClientImpl.java b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationsClientImpl.java
index 6962cab69c04c..c1a2468639dd0 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationsClientImpl.java
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/implementation/BenefitRecommendationsClientImpl.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.costmanagement.implementation;
@@ -27,7 +27,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.costmanagement.fluent.BenefitRecommendationsClient;
import com.azure.resourcemanager.costmanagement.fluent.models.BenefitRecommendationModelInner;
-import com.azure.resourcemanager.costmanagement.models.BenefitRecommendationsListResult;
+import com.azure.resourcemanager.costmanagement.implementation.models.BenefitRecommendationsListResult;
import reactor.core.publisher.Mono;
/**
@@ -42,33 +42,43 @@ public final class BenefitRecommendationsClientImpl implements BenefitRecommenda
/**
* The service client containing this operation class.
*/
- private final CostManagementClientImpl client;
+ private final CostManagementManagementClientImpl client;
/**
* Initializes an instance of BenefitRecommendationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- BenefitRecommendationsClientImpl(CostManagementClientImpl client) {
+ BenefitRecommendationsClientImpl(CostManagementManagementClientImpl client) {
this.service = RestProxy.create(BenefitRecommendationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for CostManagementClientBenefitRecommendations to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for CostManagementManagementClientBenefitRecommendations to be used by
+ * the proxy service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "CostManagementClient")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CostManagementManagementClientBenefitRecommendations")
public interface BenefitRecommendationsService {
@Headers({ "Content-Type: application/json" })
@Get("/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @QueryParam("$filter") String filter, @QueryParam("$orderby") String orderby,
- @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion,
+ Mono